1 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4 * configure.srv (ipa_ppc_linux_regobj): Add
5 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
6 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
7 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
8 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
9 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
10 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
11 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
12 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
13 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
14 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
15 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
16 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
17 (ppc_hwcap): Add comment.
18 (ppc_hwcap2): New global.
19 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
20 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
21 (ppc_regsets): Add entries for the DSCR and PPR regsets.
22 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
23 when needed. Set sizes for the the DSCR and PPR regsets.
24 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
25 (initialize_low_arch): Call
26 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
27 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
28 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
29 PPC_TDESC_ISA205_PPR_DSCR_VSX.
30 (initialize_low_tracepoint): Call
31 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
32 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
34 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
36 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
38 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
39 Simon Marchi <simark@simark.ca>
41 * acinclude.m4: Include "../selftest.m4".
42 * configure: Regenerate.
43 * configure.ac: Use "GDB_AC_SELFTEST".
44 * configure.srv: Use "$enable_unittests" instead of
45 "$development" when checking whether unit tests have been
47 * server.c (captured_main): Update message informing that
48 selftests have been disabled.
50 2018-10-04 Tom Tromey <tom@tromey.com>
54 2018-10-04 Tom Tromey <tom@tromey.com>
56 * server.c (handle_status): Rename inner "thread".
57 (process_serial_event): Declare "res" in 'm' case.
58 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
59 (iterate_over_lwps): Rename inner "thread".
60 (linux_qxfer_libraries_svr4): Rename inner "len".
61 * gdbthread.h (find_thread_in_random): Rename inner "thread".
63 2018-10-01 Gary Benson <gbenson@redhat.com>
65 * gdb_proc_service.h: Moved common code to
66 common/gdb_proc_service.h.
68 2018-10-01 Gary Benson <gbenson@redhat.com>
70 * gdb_proc_service.h: Synchronize comments and whitespace with
71 GDB's version of this file.
73 2018-09-25 Tom Tromey <tom@tromey.com>
76 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
78 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
80 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
81 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
82 ($(IPA_LIB)): Sort IPA_OBJS.
84 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
86 * Makefile.in: Remove references to $(ADD_DEPS).
88 2018-09-16 Tom Tromey <tom@tromey.com>
90 * remote-utils.c (remote_open): Use GNU style for metasyntactic
92 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
95 2018-09-05 Tom Tromey <tom@tromey.com>
99 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
102 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
104 2018-08-27 Tom Tromey <tom@tromey.com>
107 * configure: Rebuild.
109 2018-08-27 Tom Tromey <tom@tromey.com>
111 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
112 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
113 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
114 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
115 (s390x_emit_stack_adjust): Add casts to unsigned char.
117 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
121 * server.h (struct client_state) <disable_randomization>:
124 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
126 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
128 (mips_supply_ptrace_register): Likewise.
130 2018-07-22 Tom Tromey <tom@tromey.com>
132 * configure: Rebuild.
134 2018-07-22 Tom Tromey <tom@tromey.com>
136 * win32-low.c (win32_create_inferior): Remove unused variables.
137 * gdbreplay.c (remote_open): Remove unused variable.
138 * remote-utils.c (remote_prepare): Remove unused variable.
139 * x86-tdesc.h (X86_TDESC_H): Define.
140 (amd64_expedite_regs): Define conditionally.
141 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
142 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
143 * remote-utils.c (readchar): Remove unused variable.
145 2018-07-13 Pedro Alves <palves@redhat.com>
147 * linux-low.c (linux_kill): Change parameter to process_info
148 pointer instead of pid. Adjust.
149 * lynx-low.c (lynx_kill): Likewise.
150 * nto-low.c (nto_kill): Likewise.
151 * spu-low.c (spu_kill): Likewise.
152 * win32-low.c (win32_kill): Likewise.
153 * server.c (handle_v_kill, kill_inferior_callback)
154 (detach_or_kill_for_exit): Adjust.
155 * target.c (kill_inferior): Change parameter to process_info
156 pointer instead of pid. Adjust.
157 * target.h (struct target_ops) <kill>: Change parameter to
158 process_info pointer instead of pid. Adjust all implementations
160 (kill_inferior): Likewise.
162 2018-07-13 Pedro Alves <palves@redhat.com>
164 * linux-low.c (linux_detach, linux_join): Change parameter to
165 process_info pointer instead of pid. Adjust.
166 * lynx-low.c (lynx_detach, lynx_join): Likewise.
167 * nto-low.c (nto_detach): Likewise.
168 * spu-low.c (spu_detach, spu_join): Likewise.
169 * win32-low.c (win32_detach, win32_join): Likewise.
170 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
171 * target.h (struct target_ops) <detach, join>: Change parameter to
172 process_info pointer instead of pid. Adjust all implementations
174 (detach_inferior, join_inferior): Rename 'pid' parameter to
177 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
178 Jan Kratochvil <jan.kratochvil@redhat.com>
179 Paul Fertser <fercerpav@gmail.com>
180 Tsutomu Seki <sekiriki@gmail.com>
182 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
183 (OBS): Add 'common/netstuff.o'.
184 (GDBREPLAY_OBS): Likewise.
185 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
186 (remote_open): Implement support for IPv6
188 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
190 (handle_accept_event): Accept connections from IPv6 sources.
191 (remote_prepare): Handle IPv6-style hostnames; implement
192 support for IPv6 connections.
193 (remote_open): Implement support for printing connections from
196 2018-07-11 Pedro Alves <palves@redhat.com>
199 * mem-break.c (any_persistent_commands): Add process_info
200 parameter and use it instead of relying on the current process.
201 Change return type to bool.
202 * mem-break.h (any_persistent_commands): Add process_info
203 parameter and change return type to bool.
204 * server.c (handle_detach): Remove require_running_or_return call.
205 Look up the process_info for the process we're about to detach.
206 If not found, return back error to GDB. Adjust
207 any_persistent_commands call to pass down a process pointer.
209 2018-07-11 Pedro Alves <palves@redhat.com>
211 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
212 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
213 instead of collect_register_by_name.
214 * regcache.c (regcache_raw_get_unsigned_by_name): New.
215 * regcache.h (regcache_raw_get_unsigned_by_name): New.
217 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
218 Pedro Alves <palves@redhat.com>
220 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
222 2018-07-03 Tom Tromey <tom@tromey.com>
224 * linux-low.c: Update.
225 * lynx-low.c: Update.
226 * mem-break.c: Update.
228 * remote-utils.c: Update.
232 * win32-low.c: Update.
234 2018-07-03 Tom Tromey <tom@tromey.com>
238 2018-07-03 Tom Tromey <tom@tromey.com>
240 * linux-low.c: Update.
242 2018-07-03 Tom Tromey <tom@tromey.com>
246 2018-07-03 Tom Tromey <tom@tromey.com>
248 * linux-low.c: Update.
249 * linux-mips-low.c: Update.
250 * lynx-low.c: Update.
252 * remote-utils.c: Update.
256 * thread-db.c: Update.
258 2018-07-03 Tom Tromey <tom@tromey.com>
260 * linux-low.c: Update.
261 * linux-mips-low.c: Update.
262 * lynx-low.c: Update.
263 * mem-break.c: Update.
265 * remote-utils.c: Update.
269 * tracepoint.c: Update.
271 2018-07-03 Tom Tromey <tom@tromey.com>
273 * linux-low.c: Update.
274 * linux-ppc-low.c: Update.
275 * linux-x86-low.c: Update.
276 * proc-service.c: Update.
279 * thread-db.c: Update.
280 * win32-low.c: Update.
282 2018-07-03 Tom Tromey <tom@tromey.com>
284 * linux-low.c: Update.
285 * lynx-low.c: Update.
287 * remote-utils.c: Update.
289 * thread-db.c: Update.
290 * win32-low.c: Update.
292 2018-06-29 Joel Brobecker <brobecker@adacore.com>
294 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
295 parameter in call to 'amd64_create_target_description'.
297 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
299 * x86-tdesc.h: Remove executable permission flag.
301 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
303 * configure.ac: Remove AC_PREREQ, add missing quoting.
304 * configure: Re-generate.
305 * config.in: Re-generate.
306 * aclocal.m4: Re-generate.
308 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
310 * tracepoint.h (current_traceframe): Remove declaration.
312 2018-06-18 Alan Hayward <alan.hayward@arm.com>
314 * linux-aarch64-low.c (is_sve_tdesc): New function.
315 (aarch64_sve_regs_copy_to_regcache): Likewise.
316 (aarch64_sve_regs_copy_from_regcache): Likewise.
317 (aarch64_regs_info): Add SVE checks.
318 (initialize_low_arch): Initialize SVE.
320 2018-06-18 Alan Hayward <alan.hayward@arm.com>
322 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
324 2018-06-11 Alan Hayward <alan.hayward@arm.com>
326 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
327 (initialize_low_tracepoint): Likewise
328 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
329 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
331 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
333 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
335 2018-06-11 Alan Hayward <alan.hayward@arm.com>
337 * server.h (PBUFSIZ): Increase size
339 2018-06-11 Alan Hayward <alan.hayward@arm.com>
341 * regcache.c (regcache::raw_compare): New function.
342 * regcache.h (regcache::raw_compare): New declaration.
344 2018-06-11 Alan Hayward <alan.hayward@arm.com>
346 * regcache.c (new_register_cache): Use new.
347 (free_register_cache): Use delete.
348 (register_data): Use const.
349 (supply_register): Move body inside regcache.
350 (regcache::raw_supply): New override function.
351 (collect_register): Move body inside regcache.
352 (regcache::raw_collect): New override function.
353 (regcache::get_register_status): New override function.
354 * regcache.h (struct regcache): Inherit from reg_buffer_common.
356 2018-06-09 Tom Tromey <tom@tromey.com>
358 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
360 (event_queue): Use std::queue.
361 (gdb_event_xfree): Remove.
362 (initialize_event_loop, process_event, wait_for_event): Update.
364 2018-06-08 Stan Cox <scox@redhat.com>
366 * win32-low.c (win32_create_inferior): last_ptid and last_status
367 moved to client_state.
369 2018-06-08 Pedro Alves <palves@redhat.com>
371 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
372 common/common-exceptions.o, common/common-utils.o,
373 common/errors.o, common/print-utils.o and utils.o.
374 * gdbreplay.c: Include "common-defs.h" instead of the two
375 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
376 string.h or alloca.h.
377 (perror_with_name): Delete.
378 (remote_open): Use xstrdup instead of strdup.
379 (main): Rename to ...
380 (captured_main): ... this.
383 2018-06-08 Tom Tromey <tom@tromey.com>
385 * linux-low.c (linux_low_read_btrace): Update.
387 2018-06-04 Stan Cox <scox@redhat.com>
389 * server.h (struct client_state): New.
390 * server.c (cont_thread, general_thread, multi_process)
391 (report_fork_events, report_vfork_events, report_exec_events)
392 (report_thread_events, swbreak_feature, hwbreak_feature)
393 (vCont_supported, disable_randomization, pass_signals)
394 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
395 Moved to client_state.
396 * remote-utils.c (remote_debug, noack_mode)
397 (transport_is_reliable): Moved to client_state.
398 * tracepoint.c (current_traceframe): Moved to client_state.
401 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
402 linux-low.c, remote-utils.h, target.c: Use client_state.
404 2018-05-31 Alan Hayward <alan.hayward@arm.com>
406 * configure.srv: Add new c/h file.
408 2018-05-31 Alan Hayward <alan.hayward@arm.com>
410 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
413 2018-05-25 Maciej W. Rozycki <macro@mips.com>
415 * gdb.arch/mips-fpregset-core.exp: New test.
416 * gdb.arch/mips-fpregset-core.c: New test source.
418 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
421 * hostio.c (require_int): Do not report overflow for integers
422 between 0xfffffff and 0x7fffffff.
424 2018-05-22 Maciej W. Rozycki <macro@mips.com>
426 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
427 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
428 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
430 (the_low_target): Wire them.
432 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
434 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
435 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
436 mode. Call collect_register_by_name with vscr using
437 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
438 (ppc_store_vrregset): Add and set vscr_offset variable as in
439 ppc_fill_vrregset. Call supply_register_by_name with vscr using
442 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
444 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
445 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
446 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
448 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
450 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
451 (ppc_store_vsxregset): Likewise.
452 (ppc_fill_vrregset): Likewise.
453 (ppc_store_vrregset): Likewise.
454 (ppc_fill_evrregset): Likewise.
455 (ppc_store_evrregset): Likewise.
456 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
457 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
460 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
462 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
463 wordsize of the inferior. Call ppc_linux_target_wordsize.
465 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
467 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
468 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
469 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
470 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
471 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
472 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
473 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
474 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
475 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
476 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
477 (tdesc_powerpc_e500l): Remove.
478 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
479 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
480 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
481 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
483 (ppc_arch_setup): Remove target description matching code. Fill a
484 ppc_linux_features struct and call ppc_linux_match_description
487 2018-05-22 Maciej W. Rozycki <macro@mips.com>
489 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
490 width of the requested register exceeds the width of the
492 (mips_cannot_store_register): Likewise.
494 2018-05-21 Maciej W. Rozycki <macro@mips.com>
496 * linux-mips-low.c (mips_fetch_register): New function. Update
498 (mips_store_gregset): Supply 0 rather than $restart for $zero.
499 (the_low_target): Wire `mips_fetch_register'.
501 2018-05-10 Joel Brobecker <brobecker@adacore.com>
503 * lynx-i386-low.c (LYNXOS_178): New macro.
504 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
505 the layout on LynxOS-178.
506 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
507 handle floating point registers that are not supported by
510 2018-05-10 Tom Tromey <tom@tromey.com>
512 * configure: Rebuild.
514 2018-05-10 Joel Brobecker <brobecker@adacore.com>
517 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
518 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
519 Use it to set the expedite_regs field in the given tdesc.
520 * x86-tdesc.h: New file.
521 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
522 Adjust following the addition of the new expedite_regs parameter
524 * linux-tic6x-low.c (tic6x_read_description): Likewise.
525 * linux-x86-tdesc.c: #include "x86-tdesc.h".
526 (i386_linux_read_description, amd64_linux_read_description):
527 Adjust following the addition of the new expedite_regs parameter
529 * lynx-i386-low.c: #include "x86-tdesc.h".
530 (lynx_i386_arch_setup): Adjust following the addition of the new
531 expedite_regs parameter to init_target_desc.
532 * nto-x86-low.c: #include "x86-tdesc.h".
533 (nto_x86_arch_setup): Adjust following the addition of the new
534 expedite_regs parameter to init_target_desc.
535 * win32-i386-low.c: #include "x86-tdesc.h".
536 (i386_arch_setup): Adjust following the addition of the new
537 expedite_regs parameter to init_target_desc.
539 2018-05-10 Joel Brobecker <brobecker@adacore.com>
542 * win32-low.c (win32_create_inferior): Add call to my_wait
543 setting last_status global.
545 2018-05-10 Joel Brobecker <brobecker@adacore.com>
548 * win32-low.c (create_process): Only call gdb_tilde_expand if
549 inferior_cwd is not NULL.
551 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
553 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
554 registers to the cache if their values have changed.
555 (i387_xsave_to_cache): Provide default values for x87 control
556 registers when these features are available, but disabled.
557 * regcache.c (supply_register_by_name_zeroed): New function.
558 * regcache.h (supply_register_by_name_zeroed): Declare new
561 2018-05-07 Tom Tromey <tom@tromey.com>
563 * configure: Rebuild.
565 2018-05-04 Tom Tromey <tom@tromey.com>
567 * configure: Rebuild.
569 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
570 Pedro Alves <palves@redhat.com>
572 * linux-aarch64-low.c (aarch64_stopped_data_address):
575 2018-04-27 Tom Tromey <tom@tromey.com>
577 * configure: Rebuild.
579 2018-04-23 Tom Tromey <tom@tromey.com>
581 * configure: Rebuild.
583 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
585 * Makefile.in (depcomp): Add "..".
586 (all_deps_files): New and use it.
588 2018-04-18 Alan Hayward <alan.hayward@arm.com>
590 * configure.srv (aarch64*-*-linux*): Don't include xml.
591 (i[34567]86-*-cygwin*): Likewise.
592 (i[34567]86-*-linux*): Likewise.
593 (i[34567]86-*-lynxos*): Likewise.
594 (i[34567]86-*-mingw32ce*): Likewise.
595 (i[34567]86-*-mingw*): Likewise.
596 (i[34567]86-*-nto*): Likewise.
597 (tic6x-*-uclinux): Likewise.
598 (x86_64-*-linux*): Likewise.
599 (x86_64-*-mingw*): Likewise.
600 (x86_64-*-cygwin*): Likewise.
602 2018-04-18 Alan Hayward <alan.hayward@arm.com>
604 * tdesc.c: Remove xml parameter.
606 2018-04-18 Alan Hayward <alan.hayward@arm.com>
608 * server.c (get_features_xml): Remove cast.
609 * tdesc.c (void target_desc::accept): Fill in function.
610 (tdesc_get_features_xml): Remove old xml creation.
611 (print_xml_feature::visit_pre): Add xml vistor.
612 * tdesc.h (struct target_desc): Make xmltarget mutable.
613 (tdesc_get_features_xml): Remove declaration.
615 2018-04-18 Alan Hayward <alan.hayward@arm.com>
617 * tdesc.c (tdesc_architecture_name): Add new function.
618 (tdesc_osabi_name): Likewise.
619 (tdesc_get_features_xml): Use new functions.
621 2018-04-18 Alan Hayward <alan.hayward@arm.com>
623 * tdesc.c (tdesc_create_flags): Remove.
624 (tdesc_add_flag): Likewise.
625 (tdesc_named_type): Likewise.
626 (tdesc_create_union): Likewise.
627 (tdesc_create_struct): Likewise.
628 (tdesc_create_vector): Likewise.
629 (tdesc_add_bitfield): Likewise.
630 (tdesc_add_field): Likewise.
631 (tdesc_set_struct_size): Likewise.
633 2018-04-18 Alan Hayward <alan.hayward@arm.com>
635 * tdesc.c (~target_desc): Remove implictly deleted items.
636 (init_target_desc): Iterate all features.
637 (tdesc_get_features_xml): Use vector.
638 (tdesc_create_feature): Create feature.
639 * tdesc.h (tdesc_feature) Remove
640 (target_desc): Add features.
642 2018-04-18 Alan Hayward <alan.hayward@arm.com>
644 * Makefile.in: Add common/tdesc.c
645 * tdesc.c (init_target_desc): init all reg_defs from register
647 (tdesc_create_reg): Create tdesc_reg.
648 * tdesc.h (tdesc_feature): Add register vector.
650 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
652 * tdesc.h (struct target_desc) <features>: Change type to
653 std::vector<std::string>.
654 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
656 (tdesc_get_features_xml): Likewise.
657 (tdesc_create_feature): Likewise.
659 2018-03-26 Alan Hayward <alan.hayward@arm.com>
661 * regcache.c (find_register_by_number): Return a ref.
662 (find_regno): Use references.
663 (register_size): Likewise.
664 (register_data): Likewise.
665 * tdesc.c (target_desc::~target_desc): Remove free calls.
666 (target_desc::operator==): Use std::vector compare.
667 (init_target_desc): Use reference.
668 (tdesc_create_reg): Use reg constructors.
669 * tdesc.h (struct target_desc): Replace pointer with object.
671 2018-03-23 Alan Hayward <alan.hayward@arm.com>
673 * regcache.c (find_register_by_number): Make static.
674 (find_regno): Use find_register_by_number
675 * regcache.h (struct reg): Remove declaration.
677 2018-03-23 Alan Hayward <alan.hayward@arm.com>
679 * tdesc.c (target_desc::~target_desc): Move to here.
680 (target_desc::operator==): Likewise.
681 * tdesc.h (target_desc::~target_desc): Move from here.
682 (target_desc::operator==): Likewise.
684 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
686 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
688 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
690 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
692 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
693 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
694 and init_registers_s390_gs_linux64.
696 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
698 * linux-s390-low.c (s390_fill_gs): Remove function.
699 (s390_fill_gsbc): Remove function.
700 (s390_regsets): Set fill functions for the guarded storage regsets
703 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
705 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
706 the word size. Add comment.
707 (s390_get_wordsize): New function.
708 (s390_arch_setup): No longer select a temporary tdesc to fetch the
709 pswm with it. Instead, use s390_get_wordsize to determine the
710 word size first and derive the correct tdesc from that directly.
712 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
714 * Makefile.in: Include silent-rules.mk.
715 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
716 (COMPILE): Add ECHO_CXX.
717 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
718 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
719 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
720 (version-generated.c): Add ECHO_GEN.
721 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
722 (IPAGENT_COMPILE): Add ECHO_CXX.
723 (%-generated.c): Add ECHO_REGDAT.
725 2018-03-14 Tom Tromey <tom@tromey.com>
728 * ax.c (ax_printf): Special case for NULL.
730 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
732 * linux-low.c (linux_qxfer_libraries_svr4): Use
733 xml_escape_text_append.
735 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
737 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
739 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
741 * server.c (handle_general_set): Remove unnecessary xstrdup.
743 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
745 * server.c (parse_debug_format_options): Adjust to
746 delim_string_to_char_ptr_vec changes.
747 * thread-db.c (thread_db_load_search): Adjust to
748 dirnames_to_char_ptr_vec changes.
750 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
752 * target.h (target_enable_btrace, target_disable_btrace)
753 (target_read_btrace, target_read_btrace_conf): Turn macro into
754 inline function. Throw error if target method is not defined.
755 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
756 check for btrace target method. Be prepared to handle exceptions
757 from btrace target methods.
759 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
761 * server.c (captured_main): Change order of error message printed
762 when the current working directory cannot be found.
764 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
766 * server.c: Include "filenames.h" and "pathstuff.h".
767 (program_name): Delete variable.
768 (program_path): New anonymous class.
769 (get_exec_wrapper): Use "program_path" instead of
771 (handle_v_run): Likewise.
772 (captured_main): Likewise.
773 (process_serial_event): Likewise.
775 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
777 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
778 (OBJS): Add "pathstuff.o".
779 * server.c (current_directory): New global variable.
780 (captured_main): Initialize "current_directory".
782 2018-02-26 Alan Hayward <alan.hayward@arm.com>
784 * tdesc.c: Use common/tdesc.h.
787 2018-02-20 Alan Hayward <alan.hayward@arm.com>
788 Simon Marchi <simon.marchi@ericsson.com>
790 * Makefile.in: Switch order of make rules.
792 2018-02-19 Alan Hayward <alan.hayward@arm.com>
794 * Makefile.in: Add common directory in build.
795 * configure.ac: Add common reference.
796 * configure: Regenerate.
798 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
800 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
801 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
802 * spu-low.c (spu_target_ops): Likewise.
803 * win32-low.c (win32_target_ops): Likewise.
804 * server.c (supported_btrace_packets): Report packets unconditionally.
805 * target.h (target_ops) <supports_btrace>: Remove.
806 (target_supports_btrace): Remove.
808 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
810 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
811 (handle_btrace_disable): Change return type to void. Use exceptions
813 (handle_btrace_general_set): Catch exception and copy message to
816 2018-02-08 Tom Tromey <tom@tromey.com>
818 * linux-low.c (install_software_single_step_breakpoints): Use
820 * inferiors.c (make_cleanup_restore_current_thread): Remove.
821 (do_restore_current_thread_cleanup): Remove.
822 * gdbthread.h (make_cleanup_restore_current_thread): Don't
825 2018-02-08 Tom Tromey <tom@tromey.com>
827 * mem-break.c (set_raw_breakpoint_at): Use
828 gdb::unique_xmalloc_ptr.
830 2018-01-30 Pedro Alves <palves@redhat.com>
833 * target.c (target_terminal::terminal_state): Rename to ...
834 (target_terminal::m_terminal_state): ... this.
836 2018-01-19 James Clarke <jrtc27@jrtc27.com>
838 * linux-low.c (handle_extended_wait): Surround call to
839 thread_db_notice_clone with #ifdef USE_THREAD_DB.
841 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
843 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
844 linux_ptrace_attach_fail_reason_string now returning an
846 (linux_attach): Likewise.
847 * thread-db.c (attach_thread): Likewise.
849 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
852 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
853 checking for fs_base/gs_base fields in struct user_regs_struct.
854 * configure: Regenerate.
856 2018-01-16 Yao Qi <yao.qi@linaro.org>
859 * linux-low.c (fetch_register): Call supply_register instead of
862 2018-01-08 Yao Qi <yao.qi@linaro.org>
863 Simon Marchi <simon.marchi@ericsson.com>
865 * Makefile.in (OBS): Remove selftest.o.
866 * configure.ac: Set srv_selftest_objs if $development is true.
867 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
868 * configure: Re-generated.
869 * server.c (captured_main): Wrap variable selftest_filter with
872 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
874 * server.c (parse_debug_format_options): Return std::string.
875 (handle_monitor_command, captured_main): Adjust.
877 2018-01-05 Pedro Alves <palves@redhat.com>
880 * server.c (captured_main): Pass quiet=false to
881 save_original_signals_state.
883 2018-01-01 Joel Brobecker <brobecker@adacore.com>
885 * gdbreplay.c (gdbreplay_version): Update copyright year in
887 * server.c (gdbserver_version): Likewise.
889 2017-12-08 Tom Tromey <tom@tromey.com>
891 * ax.c (ax_printf): Update.
893 2017-12-07 Yao Qi <yao.qi@linaro.org>
895 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
896 aarch64_linux_read_description.
897 * linux-amd64-ipa.c (idx2mask): New array.
898 (get_ipa_tdesc): Move idx2mask out.
899 (initialize_low_tracepoint): Initialize target descriptions.
900 * linux-i386-ipa.c (idx2mask): New array.
901 (get_ipa_tdesc): Move idx2mask out.
902 (initialize_low_tracepoint): Initialize target descriptions.
904 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
906 * tdesc.c (struct tdesc_type): Change return type.
907 (tdesc_add_flag): Change parameter type.
908 (tdesc_add_bitfield): Likewise.
909 (tdesc_add_field): Likewise.
910 (tdesc_set_struct_size): Likewise.
912 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
914 * regcache.c (registers_to_string): Remove unused variable.
916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
918 * inferiors.c (for_each_inferior_with_data): Remove.
919 * inferiors.h (for_each_inferior_with_data): Remove.
920 * server.c (handle_qxfer_threads_worker): Change parameter type.
921 (handle_qxfer_threads_proper): Use for_each_thread.
923 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
925 * inferiors.c (for_each_inferior): Remove.
926 (clear_inferiors): Use for_each_thread.
927 * inferiors.h (for_each_inferior): Remove.
928 * linux-low.c (linux_wait_for_event_filtered): Use
930 (linux_stabilize_threads): Likewise.
931 * regcache.c (regcache_release): Likewise.
932 * server.c (gdb_wants_all_threads_stopped): Likewise.
933 (clear_pending_status_callback): Remove.
934 (handle_status): Use for_each_thread.
935 (captured_main): Likewise.
936 * win32-low.c (child_init_thread_list): Likewise.
937 (win32_clear_inferiors): Likewise.
938 (fake_breakpoint_event): Likewise.
940 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
942 * inferiors.h (find_inferior): Remove.
943 * inferiors.c (find_inferior): Remove.
945 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
947 * linux-low.c (resume_status_pending_p): Update comment.
948 (need_step_over_p): Update comment.
950 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
952 * linux-low.c (proceed_one_lwp): Return void, change parameter
954 (unsuspend_and_proceed_one_lwp): Likewise.
955 (proceed_all_lwps): Use for_each_thread.
956 (unstop_all_lwps): Likewise.
958 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
960 * linux-low.c (linux_resume_one_thread): Return void, take
962 (linux_resume): Use for_each_thread.
964 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
966 * linux-low.c (send_sigstop_callback): Return void, change
967 parameter type. Rename to...
968 (send_sigstop): ... this.
969 (suspend_and_send_sigstop_callback): Return void, change parameter
971 (suspend_and_send_sigstop): ... this.
972 (stop_all_lwps): Use for_each_thread.
974 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
976 * linux-low.c (lwp_running): Return bool, remove unused
978 (linux_stabilize_threads): Use find_thread.
980 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
982 * linux-low.c (select_singlestep_lwp_callback): Remove.
983 (count_events_callback): Remove.
984 (select_event_lwp_callback): Remove.
985 (select_event_lwp): Use find_thread/for_each_thread.
987 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
989 * linux-low.c (not_stopped_callback): Return bool, take filter
991 (linux_wait_for_event_filtered): Use find_thread.
992 (linux_wait_1): Likewise.
994 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
996 * linux-low.c (same_lwp): Remove.
997 (find_lwp_pid): Use find_thread.
999 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1001 * linux-low.c (delete_lwp_callback): Remove.
1002 (linux_mourn): Use for_each_thread.
1004 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1006 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1007 args parameter, don't check for pid.
1008 (linux_detach): Use for_each_thread.
1010 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1012 * linux-low.c (struct counter): Remove.
1013 (second_thread_of_pid_p): Remove.
1014 (last_thread_of_process_p): Use find_thread.
1016 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1018 * inferiors.c (find_inferior_in_random): Remove.
1019 * inferiors.h (find_inferior_in_random): Remove.
1020 * linux-low.c (status_pending_p_callback): Return bool, accept
1021 parameter ptid directly.
1022 (linux_wait_for_event_filtered): Use find_thread_in_random.
1023 (linux_wait_1): Likewise.
1025 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1027 * inferiors.c (find_inferior_id): Remove.
1028 (find_thread_ptid): Move implemention from find_inferior_id to
1030 * inferiors.h (find_inferior_id): Remove.
1031 * server.c (handle_status): Use find_thread_ptid.
1032 (process_serial_event): Likewise.
1033 * thread-db.c (find_one_thread): Likewise.
1034 (thread_db_thread_handle): Likewise.
1035 * win32-low.c (thread_rec): Likewise.
1036 (child_delete_thread): Likewise.
1037 (win32_thread_alive): Likewise.
1038 (get_child_debug_event): Likewise.
1040 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1042 * linux-mips-low.c (update_watch_registers_callback): Return
1043 void, remove pid_p parameter, don't check for pid.
1044 (mips_insert_point, mips_remove_point): Use for_each_thread.
1046 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1048 * lynx.low (lynx_delete_thread_callback): Remove.
1049 (lynx_mourn): Use for_each_thread.
1051 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1053 * regcache.c (regcache_invalidate_one): Remove.
1054 (regcache_invalidate_pid): use for_each_thread.
1056 2017-11-26 Tom Tromey <tom@tromey.com>
1058 * linux-low.c (linux_create_inferior): Update.
1060 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1062 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1064 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1066 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1067 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1068 * linux-aarch64-tdesc-selftest.c: New file.
1069 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1071 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1073 * configure.srv: Add new file.
1074 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1075 * linux-aarch64-tdesc-selftest.c: New file.
1076 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1078 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1080 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1081 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1082 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1084 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1086 * configure.srv: Add new files.
1087 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1088 aarch64_linux_read_description.
1089 * linux-aarch64-low.c (aarch64_linux_read_description):
1090 Merge with aarch64_arch_setup.
1091 (aarch64_arch_setup): Call aarch64_linux_read_description.
1092 * linux-aarch64-tdesc.c: New file.
1093 * linux-aarch64-tdesc.h: New file.
1095 2017-11-24 Yao Qi <yao.qi@linaro.org>
1097 * configure.srv: Set $srv_regobj for tic6x-linux.
1098 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1099 (tic6x_read_description): Move some code to tic6x_arch_setup.
1100 (tic6x_tdesc_test): New function.
1101 (initialize_low_arch): Call selftests::register_test.
1103 2017-11-22 Yao Qi <yao.qi@linaro.org>
1105 * remote-utils.c (prepare_resume_reply): Use memcpy.
1107 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1109 * linux-low.c (kill_one_lwp_callback): Return void, take
1110 argument directly, don't filter on pid.
1111 (linux_kill): Use for_each_thread.
1113 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1115 * linux-low.c (need_step_over_p): Return bool, remove dummy
1117 (linux_resume, proceed_all_lwps): Use find_thread.
1119 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1121 * linux-low.c (resume_status_pending_p): Return bool, remove
1123 (linux_resume): Use find_thread.
1125 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1127 * linux-low.c (struct thread_resume_array): Remove.
1128 (linux_set_resume_request): Return void, take arguments
1130 (linux_resume): Use for_each_thread.
1132 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1134 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1135 return bool, remove data argument.
1136 (linux_stabilize_threads): Use find_thread.
1138 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1140 * linux-low.c (unsuspend_one_lwp): Remove.
1141 (unsuspend_all_lwps): Use for_each_thread, inline code from
1144 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1146 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1147 * linux-low.c (struct iterate_over_lwps_args): Remove.
1148 (iterate_over_lwps_filter): Remove.
1149 (iterate_over_lwps): Use find_thread.
1151 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1153 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1154 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1155 code from reset_lwp_ptrace_options_callback.
1157 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1159 * linux-arm-low.c (struct update_registers_data): Remove.
1160 (update_registers_callback): Return void, take arguments
1161 directly, don't check thread's pid.
1162 (arm_insert_point, arm_remove_point): Use for_each_thread.
1164 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1166 * win32-low.c (continue_one_thread): Return void, take argument
1168 (child_continue): Use for_each_thread.
1170 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1172 * win32-i386-low.c (update_debug_registers_callback): Rename
1174 (update_debug_registers): ... this, return void, remove pid_p arg.
1175 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1177 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1179 * inferiors.h (struct process_info): Add constructor, initialize
1181 <syscalls_to_catch>: Change type to std::vector<int>.
1182 * inferiors.c (add_process): Allocate process_info with new.
1183 (remove_process): Free process_info with delete.
1184 * linux-low.c (handle_extended_wait): Adjust.
1185 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1186 * server.c (handle_general_set): Adjust.
1188 2017-11-16 Pedro Alves <palves@redhat.com>
1190 * remote-utils.c (remote_close): Block SIGIO signals instead of
1191 uninstalling the SIGIO handler.
1193 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1195 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1197 2017-11-16 Yao Qi <yao.qi@linaro.org>
1199 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1200 (tic6x_store_gregset): Likewise.
1201 (tic6x_usrregs_info): Move it up.
1203 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1205 * Makefile.in: Update arch rules.
1206 * configure.srv: Explicitly mark arch/ files.
1208 2017-11-13 Andreas Schwab <schwab@suse.de>
1210 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1212 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1214 2017-11-06 Pedro Alves <palves@redhat.com>
1216 * config.in, configure: Regenerate.
1218 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1220 * target.c (struct thread_search): Remove.
1221 (thread_search_callback): Remove.
1222 (prepare_to_access_memory): Use for_each_thread instead of
1223 find_inferior. Inline code from thread_search_callback.
1225 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1227 * server.c (struct visit_actioned_threads_data): Remove.
1228 (visit_actioned_threads): Change prototype to take arguments
1230 (resume): Use find_thread instead of find_inferior.
1232 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1234 * server.c (queue_stop_reply_callback): Change prototype, return
1236 (find_status_pending_thread_callback): Remove.
1237 (handle_status): Replace find_inferior with find_thread and
1240 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1242 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1244 (aarch64_store_gregset): Likewise.
1245 (aarch64_fill_fpregset): Likewise.
1246 (aarch64_store_fpregset): Likewise.
1248 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1250 * gdbthread.h (find_thread, for_each_thread): New functions.
1251 * inferiors.c (thread_of_pid): Remove.
1252 (find_any_thread_of_pid): Use find_thread.
1253 * linux-low.c (num_lwps): Use for_each_thread.
1255 2017-10-17 Yao Qi <yao.qi@linaro.org>
1257 * Makefile.in: Remove one rule.
1258 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1260 2017-10-17 Yao Qi <yao.qi@linaro.org>
1262 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1263 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1265 2017-10-17 Yao Qi <yao.qi@linaro.org>
1267 * configure.srv: Rename arm.o with arch/arm.o.
1269 2017-10-17 Yao Qi <yao.qi@linaro.org>
1271 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1272 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1273 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1274 (arch-i386.o, arch-amd64.o): Remove rules.
1275 (arch/%.o): New rule.
1276 Update POSTCOMPILE and COMPILE.pre.
1277 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1278 * configure: Re-generated.
1279 * configure.srv: Replace arch-i386.o with arch/i386.o.
1280 Replace arch-amd64.o with arch/amd64.o.
1282 2017-10-16 Yao Qi <yao.qi@linaro.org>
1284 * configure: Regenerated.
1286 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1288 * inferiors.h: (struct inferior_list): Remove.
1289 (struct inferior_list_entry); Remove.
1290 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1291 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1292 get_first_inferior): Remove.
1293 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1294 find_inferior_id, find_inferior_in_random): Change signature.
1295 * inferiors.c (all_threads): Change type to
1296 std::list<thread_info *>.
1297 (get_thread): Remove macro.
1298 (find_inferior, find_inferior_id): Change signature, implement
1300 (find_inferior_in_random): Change signature, implement using
1301 find_thread_in_random.
1302 (for_each_inferior, for_each_inferior_with_data): Change
1303 signature, implement using for_each_thread.
1304 (add_inferior_to_list, remove_inferior): Remove.
1305 (add_thread, get_first_thread, thread_of_pid,
1306 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1307 (get_first_inferior, one_inferior_p, clear_inferior_list):
1309 (clear_inferiors, get_thread_process): Update.
1310 * gdbthread.h: Include <list>.
1311 (struct thread_info) <entry>: Remove field.
1313 (all_threads): Change type to std::list<thread_info *>.
1314 (get_first_inferior): Add doc.
1315 (find_thread, for_each_thread, find_thread_in_random): New
1317 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1318 * linux-arm-low.c (update_registers_callback): Update.
1319 * linux-low.c (second_thread_of_pid_p): Update.
1320 (kill_one_lwp_callback, linux_detach_lwp_callback,
1321 delete_lwp_callback, status_pending_p_callback, same_lwp,
1322 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1323 iterate_over_lwps, not_stopped_callback,
1324 resume_stopped_resumed_lwps, count_events_callback,
1325 select_singlestep_lwp_callback, select_event_lwp_callback,
1326 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1327 suspend_and_send_sigstop_callback, wait_for_sigstop,
1328 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1329 lwp_running, linux_set_resume_request, resume_status_pending_p,
1330 need_step_over_p, start_step_over, linux_resume_one_thread,
1331 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1332 reset_lwp_ptrace_options_callback): Update.
1333 * linux-mips-low.c (update_watch_registers_callback): Update.
1334 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1336 (free_register_cache_thread_one): Remove.
1337 (regcache_release): Update.
1338 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1339 handle_qxfer_threads_worker): Update.
1340 (handle_query): Update, use list iterator.
1341 (visit_actioned_threads, handle_pending_status,
1342 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1343 clear_pending_status_callback, set_pending_status_callback,
1344 find_status_pending_thread_callback, handle_status,
1345 process_serial_event): Update.
1346 * target.c (thread_search_callback): Update.
1347 * thread-db.c (thread_db_get_tls_address): Update.
1348 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1350 * win32-i386-low.c (update_debug_registers_callback): Update.
1351 * win32-low.c (delete_thread_info, child_delete_thread,
1352 continue_one_thread, suspend_one_thread,
1353 get_child_debug_event): Adjust.
1355 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1357 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1358 * inferiors.h: Include <list>.
1359 (struct process_info) <entry>: Remove field.
1361 (pid_of): Change macro to function.
1362 (ptid_of, lwpid_of): Remove macro.
1363 (all_processes): Change type to std::list<process_info *>.
1364 (ALL_PROCESSES): Remove macro.
1365 (for_each_process, find_process): New function.
1366 * inferiors.c (all_processes): Change type to
1367 std::list<process_info *>.
1368 (find_thread_process): Adjust.
1369 (add_process): Likewise.
1370 (remove_process): Likewise.
1371 (find_process_pid): Likewise.
1372 (get_first_process): Likewise.
1373 (started_inferior_callback): Remove.
1374 (have_started_inferiors_p): Adjust.
1375 (attached_inferior_callback): Remove.
1376 (have_attached_inferiors_p): Adjust.
1377 * linux-low.c (check_zombie_leaders): Likewise.
1378 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1379 (x86_linux_update_xmltarget): Adjust.
1380 * server.c (handle_query): Likewise.
1381 (gdb_reattached_process): Remove.
1382 (handle_status): Adjust.
1383 (kill_inferior_callback): Likewise.
1384 (detach_or_kill_inferior): Remove.
1385 (print_started_pid): Likewise.
1386 (print_attached_pid): Likewise.
1387 (detach_or_kill_for_exit): Update.
1388 (process_serial_event): Likewise.
1389 * linux-arm-low.c (arm_new_fork): Likewise.
1391 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1393 * dll.h: Include <list>.
1394 (struct dll_info): Add constructor.
1395 <entry>: Remove field.
1396 (all_dlls): Change type to std::list<dll_info>.
1397 * dll.c: Include <algorithm>.
1398 (get_dll): Remove macro.
1399 (all_dlls): Change type to std::list<dll_info *>.
1400 (free_one_dll): Remove.
1401 (match_dll): Likewise.
1402 (loaded_dll): Adjust.
1403 (unloaded_dll): Adjust to all_dlls type change, use
1404 std::find_if. Inline code from match_dll.
1405 (clear_dlls): Adjust to all_dlls type change.
1406 * server.c (emit_dll_description): Remove.
1407 (handle_qxfer_libraries): Adjust to all_dlls type change,
1408 integrate emit_dll_description's functionality.
1410 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1412 * linux-low.h (struct linux_target_ops) <delete_process>: New
1414 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1415 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1416 (struct linux_target_ops): Add delete_process callback.
1417 * linux-arm-low.c (arm_delete_process): New.
1418 (struct linux_target_ops): Add delete_process callback.
1419 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1420 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1421 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1422 * linux-mips-low.c (mips_linux_delete_process): New.
1423 (struct linux_target_ops): Add delete_process callback.
1424 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1425 * linux-s390-low.c (struct linux_target_ops): Likewise.
1426 * linux-sh-low.c (struct linux_target_ops): Likewise.
1427 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1428 * linux-tile-low.c (struct linux_target_ops): Likewise.
1429 * linux-x86-low.c (x86_linux_delete_process): New.
1430 (struct linux_target_ops): Add delete_process callback.
1431 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1433 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1435 * linux-aarch64-low.c (the_low_target): Add thread delete
1437 * linux-arm-low.c (arm_delete_thread): New function.
1438 (the_low_target): Add thread delete callback.
1439 * linux-bfin-low.c (the_low_target): Likewise.
1440 * linux-crisv32-low.c (the_low_target): Likewise.
1441 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1443 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1445 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1446 * linux-mips-low.c (mips_linux_delete_thread): New function.
1447 (the_low_target): Add thread delete callback.
1448 * linux-ppc-low.c (the_low_target): Likewise.
1449 * linux-s390-low.c (the_low_target): Likewise.
1450 * linux-sh-low.c (the_low_target): Likewise.
1451 * linux-tic6x-low.c (the_low_target): Likewise.
1452 * linux-tile-low.c (the_low_target): Likewise.
1453 * linux-x86-low.c (the_low_target): Likewise.
1454 * linux-xtensa-low.c (the_low_target): Likewise.
1456 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1458 * win32-low.c: Include "common-inferior.h".
1460 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1462 * inferiors.c (set_inferior_cwd): New function.
1463 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1464 (handle_query): Inform that QSetWorkingDir is supported.
1465 * win32-low.c (create_process): Pass the inferior's cwd to
1468 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1470 * inferiors.c (current_inferior_cwd): New global variable.
1471 (get_inferior_cwd): New function.
1472 * inferiors.h (struct process_info) <cwd>: New field.
1474 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1476 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1477 (OBS): Add gdb_tilde_expand.o.
1479 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1481 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1482 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1484 2017-09-29 Pedro Alves <palves@redhat.com>
1486 * ax.c (gdb_parse_agent_expr): Constify.
1487 * ax.h (gdb_parse_agent_expr): Constify.
1488 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1490 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1491 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1492 * remote-utils.h (read_ptid): Constify.
1493 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1494 (process_point_options, process_serial_event): Constify.
1495 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1496 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1497 (cmd_qtbuffer): Constify.
1499 2017-09-29 Pedro Alves <palves@redhat.com>
1501 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1504 2017-09-29 Pedro Alves <palves@redhat.com>
1506 * linux-low.c (handle_extended_wait): Pass parent thread instead
1507 of process to thread_db_notice_clone.
1508 * linux-low.h (thread_db_notice_clone): Replace parent process
1509 parameter with parent thread parameter.
1510 * thread-db.c (find_one_thread): Add comment.
1511 (thread_db_notice_clone): Replace parent process parameter with
1512 parent thread parameter. Temporarily switch to the parent thread.
1514 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1516 * gdbthread.h: Include "common-gdbthread.h".
1517 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1518 "if" when validating the ptid.
1519 * remote-utils.c: Include "gdbthread.h".
1520 (prepare_resume_reply): Use "switch_to_thread".
1521 * target.c (done_accessing_memory): Likewise.
1523 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1525 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1526 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1527 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1528 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1529 s390x-gs-linux64-ipa.o to ipa_obj.
1530 * linux-s390-low.c (HWCAP_S390_GS): New define.
1531 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1533 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1534 (s390_arch_setup): Check for guarded-storage support and choose
1536 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1537 init_registers_s390x_gs_linux64.
1538 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1540 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1541 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1543 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1545 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1547 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1549 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1550 (thread_db_thread_handle): Declare.
1551 * linux-low.c (linux_target_ops): Initialize thread_handle.
1552 * server.c (handle_qxfer_threads_worker): Add support for
1554 * target.h (struct target_ops): Add new function pointer,
1556 (target_thread_handle): Define.
1557 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1559 (thread_db_thread_handle): New function.
1561 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1563 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1564 * linux-low.h (thread_db_notice_clone): Declare.
1565 * thread-db.c (thread_db_notice_clone): New function.
1567 2017-09-21 Pedro Alves <palves@redhat.com>
1569 * server.c (gdb_read_memory, handle_status, process_serial_event)
1570 (handle_serial_event, handle_target_event): Adjust to
1571 set_desired_thread prototype change.
1572 * target.c (set_desired_thread): Remove 'use_general' parameter
1574 * target.h (set_desired_thread): Remove 'use_general' parameter.
1576 2017-09-20 Tom Tromey <tom@tromey.com>
1578 * target.c (target_terminal::terminal_state): Define.
1579 (target_terminal::init): Rename from target_terminal_init.
1580 (target_terminal::inferior): Rename from
1581 target_terminal_inferior.
1582 (target_terminal::ours): Rename from target_terminal_ours.
1583 (target_terminal::ours_for_output, target_terminal::info): New.
1585 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1587 * server.c (accumulate_file_name_length): Remove.
1588 (emit_dll_description): Adjust to std::string change.
1589 (handle_qxfer_libraries): Use std::string to hold document.
1591 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1593 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1594 return type of xml_escape_text.
1595 * server.c (emit_dll_description): Likewise.
1597 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1599 * server.c (captured_main): Accept argument for --selftest.
1600 Update run_tests call.
1601 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1602 when registering selftests.
1604 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1606 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1607 instead of "VEC" for "target_desc.reg_defs".
1608 (regcache_cpy): Likewise.
1609 (registers_to_string): Likewise.
1610 (registers_from_string): Likewise.
1611 (find_regno): Likewise.
1612 (supply_regblock): Likewise.
1613 (regcache_raw_read_unsigned): Likewise.
1614 * tdesc.c (init_target_desc): Likewise.
1615 (tdesc_create_reg): Likewise.
1616 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1617 (struct target_desc) <reg_defs>: Convert to "std::vector".
1618 (target_desc): Do not initialize "reg_defs".
1619 (~target_desc): Update code to use "std::vector" instead of "VEC"
1620 for "target_desc.reg_defs".
1621 (operator==): Likewise.
1623 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1625 * inferiors.h (thread_to_gdb_id): Remove.
1626 * inferiors.c (thread_to_gdb_id): Remove.
1627 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1628 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1629 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1631 * nto-low.c (nto_fetch_registers, nto_store_registers,
1632 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1634 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1636 * inferiors.h (gdb_id_to_thread_id): Remove.
1637 * inferiors.c (gdb_id_to_thread_id): Remove.
1638 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1639 removal. Move pid declaration closer to where it's used.
1641 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1643 * server.c (handle_detach): New function.
1644 (process_serial_event): Move code out, call handle_detach.
1646 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1648 * server.c (require_running): Rename to ...
1649 (require_running_or_return): ... this ...
1650 (require_running_or_break): ... and this.
1651 (handle_query, process_serial_event): Adjust.
1653 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1655 * linux-low.c (linux_set_resume_request): Remove unused
1658 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1660 * server.c (first_thread_of): Remove.
1661 (process_serial_event): Replace usage of first_thread_of with
1662 find_any_thread_of_pid.
1663 * tracepoint.c (same_process_p): Remove.
1664 (gdb_agent_about_to_close): Replace usage of same_process_p with
1665 find_any_thread_of_pid.
1666 * linux-x86-low.c (same_process_callback): Remove.
1667 (x86_arch_setup_process_callback): Replace usage of
1668 same_process_callback with find_any_thread_of_pid.
1669 * thread-db.c (any_thread_of): Remove.
1670 (switch_to_process): Replace usage of any_thread_of with
1671 find_any_thread_of_pid.
1672 * inferiors.c (thread_pid_matches_callback): Remove.
1673 (find_thread_process): Adjust to use find_any_thread_of_pid.
1675 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1677 * regcache.c (get_thread_regcache): Guard calls to "memset"
1680 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1682 * linux-low.c (handle_extended_wait): Use
1683 "allocate_target_description" instead of "XNEW".
1684 * linux-x86-low.c (initialize_low_arch): Likewise.
1686 2017-09-05 Yao Qi <yao.qi@linaro.org>
1688 * configure.srv (srv_i386_regobj): Remove.
1689 (srv_amd64_regobj): Remove.
1690 (srv_regobj): Set it to "" for x86 non-linux targets.
1691 * linux-x86-tdesc.c (i386_linux_read_description):
1692 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1693 (init_registers_i386): Remove the declaration.
1694 (tdesc_i386): Remove the declaration.
1695 (lynx_i386_arch_setup): Call i386_create_target_description.
1696 * nto-x86-low.c: Likewise.
1697 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1698 [!__x86_64__]: include arch/i386.h.
1699 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1701 2017-09-05 Yao Qi <yao.qi@linaro.org>
1703 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1704 i386/amd64-XXX-linux from it.
1706 2017-09-05 Yao Qi <yao.qi@linaro.org>
1708 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1710 (ipa_amd64_linux_regobj): Remove.
1711 (ipa_x32_linux_regobj): Remove.
1713 2017-09-05 Yao Qi <yao.qi@linaro.org>
1715 * Makefile.in (arch-amd64.o): New rule.
1716 * configure.srv: Append arch-amd64.o.
1717 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1718 (get_ipa_tdesc): Call amd64_linux_read_description.
1719 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1720 and init_registers_amd64_XXX.
1721 * linux-x86-low.c (x86_linux_read_description): Call
1722 amd64_linux_read_description.
1723 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1724 (initialize_low_arch): Don't call init_registers_x32_XXX and
1725 init_registers_amd64_XXX.
1726 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1727 and tdesc_amd64_XXX.
1728 [__x86_64__] (amd64_tdesc_test): New function.
1729 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1730 and init_registers_amd64_XXX.
1731 * linux-x86-tdesc.c: Include arch/amd64.h.
1732 (xcr0_to_tdesc_idx): New function.
1733 (i386_linux_read_description): New function.
1734 (amd64_get_ipa_tdesc_idx): New function.
1735 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1736 (amd64_get_ipa_tdesc): Declare.
1738 2017-09-05 Yao Qi <yao.qi@linaro.org>
1740 * configure.srv (srv_i386_linux_xmlfiles): Remove
1741 i386/i386-XXX-linux.xml from it.
1743 2017-09-05 Yao Qi <yao.qi@linaro.org>
1745 * configure.srv: Set srv_i386_linux_regobj empty if $development
1747 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1748 initialize_low_tdesc.
1749 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1750 with #if initialize_low_tdesc.
1751 * linux-x86-tdesc-selftest.c: New file.
1752 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1754 2017-09-05 Yao Qi <yao.qi@linaro.org>
1756 * Makefile.in (arch-i386.o): New rule.
1757 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1758 (x86_64-*-linux*): Likewise.
1759 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1760 include arch/i386.h.
1761 (i386_linux_read_description): Remove code and call
1762 i386_create_target_description.
1763 * tdesc.c (allocate_target_description): New function.
1764 * tdesc.h (set_tdesc_architecture): Remove declaration.
1765 (set_tdesc_osabi): Likewise.
1767 2017-09-05 Yao Qi <yao.qi@linaro.org>
1769 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1770 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1771 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1773 * server.c (get_features_xml): Call tdesc_get_features_xml.
1774 * tdesc.c (set_tdesc_architecture): New function.
1775 (set_tdesc_osabi): New function.
1776 (tdesc_get_features_xml): New function.
1777 (tdesc_create_feature): Add an argument.
1778 * tdesc.h (struct target_desc) <features>: New field.
1779 <arch, osabi>: New field.
1780 (~target_desc): xfree features, arch, and osabi.
1781 (target_desc::oerator==): Don't compare .xmltarget.
1782 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1783 (set_tdesc_osabi): Likewise.
1784 (tdesc_get_features_xml): Likewise.
1786 2017-09-05 Yao Qi <yao.qi@linaro.org>
1788 * linux-x86-tdesc.c: Include selftest.h.
1789 (i386_tdesc_test): New function.
1790 (initialize_low_tdesc): Call selftests::register_test.
1791 * tdesc.h: Include regdef.h.
1792 (target_desc): Override operator == and !=.
1794 2017-09-05 Yao Qi <yao.qi@linaro.org>
1796 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1797 (ipa_obj): Likewise.
1798 * linux-i386-ipa.c: Include common/x86-xstate.h
1799 (get_ipa_tdesc): Call i386_linux_read_description.
1800 (initialize_low_tracepoint): Don't call init_registers_XXX
1801 functions, call initialize_low_tdesc instead.
1802 * linux-x86-low.c (x86_linux_read_description): Call
1803 i386_linux_read_description.
1804 (initialize_low_arch): Don't call init_registers_i386_XXX
1805 functions, call initialize_low_tdesc.
1806 * linux-x86-tdesc.c: New file.
1807 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1808 (i386_get_ipa_tdesc_idx): Declare.
1809 (i386_get_ipa_tdesc): Declare.
1810 (initialize_low_tdesc): Declare.
1812 2017-09-05 Yao Qi <yao.qi@linaro.org>
1814 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1817 2017-09-05 Yao Qi <yao.qi@linaro.org>
1819 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1820 * regcache.c (get_thread_regcache): Use VEC_length.
1821 (init_register_cache): Likewise.
1822 (regcache_cpy): Likewise.
1823 (registers_to_string): Iterate reg_defs via VEC_iterate.
1824 (find_regno): Likewise.
1825 (find_register_by_number): Use VEC_index.
1826 (register_size): Call find_register_by_number.
1827 (register_data): Call find_register_by_number.
1828 (supply_regblock): Use VEC_length.
1829 (regcache_raw_read_unsigned): Likewise.
1830 * tdesc.c (init_target_desc): Iterate reg_defs via
1832 (default_description): Update initializer.
1833 (copy_target_description): Don't update field num_registers.
1834 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1835 <num_registers>: Remove.
1837 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1839 * Makefile.in (.SECONDARY): Define target.
1841 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1843 * linux-low.c (linux_wait_1): Adjust.
1844 * server.c (queue_stop_reply_callback): Adjust.
1846 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1848 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1849 QEnvironmentUnset and QEnvironmentReset packets.
1850 (handle_query): Inform remote that QEnvironmentHexEncoded,
1851 QEnvironmentUnset and QEnvironmentReset are supported.
1853 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1855 * inferiors.h (inferior_target_data): Rename to ...
1856 (thread_target_data): ... this.
1857 (inferior_regcache_data): Rename to ...
1858 (thread_regcache_data): ... this.
1859 (set_inferior_regcache_data): Rename to ...
1860 (set_thread_regcache_data): ... this.
1861 * inferiors.c (inferior_target_data): Rename to ...
1862 (thread_target_data): ... this.
1863 (inferior_regcache_data): Rename to ...
1864 (thread_regcache_data): ... this.
1865 (set_inferior_regcache_data): Rename to ...
1866 (set_thread_regcache_data): ... this.
1867 (free_one_thread): Update.
1868 * linux-low.h (get_thread_lwp): Update.
1869 * regcache.c (get_thread_regcache): Update.
1870 (regcache_invalidate_thread): Update.
1871 (free_register_cache_thread): Update.
1872 * win32-i386-low.c (update_debug_registers_callback): Update.
1873 (win32_get_current_dr): Update.
1874 * win32-low.c (thread_rec): Update.
1875 (delete_thread_info): Update.
1876 (continue_one_thread): Update.
1877 (suspend_one_thread): Update.
1879 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1881 * inferiors.c (set_inferior_target_data): Remove.
1882 * inferiors.h (set_inferior_target_data): Remove.
1884 2017-08-18 Yao Qi <yao.qi@linaro.org>
1886 * Makefile.in (OBS): Add selftest.o.
1887 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1888 * configure, config.in: Re-generated.
1889 * server.c: Include common/sefltest.h.
1890 (captured_main): Handle option --selftest.
1892 2017-08-09 Yao Qi <yao.qi@linaro.org>
1894 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1895 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1896 i386-avx-mpx.o and i386-mmx.o.
1897 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1898 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1899 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1900 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1901 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1902 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1903 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1904 i386/amd64-avx-mpx.xml.
1906 2017-08-09 Yao Qi <yao.qi@linaro.org>
1908 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1909 and x32-avx-avx512.o.
1910 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1911 i386/x32-avx-avx512.xml.
1913 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1915 * tracepoint.h (enum class fast_tpoint_collect_result): New
1917 (fast_tracepoint_collecting): Change return type to
1918 fast_tpoint_collect_result.
1919 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1920 * linux-low.h: Include tracepoint.h.
1921 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1922 fast_tpoint_collect_result.
1923 * linux-low.c (handle_tracepoints): Adjust.
1924 (linux_fast_tracepoint_collecting): Change return type to
1925 fast_tpoint_collect_result.
1926 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1927 linux_wait_1, stuck_in_jump_pad_callback,
1928 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1929 proceed_one_lwp): Adjust to type change.
1931 2017-07-10 Yao Qi <yao.qi@linaro.org>
1933 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1935 2017-06-29 Yao Qi <yao.qi@linaro.org>
1937 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1939 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1941 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1943 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1945 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1947 * linux-low.c (linux_create_inferior): Adjust code to access the
1948 environment information via 'gdb_environ' class.
1949 * lynx-low.c (lynx_create_inferior): Likewise.
1950 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1951 (get_environ): Return a pointer to 'our_environ'.
1952 (captured_main): Initialize 'our_environ'.
1953 * server.h (get_environ): Adjust prototype.
1954 * spu-low.c (spu_create_inferior): Adjust code to access the
1955 environment information via 'gdb_environ' class.
1957 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1959 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1960 usage of "register" keyword.
1962 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1964 * configure: Re-generate.
1966 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1968 * configure: Re-generate.
1970 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1972 * Makefile.in (COMPILE.pre): Add "-x c++".
1974 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1976 * fork-child.c: Conditionally include <signal.h>.
1978 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1980 * server.c (handle_general_set): Handle new packet
1981 "QStartupWithShell".
1982 (handle_query): Add "QStartupWithShell" to the list of supported
1984 (gdbserver_usage): Add help text explaining the
1985 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1987 (captured_main): Recognize and act upon the presence of the new
1990 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1991 Pedro Alves <palves@redhat.com>
1993 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1994 * configure: Regenerate.
1995 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1997 (i[34567]86-*-lynxos*): Likewise.
1998 (spu*-*-*): Likewise.
1999 * fork-child.c: New file.
2000 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2002 (linux_ptrace_fun): New function.
2003 (linux_create_inferior): Adjust function prototype to reflect
2004 change on "target.h". Adjust function code to use
2006 (linux_request_interrupt): Delete "signal_pid".
2007 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2008 (lynx_ptrace_fun): New function.
2009 (lynx_create_inferior): Adjust function prototype to reflect
2010 change on "target.h". Adjust function code to use
2012 * nto-low.c (nto_create_inferior): Adjust function prototype and
2013 code to reflect change on "target.h". Update comments.
2014 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2015 "common-terminal.h" and "environ.h".
2016 (terminal_fd): Moved to fork-child.c.
2017 (old_foreground_pgrp): Likewise.
2018 (restore_old_foreground_pgrp): Likewise.
2019 (last_status): Make it global.
2020 (last_ptid): Likewise.
2021 (our_environ): New variable.
2022 (startup_with_shell): Likewise.
2023 (program_name): Likewise.
2024 (program_argv): Rename to...
2025 (program_args): ...this.
2026 (wrapper_argv): New variable.
2027 (start_inferior): Delete function.
2028 (get_exec_wrapper): New function.
2029 (get_exec_file): Likewise.
2030 (get_environ): Likewise.
2031 (prefork_hook): Likewise.
2032 (post_fork_inferior): Likewise.
2033 (postfork_hook): Likewise.
2034 (postfork_child_hook): Likewise.
2035 (handle_v_run): Update code to deal with arguments coming from the
2036 remote host. Update calls from "start_inferior" to
2038 (captured_main): Likewise. Initialize environment variable. Call
2040 * server.h (post_fork_inferior): New prototype.
2041 (get_environ): Likewise.
2042 (last_status): Declare.
2043 (last_ptid): Likewise.
2044 (signal_pid): Likewise.
2045 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2046 (spu_ptrace_fun): New function.
2047 (spu_create_inferior): Adjust function prototype to reflect change
2048 on "target.h". Adjust function code to use "fork_inferior".
2049 * target.c (target_terminal_init): New function.
2050 (target_terminal_inferior): Likewise.
2051 (target_terminal_ours): Likewise.
2052 * target.h: Include <vector>.
2053 (struct target_ops) <create_inferior>: Update prototype.
2054 (create_inferior): Update macro.
2055 * utils.c (gdb_flush_out_err): New function.
2056 * win32-low.c (win32_create_inferior): Adjust function prototype
2057 and code to reflect change on "target.h".
2059 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2061 * inferiors.c (switch_to_thread): New function.
2063 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2065 * Makefile.in (SFILE): Add "common/job-control.c".
2066 (OBS): Add "job-control.o".
2068 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2070 * Makefile: Remove "@host_makefile_frag@".
2072 2017-05-05 Pedro Alves <palves@redhat.com>
2074 * configure: Regenerate.
2076 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2078 * configure: Regenerate.
2080 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2082 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2083 software_single_step change of return type to
2084 std::vector<CORE_ADDR>.
2085 * linux-low.c (install_software_single_step_breakpoints):
2087 * linux-low.h (install_software_single_step_breakpoints):
2090 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2092 * remote-utils.c: Include "gdb_termios.h" instead of
2094 * terminal.h: Delete file.
2096 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2098 * server.c: Include <vector>.
2099 <program_argv, wrapper_argv>: Convert to std::vector.
2100 (start_inferior): Rewrite function to use C++.
2101 (handle_v_run): Likewise. Update code that calculates the argv
2102 based on the vRun packet; use C++.
2103 (captured_main): Likewise.
2105 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2107 * server.c (handle_v_cont): Initialize thread_resume::thread
2110 2017-04-05 Pedro Alves <palves@redhat.com>
2112 * configure: Regenerate.
2114 2017-04-05 Pedro Alves <palves@redhat.com>
2116 * gdbreplay.c (sync_error): Constify.
2117 * linux-x86-low.c (push_opcode): Constify.
2119 2017-04-05 Pedro Alves <palves@redhat.com>
2121 * win32-low.c (get_child_debug_event)
2122 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2123 Report TARGET_WAITKIND_SPURIOUS instead.
2125 2017-04-05 Pedro Alves <palves@redhat.com>
2127 * remote-utils.c (remote_prepare, remote_open): Constify.
2128 * remote-utils.h (remote_prepare, remote_open): Constify.
2129 * server.c (captured_main): Constify 'port' handling.
2131 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2133 * Makefile.in (clean): Clear .deps.
2135 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2137 * .gitignore: Remove generated files, replace with wildcard.
2138 * (clean): Replace removal of generated files with wildcard.
2139 (version.c): Replace with...
2140 (version-generated.c): ...this.
2141 (xml-builtin.c): Replace with...
2142 (xml-builtin-generated.c): ...this.
2143 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2144 (%.c: *regformats*): Replace with...
2145 (%-generated.c: *regformats*): ...this.
2147 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2149 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2150 (xtensa_fill_gregset): Call collect_register_by_name for
2152 (xtensa_store_gregset): Call supply_register_by_name for
2155 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2157 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2158 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2159 (xtensa_store_gregset): Call supply_register for all registers in
2160 a0_regnum..a0_regnum + C0_NREGS range.
2162 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2164 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2165 (ax-ipa.o: ax.c): Remove.
2166 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2167 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2168 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2169 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2170 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2172 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2174 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2175 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2176 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2177 (errors-ipa.o: ../common/errors.c): Remove.
2178 (format-ipa.o: ../common/format.c): Remove.
2179 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2181 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2183 * Makefile.in (%-ipa.o: %.c): New rule.
2184 (tracepoint-ipa.o: tracepoint.c): Remove.
2185 (utils-ipa.o: utils.c): Remove.
2186 (remote-utils-ipa.o: remote-utils.c): Remove.
2187 (regcache-ipa.o: regcache.c): Remove.
2188 (i386-linux-ipa.o: i386-linux.c): Remove.
2189 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2190 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2191 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2192 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2193 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2194 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2195 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2196 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2197 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2198 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2199 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2200 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2201 (aarch64-ipa.o: aarch64.c): Remove.
2202 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2203 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2204 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2205 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2206 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2207 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2208 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2209 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2210 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2211 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2212 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2213 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2214 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2215 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2216 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2217 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2218 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2219 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2220 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2221 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2222 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2223 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2224 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2225 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2226 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2227 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2228 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2229 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2230 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2231 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2232 (tdesc-ipa.o: tdesc.c): Remove.
2233 (x32-linux-ipa.o: x32-linux.c): Remove.
2234 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2235 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2237 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2239 * Makefile.in (%.o: ../arch/%.c): New rule.
2240 (arm.o: ../arch/arm.c): Remove.
2241 (arm-linux.o: ../arch/arm-linux.c): Remove.
2242 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2243 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2245 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2247 * Makefile.in (%.o: ../nat/%.c): New rule.
2248 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2249 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2250 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2251 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2252 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2253 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2254 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2255 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2256 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2257 (linux-personality.o: ../nat/linux-personality.c): Remove.
2258 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2259 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2260 (x86-linux.o: ../nat/x86-linux.c): Remove.
2261 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2262 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2264 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2266 * Makefile.in (%.o: ../common/%.c): New rule.
2267 (signals.o: ../common/signals.c): Remove.
2268 (print-utils.o: ../common/print-utils.c): Remove.
2269 (rsp-low.o: ../common/rsp-low.c): Remove.
2270 (common-utils.o: ../common/common-utils.c): Remove.
2271 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2272 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2273 (vec.o: ../common/vec.c): Remove.
2274 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2275 (xml-utils.o: ../common/xml-utils.c): Remove.
2276 (ptid.o: ../common/ptid.c): Remove.
2277 (buffer.o: ../common/buffer.c): Remove.
2278 (format.o: ../common/format.c): Remove.
2279 (filestuff.o: ../common/filestuff.c): Remove.
2280 (agent.o: ../common/agent.c): Remove.
2281 (errors.o: ../common/errors.c): Remove.
2282 (environ.o: ../common/environ.c): Remove.
2283 (common-debug.o: ../common/common-debug.c): Remove.
2284 (cleanups.o: ../common/cleanups.c): Remove.
2285 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2286 (fileio.o: ../common/fileio.c): Remove.
2287 (common-regcache.o: ../common/common-regcache.c): Remove.
2288 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2289 (new-op.o: ../common/new-op.c): Remove.
2290 (btrace-common.o: ../common/btrace-common.c): Remove.
2292 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2294 * Makefile.in (%.o: ../target/%.c): New rule.
2295 (waitstatus.o: ../target/waitstatus.c): Remove.
2297 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2300 (%.c: ../regformats/%.dat,
2301 (%.c: ../regformats/arm/%.dat,
2302 (%.c: ../regformats/i386/%.dat,
2303 (%.c: ../regformats/rs6000/%.dat): New rules.
2304 (aarch64.c): Remove.
2305 (reg-arm.c): Remove.
2306 (arm-with-iwmmxt.c): Remove.
2307 (arm-with-vfpv2.c): Remove.
2308 (arm-with-vfpv3.c): Remove.
2309 (arm-with-neon.c): Remove.
2310 (reg-bfin.c): Remove.
2311 (reg-cris.c): Remove.
2312 (reg-crisv32.c): Remove.
2314 (i386-linux.c): Remove.
2315 (i386-avx.c): Remove.
2316 (i386-avx-linux.c): Remove.
2317 (i386-avx-avx512.c): Remove.
2318 (i386-avx-avx512-linux.c): Remove.
2319 (i386-mpx.c): Remove.
2320 (i386-mpx-linux.c): Remove.
2321 (i386-avx-mpx-avx512-pku.c): Remove.
2322 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2323 (i386-avx-mpx.c): Remove.
2324 (i386-avx-mpx-linux.c): Remove.
2325 (i386-mmx.c): Remove.
2326 (i386-mmx-linux.c): Remove.
2327 (reg-ia64.c): Remove.
2328 (reg-m32r.c): Remove.
2329 (reg-m68k.c): Remove.
2331 (mips-linux.c): Remove.
2332 (mips-dsp-linux.c): Remove.
2333 (mips64-linux.c): Remove.
2334 (mips64-dsp-linux.c): Remove.
2335 (nios2-linux.c): Remove.
2336 (powerpc-32.c): Remove.
2337 (powerpc-32l.c): Remove.
2338 (powerpc-altivec32l.c): Remove.
2339 (powerpc-cell32l.c): Remove.
2340 (powerpc-vsx32l.c): Remove.
2341 (powerpc-isa205-32l.c): Remove.
2342 (powerpc-isa205-altivec32l.c): Remove.
2343 (powerpc-isa205-vsx32l.c): Remove.
2344 (powerpc-e500l.c): Remove.
2345 (powerpc-64l.c): Remove.
2346 (powerpc-altivec64l.c): Remove.
2347 (powerpc-cell64l.c): Remove.
2348 (powerpc-vsx64l.c): Remove.
2349 (powerpc-isa205-64l.c): Remove.
2350 (powerpc-isa205-altivec64l.c): Remove.
2351 (powerpc-isa205-vsx64l.c): Remove.
2352 (s390-linux32.c): Remove.
2353 (s390-linux32v1.c): Remove.
2354 (s390-linux32v2.c): Remove.
2355 (s390-linux64.c): Remove.
2356 (s390-linux64v1.c): Remove.
2357 (s390-linux64v2.c): Remove.
2358 (s390-te-linux64.c): Remove.
2359 (s390-vx-linux64.c): Remove.
2360 (s390-tevx-linux64.c): Remove.
2361 (s390x-linux64.c): Remove.
2362 (s390x-linux64v1.c): Remove.
2363 (s390x-linux64v2.c): Remove.
2364 (s390x-te-linux64.c): Remove.
2365 (s390x-vx-linux64.c): Remove.
2366 (s390x-tevx-linux64.c): Remove.
2367 (tic6x-c64xp-linux.c): Remove.
2368 (tic6x-c64x-linux.c): Remove.
2369 (tic6x-c62x-linux.c): Remove.
2371 (reg-sparc64.c): Remove.
2372 (reg-spu.c): Remove.
2374 (amd64-linux.c): Remove.
2375 (amd64-avx.c): Remove.
2376 (amd64-avx-linux.c): Remove.
2377 (amd64-avx-avx512.c): Remove.
2378 (amd64-avx-avx512-linux.c): Remove.
2379 (amd64-mpx.c): Remove.
2380 (amd64-mpx-linux.c): Remove.
2381 (amd64-avx-mpx-avx512-pku.c): Remove.
2382 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2383 (amd64-avx-mpx.c): Remove.
2384 (amd64-avx-mpx-linux.c): Remove.
2386 (x32-linux.c): Remove.
2387 (x32-avx.c): Remove.
2388 (x32-avx-linux.c): Remove.
2389 (x32-avx-avx512.c): Remove.
2390 (x32-avx-avx512-linux.c): Remove.
2391 (reg-xtensa.c): Remove.
2392 (reg-tilegx.c): Remove.
2393 (reg-tilegx32.c): Remove.
2395 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2397 * Makefile.in (SFILES): Add "common/environ.c".
2398 (OBJS): Add "common/environ.h".
2400 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2402 * configure.ac: Check if the fs_base and gs_base members of
2403 `struct user_regs_struct' exist.
2404 * config.in: Regenerated.
2405 * configure: Likewise.
2407 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2409 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2411 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2412 (get_next_pcs_syscall_next_pc): Likewise.
2414 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2416 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2417 * nto-x86-low.c: Likewise.
2419 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2421 * Makefile.in: Include disable-implicit-rules.mk.
2423 2016-11-23 Pedro Alves <palves@redhat.com>
2425 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2426 (debug_vprintf): Use std::chrono::steady_clock instead of
2427 gettimeofday. Use '.' instead of ':'.
2428 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2429 (get_timestamp): Use std::chrono::steady_clock instead of
2432 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2434 * Makefile.in: Fix whitespace formatting.
2436 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2438 * Makefile.in (SFILES, OBS): Flatten list and order
2441 2016-11-23 Pedro Alves <palves@redhat.com>
2443 * event-loop.c (handle_file_event): Use warning.
2444 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2445 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2448 2016-11-23 Pedro Alves <palves@redhat.com>
2450 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2452 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2453 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2454 debug_printf and debug_flush for debug output.
2455 * server.c (handle_general_set): Likewise.
2456 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2459 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2461 * Makefile.in (.c.o): Replace rule with ...
2462 (%.o: %.c): ... this one.
2464 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2466 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2467 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2469 * configure.ac: Remove checks for the make program.
2470 * configure: Re-generate.
2472 2016-10-28 Pedro Alves <palves@redhat.com>
2474 * Makefile.in (CXX_DIALECT): Get from configure.
2475 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2476 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2477 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2478 * config.in: Regenerate.
2479 * configure: Regenerate.
2481 2016-10-27 Yao Qi <yao.qi@linaro.org>
2483 * linux-low.c (linux_supports_range_stepping): Return true if
2484 can_software_single_step return true.
2486 2016-10-27 Yao Qi <yao.qi@linaro.org>
2488 * inferiors.c (find_inferior_in_random): New function.
2489 * inferiors.h (find_inferior_in_random): Declare.
2490 * linux-low.c (linux_wait_for_event_filtered): Call
2491 find_inferior_in_random instead of find_inferior.
2493 2016-10-27 Yao Qi <yao.qi@linaro.org>
2495 * linux-low.c (linux_wait_1): If single-step breakpoints are
2496 inserted, remove them.
2498 2016-10-26 Pedro Alves <palves@redhat.com>
2500 * linux-low.c (handle_extended_wait): Link parent/child fork
2502 (linux_wait_1): Unlink them.
2503 (linux_set_resume_request): Ignore resume requests for
2504 already-resumed and unhandled fork child threads.
2505 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2506 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2508 (handle_v_requests) <vCont>: Don't call require_running.
2509 * server.h (in_queued_stop_replies): New declaration.
2511 2016-10-24 Yao Qi <yao.qi@linaro.org>
2514 * linux-aarch64-low.c (append_insns): Cast the return value to
2517 2016-10-10 Yao Qi <yao.qi@linaro.org>
2519 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2521 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2523 * target.c (target_supports_multi_process): New function, moved
2525 * target.h (target_supports_multi_process): ... here. Remove
2528 2016-10-05 Tom Tromey <tom@tromey.com>
2531 * tracepoint.c (handle_tracepoint_bkpts): Check
2532 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2534 2016-10-05 Yao Qi <yao.qi@linaro.org>
2536 * configure.srv: Update the path of arm-*.xml files.
2538 2016-10-05 Terry Guo <terry.guo@arm.com>
2539 Yao Qi <yao.qi@linaro.org>
2541 * Makefile.in: Adjust the path of rules.
2542 * configure.srv: Update the path of xml files.
2543 * regformats/arm-with-iwmmxt.dat: Regenerated.
2544 * regformats/arm-with-neon.dat: Likewise.
2545 * regformats/arm-with-vfpv2.dat: Likewise.
2546 * regformats/arm-with-vfpv3.dat Likewise.
2548 2016-09-30 Yao Qi <yao.qi@linaro.org>
2551 * target.c (target_stop_and_wait): Don't call
2552 target_continue_no_signal, use resume_stop instead.
2554 2016-09-26 Yao Qi <yao.qi@linaro.org>
2556 * linux-low.c (linux_wait_1): Call debug_exit.
2558 2016-09-23 Pedro Alves <palves@redhat.com>
2560 * Makefile.in (SFILES): Add common/new-op.c.
2561 (OBS): Add common/new-op.o.
2562 (new-op.o): New rule.
2564 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2566 * .gitinore: Ignore more files.
2568 2016-09-21 Yao Qi <yao.qi@linaro.org>
2570 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2573 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2575 * server.c (start_inferior): Call target_mourn_inferior instead of
2576 mourn_inferior; pass ptid_t argument to it.
2578 (handle_target_event): Likewise.
2579 * target.c (target_mourn_inferior): New function.
2580 * target.h (mourn_inferior): Delete macro.
2582 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2584 * linux-low.c (lwp_is_stepping): New function.
2586 2016-09-06 Carl Love <cel@us.ibm.com>
2588 * server.c (start_inferior): Fixed comment, requested comment change
2589 didn't get updated correctly. Removed reference to ptrace () call as
2590 it is only true on Linux systems.
2592 2016-09-06 Carl Love <cel@us.ibm.com>
2594 * server.c (start_inferior): Do not call
2595 function target_post_create_inferior () if the
2596 inferior process has already exited.
2598 2016-09-05 Pedro Alves <palves@redhat.com>
2600 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2601 (COMPILE.pre, CC_LD): Use CXX directly.
2602 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2603 * acinclude.m4: Don't include build-with-cxx.m4.
2604 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2605 * configure: Regenerate.
2607 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2610 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2611 call writing data to own_buf.
2613 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2615 * target.c (mywait): Call target_wait instead of
2617 (target_wait): New function.
2619 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2621 * server.c (start_inferior): New variable 'ptid'. Replace calls
2622 to the_target->resume by target_continue{,_no_signal}, depending
2624 * target.c (target_stop_and_wait): Call target_continue_no_signal
2625 instead of the_target->resume.
2626 (target_continue): New function.
2628 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2630 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2632 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2635 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2637 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2638 * linux-arm-low.c (ps_get_thread_area): Likewise.
2639 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2640 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2641 * linux-mips-low.c (ps_get_thread_area): Likewise.
2642 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2643 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2644 * linux-x86-low.c (ps_get_thread_area): Likewise.
2645 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2647 2016-08-19 Pedro Alves <palves@redhat.com>
2649 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2651 2016-08-19 Pedro Alves <palves@redhat.com>
2653 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2654 comment. Use memcpy instead of casting through unsigned long.
2656 2016-08-19 Pedro Alves <palves@redhat.com>
2658 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2659 allocating around 0x80000000.
2661 2016-08-19 Pedro Alves <palves@redhat.com>
2664 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2665 (x32-avx512-linux-ipa.o): New rules.
2666 * configure.ac (x86_64-*-linux*): New x32 check.
2667 * configure.srv (ipa_x32_linux_regobj): New.
2668 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2669 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2671 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2673 * configure: Regenerate.
2675 2016-08-09 Pedro Alves <palves@redhat.com>
2678 * Makefile.in (OBS): Add signals-state-save-restore.o.
2679 (signals-state-save-restore.o): New rule.
2680 * config.in: Regenerate.
2681 * configure: Regenerate.
2682 * linux-low.c: Include "signals-state-save-restore.h".
2683 (linux_create_inferior): Call
2684 restore_original_signals_state.
2685 * server.c: Include "dispositions-save-restore.h".
2686 (captured_main): Call save_original_signals_state.
2688 2016-08-05 Pedro Alves <palves@redhat.com>
2690 * configure: Regenerate.
2692 2016-08-04 Yao Qi <yao.qi@linaro.org>
2694 * linux-low.c (regsets_fetch_inferior_registers): Check
2695 errno is ESRCH or not.
2697 2016-08-02 Yao Qi <yao.qi@linaro.org>
2699 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2700 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2701 (thread_db_load_search): Update.
2702 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2703 td_ta_set_event and td_ta_event_getmsg.
2705 2016-07-26 Pedro Alves <palves@redhat.com>
2708 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2709 of unsigned long for 64-bit registers and use uint32_t instead of
2710 unsigned int for 32-bit registers.
2712 2016-07-26 Pedro Alves <palves@redhat.com>
2714 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2717 2016-07-21 Tom Tromey <tom@tromey.com>
2719 * configure: Rebuild.
2721 2016-07-21 Yao Qi <yao.qi@linaro.org>
2723 * mem-break.c (find_gdb_breakpoint): Cast bp to
2724 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2726 2016-07-21 Yao Qi <yao.qi@linaro.org>
2728 * server.c (handle_v_requests): Support s and S actions
2729 if target_supports_software_single_step return true.
2731 2016-07-21 Yao Qi <yao.qi@linaro.org>
2733 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2734 is resume_step, call maybe_hw_step.
2735 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2737 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2739 (proceed_one_lwp): If resume request is resume_step, install
2740 reinsert breakpoints and call maybe_hw_step.
2742 2016-07-21 Yao Qi <yao.qi@linaro.org>
2744 * linux-low.c (proceed_one_lwp): Declare.
2745 (linux_resume_one_thread): Remove local variable 'step'.
2746 Lift code enqueue signal. Call proceed_one_lwp instead of
2747 linux_resume_one_lwp.
2749 2016-07-21 Yao Qi <yao.qi@linaro.org>
2751 * linux-low.c (linux_resume_one_thread): Call
2752 enqueue_pending_signal.
2754 2016-07-21 Yao Qi <yao.qi@linaro.org>
2756 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2757 * inferiors.c (do_restore_current_thread_cleanup): New function.
2758 (make_cleanup_restore_current_thread): Likewise.
2759 * linux-low.c (install_software_single_step_breakpoints): Call
2760 make_cleanup_restore_current_thread. Switch current_thread to
2763 2016-07-21 Yao Qi <yao.qi@linaro.org>
2765 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2766 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2767 (clone_one_breakpoint): Likewise.
2768 (delete_reinsert_breakpoints): Change parameter to thread.
2770 (has_reinsert_breakpoints): Likewise.
2771 (uninsert_reinsert_breakpoints): Likewise.
2772 (reinsert_reinsert_breakpoints): Likewise.
2773 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2774 (delete_reinsert_breakpoints): Likewise.
2775 (reinsert_reinsert_breakpoints): Likewise.
2776 (uninsert_reinsert_breakpoints): Likewise.
2777 (has_reinsert_breakpoints): Likewise.
2779 2016-07-21 Yao Qi <yao.qi@linaro.org>
2781 * inferiors.c (get_thread_process): Make parameter const.
2782 * inferiors.h (get_thread_process): Update declaration.
2783 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2784 Add new parameters child_thread and parent_thread. Callers
2786 * mem-break.h (clone_all_breakpoints): Update declaration.
2788 2016-07-21 Yao Qi <yao.qi@linaro.org>
2790 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2791 <command_list, handler>: Remove.
2792 (struct gdb_breakpoint): New.
2793 (struct other_breakpoint): New.
2794 (struct reinsert_breakpoint): New.
2795 (is_gdb_breakpoint): New function.
2796 (any_persistent_commands): Update command_list if
2797 is_gdb_breakpoint returns true.
2798 (set_breakpoint): Create breakpoints according to their types.
2799 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2800 (set_gdb_breakpoint_1): Likewise.
2801 (set_gdb_breakpoint): Likewise.
2802 (clear_breakpoint_conditions): Change parameter type to
2803 'struct gdb_breakpoint *'.
2804 (clear_breakpoint_commands): Likewise.
2805 (clear_breakpoint_conditions_and_commands): Likewise.
2806 (add_condition_to_breakpoint): Likewise.
2807 (add_breakpoint_condition): Likewise.
2808 (add_commands_to_breakpoint): Likewise.
2809 (check_breakpoints): Check other_breakpoint.
2810 (clone_one_breakpoint): Clone breakpopint according to its type.
2811 * mem-break.h (struct gdb_breakpoint): Declare.
2812 (set_gdb_breakpoint): Update declaration.
2813 (clear_breakpoint_conditions_and_commands): Likewise.
2814 (add_breakpoint_condition): Likewise.
2815 (add_breakpoint_commands): Likewise.
2816 * server.c (process_point_options): Change parameter type to
2817 'struct gdb_breakpoint *'.
2819 2016-07-21 Yao Qi <yao.qi@linaro.org>
2821 * mem-break.c (set_breakpoint_at): Rename it to ...
2822 (set_breakpoint_type_at): ... it.
2823 (set_breakpoint_at): Call set_breakpoint_type_at.
2824 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2825 * mem-break.h (set_breakpoint_at): Update comments.
2827 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2829 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2831 (nios2_store_gregset): Likewise.
2833 2016-07-01 Pedro Alves <palves@redhat.com>
2834 Antoine Tremblay <antoine.tremblay@ericsson.com>
2836 * linux-low.c: Change interface to take the target lwp_info
2837 pointer directly and return void. Handle detaching from a zombie
2839 (linux_detach_lwp_callback): New function.
2840 (linux_detach): Detach from the leader thread after detaching from
2843 2016-06-28 Yao Qi <yao.qi@linaro.org>
2845 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2846 for variable new_offset.
2847 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2848 (aarch64_ftrace_insn_reloc_cb): Likewise.
2849 (aarch64_ftrace_insn_reloc_tb): Likewise.
2850 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2851 PRIx64 instead of PRIx32.
2853 2016-06-28 Yao Qi <yao.qi@linaro.org>
2855 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2856 (the_low_target): Install arm_get_syscall_trapinfo.
2858 2016-06-28 Yao Qi <yao.qi@linaro.org>
2860 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2862 (the_low_target): Install aarch64_get_syscall_trapinfo.
2864 2016-06-28 Yao Qi <yao.qi@linaro.org>
2866 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2868 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2869 Remove parameter sysno.
2870 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2873 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2875 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2876 (s390_emit_ne_goto): Likewise.
2877 (s390_emit_lt_goto): Likewise.
2878 (s390_emit_le_goto): Likewise.
2879 (s390_emit_gt_goto): Likewise.
2880 (s390_emit_ge_goto): Likewise.
2881 (s390x_emit_eq_goto): Likewise.
2882 (s390x_emit_ne_goto): Likewise.
2883 (s390x_emit_lt_goto): Likewise.
2884 (s390x_emit_le_goto): Likewise.
2885 (s390x_emit_gt_goto): Likewise.
2886 (s390x_emit_ge_goto): Likewise.
2887 (s390_emit_ops_impl): Mark variable static.
2888 (s390x_emit_ops): Likewise.
2890 2016-06-17 Yao Qi <yao.qi@linaro.org>
2892 * linux-low.c (handle_extended_wait): Call
2893 uninsert_reinsert_breakpoints for the parent process. Remove
2894 reinsert breakpoints from the child process. Reinsert them to
2895 the parent process when vfork is done.
2896 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2897 (reinsert_reinsert_breakpoints): New function.
2898 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2899 (reinsert_reinsert_breakpoints): Declare.
2901 2016-06-17 Yao Qi <yao.qi@linaro.org>
2903 * linux-low.c (handle_extended_wait): If the parent is doing
2904 step-over, remove the reinsert breakpoints from the forked child.
2906 2016-06-17 Yao Qi <yao.qi@linaro.org>
2908 * linux-low.c (unsuspend_all_lwps): Declare.
2909 (linux_low_filter_event): If thread exited, call finish_step_over.
2910 If step-over is finished, unsuspend other threads.
2912 2016-06-17 Yao Qi <yao.qi@linaro.org>
2914 * linux-low.c (linux_resume_one_lwp_throw): Assert
2915 has_reinsert_breakpoints returns false.
2916 * mem-break.c (delete_disabled_breakpoints): Assert
2917 bp type isn't reinsert_breakpoint.
2919 2016-06-17 Yao Qi <yao.qi@linaro.org>
2921 * linux-low.c (maybe_hw_step): New function.
2922 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2923 (finish_step_over): Switch current_thread to lwp temporarily,
2924 and assert has_reinsert_breakpoints returns true.
2925 (proceed_one_lwp): Call maybe_hw_step.
2926 * mem-break.c (has_reinsert_breakpoints): New function.
2927 * mem-break.h (has_reinsert_breakpoints): Declare.
2929 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2931 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2933 2016-05-17 Yao Qi <yao.qi@linaro.org>
2935 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2936 instead of find_inferior.
2938 2016-05-05 Yao Qi <yao.qi@linaro.org>
2940 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2941 Initialize res to zero.
2943 2016-05-05 Yao Qi <yao.qi@linaro.org>
2945 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2948 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2950 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2951 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2952 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2954 2016-04-28 Par Olsson <par.olsson@windriver.com>
2955 Simon Marchi <simon.marchi@ericsson.com>
2957 * tracepoint.c (write_inferior_int8): New function.
2958 (cmd_qtenable_disable): Write enable flag using
2959 write_inferior_int8.
2961 2016-04-25 Yao Qi <yao.qi@linaro.org>
2963 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2964 (need_step_over_p): Return zero if the LWP has pending signals
2965 can be delivered on software single step target.
2967 2016-04-25 Yao Qi <yao.qi@linaro.org>
2969 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2970 return instead of error.
2972 2016-04-22 Yao Qi <yao.qi@linaro.org>
2974 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2977 2016-04-22 Yao Qi <yao.qi@linaro.org>
2979 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2980 signal when stepping over breakpoint with software single
2983 2016-04-21 Pedro Alves <palves@redhat.com>
2985 * linux-s390-low.c (s390_collect_ptrace_register)
2986 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2988 (s390_check_regset): Use void * instead of gdb_byte *.
2990 2016-04-20 Pedro Alves <palves@redhat.com>
2992 * configure: Renegerate.
2994 2016-04-20 Yao Qi <yao.qi@linaro.org>
2996 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2997 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2999 (arm_store_gregset): Likewise.
3001 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3003 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3004 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3005 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3006 (amd64-avx-mpx-linux.c): New rules.
3007 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3008 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3009 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3010 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3011 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3012 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3013 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3014 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3015 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3016 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3017 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3018 * linux-x86-low.c (x86_linux_read_description): Add case for
3019 X86_XSTATE_AVX_MPX_MASK.
3020 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3021 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3022 init_registers_i386_avx_mpx_linux.
3023 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3024 (initialize_low_tracepoint): Call
3025 init_registers_i386_avx_mpx_linux.
3026 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3027 (initialize_low_tracepoint): Call
3028 init_registers_amd64_avx_mpx_linux.
3029 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3030 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3031 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3034 2016-04-18 Pedro Alves <palves@redhat.com>
3036 * configure: Regenerate.
3038 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3040 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3041 (aarch64_emit_sub): Likewise.
3043 2016-04-12 Pedro Alves <palves@redhat.com>
3045 * utils.c (prepare_to_throw_exception): Delete.
3047 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3049 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3051 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3053 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3055 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3057 * linux-aarch64-ipa.c: Add <elf.h> include.
3058 * linux-ppc-ipa.c: Add <elf.h> include.
3059 * linux-s390-ipa.c: Add <elf.h> include.
3061 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3063 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3064 (get_raw_reg_ptr): Likewise.
3065 (get_trace_state_variable_value_ptr): Likewise.
3066 (set_trace_state_variable_value_ptr): Likewise.
3067 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3070 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3071 Marcin Kościelnicki <koriakin@0x04.net>
3074 * linux-ppc-low.c (emit_insns): New function.
3075 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3076 (ppc_emit_prologue): New function.
3077 (ppc_emit_epilogue): New function.
3078 (ppc_emit_add): New function.
3079 (ppc_emit_sub): New function.
3080 (ppc_emit_mul): New function.
3081 (ppc_emit_lsh): New function.
3082 (ppc_emit_rsh_signed): New function.
3083 (ppc_emit_rsh_unsigned): New function.
3084 (ppc_emit_ext): New function.
3085 (ppc_emit_zero_ext): New function.
3086 (ppc_emit_log_not): New function.
3087 (ppc_emit_bit_and): New function.
3088 (ppc_emit_bit_or): New function.
3089 (ppc_emit_bit_xor): New function.
3090 (ppc_emit_bit_not): New function.
3091 (ppc_emit_equal): New function.
3092 (ppc_emit_less_signed): New function.
3093 (ppc_emit_less_unsigned): New function.
3094 (ppc_emit_ref): New function.
3095 (ppc_emit_const): New function.
3096 (ppc_emit_reg): New function.
3097 (ppc_emit_pop): New function.
3098 (ppc_emit_stack_flush): New function.
3099 (ppc_emit_swap): New function.
3100 (ppc_emit_stack_adjust): New function.
3101 (ppc_emit_call): New function.
3102 (ppc_emit_int_call_1): New function.
3103 (ppc_emit_void_call_2): New function.
3104 (ppc_emit_if_goto): New function.
3105 (ppc_emit_goto): New function.
3106 (ppc_emit_eq_goto): New function.
3107 (ppc_emit_ne_goto): New function.
3108 (ppc_emit_lt_goto): New function.
3109 (ppc_emit_le_goto): New function.
3110 (ppc_emit_gt_goto): New function.
3111 (ppc_emit_ge_goto): New function.
3112 (ppc_write_goto_address): New function.
3113 (ppc_emit_ops_impl): New static variable.
3114 (ppc64v1_emit_prologue): New function.
3115 (ppc64v2_emit_prologue): New function.
3116 (ppc64_emit_epilogue): New function.
3117 (ppc64_emit_add): New function.
3118 (ppc64_emit_sub): New function.
3119 (ppc64_emit_mul): New function.
3120 (ppc64_emit_lsh): New function.
3121 (ppc64_emit_rsh_signed): New function.
3122 (ppc64_emit_rsh_unsigned): New function.
3123 (ppc64_emit_ext): New function.
3124 (ppc64_emit_zero_ext): New function.
3125 (ppc64_emit_log_not): New function.
3126 (ppc64_emit_bit_and): New function.
3127 (ppc64_emit_bit_or): New function.
3128 (ppc64_emit_bit_xor): New function.
3129 (ppc64_emit_bit_not): New function.
3130 (ppc64_emit_equal): New function.
3131 (ppc64_emit_less_signed): New function.
3132 (ppc64_emit_less_unsigned): New function.
3133 (ppc64_emit_ref): New function.
3134 (ppc64_emit_const): New function.
3135 (ppc64v1_emit_reg): New function.
3136 (ppc64v2_emit_reg): New function.
3137 (ppc64_emit_pop): New function.
3138 (ppc64_emit_stack_flush): New function.
3139 (ppc64_emit_swap): New function.
3140 (ppc64v1_emit_call): New function.
3141 (ppc64v2_emit_call): New function.
3142 (ppc64v1_emit_int_call_1): New function.
3143 (ppc64v2_emit_int_call_1): New function.
3144 (ppc64v1_emit_void_call_2): New function.
3145 (ppc64v2_emit_void_call_2): New function.
3146 (ppc64_emit_if_goto): New function.
3147 (ppc64_emit_eq_goto): New function.
3148 (ppc64_emit_ne_goto): New function.
3149 (ppc64_emit_lt_goto): New function.
3150 (ppc64_emit_le_goto): New function.
3151 (ppc64_emit_gt_goto): New function.
3152 (ppc64_emit_ge_goto): New function.
3153 (ppc64v1_emit_ops_impl): New static variable.
3154 (ppc64v2_emit_ops_impl): New static variable.
3155 (ppc_emit_ops): New function.
3156 (linux_low_target): Wire in ppc_emit_ops.
3158 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3159 Marcin Kościelnicki <koriakin@0x04.net>
3162 * Makefile.in: Add powerpc-*-ipa.o
3163 * configure.srv: Add ipa_obj for powerpc*-linux.
3164 * linux-ppc-ipa.c: New file.
3165 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3167 (PPC_FIELD): New macro.
3168 (PPC_SEXT): New macro.
3169 (PPC_OP6): New macro.
3170 (PPC_BO): New macro.
3171 (PPC_LI): New macro.
3172 (PPC_BD): New macro.
3173 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3174 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3175 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3176 (ppc_get_thread_area): New function.
3177 (is_elfv2_inferior): New function.
3178 (gen_ds_form): New function.
3179 (GEN_STD): New macro.
3180 (GEN_STDU): New macro.
3181 (GEN_LD): New macro.
3182 (GEN_LDU): New macro.
3183 (gen_d_form): New function.
3184 (GEN_ADDI): New macro.
3185 (GEN_ADDIS): New macro.
3186 (GEN_LI): New macro.
3187 (GEN_LIS): New macro.
3188 (GEN_ORI): New macro.
3189 (GEN_ORIS): New macro.
3190 (GEN_LWZ): New macro.
3191 (GEN_STW): New macro.
3192 (GEN_STWU): New macro.
3193 (gen_xfx_form): New function.
3194 (GEN_MFSPR): New macro.
3195 (GEN_MTSPR): New macro.
3196 (GEN_MFCR): New macro.
3197 (GEN_MTCR): New macro.
3198 (GEN_SYNC): New macro.
3199 (GEN_LWSYNC): New macro.
3200 (gen_x_form): New function.
3201 (GEN_OR): New macro.
3202 (GEN_MR): New macro.
3203 (GEN_LWARX): New macro.
3204 (GEN_STWCX): New macro.
3205 (GEN_CMPW): New macro.
3206 (gen_md_form): New function.
3207 (GEN_RLDICL): New macro.
3208 (GEN_RLDICR): New macro.
3209 (gen_i_form): New function.
3211 (GEN_BL): New macro.
3212 (gen_b_form): New function.
3213 (GEN_BNE): New macro.
3214 (GEN_LOAD): New macro.
3215 (GEN_STORE): New macro.
3216 (gen_limm): New function.
3217 (gen_atomic_xchg): New function.
3218 (gen_call): New function.
3219 (ppc_relocate_instruction): New function.
3220 (ppc_install_fast_tracepoint_jump_pad): New function.
3221 (ppc_get_min_fast_tracepoint_insn_len): New function.
3222 (ppc_get_ipa_tdesc_idx): New function.
3223 (the_low_target): Wire in the new functions.
3224 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3226 * linux-ppc-tdesc.h: New file.
3228 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3230 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3231 (alloc_jump_pad_buffer): New function.
3232 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3233 (alloc_jump_pad_buffer): New function.
3234 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3235 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3236 (alloc_jump_pad_buffer): New function.
3237 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3238 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3239 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3240 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3242 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3244 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3245 * linux-amd64-ipa.c: Likewise.
3246 * linux-i386-ipa.c: Likewise.
3247 * linux-s390-ipa.c: Likewise.
3248 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3249 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3250 set_trace_state_variable_value_ptr.
3251 (struct ipa_sym_addresses): Likewise.
3252 (symbol_list): Likewise.
3253 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3254 accessing gdb_collect directly.
3255 (gdb_collect_ptr_type): New typedef.
3256 (get_raw_reg_ptr_type): New typedef.
3257 (get_trace_state_variable_value_ptr_type): New typedef.
3258 (set_trace_state_variable_value_ptr_type): New typedef.
3259 (gdb_collect_ptr): New global.
3260 (get_raw_reg_ptr): New global.
3261 (get_trace_state_variable_value_ptr): New global.
3262 (set_trace_state_variable_value_ptr): New global.
3263 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3264 accessing get_raw_reg directly.
3265 (get_get_tsv_func_addr): Likewise for
3266 get_trace_state_variable_value_ptr.
3267 (get_set_tsv_func_addr): Likewise for
3268 set_trace_state_variable_value_ptr.
3269 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3271 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3273 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3275 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3277 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3279 (relocate_instruction): Remove own_buf.
3280 * server.c (own_buf): Make global.
3281 (handle_v_requests): Make global.
3282 * server.h (own_buf): New declaration.
3283 (handle_v_requests): New prototype.
3285 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3288 * linux-s390-low.c (add_insns): New function.
3289 (s390_emit_prologue): New function.
3290 (s390_emit_epilogue): New function.
3291 (s390_emit_add): New function.
3292 (s390_emit_sub): New function.
3293 (s390_emit_mul): New function.
3294 (s390_emit_lsh): New function.
3295 (s390_emit_rsh_signed): New function.
3296 (s390_emit_rsh_unsigned): New function.
3297 (s390_emit_ext): New function.
3298 (s390_emit_log_not): New function.
3299 (s390_emit_bit_and): New function.
3300 (s390_emit_bit_or): New function.
3301 (s390_emit_bit_xor): New function.
3302 (s390_emit_bit_not): New function.
3303 (s390_emit_equal): New function.
3304 (s390_emit_less_signed): New function.
3305 (s390_emit_less_unsigned): New function.
3306 (s390_emit_ref): New function.
3307 (s390_emit_if_goto): New function.
3308 (s390_emit_goto): New function.
3309 (s390_write_goto_address): New function.
3310 (s390_emit_litpool): New function.
3311 (s390_emit_const): New function.
3312 (s390_emit_call): New function.
3313 (s390_emit_reg): New function.
3314 (s390_emit_pop): New function.
3315 (s390_emit_stack_flush): New function.
3316 (s390_emit_zero_ext): New function.
3317 (s390_emit_swap): New function.
3318 (s390_emit_stack_adjust): New function.
3319 (s390_emit_set_r2): New function.
3320 (s390_emit_int_call_1): New function.
3321 (s390_emit_void_call_2): New function.
3322 (s390_emit_eq_goto): New function.
3323 (s390_emit_ne_goto): New function.
3324 (s390_emit_lt_goto): New function.
3325 (s390_emit_le_goto): New function.
3326 (s390_emit_gt_goto): New function.
3327 (s390_emit_ge_goto): New function.
3328 (s390x_emit_prologue): New function.
3329 (s390x_emit_epilogue): New function.
3330 (s390x_emit_add): New function.
3331 (s390x_emit_sub): New function.
3332 (s390x_emit_mul): New function.
3333 (s390x_emit_lsh): New function.
3334 (s390x_emit_rsh_signed): New function.
3335 (s390x_emit_rsh_unsigned): New function.
3336 (s390x_emit_ext): New function.
3337 (s390x_emit_log_not): New function.
3338 (s390x_emit_bit_and): New function.
3339 (s390x_emit_bit_or): New function.
3340 (s390x_emit_bit_xor): New function.
3341 (s390x_emit_bit_not): New function.
3342 (s390x_emit_equal): New function.
3343 (s390x_emit_less_signed): New function.
3344 (s390x_emit_less_unsigned): New function.
3345 (s390x_emit_ref): New function.
3346 (s390x_emit_if_goto): New function.
3347 (s390x_emit_const): New function.
3348 (s390x_emit_call): New function.
3349 (s390x_emit_reg): New function.
3350 (s390x_emit_pop): New function.
3351 (s390x_emit_stack_flush): New function.
3352 (s390x_emit_zero_ext): New function.
3353 (s390x_emit_swap): New function.
3354 (s390x_emit_stack_adjust): New function.
3355 (s390x_emit_int_call_1): New function.
3356 (s390x_emit_void_call_2): New function.
3357 (s390x_emit_eq_goto): New function.
3358 (s390x_emit_ne_goto): New function.
3359 (s390x_emit_lt_goto): New function.
3360 (s390x_emit_le_goto): New function.
3361 (s390x_emit_gt_goto): New function.
3362 (s390x_emit_ge_goto): New function.
3363 (s390_emit_ops): New function.
3364 (struct linux_target_ops): Fill in emit_ops hook.
3366 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3369 * Makefile.in: Add s390 IPA files.
3370 * configure.srv: Build IPA for s390.
3371 * linux-s390-ipa.c: New file.
3372 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3373 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3374 (tdesc_s390_linux32): Likewise.
3375 (init_registers_s390_linux32v1): Likewise.
3376 (tdesc_s390_linux32v1): Likewise.
3377 (init_registers_s390_linux32v2): Likewise.
3378 (tdesc_s390_linux32v2): Likewise.
3379 (init_registers_s390_linux64): Likewise.
3380 (tdesc_s390_linux64): Likewise.
3381 (init_registers_s390_linux64v1): Likewise.
3382 (tdesc_s390_linux64v1): Likewise.
3383 (init_registers_s390_linux64v2): Likewise.
3384 (tdesc_s390_linux64v2): Likewise.
3385 (init_registers_s390_te_linux64): Likewise.
3386 (tdesc_s390_te_linux64): Likewise.
3387 (init_registers_s390_vx_linux64): Likewise.
3388 (tdesc_s390_vx_linux64): Likewise.
3389 (init_registers_s390_tevx_linux64): Likewise.
3390 (tdesc_s390_tevx_linux64): Likewise.
3391 (init_registers_s390x_linux64): Likewise.
3392 (tdesc_s390x_linux64): Likewise.
3393 (init_registers_s390x_linux64v1): Likewise.
3394 (tdesc_s390x_linux64v1): Likewise.
3395 (init_registers_s390x_linux64v2): Likewise.
3396 (tdesc_s390x_linux64v2): Likewise.
3397 (init_registers_s390x_te_linux64): Likewise.
3398 (tdesc_s390x_te_linux64): Likewise.
3399 (init_registers_s390x_vx_linux64): Likewise.
3400 (tdesc_s390x_vx_linux64): Likewise.
3401 (init_registers_s390x_tevx_linux64): Likewise.
3402 (tdesc_s390x_tevx_linux64): Likewise.
3403 (have_hwcap_s390_vx): New static variable.
3404 (s390_arch_setup): Fill have_hwcap_s390_vx.
3405 (s390_get_thread_area): New function.
3406 (s390_ft_entry_gpr_esa): New const.
3407 (s390_ft_entry_gpr_zarch): New const.
3408 (s390_ft_entry_misc): New const.
3409 (s390_ft_entry_fr): New const.
3410 (s390_ft_entry_vr): New const.
3411 (s390_ft_main_31): New const.
3412 (s390_ft_main_64): New const.
3413 (s390_ft_exit_fr): New const.
3414 (s390_ft_exit_vr): New const.
3415 (s390_ft_exit_misc): New const.
3416 (s390_ft_exit_gpr_esa): New const.
3417 (s390_ft_exit_gpr_zarch): New const.
3418 (append_insns): New function.
3419 (s390_relocate_instruction): New function.
3420 (s390_install_fast_tracepoint_jump_pad): New function.
3421 (s390_get_min_fast_tracepoint_insn_len): New function.
3422 (s390_get_ipa_tdesc_idx): New function.
3423 (struct linux_target_ops): Wire in the above functions.
3424 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3425 * linux-s390-tdesc.h: New file.
3427 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3429 * linux-s390-low.c (s390_supports_tracepoints): New function.
3430 (struct linux_target_ops): Fill supports_tracepoints hook.
3432 2016-03-18 Yao Qi <yao.qi@linaro.org>
3434 * linux-low.c (lwp_signal_can_be_delivered): New function.
3435 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3437 2016-03-18 Yao Qi <yao.qi@linaro.org>
3439 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3440 0 if signal is enqueued. Remove 'signal' from one debugging
3441 message. Move one debugging message to some lines below.
3442 Remove code setting 'signal' to 0.
3444 2016-03-18 Yao Qi <yao.qi@linaro.org>
3446 * linux-low.c (linux_low_filter_event): Remove redundant
3447 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3449 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3451 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3452 (struct linux_target_ops): Wire in the above.
3454 2016-03-03 Yao Qi <yao.qi@linaro.org>
3456 * linux-low.c: Update comments to start_step_over.
3458 2016-03-03 Yao Qi <yao.qi@linaro.org>
3461 * linux-low.c (handle_extended_wait): Set child suspended
3462 if event_lwp->bp_reinsert isn't zero.
3464 2016-03-02 Yao Qi <yao.qi@linaro.org>
3466 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3467 enqueue_pending_signal.
3469 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3471 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3474 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3476 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3477 (s390_regmap_3264) [!__s390x__]: New global.
3478 (s390_collect_ptrace_register): Skip map entries containing -1.
3479 (s390_supply_ptrace_register): Ditto.
3480 (s390_fill_gprs_high): New function.
3481 (s390_store_gprs_high): New function.
3482 (s390_regsets): Add NT_S390_HIGH_GPRS.
3483 (s390_get_hwcap): Enable on 31-bit.
3484 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3485 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3486 Detect NT_S390_HIGH_GPRS.
3487 (s390_usrregs_info_3264): Enable on 31-bit.
3488 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3489 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3491 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3494 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3495 * configure.srv: Ditto.
3496 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3497 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3498 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3499 (init_registers_amd64_linux): Remove prototype.
3500 (tdesc_amd64_linux): Remove declaration.
3501 (get_ipa_tdesc): New function.
3502 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3503 initialize remaining tdescs.
3504 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3505 (init_registers_i386_linux): Remove prototype.
3506 (tdesc_i386_linux): Remove declaration.
3507 (get_ipa_tdesc): New function.
3508 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3509 initialize remaining tdescs.
3510 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3511 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3512 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3513 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3514 (x86_get_ipa_tdesc_idx): New function.
3515 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3516 * linux-x86-tdesc.h: New file.
3517 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3518 (target_get_ipa_tdesc_idx): New macro.
3519 * tracepoint.c (ipa_tdesc_idx): New macro.
3520 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3521 (symbol_list): Add ipa_tdesc_idx.
3522 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3523 (ipa_tdesc): Remove.
3524 (ipa_tdesc_idx): New variable.
3525 (get_context_regcache): Use get_ipa_tdesc.
3526 (gdb_collect): Ditto.
3528 * tracepoint.h (get_ipa_tdesc): New prototype.
3529 (ipa_tdesc): Remove.
3531 2016-02-24 Pedro Alves <palves@redhat.com>
3533 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3534 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3535 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3536 Factor out common code between the USE_SIGTRAP_SIGINFO and
3537 !USE_SIGTRAP_SIGINFO blocks.
3538 (linux_low_filter_event): Call save_stop_reason instead of
3539 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3541 (linux_wait_1): Update comments.
3543 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3545 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3546 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3547 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3548 ppc_insert_point, ppc_remove_point.
3550 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3552 * linux-s390-low.c (s390_supports_z_point_type): New function.
3553 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3555 2016-02-16 Yao Qi <yao.qi@linaro.org>
3557 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3558 PC. Get pc from regcache_read_pc.
3560 2016-02-12 Yao Qi <yao.qi@linaro.org>
3562 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3563 or linux_get_pc_32bit.
3564 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3566 2016-02-12 Yao Qi <yao.qi@linaro.org>
3568 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3569 arm_linux_get_next_pcs_fixup.
3571 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3573 * tracepoint.c (x_tracepoint_action_download): Change
3574 write_inferior_data_ptr to write_inferior_data_pointer.
3575 (cmd_qtstart): Likewise.
3576 (write_inferior_data_ptr): Remove.
3577 (download_agent_expr): Change write_inferior_data_ptr to
3578 write_inferior_data_pointer.
3579 (download_tracepoint_1): Likewise.
3580 (download_tracepoint): Likewise.
3581 (download_trace_state_variables): Likewise.
3583 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3584 Marcin Kościelnicki <koriakin@0x04.net>
3586 * tracepoint.c (struct tracepoint_action_ops): Remove.
3587 (struct tracepoint_action): Remove ops.
3588 (m_tracepoint_action_download, r_tracepoint_action_download)
3589 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3590 size and offset accordingly.
3591 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3592 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3593 (tracepoint_action_send, tracepoint_action_download): New functions.
3594 Helpers for trace action handlers.
3595 (add_tracepoint_action): Remove setup actions ops.
3596 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3598 2016-02-10 Yao Qi <yao.qi@linaro.org>
3600 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3602 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3604 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3606 * configure: Regenerate.
3608 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3610 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3611 void * to gdb_byte *.
3612 * linux-low.c (siginfo_fixup): Likewise.
3613 (linux_xfer_siginfo): Likewise.
3614 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3616 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3618 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3620 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3622 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3624 * linux-x86-low.c [__x86_64__]: Include
3625 "nat/amd64-linux-siginfo.h".
3626 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3627 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3628 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3629 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3630 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3631 (cpt_si_fd, si_timerid, si_overrun): Move from
3632 nat/amd64-linux-siginfo.c.
3633 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3635 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3637 * server.c (skip_to_semicolon): Remove.
3638 (process_point_options): Use strchrnul instead of
3641 2016-01-26 Yao Qi <yao.qi@linaro.org>
3643 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3644 * linux-low.c (install_software_single_step_breakpoints): Don't
3645 call regcache_read_pc.
3646 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3649 2016-01-26 Yao Qi <yao.qi@linaro.org>
3651 * linux-low.c (install_software_single_step_breakpoints): Call
3652 regcache_read_pc instead of get_pc.
3654 2016-01-26 Yao Qi <yao.qi@linaro.org>
3656 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3657 (unblock_async_io): Rename to ...
3658 (block_unblock_async_io): ... it. New function.
3659 (enable_async_io): Don't install SIGIO handler. Unblock it
3661 (disable_async_io): Don't ignore SIGIO. Block it instead.
3662 (initialize_async_io): Install SIGIO handler. Don't call
3665 2016-01-26 Yao Qi <yao.qi@linaro.org>
3667 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3668 first character is '\003', call *the_target->request_interrupt.
3670 2016-01-25 Yao Qi <yao.qi@linaro.org>
3672 * remote-utils.c (new_thread_notify): Remove.
3673 (dead_thread_notify): Likewise.
3674 * remote-utils.h (new_thread_notify): Remove declaration.
3675 (dead_thread_notify): Likewise.
3677 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3679 * gdb.trace/pending.exp: Fix expected message on continue.
3681 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3683 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3684 it works properly on big-endian machines where sizeof (CORE_ADDR)
3687 2016-01-21 Pedro Alves <palves@redhat.com>
3689 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3690 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3691 * configure: Regenerate.
3693 2016-01-21 Yao Qi <yao.qi@linaro.org>
3695 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3696 is_thumb and set it according to CPSR saved on the stack.
3697 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3698 arm_sigreturn_next_pc.
3700 2016-01-18 Yao Qi <yao.qi@linaro.org>
3702 * linux-low.c (linux_set_pc_64bit): New function.
3703 (linux_get_pc_64bit): New function.
3704 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3706 * linux-sparc-low.c (debug_threads): Remove declaration.
3707 (sparc_get_pc): Remove.
3708 (the_low_target): Use linux_get_pc_64bit instead of
3710 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3711 (the_low_target): Use linux_get_pc_64bit and
3714 2016-01-18 Yao Qi <yao.qi@linaro.org>
3716 * linux-arm-low.c (debug_threads): Remove declaration.
3717 (arm_get_pc, arm_set_pc): Remove.
3718 (the_low_target): Use linux_get_pc_32bit and
3720 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3721 (the_low_target): Use linux_get_pc_32bit and
3723 * linux-cris-low.c (debug_threads): Remove declaration.
3724 (cris_get_pc, cris_set_pc,): Remove.
3725 (the_low_target): Use linux_get_pc_32bit and
3727 * linux-crisv32-low.c (debug_threads): Remove declaration.
3728 (cris_get_pc, cris_set_pc): Remove.
3729 (the_low_target): Use linux_get_pc_32bit and
3731 * linux-low.c: Include inttypes.h.
3732 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3733 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3734 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3735 (the_low_target): Use linux_get_pc_32bit and
3737 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3738 (the_low_target): Use linux_get_pc_32bit and
3740 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3741 (the_low_target): Use linux_get_pc_32bit and
3743 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3744 (the_low_target): Use linux_get_pc_32bit and
3746 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3747 (the_low_target): Use linux_get_pc_32bit and
3750 2016-01-18 Gary Benson <gbenson@redhat.com>
3752 * configure.ac (AC_FUNC_FORK): New check.
3753 * config.in: Regenerate.
3754 * configure: Likewise.
3756 2016-01-14 Yao Qi <yao.qi@linaro.org>
3758 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3759 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3760 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3761 arm_get_next_pcs_ctor.
3763 2016-01-12 Josh Stone <jistone@redhat.com>
3764 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3766 * inferiors.h: Include "gdb_vecs.h".
3767 (struct process_info): Add syscalls_to_catch.
3768 * inferiors.c (remove_process): Free syscalls_to_catch.
3769 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3770 syscall_return stops.
3771 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3772 * server.c (handle_general_set): Handle QCatchSyscalls.
3773 (handle_query): Report support for QCatchSyscalls.
3774 * target.h (struct target_ops): Add supports_catch_syscall.
3775 (target_supports_catch_syscall): New macro.
3776 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3777 (struct lwp_info): Add syscall_state.
3778 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3779 Maintain syscall_state and syscalls_to_catch across exec.
3780 (get_syscall_trapinfo): New function, proxy to the_low_target.
3781 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3782 (linux_low_filter_event): Toggle syscall_state entry/return for
3783 syscall traps, and set it ignored for all others.
3784 (gdb_catching_syscalls_p): New function.
3785 (gdb_catch_this_syscall_p): New function.
3786 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3787 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3788 (linux_supports_catch_syscall): New function.
3789 (linux_target_ops): Install it.
3790 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3791 (the_low_target): Install it.
3793 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3795 * acinclude.m4: Include new ../warning.m4 file.
3796 * configure: Regenerated.
3797 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3799 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3801 * ax.c (is_goto_target): Mark static.
3802 * linux-low.c (register_addr): Likewise.
3803 (linux_fetch_registers, linux_store_registers): Likewise.
3804 * mem-break.c (any_persistent_commands): Fix old prototype.
3805 (add_commands_to_breakpoint): Mark static.
3806 * regcache.c (find_register_by_name): Delete unused func.
3807 * remote-utils.c (hex_or_minus_one): Mark static.
3808 * server.c (monitor_show_help): Mark static.
3809 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3810 handle_v_requests): Likewise.
3812 2016-01-12 Pedro Alves <palves@redhat.com>
3814 Remove use of the registered trademark symbol throughout.
3816 2016-01-08 Yao Qi <yao.qi@linaro.org>
3818 * remote-utils.c (getpkt): If c is '\003', call target hook
3821 2016-01-06 Yao Qi <yao.qi@linaro.org>
3823 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3824 linux-aarch32-low.c.
3825 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3826 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3827 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3828 (thumb2_breakpoint): Declare.
3829 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3830 linux-aarch32-low.h.
3831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3832 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3833 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3835 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3837 * gdbreplay.c (gdbreplay_version): Change copyright year in
3839 * server.c (gdbserver_version): Likewise.
3841 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3843 * server.c (crc32_table): Delete.
3844 (crc32): Use libiberty's xcrc32 function.
3846 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3848 * lynx-low.c (lynx_delete_thread_callback): New function.
3849 (lynx_mourn): Properly delete our process and all of its
3850 threads. Remove call to clear_inferiors.
3852 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3854 * target.c (thread_search_callback): Add check that
3855 the thread_stopped target callback is not NULL before
3858 2015-12-21 Yao Qi <yao.qi@linaro.org>
3860 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3863 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3865 * server.c (handle_query): Call target_supports_software_single_step.
3867 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3869 * linux-low.c (single_step): New function.
3870 (linux_resume_one_lwp_throw): Call single_step.
3871 (start_step_over): Likewise.
3873 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3875 * Makefile.in (SFILES): Append arch/arm-linux.c,
3876 arch/arm-get-next-pcs.c.
3877 (arm-linux.o): New rule.
3878 (arm-get-next-pcs.o): New rule.
3879 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3881 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3882 to linux-aarch32-low.c.
3883 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3884 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3885 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3886 (thumb2_breakpoint_len): Likewise.
3887 (arm_is_thumb_mode): Make non-static.
3888 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3889 from linux-aarch32-low.c.
3890 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3891 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3892 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3893 (thumb2_breakpoint_len): Likewise.
3894 (arm_is_thumb_mode): New declaration.
3895 * linux-arm-low.c: Include arch/arm-linux.h
3896 aarch/arm-get-next-pcs.h, sys/syscall.h.
3897 (get_next_pcs_ops): New struct.
3898 (get_next_pcs_addr_bits_remove): New function.
3899 (get_next_pcs_is_thumb): New function.
3900 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3901 (arm_sigreturn_next_pc): Likewise.
3902 (get_next_pcs_syscall_next_pc): Likewise.
3903 (arm_gdbserver_get_next_pcs): Likewise.
3904 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3906 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3907 * server.h: Include gdb_vecs.h.
3909 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3911 * Makefile.in (SFILES): Append common/common-regcache.c.
3912 (OBS): Append common-regcache.o.
3913 (common-regcache.o): New rule.
3914 * regcache.c (init_register_cache): Initialize cache to
3916 (regcache_raw_read_unsigned): New function.
3917 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3918 register_status enum.
3920 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3922 * linux-aarch64-low.c (the_low_targets): Rename
3923 breakpoint_reinsert_addr to get_next_pcs.
3924 * linux-arm-low.c (the_low_targets): Likewise.
3925 * linux-bfin-low.c (the_low_targets): Likewise.
3926 * linux-cris-low.c (the_low_targets): Likewise.
3927 * linux-crisv32-low.c (the_low_targets): Likewise.
3928 * linux-low.c (can_software_single_step): Likewise.
3929 (install_software_single_step_breakpoints): New function.
3930 (start_step_over): Use install_software_single_step_breakpoints.
3931 * linux-low.h: New CORE_ADDR vector.
3932 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3934 * linux-mips-low.c (the_low_targets): Likewise.
3935 * linux-nios2-low.c (the_low_targets): Likewise.
3936 * linux-sparc-low.c (the_low_targets): Likewise.
3938 2015-12-17 Pedro Alves <palves@redhat.com>
3940 * linux-low.c (linux_kill_one_lwp): Remove references to
3942 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3944 (linux_init_signals): Delete.
3945 (initialize_low): Adjust.
3946 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3948 2015-12-16 Pedro Alves <palves@redhat.com>
3950 * configure.ac (compiler warning flags): When testing a
3951 -Wno-foo option, check whether -Wfoo works instead.
3952 * configure: Regenerate.
3954 2015-12-11 Don Breazeal <donb@codesourcery.com>
3956 * server.c (process_serial_event): Don't exit from gdbserver
3957 in remote mode if there are still active inferiors.
3959 2015-12-11 Yao Qi <yao.qi@linaro.org>
3961 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3962 arm_breakpoint_at if the process is 32-bit.
3964 2015-12-11 Yao Qi <yao.qi@linaro.org>
3966 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3969 2015-12-07 Yao Qi <yao.qi@linaro.org>
3971 * configure.srv: Append arm.o to srv_tgtobj for
3972 aarch64*-*-linux* target.
3973 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3974 from linux-arm-low.c.
3975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3976 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3977 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3978 (thumb2_breakpoint_len): Likewise.
3979 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3980 (arm_breakpoint_kinds): Likewise.
3981 (arm_breakpoint_kind_from_pc): Likewise.
3982 (arm_sw_breakpoint_from_kind): Likewise.
3983 (arm_breakpoint_kind_from_current_state): Likewise.
3984 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3985 (arm_sw_breakpoint_from_kind): Declare.
3986 (arm_breakpoint_kind_from_current_state): Declare.
3987 (arm_breakpoint_at): Declare.
3988 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3989 arm_sw_breakpoint_from_kind if process is 32-bit.
3990 (aarch64_breakpoint_kind_from_pc): New function.
3991 (aarch64_breakpoint_kind_from_current_state): New function.
3992 (the_low_target): Initialize fields breakpoint_kind_from_pc
3993 and breakpoint_kind_from_current_state.
3994 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3995 linux-aarch32-low.c.
3996 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3997 (arm_breakpoint, arm_breakpoint_len): Likewise.
3998 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3999 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4000 (arm_is_thumb_mode): Likewise.
4001 (arm_breakpoint_at): Likewise.
4002 (arm_breakpoint_kind_from_pc): Likewise.
4003 (arm_sw_breakpoint_from_kind): Likewise.
4004 (arm_breakpoint_kind_from_current_state): Likewise.
4007 2015-08-04 Yao Qi <yao.qi@linaro.org>
4009 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4010 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4011 * server.c (extended_protocol): Remove "static".
4012 * server.h (extended_protocol): Declare it.
4014 2015-12-04 Josh Stone <jistone@redhat.com>
4016 * target.h (struct target_ops) <arch_setup>: Rename to ...
4017 (struct target_ops) <post_create_inferior>: ... this.
4018 (target_arch_setup): Rename to ...
4019 (target_post_create_inferior): ... this, calling post_create_inferior.
4020 * server.c (start_inferior): Update target_arch_setup calls to
4021 target_post_create_inferior.
4022 * linux-low.c (linux_low_ptrace_options): Forward declare.
4023 (linux_arch_setup): Update its comment for general use.
4024 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4025 (struct linux_target_ops): Use linux_post_create_inferior.
4026 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4027 to post_create_inferior.
4028 * nto-low.c (struct nto_target_ops): Likewise.
4029 * spu-low.c (struct spu_target_ops): Likewise.
4030 * win32-low.c (struct win32_target_ops): Likewise.
4032 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4034 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4036 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4038 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4039 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4040 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4041 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4042 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4043 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4044 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4045 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4046 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4047 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4048 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4049 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4051 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4053 * linux-low.c (linux_look_up_symbols): Don't call
4054 linux_supports_traceclone.
4055 * linux-low.h (thread_db_init): Remove use_events argument.
4056 * thread-db.c (thread_db_use_event): Remove global variable.
4057 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4058 (struct thread_db) <td_create_bp>: Remove field.
4059 (thread_db_create_event): Remove function.
4060 (thread_db_enable_reporting): Likewise.
4061 (find_one_thread): Don't check for thread_db_use_events.
4062 (attach_thread): Likewise.
4063 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4064 (try_thread_db_load_1): Don't check for thread_db_use_events.
4065 (thread_db_init): Remove use_events argument and thread events
4067 (remove_thread_event_breakpoints): Remove function.
4068 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4070 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4072 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4074 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4075 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4077 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4078 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4080 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4082 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4083 * linux-low.c (can_hardware_single_step): Use
4084 supports_hardware_single_step.
4085 (can_software_single_step): New function.
4086 (start_step_over): Call can_software_single_step.
4087 (linux_supports_hardware_single_step): New function.
4088 (struct target_ops) <supports_software_single_step>: Initialize.
4089 * linux-low.h (struct linux_target_ops)
4090 <supports_hardware_single_step>: Initialize.
4091 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4092 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4093 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4094 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4095 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4096 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4097 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4099 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4100 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4102 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4103 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4105 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4107 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4110 * target.h (struct target_ops): <supports_software_single_step>:
4112 (target_supports_software_single_step): New macro.
4114 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4116 * linux-low.c (linux_wait_1): Fix pc advance condition.
4117 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4118 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4120 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4122 * linux-arm-low.c (arm_is_thumb_mode): New function.
4123 (arm_breakpoint_at): Use arm_is_thumb_mode.
4124 (arm_breakpoint_kind_from_current_state): New function.
4125 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4127 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4128 (linux_breakpoint_kind_from_current_state): New function.
4129 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4130 * linux-low.h (struct linux_target_ops)
4131 <breakpoint_kind_from_current_state>: New field.
4132 * target.h (struct target_ops): Likewise.
4133 (target_breakpoint_kind_from_current_state): New macro.
4135 2015-11-30 Pedro Alves <palves@redhat.com>
4137 * linux-low.c (linux_resume): Wake up the event loop before
4140 2015-11-30 Pedro Alves <palves@redhat.com>
4142 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4144 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4146 * target.c (struct thread_search): New structure.
4147 (thread_search_callback): New function.
4148 (prev_general_thread): New global.
4149 (prepare_to_access_memory, done_accessing_memory): New functions.
4150 * target.h (prepare_to_access_memory, done_accessing_memory):
4151 Replace macros with function declarations.
4153 2015-11-30 Pedro Alves <palves@redhat.com>
4156 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4157 report TARGET_WAITKIND_NO_RESUMED.
4158 * remote-utils.c (prepare_resume_reply): Handle
4159 TARGET_WAITKIND_NO_RESUMED.
4160 * server.c (report_no_resumed): New global.
4161 (handle_query) <qSupported>: Handle "no-resumed+". Report
4162 "no-resumed+" support.
4163 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4164 return error if the client doesn't support no-resumed events.
4165 (push_stop_notification): New function.
4166 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4167 events if the client supports them.
4169 2015-11-30 Pedro Alves <palves@redhat.com>
4171 * linux-low.c (thread_still_has_status_pending_p): Don't check
4173 (lwp_resumed): New function.
4174 (status_pending_p_callback): Return early if the LWP is not
4175 supposed to be resumed.
4177 2015-11-30 Pedro Alves <palves@redhat.com>
4179 * linux-low.c (handle_extended_wait): Assert that the LWP's
4180 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4181 thread create events, leave the new child's status pending.
4182 (linux_low_filter_event): If GDB wants to hear about thread exit
4183 events, leave the LWP marked dead and don't delete it.
4184 (linux_wait_for_event_filtered): Don't check for thread exit.
4185 (filter_exit_event): New function.
4186 (linux_wait_1): Use it, when returning an exit event.
4187 (linux_resume_one_lwp_throw): Assert that the LWP's
4188 waitstatus is TARGET_WAITKIND_IGNORE.
4189 * remote-utils.c (prepare_resume_reply): Handle
4190 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4191 * server.c (report_thread_events): New global.
4192 (handle_general_set): Handle QThreadEvents.
4193 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4194 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4195 TARGET_WAITKIND_THREAD_EXITED.
4196 * server.h (report_thread_events): Declare.
4198 2015-11-30 Pedro Alves <palves@redhat.com>
4200 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4201 the thread's last_resume_kind was resume_stop.
4203 2015-11-30 Pedro Alves <palves@redhat.com>
4205 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4208 2015-11-30 Pedro Alves <palves@redhat.com>
4210 * server.c (handle_v_requests): Handle vCtrlC.
4212 2015-11-30 Pedro Alves <palves@redhat.com>
4214 * gdbthread.h (find_any_thread_of_pid): Declare.
4215 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4217 * server.c (handle_query): If current_thread is NULL, look for
4218 another thread of the selected process.
4220 2015-11-26 Daniel Colascione <dancol@dancol.org>
4221 Simon Marchi <simon.marchi@ericsson.com>
4223 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4224 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4226 * target.h (struct target_ops) <thread_name>: New field.
4227 (target_thread_name): New macro.
4229 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4231 * regcache.h (regcache_invalidate_pid): Add declaration.
4232 * regcache.c (regcache_invalidate_pid): New function, extracted
4233 from regcache_invalidate.
4234 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4235 Add trivial documentation comment.
4236 * lynx-low.c: Use regcache_invalidate_pid instead of
4237 regcache_invalidate.
4239 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4241 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4242 and Elf64_auxv_t if the target is Android.
4244 2015-11-22 Doug Evans <xdje42@gmail.com>
4246 * target.h: #include <sys/types.h>.
4248 2015-11-19 Pedro Alves <palves@redhat.com>
4250 * linux-low.c (linux_process_qsupported): Change prototype.
4252 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4254 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4255 and adjust to loop over all features.
4256 * server.c (handle_query) <qSupported>: Adjust to call
4257 target_process_qsupported once, passing it a vector of unprocessed
4259 * target.h (struct target_ops) <process_qsupported>: Change
4261 (target_process_qsupported): Adjust.
4263 2015-11-19 Pedro Alves <palves@redhat.com>
4265 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4267 * configure: Regenerate.
4269 2015-11-19 Pedro Alves <palves@redhat.com>
4271 * configure: Regenerate.
4273 2015-11-19 Yao Qi <yao.qi@linaro.org>
4275 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4278 2015-11-19 Yao Qi <yao.qi@linaro.org>
4280 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4281 (struct aarch64_operand): Move enum out.
4283 2015-11-19 Yao Qi <yao.qi@linaro.org>
4285 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4286 struct user_fpsimd_state *.
4287 (aarch64_store_fpregset): Likewise.
4289 2015-11-19 Yao Qi <yao.qi@linaro.org>
4291 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4292 struct user_pt_regs *.
4293 (aarch64_store_gregset): Likewise.
4295 2015-11-18 Pedro Alves <palves@redhat.com>
4297 * Makefile.in (all_object_files): Add $IPA_OBJS.
4299 2015-11-17 Pedro Alves <palves@redhat.com>
4301 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4302 GDB_SIGNAL_0 and gdb_signal_to_string.
4304 2015-11-17 Pedro Alves <palves@redhat.com>
4306 * win32-low.c (handle_output_debug_string): Remove parameter.
4307 (win32_kill): Remove our_status local and adjust call to
4308 handle_output_debug_string.
4309 (get_child_debug_event): Adjust call to
4310 handle_output_debug_string.
4312 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4314 * linux-mips-low.c (mips_fill_gregset): Add cast.
4315 (mips_store_gregset): Likewise.
4316 (mips_fill_fpregset): Likewise.
4317 (mips_store_fpregset): Likewise.
4319 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4321 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4324 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4326 * linux-mips-low.c (mips_linux_new_thread): Change type of
4327 watch_type to enum target_hw_bp_type.
4329 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4331 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4332 Change return type to arm_hwbp_type.
4334 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4336 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4337 (arm_store_gregset): Likewise.
4338 * linux-arm-low.c (arm_get_hwcap): Likewise.
4339 (arm_read_description): Likewise.
4341 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4343 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4345 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4347 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4348 (ppc_fill_vsxregset): Likewise.
4349 (ppc_store_vsxregset): Likewise.
4350 (ppc_fill_vrregset): Likewise.
4351 (ppc_store_vrregset): Likewise.
4352 (ppc_fill_evrregset): Likewise.
4353 (ppc_store_evrregset): Likewise.
4355 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4357 * linux-ppc-low.c (ppc_usrregs_info): Remove
4358 forward-declaration.
4359 (ppc_arch_setup): Move lower in file.
4361 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4363 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4364 (ps_pdwrite): Likewise.
4366 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4368 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4369 to after assert checks.
4371 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4373 * proc-service.c (ps_pdread): Add/adjust casts.
4374 (ps_pdwrite): Add/adjust casts.
4376 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4378 * server.c (handle_search_memory_1): Cast return value of
4381 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4383 * server.c (write_qxfer_response): Change type of data to
4386 2015-10-29 Pedro Alves <palves@redhat.com>
4388 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4390 2015-10-29 Pedro Alves <palves@redhat.com>
4392 * tracepoint.c (clear_installed_tracepoints): Add casts.
4394 2015-10-29 Pedro Alves <palves@redhat.com>
4396 * server.c (handle_v_cont, process_serial_event): Add enum
4397 gdb_signal casts to signal parsing code.
4399 2015-10-29 Pedro Alves <palves@redhat.com>
4401 * linux-low.h (NULL_REGSET): Define.
4402 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4403 * linux-arm-low.c (arm_regsets): Likewise.
4404 * linux-crisv32-low.c (cris_regsets): Likewise.
4405 * linux-m68k-low.c (m68k_regsets): Likewise.
4406 * linux-mips-low.c (mips_regsets): Likewise.
4407 * linux-nios2-low.c (nios2_regsets): Likewise.
4408 * linux-ppc-low.c (ppc_regsets): Likewise.
4409 * linux-s390-low.c (s390_regsets): Likewise.
4410 * linux-sh-low.c (sh_regsets): Likewise.
4411 * linux-sparc-low.c (sparc_regsets): Likewise.
4412 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4413 * linux-tile-low.c (tile_regsets): Likewise.
4414 * linux-x86-low.c (x86_regsets): Likewise.
4415 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4417 2015-10-29 Pedro Alves <palves@redhat.com>
4419 * linux-low.h (NULL_REGSET): Define.
4420 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4421 * linux-arm-low.c (arm_regsets): Likewise.
4422 * linux-crisv32-low.c (cris_regsets): Likewise.
4423 * linux-m68k-low.c (m68k_regsets): Likewise.
4424 * linux-mips-low.c (mips_regsets): Likewise.
4425 * linux-nios2-low.c (nios2_regsets): Likewise.
4426 * linux-ppc-low.c (ppc_regsets): Likewise.
4427 * linux-s390-low.c (s390_regsets): Likewise.
4428 * linux-sh-low.c (sh_regsets): Likewise.
4429 * linux-sparc-low.c (sparc_regsets): Likewise.
4430 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4431 * linux-tile-low.c (tile_regsets): Likewise.
4432 * linux-x86-low.c (x86_regsets): Likewise.
4433 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4435 2015-10-26 Doug Evans <dje@google.com>
4437 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4439 2015-10-26 Doug Evans <dje@google.com>
4441 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4443 2015-10-26 Doug Evans <dje@google.com>
4445 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4447 (attach_thread, find_new_threads_callback): Ditto.
4449 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4451 * mem-break.h (set_breakpoint_data): Remove.
4453 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4455 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4456 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4457 (initialize_low): Remove set_breakpoint_data call.
4458 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4459 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4460 (initialize_low): Remove set_breakpoint_data call.
4461 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4462 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4463 (initialize_low): Remove set_breakpoint_data call.
4465 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4467 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4468 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4469 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4470 * target.h (target_breakpoint_kind_from_pc): New macro.
4472 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4474 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4475 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4476 the default breakpoint kind.
4478 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4480 * linux-arm-low.c (arm_supports_z_point_type): Add software
4483 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4485 * linux-arm-low.c: Refactor breakpoint definitions.
4486 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4487 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4489 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4491 * Makefile.in: Add arm.c/o.
4492 * configure.srv: Likewise.
4493 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4494 (arm_breakpoint_kind_from_pc): New function.
4495 (arm_sw_breakpoint_from_kind): Return proper kind.
4496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4498 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4500 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4502 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4503 (struct raw_breakpoint) <size>: Remove.
4504 (struct raw_breakpoint) <kind>: Add.
4505 (bp_size): New function.
4506 (bp_opcode): Likewise.
4507 (find_raw_breakpoint_at): Adjust for kind.
4508 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4509 (remove_memory_breakpoint): Adjust for kind call bp_size.
4510 (set_raw_breakpoint_at): Adjust for kind.
4511 (set_breakpoint): Likewise.
4512 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4513 (delete_raw_breakpoint): Adjust for kind.
4514 (delete_breakpoint): Likewise.
4515 (find_gdb_breakpoint): Likewise.
4516 (set_gdb_breakpoint_1): Likewise.
4517 (set_gdb_breakpoint): Likewise.
4518 (delete_gdb_breakpoint_1): Likewise.
4519 (delete_gdb_breakpoint): Likewise.
4520 (uninsert_raw_breakpoint): Likewise.
4521 (reinsert_raw_breakpoint): Likewise.
4522 (set_breakpoint_data): Remove.
4523 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4524 (check_mem_read): Adjust for kind call bp_size.
4525 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4526 (clone_one_breakpoint): Adjust for kind.
4527 * mem-break.h (set_gdb_breakpoint): Likewise.
4528 (delete_gdb_breakpoint): Likewise.
4529 * server.c (process_serial_event): Likewise.
4531 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4533 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4534 (struct linux_target_ops) <breakpoint>: Remove.
4535 (struct linux_target_ops) <breakpoint_len>: Remove.
4536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4538 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4539 (arm_sw_breakpoint_from_kind): New function.
4540 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4541 (struct linux_target_ops) <breakpoint>: Remove.
4542 (struct linux_target_ops) <breakpoint_len>: Remove.
4543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4545 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4546 (struct linux_target_ops) <breakpoint>: Remove.
4547 (struct linux_target_ops) <breakpoint_len>: Remove.
4548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4550 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4551 (struct linux_target_ops) <breakpoint>: Remove.
4552 (struct linux_target_ops) <breakpoint_len>: Remove.
4553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4555 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4556 and sw_breakpoint_from_kind to increment the pc.
4557 (linux_breakpoint_kind_from_pc): New function.
4558 (linux_sw_breakpoint_from_kind): New function.
4559 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4560 (initialize_low): Call breakpoint_kind_from_pc and
4561 sw_breakpoint_from_kind to replace breakpoint_data/len.
4562 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4564 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4565 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4566 (struct linux_target_ops) <breakpoint>: Remove.
4567 (struct linux_target_ops) <breakpoint_len>: Remove.
4568 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4569 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4570 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4571 (struct linux_target_ops) <breakpoint>: Remove.
4572 (struct linux_target_ops) <breakpoint_len>: Remove.
4573 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4574 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4575 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4576 (struct linux_target_ops) <breakpoint>: Remove.
4577 (struct linux_target_ops) <breakpoint_len>: Remove.
4578 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4579 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4580 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4581 (struct linux_target_ops) <breakpoint>: Remove.
4582 (struct linux_target_ops) <breakpoint_len>: Remove.
4583 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4584 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4585 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4586 (struct linux_target_ops) <breakpoint>: Remove.
4587 (struct linux_target_ops) <breakpoint_len>: Remove.
4588 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4589 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4590 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4591 (struct linux_target_ops) <breakpoint>: Remove.
4592 (struct linux_target_ops) <breakpoint_len>: Remove.
4593 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4594 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4595 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4596 (struct linux_target_ops) <breakpoint>: Remove.
4597 (struct linux_target_ops) <breakpoint_len>: Remove.
4598 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4599 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4600 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4601 (struct linux_target_ops) <breakpoint>: Remove.
4602 (struct linux_target_ops) <breakpoint_len>: Remove.
4603 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4604 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4605 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4606 (struct linux_target_ops) <breakpoint>: Remove.
4607 (struct linux_target_ops) <breakpoint_len>: Remove.
4608 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4609 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4610 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4611 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4612 (struct linux_target_ops) <breakpoint>: Remove.
4613 (struct linux_target_ops) <breakpoint_len>: Remove.
4614 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4615 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4616 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4617 (struct linux_target_ops) <breakpoint>: Remove.
4618 (struct linux_target_ops) <breakpoint_len>: Remove.
4619 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4620 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4622 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4624 * linux-cris-low.c (cris_get_pc): Remove void arg.
4626 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4628 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4631 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4633 * inferiors.c (thread_pid_matches_callback): New function.
4634 (find_thread_process): New function.
4635 (remove_thread): Reset current_thread.
4636 (remove_process): Assert threads have been removed first.
4638 2015-10-15 Yao Qi <yao.qi@linaro.org>
4640 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4642 (aarch64_remove_point): Likewise.
4643 * regcache.c (regcache_register_size): New function.
4645 2015-10-12 Yao Qi <yao.qi@linaro.org>
4647 * linux-aarch64-low.c: Update all callers as emit_load_store
4648 is renamed to aarch64_emit_load_store.
4650 2015-10-12 Yao Qi <yao.qi@linaro.org>
4652 * linux-aarch64-low.c: Update all callers of function renaming
4653 from emit_insn to aarch64_emit_insn.
4655 2015-10-12 Yao Qi <yao.qi@linaro.org>
4657 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4658 arch/aarch64-insn.h.
4659 (struct aarch64_memory_operand): Likewise.
4661 (emit_insn): Move to arch/aarch64-insn.c.
4662 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4663 (emit_load_store): Move to arch/aarch64-insn.c.
4664 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4665 (can_encode_int32): Remove.
4667 2015-10-12 Yao Qi <yao.qi@linaro.org>
4669 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4670 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4671 (aarch64_relocate_instruction): Likewise.
4672 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4673 (struct aarch64_insn_visitor): Likewise.
4675 2015-10-12 Yao Qi <yao.qi@linaro.org>
4677 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4678 (struct aarch64_insn_visitor): New.
4679 (struct aarch64_insn_relocation_data): New.
4680 (aarch64_ftrace_insn_reloc_b): New function.
4681 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4682 (aarch64_ftrace_insn_reloc_cb): Likewise.
4683 (aarch64_ftrace_insn_reloc_tb): Likewise.
4684 (aarch64_ftrace_insn_reloc_adr): Likewise.
4685 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4686 (aarch64_ftrace_insn_reloc_others): Likewise.
4688 (aarch64_relocate_instruction): Use visitor.
4690 2015-10-12 Yao Qi <yao.qi@linaro.org>
4692 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4693 int. Add argument buf.
4694 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4695 aarch64_relocate_instruction.
4697 2015-10-12 Yao Qi <yao.qi@linaro.org>
4699 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4700 argument insn. Remove local variable insn. Don't call
4702 (aarch64_install_fast_tracepoint_jump_pad): Call
4705 2015-09-30 Yao Qi <yao.qi@linaro.org>
4707 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4708 (emit_load_store_pair): Likewise.
4710 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4712 * dll.c (match_dll): Add cast(s).
4713 (unloaded_dll): Likewise.
4714 * linux-low.c (second_thread_of_pid_p): Likewise.
4715 (delete_lwp_callback): Likewise.
4716 (count_events_callback): Likewise.
4717 (select_event_lwp_callback): Likewise.
4718 (linux_set_resume_request): Likewise.
4719 * server.c (accumulate_file_name_length): Likewise.
4720 (emit_dll_description): Likewise.
4721 (handle_qxfer_threads_worker): Likewise.
4722 (visit_actioned_threads): Likewise.
4723 * thread-db.c (any_thread_of): Likewise.
4724 * tracepoint.c (same_process_p): Likewise.
4725 (match_blocktype): Likewise.
4726 (build_traceframe_info_xml): Likewise.
4728 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4730 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4732 (gdb_unparse_agent_expr): Likewise.
4733 * hostio.c (require_data): Likewise.
4734 (handle_pread): Likewise.
4735 * linux-low.c (disable_regset): Likewise.
4736 (fetch_register): Likewise.
4737 (store_register): Likewise.
4738 (get_dynamic): Likewise.
4739 (linux_qxfer_libraries_svr4): Likewise.
4740 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4741 (set_fast_tracepoint_jump): Likewise.
4742 (uninsert_fast_tracepoint_jumps_at): Likewise.
4743 (reinsert_fast_tracepoint_jumps_at): Likewise.
4744 (validate_inserted_breakpoint): Likewise.
4745 (clone_agent_expr): Likewise.
4746 * regcache.c (init_register_cache): Likewise.
4747 * remote-utils.c (putpkt_binary_1): Likewise.
4748 (decode_M_packet): Likewise.
4749 (decode_X_packet): Likewise.
4750 (look_up_one_symbol): Likewise.
4751 (relocate_instruction): Likewise.
4752 (monitor_output): Likewise.
4753 * server.c (handle_search_memory): Likewise.
4754 (handle_qxfer_exec_file): Likewise.
4755 (handle_qxfer_libraries): Likewise.
4756 (handle_qxfer): Likewise.
4757 (handle_query): Likewise.
4758 (handle_v_cont): Likewise.
4759 (handle_v_run): Likewise.
4760 (captured_main): Likewise.
4761 * target.c (write_inferior_memory): Likewise.
4762 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4763 * tracepoint.c (init_trace_buffer): Likewise.
4764 (add_tracepoint_action): Likewise.
4765 (add_traceframe): Likewise.
4766 (add_traceframe_block): Likewise.
4767 (cmd_qtdpsrc): Likewise.
4768 (cmd_qtdv): Likewise.
4769 (cmd_qtstatus): Likewise.
4770 (response_source): Likewise.
4771 (response_tsv): Likewise.
4772 (cmd_qtnotes): Likewise.
4773 (gdb_collect): Likewise.
4774 (initialize_tracepoint): Likewise.
4776 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4778 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4779 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4780 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4782 (enum aarch64_condition_codes): New enum.
4783 (w0): New static global.
4786 (struct aarch64_memory_operand) <type>: New
4787 MEMORY_OPERAND_POSTINDEX type.
4788 (postindex_memory_operand): New helper function.
4789 (emit_ret): New function.
4790 (emit_load_store_pair): New function, factored out of emit_stp
4791 with support for MEMORY_OPERAND_POSTINDEX.
4792 (emit_stp): Rewrite using emit_load_store_pair.
4793 (emit_ldp): New function.
4794 (emit_load_store): Likewise.
4795 (emit_ldr): Mention post-index instruction in comment.
4796 (emit_ldrh): New function.
4797 (emit_ldrb): New function.
4798 (emit_ldrsw): Mention post-index instruction in comment.
4799 (emit_str): Likewise.
4800 (emit_subs): New function.
4801 (emit_cmp): Likewise.
4802 (emit_and): Likewise.
4803 (emit_orr): Likewise.
4804 (emit_orn): Likewise.
4805 (emit_eor): Likewise.
4806 (emit_mvn): Likewise.
4807 (emit_lslv): Likewise.
4808 (emit_lsrv): Likewise.
4809 (emit_asrv): Likewise.
4810 (emit_mul): Likewise.
4811 (emit_sbfm): Likewise.
4812 (emit_sbfx): Likewise.
4813 (emit_ubfm): Likewise.
4814 (emit_ubfx): Likewise.
4815 (emit_csinc): Likewise.
4816 (emit_cset): Likewise.
4817 (emit_nop): Likewise.
4818 (emit_ops_insns): New helper function.
4819 (emit_pop): Likewise.
4820 (emit_push): Likewise.
4821 (aarch64_emit_prologue): New function.
4822 (aarch64_emit_epilogue): Likewise.
4823 (aarch64_emit_add): Likewise.
4824 (aarch64_emit_sub): Likewise.
4825 (aarch64_emit_mul): Likewise.
4826 (aarch64_emit_lsh): Likewise.
4827 (aarch64_emit_rsh_signed): Likewise.
4828 (aarch64_emit_rsh_unsigned): Likewise.
4829 (aarch64_emit_ext): Likewise.
4830 (aarch64_emit_log_not): Likewise.
4831 (aarch64_emit_bit_and): Likewise.
4832 (aarch64_emit_bit_or): Likewise.
4833 (aarch64_emit_bit_xor): Likewise.
4834 (aarch64_emit_bit_not): Likewise.
4835 (aarch64_emit_equal): Likewise.
4836 (aarch64_emit_less_signed): Likewise.
4837 (aarch64_emit_less_unsigned): Likewise.
4838 (aarch64_emit_ref): Likewise.
4839 (aarch64_emit_if_goto): Likewise.
4840 (aarch64_emit_goto): Likewise.
4841 (aarch64_write_goto_address): Likewise.
4842 (aarch64_emit_const): Likewise.
4843 (aarch64_emit_call): Likewise.
4844 (aarch64_emit_reg): Likewise.
4845 (aarch64_emit_pop): Likewise.
4846 (aarch64_emit_stack_flush): Likewise.
4847 (aarch64_emit_zero_ext): Likewise.
4848 (aarch64_emit_swap): Likewise.
4849 (aarch64_emit_stack_adjust): Likewise.
4850 (aarch64_emit_int_call_1): Likewise.
4851 (aarch64_emit_void_call_2): Likewise.
4852 (aarch64_emit_eq_goto): Likewise.
4853 (aarch64_emit_ne_goto): Likewise.
4854 (aarch64_emit_lt_goto): Likewise.
4855 (aarch64_emit_le_goto): Likewise.
4856 (aarch64_emit_gt_goto): Likewise.
4857 (aarch64_emit_ge_got): Likewise.
4858 (aarch64_emit_ops_impl): New static global variable.
4859 (aarch64_emit_ops): New target function, return
4860 &aarch64_emit_ops_impl.
4861 (struct linux_target_ops): Install it.
4863 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4865 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4866 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4868 * linux-aarch64-ipa.c: New file.
4869 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4871 (aarch64_get_thread_area): New target method.
4872 (extract_signed_bitfield): New helper function.
4873 (aarch64_decode_ldr_literal): New function.
4874 (enum aarch64_opcodes): New enum.
4875 (struct aarch64_register): New struct.
4876 (struct aarch64_operand): New struct.
4877 (x0): New static global.
4886 (aarch64_register): New helper function.
4887 (register_operand): Likewise.
4888 (immediate_operand): Likewise.
4889 (struct aarch64_memory_operand): New struct.
4890 (offset_memory_operand): New helper function.
4891 (preindex_memory_operand): Likewise.
4892 (enum aarch64_system_control_registers): New enum.
4893 (ENCODE): New macro.
4894 (emit_insn): New helper function.
4895 (emit_b): New function.
4896 (emit_bcond): Likewise.
4897 (emit_cb): Likewise.
4898 (emit_tb): Likewise.
4899 (emit_blr): Likewise.
4900 (emit_stp): Likewise.
4901 (emit_ldp_q_offset): Likewise.
4902 (emit_stp_q_offset): Likewise.
4903 (emit_load_store): Likewise.
4904 (emit_ldr): Likewise.
4905 (emit_ldrsw): Likewise.
4906 (emit_str): Likewise.
4907 (emit_ldaxr): Likewise.
4908 (emit_stxr): Likewise.
4909 (emit_stlr): Likewise.
4910 (emit_data_processing_reg): Likewise.
4911 (emit_data_processing): Likewise.
4912 (emit_add): Likewise.
4913 (emit_sub): Likewise.
4914 (emit_mov): Likewise.
4915 (emit_movk): Likewise.
4916 (emit_mov_addr): Likewise.
4917 (emit_mrs): Likewise.
4918 (emit_msr): Likewise.
4919 (emit_sevl): Likewise.
4920 (emit_wfe): Likewise.
4921 (append_insns): Likewise.
4922 (can_encode_int32_in): New helper function.
4923 (aarch64_relocate_instruction): New function.
4924 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4925 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4926 (struct linux_target_ops): Install aarch64_get_thread_area,
4927 aarch64_install_fast_tracepoint_jump_pad and
4928 aarch64_get_min_fast_tracepoint_insn_len.
4930 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4932 * Makefile.in (aarch64-insn.o): New rule.
4933 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4935 2015-09-21 Yao Qi <yao.qi@linaro.org>
4937 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4939 2015-09-21 Yao Qi <yao.qi@linaro.org>
4941 * tracepoint.c (max_jump_pad_size): Remove.
4943 2015-09-18 Yao Qi <yao.qi@linaro.org>
4945 * linux-aarch64-low.c: Don't include sys/uio.h.
4946 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4948 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4950 * tracepoint.c (eval_result_type): Change prototype.
4951 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4953 2015-09-15 Pedro Alves <palves@redhat.com>
4955 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4956 Check whether to report exec events instead of checking whether
4957 multiprocess is enabled.
4959 2015-09-15 Pedro Alves <palves@redhat.com>
4962 * remote-utils.c (prepare_resume_reply): Merge
4963 TARGET_WAITKIND_VFORK_DONE switch case with the
4964 TARGET_WAITKIND_FORKED case.
4966 2015-09-15 Yao Qi <yao.qi@linaro.org>
4968 * server.c (handle_query): Check string comparison using
4969 "else if" instead of "if".
4971 2015-09-15 Yao Qi <yao.qi@linaro.org>
4973 * server.c (vCont_supported): New global variable.
4974 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4975 matches. Append ";vContSupported+" to own_buf.
4976 (handle_v_requests): Append ";s;S" to own_buf if target supports
4977 hardware single step or vCont_supported is false.
4978 (capture_main): Set vCont_supported to zero.
4980 2015-09-15 Yao Qi <yao.qi@linaro.org>
4982 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4984 (linux_supports_hardware_single_step): ... New function.
4985 (linux_target_ops): Update.
4986 * lynx-low.c (lynx_target_ops): Set field
4987 supports_hardware_single_step to target_can_do_hardware_single_step.
4988 * nto-low.c (nto_target_ops): Likewise.
4989 * spu-low.c (spu_target_ops): Likewise.
4990 * win32-low.c (win32_target_ops): Likewise.
4991 * target.c (target_can_do_hardware_single_step): New function.
4992 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4993 Remove. <supports_hardware_single_step>: New field.
4994 (target_supports_conditional_breakpoints): Remove.
4995 (target_supports_hardware_single_step): New macro.
4996 (target_can_do_hardware_single_step): Declare.
4997 * server.c (handle_query): Use target_supports_hardware_single_step
4998 instead of target_supports_conditional_breakpoints.
5000 2015-09-15 Yao Qi <yao.qi@linaro.org>
5002 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5004 (struct linux_target_ops the_low_target): Install
5005 aarch64_linux_siginfo_fixup.
5007 2015-09-11 Don Breazeal <donb@codesourcery.com>
5008 Luis Machado <lgustavo@codesourcery.com>
5010 * linux-low.c (linux_mourn): Static declaration.
5011 (linux_arch_setup): Move in front of
5012 handle_extended_wait.
5013 (linux_arch_setup_thread): New function.
5014 (handle_extended_wait): Handle exec events. Call
5015 linux_arch_setup_thread. Make event_lwp argument a
5016 pointer-to-a-pointer.
5017 (check_zombie_leaders): Do not check stopped threads.
5018 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5019 (linux_low_filter_event): Add lwp and thread for exec'ing
5020 non-leader thread if leader thread has been deleted.
5021 Refactor code into linux_arch_setup_thread and call it.
5022 Pass child lwp pointer by reference to handle_extended_wait.
5023 (linux_wait_for_event_filtered): Update comment.
5024 (linux_wait_1): Prevent clobbering exec event status.
5025 (linux_supports_exec_events): New function.
5026 (linux_target_ops) <supports_exec_events>: Initialize new member.
5027 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5029 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5030 * server.c (report_exec_events): New global variable.
5031 (handle_query): Handle qSupported query for exec-events feature.
5032 (captured_main): Initialize report_exec_events.
5033 * server.h (report_exec_events): Declare new global variable.
5034 * target.h (struct target_ops) <supports_exec_events>: New
5036 (target_supports_exec_events): New macro.
5037 * win32-low.c (win32_target_ops) <supports_exec_events>:
5038 Initialize new member.
5040 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5042 * linux-low.c (linux_low_enable_btrace): Remove.
5043 (linux_target_ops): Replace linux_low_enable_btrace with
5044 linux_enable_btrace.
5046 2015-09-03 Yao Qi <yao.qi@linaro.org>
5048 * linux-aarch64-low.c (aarch64_insert_point): Call
5049 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5052 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5054 * linux-low.c (check_stopped_by_breakpoint): Use
5055 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5057 2015-08-27 Pedro Alves <palves@redhat.com>
5059 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5061 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5063 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5064 the XNEW-family equivalent.
5065 (compile_bytecodes): Likewise.
5066 * dll.c (loaded_dll): Likewise.
5067 * event-loop.c (append_callback_event): Likewise.
5068 (create_file_handler): Likewise.
5069 (create_file_event): Likewise.
5070 * hostio.c (handle_open): Likewise.
5071 * inferiors.c (add_thread): Likewise.
5072 (add_process): Likewise.
5073 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5074 * linux-arm-low.c (arm_new_process): Likewise.
5075 (arm_new_thread): Likewise.
5076 * linux-low.c (add_to_pid_list): Likewise.
5077 (linux_add_process): Likewise.
5078 (handle_extended_wait): Likewise.
5079 (add_lwp): Likewise.
5080 (enqueue_one_deferred_signal): Likewise.
5081 (enqueue_pending_signal): Likewise.
5082 (linux_resume_one_lwp_throw): Likewise.
5083 (linux_resume_one_thread): Likewise.
5084 (linux_read_memory): Likewise.
5085 (linux_write_memory): Likewise.
5086 * linux-mips-low.c (mips_linux_new_process): Likewise.
5087 (mips_linux_new_thread): Likewise.
5088 (mips_add_watchpoint): Likewise.
5089 * linux-x86-low.c (initialize_low_arch): Likewise.
5090 * lynx-low.c (lynx_add_process): Likewise.
5091 * mem-break.c (set_raw_breakpoint_at): Likewise.
5092 (set_breakpoint): Likewise.
5093 (add_condition_to_breakpoint): Likewise.
5094 (add_commands_to_breakpoint): Likewise.
5095 (clone_agent_expr): Likewise.
5096 (clone_one_breakpoint): Likewise.
5097 * regcache.c (new_register_cache): Likewise.
5098 * remote-utils.c (look_up_one_symbol): Likewise.
5099 * server.c (queue_stop_reply): Likewise.
5100 (start_inferior): Likewise.
5101 (queue_stop_reply_callback): Likewise.
5102 (handle_target_event): Likewise.
5103 * spu-low.c (fetch_ppc_memory): Likewise.
5104 (store_ppc_memory): Likewise.
5105 * target.c (set_target_ops): Likewise.
5106 * thread-db.c (thread_db_load_search): Likewise.
5107 (try_thread_db_load_1): Likewise.
5108 * tracepoint.c (add_tracepoint): Likewise.
5109 (add_tracepoint_action): Likewise.
5110 (create_trace_state_variable): Likewise.
5111 (cmd_qtdpsrc): Likewise.
5112 (cmd_qtro): Likewise.
5113 (add_while_stepping_state): Likewise.
5114 * win32-low.c (child_add_thread): Likewise.
5115 (get_image_name): Likewise.
5117 2015-08-25 Yao Qi <yao.qi@linaro.org>
5119 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5121 2015-08-25 Yao Qi <yao.qi@linaro.org>
5123 * Makefile.in (aarch64-linux.o): New rule.
5124 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5126 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5127 (aarch64_init_debug_reg_state): Make it extern.
5128 (aarch64_linux_prepare_to_resume): Remove.
5130 2015-08-25 Yao Qi <yao.qi@linaro.org>
5132 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5133 lwp_arch_private_info and ptid_of_lwp.
5135 2015-08-25 Yao Qi <yao.qi@linaro.org>
5137 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5138 Find proc_info by find_process_pid. All callers updated.
5140 2015-08-25 Yao Qi <yao.qi@linaro.org>
5142 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5144 (debug_reg_change_callback): Remove.
5145 (aarch64_notify_debug_reg_change): Remove.
5147 2015-08-25 Yao Qi <yao.qi@linaro.org>
5149 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5150 Call current_lwp_ptid.
5152 2015-08-25 Yao Qi <yao.qi@linaro.org>
5154 * linux-aarch64-low.c (debug_reg_change_callback): Use
5157 2015-08-25 Yao Qi <yao.qi@linaro.org>
5159 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5161 2015-08-25 Yao Qi <yao.qi@linaro.org>
5163 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5165 2015-08-25 Yao Qi <yao.qi@linaro.org>
5167 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5170 2015-08-25 Yao Qi <yao.qi@linaro.org>
5172 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5174 (debug_reg_change_callback): Remove argument entry and add argument
5175 lwp. Remove local variable thread. Don't print thread id in the
5176 debugging output. Don't check whether pid of thread equals to pid.
5177 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5178 iterate_over_lwps instead find_inferior.
5180 2015-08-24 Pedro Alves <palves@redhat.com>
5182 * inferiors.c (get_first_process): New function.
5183 * inferiors.h (get_first_process): New declaration.
5184 * remote-utils.c (read_ptid): Default to the first process in the
5185 list, instead of to the current thread's process.
5187 2015-08-24 Pedro Alves <palves@redhat.com>
5189 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5190 * event-loop.c: Likewise.
5191 * remote-utils.c: Likewise.
5192 * tracepoint.c: Likewise.
5194 2015-08-24 Pedro Alves <palves@redhat.com>
5196 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5199 2015-08-21 Pedro Alves <palves@redhat.com>
5201 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5202 instead of literal 1.
5204 2015-08-21 Pedro Alves <palves@redhat.com>
5206 * tdesc.c (default_description): Explicitly zero-initialize.
5208 2015-08-21 Pedro Alves <palves@redhat.com>
5211 * inferiors.c (remove_thread): Discard any pending stop reply for
5213 * server.c (remove_all_on_match_pid): Rename to ...
5214 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5216 (discard_queued_stop_replies): Change parameter to a ptid. Now
5218 (handle_v_kill, kill_inferior_callback, captured_main)
5219 (process_serial_event): Adjust.
5220 * server.h (discard_queued_stop_replies): Declare.
5222 2015-08-21 Pedro Alves <palves@redhat.com>
5224 * linux-low.c (wait_for_sigstop): Always switch to no thread
5225 selected if the previously current thread dies.
5226 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5227 process instead of the current thread's.
5228 * remote-utils.c (input_interrupt): Don't check if there's no
5230 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5231 current thread to the general thread fails, error out.
5232 (handle_qxfer_auxv, handle_qxfer_libraries)
5233 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5234 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5235 (handle_query): Check if there's a thread selected instead of
5236 checking whether there's any thread in the thread list.
5237 (handle_qxfer_threads, handle_qxfer_btrace)
5238 (handle_qxfer_btrace_conf): Don't error out early if there's no
5239 thread in the thread list.
5240 (handle_v_cont, myresume): Don't set the current thread to the
5242 (process_serial_event) <Hg handling>: Also set thread_id if the
5243 previous general thread is still alive.
5244 (process_serial_event) <g/G handling>: If setting the current
5245 thread to the general thread fails, error out.
5246 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5247 thread's lwp instead of the current thread's.
5248 * target.c (set_desired_thread): If the desired thread was not
5249 found, leave the current thread pointing to NULL. Return an int
5250 (boolean) indicating success.
5251 * target.h (set_desired_thread): Change return type to int.
5253 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5255 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5256 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5258 (ps_get_thread_area): New function.
5260 2015-08-19 Gary Benson <gbenson@redhat.com>
5262 * hostio.c (handle_pread): Do not attempt to read more data
5263 than hostio_reply_with_data can fit in a packet.
5265 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5267 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5269 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5271 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5273 2015-08-06 Pedro Alves <palves@redhat.com>
5275 * tracepoint.c (expr_eval_result): Now an int.
5277 2015-08-06 Pedro Alves <palves@redhat.com>
5279 * gdbthread.h (struct regcache): Forward declare.
5280 (struct thread_info) <regcache_data>: Now a struct regcache
5282 * inferiors.c (inferior_regcache_data)
5283 (set_inferior_regcache_data): Now work with struct regcache
5285 * inferiors.h (struct regcache): Forward declare.
5286 (inferior_regcache_data, set_inferior_regcache_data): Now work
5287 with struct regcache pointers.
5288 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5289 (free_register_cache_thread): Remove struct regcache pointer
5292 2015-08-06 Pedro Alves <palves@redhat.com>
5294 * server.c (captured_main): On error, print the exception message
5295 to stderr, and if run_once is set, throw a quit.
5297 2015-08-06 Pedro Alves <palves@redhat.com>
5299 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5302 2015-08-06 Pedro Alves <palves@redhat.com>
5304 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5305 reading beyond the passed in buffer length.
5307 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5309 * tracepoint.c (symbol_list) <required>: Remove.
5311 2015-08-06 Pedro Alves <palves@redhat.com>
5313 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5314 count if stopping and suspending threads.
5315 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5316 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5317 (linux_detach): Complete an ongoing step-over.
5318 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5320 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5321 (linux_wait_1): If passing a signal to the inferior after
5322 finishing a step-over, unsuspend and re-resume all lwps. If we
5323 see a single-step event but the thread should be continuing, don't
5324 pass the trap to gdb.
5325 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5326 internal_error instead of gdb_assert.
5327 (enqueue_pending_signal): New function.
5328 (check_ptrace_stopped_lwp_gone): Add debug output.
5329 (start_step_over): Use internal_error instead of gdb_assert.
5330 (complete_ongoing_step_over): New function.
5331 (linux_resume_one_thread): Don't resume a suspended thread.
5332 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5335 2015-08-06 Pedro Alves <palves@redhat.com>
5337 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5338 (linux_thread_alive): Use lwp_is_marked_dead.
5339 (extended_event_reported): Delete.
5340 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5341 instead of extended_event_reported.
5342 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5344 (lwp_is_marked_dead): New function.
5345 (lwp_running): Use lwp_is_marked_dead.
5346 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5349 2015-08-06 Pedro Alves <palves@redhat.com>
5351 * linux-low.c (linux_wait_1): Move fork event output out of the
5352 !report_to_gdb check. Pass event_child->waitstatus to
5353 target_waitstatus_to_string instead of ourstatus.
5355 2015-08-04 Yao Qi <yao.qi@linaro.org>
5357 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5358 if current_thread is 32 bit.
5360 2015-08-04 Yao Qi <yao.qi@linaro.org>
5362 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5363 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5364 * server.c (extended_protocol): Remove "static".
5365 * server.h (extended_protocol): Declare it.
5367 2015-08-04 Yao Qi <yao.qi@linaro.org>
5369 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5370 both aarch64 and aarch32.
5371 (aarch64_set_pc): Likewise.
5373 2015-08-04 Yao Qi <yao.qi@linaro.org>
5375 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5376 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5377 arm-with-neon.xml to srv_xmlfiles.
5378 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5379 (is_64bit_tdesc): New function.
5380 (aarch64_linux_read_description): New function.
5381 (aarch64_arch_setup): Call aarch64_linux_read_description.
5382 (regs_info): Rename to regs_info_aarch64.
5383 (aarch64_regs_info): Return right regs_info.
5384 (initialize_low_arch): Call initialize_low_arch_aarch32.
5386 2015-08-04 Yao Qi <yao.qi@linaro.org>
5388 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5389 * linux-aarch32-low.c: New file.
5390 * linux-aarch32-low.h: New file.
5391 * linux-arm-low.c (arm_fill_gregset): Move it to
5392 linux-aarch32-low.c.
5393 (arm_store_gregset): Likewise.
5394 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5395 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5396 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5397 (regs_info): Rename to regs_info_arm.
5398 (arm_regs_info): Return regs_info_aarch32 if
5399 have_ptrace_getregset is 1 and target description is
5400 arm_with_neon or arm_with_vfpv3.
5401 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5402 Call initialize_low_arch_aarch32 instead.
5404 2015-08-04 Yao Qi <yao.qi@linaro.org>
5406 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5407 * linux-low.c: ... here.
5408 * linux-low.h (have_ptrace_getregset): Declare it.
5410 2015-08-04 Pedro Alves <palves@redhat.com>
5412 * thread-db.c (struct thread_db): Use new typedefs.
5413 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5415 (disable_thread_event_reporting): Cast result of dlsym to
5416 destination function pointer type.
5417 (thread_db_mourn): Use td_ta_delete_ftype.
5419 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5421 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5423 (CDX_BREAKPOINT): Define for R2.
5424 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5425 (the_low_target): Add comments.
5427 2015-07-30 Yao Qi <yao.qi@linaro.org>
5429 * linux-arm-low.c (arm_hwcap): Remove it.
5430 (arm_read_description): New local variable arm_hwcap. Don't
5431 set arm_hwcap to zero.
5433 2015-07-30 Yao Qi <yao.qi@linaro.org>
5435 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5436 Use regcache->tdesc instead.
5437 (arm_store_wmmxregset): Likewise.
5438 (arm_fill_vfpregset): Likewise.
5439 (arm_store_vfpregset): Likewise.
5441 2015-07-30 Yao Qi <yao.qi@linaro.org>
5443 * linux-arm-low.c: Include arch/arm.h.
5444 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5445 (arm_store_gregset): Likewise.
5447 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5449 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5450 ptrace's 4th parameter.
5452 2015-07-27 Yao Qi <yao.qi@linaro.org>
5454 * configure.srv (case aarch64*-*-linux*): Don't set
5457 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5459 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5461 * linux-arm-low.c: Likewise.
5462 * linux-cris-low.c: Likewise.
5463 * linux-crisv32-low.c: Likewise.
5464 * linux-low.c: Likewise.
5465 * linux-m68k-low.c: Likewise.
5466 * linux-mips-low.c: Likewise.
5467 * linux-nios2-low.c: Likewise.
5468 * linux-s390-low.c: Likewise.
5469 * linux-sparc-low.c: Likewise.
5470 * linux-tic6x-low.c: Likewise.
5471 * linux-tile-low.c: Likewise.
5472 * linux-x86-low.c: Likewise.
5474 2015-07-24 Pedro Alves <palves@redhat.com>
5476 * config.in: Regenerate.
5477 * configure: Regenerate.
5479 2015-07-24 Pedro Alves <palves@redhat.com>
5481 * acinclude.m4: Include ../ptrace.m4.
5482 * configure.ac: Call GDB_AC_PTRACE.
5483 * config.in, configure: Regenerate.
5485 2015-07-24 Yao Qi <yao.qi@linaro.org>
5487 * linux-low.c (linux_create_inferior): Remove setting to
5488 proc->priv->new_inferior.
5489 (linux_attach): Likewise.
5490 (linux_low_filter_event): Likewise.
5491 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5493 2015-07-24 Yao Qi <yao.qi@linaro.org>
5495 * linux-low.c (linux_arch_setup): New function.
5496 (linux_low_filter_event): If proc->tdesc is NULL and
5497 proc->attached is true, call the_low_target.arch_setup.
5498 Otherwise, keep status pending, and return.
5499 (linux_resume_one_lwp_throw): Don't call get_pc if
5500 thread->while_stepping isn't NULL. Don't call
5501 get_thread_regcache if proc->tdesc is NULL.
5502 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5503 (linux_target_ops): Install arch_setup.
5504 * server.c (start_inferior): Call the_target->arch_setup.
5505 * target.h (struct target_ops) <arch_setup>: New field.
5506 (target_arch_setup): New marco.
5507 * lynx-low.c (lynx_target_ops): Update.
5508 * nto-low.c (nto_target_ops): Update.
5509 * spu-low.c (spu_target_ops): Update.
5510 * win32-low.c (win32_target_ops): Update.
5512 2015-07-24 Yao Qi <yao.qi@linaro.org>
5514 * linux-low.c (linux_add_process): Don't set
5515 proc->priv->new_inferior.
5516 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5517 (linux_attach): Likewise.
5519 2015-07-24 Yao Qi <yao.qi@linaro.org>
5521 * server.c (start_inferior): Code refactor.
5523 2015-07-24 Yao Qi <yao.qi@linaro.org>
5525 * server.c (process_serial_event): Set general_thread.
5527 2015-07-21 Yao Qi <yao.qi@linaro.org>
5529 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5530 aarch64_linux_get_debug_reg_capacity.
5532 2015-07-17 Yao Qi <yao.qi@linaro.org>
5534 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5535 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5536 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5537 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5538 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5539 (AARCH64_HWP_ALIGNMENT): Likewise.
5540 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5541 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5542 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5543 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5544 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5545 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5546 (struct aarch64_debug_reg_state): Likewise.
5547 (struct arch_lwp_info): Likewise.
5548 (aarch64_align_watchpoint): Likewise.
5549 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5550 (aarch64_watchpoint_length): Likewise.
5551 (aarch64_point_encode_ctrl_reg): Likewise
5552 (aarch64_point_is_aligned): Likewise.
5553 (aarch64_align_watchpoint): Likewise.
5554 (aarch64_linux_set_debug_regs):
5555 (aarch64_dr_state_insert_one_point): Likewise.
5556 (aarch64_dr_state_remove_one_point): Likewise.
5557 (aarch64_handle_breakpoint): Likewise.
5558 (aarch64_handle_aligned_watchpoint): Likewise.
5559 (aarch64_handle_unaligned_watchpoint): Likewise.
5560 (aarch64_handle_watchpoint): Likewise.
5562 2015-07-17 Yao Qi <yao.qi@linaro.org>
5564 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5565 and don't aarch64_get_debug_reg_state. All callers update.
5566 (aarch64_handle_aligned_watchpoint): Likewise.
5567 (aarch64_handle_unaligned_watchpoint): Likewise.
5568 (aarch64_handle_watchpoint): Likewise.
5569 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5570 (aarch64_remove_point): Likewise.
5572 2015-07-17 Yao Qi <yao.qi@linaro.org>
5574 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5576 (aarch64_handle_unaligned_watchpoint): Likewise.
5578 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5580 Revert the previous 3 commits:
5581 Move gdb_regex* to common/
5582 Move linux_find_memory_regions_full & co.
5583 gdbserver build-id attribute generator
5585 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5586 Jan Kratochvil <jan.kratochvil@redhat.com>
5588 gdbserver build-id attribute generator.
5589 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5590 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5591 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5593 (get_dynamic): Use find_pdhr to traverse program headers.
5594 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5595 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5596 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5597 (get_hex_build_id): New.
5598 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5599 to reply XML document.
5601 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5602 Jan Kratochvil <jan.kratochvil@redhat.com>
5604 * target.c: Include target/target-utils.h and fcntl.h.
5605 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5606 (target_fileio_read_stralloc): New functions.
5608 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5610 * Makefile.in (OBS): Add gdb_regex.o.
5612 * config.in: Rebuilt.
5613 * configure: Rebuilt.
5615 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5616 Jan Kratochvil <jan.kratochvil@redhat.com>
5618 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5619 * Makefile.in (OBS): Add target-utils.o.
5620 (linux-maps.o, target-utils.o): New.
5621 * configure.srv (srv_linux_obj): Add linux-maps.o.
5623 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5625 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5627 (the_low_target): Install it.
5629 2015-07-14 Pedro Alves <palves@redhat.com>
5631 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5632 Instead, ignore ECHILD, and throw an error for other errnos.
5634 2015-07-10 Pedro Alves <palves@redhat.com>
5636 * event-loop.c (struct callback_event) <data>: Change type to
5637 gdb_client_data instance instead of gdb_client_data pointer.
5638 (append_callback_event): Adjust.
5640 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5642 * linux-aarch64-low.c: Add comments for each linux_target_ops
5643 method. Remove comments already covered in target_ops and
5644 linux_target_ops definitions.
5645 (the_low_target): Add comments for each unimplemented method.
5647 2015-07-09 Yao Qi <yao.qi@linaro.org>
5649 * linux-aarch64-low.c (aarch64_regmap): Remove.
5650 (aarch64_usrregs_info): Remove.
5651 (regs_info): Set field usrregs to NULL.
5653 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5655 * linux-low.c: Include "rsp-low.h"
5656 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5657 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5658 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5659 (handle_btrace_enable_pt): New.
5660 (handle_btrace_general_set): Support "pt".
5661 (handle_btrace_conf_general_set): Support "pt:size".
5663 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5665 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5668 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5670 * linux-aarch64-low.c: Remove comment about endianness.
5671 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5672 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5675 2015-06-24 Gary Benson <gbenson@redhat.com>
5677 * linux-i386-ipa.c (stdint.h): Do not include.
5678 * lynx-i386-low.c (stdint.h): Likewise.
5679 * lynx-ppc-low.c (stdint.h): Likewise.
5680 * mem-break.c (stdint.h): Likewise.
5681 * thread-db.c (stdint.h): Likewise.
5682 * tracepoint.c (stdint.h): Likewise.
5683 * win32-low.c (stdint.h): Likewise.
5685 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5687 * server.c (write_qxfer_response): Update call to
5688 remote_escape_output.
5690 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5691 Jan Kratochvil <jan.kratochvil@redhat.com>
5693 Merge multiple hex conversions.
5694 * gdbreplay.c (tohex): Rename to 'fromhex'.
5695 (logchar): Use fromhex.
5697 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5699 * server.c (handle_qxfer_libraries): Set `version' attribute for
5702 2015-06-10 Gary Benson <gbenson@redhat.com>
5704 * target.h (struct target_ops) <multifs_open>: New field.
5705 <multifs_unlink>: Likewise.
5706 <multifs_readlink>: Likewise.
5707 * linux-low.c (nat/linux-namespaces.h): New include.
5708 (linux_target_ops): Initialize the_target->multifs_open,
5709 the_target->multifs_unlink and the_target->multifs_readlink.
5710 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5711 * hostio.c (hostio_fs_pid): New static variable.
5712 (hostio_handle_new_gdb_connection): New function.
5713 (handle_setfs): Likewise.
5714 (handle_open): Use the_target->multifs_open as appropriate.
5715 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5716 (handle_readlink): Use the_target->multifs_readlink as
5718 (handle_vFile): Handle vFile:setfs packets.
5719 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5720 after target_handle_new_gdb_connection.
5722 2015-06-10 Gary Benson <gbenson@redhat.com>
5724 * configure.ac (AC_CHECK_FUNCS): Add setns.
5725 * config.in: Regenerate.
5726 * configure: Likewise.
5727 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5728 (linux-namespaces.o): New rule.
5729 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5731 2015-06-09 Gary Benson <gbenson@redhat.com>
5733 * hostio.c (handle_open): Process mode argument with
5734 fileio_to_host_mode.
5736 2015-06-01 Yao Qi <yao.qi@linaro.org>
5738 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5739 * linux-x86-low.c: Likewise.
5741 2015-05-28 Don Breazeal <donb@codesourcery.com>
5743 * linux-low.c (handle_extended_wait): Initialize
5744 thread_info.last_resume_kind for new fork children.
5746 2015-05-15 Pedro Alves <palves@redhat.com>
5748 * target.h (target_handle_new_gdb_connection): Rewrite using if
5749 wrapped in do/while.
5751 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5753 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5754 * configure, config.in: Regenerate.
5755 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5758 2015-05-12 Don Breazeal <donb@codesourcery.com>
5760 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5761 PTRACE_EVENT_VFORK_DONE.
5762 (linux_low_ptrace_options, extended_event_reported): Add vfork
5764 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5765 and "vforkdone" for RSP 'T' Stop Reply Packet.
5766 * server.h (report_vfork_events): Declare
5769 2015-05-12 Don Breazeal <donb@codesourcery.com>
5771 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5772 (the_low_target) <new_fork>: Initialize new member.
5773 * linux-arm-low.c (arm_new_fork): New function.
5774 (the_low_target) <new_fork>: Initialize new member.
5775 * linux-low.c (handle_extended_wait): Call new target function
5777 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5778 * linux-mips-low.c (mips_add_watchpoint): New function
5779 extracted from mips_insert_point.
5780 (the_low_target) <new_fork>: Initialize new member.
5781 (mips_linux_new_fork): New function.
5782 (mips_insert_point): Call mips_add_watchpoint.
5783 * linux-x86-low.c (x86_linux_new_fork): New function.
5784 (the_low_target) <new_fork>: Initialize new member.
5786 2015-05-12 Don Breazeal <donb@codesourcery.com>
5788 * linux-low.c (handle_extended_wait): Implement return value,
5789 rename argument 'event_child' to 'event_lwp', handle
5790 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5791 (linux_low_ptrace_options): New function.
5792 (linux_low_filter_event): Call linux_low_ptrace_options,
5793 use different argument fo linux_enable_event_reporting,
5794 use return value from handle_extended_wait.
5795 (extended_event_reported): New function.
5796 (linux_wait_1): Call extended_event_reported and set
5797 status to report fork events.
5798 (linux_write_memory): Add pid to debug message.
5799 (reset_lwp_ptrace_options_callback): New function.
5800 (linux_handle_new_gdb_connection): New function.
5801 (linux_target_ops): Initialize new structure member.
5802 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5803 * lynx-low.c: Initialize new structure member.
5804 * remote-utils.c (prepare_resume_reply): Implement stop reason
5805 "fork" for "T" stop message.
5806 * server.c (handle_query): Call handle_new_gdb_connection.
5807 * server.h (report_fork_events): Declare global flag.
5808 * target.h (struct target_ops) <handle_new_gdb_connection>:
5810 (target_handle_new_gdb_connection): New macro.
5811 * win32-low.c: Initialize new structure member.
5813 2015-05-12 Don Breazeal <donb@codesourcery.com>
5815 * mem-break.c (APPEND_TO_LIST): Define macro.
5816 (clone_agent_expr): New function.
5817 (clone_one_breakpoint): New function.
5818 (clone_all_breakpoints): New function.
5819 * mem-break.h: Declare new functions.
5821 2015-05-12 Don Breazeal <donb@codesourcery.com>
5823 * linux-low.c (linux_supports_fork_events): New function.
5824 (linux_supports_vfork_events): New function.
5825 (linux_target_ops): Initialize new structure members.
5826 (initialize_low): Call linux_check_ptrace_features.
5827 * lynx-low.c (lynx_target_ops): Initialize new structure
5829 * server.c (report_fork_events, report_vfork_events):
5831 (handle_query): Add new features to qSupported packet and
5833 (captured_main): Initialize new global variables.
5834 * target.h (struct target_ops) <supports_fork_events>:
5836 <supports_vfork_events>: New member.
5837 (target_supports_fork_events): New macro.
5838 (target_supports_vfork_events): New macro.
5839 * win32-low.c (win32_target_ops): Initialize new structure
5842 2015-05-12 Gary Benson <gbenson@redhat.com>
5844 * server.c (handle_qxfer_exec_file): Use current process
5847 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5849 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5850 Remove HAVE_PTRACE_GETREGS conditionals.
5851 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5852 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5854 2015-05-08 Yao Qi <yao.qi@linaro.org>
5856 * linux-low.c (linux_supports_conditional_breakpoints): New
5858 (linux_target_ops): Install new target method.
5859 * lynx-low.c (lynx_target_ops): Install NULL hook for
5860 supports_conditional_breakpoints.
5861 * nto-low.c (nto_target_ops): Likewise.
5862 * spu-low.c (spu_target_ops): Likewise.
5863 * win32-low.c (win32_target_ops): Likewise.
5864 * server.c (handle_query): Check
5865 target_supports_conditional_breakpoints.
5866 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5868 (target_supports_conditional_breakpoints): New macro.
5870 2015-05-06 Pedro Alves <palves@redhat.com>
5873 * server.c (start_inferior): If the process exits, mourn it.
5875 2015-04-21 Gary Benson <gbenson@redhat.com>
5877 * hostio.c (fileio_open_flags_to_host): Factored out to
5878 fileio_to_host_openflags in common/fileio.c. Single use
5881 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5883 * linux-xtensa-low.c (xtensa_fill_gregset)
5884 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5887 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5889 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5890 (regs_info): Replace usrregs pointer with NULL.
5892 2015-04-17 Gary Benson <gbenson@redhat.com>
5894 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5895 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5896 * server.c (handle_qxfer_exec_file): New function.
5897 (qxfer_packets): Add exec-file entry.
5898 (handle_query): Report qXfer:exec-file:read as supported packet.
5900 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5902 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5904 2015-04-09 Gary Benson <gbenson@redhat.com>
5906 * hostio-errno.c (errno_to_fileio_error): Remove function.
5907 Update caller to use remote_fileio_to_fio_error.
5909 2015-04-09 Yao Qi <yao.qi@linaro.org>
5911 * linux-low.c (linux_insert_point): Call
5912 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5913 (linux_remove_point): Call remove_memory_breakpoint if type is
5915 * linux-x86-low.c (x86_insert_point): Don't call
5916 insert_memory_breakpoint.
5917 (x86_remove_point): Don't call remove_memory_breakpoint.
5919 2015-04-01 Pedro Alves <palves@redhat.com>
5920 Cleber Rosa <crosa@redhat.com>
5922 * server.c (gdbserver_usage): Reorganize and extend the usage
5925 2015-03-24 Pedro Alves <palves@redhat.com>
5927 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5928 output. Also dump TRAP_TRACE.
5929 (linux_low_filter_event): In debug output, distinguish a
5930 resume_stop SIGSTOP from a delayed SIGSTOP.
5932 2015-03-24 Gary Benson <gbenson@redhat.com>
5934 * linux-x86-low.c (x86_linux_new_thread): Moved to
5936 (x86_linux_prepare_to_resume): Likewise.
5938 2015-03-24 Gary Benson <gbenson@redhat.com>
5940 * Makefile.in (x86-linux-dregs.o): New rule.
5941 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5942 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5943 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5944 (x86_linux_dr_get): Likewise.
5945 (x86_linux_dr_set): Likewise.
5946 (update_debug_registers_callback): Likewise.
5947 (x86_linux_dr_set_addr): Likewise.
5948 (x86_linux_dr_get_addr): Likewise.
5949 (x86_linux_dr_set_control): Likewise.
5950 (x86_linux_dr_get_control): Likewise.
5951 (x86_linux_dr_get_status): Likewise.
5952 (x86_linux_update_debug_registers): Likewise.
5954 2015-03-24 Gary Benson <gbenson@redhat.com>
5956 * linux-x86-low.c (x86_linux_update_debug_registers):
5957 New function, factored out from...
5958 (x86_linux_prepare_to_resume): ...this.
5960 2015-03-24 Gary Benson <gbenson@redhat.com>
5962 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5963 (x86_linux_dr_set): Likewise.
5964 (update_debug_registers_callback): Likewise.
5965 (x86_linux_dr_set_addr): Likewise.
5966 (x86_linux_dr_get_addr): Likewise.
5967 (x86_linux_dr_set_control): Likewise.
5968 (x86_linux_dr_get_control): Likewise.
5969 (x86_linux_dr_get_status): Likewise.
5970 (x86_linux_prepare_to_resume): Likewise.
5972 2015-03-24 Gary Benson <gbenson@redhat.com>
5974 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5975 Use perror_with_name. Pass string through gettext.
5976 (x86_linux_dr_set): Likewise.
5978 2015-03-24 Gary Benson <gbenson@redhat.com>
5980 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5981 (x86_linux_dr_set_addr): ...this.
5982 (x86_dr_low_get_addr): Rename to...
5983 (x86_linux_dr_get_addr): ...this.
5984 (x86_dr_low_set_control): Rename to...
5985 (x86_linux_dr_set_control): ...this.
5986 (x86_dr_low_get_control): Rename to...
5987 (x86_linux_dr_get_control): ...this.
5988 (x86_dr_low_get_status): Rename to...
5989 (x86_linux_dr_get_status): ...this.
5990 (x86_dr_low): Update with new function names.
5992 2015-03-24 Gary Benson <gbenson@redhat.com>
5994 * Makefile.in (x86-linux.o): New rule.
5995 * configure.srv: Add x86-linux.o to relevant targets.
5996 * linux-low.c (lwp_set_arch_private_info): New function.
5997 (lwp_arch_private_info): Likewise.
5998 * linux-x86-low.c: Include nat/x86-linux.h.
5999 (arch_lwp_info): Removed structure.
6000 (update_debug_registers_callback):
6001 Use lwp_set_debug_registers_changed.
6002 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6003 and lwp_set_debug_registers_changed.
6004 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6006 2015-03-24 Gary Benson <gbenson@redhat.com>
6008 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6009 * linux-arm-low.c (arm_new_thread): Likewise.
6010 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6011 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6012 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6013 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6015 2015-03-24 Gary Benson <gbenson@redhat.com>
6017 * linux-low.c (ptid_of_lwp): New function.
6018 (lwp_is_stopped): Likewise.
6019 (lwp_stop_reason): Likewise.
6020 * linux-x86-low.c (update_debug_registers_callback):
6022 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6025 2015-03-24 Gary Benson <gbenson@redhat.com>
6027 * linux-low.h (linux_stop_lwp): Remove declaration.
6029 2015-03-24 Gary Benson <gbenson@redhat.com>
6031 * linux-low.h: Include nat/linux-nat.h.
6032 * linux-low.c (iterate_over_lwps_args): New structure.
6033 (iterate_over_lwps_filter): New function.
6034 (iterate_over_lwps): Likewise.
6035 * linux-x86-low.c (update_debug_registers_callback):
6036 Update signature to what iterate_over_lwps expects.
6037 Remove PID check that iterate_over_lwps now performs.
6038 (x86_dr_low_set_addr): Use iterate_over_lwps.
6039 (x86_dr_low_set_control): Likewise.
6041 2015-03-24 Gary Benson <gbenson@redhat.com>
6043 * linux-x86-low.c (x86_debug_reg_state): New function.
6044 (x86_linux_prepare_to_resume): Use the above.
6046 2015-03-24 Gary Benson <gbenson@redhat.com>
6048 * linux-low.c (current_lwp_ptid): New function.
6049 * linux-x86-low.c: Include nat/linux-nat.h.
6050 (x86_dr_low_get_addr): Use current_lwp_ptid.
6051 (x86_dr_low_get_control): Likewise.
6052 (x86_dr_low_get_status): Likewise.
6054 2015-03-20 Pedro Alves <palves@redhat.com>
6056 * tracepoint.c (cmd_qtstatus): Make "str" const.
6058 2015-03-20 Pedro Alves <palves@redhat.com>
6060 * server.c (handle_general_set): Make "req_str" const.
6062 2015-03-19 Pedro Alves <palves@redhat.com>
6064 * linux-low.c (linux_resume_one_lwp): Rename to ...
6065 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6066 instead call perror_with_name.
6067 (check_ptrace_stopped_lwp_gone): New function.
6068 (linux_resume_one_lwp): Reimplement as wrapper around
6069 linux_resume_one_lwp_throw that swallows errors if the LWP is
6072 2015-03-19 Pedro Alves <palves@redhat.com>
6074 * linux-low.c (count_events_callback, select_event_lwp_callback):
6075 No longer check whether the thread has resume_stop as last resume
6078 2015-03-19 Pedro Alves <palves@redhat.com>
6080 * linux-low.c (count_events_callback, select_event_lwp_callback):
6081 Use the lwp's status_pending_p field, not the thread's.
6083 2015-03-19 Pedro Alves <palves@redhat.com>
6085 * linux-low.c (select_event_lwp_callback): Update comments to
6086 no longer mention SIGTRAP.
6088 2015-03-18 Gary Benson <gbenson@redhat.com>
6090 * server.c (handle_query): Do not report vFile:fstat as supported.
6092 2015-03-11 Gary Benson <gbenson@redhat.com>
6094 * hostio.c (sys/types.h): New include.
6095 (sys/stat.h): Likewise.
6096 (common-remote-fileio.h): Likewise.
6097 (handle_fstat): New function.
6098 (handle_vFile): Handle vFile:fstat packets.
6100 2015-03-11 Gary Benson <gbenson@redhat.com>
6102 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6103 struct stat.st_blocks and struct stat.st_blksize.
6104 * configure: Regenerate.
6105 * config.in: Likewise.
6106 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6107 (OBS): Add common-remote-fileio.o.
6108 (common-remote-fileio.o): New rule.
6110 2015-03-09 Pedro Alves <palves@redhat.com>
6112 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6113 'struct sockaddr' pointer in 'accept' call.
6115 2015-03-09 Pedro Alves <palves@redhat.com>
6118 2015-03-07 Pedro Alves <palves@redhat.com>
6119 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6120 or <winsock2.h> here. Instead include "gdb_socket.h".
6121 (remote_open): Use union gdb_sockaddr_u.
6122 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6123 or <winsock2.h> here. Instead include "gdb_socket.h".
6124 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6125 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6127 (init_named_socket, gdb_agent_helper_thread): Use union
6130 2015-03-07 Pedro Alves <palves@redhat.com>
6132 * configure.ac (build_warnings): Move
6133 -Wdeclaration-after-statement to the C-specific set.
6134 * configure: Regenerate.
6136 2015-03-07 Pedro Alves <palves@redhat.com>
6138 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6139 or <winsock2.h> here. Instead include "gdb_socket.h".
6140 (remote_open): Use union gdb_sockaddr_u.
6141 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6142 or <winsock2.h> here. Instead include "gdb_socket.h".
6143 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6144 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6146 (init_named_socket, gdb_agent_helper_thread): Use union
6149 2015-03-07 Pedro Alves <palves@redhat.com>
6151 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6154 2015-03-06 Yao Qi <yao.qi@linaro.org>
6156 * linux-aarch64-low.c (aarch64_insert_point): Use
6157 show_debug_regs as a boolean.
6158 (aarch64_remove_point): Likewise.
6160 2015-03-05 Pedro Alves <palves@redhat.com>
6162 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6163 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6164 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6165 * nto-low.c (nto_target_ops): Likewise.
6166 * spu-low.c (spu_target_ops): Likewise.
6167 * win32-low.c (win32_target_ops): Likewise.
6169 2015-03-04 Pedro Alves <palves@redhat.com>
6171 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6172 Decide whether a breakpoint triggered based on the SIGTRAP's
6174 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6175 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6176 (linux_low_filter_event): Check for breakpoints before checking
6178 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6180 (linux_stopped_by_sw_breakpoint)
6181 (linux_supports_stopped_by_sw_breakpoint)
6182 (linux_stopped_by_hw_breakpoint)
6183 (linux_supports_stopped_by_hw_breakpoint): New functions.
6184 (linux_target_ops): Install new target methods.
6186 2015-03-04 Pedro Alves <palves@redhat.com>
6188 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6189 * server.c (swbreak_feature, hwbreak_feature): New globals.
6190 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6191 (captured_main): Clear swbreak_feature and hwbreak_feature.
6192 * server.h (swbreak_feature, hwbreak_feature): Declare.
6193 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6194 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6195 supports_stopped_by_hw_breakpoint>: New fields.
6196 (target_supports_stopped_by_sw_breakpoint)
6197 (target_stopped_by_sw_breakpoint)
6198 (target_supports_stopped_by_hw_breakpoint)
6199 (target_stopped_by_hw_breakpoint): Declare.
6201 2015-03-04 Pedro Alves <palves@redhat.com>
6203 enum lwp_stop_reason -> enum target_stop_reason
6204 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6205 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6206 (linux_wait_1, stuck_in_jump_pad_callback)
6207 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6208 (linux_stopped_by_watchpoint):
6209 * linux-low.h (enum lwp_stop_reason): Delete.
6210 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6211 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6213 2015-03-04 Yao Qi <yao.qi@linaro.org>
6215 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6217 2015-03-03 Gary Benson <gbenson@redhat.com>
6219 * hostio.c (handle_vFile): Fix prefix lengths.
6221 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6223 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6226 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6228 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6229 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6230 (clean): Add "rm -f" for above C files.
6231 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6232 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6233 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6234 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6235 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6236 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6237 (init_registers_s390x_vx_linux64)
6238 (init_registers_s390x_tevx_linux64)
6239 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6240 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6242 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6243 (s390_store_vxrs_high): New functions.
6244 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6246 (s390_arch_setup): Add logic for selecting one of the new target
6247 descriptions. Activate the new vector regsets if applicable.
6248 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6249 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6250 and init_registers_s390x_tevx_linux64.
6252 2015-03-01 Pedro Alves <palves@redhat.com>
6254 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6257 2015-02-27 Pedro Alves <palves@redhat.com>
6259 * linux-x86-low.c (u_debugreg_offset): New function.
6260 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6262 2015-02-27 Pedro Alves <palves@redhat.com>
6264 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6265 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6266 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6267 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6268 (ps_lsetfpregs, ps_getpid)
6269 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6270 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6271 (ps_lsetxregs, ps_plog): Declare.
6273 2015-02-27 Pedro Alves <palves@redhat.com>
6275 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6276 IP_AGENT_EXPORT_FUNC.
6277 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6278 IP_AGENT_EXPORT_FUNC.
6279 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6280 (IP_AGENT_EXPORT): Delete.
6281 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6282 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6283 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6284 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6285 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6286 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6287 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6288 (traceframe_read_count, traceframe_write_count)
6289 (traceframes_created, trace_state_variables, get_raw_reg)
6290 (get_trace_state_variable_value, set_trace_state_variable_value)
6291 (ust_loaded, helper_thread_id, cmd_buf): Use
6292 IPA_SYM_EXPORTED_NAME.
6293 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6294 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6295 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6296 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6297 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6298 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6299 EXTERN_C_PUSH/EXTERN_C_POP.
6300 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6301 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6302 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6303 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6304 (traceframe_write_count, traceframe_read_count)
6305 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6306 (about_to_request_buffer_space, get_trace_state_variable_value)
6307 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6308 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6309 EXTERN_C_PUSH/EXTERN_C_POP.
6310 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6311 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6312 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6313 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6314 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6315 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6316 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6317 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6319 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6320 (IP_AGENT_EXPORT_VAR_DECL): Define.
6322 (gdb_agent_get_raw_reg): Declare.
6324 2015-02-27 Tom Tromey <tromey@redhat.com>
6325 Pedro Alves <palves@redhat.com>
6327 Rename symbols whose names are reserved C++ keywords throughout.
6329 2015-02-27 Pedro Alves <palves@redhat.com>
6331 * Makefile.in (COMPILER): New, get it from autoconf.
6332 (CXX): Get from autoconf instead.
6333 (COMPILE.pre): Use COMPILER.
6334 (CC-LD): Rename to ...
6335 (CC_LD): ... this. Use COMPILER.
6336 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6337 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6338 * acinclude.m4: Include build-with-cxx.m4.
6339 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6340 Disable -Werror by default if building in C++ mode.
6341 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6342 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6343 the C++ compiler. Save/restore CXXFLAGS too.
6344 * configure: Regenerate.
6346 2015-02-27 Pedro Alves <palves@redhat.com>
6348 * acinclude.m4: Include libiberty.m4.
6349 * configure.ac: Call libiberty_INIT.
6350 * config.in, configure: Regenerate.
6352 2015-02-26 Pedro Alves <palves@redhat.com>
6354 * linux-low.c (linux_wait_1): When incrementing the PC past a
6355 program breakpoint always use the_low_target.breakpoint_len as
6356 increment, rather than the maximum between that and
6357 the_low_target.decr_pc_after_break.
6359 2015-02-23 Pedro Alves <palves@redhat.com>
6361 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6362 thread was doing a step-over; always adjust the PC if
6363 we stepped over a permanent breakpoint.
6364 (linux_wait_1): If we stepped over breakpoint that was on top of a
6365 permanent breakpoint, manually advance the PC past it.
6367 2015-02-23 Pedro Alves <palves@redhat.com>
6369 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6371 (x86_fill_gregset, x86_store_gregset): Use it when handling
6374 2015-02-20 Pedro Alves <palves@redhat.com>
6376 * thread-db.c: Include "nat/linux-procfs.h".
6377 (thread_db_init): Skip listing new threads if the kernel supports
6378 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6380 2015-02-20 Pedro Alves <palves@redhat.com>
6382 * linux-low.c (status_pending_p_callback): Use ptid_match.
6384 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6386 PR breakpoints/16812
6387 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6388 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6389 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6391 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6393 PR breakpoints/15956
6394 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6396 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6398 * linux-low.c (linux_low_btrace_conf): Print size.
6399 * server.c (handle_btrace_conf_general_set): New.
6400 (hanle_general_set): Call handle_btrace_conf_general_set.
6401 (handle_query): Report Qbtrace-conf:bts:size as supported.
6403 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6405 * linux-low.c (linux_low_enable_btrace): Update parameters.
6406 (linux_low_btrace_conf): New.
6407 (linux_target_ops)<to_btrace_conf>: Initialize.
6408 * server.c (current_btrace_conf): New.
6409 (handle_btrace_enable): Rename to ...
6410 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6411 to target_enable_btrace. Update comment. Update users.
6412 (handle_qxfer_btrace_conf): New.
6413 (qxfer_packets): Add btrace-conf entry.
6414 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6415 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6416 (target_ops)<read_btrace_conf>: New.
6417 (target_enable_btrace): Update parameters.
6418 (target_read_btrace_conf): New.
6420 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6422 * server.c (handle_btrace_general_set): Remove call to
6423 target_supports_btrace.
6424 (supported_btrace_packets): New.
6425 (handle_query): Call supported_btrace_packets.
6426 * target.h: include btrace-common.h.
6427 (btrace_target_info): Removed.
6428 (supports_btrace, target_supports_btrace): Update parameters.
6430 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6432 * Makefile.in (SFILES): Add common/btrace-common.c.
6433 (OBS): Add common/btrace-common.o.
6434 (btrace-common.o): Add build rules.
6435 * linux-low: Include btrace-common.h.
6436 (linux_low_read_btrace): Use struct btrace_data. Call
6437 btrace_data_init and btrace_data_fini.
6439 2015-02-06 Pedro Alves <palves@redhat.com>
6441 * thread-db.c (find_new_threads_callback): Add debug output.
6443 2015-02-04 Pedro Alves <palves@redhat.com>
6445 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6446 (resume_stopped_resumed_lwps): New function.
6447 (linux_wait_for_event_filtered): Use it.
6449 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6451 * Makefile.in (SFILES): Add linux-personality.c.
6452 (linux-personality.o): New rule.
6453 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6454 list of objects to be built.
6455 * linux-low.c: Include nat/linux-personality.h.
6456 (linux_create_inferior): Remove code to disable address space
6457 randomization (moved to ../nat/linux-personality.c). Create
6458 cleanup to disable address space randomization.
6460 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6462 * Makefile.in (posix-strerror.o): New rule.
6463 (mingw-strerror.o): Likewise.
6464 * configure: Regenerated.
6465 * configure.ac: Source file ../common/common.host. Initialize new
6466 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6468 2015-01-14 Yao Qi <yao@codesourcery.com>
6470 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6471 (ppc-linux.o): New rule.
6472 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6473 * configure.ac: AC_CHECK_FUNCS(getauxval).
6474 * config.in: Re-generated.
6475 * configure: Re-generated.
6476 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6477 ppc64_64bit_inferior_p
6479 2015-01-14 Yao Qi <yao@codesourcery.com>
6481 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6482 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6483 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6484 (PT_ORIG_R3, PT_TRAP): Likewise.
6485 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6486 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6487 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6489 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6491 * i387-fp.c (i387_cache_to_xsave): In look over
6492 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6493 zmmh_low_space field by use of zmmh_high_space.
6495 2015-01-09 Pedro Alves <palves@redhat.com>
6497 * linux-low.c (step_over_bkpt): Move higher up in the file.
6498 (handle_extended_wait): Don't store the stop_pc here.
6499 (get_stop_pc): Adjust comments and rename to ...
6500 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6501 stopped for a software breakpoint or hardware breakpoint.
6502 (thread_still_has_status_pending_p): New function.
6503 (status_pending_p_callback): Use
6504 thread_still_has_status_pending_p. If the event is no longer
6505 interesting, resume the LWP.
6506 (handle_tracepoints): Add assert.
6507 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6508 (wstatus_maybe_breakpoint): New function.
6509 (cancel_breakpoint): Delete function.
6510 (check_stopped_by_watchpoint): New function, factored out from
6511 linux_low_filter_event.
6512 (lp_status_maybe_breakpoint): Delete function.
6513 (linux_low_filter_event): Remove filter_ptid argument.
6514 Leave thread group exits pending here. Store the LWP's stop PC.
6515 Always leave events pending.
6516 (linux_wait_for_event_filtered): Pull all events out of the
6517 kernel, and leave them all pending.
6518 (count_events_callback, select_event_lwp_callback): Consider all
6520 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6521 (select_event_lwp): Only give preference to the stepping LWP in
6522 all-stop mode. Adjust comments.
6523 (ignore_event): New function.
6524 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6525 references to cancel_breakpoints. Adjust to renames. Also give
6526 equal priority to all LWPs that have had events in non-stop mode.
6527 If reporting a software breakpoint event, unadjust the LWP's PC.
6528 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6529 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6531 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6532 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6533 (linux_stopped_by_watchpoint): Adjust.
6534 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6535 * linux-low.h (enum lwp_stop_reason): New.
6536 (struct lwp_info) <stop_pc>: Adjust comment.
6537 <stopped_by_watchpoint>: Delete field.
6538 <stop_reason>: New field.
6539 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6540 * mem-break.c (software_breakpoint_inserted_here)
6541 (hardware_breakpoint_inserted_here): New function.
6542 * mem-break.h (software_breakpoint_inserted_here)
6543 (hardware_breakpoint_inserted_here): Declare.
6544 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6545 (cancel_breakpoints): Delete.
6546 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6547 (upload_fast_traceframes): Remove references to
6550 2015-01-09 Pedro Alves <palves@redhat.com>
6552 * thread-db.c (find_new_threads_callback): Ignore thread if the
6553 kernel thread ID is -1.
6555 2015-01-09 Pedro Alves <palves@redhat.com>
6557 * linux-low.c (linux_attach_fail_reason_string): Move to
6558 nat/linux-ptrace.c, and rename.
6559 (linux_attach_lwp): Update comment.
6560 (attach_proc_task_lwp_callback): New function.
6561 (linux_attach): Adjust to rename and use
6562 linux_proc_attach_tgid_threads.
6563 (linux_attach_fail_reason_string): Delete declaration.
6565 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6567 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6568 * server.c (gdbserver_version): Likewise.
6570 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6572 * remote-utils.c: Include ctype.h.
6573 (input_interrupt): Explicitly handle the case when the char
6574 received is the NUL byte. Improve the printing of non-ASCII
6577 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6579 * linux-low.c (linux_low_filter_event): Update call to
6580 linux_enable_event_reporting following the addition of
6581 a new parameter to that function.
6583 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6586 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6587 (AARCH64_FPCR_REGNO): Likewise.
6588 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6589 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6590 (aarch64_store_fpregset): Likewise.
6592 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6594 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6595 Remove FIXME comment about assumption about N.
6597 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6599 * configure.ac: If large-file support is disabled in GDBserver,
6600 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6601 * configure: Regenerate.
6603 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6605 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6606 warning upon ENODATA from ptrace.
6607 * linux-s390-low.c (s390_store_tdb): New.
6608 (s390_regsets): Add regset for NT_S390_TDB.
6610 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6612 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6613 without a fill_function.
6614 * linux-s390-low.c (s390_fill_last_break): Remove.
6615 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6616 (s390_arch_setup): Use regset's size instead of fill_function for
6619 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6621 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6622 the regset's store function when ptrace returned an error.
6623 * regcache.c (get_thread_regcache): Invalidate register cache
6624 before fetching inferior's registers.
6626 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6628 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6629 while-loop as for-loop.
6630 (regsets_store_inferior_registers): Likewise.
6632 2014-11-28 Yao Qi <yao@codesourcery.com>
6634 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6635 * config.in, configure: Re-generate.
6636 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6639 2014-11-21 Yao Qi <yao@codesourcery.com>
6641 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6642 (AC_CHECK_HEADERS): Remove malloc.h.
6643 * configure: Re-generated.
6644 * config.in: Re-generated.
6645 * server.h: Don't include alloca.h and malloc.h.
6646 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6647 Don't include malloc.h.
6649 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6651 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6652 corresponding ERRNO check in same block.
6654 2014-11-12 Pedro Alves <palves@redhat.com>
6656 * server.c (cont_thread): Update comment.
6657 (start_inferior, attach_inferior): No longer clear cont_thread.
6658 (handle_v_cont): No longer set cont_thread.
6659 (captured_main): Clear cont_thread each time a GDB connects.
6661 2014-11-12 Pedro Alves <palves@redhat.com>
6663 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6664 thread, and don't resume all threads if the Hc thread has exited.
6666 2014-11-12 Pedro Alves <palves@redhat.com>
6668 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6669 the process group instead of to a specific LWP.
6671 2014-10-15 Pedro Alves <palves@redhat.com>
6674 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6676 (arm_set_thread_context): Delete.
6677 (the_low_target): Adjust.
6678 * win32-i386-low.c (debug_registers_changed)
6679 (debug_registers_used): Delete.
6680 (update_debug_registers_callback): New function.
6681 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6682 needing to update their debug registers.
6683 (win32_get_current_dr): New function.
6684 (x86_dr_low_get_addr, x86_dr_low_get_control)
6685 (x86_dr_low_get_status): Fetch the debug register from the thread
6687 (i386_initial_stuff): Adjust.
6688 (i386_get_thread_context): Remove current_event parameter. Don't
6689 clear debug_registers_changed nor copy DR values to
6691 (i386_set_thread_context): Delete.
6692 (i386_prepare_to_resume): New function.
6693 (i386_thread_added): Mark the thread as needing to update irs
6695 (the_low_target): Remove i386_set_thread_context and install
6696 i386_prepare_to_resume.
6697 * win32-low.c (win32_get_thread_context): Adjust.
6698 (win32_set_thread_context): Use SetThreadContext
6700 (win32_prepare_to_resume): New function.
6701 (win32_require_context): New function, factored out from ...
6702 (thread_rec): ... this.
6703 (continue_one_thread): Call win32_prepare_to_resume on each thread
6704 we're about to continue.
6705 (win32_resume): Call win32_prepare_to_resume on the event thread.
6706 * win32-low.h (struct win32_thread_info)
6707 <debug_registers_changed>: New field.
6708 (struct win32_target_ops): Change prototype of set_thread_context,
6709 delete set_thread_context and add prepare_to_resume.
6710 (win32_require_context): New declaration.
6712 2014-10-08 Gary Benson <gbenson@redhat.com>
6714 * server.h: Do not include common-exceptions.h.
6716 2014-10-08 Gary Benson <gbenson@redhat.com>
6718 * server.h: Do not include cleanups.h.
6720 2014-09-30 James Hogan <james.hogan@imgtec.com>
6722 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6725 2014-09-23 Yao Qi <yao@codesourcery.com>
6727 * linux-low.c (lp_status_maybe_breakpoint): New function.
6728 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6729 (count_events_callback): Likewise.
6730 (select_event_lwp_callback): Likewise.
6731 (cancel_breakpoints_callback): Likewise.
6733 2014-09-19 Don Breazeal <donb@codesourcery.com>
6735 * linux-low.c (handle_extended_wait): Call
6736 linux_ptrace_get_extended_event.
6737 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6738 linux_is_extended_waitstatus.
6740 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6742 * Makefile.in (CPPFLAGS): Define.
6743 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6744 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6746 2014-09-16 Gary Benson <gbenson@redhat.com>
6748 * inferiors.h (current_inferior): Renamed as...
6749 (current_thread): New variable. All uses updated.
6750 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6751 (maybe_move_out_of_jump_pad): Likewise.
6752 (cancel_breakpoint): Likewise.
6753 (linux_low_filter_event): Likewise.
6754 (wait_for_sigstop): Likewise.
6755 (linux_resume_one_lwp): Likewise.
6756 (need_step_over_p): Likewise.
6757 (start_step_over): Likewise.
6758 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6759 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6760 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6761 and save_inferior as saved_thread.
6762 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6764 (regcache_invalidate_thread): Likewise.
6765 * remote-utils.c (prepare_resume_reply): Likewise.
6766 * thread-db.c (thread_db_get_tls_address): Likewise.
6767 (disable_thread_event_reporting): Likewise.
6768 (remove_thread_event_breakpoints): Likewise.
6769 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6771 * target.h (set_desired_inferior): Renamed as...
6772 (set_desired_thread): New declaration. All uses updated.
6773 * server.c (myresume): Updated comment to reference thread instead
6775 (handle_serial_event): Likewise.
6776 (handle_target_event): Likewise.
6778 2014-09-12 Tom Tromey <tromey@redhat.com>
6779 Gary Benson <gbenson@redhat.com>
6781 * regcache.h: Include common-regcache.h.
6782 (regcache_read_pc): Don't declare.
6783 * regcache.c (get_thread_regcache_for_ptid): New function.
6785 2014-09-11 Tom Tromey <tromey@redhat.com>
6786 Gary Benson <gbenson@redhat.com>
6788 * symbol.c: New file.
6789 * Makefile.in (SFILES): Add symbol.c.
6790 (OBS): Add symbol.o.
6792 2014-09-11 Gary Benson <gbenson@redhat.com>
6794 * target.c (target_stop_ptid, target_continue_ptid): New
6797 2014-09-11 Tom Tromey <tromey@redhat.com>
6798 Gary Benson <gbenson@redhat.com>
6800 * target.h: Include target/target.h.
6801 * target.c (target_read_memory, target_read_uint32)
6802 (target_write_memory): New functions.
6804 2014-09-11 Gary Benson <gbenson@redhat.com>
6806 * server.h (debug_hw_points): Don't declare.
6807 * server.c (debug_hw_points): Don't define. Replace all uses
6808 with show_debug_regs.
6809 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6810 all uses with show_debug_regs.
6812 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6814 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6815 endianness into account.
6816 (ppc_supply_ptrace_register): Likewise.
6818 2014-09-03 James Hogan <james.hogan@imgtec.com>
6820 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6821 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6823 2014-09-03 Gary Benson <gbenson@redhat.com>
6825 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6826 ALL_DEBUG_ADDRESS_REGISTERS.
6828 2014-09-02 Gary Benson <gbenson@redhat.com>
6830 * i386-low.h: Renamed as...
6831 * x86-low.h: New file. All type, function and variable name
6832 prefixes changed from "i386_" to "x86_". All references updated.
6833 * i386-low.c: Renamed as...
6834 * x86-low.c: New file. All type, function and variable name
6835 prefixes changed from "i386_" to "x86_". All references updated.
6837 2014-09-02 Gary Benson <gbenson@redhat.com>
6839 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6840 (x86_linux_new_thread): Likewise.
6842 2014-08-29 Gary Benson <gbenson@redhat.com>
6844 * server.h (setjmp.h): Do not include.
6845 (toplevel): Do not declare.
6846 (common-exceptions.h): Include.
6847 (cleanups.h): Likewise.
6848 * server.c (toplevel): Do not define.
6849 (exit_code): New static global.
6850 (detach_or_kill_for_exit_cleanup): New function.
6851 (main): New function. Original main renamed to...
6852 (captured_main): New function.
6853 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6855 2014-08-29 Gary Benson <gbenson@redhat.com>
6857 * Makefile.in (SFILES): Add common/common-exceptions.c.
6858 (OBS): Add common-exceptions.o.
6859 (common-exceptions.o): New rule.
6860 * utils.c (prepare_to_throw_exception): New function.
6862 2014-08-29 Gary Benson <gbenson@redhat.com>
6864 * config.in: Regenerate.
6865 * configure: Likewise.
6867 2014-08-29 Gary Benson <gbenson@redhat.com>
6869 * Makefile.in (SFILES): Add common/cleanups.c.
6871 (cleanups.o): New rule.
6873 2014-08-29 Gary Benson <gbenson@redhat.com>
6875 * utils.c (internal_vwarning): New function.
6877 2014-08-28 Gary Benson <gbenson@redhat.com>
6879 * utils.h (fatal): Remove declaration.
6880 * utils.c (fatal): Remove function.
6882 2014-08-28 Gary Benson <gbenson@redhat.com>
6884 * tracepoint.c (gdb_agent_init): Replace fatal with
6886 (initialize_tracepoint): Likewise.
6888 2014-08-28 Gary Benson <gbenson@redhat.com>
6890 * remote-utils.c (remote_prepare): Replace fatal with error.
6892 2014-08-28 Gary Benson <gbenson@redhat.com>
6894 * linux-low.c (linux_async): Replace fatal with warning.
6896 (linux_start_non_stop): Return -1 if linux_async failed.
6898 2014-08-28 Gary Benson <gbenson@redhat.com>
6900 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6902 (i386_dr_low_get_addr): Remove vague comment.
6903 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6906 2014-08-28 Gary Benson <gbenson@redhat.com>
6908 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6909 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6911 (linux_resume_one_lwp): Likewise.
6912 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6914 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6915 with internal_error.
6916 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6917 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6918 (find_register_by_name): Replace fatal with internal_error.
6919 (find_regno): Likewise.
6920 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6921 * thread-db.c (thread_db_create_event): Likewise.
6922 (thread_db_load_search): Likewise.
6923 (try_thread_db_load_1): Likewise.
6924 * tracepoint.c (get_jump_space_head): Replace fatal with
6926 (claim_trampoline_space): Likewise.
6927 (have_fast_tracepoint_trampoline_buffer): Likewise.
6928 (cmd_qtstart): Likewise.
6929 (stop_tracing): Likewise.
6930 (fast_tracepoint_collecting): Likewise.
6931 (target_malloc): Likewise.
6932 (download_tracepoint): Likewise.
6933 (download_trace_state_variables): Replace check with gdb_assert.
6934 (upload_fast_traceframes): Replace fatal with internal_error.
6936 2014-08-19 Tom Tromey <tromey@redhat.com>
6937 Gary Benson <gbenson@redhat.com>
6939 * Makefile.in (SFILES): Add common/common-debug.c.
6940 (OBS): Add common-debug.o.
6941 (common-debug.o): New rule.
6942 * debug.h (debug_printf): Don't declare.
6943 * debug.c (debug_printf): Renamed and rewritten as...
6944 (debug_vprintf): New function.
6946 2014-08-19 Gary Benson <gbenson@redhat.com>
6948 * utils.h: Do not include print-utils.h.
6950 2014-08-19 Tom Tromey <tromey@redhat.com>
6951 Gary Benson <gbenson@redhat.com>
6953 * server.h: Add static assertion.
6954 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6956 2014-08-19 Tom Tromey <tromey@redhat.com>
6957 Gary Benson <gbenson@redhat.com>
6959 * Makefile.in (SFILES): Add common/errors.c.
6960 (OBS): Add errors.o.
6961 (IPA_OBS): Add errors-ipa.o.
6962 (errors.o): New rule.
6963 (errors-ipa.o): Likewise.
6964 * utils.h (perror_with_name, error, warning): Don't declare.
6965 * utils.c (warning): Renamed and rewritten as...
6966 (vwarning): New function.
6967 (error): Renamed and rewritten as...
6968 (verror): New function.
6969 (internal_error): Renamed and rewritten as...
6970 (internal_verror): New function.
6972 2014-08-07 Gary Benson <gbenson@redhat.com>
6974 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6975 * configure: Regenerate.
6976 * config.in: Likewise.
6977 * server.h: Do not include errno.h.
6978 * event-loop.c: Likewise.
6979 * hostio-errno.c: Likewise.
6980 * linux-low.c: Likewise.
6981 * remote-utils.c: Likewise.
6982 * spu-low.c: Likewise.
6983 * utils.c: Likewise.
6984 * gdbreplay.c: Unconditionally include errno.h.
6986 2014-08-07 Gary Benson <gbenson@redhat.com>
6988 * server.h: Do not include string.h.
6989 * event-loop.c: Likewise.
6990 * linux-low.c: Likewise.
6991 * regcache.c: Likewise.
6992 * remote-utils.c: Likewise.
6993 * spu-low.c: Likewise.
6994 * utils.c: Likewise.
6996 2014-08-07 Gary Benson <gbenson@redhat.com>
6998 * server.h: Do not include gdb_assert.h.
7000 2014-08-07 Gary Benson <gbenson@redhat.com>
7002 * server.h: Do not include common-utils.h.
7004 2014-08-07 Gary Benson <gbenson@redhat.com>
7006 * server.h: Do not include ptid.h.
7007 * notif.h: Likewise.
7009 2014-08-07 Gary Benson <gbenson@redhat.com>
7011 * server.h: Do not include gdb_locale.h.
7013 2014-08-07 Gary Benson <gbenson@redhat.com>
7015 * server.h: Do not include gdb/signals.h.
7016 * win32-low.c: Likewise.
7018 2014-08-07 Gary Benson <gbenson@redhat.com>
7020 * server.h: Do not include pathmax.h.
7022 2014-08-07 Gary Benson <gbenson@redhat.com>
7024 * server.h: Do not include libiberty.h.
7025 * linux-bfin-low.c: Likewise.
7027 2014-08-07 Gary Benson <gbenson@redhat.com>
7029 * server.h: Do not include ansidecl.h.
7031 2014-08-07 Gary Benson <gbenson@redhat.com>
7033 * linux-x86-low.c: Do not include stddef.h.
7034 * lynx-ppc-low.c: Likewise.
7035 * tracepoint.c: Likewise.
7037 2014-08-07 Gary Benson <gbenson@redhat.com>
7039 * server.h: Do not include stdarg.h.
7040 * nto-low.c: Likewise.
7042 2014-08-07 Gary Benson <gbenson@redhat.com>
7044 * server.h: Do not include stdlib.h.
7045 * inferiors.c: Likewise.
7046 * linux-low.c: Likewise.
7047 * regcache.c: Likewise.
7048 * spu-low.c: Likewise.
7049 * tracepoint.c: Likewise.
7050 * utils.c: Likewise.
7052 2014-08-07 Gary Benson <gbenson@redhat.com>
7054 * server.h: Do not include stdio.h.
7055 * linux-low.c: Likewise.
7056 * remote-utils.c: Likewise.
7057 * spu-low.c: Likewise.
7058 * utils.c: Likewise.
7059 * wincecompat.c: Likewise.
7061 2014-08-06 Gary Benson <gbenson@redhat.com>
7063 * regcache.c (init_register_cache): Move conditionals inside if.
7065 2014-08-06 Gary Benson <gbenson@redhat.com>
7067 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7069 2014-07-31 Gary Benson <gbenson@redhat.com>
7071 * ax.h: Do not include server.h.
7072 * gdbthread.h: Likewise.
7073 * lynx-low.h: Likewise.
7074 * notif.h: Likewise.
7076 2014-07-30 Gary Benson <gbenson@redhat.com>
7078 * server.h: Include common-defs.h.
7079 Do not include config.h or build-gnulib-gdbserver/config.h.
7081 2014-07-30 Gary Benson <gbenson@redhat.com>
7083 * hostio-errno.c: Move server.h to top of includes list.
7084 * inferiors.c: Likewise.
7085 * linux-x86-low.c: Likewise.
7086 * notif.c: Include server.h.
7088 2014-07-24 Tom Tromey <tromey@redhat.com>
7089 Gary Benson <gbenson@redhat.com>
7091 * server.h (CORE_ADDR): Now unsigned.
7093 2014-07-16 Pedro Alves <palves@redhat.com>
7095 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7097 2014-07-15 Pedro Alves <palves@redhat.com>
7099 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7102 2014-07-11 Pedro Alves <palves@redhat.com>
7104 * linux-low.c (kill_wait_lwp): New function, based on
7105 kill_one_lwp_callback, but use my_waitpid directly.
7106 (kill_one_lwp_callback, linux_kill): Use it.
7108 2014-06-23 Pedro Alves <palves@redhat.com>
7110 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7111 before setting DR0..DR3.
7113 2014-06-20 Gary Benson <gbenson@redhat.com>
7115 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7116 * configure: Regenerated.
7117 * config.in: Likewise.
7119 2014-06-20 Gary Benson <gbenson@redhat.com>
7121 * Makefile.in (SFILES): Update locations for files moved
7123 (object file files): Reordered.
7125 2014-06-20 Gary Benson <gbenson@redhat.com>
7127 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7128 (i386_dr_low_set_addr): Likewise.
7129 (i386_dr_low_get_addr): Likewise.
7130 (i386_dr_low_can_set_control): Likewise.
7131 (i386_dr_low_set_control): Likewise.
7132 (i386_dr_low_get_control): Likewise.
7133 (i386_dr_low_get_status): Likewise.
7134 (i386_get_debug_register_length): Likewise.
7135 * linux-x86-low.c (i386_dr_low_set_addr):
7136 Changed signature. Made static.
7137 (i386_dr_low_get_addr): Likewise.
7138 (i386_dr_low_set_control): Likewise.
7139 (i386_dr_low_get_control): Likewise.
7140 (i386_dr_low_get_status): Likewise.
7141 (i386_dr_low): New global variable.
7142 * win32-i386-low.c (i386_dr_low_set_addr):
7143 Changed signature. Made static.
7144 (i386_dr_low_get_addr): Likewise.
7145 (i386_dr_low_set_control): Likewise.
7146 (i386_dr_low_get_control): Likewise.
7147 (i386_dr_low_get_status): Likewise.
7148 (i386_dr_low): New global variable.
7150 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7152 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7153 * Makefile.in (AR, AR_FLAGS): Define.
7154 * configure: Regenerate.
7156 2014-06-19 Gary Benson <gbenson@redhat.com>
7158 * Makefile.in (i386-dregs.o): New rule.
7159 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7160 * i386-low.c (target.h): Remove include.
7161 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7162 (DR_CONTROL_SHIFT): Likewise.
7163 (DR_CONTROL_SIZE): Likewise.
7164 (DR_RW_EXECUTE): Likewise.
7165 (DR_RW_WRITE): Likewise.
7166 (DR_RW_READ): Likewise.
7167 (DR_RW_IORW): Likewise.
7168 (DR_LEN_1): Likewise.
7169 (DR_LEN_2): Likewise.
7170 (DR_LEN_4): Likewise.
7171 (DR_LEN_8): Likewise.
7172 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7173 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7174 (DR_ENABLE_SIZE): Likewise.
7175 (DR_LOCAL_SLOWDOWN): Likewise.
7176 (DR_GLOBAL_SLOWDOWN): Likewise.
7177 (DR_CONTROL_RESERVED): Likewise.
7178 (I386_DR_CONTROL_MASK): Likewise.
7179 (I386_DR_VACANT): Likewise.
7180 (I386_DR_LOCAL_ENABLE): Likewise.
7181 (I386_DR_GLOBAL_ENABLE): Likewise.
7182 (I386_DR_DISABLE): Likewise.
7183 (I386_DR_SET_RW_LEN): Likewise.
7184 (I386_DR_GET_RW_LEN): Likewise.
7185 (I386_DR_WATCH_HIT): Likewise.
7186 (i386_wp_op_t): Likewise.
7187 (i386_show_dr): Likewise.
7188 (i386_length_and_rw_bits): Likewise.
7189 (i386_insert_aligned_watchpoint): Likewise.
7190 (i386_remove_aligned_watchpoint): Likewise.
7191 (i386_handle_nonaligned_watchpoint): Likewise.
7192 i386_update_inferior_debug_regs(): Likewise.
7193 (i386_dr_insert_watchpoint): Likewise.
7194 (i386_dr_remove_watchpoint): Likewise.
7195 (i386_dr_region_ok_for_watchpoint): Likewise.
7196 (i386_dr_stopped_data_address): Likewise.
7197 (i386_dr_stopped_by_watchpoint): Likewise.
7199 2014-06-19 Gary Benson <gbenson@redhat.com>
7201 * i386-low.c (i386_dr_show): Renamed to
7202 i386_show_dr and made static. All uses updated.
7203 (i386_dr_length_and_rw_bits): Renamed to
7204 i386_length_and_rw_bits and made static.
7206 (i386_dr_insert_aligned_watchpoint): Renamed to
7207 i386_insert_aligned_watchpoint and made static.
7209 (i386_dr_remove_aligned_watchpoint): Renamed to
7210 i386_remove_aligned_watchpoint and made static.
7212 (i386_dr_update_inferior_debug_regs): Renamed to
7213 i386_update_inferior_debug_regs and made static.
7216 2014-06-18 Gary Benson <gbenson@redhat.com>
7218 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7219 (i386_dr_low_can_set_control): Likewise.
7220 (i386_get_debug_register_length): Likewise.
7221 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7222 (i386_dr_low_can_set_control): Likewise.
7223 (i386_get_debug_register_length): Likewise.
7225 2014-06-17 Gary Benson <gbenson@redhat.com>
7227 * i386-low.h (i386-dregs.h): New include.
7228 (DR_FIRSTADDR): Now in i386-dregs.h.
7229 (DR_LASTADDR): Likewise.
7230 (DR_NADDR): Likewise.
7231 (DR_STATUS): Likewise.
7232 (DR_CONTROL): Likewise.
7233 (i386_debug_reg_state): Likewise.
7234 (i386_dr_insert_watchpoint): Likewise.
7235 (i386_dr_remove_watchpoint): Likewise.
7236 (i386_dr_region_ok_for_watchpoint): Likewise.
7237 (i386_dr_stopped_data_address): Likewise.
7238 (i386_dr_stopped_by_watchpoint): Likewise.
7239 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7241 2014-06-18 Gary Benson <gbenson@redhat.com>
7243 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7244 i386_dr_insert_watchpoint.
7245 (i386_low_remove_watchpoint): Renamed to
7246 i386_dr_remove_watchpoint.
7247 (i386_low_region_ok_for_watchpoint): Renamed to
7248 i386_dr_region_ok_for_watchpoint.
7249 (i386_low_stopped_data_address): Renamed to
7250 i386_dr_stopped_data_address.
7251 (i386_low_stopped_by_watchpoint): Renamed to
7252 i386_dr_stopped_by_watchpoint.
7253 * i386-low.c (i386_show_dr): Renamed to
7254 i386_dr_show and made nonstatic. All uses updated.
7255 (i386_length_and_rw_bits): Renamed to
7256 i386_dr_length_and_rw_bits and made nonstatic.
7258 (i386_insert_aligned_watchpoint): Renamed to
7259 i386_dr_insert_aligned_watchpoint and made nonstatic.
7261 (i386_remove_aligned_watchpoint): Renamed to
7262 i386_dr_remove_aligned_watchpoint and made nonstatic.
7264 (i386_update_inferior_debug_regs): Renamed to
7265 i386_dr_update_inferior_debug_regs and made nonstatic.
7267 (i386_low_insert_watchpoint): Renamed to
7268 i386_dr_insert_watchpoint. All uses updated.
7269 (i386_low_remove_watchpoint): Renamed to
7270 i386_dr_remove_watchpoint. All uses updated.
7271 (i386_low_region_ok_for_watchpoint): Renamed to
7272 i386_dr_region_ok_for_watchpoint. All uses updated.
7273 (i386_low_stopped_data_address): Renamed to
7274 i386_dr_stopped_data_address. All uses updated.
7275 (i386_low_stopped_by_watchpoint): Renamed to
7276 i386_dr_stopped_by_watchpoint. All uses updated.
7278 2014-06-18 Gary Benson <gbenson@redhat.com>
7280 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7281 (i386_dr_low_can_set_control): Likewise.
7282 (i386_insert_aligned_watchpoint): New check.
7284 2014-06-18 Gary Benson <gbenson@redhat.com>
7286 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7289 2014-06-18 Gary Benson <gbenson@redhat.com>
7291 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7292 instead of fatal and error.
7293 (i386_handle_nonaligned_watchpoint): Likewise.
7295 2014-06-18 Gary Benson <gbenson@redhat.com>
7297 * i386-low.c (i386_get_debug_register_length): New macro.
7298 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7299 (i386_show_dr): Use debug_printf instead of fprintf. Use
7300 phex to format values.
7302 2014-06-18 Gary Benson <gbenson@redhat.com>
7304 * i386-low.h: Comment changes.
7305 * i386-low.c: Likewise.
7307 2014-06-18 Gary Benson <gbenson@redhat.com>
7309 * i386-low.c: Whitespace changes.
7311 2014-06-12 Tom Tromey <tromey@redhat.com>
7313 * utils.c (freeargv): Remove.
7315 2014-06-12 Tom Tromey <tromey@redhat.com>
7317 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7318 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7319 (parse_debug_format_options): Likewise.
7320 (gdbserver_usage): Likewise.
7321 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7322 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7323 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7325 ($(LIBGNU)): Depend on libiberty.
7326 (all-lib): Recurse into all subdirs.
7327 (install-only): Invoke "install" target in subdirs.
7328 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7330 * configure: Rebuild.
7331 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7332 for vasprintf, vsnprintf, or gettimeofday.
7333 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7336 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7338 * development.sh: Delete.
7339 * Makefile.in (config.status): Adjust dependency on development.sh.
7340 * configure.ac: Adjust development.sh source call.
7341 * configure: Regenerate.
7343 2014-06-02 Pedro Alves <palves@redhat.com>
7345 * ax.c (gdb_free_agent_expr): New function.
7346 * ax.h (gdb_free_agent_expr): New declaration.
7347 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7349 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7351 (clear_breakpoint_conditions_and_commands): New function.
7352 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7353 (clear_breakpoint_conditions_and_commands): New declaration.
7355 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7357 * linux-aarch64-low.c (asm/ptrace.h): Include.
7359 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7361 Fix TLS access for -static -pthread.
7362 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7363 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7364 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7366 2014-05-20 Pedro Alves <palves@redhat.com>
7368 * linux-aarch64-low.c (aarch64_insert_point)
7369 (aarch64_remove_point): No longer check whether the type is
7370 supported here. Adjust to new interface.
7371 (the_low_target): Install aarch64_supports_z_point_type as
7372 supports_z_point_type method.
7373 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7374 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7375 instead of a Z packet char. Adjust.
7376 (arm_supports_z_point_type): New function.
7377 (arm_insert_point, arm_remove_point): Adjust to new interface.
7378 (the_low_target): Install arm_supports_z_point_type.
7379 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7380 (cris_insert_point, cris_remove_point): Adjust to new interface.
7381 Don't check whether the type is supported here.
7382 (the_low_target): Install cris_supports_z_point_type.
7383 * linux-low.c (linux_supports_z_point_type): New function.
7384 (linux_insert_point, linux_remove_point): Adjust to new interface.
7385 * linux-low.h (struct linux_target_ops) <insert_point,
7386 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7387 raw_breakpoint pointer parameter.
7388 <supports_z_point_type>: New method.
7389 * linux-mips-low.c (mips_supports_z_point_type): New function.
7390 (mips_insert_point, mips_remove_point): Adjust to new interface.
7391 Use mips_supports_z_point_type.
7392 (the_low_target): Install mips_supports_z_point_type.
7393 * linux-ppc-low.c (the_low_target): Install NULL as
7394 supports_z_point_type method.
7395 * linux-s390-low.c (the_low_target): Install NULL as
7396 supports_z_point_type method.
7397 * linux-sparc-low.c (the_low_target): Install NULL as
7398 supports_z_point_type method.
7399 * linux-x86-low.c (x86_supports_z_point_type): New function.
7400 (x86_insert_point): Adjust to new insert_point interface. Use
7401 insert_memory_breakpoint. Adjust to new
7402 i386_low_insert_watchpoint interface.
7403 (x86_remove_point): Adjust to remove_point interface. Use
7404 remove_memory_breakpoint. Adjust to new
7405 i386_low_remove_watchpoint interface.
7406 (the_low_target): Install x86_supports_z_point_type.
7407 * lynx-low.c (lynx_target_ops): Install NULL as
7408 supports_z_point_type callback.
7409 * nto-low.c (nto_supports_z_point_type): New.
7410 (nto_insert_point, nto_remove_point): Adjust to new interface.
7411 (nto_target_ops): Install nto_supports_z_point_type.
7412 * mem-break.c: Adjust intro comment.
7413 (struct raw_breakpoint) <raw_type, size>: New fields.
7414 <inserted>: Update comment.
7415 <shlib_disabled>: Delete field.
7416 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7417 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7418 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7419 (raw_bkpt_type_to_target_hw_bp_type): New function.
7420 (find_enabled_raw_code_breakpoint_at): New function.
7421 (find_raw_breakpoint_at): New type and size parameters. Use them.
7422 (insert_memory_breakpoint): New function, based off
7423 set_raw_breakpoint_at.
7424 (remove_memory_breakpoint): New function.
7425 (set_raw_breakpoint_at): Reimplement.
7426 (set_breakpoint): New, based on set_breakpoint_at.
7427 (set_breakpoint_at): Reimplement.
7428 (delete_raw_breakpoint): Go through the_target->remove_point
7429 instead of assuming memory breakpoints.
7430 (find_gdb_breakpoint_at): Delete.
7431 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7432 (find_gdb_breakpoint): New function.
7433 (set_gdb_breakpoint_at): Delete.
7434 (z_type_supported): New function.
7435 (set_gdb_breakpoint_1): New function, loosely based off
7436 set_gdb_breakpoint_at.
7437 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7438 (delete_gdb_breakpoint_at): Delete.
7439 (delete_gdb_breakpoint_1): New function, loosely based off
7440 delete_gdb_breakpoint_at.
7441 (delete_gdb_breakpoint): New function.
7442 (clear_gdb_breakpoint_conditions): Rename to ...
7443 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7445 (add_condition_to_breakpoint): Make static.
7446 (add_breakpoint_condition): Take a struct breakpoint pointer
7447 instead of an address. Adjust.
7448 (gdb_condition_true_at_breakpoint): Rename to ...
7449 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7451 (gdb_condition_true_at_breakpoint): Reimplement.
7452 (add_breakpoint_commands): Take a struct breakpoint pointer
7453 instead of an address. Adjust.
7454 (gdb_no_commands_at_breakpoint): Rename to ...
7455 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7456 parameter. Return true if no breakpoint was found. Change debug
7458 (gdb_no_commands_at_breakpoint): Reimplement.
7459 (run_breakpoint_commands): Rename to ...
7460 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7461 and change return type to boolean.
7462 (run_breakpoint_commands): New function.
7463 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7464 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7465 breakpoint. Go through the_target->remove_point instead of
7466 assuming memory breakpoint.
7467 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7468 software and hardware breakpoints.
7469 (reinsert_raw_breakpoint): Go through the_target->insert_point
7470 instead of assuming memory breakpoint.
7471 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7472 software and hardware breakpoints.
7473 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7474 Check both software and hardware breakpoints.
7475 (validate_inserted_breakpoint): Assert the breakpoint is a
7476 software breakpoint. Set the inserted flag to -1 instead of
7477 setting shlib_disabled.
7478 (delete_disabled_breakpoints): Adjust.
7479 (validate_breakpoints): Only validate software breakpoints.
7480 Adjust to inserted flag change.
7481 (check_mem_read, check_mem_write): Skip breakpoint types other
7482 than software breakpoints. Adjust to inserted flag change.
7483 * mem-break.h (enum raw_bkpt_type): New enum.
7484 (raw_breakpoint, struct process_info): Forward declare.
7485 (Z_packet_to_target_hw_bp_type): Delete declaration.
7486 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7487 (set_gdb_breakpoint, delete_gdb_breakpoint)
7488 (clear_breakpoint_conditions): New declarations.
7489 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7490 (breakpoint_inserted_here): Update comment.
7491 (add_breakpoint_condition, add_breakpoint_commands): Replace
7492 address parameter with a breakpoint pointer parameter.
7493 (gdb_breakpoint_here): Update comment.
7494 (delete_gdb_breakpoint_at): Delete.
7495 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7496 * server.c (process_point_options): Take a struct breakpoint
7497 pointer instead of an address. Adjust.
7498 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7499 delete_gdb_breakpoint.
7500 * spu-low.c (spu_target_ops): Install NULL as
7501 supports_z_point_type method.
7502 * target.h: Include mem-break.h.
7503 (struct target_ops) <prepare_to_access_memory>: Update comment.
7504 <supports_z_point_type>: New field.
7505 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7506 instead of a char. Also take a raw breakpoint pointer.
7507 * win32-arm-low.c (the_low_target): Install NULL as
7508 supports_z_point_type.
7509 * win32-i386-low.c (i386_supports_z_point_type): New function.
7510 (i386_insert_point, i386_remove_point): Adjust to new interface.
7511 (the_low_target): Install i386_supports_z_point_type.
7512 * win32-low.c (win32_supports_z_point_type): New function.
7513 (win32_insert_point, win32_remove_point): Adjust to new interface.
7514 (win32_target_ops): Install win32_supports_z_point_type.
7515 * win32-low.h (struct win32_target_ops):
7516 <supports_z_point_type>: New method.
7517 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7518 instead of a char. Also take a raw breakpoint pointer.
7520 2014-05-20 Pedro Alves <palves@redhat.com>
7522 * mem-break.h: Include break-common.h.
7523 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7524 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7525 (Z_packet_to_target_hw_bp_type): New declaration.
7526 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7527 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7528 (Z_PACKET_ACCESS_WP): Delete macros.
7529 (Z_packet_to_hw_type): Delete function.
7530 * i386-low.h: Don't include break-common.h here.
7531 (Z_packet_to_hw_type): Delete declaration.
7532 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7533 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7534 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7535 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7536 * linux-aarch64-low.c: Don't include break-common.h here.
7537 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7538 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7539 (Z_packet_to_target_hw_bp_type): Delete function.
7540 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7542 (mips_insert_point, mips_remove_point): Use
7543 Z_packet_to_target_hw_bp_type.
7545 2014-05-20 Pedro Alves <palves@redhat.com>
7547 * linux-aarch64-low.c: Include break-common.h.
7548 (enum target_point_type): Delete.
7549 (Z_packet_to_point_type): Rename to ...
7550 (Z_packet_to_target_hw_bp_type): ... this, and return a
7551 target_hw_bp_type instead.
7552 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7553 instead of an enum target_point_type.
7554 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7556 (aarch64_dr_state_insert_one_point)
7557 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7558 (aarch64_handle_aligned_watchpoint)
7559 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7560 Take an enum target_hw_bp_type instead of an enum
7562 (aarch64_supports_z_point_type): New function.
7563 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7564 use Z_packet_to_target_hw_bp_type.
7566 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7568 * configure.ac: Only use -Werror by default when DEVELOPMENT
7570 * configure: Regenerate.
7572 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7574 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7575 * linux-x86-low.c (X86_64_USER_REGS): New.
7576 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7578 2014-04-28 Yao Qi <yao@codesourcery.com>
7580 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7583 2014-04-25 Pedro Alves <palves@redhat.com>
7586 * linux-low.c (linux_attach_fail_reason_string): New function.
7587 (linux_attach_lwp): Delete.
7588 (linux_attach_lwp_1): Rename to ...
7589 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7590 argument. Remove "initial" parameter. Return int instead of
7591 void. Don't error or warn here.
7592 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7593 failure to attach to the tgid. Call warning when failing to
7595 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7596 argument. Remove "initial" parameter. Return int instead of
7597 void. Don't error or warn here.
7598 (linux_attach_fail_reason_string): New declaration.
7599 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7600 interface change. Use linux_attach_fail_reason_string.
7602 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7603 Walfred Tedeschi <walfred.tedeschi@intel.com>
7605 * Makefile.in: Added rules to handle new files
7606 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7607 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7608 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7609 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7610 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7611 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7613 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7614 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7615 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7616 i386/x32-avx512.xml.
7617 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7618 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7619 i386/x32-avx512-linux.xml.
7620 * i387-fp.c (num_avx512_k_registers): New constant for number
7622 (num_avx512_zmmh_low_registers): New constant for number of
7623 lower ZMM registers (0-15).
7624 (num_avx512_zmmh_high_registers): New constant for number of
7625 higher ZMM registers (16-31).
7626 (num_avx512_ymmh_registers): New contant for number of higher
7627 YMM registers (ymm16-31 added by avx521 on x86_64).
7628 (num_avx512_xmm_registers): New constant for number of higher
7629 XMM registers (xmm16-31 added by AVX512 on x86_64).
7630 (struct i387_xsave): Add space for AVX512 registers.
7631 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7632 Add code to handle AVX512 registers.
7633 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7634 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7635 prototypei from generated file.
7636 (tdesc_amd64_avx512_linux): Likewise.
7637 (init_registers_x32_avx512_linux): Likewise.
7638 (tdesc_x32_avx512_linux): Likewise.
7639 (init_registers_i386_avx512_linux): Likewise.
7640 (tdesc_i386_avx512_linux): Likewise.
7641 (x86_64_regmap): Add AVX512 registers.
7642 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7644 (initialize_low_arch): Add code to initialize AVX512 registers.
7646 2014-04-23 Pedro Alves <palves@redhat.com>
7648 * mem-break.c (find_gdb_breakpoint_at): Make static.
7649 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7651 2014-04-23 Pedro Alves <palves@redhat.com>
7653 * i386-low.c: Don't include break-common.h here.
7654 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7655 prototype to take target_hw_bp_type as argument instead of a Z
7657 * i386-low.h: Include break-common.h here.
7658 (Z_packet_to_hw_type): Declare.
7659 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7661 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7662 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7663 (x86_remove_point): Convert the packet number to a
7664 target_hw_bp_type before calling i386_low_remove_watchpoint.
7665 * win32-i386-low.c (i386_insert_point): Convert the packet number
7666 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7667 (i386_remove_point): Convert the packet number to a
7668 target_hw_bp_type before calling i386_low_remove_watchpoint.
7670 2014-04-23 Pedro Alves <palves@redhat.com>
7672 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7674 2014-04-10 Pedro Alves <palves@redhat.com>
7676 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7677 Check if the condition or command is NULL before checking if the
7678 breakpoint is known. On success, return true.
7679 * mem-break.h (add_breakpoint_condition): Document return.
7680 (add_breakpoint_commands): Add describing comment.
7681 * server.c (skip_to_semicolon): New function.
7682 (process_point_options): Use it.
7684 2014-04-09 Pedro Alves <palves@redhat.com>
7686 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7689 2014-02-27 Pedro Alves <palves@redhat.com>
7692 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7694 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7696 (last_thread_of_process_p): Take a PID argument instead of a
7698 (linux_wait_for_lwp): Delete.
7699 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7701 (linux_low_filter_event): New function, party factored out from
7702 linux_wait_for_event.
7703 (linux_wait_for_event): Rename to ...
7704 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7705 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7706 sigsuspend. Check for zombie leaders.
7707 (linux_wait_for_event): Reimplement as wrapper around
7708 linux_wait_for_event_filtered.
7709 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7710 a normal or signal exit is seen, it's the whole process exiting.
7711 (wait_for_sigstop): No longer a for_each_inferior callback.
7712 Rewrite on top of linux_wait_for_event_filtered.
7713 (stop_all_lwps): Call wait_for_sigstop directly.
7714 * server.c (resume, handle_target_event): Handle
7715 TARGET_WAITKIND_NO_RESUMED.
7717 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7719 * win32-low.c (psapi_get_dll_name,
7720 * win32_CreateToolhelp32Snapshot): Delete.
7721 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7722 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7724 (handle_load_dll): Add function description.
7725 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7727 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7729 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7731 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7732 base address when calling win32_add_one_solib.
7733 (handle_load_dll): Delete local variable load_addr.
7734 Remove 0x1000 offset applied to DLL base address when calling
7735 win32_add_one_solib.
7736 (handle_unload_dll): Add comment.
7738 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7740 * win32-low.c (win32_add_all_dlls): Renames
7741 win32_ensure_ntdll_loaded. Rewrite function documentation.
7742 Adjust implementation to always load all DLLs.
7743 Add 0x1000 offset to DLL base address when calling
7744 win32_add_one_solib.
7745 (child_initialization_done): New static global.
7746 (do_initial_child_stuff): Set child_initialization_done to
7747 zero during child initialization, and 1 after. Replace call
7748 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7750 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7751 (handle_unload_dll): Add function documentation.
7752 (get_child_debug_event): Ignore load and unload DLL events
7753 during child initialization.
7755 2014-02-20 Doug Evans <dje@google.com>
7757 Remove global all_lwps.
7758 * inferiors.h (ptid_of): Move here from linux-low.h.
7759 (pid_of, lwpid_of): Ditto.
7760 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7761 parameter is a struct thread_info * now.
7762 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7763 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7764 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7766 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7767 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7768 * linux-arm-low.c (update_registers_callback): Update, "entry"
7769 parameter is a struct thread_info * now.
7770 Fetch lwpid from current_inferior directly.
7771 (arm_insert_point): Pass &all_threads to find_inferior instead of
7773 (arm_remove_point): Ditto.
7774 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7775 (arm_prepare_to_resume): Fetch pid from thread.
7776 (arm_read_description): Fetch lwpid from current_inferior directly.
7777 * linux-low.c (all_lwps): Delete.
7778 (delete_lwp): Delete call to remove_inferior.
7779 (handle_extended_wait): Fetch lwpid from thread.
7780 (add_lwp): Don't set lwp->entry.id. Remove call to
7781 add_inferior_to_list.
7782 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7783 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7784 (kill_one_lwp_callback): Ditto.
7785 (linux_kill): Don't dereference NULL pointer.
7786 Fetch ptid,lwpid from thread.
7787 (get_detach_signal): Fetch ptid from thread.
7788 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7789 Simplify call to regcache_invalidate_thread.
7790 (delete_lwp_callback): Update, "entry" parameter is a
7791 struct thread_info * now. Fetch pid from thread.
7792 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7793 (status_pending_p_callback): Update, "entry" parameter is a
7794 struct thread_info * now. Fetch ptid from thread.
7795 (find_lwp_pid): Update, "entry" parameter is a
7796 struct thread_info * now.
7797 (linux_wait_for_lwp): Fetch pid from thread.
7798 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7799 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7800 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7801 (dequeue_one_deferred_signal): Ditto.
7802 (cancel_breakpoint): Fetch ptid from current_inferior.
7803 (linux_wait_for_event): Pass &all_threads to find_inferior,
7804 not &all_lwps. Fetch ptid, lwpid from thread.
7805 (count_events_callback): Update, "entry" parameter is a
7806 struct thread_info * now.
7807 (select_singlestep_lwp_callback): Ditto.
7808 (select_event_lwp_callback): Ditto.
7809 (cancel_breakpoints_callback): Ditto.
7810 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7812 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7813 (unsuspend_one_lwp): Update, "entry" parameter is a
7814 struct thread_info * now.
7815 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7817 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7818 Fetch lwpid from thread, not lwp.
7819 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7820 Pass &all_threads to find_inferior, not &all_lwps.
7821 (send_sigstop): Fetch lwpid from thread, not lwp.
7822 (send_sigstop_callback): Update, "entry" parameter is a
7823 struct thread_info * now.
7824 (suspend_and_send_sigstop_callback): Ditto.
7825 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7826 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7827 struct thread_info * now.
7828 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7830 (lwp_running): Update, "entry" parameter is a
7831 struct thread_info * now.
7832 (stop_all_lwps): Fetch ptid from thread.
7833 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7834 (linux_resume_one_lwp): Fetch lwpid from thread.
7835 (linux_set_resume_request): Update, "entry" parameter is a
7836 struct thread_info * now. Fetch pid, lwpid from thread.
7837 (resume_status_pending_p): Update, "entry" parameter is a
7838 struct thread_info * now.
7839 (need_step_over_p): Ditto. Fetch lwpid from thread.
7840 (start_step_over): Fetch lwpid from thread.
7841 (linux_resume_one_thread): Update, "entry" parameter is a
7842 struct thread_info * now. Fetch lwpid from thread.
7843 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7844 (proceed_one_lwp): Update, "entry" parameter is a
7845 struct thread_info * now. Fetch lwpid from thread.
7846 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7847 struct thread_info * now.
7848 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7849 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7850 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7852 (regsets_store_inferior_registers): Ditto.
7853 (fetch_register, store_register): Ditto.
7854 (linux_read_memory, linux_write_memory): Ditto.
7855 (linux_request_interrupt): Ditto.
7856 (linux_read_auxv): Ditto.
7857 (linux_xfer_siginfo): Ditto.
7858 (linux_qxfer_spu): Ditto.
7859 (linux_qxfer_libraries_svr4): Ditto.
7860 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7861 moved to inferiors.h.
7863 (get_thread_lwp): Update.
7864 (struct lwp_info): Delete member "entry". Simplify comment for
7867 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7868 current_inferior directly.
7869 (update_watch_registers_callback): Update, "entry" parameter is a
7870 struct thread_info * now. Fetch pid from thread.
7871 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7872 (mips_insert_point): Fetch lwpid from current_inferior.
7873 Pass &all_threads to find_inferior, not &all_lwps.
7874 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7875 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7877 (mips_stopped_data_address): Ditto.
7878 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7880 * linux-tile-low.c (tile_arch_setup): Ditto.
7881 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7882 (update_debug_registers_callback): Update, "entry" parameter is a
7883 struct thread_info * now. Fetch pid from thread.
7884 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7885 Pass &all_threads to find_inferior, not &all_lwps.
7886 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7887 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7888 Pass &all_threads to find_inferior, not &all_lwps.
7889 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7890 (i386_dr_low_get_status): Ditto.
7891 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7892 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7893 (x86_linux_read_description): Ditto.
7894 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7896 2014-02-20 Doug Evans <dje@google.com>
7898 * inferiors.c (get_first_inferior): Fix buglet.
7900 2014-02-19 Doug Evans <dje@google.com>
7902 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7903 * inferiors.c (add_thread): Change result type to struct thread_info *.
7904 All callers updated.
7905 (add_lwp): Call add_thread here instead of in callers.
7906 All callers updated.
7907 * linux-low.h (get_lwp_thread): Rewrite.
7908 (struct lwp_info): New member "thread".
7910 2014-02-19 Doug Evans <dje@google.com>
7912 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7913 All callers updated.
7915 2014-02-19 Doug Evans <dje@google.com>
7917 * inferiors.c (add_thread): Fix whitespace.
7919 2014-02-19 Doug Evans <dje@google.com>
7921 * dll.c (clear_dlls): Replace accessing list implemention details
7923 * gdbthread.h (get_first_thread): Declare.
7924 * inferiors.c (for_each_inferior_with_data): New function.
7925 (get_first_thread): New function.
7926 (find_thread_ptid): Simplify.
7927 (get_first_inferior): New function.
7928 (clear_list): Delete.
7929 (one_inferior_p): New function.
7930 (clear_inferior_list): New function.
7931 (clear_inferiors): Update.
7932 * inferiors.h (for_each_inferior_with_data): Declare.
7933 (clear_inferior_list): Declare.
7934 (one_inferior_p): Declare.
7935 (get_first_inferior): Declare.
7936 * linux-low.c (linux_wait_for_event): Replace accessing list
7937 implemention details with API function.
7938 * server.c (target_running): Ditto.
7939 (accumulate_file_name_length): New function.
7940 (emit_dll_description): New function.
7941 (handle_qxfer_libraries): Replace accessing list implemention
7942 details with API function.
7943 (handle_qxfer_threads_worker): New function.
7944 (handle_qxfer_threads_proper): Replace accessing list implemention
7945 details with API function.
7946 (handle_query): Ditto.
7947 (visit_actioned_threads_callback_ftype): New typedef.
7948 (visit_actioned_threads_data): New struct.
7949 (visit_actioned_threads): Rewrite to be find_inferior callback.
7950 (resume): Call find_inferior.
7951 (handle_status): Replace accessing list implemention
7952 details with API function.
7953 (process_serial_event): Replace accessing list implemention details
7955 * target.c (set_desired_inferior): Replace accessing list implemention
7956 details with API function.
7957 * tracepoint.c (same_process_p): New function.
7958 (gdb_agent_about_to_close): Replace accessing list implemention
7959 details with API function.
7960 * win32-low.c (child_delete_thread): Replace accessing list
7961 implemention details with API function.
7962 (match_dll_by_basename): New function.
7963 (dll_is_loaded_by_basename): New function.
7964 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7965 details call to dll_is_loaded_by_basename.
7967 2014-02-19 Doug Evans <dje@google.com>
7969 * dll.h (struct dll_info): Add comment.
7970 * gdbthread.h (struct thread_info): Add comment.
7971 (current_ptid): Simplify.
7972 * inferiors.c (add_process): Update.
7973 (remove_process): Update.
7974 * inferiors.h (struct process_info): Rename member "head" to "entry".
7975 * linux-low.c (delete_lwp): Update.
7977 (last_thread_of_process_p): Update.
7978 (kill_one_lwp_callback, linux_kill): Update.
7979 (status_pending_p_callback): Update.
7980 (wait_for_sigstop): Update. Simplify read of ptid.
7981 (start_step_over): Update.
7982 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7983 (get_lwp_thread): Update.
7984 (struct lwp_info): Rename member "head" to "entry".
7985 * regcache.h (inferior_list_entry): Delete.
7986 * server.c (kill_inferior_callback): Update.
7987 (detach_or_kill_inferior_callback): Update.
7988 (print_started_pid): Update.
7989 (print_attached_pid): Update.
7990 (process_serial_event): Simplify read of ptid.
7991 * thread-db.c (thread_db_create_event): Update.
7992 (thread_db_get_tls_address): Update.
7993 * win32-low.c (current_inferior_ptid): Simplify.
7995 2014-02-19 Tom Tromey <tromey@redhat.com>
7997 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7999 (target_supports_btrace): Update.
8001 2014-02-14 Yao Qi <yao@codesourcery.com>
8003 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8004 (rsp-low-ipa.o): New target.
8006 2014-02-12 Tom Tromey <tromey@redhat.com>
8008 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8009 convert_ascii_to_int.
8010 * regcache.c (registers_to_string): Likewise.
8011 * remote-utils.c (decode_M_packet): Likewise.
8012 * server.c (process_serial_event): Likewise.
8014 2014-02-12 Tom Tromey <tromey@redhat.com>
8016 * server.c (handle_query, handle_v_run): Use hex2bin, not
8018 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8020 2014-02-12 Tom Tromey <tromey@redhat.com>
8022 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8023 convert_int_to_ascii.
8024 * regcache.c (registers_to_string, collect_register_as_string):
8026 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8028 * server.c (process_serial_event): Likewise.
8029 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8030 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8032 2014-02-12 Tom Tromey <tromey@redhat.com>
8034 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8035 bin2hex, not hexify.
8036 * tracepoint.c (cmd_qtstatus): Likewise.
8038 2014-02-12 Tom Tromey <tromey@redhat.com>
8040 * remote-utils.c (monitor_output): Pass explicit length to
8043 2014-02-12 Tom Tromey <tromey@redhat.com>
8045 * tracepoint.c: Include rsp-low.h.
8046 * server.c: Include rsp-low.h.
8047 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8048 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8050 * remote-utils.c: Include rsp-low.h.
8051 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8052 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8053 (convert_int_to_ascii, convert_ascii_to_int): Move to
8055 * regcache.c: Include rsp-low.h.
8056 * ax.c: Include rsp-low.h.
8057 * Makefile.in (SFILES): Add common/rsp-low.c.
8058 (OBS): Add rsp-low.o.
8059 (rsp-low.o): New target.
8061 2014-02-12 Tom Tromey <tromey@redhat.com>
8063 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8064 Include print-utils.h.
8065 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8066 (plongest, thirty_two, phex_nz): Remove.
8067 * Makefile.in (SFILES): Add common/print-utils.c.
8068 (OBS): Add print-utils.o.
8069 (print-utils-ipa.o): New target.
8070 (print-utils.o): New target.
8071 (IPA_OBJS): Add print-utils-ipa.o.
8073 2014-02-06 Tom Tromey <tromey@redhat.com>
8075 * Makefile.in (SFILES): Fix indentation.
8077 2014-02-05 Doug Evans <dje@google.com>
8079 * linux-low.c (linux_wait_for_event): Improve comment.
8080 (linux_wait_1): Keep current_inferior in sync with event_child.
8082 2014-01-22 Doug Evans <dje@google.com>
8084 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8086 2014-01-22 Doug Evans <dje@google.com>
8088 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8089 * configure: Regenerate.
8090 * config.in: Regenerate.
8091 * Makefile.in (SFILES): Add debug.c.
8093 * debug.c: New file.
8094 * debug.h: New file.
8095 * linux-aarch64-low.c (*): Update all debugging printfs to use
8096 debug_printf instead of fprintf.
8097 * linux-arm-low.c (*): Ditto.
8098 * linux-cris-low.c (*): Ditto.
8099 * linux-crisv32-low.c (*): Ditto.
8100 * linux-m32r-low.c (*): Ditto.
8101 * linux-sparc-low.c (*): Ditto.
8102 * linux-x86.c (*): Ditto.
8103 * linux-low.c (*): Ditto.
8104 (linux_wait_1): Add calls to debug_enter, debug_exit.
8105 (linux_wait): Remove redundant debugging printf.
8106 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8107 (linux_resume, unstop_all_lwps): Ditto.
8108 * mem-break.c (*): Update all debugging printfs to use
8109 debug_printf instead of fprintf.
8110 * remote-utils.c (*): Ditto.
8111 * thread-db.c (*): Ditto.
8112 * server.c #include <ctype.h>, "gdb_vecs.h".
8113 (debug_threads): Moved to debug.c.
8114 (*): Update all debugging printfs to use debug_printf instead of
8116 (start_inferior): Replace call to fflush with call to debug_flush.
8117 (monitor_show_help): Mention set debug-format.
8118 (parse_debug_format_options): New function.
8119 (handle_monitor_command): Handle "monitor set debug-format".
8120 (gdbserver_usage): Mention --debug-format.
8121 (main): Parse --debug-format.
8122 * server.h (debug_threads): Declaration moved to debug.h.
8124 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8125 trace_debug_1 that uses debug_printf.
8126 (tracepoint_look_up_symbols): Update all debugging printfs to use
8127 debug_printf instead of fprintf.
8129 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8131 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8134 2014-01-17 Pedro Alves <palves@redhat.com>
8137 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8138 defined after including gdb_proc_service.h.
8140 2014-01-16 Doug Evans <dje@google.com>
8142 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8143 (match_dll): Use it.
8145 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8147 * target.h (target_ops) <read_btrace>: Change parameters and
8148 return type to allow error reporting.
8149 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8150 trace reading errors on.
8151 * linux-low.c (linux_low_read_btrace): Pass trace reading
8153 (linux_low_disable_btrace): New.
8155 2014-01-15 Doug Evans <dje@google.com>
8157 * inferiors.c (thread_id_to_gdb_id): Delete.
8158 * inferiors.h (thread_id_to_gdb_id): Delete.
8160 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8162 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8163 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8166 2014-01-08 Pedro Alves <palves@redhat.com>
8168 * server.c (handle_status): Don't discard previous queued stop
8169 replies or thread's pending status here.
8170 (main) <disconnection>: Do it here instead.
8172 2014-01-08 Pedro Alves <palves@redhat.com>
8174 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8175 * server.c (visit_actioned_threads, handle_pending_status): New
8177 (handle_v_cont): Factor out parts to ...
8178 (resume): ... this new function. If in all-stop, and a thread
8179 being resumed has a pending status, report it without actually
8181 (myresume): Adjust to use the new 'resume' function.
8182 (clear_pending_status_callback, set_pending_status_callback)
8183 (find_status_pending_thread_callback): New functions.
8184 (handle_status): Handle the case of multiple threads having
8185 interesting statuses to report. Report threads' real last signal
8186 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8187 with an interesting thread to report the status for, instead of
8188 always reporting the status of the first thread.
8190 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8192 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8193 * gdbreplay.c (gdbreplay_version): Likewise.
8195 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8197 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8198 iov.iov_len with the real length in use.
8200 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8202 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8203 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8204 for all targets that use win32-low.c.
8205 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8206 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8208 2013-12-13 Pedro Alves <palves@redhat.com>
8210 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8211 if equal to TARGET_WAITKIND_LOADED.
8212 * win32-low.c (cached_status): New static global.
8213 (win32_wait): Add declaration.
8214 (do_initial_child_stuff): Flush all initial pending debug events
8215 up to the initial breakpoint.
8216 (win32_wait): If CACHED_STATUS was set, return that instead
8217 of doing a real wait. Remove the code resuming the execution
8218 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8219 during the initial phase. Also remove the code changing
8220 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8221 TARGET_WAITKIND_STOPPED.
8223 2013-12-11 Yao Qi <yao@codesourcery.com>
8225 * notif.c (handle_notif_ack): Return 0 if no notification
8228 2013-11-20 Doug Evans <dje@google.com>
8230 * linux-low.c (linux_set_resume_request): Fix comment.
8232 2013-11-20 Doug Evans <dje@google.com>
8234 * linux-low.c (resume_status_pending_p): Tweak comment.
8236 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8238 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8239 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8240 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8241 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8242 (srv_amd64_regobj): Add amd64-mpx.o.
8243 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8244 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8245 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8246 * i387-fp.c (num_pl_bnd_register) Added constant.
8247 (num_pl_bnd_cfg_registers) Added constant.
8248 (struct i387_xsave) Added reserved area and MPX fields.
8249 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8250 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8252 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8253 (init_registers_amd64_mpx_linux): Declare new function.
8254 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8255 (x86_64_regmap): Add MPX registers.
8256 (x86_linux_read_description): Add MPX case.
8257 (initialize_low_arch): Initialize MPX targets.
8259 2013-11-18 Tom Tromey <tromey@redhat.com>
8261 * configure: Rebuild.
8262 * configure.ac: Don't check for stdlib.h.
8263 * gdbreplay.c: Unconditionally include stdlib.h.
8265 2013-11-18 Tom Tromey <tromey@redhat.com>
8267 * config.in: Rebuild.
8268 * configure: Rebuild.
8269 * configure.ac: Don't use AC_HEADER_DIRENT.
8271 2013-11-18 Tom Tromey <tromey@redhat.com>
8273 * server.h: Don't check HAVE_STRING_H.
8274 * gdbreplay.c: Don't check HAVE_STRING_H.
8275 * configure: Rebuild.
8277 2013-11-18 Tom Tromey <tromey@redhat.com>
8279 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8282 2013-11-08 Tom Tromey <tromey@redhat.com>
8284 * configure, config.in: Rebuild.
8285 * configure.ac: Remove unused configury.
8287 2013-11-08 Tom Tromey <tromey@redhat.com>
8289 * acinclude.m4: Include common.m4, codeset.m4.
8290 * configure, config.in: Rebuild.
8291 * configure.ac: Use GDB_AC_COMMON.
8293 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8295 * linux-s390-low.c (HWCAP_S390_TE): New define.
8296 (s390_arch_setup): Consider the TE field in the HWCAP for
8297 determining 'have_regset_tdb'.
8299 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8302 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8305 2013-10-02 Pedro Alves <palves@redhat.com>
8307 * server.c (process_serial_event): Don't output "GDBserver
8308 exiting" if GDB is connected through stdio.
8309 * target.c (mywait): Likewise, be silent if GDB is connected
8312 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8314 * lynx-low.c (lynx_add_threads_after_attach): New function.
8315 (lynx_attach): Remove call to add_thread. Add call to
8316 lynx_add_threads_after_attach instead.
8318 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8320 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8321 * config.in, configure: Regenerated.
8323 2013-09-18 Yao Qi <yao@codesourcery.com>
8326 * server.c (start_inferior): Clear 'resume_info'.
8328 2013-09-16 Jiong Wang <jiwang@tilera.com>
8330 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8333 2013-09-16 Jiong Wang <jiwang@tilera.com>
8335 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8336 linux-tile-low.o to srv_tgtobj.
8338 2013-09-16 Will Newton <will.newton@linaro.org>
8340 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8343 2013-09-06 Pedro Alves <palves@redhat.com>
8345 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8346 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8347 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8348 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8349 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8350 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8352 2013-09-06 Pedro Alves <palves@redhat.com>
8354 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8355 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8357 2013-09-06 Pedro Alves <palves@redhat.com>
8359 * linux-amd64-ipa.c: Include tracepoint.h.
8360 * linux-i386-ipa.c: Include tracepoint.h.
8362 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8364 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8365 (ps_get_thread_area): New function.
8367 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8369 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8370 (initialize_low_arch): Call init_registers_crisv32 rather than
8371 init_register_crisv32.
8373 2013-09-05 Pedro Alves <palves@redhat.com>
8375 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8377 * hostio.h: ... this new file.
8378 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8379 win32-low.c: Include hostio.h.
8381 2013-09-05 Pedro Alves <palves@redhat.com>
8383 * server.h (gdb_client_data, handler_func, callback_handler_func)
8384 (delete_file_handler, add_file_handler, append_callback_event)
8385 (delete_callback_event, start_event_loop, initialize_event_loop):
8386 Move to event-loop.h and include it.
8387 * event-loop.h: New file.
8389 2013-09-05 Pedro Alves <palves@redhat.com>
8391 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8392 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8393 (loaded_dll, unloaded_dll): Move to ...
8394 * dll.h: ... this new file.
8395 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8397 2013-09-05 Pedro Alves <palves@redhat.com>
8399 * server.h (current_process, get_thread_process, all_processes)
8400 (add_inferior_to_list, for_each_inferior, current_inferior)
8401 (remove_inferior, add_process, remove_process, find_process_pid)
8402 (have_started_inferiors_p, have_attached_inferiors_p)
8403 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8404 (clear_inferiors, find_inferior, find_inferior_id)
8405 (inferior_target_data, set_inferior_target_data)
8406 (inferior_regcache_data, set_inferior_regcache_data): Move to
8407 inferiors.h, and include it.
8408 * inferiors.h: New file.
8410 2013-09-05 Pedro Alves <palves@redhat.com>
8412 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8416 2013-09-05 Pedro Alves <palves@redhat.com>
8418 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8420 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8421 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8422 (handle_tracepoint_general_set, handle_tracepoint_query)
8423 (tracepoint_finished_step, tracepoint_was_hit)
8424 (release_while_stepping_state_list, current_traceframe)
8425 (in_readonly_region, traceframe_read_mem)
8426 (fetch_traceframe_registers, traceframe_read_sdata)
8427 (traceframe_read_info, struct fast_tpoint_collect_status)
8428 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8429 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8430 (supply_fast_tracepoint_registers)
8431 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8432 (ipa_tdesc, claim_trampoline_space)
8433 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8434 (agent_mem_read, agent_get_trace_state_variable_value)
8435 (agent_set_trace_state_variable_value, agent_tsv_read)
8436 (agent_mem_read_string, get_raw_reg_func_addr)
8437 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8438 * tracepoint.h: ... this new file.
8440 2013-09-05 Pedro Alves <palves@redhat.com>
8442 * server.h (perror_with_name, error, fatal, warning, paddress)
8443 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8445 * utils.h: New file.
8447 2013-09-05 Pedro Alves <palves@redhat.com>
8449 * server.h (remote_debug, noack_mode, transport_is_reliable)
8450 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8451 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8452 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8453 (write_enn, initialize_async_io, enable_async_io)
8454 (disable_async_io, check_remote_input_interrupt_request)
8455 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8456 (dead_thread_notify, prepare_resume_reply)
8457 (decode_address_to_semicolon, decode_address, decode_m_packet)
8458 (decode_M_packet, decode_X_packet, decode_xfer_write)
8459 (decode_search_memory_packet, unhexify, hexify)
8460 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8461 (look_up_one_symbol, relocate_instruction)
8462 (monitor_output): Move to remote-utils.h, and include it.
8463 * remote-utils.h: New file.
8465 2013-09-05 Pedro Alves <palves@redhat.com>
8467 * server.h (_): Delete.
8469 2013-09-02 Pedro Alves <palves@redhat.com>
8471 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8472 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8474 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8476 2013-09-02 Pierre Muller <muller@sourceware.org>
8478 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8479 or WriteProcessMemory complete successfully and handle
8480 ERROR_PARTIAL_COPY error.
8482 2013-09-02 Pedro Alves <palves@redhat.com>
8484 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8485 error instead of EIO.
8487 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8490 * linux-low.c: Include filestuff.h.
8491 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8492 * lynx-low.c: Include filestuff.h.
8493 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8494 * server.c: Include filestuff.h.
8495 (main): Call notice_open_fds.
8496 * spu-low.c: Include filestuff.h.
8497 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8499 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8501 * Makefile.in: Explain why ../target and ../nat are not
8502 listed as include file search paths.
8503 (linux-waitpid.o): New object file rule.
8504 * configure.srv (srv_native_linux_obj): New variable.
8505 Replace all occurrences of linux native object files with
8506 $srv_native_linux_obj.
8507 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8508 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8509 (linux_enable_event_reporting): Remove declaration.
8510 (my_waitpid): Moved to common/linux-waitpid.c.
8511 (linux_wait_for_event): Pass ptid when calling
8512 linux_enable_event_reporting.
8513 (linux_supports_tracefork_flag): Remove.
8514 (linux_enable_event_reporting): Likewise.
8515 (linux_tracefork_grandchild): Remove.
8516 (STACK_SIZE): Moved to common/linux-ptrace.c.
8517 (linux_tracefork_child): Remove.
8518 (linux_test_for_tracefork): Remove.
8519 (linux_look_up_symbols): Call linux_supports_traceclone.
8520 (initialize_low): Remove call to linux_test_for_tracefork.
8521 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8522 common/linux-ptrace.h.
8523 (PTRACE_TYPE_ARG4): Likewise.
8524 Include linux-ptrace.h.
8526 2013-08-21 Pedro Alves <palves@redhat.com>
8528 * config.in: Renegerate.
8530 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8532 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8533 (SFILES): Remove $(srcdir)/common/target-common.c and
8534 add $(srcdir)/target/waitstatus.c.
8535 (OBS): Remove target-common.o and add waitstatus.o.
8536 (server_h): Remove $(srcdir)/../common/target-common.h and
8537 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8538 and $(srcdir)/../target/waitstatus.h.
8539 (target-common.o): Remove.
8540 (waitstatus.o): New target object file.
8541 * target.h: Do not include target-common.h and
8542 include target/resume.h, target/wait.h and
8543 target/waitstatus.h.
8545 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8547 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8548 to PTRACE_TYPE_ARG3.
8549 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8550 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8552 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8553 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8555 2013-07-27 Jie Zhang <jie@codesourcery.com>
8556 Daniel Jacobowitz <dan@codesourcery.com>
8557 Yao Qi <yao@codesourcery.com>
8559 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8560 (mips-linux-watch.o): New rule.
8561 (mips_linux_watch_h): New variable.
8562 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8564 * linux-mips-low.c: Include mips-linux-watch.h.
8565 (struct arch_process_info, struct arch_lwp_info): New.
8566 (update_watch_registers_callback): New function.
8567 (mips_linux_new_process, mips_linux_new_thread) New functions.
8568 (mips_linux_prepare_to_resume, mips_insert_point): New
8570 (mips_remove_point, mips_stopped_by_watchpoint): New
8572 (rsp_bp_type_to_target_hw_bp_type): New function.
8573 (mips_stopped_data_address): New function.
8574 (the_low_target): Add watchpoint support functions.
8576 2013-07-27 Yao Qi <yao@codesourcery.com>
8578 * i386-low.c: Include break-common.h.
8579 (enum target_hw_bp_type): Remove.
8581 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8583 * Makefile.in (SFILES): /common/target-common.c.
8584 (OBS): Add target-common.o.
8585 (server_h): Add $(srcdir)/../common/target-common.h.
8586 (target-common.o): New target.
8587 * server.c (queue_stop_reply_callback): Free
8588 status string after use.
8589 * target.c (target_waitstatus_to_string): Remove.
8590 * target.h: Include target-common.h.
8591 (resume_kind): Likewise.
8592 (target_waitkind): Likewise.
8593 (target_waitstatus): Likewise.
8594 (TARGET_WNOHANG): Likewise.
8596 2013-07-04 Yao Qi <yao@codesourcery.com>
8598 * Makefile.in (host_alias): Use @host_noncanonical@.
8599 (target_alias): Use @target_noncanonical@.
8600 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8601 ACX_NONCANONICAL_HOST.
8602 * configure: Regenerated.
8605 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8607 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8608 * configure: Rebuild.
8609 * Makefile.in (version_host, version_target): Get from configure.
8610 (version.c): Use $(version_host) and $(version_target).
8612 2013-07-03 Pedro Alves <palves@redhat.com>
8614 * Makefile.in (config.status): Depend on development.sh.
8615 * acinclude.m4: Include libmcheck.m4.
8616 * configure: Regenerate.
8618 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8620 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8621 attribute inside the parentheses.
8622 (winapi_DebugSetProcessKillOnExit): Ditto.
8623 (winapi_DebugBreakProcess): Ditto.
8624 (winapi_GenerateConsoleCtrlEvent): Ditto.
8626 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8628 * notif.h (notif_event): Add a dummy member to avoid compiler
8631 2013-07-01 Pedro Alves <palves@redhat.com>
8633 * hostio.c (HOSTIO_PATH_MAX): Define.
8634 (require_filename, handle_open, handle_unlink, handle_readlink):
8637 2013-07-01 Pedro Alves <palves@redhat.com>
8639 * server.h: Include "pathmax.h".
8640 * linux-low.c: Don't include sys/param.h.
8641 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8643 * win32-low.c: Don't include sys/param.h.
8644 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8646 2013-07-01 Pedro Alves <palves@redhat.com>
8648 * event-loop.c: Don't check HAVE_UNISTD_H before including
8650 * gdbreplay.c: Likewise.
8651 * remote-utils.c: Likewise.
8652 * server.c: Likewise.
8653 * configure.ac: Don't check for unistd.h.
8654 * configure: Regenerate.
8656 2013-06-28 Tom Tromey <tromey@redhat.com>
8658 * Makefile.in (version.c): Use version.in, not
8661 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8663 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8664 * configure: Rebuild.
8665 * Makefile.in (version_host, version_target): Get from configure.
8666 (version.c): Use $(version_host) and $(version_target).
8668 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8670 Fix trace-status to output user name without trailing colon.
8671 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8673 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8675 Fix trace-status to output proper start-time and stop-time.
8676 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8677 output start time and stop time in hex as gdb expects.
8679 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8681 * tracepoint.c (build_traceframe_info_xml): Output trace state
8682 variables present in the trace buffer.
8684 2013-06-24 Tom Tromey <tromey@redhat.com>
8686 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8688 (version.o): Remove.
8689 * gdbreplay.c: Include version.h.
8690 (version, host_name): Don't declare.
8691 * server.h: Include version.h.
8692 (version, host_name): Don't declare.
8694 2013-06-12 Pedro Alves <palves@redhat.com>
8696 * linux-x86-low.c (linux_is_elf64): Delete global.
8697 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8698 with local linux_pid_exe_is_elf_64_file use.
8700 2013-06-11 Pedro Alves <palves@redhat.com>
8702 * linux-low.c (regset_disabled, disable_regset): New functions.
8703 (regsets_fetch_inferior_registers)
8704 (regsets_store_inferior_registers): Use them.
8705 (initialize_regsets_info); Don't allocate the disabled_regsets
8707 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8710 2013-06-11 Pedro Alves <palves@redhat.com>
8712 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8715 2013-06-11 Pedro Alves <palves@redhat.com>
8717 * linux-x86-low.c (initialize_low_arch): Call
8718 init_registers_x32_avx_linux.
8720 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8722 Fix compatibility with Android Bionic.
8723 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8726 2013-06-07 Pedro Alves <palves@redhat.com>
8729 * Makefile.in (OBS): Add tdesc.o.
8730 (IPA_OBJS): Add tdesc-ipa.o.
8731 (tdesc-ipa.o): New rule.
8732 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8734 * linux-low.c (new_inferior): Delete.
8735 (disabled_regsets, num_regsets): Delete.
8736 (linux_add_process): Adjust to set the new per-process
8738 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8739 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8740 was a stop. When calling arch_setup, switch the current inferior
8741 to the thread that got an event.
8742 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8743 (regsets_fetch_inferior_registers)
8744 (regsets_store_inferior_registers): New regsets_info parameter.
8746 (linux_register_in_regsets): New regs_info parameter. Adjust to
8748 (register_addr, fetch_register, store_register): New usrregs_info
8749 parameter. Adjust to use it.
8750 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8751 parameter regs_info. Adjust to use it.
8752 (linux_fetch_registers): Get the current inferior's regs_info, and
8754 (linux_store_registers): Ditto.
8755 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8756 (initialize_low): Don't initialize the target_regsets here. Call
8757 initialize_low_arch.
8758 * linux-low.h (target_regsets): Delete declaration.
8759 (struct regsets_info): New.
8760 (struct usrregs_info): New.
8761 (struct regs_info): New.
8762 (struct process_info_private) <new_inferior>: New field.
8763 (struct linux_target_ops): Delete the num_regs, regmap, and
8764 regset_bitmap fields. New field regs_info.
8765 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8766 * i387-fp.c (num_xmm_registers): Delete.
8767 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8768 calls to new interface.
8769 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8770 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8771 Infer the number of xmm registers from the regcache's target
8773 * i387-fp.h (num_xmm_registers): Delete.
8774 * inferiors.c (add_thread): Don't install the thread's regcache
8776 * proc-service.c (gregset_info): Fetch the current inferior's
8777 regs_info. Adjust to use it.
8778 * regcache.c: Include tdesc.h.
8779 (register_bytes, reg_defs, num_registers)
8780 (gdbserver_expedite_regs): Delete.
8781 (get_thread_regcache): If the thread doesn't have a regcache yet,
8782 create one, instead of aborting gdbserver.
8783 (regcache_invalidate_one): Rename to ...
8784 (regcache_invalidate_thread): ... this.
8785 (regcache_invalidate_one): New.
8786 (regcache_invalidate): Only invalidate registers of the current
8788 (init_register_cache): Add target_desc parameter, and use it.
8789 (new_register_cache): Ditto. Assert the target description has a
8790 non zero registers_size.
8791 (regcache_cpy): Add assertions. Adjust.
8792 (realloc_register_cache, set_register_cache): Delete.
8793 (registers_to_string, registers_from_string): Adjust.
8794 (find_register_by_name, find_regno, find_register_by_number)
8795 (register_cache_size): Add target_desc parameter, and use it.
8796 (free_register_cache_thread, free_register_cache_thread_one)
8797 (regcache_release, register_cache_size): New.
8798 (register_size): Add target_desc parameter, and use it.
8799 (register_data, supply_register, supply_register_zeroed)
8800 (supply_regblock, supply_register_by_name, collect_register)
8801 (collect_register_as_string, collect_register_by_name): Adjust.
8802 * regcache.h (struct target_desc): Forward declare.
8803 (struct regcache) <tdesc>: New field.
8804 (init_register_cache, new_register_cache): Add target_desc
8806 (regcache_invalidate_thread): Declare.
8807 (regcache_invalidate_one): Delete declaration.
8808 (regcache_release): Declare.
8809 (find_register_by_number, register_cache_size, register_size)
8810 (find_regno): Add target_desc parameter.
8811 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8813 * remote-utils.c: Include tdesc.h.
8814 (outreg, prepare_resume_reply): Adjust.
8815 * server.c: Include tdesc.h.
8816 (gdbserver_xmltarget): Delete declaration.
8817 (get_features_xml, process_serial_event): Adjust.
8818 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8820 (struct process_info) <tdesc>: New field.
8821 (ipa_tdesc): Declare.
8822 * tdesc.c: New file.
8823 * tdesc.h: New file.
8824 * tracepoint.c: Include tdesc.h.
8825 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8826 (get_context_regcache): Adjust to pass ipa_tdesc down.
8827 (do_action_at_tracepoint): Adjust to get the register cache size
8828 from the context regcache's description.
8829 (traceframe_walk_blocks): Adjust to get the register cache size
8830 from the current trace frame's description.
8831 (traceframe_get_pc): Adjust to get current trace frame's
8832 description and pass it down.
8833 (gdb_collect): Adjust to get the register cache size from the
8835 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8836 (gdbserver_xmltarget): Delete.
8837 (initialize_low_tracepoint): Set the ipa's target description.
8838 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8839 (initialize_low_tracepoint): Set the ipa's target description.
8840 * linux-x86-low.c: Include tdesc.h.
8841 [__x86_64__] (is_64bit_tdesc): New.
8842 (ps_get_thread_area, x86_get_thread_area): Use it.
8843 (i386_cannot_store_register): Rename to ...
8844 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8845 (i386_cannot_fetch_register): Rename to ...
8846 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8847 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8849 (target_regsets): Rename to ...
8850 (x86_regsets): ... this.
8851 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8853 (x86_siginfo_fixup): Use is_64bit_tdesc.
8854 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8855 (tdesc_x32_avx_linux, tdesc_x32_linux)
8856 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8858 (x86_linux_update_xmltarget): Delete.
8859 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8860 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8861 (AMD64_LINUX_USER64_CS): New.
8862 (x86_linux_read_description): New, based on
8863 x86_linux_update_xmltarget.
8864 (same_process_callback): New.
8865 (x86_arch_setup_process_callback): New.
8866 (x86_linux_update_xmltarget): New.
8867 (x86_regsets_info): New.
8868 (amd64_linux_regs_info): New.
8869 (i386_linux_usrregs_info): New.
8870 (i386_linux_regs_info): New.
8871 (x86_linux_regs_info): New.
8872 (x86_arch_setup): Reimplement.
8873 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8874 (x86_emit_ops): Ditto.
8875 (the_low_target): Adjust. Install x86_linux_regs_info,
8876 x86_cannot_fetch_register, and x86_cannot_store_register.
8877 (initialize_low_arch): New.
8878 * linux-ia64-low.c (tdesc_ia64): Declare.
8879 (ia64_fetch_register): Adjust.
8880 (ia64_usrregs_info, regs_info): New globals.
8881 (ia64_regs_info): New function.
8882 (the_low_target): Adjust.
8883 (initialize_low_arch): New function.
8884 * linux-sparc-low.c (tdesc_sparc64): Declare.
8885 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8887 (sparc_arch_setup): New function.
8888 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8889 (the_low_target): Adjust.
8890 (initialize_low_arch): New function.
8891 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8892 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8893 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8894 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8895 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8896 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8897 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8898 (tdesc_powerpc_isa205_vsx64l): Declare.
8899 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8900 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8901 (ppc_set_pc, ppc_get_hwcap): Adjust.
8902 (ppc_usrregs_info): Forward declare.
8903 (!__powerpc64__) ppc_regmap_adjusted: New global.
8904 (ppc_arch_setup): Adjust to the current process'es target
8906 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8907 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8908 (ppc_store_evrregset): Adjust.
8909 (target_regsets): Rename to ...
8910 (ppc_regsets): ... this, and make static.
8911 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8912 (ppc_regs_info): New function.
8913 (the_low_target): Adjust.
8914 (initialize_low_arch): New function.
8915 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8916 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8917 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8918 (tdesc_s390x_linux64v2): Declare.
8919 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8920 (s390_fill_gregset, s390_store_last_break): Adjust.
8921 (target_regsets): Rename to ...
8922 (s390_regsets): ... this, and make static.
8923 (s390_get_pc, s390_set_pc): Adjust.
8924 (s390_get_hwcap): New target_desc parameter, and use it.
8925 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8926 (s390_arch_setup): Adjust to set the current process'es target
8927 description. Don't adjust the regmap.
8928 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8929 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8930 (regs_info_3264): New globals.
8931 (s390_regs_info): New function.
8932 (the_low_target): Adjust.
8933 (initialize_low_arch): New function.
8934 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8935 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8936 [__mips64] (init_registers_mips_linux)
8937 (init_registers_mips_dsp_linux): Delete defines.
8938 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8939 (have_dsp): New global.
8940 (mips_read_description): New, based on mips_arch_setup.
8941 (mips_arch_setup): Reimplement.
8942 (get_usrregs_info): New function.
8943 (mips_cannot_fetch_register, mips_cannot_store_register)
8944 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8945 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8946 (target_regsets): Rename to ...
8947 (mips_regsets): ... this, and make static.
8948 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8949 (dsp_regs_info, regs_info): New globals.
8950 (mips_regs_info): New function.
8951 (the_low_target): Adjust.
8952 (initialize_low_arch): New function.
8953 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8954 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8956 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8957 (arm_read_description): New, with bits factored from
8959 (arm_arch_setup): Reimplement.
8960 (target_regsets): Rename to ...
8961 (arm_regsets): ... this, and make static.
8962 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8963 (arm_regs_info): New function.
8964 (the_low_target): Adjust.
8965 (initialize_low_arch): New function.
8966 * linux-m68k-low.c (tdesc_m68k): Declare.
8967 (target_regsets): Rename to ...
8968 (m68k_regsets): ... this, and make static.
8969 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8970 (m68k_regs_info): New function.
8971 (m68k_arch_setup): New function.
8972 (the_low_target): Adjust.
8973 (initialize_low_arch): New function.
8974 * linux-sh-low.c (tdesc_sharch): Declare.
8975 (target_regsets): Rename to ...
8976 (sh_regsets): ... this, and make static.
8977 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8978 (sh_regs_info, sh_arch_setup): New functions.
8979 (the_low_target): Adjust.
8980 (initialize_low_arch): New function.
8981 * linux-bfin-low.c (tdesc_bfin): Declare.
8982 (bfin_arch_setup): New function.
8983 (bfin_usrregs_info, regs_info): New globals.
8984 (bfin_regs_info): New function.
8985 (the_low_target): Adjust.
8986 (initialize_low_arch): New function.
8987 * linux-cris-low.c (tdesc_cris): Declare.
8988 (cris_arch_setup): New function.
8989 (cris_usrregs_info, regs_info): New globals.
8990 (cris_regs_info): New function.
8991 (the_low_target): Adjust.
8992 (initialize_low_arch): New function.
8993 * linux-cris-low.c (tdesc_crisv32): Declare.
8994 (cris_arch_setup): New function.
8995 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8996 (cris_regs_info): New function.
8997 (the_low_target): Adjust.
8998 (initialize_low_arch): New function.
8999 * linux-m32r-low.c (tdesc_m32r): Declare.
9000 (m32r_arch_setup): New function.
9001 (m32r_usrregs_info, regs_info): New globals.
9002 (m32r_regs_info): Adjust.
9003 (initialize_low_arch): New function.
9004 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9005 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9006 (tic6x_usrregs_info): Forward declare.
9007 (tic6x_read_description): New function, based on ...
9008 (tic6x_arch_setup): ... this. Reimplement.
9009 (target_regsets): Rename to ...
9010 (tic6x_regsets): ... this, and make static.
9011 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9012 (tic6x_regs_info): New function.
9013 (the_low_target): Adjust.
9014 (initialize_low_arch): New function.
9015 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9016 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9017 (target_regsets): Rename to ...
9018 (xtensa_regsets): ... this, and make static.
9019 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9021 (xtensa_arch_setup, xtensa_regs_info): New functions.
9022 (the_low_target): Adjust.
9023 (initialize_low_arch): New function.
9024 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9025 (nios2_arch_setup): Set the current process'es tdesc.
9026 (target_regsets): Rename to ...
9027 (nios2_regsets): ... this.
9028 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9029 (nios2_regs_info): New function.
9030 (the_low_target): Adjust.
9031 (initialize_low_arch): New function.
9032 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9033 (aarch64_arch_setup): Set the current process'es tdesc.
9034 (target_regsets): Rename to ...
9035 (aarch64_regsets): ... this.
9036 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9037 (aarch64_regs_info): New function.
9038 (the_low_target): Adjust.
9039 (initialize_low_arch): New function.
9040 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9042 (target_regsets): Rename to ...
9043 (tile_regsets): ... this.
9044 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9045 (tile_regs_info): New function.
9046 (tile_arch_setup): Set the current process'es tdesc.
9047 (the_low_target): Adjust.
9048 (initialize_low_arch): New function.
9049 * spu-low.c (tdesc_spu): Declare.
9050 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9051 * win32-arm-low.c (tdesc_arm): Declare.
9052 (arm_arch_setup): New function.
9053 (the_low_target): Install arm_arch_setup instead of
9055 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9056 (init_windows_x86): Rename to ...
9057 (i386_arch_setup): ... this. Set `win32_tdesc'.
9058 (the_low_target): Adjust.
9059 * win32-low.c (win32_tdesc): New global.
9060 (child_add_thread): Don't create the thread cache here.
9061 (do_initial_child_stuff): Set the new process'es tdesc.
9062 * win32-low.h (struct target_desc): Forward declare.
9063 (win32_tdesc): Declare.
9064 * lynx-i386-low.c (tdesc_i386): Declare global.
9065 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9066 * lynx-low.c (lynx_tdesc): New global.
9067 (lynx_add_process): Set the new process'es tdesc.
9068 * lynx-low.h (struct target_desc): Forward declare.
9069 (lynx_tdesc): Declare global.
9070 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9071 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9072 * nto-low.c (nto_tdesc): New global.
9073 (do_attach): Set the new process'es tdesc.
9074 * nto-low.h (struct target_desc): Forward declare.
9075 (nto_tdesc): Declare.
9076 * nto-x86-low.c (tdesc_i386): Declare.
9077 (nto_x86_arch_setup): Set `nto_tdesc'.
9079 2013-06-04 Gary Benson <gbenson@redhat.com>
9081 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9082 to qSupported response when appropriate.
9083 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9084 with nonzero-length annex.
9085 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9086 arguments supplied in annex.
9088 2013-05-31 Doug Evans <dje@google.com>
9091 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9092 64 bits in 64-cross-32 environment.
9094 2013-05-28 Pedro Alves <palves@redhat.com>
9096 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9097 (aarch64-without-fpu.c): Delete rule.
9098 * configure.srv (aarch64*-*-linux*): Remove references to
9099 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9100 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9103 2013-05-24 Pedro Alves <palves@redhat.com>
9105 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9106 instead of strchr/decode_address. Error if the range isn't split
9107 with a ','. Don't assume there's be a ':' in the action.
9109 2013-05-23 Yao Qi <yao@codesourcery.com>
9110 Pedro Alves <palves@redhat.com>
9112 * linux-low.c (lwp_in_step_range): New function.
9113 (linux_wait_1): If the thread was range stepping and stopped
9114 outside the stepping range, report the stop to GDB. Otherwise,
9115 continue stepping. Add range stepping debug output.
9116 (linux_set_resume_request): Copy the step range from the resume
9118 (linux_supports_range_stepping): New.
9119 (linux_target_ops) <supports_range_stepping>: Set to
9120 linux_supports_range_stepping.
9121 * linux-low.h (struct linux_target_ops)
9122 <supports_range_stepping>: New field.
9123 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9124 * linux-x86-low.c (x86_supports_range_stepping): New.
9125 (the_low_target) <supports_range_stepping>: Set to
9126 x86_supports_range_stepping.
9127 * server.c (handle_v_cont): Handle 'r' action.
9128 (handle_v_requests): Append ";r" if the target supports range
9130 * target.h (struct thread_resume) <step_range_start,
9131 step_range_end>: New fields.
9132 (struct target_ops) <supports_range_stepping>:
9134 (target_supports_range_stepping): New macro.
9136 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9138 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9139 confusion in comment.
9141 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9143 * lynx-low.c (struct process_info_private): New type.
9144 (lynx_add_process): New function.
9145 (lynx_create_inferior, lynx_attach): Replace calls to
9146 add_process by calls to lynx_add_process.
9147 (lynx_resume): If PTID is null, then try using
9148 current_process()->private->last_wait_event_ptid.
9150 (lynx_clear_inferiors): Delete. The contents of that function
9151 has been inlined in lynx_mourn;
9152 (lynx_wait_1): Save the ptid in the process's private data.
9153 (lynx_mourn): Free the process' private data. Replace call
9154 to lynx_clear_inferiors by call to clear_inferiors.
9156 2013-05-17 Yao Qi <yao@codesourcery.com>
9158 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9161 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9163 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9164 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9165 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9166 PT_TEXT_END_ADDR guards. Update comments.
9167 (linux_target_op) <read_offsets>: Conditionally define to
9168 linux_read_offsets if the target is UCLIBC and if it defines
9169 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9171 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9172 Andrew Jenner <andrew@codesourcery.com>
9174 * Makefile.in (SFILES): Add linux-nios2-low.c.
9175 (clean): Add action to delete nios2-linux.c.
9176 (nios2-linux.c): New rule.
9177 * configure.srv: Add nios2*-*-linux*.
9178 * linux-nios2-low.c: New.
9180 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9182 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9184 2013-04-25 Hui Zhu <hui@codesourcery.com>
9187 * ax.c (ax_printf): Add fflush.
9189 2013-04-22 Tom Tromey <tromey@redhat.com>
9191 * Makefile.in (SFILES): Add filestuff.c.
9192 (OBS): Add filestuff.o.
9193 (filestuff.o): New target.
9194 * config.in, configure: Rebuild.
9195 * configure.ac: Check for fdwalk, pipe2.
9197 2013-04-17 Pedro Alves <palves@redhat.com>
9199 * configure.ac (USE_THREAD_DB): Delete variable.
9200 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9201 Don't AC_SUBST USE_THREAD_DB.
9202 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9203 * config.in, configure: Regenerate.
9205 2013-04-16 Pedro Alves <palves@redhat.com>
9207 * linux-low.h (struct lwp_info) <thread_known>: Move under
9208 the USE_THREAD_DB #ifdef.
9210 2013-04-16 Pedro Alves <palves@redhat.com>
9212 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9213 (linux-low.o): Delete rule.
9214 * linux-low.h: Always include "gdb_thread_db.h" instead of
9215 conditionally including thread_db.h.
9216 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9219 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9221 * Makefile.in (install-only): Fix make install regression.
9223 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9225 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9226 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9228 * gdbserver.1: Remove.
9230 2013-03-22 Pedro Alves <palves@redhat.com>
9232 * linux-low.c (handle_extended_wait): Don't call
9233 linux_enable_event_reporting.
9235 2013-03-15 Tony Theodore <tonyt@logyst.com>
9238 * Makefile.in (SHELL): Use @SHELL@.
9240 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9242 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9245 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9247 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9248 Remove extraneous NULL element.
9250 2013-03-13 Yao Qi <yao@codesourcery.com>
9252 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9253 'V' block in trace frame.
9255 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9257 * target.h (struct target_ops): Add btrace ops.
9258 (target_supports_btrace): New macro.
9259 (target_enable_btrace): New macro.
9260 (target_disable_btrace): New macro.
9261 (target_read_btrace): New macro.
9262 * gdbthread.h (struct thread_info): Add btrace field.
9263 * server.c: Include btrace-common.h.
9264 (handle_btrace_general_set): New function.
9265 (handle_btrace_enable): New function.
9266 (handle_btrace_disable): New function.
9267 (handle_general_set): Call handle_btrace_general_set.
9268 (handle_qxfer_btrace): New function.
9269 (struct qxfer qxfer_packets[]): Add btrace entry.
9270 * inferiors.c (remove_thread): Disable btrace.
9271 * linux-low: Include linux-btrace.h.
9272 (linux_low_enable_btrace): New function.
9273 (linux_low_read_btrace): New function.
9274 (linux_target_ops): Add btrace ops.
9275 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9276 Add srv_linux_btrace=yes.
9277 (x86_64-*-linux*): Add linux-btrace.o.
9278 Add srv_linux_btrace=yes.
9279 * configure.ac: Define HAVE_LINUX_BTRACE.
9280 * config.in: Regenerated.
9281 * configure: Regenerated.
9283 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9285 * server.c (handle_qxfer): Preserve error message if -3 is
9287 (qxfer): Document the -3 return value.
9289 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9291 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9292 (linux_btrace_h): New variable.
9293 (linux-btrace.o): New rule.
9295 2013-03-08 Stan Shebs <stan@codesourcery.com>
9296 Hafiz Abid Qadeer <abidh@codesourcery.com>
9298 * tracepoint.c (trace_buffer_size): New global.
9299 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9300 (init_trace_buffer): Change to one-argument function. Allocate
9301 trace buffer memory.
9302 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9303 handle QTBuffer:size packet.
9304 (cmd_bigqtbuffer_size): New function.
9305 (initialize_tracepoint): Call init_trace_buffer with
9306 DEFAULT_TRACE_BUFFER_SIZE.
9307 * server.c (handle_query): Add QTBuffer:size in the
9310 2013-03-07 Yao Qi <yao@codesourcery.com>
9312 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9313 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9315 (cmd_qtsp): Adjust condition. Do post increment.
9316 Set cur_action and cur_step_action back to 0.
9318 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9321 * linux-low.c (linux_write_memory): Return early success if LEN is
9324 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9326 * configure.srv: Add x86_64-*-cygwin* as target.
9328 2013-02-28 Tom Tromey <tromey@redhat.com>
9330 * configure.ac: Invoke AC_SYS_LARGEFILE.
9331 * configure, config.in: Rebuild.
9333 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9335 * win32-low.c: Throughout, fix format strings and casts of
9336 printf-like functions to avoid type related warnings on all
9338 (get_child_debug_event): Print dwDebugEventCode as hex since
9339 that's how it's usually documented.
9341 2013-02-28 Yao Qi <yao@codesourcery.com>
9343 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9346 2013-02-27 Jiong Wang <jiwang@tilera.com>
9348 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9349 (reg-tilegx32.c): New rule.
9350 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9351 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9352 different register info initializer according to elf class.
9353 (init_registers_tilgx32): New function. The tilegx32 register info
9355 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9356 (tile_store_gregset): Likewise.
9358 2013-02-27 Yao Qi <yao@codesourcery.com>
9360 * server.c (process_point_options): Print debug message when
9361 debug_threads is true.
9363 2013-02-26 Yao Qi <yao@codesourcery.com>
9365 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9367 2013-02-19 Pedro Alves <palves@redhat.com>
9368 Kai Tietz <ktietz@redhat.com>
9372 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9373 instead of strtoul to extract address from packet.
9374 (process_serial_event) <'z'>: Likewise.
9376 2013-02-18 Yao Qi <yao@codesourcery.com>
9378 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9380 2013-02-14 Pedro Alves <palves@redhat.com>
9384 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9385 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9387 2013-02-14 Pedro Alves <palves@redhat.com>
9389 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9391 2013-02-14 Pedro Alves <palves@redhat.com>
9393 * tracepoint.c (save_string): Delete.
9394 (add_tracepoint_action): Use savestring instead of save_string.
9396 2013-02-12 Pedro Alves <palves@redhat.com>
9398 * linux-xtensa-low.c: Ditto.
9399 * xtensa-xtregs.c: Ditto.
9401 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9403 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9406 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9408 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9409 aarch64_num_wp_regs and aarch64_num_bp_regs to
9410 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9412 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9414 * linux-aarch64-low.c (ps_get_thread_area): Replace
9415 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9417 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9418 Marcus Shawcroft <marcus.shawcroft@arm.com>
9419 Nigel Stephens <nigel.stephens@arm.com>
9420 Yufeng Zhang <yufeng.zhang@arm.com>
9422 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9423 (aarch64.c, aarch64-without-fpu.c): New targets.
9424 * configure.srv (aarch64*-*-linux*): New.
9425 * linux-aarch64-low.c: New file.
9427 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9429 * linux-low.c (handle_extended_wait, linux_create_inferior)
9430 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9431 (dequeue_one_deferred_signal, linux_resume_one_thread)
9432 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9433 (linux_tracefork_grandchild, linux_test_for_tracefork)
9434 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9435 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9436 where the argument is 0.
9438 2013-01-25 Yao Qi <yao@codesourcery.com>
9440 * event-loop.c: Include "queue.h".
9441 (gdb_event_p): New typedef.
9442 (struct gdb_event) <next_event>: Remove.
9443 (event_queue): Change to QUEUE(gdb_event_p).
9444 (async_queue_event): Remove.
9445 (gdb_event_xfree): New.
9446 (initialize_event_loop): New.
9447 (process_event): Use API from QUEUE.
9448 (wait_for_event): Likewise.
9449 * server.c (main): Call initialize_event_loop.
9450 * server.h (initialize_event_loop): Declare.
9452 2013-01-18 Yao Qi <yao@codesourcery.com>
9454 * ax.h (struct eval_agent_expr_context): New.
9455 (gdb_eval_agent_expr): Update declaration.
9456 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9457 TFRAME. Add new argument CTX.
9458 * server.h (struct eval_agent_expr_context): Declare.
9459 (agent_mem_read, agent_tsv_read): Update declaration.
9460 (agent_mem_read_string): Likewise.
9461 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9462 (add_traceframe_block): Add new argument TPOINT.
9463 Increase TPOINT->traceframe_usage.
9464 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9465 eval_tracepoint_agent_expr.
9466 (condition_true_at_tracepoint): Likewise.
9467 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9468 (agent_mem_read_string, agent_tsv_read): Likewise.
9470 2013-01-16 Yao Qi <yao@codesourcery.com>
9472 * linux-low.c (linux_resume_one_lwp): Don't check
9473 'lwp->bp_reinsert != 0'.
9475 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9476 Pedro Alves <palves@redhat.com>
9478 * lynx-low.c (ptrace_request_to_str): Define a temporary
9479 macro and use it to simplify this function's implementation.
9481 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9483 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9486 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9488 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9490 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9492 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9494 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9496 * lynx-low.c (lynx_resume): Use the resume_info parameter
9497 to determine the ptid for the lynx_ptrace call, unless
9498 it is equal to minus_one_ptid, in which case we use the
9499 ptid of the current_inferior.
9500 (lynx_wait_1): After having received a thread create/exit
9501 event, resume the inferior's execution using the signaling
9502 thread's ptid, rather than the old ptid.
9504 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9506 * lynx-low.c (lynx_resume): Delete variable ret.
9508 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9510 * gdbreplay.c (gdbreplay_version): Update copyright year.
9511 * server.c (gdbserver_version): Likewise.
9513 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9515 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9518 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9520 * lynx-low.c (ptrace_request_to_str): Add handling for
9523 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9525 * lynx-low.c (lynx_attach): Delete variable new_process.
9527 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9529 * lynx-low.c (lynx_create_inferior): Delete variable
9532 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9534 * lynx-low.c (ptrace_request_to_str): Do not handle
9535 PTRACE_GETTHREADLIST if this macro does not exist.
9537 2012-12-15 Yao Qi <yao@codesourcery.com>
9539 * Makefile.in (OBS): Add notif.o.
9540 * notif.c, notif.h: New.
9541 * server.c: Include "notif.h".
9542 (struct vstop_notif) <next>: Remove.
9544 (queue_stop_reply): Update.
9545 (push_event, send_next_stop_reply): Remove.
9546 (discard_queued_stop_replies): Update.
9547 (notif_stop): New variable.
9548 (handle_v_stopped): Remove.
9549 (handle_v_requests): Don't call handle_v_stopped. Call
9550 handle_ack_notif instead.
9551 (queue_stop_reply_callback): Call notif_event_enque instead
9552 of queue_stop_reply.
9553 (handle_status): Don't call send_next_stop_reply, call
9554 notif_write_event instead.
9555 (kill_inferior_callback): Likewise.
9556 (detach_or_kill_inferior_callback): Likewise.
9557 (main): Call initialize_notif.
9558 (process_serial_event): Call QUEUE_is_empty.
9559 (handle_target_event): Call notif_push instead of push event.
9560 * server.h (push_event): Remove declaration.
9562 2012-12-10 Tom Tromey <tromey@redhat.com>
9564 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9565 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9568 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9569 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9570 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9571 (amd64-linux-ipa.o, ax.o): Rewrite.
9572 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9573 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9574 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9575 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9576 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9577 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9578 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9579 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9580 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9581 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9582 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9583 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9584 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9585 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9586 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9587 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9588 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9589 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9590 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9591 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9592 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9593 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9594 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9595 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9596 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9597 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9598 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9599 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9600 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9601 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9602 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9603 (reg-tilegx.o): Remove.
9604 (all_object_files): New macro.
9605 Include .deps files.
9606 * aclocal.m4, configure: Rebuild.
9607 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9608 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9609 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9611 2012-12-05 Tom Tromey <tromey@redhat.com>
9614 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9616 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9618 * configure.ac: Check for linux/perf_event.h.
9619 * config.in: Regenerated.
9620 * configure: Regenerated.
9622 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9624 * hostio.c (handle_readlink): Decrease buffer size
9625 parameter passed to readlink by one byte.
9627 2012-11-26 Yao Qi <yao@codesourcery.com>
9629 * configure.ac (build_warnings): Append '-Wempty-body'.
9630 * configure: Regenerated.
9631 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9634 2012-11-15 Pierre Muller <muller@sourceware.org>
9636 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9637 * config.in: Regenerate.
9638 * configure: Regenerate.
9639 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9640 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9641 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9642 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9644 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9645 instead of <sys/wait.h> header.
9646 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9648 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9650 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9651 (various make rules): Remove -DGDBSERVER
9653 2012-11-09 Yao Qi <yao@codesourcery.com>
9655 * spu-low.c (current_ptid): Move it to ..
9656 * gdbthread.h: ... here. New.
9657 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9658 * server.c (myresume, process_serial_event): Likewise.
9659 * thread-db.c (thread_db_find_new_threads): Likewise.
9660 * tracepoint.c (run_inferior_command): Likewise.
9662 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9664 * server.c (handle_search_memory_1): Include access length in
9667 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9669 * linux-crisv32-low.c: Fix compile errors.
9671 2012-09-04 Yao Qi <yao@codesourcery.com>
9673 * tracepoint.c (cmd_qtsv): Adjust debug message.
9674 Don't check CUR_TPOINT.
9676 2012-08-28 Yao Qi <yao@codesourcery.com>
9678 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9679 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9680 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9681 Remove declarations of xmalloc, xreallloc, xstrdup and
9683 * Makefile.in (libiberty_h): New.
9684 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9685 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9687 2012-08-23 Yao Qi <yao@codesourcery.com>
9689 * server.h: Remove declaration of 'xsnprintf'.
9691 2012-08-22 Keith Seitz <keiths@redhat.com>
9693 * server.h: Include build-gnulib-gbserver/config.h.
9694 * gdbreplay.c: Likewise.
9696 2012-08-08 Doug Evans <dje@google.com>
9698 * Makefile.in (SFILES): Add gdb_vecs.c.
9699 (OBS): Add gdb_vecs.o.
9700 (gdb_vecs_h, host_defs_h): New variables.
9701 (thread-db.o): Add $(gdb_vecs_h) dependency.
9702 (gdb_vecs.o): New rule.
9703 * thread-db.c: #include "gdb_vecs.h".
9704 (thread_db_load_search): Use a vector to iterate over path elements.
9705 Handle text appearing after "$pdir".
9707 * configure.ac: Add check for strstr.
9708 * config.in: Regenerate.
9709 * configure: Regenerate.
9711 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9713 * hostio.c (handle_pread): If pread fails, fall back to attempting
9715 (handle_pwrite): Likewise for pwrite.
9717 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9719 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9720 between unsupported TYPE and unimplementable ADDR/LEN combination.
9721 (arm_insert_point): Act on new return value.
9723 2012-07-31 Pedro Alves <palves@redhat.com>
9725 * server.c (process_point_options): Only skip tokens if we find
9726 one that is unrecognized. Don't treat 'X' specially while
9727 skipping unrecognized tokens.
9729 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9731 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9732 to 4-byte-align HW breakpoint addresses for Thumb.
9734 2012-07-27 Yao Qi <yao@codesourcery.com>
9738 * server.h: Declare gdb_agent_about_to_close.
9739 * target.c (kill_inferior): Include "agent.h".
9740 New. Send command 'kill'.
9741 * target.h (kill_inferior): Removed macro.
9742 * tracepoint.c (gdb_agent_about_to_close): New.
9743 (gdb_agent_helper_thread): Handle command 'close'.
9744 Wait endlessly until the inferior stops.
9745 Install gdb_agent_remove_socket to atexit hook.
9746 (agent_socket_name): New static variable.
9747 (gdb_agent_socket_init): Replace local variable 'name' with
9748 'agent_socket_name'.
9749 (gdb_agent_remove_socket): New.
9751 2012-07-27 Yao Qi <yao@codesourcery.com>
9753 * server.c (process_point_options): Stop at 'X' when parsing.
9755 2012-07-19 Michael Eager <eager@eagercon.com>
9757 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9759 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9760 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9761 hardware breakpoint.
9763 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9765 * gdbserver/linux-low.c (initialize_low): Call
9766 linux_ptrace_init_warnings.
9768 2012-07-02 Doug Evans <dje@google.com>
9770 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9773 2012-07-02 Stan Shebs <stan@codesourcery.com>
9775 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9776 (ax.o): Add it to build rule.
9778 (OBS): Add format.o.
9779 (IPA_OBS): Add format.o.
9780 * server.c (handle_query): Claim support for breakpoint commands.
9781 (process_point_options): Add command case.
9782 (process_serial_event): Leave running if there are printfs in
9784 * mem-break.h (any_persistent_commands): Declare.
9785 (add_breakpoint_commands): Declare.
9786 (gdb_no_commands_at_breakpoint): Declare.
9787 (run_breakpoint_commands): Declare.
9788 * mem-break.c (struct point_command_list): New struct.
9789 (struct breakpoint): New field command_list.
9790 (any_persistent_commands): New function.
9791 (add_commands_to_breakpoint): New function.
9792 (add_breakpoint_commands): New function.
9793 (gdb_no_commands_at_breakpoint): New function.
9794 (run_breakpoint_commands): New function.
9795 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9797 * ax.c: Include format.h.
9798 (ax_printf): New function.
9799 (gdb_eval_agent_expr): Add printf opcode.
9801 2012-06-13 Yao Qi <yao@codesourcery.com>
9803 * server.c (start_inferior): Remove duplicated writes to fields
9804 'last_resume_kind' and 'last_status' of 'current_inferior'.
9806 2012-06-12 Yao Qi <yao@codesourcery.com>
9807 Pedro Alves <palves@redhat.com>
9809 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9811 * server.c (handle_v_cont): Extend comment.
9813 2012-06-11 Yao Qi <yao@codesourcery.com>
9815 * linux-low.c (linux_attach): Add 'static'.
9817 2012-06-06 Yao Qi <yao@codesourcery.com>
9819 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9821 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9823 Fix gcc -flto compilation warning.
9824 * server.c (main): Make variable multi_mode and attach volatile.
9826 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9828 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9829 if the platform doesn't know about it.
9831 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9833 * Makefile.in (SFILES): Add linux-tile-low.c.
9834 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9835 * configure.srv: Handle tilegx-*-linux*.
9836 * linux-tile-low.c: New file.
9838 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9840 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9842 2012-05-24 Pedro Alves <palves@redhat.com>
9846 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9848 2012-05-24 Pedro Alves <palves@redhat.com>
9852 Replace target_signal with gdb_signal throughout.
9854 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9856 * linux-low.c (linux_store_registers): Avoid the copying sequence
9857 when no data has been retrieved by ptrace.
9859 2012-05-22 Will Deacon <will.deacon@arm.com>
9861 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9862 Include asm/ptrace.h.
9863 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9866 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9868 * linux-low.c (linux_store_registers): Don't re-retrieve data
9869 with ptrace that has already been obtained from /proc. Always
9870 copy any data retrieved with ptrace to the buffer supplied.
9872 2012-05-11 Yao Qi <yao@codesourcery.com>
9873 Pedro Alves <palves@redhat.com>
9875 * linux-low.c (enum stopping_threads_kind): New.
9876 (stopping_threads): Change type to `enum stopping_threads_kind'.
9877 (handle_extended_wait): If stopping and suspending threads, leave
9878 the new_lwp suspended too.
9879 (linux_wait_for_event): Adjust.
9880 (stop_all_lwps): Set `stopping_threads' to
9881 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9882 whether we're suspending threads or just stopping them. Assert no
9885 2012-04-29 Yao Qi <yao@codesourcery.com>
9887 * server.h: Move some code to ...
9888 * gdbthread.h: ... here. New.
9889 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9890 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9891 (nto-low.o, win32-low.o): Likewise.
9892 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9893 * regcache.c, remote-utils.c, server.c: Likewise.
9894 * target.c, tracepoint.c, win32-low.c: Likewise.
9896 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9898 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9899 (PTRACE_ARG4_TYPE): Likewise.
9900 (PTRACE_XFER_TYPE): Likewise.
9901 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9902 ptrace to PTRACE_ARG3_TYPE.
9903 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9904 (PTRACE_ARG4_TYPE): Likewise.
9905 (PTRACE_XFER_TYPE): Likewise.
9906 (linux_detach_one_lwp): Cast fourth argument of
9907 ptrace to long then PTRACE_ARG4_TYPE.
9908 (regsets_fetch_inferior_registers): Cast third argument of
9909 ptrace to long then PTRACE_ARG3_TYPE.
9910 (regsets_store_inferior_registers): Likewise.
9912 2012-04-20 Pedro Alves <palves@redhat.com>
9914 * configure: Regenerate.
9916 2012-04-19 Pedro Alves <palves@redhat.com>
9918 * Makefile.in (GNULIB_BUILDDIR): New.
9919 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9920 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9921 (all, install-only, uninstall, clean-info, all-lib, clean): No
9922 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9923 (maintainer-clean realclean distclean): Use subdir_do.
9925 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9926 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9927 * acinclude.m4: Include acx_configure_dir.m4.
9928 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9929 calls. Call AC_PROG_RANLIB. Configure gnulib using
9932 (GNULIB_STDINT_H): Adjust.
9933 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9934 * gdbreplay.c: Include build-gnulib/config.h.
9935 * server.h: Likewise.
9936 * aclocal.m4: Regenerate.
9937 * config.in: Regenerate.
9938 * configure: Regenerate.
9940 2012-04-19 Pedro Alves <palves@redhat.com>
9942 * Makefile.in (LIBGNU, INCGNU): Adjust.
9943 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9944 (all, install-only, uninstall, clean-info, all-lib, clean)
9945 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9946 * configure.ac: Adjust AC_OUTPUT output.
9947 * aclocal.m4: Regenerate.
9948 * configure: Regenerate.
9950 2012-04-19 Pedro Alves <palves@redhat.com>
9952 * Makefile.in (generated_files): New.
9953 (server_h): Remove the explicit dependency on config.h, and depend
9954 on $generated_files.
9956 2012-04-19 Pedro Alves <palves@redhat.com>
9958 * Makefile.in (INCGNU): Add -Ignulib.
9960 2012-04-19 Pedro Alves <palves@redhat.com>
9962 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9963 (INCGNU): ... this, and spell out -I here.
9964 (GNULIB_LIB): Rename to ...
9966 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9968 2012-04-19 Pedro Alves <palves@redhat.com>
9970 * config.in: Regenerate.
9972 2012-04-19 Pedro Alves <palves@redhat.com>
9974 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9975 * server.h (memmem): Remove declaration.
9976 * config.in: Regenerate.
9977 * configure: Regenerate.
9979 2012-04-19 Yao Qi <yao@codesourcery.com>
9981 * Makefile.in (SFILES): Add common/vec.c.
9985 2012-04-19 Yao Qi <yao@codesourcery.com>
9987 * remote-utils.c (prepare_resume_reply): Replace with macro
9988 target_core_of_thread.
9989 * server.c (handle_qxfer_threads_proper): Likewise.
9990 * target.h (traget_core_of_thread): New macro.
9992 2012-04-18 Pedro Alves <palves@redhat.com>
9994 * aclocal.m4: Regenerate.
9995 * configure: Regenerate.
9997 2012-04-16 Yao Qi <yao@codesourcery.com>
9999 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10000 duplicated on address.
10002 2012-04-16 Yao Qi <yao@codesourcery.com>
10004 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10005 (struct tracepoint_action_ops) <send>: New field.
10006 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10007 (agent_expr_send, x_tracepoint_action_send): New.
10008 (l_tracepoint_action_send): New.
10009 (cmd_qtdp): Download and install tracepoint
10010 according to `use_agent'.
10011 (run_inferior_command): Add one more parameter `len'.
10013 (tracepoint_send_agent): New.
10014 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10016 2012-04-16 Yao Qi <yao@codesourcery.com>
10018 * tracepoint.c (download_tracepoints): Moved to ...
10019 (cmd_qtstart): ... here.
10021 2012-04-14 Yao Qi <yao@codesourcery.com>
10023 * tracepoint.c: Include inttypes.h.
10024 (struct collect_memory_action): Use sized types.
10025 (struct tracepoint): Likewise.
10026 (cmd_qtdp, stop_tracing): Update print specifiers.
10027 (cmd_qtp, response_tracepoint): Likewise.
10028 (collect_data_at_tracepoint): Likewise.
10029 (collect_data_at_step): Likewise.
10031 2012-04-14 Yao Qi <yao@codesourcery.com>
10033 Import gnulib module inttypes.
10034 * aclocal.m4, config.in, configure: Regenerated.
10036 2012-04-14 Yao Qi <yao@codesourcery.com>
10038 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10039 Makefile and config.status at last.
10041 2012-04-13 Yao Qi <yao@codesourcery.com>
10043 * tracepoint.c: Include stdint.h unconditionally.
10045 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10047 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10048 on BFD_HAVE_SYS_PROCFS_TYPE.
10049 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10050 * configure: Regenerate.
10051 * config.in: Likewise.
10053 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10055 * Makefile.in (clean): Also remove x32.c x32-linux.c
10056 x32-avx.c x32-avx-linux.c.
10057 (x32.o): New target.
10059 (x32-linux.o): Likewise.
10060 (x32-linux.c): Likewise.
10061 (x32-avx.o): Likewise.
10062 (x32-avx.c): Likewise.
10063 (x32-avx-linux.o): Likewise.
10064 (x32-avx-linux.c): Likewise.
10066 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10067 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10068 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10069 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10070 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10071 i386/x32-avx-linux.xml.
10073 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10074 (init_registers_x32_avx_linux): Likwise.
10075 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10076 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10078 2012-04-13 Pedro Alves <palves@redhat.com>
10080 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10081 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10082 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10083 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10086 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10088 * linux-x86-low.c (compat_x32_clock_t): New.
10089 (compat_x32_siginfo_t): Likewise.
10090 (compat_x32_siginfo_from_siginfo): Likewise.
10091 (siginfo_from_compat_x32_siginfo): Likewise.
10092 (linux_is_elf64): Likewise.
10093 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10094 and siginfo_from_compat_x32_siginfo for x32.
10095 (x86_arch_setup): Set linux_is_elf64.
10097 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10100 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10102 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10103 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10104 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10105 compatible with process.
10107 2012-04-12 Yao Qi <yao@codesourcery.com>
10109 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10110 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10111 (install-only, install-info, clean): Handle sub dir gnulib.
10112 (all-lib, am--refresh): New targets.
10113 (memmem.o): Remove target.
10114 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10115 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10116 (AC_REPLACE_FUNCS): Remove memmem.
10117 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10118 (AC_OUTPUT): Generate Makefile in gnulib/.
10119 * aclocal.m4, config.in, configure: Regenerated.
10121 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10123 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10125 2012-04-05 Pedro Alves <palves@redhat.com>
10127 -Werror=strict-aliasing
10129 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10132 2012-04-04 Pedro Alves <palves@redhat.com>
10134 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10135 (sparc_store_gregset_from_stack, sparc_store_gregset)
10136 (sparc_breakpoint_at): Fix formatting.
10138 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10140 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10142 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10143 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10144 * config.in: Regenerate.
10145 * configure: Likewise.
10147 2012-03-29 Pedro Alves <palves@redhat.com>
10149 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10150 Correct ptrace arguments.
10152 2012-03-28 Pedro Alves <palves@redhat.com>
10154 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10155 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10156 (IA64_FR1_REGNUM): New defines.
10157 (ia64_fetch_register): New.
10158 (the_low_target): Install it.
10159 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10161 * linux-low.c (linux_fetch_registers): Try the
10162 the_low_target.fetch_register hook first.
10164 * linux-arm-low.c (the_low_target): Adjust.
10165 * linux-bfin-low.c (the_low_target): Adjust.
10166 * linux-cris-low.c (the_low_target): Adjust.
10167 * linux-crisv32-low.c (the_low_target): Adjust.
10168 * linux-m32r-low.c (the_low_target): Adjust.
10169 * linux-m68k-low.c (the_low_target): Adjust.
10170 * linux-mips-low.c (the_low_target): Adjust.
10171 * linux-ppc-low.c (the_low_target): Adjust.
10172 * linux-s390-low.c (the_low_target): Adjust.
10173 * linux-sh-low.c (the_low_target): Adjust.
10174 * linux-sparc-low.c (the_low_target): Adjust.
10175 * linux-tic6x-low.c (the_low_target): Adjust.
10176 * linux-x86-low.c (the_low_target): Adjust.
10177 * linux-xtensa-low.c (the_low_target): Adjust.
10179 2012-03-26 Pedro Alves <palves@redhat.com>
10181 * server.c (handle_qxfer_libraries): Don't bail early if
10182 the_target->qxfer_libraries_svr4 is not NULL.
10184 2012-03-26 Pedro Alves <palves@redhat.com>
10186 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10188 2012-03-23 Pedro Alves <palves@redhat.com>
10190 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10191 "library-list-svr4" element's start tag when the the DSO list is
10194 2012-03-23 Pedro Alves <palves@redhat.com>
10196 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10197 a variable whose type size is the same as the inferior's pointer
10200 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10202 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10204 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10205 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10206 * linux-low.h: Include <signal.h>.
10207 (struct siginfo): Remove forward declaration.
10208 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10211 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10213 * .gitignore: Ignore more files.
10215 2012-03-19 Pedro Alves <palves@redhat.com>
10216 Jan Kratochvil <jan.kratochvil@redhat.com>
10218 * server.c (cont_thread, general_thread): Add describing comments.
10219 (start_inferior): Clear `cont_thread'.
10220 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10223 2012-03-15 Yao Qi <yao@codesourcery.com>
10225 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10227 (cmd_qtdp): ... here.
10229 2012-03-15 Yao Qi <yao@codesourcery.com>
10231 * tracepoint.c (struct tracepoint_action_ops): New.
10232 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10233 (m_tracepoint_action_download): New.
10234 (r_tracepoint_action_download): New.
10235 (x_tracepoint_action_download): New.
10236 (l_tracepoint_action_download): New.
10237 (add_tracepoint_action): Install `action->ops' according type.
10238 (download_tracepoint_1): Move code `download' function pointer
10239 of various tracepoint_action_ops.
10241 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10243 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10244 linux_ptrace_attach_warnings.
10246 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10248 * Makefile.in (linux-ptrace.o): New.
10249 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10250 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10251 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10252 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10253 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10255 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10257 2012-03-08 Yao Qi <yao@codesourcery.com>
10258 Pedro Alves <palves@redhat.com>
10260 Fix PR server/13392.
10261 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10262 offset of JMP insn.
10263 * tracepoint.c (remove_tracepoint): New.
10264 (cmd_qtdp): Call remove_tracepoint when failed to install.
10266 2012-03-07 Pedro Alves <palves@redhat.com>
10268 * linux-low.c (get_detach_signal): New.
10269 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10270 Pass on pending signals to PTRACE_DETACH. Check the result of the
10272 * server.c (program_signals, program_signals_p): New.
10273 (handle_general_set): Handle QProgramSignals.
10274 * server.h (program_signals, program_signals_p): Declare.
10276 2012-03-05 Pedro Alves <palves@redhat.com>
10277 Jan Kratochvil <jan.kratochvil@redhat.com>
10279 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10282 2012-03-03 Yao Qi <yao@codesourcery.com>
10284 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10285 agent_look_up_symbols.
10287 2012-03-03 Yao Qi <yao@codesourcery.com>
10289 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10290 (linux-x86-low.o): Likewise.
10291 * server.h: Remove in_process_agent_loaded.
10292 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10296 2012-03-03 Yao Qi <yao@codesourcery.com>
10298 * tracepoint.c (gdb_agent_capability): New global.
10299 (in_process_agent_loaded_ust): Renamed to
10300 `in_process_agent_supports_ust'.
10302 (in_process_agent_supports_ust): Call agent_capability_check.
10303 (clear_installed_tracepoints): Assert that agent supports
10306 2012-03-03 Yao Qi <yao@codesourcery.com>
10308 * linux-low.c (linux_supports_agent): New.
10309 (linux_target_ops): Initialize field `supports_agent' with
10310 linux_supports_agent.
10311 * target.h (struct target_ops) <supports_agent>: New.
10312 (target_supports_agent): New macro.
10313 * server.c (handle_general_set): Handle packet 'QAgent'.
10314 (handle_query): Send `QAgent+'.
10315 * Makefile.in (server.o): Depends on agent.h.
10317 2012-03-03 Yao Qi <yao@codesourcery.com>
10319 * Makefile.in (OBS): Add agent.o.
10320 Add new rule for agent.o.
10321 Track dependence of tracepoint.c on agent.h.
10322 * tracepoint.c (run_inferior_command_1):
10323 (run_inferior_command): Call agent_run_command.
10324 (gdb_ust_connect_sync_socket): Deleted. Move it to
10326 (resume_thread, stop_thread): Likewise.
10327 (gdb_ust_socket_init): Renamed to ...
10328 (gdb_agent_socket_init): ... New.
10329 (gdb_ust_thread): Renamed to ...
10330 (gdb_agent_helper_thread): ... New.
10331 (gdb_ust_init): Move some code to ...
10332 (gdb_agent_init): ... here. New.
10333 [HAVE_UST]: Call gdb_ust_init.
10334 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10335 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10336 * config.in, configure: Regenerated.
10338 2012-03-02 Pedro Alves <palves@redhat.com>
10340 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10341 * linux-low.c (struct simple_pid_list): New.
10342 (stopped_pids): New a struct simple_pid_list pointer.
10343 (add_to_pid_list, pull_pid_from_list): New.
10344 (handle_extended_wait): Don't assume the first signal new children
10345 report is SIGSTOP. Adjust call to pull_pid_from_list.
10346 (linux_wait_for_lwp): Adjust.
10348 2012-03-02 Yao Qi <yao@codesourcery.com>
10350 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10353 2012-03-02 Yao Qi <yao@codesourcery.com>
10355 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10356 `stop_pc' and `tpoint'. Update caller.
10358 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10360 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10361 * linux-low.c (use_linux_regsets): New macro.
10362 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10363 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10364 (linux_register_in_regsets): New function.
10365 (usr_fetch_inferior_registers): Skip registers covered by
10367 (usr_store_inferior_registers): Likewise.
10368 (usr_fetch_inferior_registers): New macro.
10369 (usr_store_inferior_registers): Likewise.
10370 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10371 (linux_store_registers): Likewise.
10372 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10374 (init_registers_mips64_dsp_linux): Likewise.
10375 (init_registers_mips_linux): New macro.
10376 (init_registers_mips_dsp_linux): Likewise.
10377 (mips_dsp_num_regs): Likewise.
10378 (DSP_BASE, DSP_CONTROL): New fallback macros.
10379 (mips_base_regs): New macro.
10380 (mips_regmap): Use it. Fix the size.
10381 (mips_dsp_regmap): New variable.
10382 (mips_dsp_regset_bitmap): Likewise.
10383 (mips_arch_setup): New function.
10384 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10386 (mips_cannot_store_register): Likewise.
10387 (the_low_target): Update .arch_setup, .num_regs and .regmap
10388 initializers. Add .regset_bitmap initializer.
10389 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10391 * linux-bfin-low.c (the_low_target): Likewise.
10392 * linux-cris-low.c (the_low_target): Likewise.
10393 * linux-crisv32-low.c (the_low_target): Likewise.
10394 * linux-ia64-low.c (the_low_target): Likewise.
10395 * linux-m32r-low.c (the_low_target): Likewise.
10396 * linux-m68k-low.c (the_low_target): Likewise.
10397 * linux-ppc-low.c (the_low_target): Likewise.
10398 * linux-s390-low.c (the_low_target): Likewise.
10399 * linux-sh-low.c (the_low_target): Likewise.
10400 * linux-sparc-low.c (the_low_target): Likewise.
10401 * linux-tic6x-low.c (the_low_target): Likewise.
10402 * linux-x86-low.c (the_low_target): Likewise.
10403 * linux-xtensa-low.c (the_low_target): Likewise.
10404 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10405 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10406 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10408 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10409 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10411 2012-02-29 Yao Qi <yao@codesourcery.com>
10412 Pedro Alves <palves@redhat.com>
10414 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10415 `step_over_finished' is true.
10417 2012-02-27 Pedro Alves <palves@redhat.com>
10419 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10420 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10422 2012-02-27 Pedro Alves <palves@redhat.com>
10425 * linux-low.c (pid_is_stopped): New.
10426 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10428 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10430 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10433 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10435 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10437 2012-02-24 Luis Machado <lgustavo@codesourcery>
10439 * server.c (handle_query): Advertise support for target-side
10440 breakpoint condition evaluation.
10441 (process_point_options): New function.
10442 (process_serial_event): When inserting a breakpoint, check for
10443 a target-side condition that should be evaluated.
10445 * mem-break.c: Include regcache.h and ax.h.
10446 (point_cond_list_t): New data structure.
10447 (breakpoint) <cond_list>: New field.
10448 (find_gdb_breakpoint_at): Make non-static.
10449 (delete_gdb_breakpoint_at): Clear any target-side
10451 (clear_gdb_breakpoint_conditions): New function.
10452 (add_condition_to_breakpoint): Likewise.
10453 (add_breakpoint_condition): Likewise.
10454 (gdb_condition_true_at_breakpoint): Likewise.
10455 (gdb_breakpoint_here): Return result directly instead
10456 of going through a local variable.
10458 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10459 (clear_gdb_breakpoint_conditions): Likewise.
10460 (add_breakpoint_condition): Likewise.
10461 (gdb_condition_true_at_breakpoint): Likewise.
10463 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10464 (need_step_over_p): Take target-side breakpoint condition into
10467 2012-02-24 Luis Machado <lgustavo@codesourcery>
10469 * server.h: Include tracepoint.h.
10470 (agent_mem_read, agent_get_trace_state_variable_value,
10471 agent_set_trace_state_variable_value,
10472 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10473 get_set_tsv_func_addr): New prototypes.
10475 * ax.h: New include file.
10476 * ax.c: New source file.
10478 * tracepoint.c: Include ax.h.
10479 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10480 agent_expr, eval_result_type): Move to ax.h.
10481 (parse_agent_expr): Rename to ...
10482 (gdb_parse_agent_expr): ... this, make it non-static and move
10484 (unparse_agent_expr) Rename to ...
10485 (gdb_unparse_agent_expr): ... this, make it non-static and move
10487 (eval_agent_expr): Rename to ...
10488 (eval_tracepoint_agent_expr): ... this.
10489 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10490 forward declarations.
10491 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10492 (agent_get_trace_state_variable_value): New function.
10493 (agent_set_trace_state_variable_value): New function.
10494 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10495 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10496 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10497 (condition_true_at_tracepoint): Likewise.
10498 (parse_agent_expr): Rename to ...
10499 (gdb_parse_agent_expr): ... this and move to ax.c.
10500 (unparse_agent_expr): Rename to ...
10501 (gdb_unparse_agent_expr): ... this and move to ax.c.
10502 (gdb_agent_op_name): Move to ax.c.
10503 (eval_agent_expr): Rename to ...
10504 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10506 (eval_tracepoint_agent_expr): New function.
10507 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10509 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10511 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10512 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10513 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10514 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10515 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10516 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10517 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10518 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10519 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10520 (compile_bytecodes): Remove forward declaration.
10521 (is_goto_target): Move to ax.c.
10522 (compile_bytecodes): Move to ax.c and call
10523 agent_get_trace_state_variable_value (...) and
10524 agent_set_trace_state_variable_value (...).
10526 * Makefile.in: Update ax.c and IPA dependencies.
10528 2012-02-24 Pedro Alves <palves@redhat.com>
10530 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10531 (cmd_bigqtbuffer_circular): ... this. Only handle
10532 'QTBuffer:circular:'.
10533 (handle_tracepoint_general_set): Adjust.
10535 2012-02-16 Yao Qi <yao@codesourcery.com>
10537 * inferiors.c: Move code to ...
10538 * dll.c: .... here. New.
10539 * server.h: Declare clear_dlls.
10540 * Makefile.in (SFILES): Add dll.c.
10544 2012-02-11 Yao Qi <yao@codesourcery.com>
10546 * server.c: (handle_monitor_command): Add a new parameter
10548 (handle_query): Update caller.
10550 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10552 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10553 * configure, config.in: Regenerate.
10554 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10557 2012-02-02 Pedro Alves <palves@redhat.com>
10559 Try SIGKILL first, then PTRACE_KILL.
10560 * linux-low.c (linux_kill_one_lwp): New.
10561 (linux_kill_one_lwp): Rename to ...
10562 (kill_one_lwp_callback): ... this. Use the new
10563 linux_kill_one_lwp.
10565 2012-02-02 Pedro Alves <palves@redhat.com>
10567 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10570 2012-01-27 Pedro Alves <palves@redhat.com>
10572 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10573 (elf_64_file_p): Make static.
10574 (linux_pid_exe_is_elf_64_file): New.
10575 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10576 Delete declarations.
10577 (linux_pid_exe_is_elf_64_file): Declare.
10578 * linux-x86-low.c (x86_arch_setup): Use
10579 linux_pid_exe_is_elf_64_file.
10581 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10583 * linux-low.c (linux_wait_for_event_1): Rename to ...
10584 (linux_wait_for_event): ... here and merge it with former
10585 linux_wait_for_event - new variable wait_ptid, use it.
10586 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10588 2012-01-23 Pedro Alves <palves@redhat.com>
10590 * server.c (main): Avoid yet another case of infinite loop while
10591 detaching/killing after a longjmp.
10593 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10596 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10598 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10600 * hostio.c (handle_readlink): New function.
10601 (handle_vFile): Call it to handle "vFile:readlink" packets.
10603 2012-01-20 Pedro Alves <palves@redhat.com>
10604 Ulrich Weigand <ulrich.weigand@linaro.org>
10606 * server.c (handle_v_requests): Only support vAttach and vRun to
10607 start multiple processes when in extended protocol mode.
10609 2012-01-17 Pedro Alves <palves@redhat.com>
10611 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10612 memalign plus mprotect to allocate the scratch buffer.
10614 2012-01-13 Pedro Alves <palves@redhat.com>
10616 * server.c (attach_inferior): Clear `cont_thread'.
10618 2012-01-13 Pedro Alves <palves@redhat.com>
10620 * server.c (main): Avoid infinite loop while detaching/killing
10623 2012-01-09 Doug Evans <dje@google.com>
10625 * server.c (start_inferior): Set last_ptid in --wrapper case.
10627 2012-01-06 Yao Qi <yao@codesourcery.com>
10629 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10631 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10633 2012-01-04 Yao Qi <yao@codesourcery.com>
10635 * tracepoint.c (cmd_qtdp): Print debug message
10636 for static tracepoint.
10638 2012-01-04 Yao Qi <yao@codesourcery.com>
10640 * tracepoint.c (trace_vdebug): Differentiate debug message
10641 between gdbserver and IPA.
10643 2012-01-03 Yao Qi <yao@codesourcery.com>
10645 * tracepoint.c (tracepoint_was_hit): Don't collect for
10648 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10650 * terminal.h: Reformat copyright header.
10652 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10654 * server.c (gdbserver_version): Update copyright year.
10655 * gdbreplay.c (gdbreplay_version): Likewise.
10657 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10659 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10662 2011-12-18 Hui Zhu <teawater@gmail.com>
10663 * linux-low.c (linux_create_inferior): Save return value to ret.
10665 2011-12-18 Hui Zhu <teawater@gmail.com>
10667 * linux-low.c (linux_create_inferior): Save return value to ret.
10669 2011-12-16 Doug Evans <dje@google.com>
10671 * linux-low.c (linux_create_inferior): If stdio connection,
10672 redirect stdin from /dev/null, stdout to stderr.
10673 * remote-utils.c (remote_is_stdio): New static global.
10674 (remote_connection_is_stdio): New function.
10675 (remote_prepare): Handle stdio connection.
10676 (remote_open): Ditto.
10677 (remote_close): Don't close stdin for stdio connections.
10678 (read_prim,write_prim): New functions. Replace all calls to
10679 read/write to these.
10680 * server.c (main): Watch for "-" argument. Move call to
10681 remote_prepare before start_inferior.
10682 * server.h (STDIO_CONNECTION_NAME): New macro.
10683 (remote_connection_is_stdio): Declare.
10685 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10686 in debugging output.
10688 2011-12-15 Yao Qi <yao@codesourcery.com>
10690 * tracepoint.c: Include sys/syscall.h.
10691 (gdb_ust_thread): Remove preprocessor conditional.
10693 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10695 * linux-low.c (linux_detach_one_lwp): Call
10696 the_low_target.prepare_to_resume before detaching.
10698 2011-12-14 Yao Qi <yao@codesourcery.com>
10700 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10703 2011-12-14 Yao Qi <yao@codesourcery.com>
10705 * i386-low.c (i386_low_stopped_data_address): Initialize local
10706 variable `control'.
10708 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10712 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10713 DR_CONTROL unless necessary. Extend comments.
10714 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10715 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10717 2011-12-13 Yao Qi <yao@codesourcery.com>
10719 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10721 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10723 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10725 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10726 Print new debug message for such case.
10728 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10730 Fix overlapping memcpy.
10731 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10732 the read_inferior_memory transfer.
10733 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10734 write_inferior_memory transfer.
10735 (set_fast_tracepoint_jump): New variable buf. Use it for the
10736 read_inferior_memory and write_inferior_memory transfers.
10737 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10738 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10739 Use it for the write_inferior_memory transfer.
10740 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10743 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10745 * linux-low.c (fetch_register, store_register): Make code
10746 consistent, fix formatting.
10748 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10750 * linux-low.c (usr_store_inferior_registers): Factor out code
10751 to handle individual registers into...
10752 (store_register): ... this new function.
10754 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10756 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10757 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10758 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10759 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10760 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10761 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10762 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10763 (srv_xmlfiles): Add new XML files.
10765 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10767 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10768 (init_registers_s390_linux32v1): Add prototype.
10769 (init_registers_s390_linux32v2): Likewise.
10770 (init_registers_s390_linux64v1): Likewise.
10771 (init_registers_s390_linux64v2): Likewise.
10772 (init_registers_s390x_linux64v1): Likewise.
10773 (init_registers_s390x_linux64v2): Likewise.
10774 (s390_num_regs): Increment to 52.
10775 (s390_regmap): Add orig_r2 register.
10776 (s390_num_regs_3264): Increment to 68.
10777 (s390_regmap_3264): Add orig_r2 register.
10778 (s390_collect_ptrace_register): Handle orig_r2 register.
10779 (s390_supply_ptrace_register): Likewise.
10780 (s390_fill_last_break): New function.
10781 (s390_store_last_break): Likewise.
10782 (s390_fill_system_call): New function.
10783 (s390_store_system_call): Likewise.
10784 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10786 (s390_check_regset): New function.
10787 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10788 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10789 Update target_regsets for available register sets.
10791 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10792 Jan Kratochvil <jan.kratochvil@redhat.com>
10794 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10795 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10797 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10798 * linux-low.h (struct process_info_private): New member r_debug.
10799 * server.c (handle_qxfer_libraries): Call
10800 the_target->qxfer_libraries_svr4.
10801 (handle_qxfer_libraries_svr4): New function.
10802 (qxfer_packets): New entry "libraries-svr4".
10803 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10804 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10805 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10806 PACKET_qXfer_libraries_svr4.
10808 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10810 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10811 PSW address/mask between 8-byte and 16-byte formats.
10812 (s390_supply_ptrace_register): Likewise.
10813 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10814 basic addressing mode bit.
10816 2011-11-24 Stan Shebs <stan@codesourcery.com>
10818 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10820 2011-11-17 Stan Shebs <stan@codesourcery.com>
10822 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10823 (tracing_start_time): New global.
10824 (tracing_stop_time): New global.
10825 (tracing_user_name): New global.
10826 (tracing_notes): New global.
10827 (tracing_stop_note): New global.
10828 (cmd_qtstart): Set traceframe_usage, start_time.
10829 (stop_tracing): Set stop_time.
10830 (cmd_qtstatus): Report additional status.
10831 (cmd_qtp): New function.
10832 (handle_tracepoint_query): Call it.
10833 (cmd_qtnotes): New function.
10834 (handle_tracepoint_general_set): Call it.
10835 (get_timestamp): Rename from tsv_get_timestamp.
10837 2011-11-14 Stan Shebs <stan@codesourcery.com>
10838 Kwok Cheung Yeung <kcy@codesourcery.com>
10840 * linux-x86-low.c (small_jump_insn): New.
10841 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10842 trampoline and error message, build a trampoline and issue a small
10843 jump instruction to it.
10844 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10845 trampoline and error message.
10846 (x86_get_min_fast_tracepoint_insn_len): New.
10847 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10848 * linux-low.h (struct linux_target_ops): Add arguments to
10849 install_fast_tracepoint_jump_pad operation, add new operation.
10850 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10852 (linux_get_min_fast_tracepoint_insn_len): New function.
10853 (linux_target_op): Add new operation.
10854 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10855 (gdb_trampoline_buffer_end): Ditto.
10856 (gdb_trampoline_buffer_error): Ditto.
10857 (struct ipa_sym_addresses): Add fields for new IPA variables.
10858 (symbol_list): Add entries for new IPA variables.
10859 (struct tracepoint): Add fields to hold the address range of the
10860 trampoline used by the tracepoint.
10861 (trampoline_buffer_head): New static variable.
10862 (trampoline_buffer_tail): Ditto.
10863 (claim_trampoline_space): New function.
10864 (have_fast_tracepoint_trampoline_buffer): New function.
10865 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10867 (install_fast_tracepoint): Ditto, also add error buffer argument.
10868 (cmd_qtminftpilen): New function.
10869 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10870 (fast_tracepoint_from_trampoline_address): New function.
10871 (fast_tracepoint_collecting): Handle trampoline as part of jump
10873 (set_trampoline_buffer_space): New function.
10874 (initialize_tracepoint): Initialize new IPA variables.
10875 * target.h (struct target_ops): Add arguments to
10876 install_fast_tracepoint_jump_pad operation, add new
10877 get_min_fast_tracepoint_insn_len operation.
10878 (target_get_min_fast_tracepoint_insn_len): New.
10879 (install_fast_tracepoint_jump_pad): Add arguments.
10880 * server.h (IPA_BUFSIZ): Define.
10881 * linux-i386-ipa.c: Include extra header files.
10882 (initialize_fast_tracepoint_trampoline_buffer): New function.
10883 (initialize_low_tracepoint): Call it.
10884 * server.h (set_trampoline_buffer_space): Declare.
10885 (claim_trampoline_space): Ditto.
10886 (have_fast_tracepoint_trampoline_buffer): Ditto.
10888 2011-11-14 Yao Qi <yao@codesourcery.com>
10890 * server.c (handle_query): Handle InstallInTrace for qSupported.
10891 * tracepoint.c (add_tracepoint): Sort list.
10892 (install_tracepoint, download_tracepoint): New.
10893 (cmd_qtdp): Call them to install and download tracepoints.
10894 (sort_tracepoints): Removed.
10895 (cmd_qtstart): Update.
10897 2011-11-14 Yao Qi <yao@codesourcery.com>
10899 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10900 * mem-break.h: Declare.
10901 * tracepoint.c (cmd_qtstart): Move some code to ...
10902 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10904 (download_tracepoints): Move some code to ...
10905 (download_tracepoint_1): ... here. New.
10907 2011-11-08 Yao Qi <yao@codesourcery.com>
10909 * remote-utils.c (relocate_instruction): A comment fix.
10911 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10913 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10914 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10915 dr_status_mirror and dr_control_mirror from debug_reg_state.
10916 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10917 (i386_initial_stuff): Remove use of deleted globals.
10918 (i386_get_thread_context, i386_set_thread_context,
10919 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10920 from debug_reg_state.
10922 2011-11-05 Yao Qi <yao@codesourcery.com>
10924 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10925 address as TPOINT's.
10927 2011-11-02 Stan Shebs <stan@codesourcery.com>
10929 * tracepoint.c (agent_mem_read_string): New function.
10930 (eval_agent_expr): Call it for tracenz.
10931 * server.c (handle_query): Report support for tracenz.
10933 2011-11-02 Yao Qi <yao@codesourcery.com>
10935 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10937 2011-11-02 Yao Qi <yao@codesourcery.com>
10939 * target.h: Fix a typo in comment.
10941 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10943 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10944 clobber the breakpoints' shadows with fast tracepoint jumps.
10945 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10946 * target.c (write_inferior_memory): Also pass MYADDR down to
10949 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10951 * configure.ac: Check support for personality routine.
10952 * configure: Regenerate.
10953 * config.in: Likewise.
10954 * linux-low.c: Include <sys/personality.h>.
10955 Define ADDR_NO_RANDOMIZE if necessary.
10956 (linux_create_inferior): Disable address space randomization when
10957 forking inferior, if requested.
10958 (linux_supports_disable_randomization): New function.
10959 (linux_target_ops): Install it.
10960 * server.h (disable_randomization): Declare.
10961 * server.c (disable_randomization): New global variable.
10962 (handle_general_set): Handle QDisableRandomization.
10963 (handle_query): Likewise for qSupported.
10964 (main): Support --disable-randomization and --no-disable-randomization
10965 command line arguments.
10966 * target.h (struct target_ops): Add supports_disable_randomization.
10967 (target_supports_disable_randomization): New macro.
10969 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10971 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10973 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10974 [!PT_GETDSBT] (target_loadmap): New definition.
10975 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10976 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10977 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10978 and PT_GETDSBT to LINUX_LOADMAP.
10979 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10980 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10982 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10984 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10985 (arm_linux_hwbp_cap): New static variable.
10986 (arm_linux_get_hwbp_cap): Replace by ...
10987 (arm_linux_init_hwbp_cap): ... this new function.
10988 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10989 (arm_linux_get_hw_watchpoint_count): Likewise.
10990 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10991 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10992 (arm_prepare_to_resume): Use perror_with_name instead of error.
10994 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10996 * linux-arm-low.c: Include <signal.h>.
10997 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10998 (struct arm_linux_hwbp_cap): New data type.
10999 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11000 (struct arm_linux_hw_breakpoint): New data type.
11001 (MAX_BPTS, MAX_WPTS): Define.
11002 (struct arch_process_info, struct arch_lwp_info): New data types.
11003 (arm_linux_get_hwbp_cap): New function.
11004 (arm_linux_get_hw_breakpoint_count): Likewise.
11005 (arm_linux_get_hw_watchpoint_count): Likewise.
11006 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11007 (arm_hwbp_control_initialize): Likewise.
11008 (arm_hwbp_control_is_enabled): Likewise.
11009 (arm_hwbp_control_is_initialized): Likewise.
11010 (arm_hwbp_control_disable): Likewise.
11011 (arm_linux_hw_breakpoint_equal): Likewise.
11012 (arm_linux_hw_point_initialize): Likewise.
11013 (struct update_registers_data): New data structure.
11014 (update_registers_callback: New function.
11015 (arm_insert_point): Likewise.
11016 (arm_remove_point): Likewise.
11017 (arm_stopped_by_watchpoint): Likewise.
11018 (arm_stopped_data_address): Likewise.
11019 (arm_new_process): Likewise.
11020 (arm_new_thread): Likewise.
11021 (arm_prepare_to_resume): Likewise.
11022 (the_low_target): Register arm_insert_point, arm_remove_point,
11023 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11024 arm_new_thread, and arm_prepare_to_resume.
11026 2011-09-15 Stan Shebs <stan@codesourcery.com>
11028 * server.h (struct emit_ops): Add compare-goto fields.
11029 * tracepoint.c (gdb_agent_op_sizes): New table.
11030 (emit_eq_goto): New function.
11031 (emit_ne_goto): New function.
11032 (emit_lt_goto): New function.
11033 (emit_le_goto): New function.
11034 (emit_gt_goto): New function.
11035 (emit_ge_goto): New function.
11036 (is_goto_target): New function.
11037 (compile_bytecodes): Recognize special cases of compare-goto
11038 combinations and call specialized emitters for them.
11039 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11040 (amd64_emit_ne_goto): New function.
11041 (amd64_emit_lt_goto): New function.
11042 (amd64_emit_le_goto): New function.
11043 (amd64_emit_gt_goto): New function.
11044 (amd64_emit_ge_goto): New function.
11045 (amd64_emit_ops): Add the new functions.
11046 (i386_emit_eq_goto): New function.
11047 (i386_emit_ne_goto): New function.
11048 (i386_emit_lt_goto): New function.
11049 (i386_emit_le_goto): New function.
11050 (i386_emit_gt_goto): New function.
11051 (i386_emit_ge_goto): New function.
11052 (i386_emit_ops): Add the new functions.
11054 2011-09-08 Stan Shebs <stan@codesourcery.com>
11056 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11057 (i386_emit_epilogue): Restore %ebx.
11059 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11061 * server.c (step_thread): Remove definition.
11062 (process_serial_event): Don't handle Hs.
11063 * server.h (step_thread): Remove declaration.
11064 * target.c (set_desired_inferior): Remove use of step_thread.
11066 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11068 * linux-low.c: Include linux-procfs.h.
11069 (linux_attach_lwp_1): Update comments.
11070 (linux_attach): Scan for existing threads when attaching to a
11071 process that is the tgid.
11072 * Makefile.in: Update dependencies.
11074 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11076 * configure.srv: Add linux-procfs.o dependencies.
11078 2011-08-14 Yao Qi <yao@codesourcery.com>
11080 * target.h (struct target_ops): Fix indent.
11081 * win32-low.c (win32_target_ops): Fix comment.
11083 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11084 Yao Qi <yao@codesourcery.com>
11086 * Makefile.in (clean): Remove tic6x-*.c files.
11087 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11088 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11089 (tic6x-c64xp-linux.c): Likewise.
11090 * configure.srv: Add support for tic6x-*-uclinux.
11091 * linux-tic6x-low.c: New.
11092 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11094 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11095 Yao Qi <yao@codesourcery.com>
11097 * target.h (struct target_ops): Add read_loadmap.
11098 * linux-low.c (struct target_loadseg): New type.
11099 (struct target_loadmap): New type.
11100 (linux_read_loadmap): New function.
11101 (linux_target_ops): Add linux_read_loadmap.
11102 * server.c (handle_query): Support qXfer:fdpic:read packet.
11103 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11106 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11108 * win32-low.c: Include <stdint.h>.
11110 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11112 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11113 to the inferior here.
11114 (i386_remove_aligned_watchpoint): Ditto.
11115 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11116 fit part of the watchpoint in the debug registers.
11117 (i386_update_inferior_debug_regs): New.
11118 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11119 registers, and only update the inferior on success.
11120 (i386_low_remove_watchpoint): Ditto.
11122 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11124 * linux-low.c (compare_ints, unique, list_threads, show_process,
11125 linux_core_of_thread): Delete.
11126 (linux_target_ops): Change linux_core_of_thread to
11127 linux_common_core_of_thread.
11128 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11129 * utils.c (malloc_failure): Change type of argument.
11130 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11131 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11132 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11133 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11134 (IPA_OBJS): Add common-utils-ipa.o.
11135 (ptid_h, linux_osdata_h): New macros.
11136 (server_h): Add common/common-utils.h, common/xml-utils.h,
11137 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11139 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11140 ptid.o, buffer.o): New rules.
11141 (linux-low.o): Add common/linux-osdata.h as a dependency.
11142 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11143 * configure.ac: Add AC_HEADER_DIRENT check.
11144 * config.in: Regenerate.
11145 * configure: Regenerate.
11146 * remote-utils.c (xml_escape_text): Delete.
11147 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11148 buffer_xml_printf): Move to common/buffer.c.
11149 * server.c (main): Remove call to initialize_inferiors.
11150 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11151 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11152 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11153 internal_error, gdb_assert, gdb_assert_fail): Delete.
11154 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11155 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11157 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11158 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11159 initialize_inferiors): Delete.
11161 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11163 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11166 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11168 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11170 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11172 2011-05-26 Yao Qi <yao@codesourcery.com>
11174 * Makefile.in (thread-db.o): Track dependence to
11175 common/gdb_thread_db.h.
11176 * thread-db.c: include gdb_thread_db.h from right place.
11178 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11180 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11181 __FILE__ and __LINE__ to internal_error.
11183 2011-05-13 Doug Evans <dje@google.com>
11185 * thread-db.c (try_thread_db_load_from_sdir): New function.
11186 (try_thread_db_load_from_dir): New function.
11187 (thread_db_load_search): Handle $sdir, ignore $pdir.
11188 Remove trying of system directories if search of
11189 libthread-db-search-path fails, that is now done via $sdir.
11191 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11193 * server.c (handle_query): Add EnableDisableTracepoints to the list
11194 of supported features.
11195 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11197 (cmd_qtenable_disable): New.
11198 (cmd_qtstart): Install tracepoints even if disabled.
11199 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11200 receiving a QTEnable or QTDisable packet.
11201 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11202 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11204 (gdb_probe): Skip data collection if static tracepoint is disabled.
11206 2011-05-10 Doug Evans <dje@google.com>
11208 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11210 2011-05-04 Doug Evans <dje@google.com>
11212 * linux-low.c (linux_join): Skip process lookup.
11213 * spu-low.c (spu_join): Ditto.
11214 * server.c (join_inferiors_callback): Delete.
11215 (process_serial_event): For 'D' packet (detach) call join_inferior
11218 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11220 * README: Don't mention xscale*-*-linux*.
11221 * configure.srv (xscale*-*-linux*): Don't handle target.
11223 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11225 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11227 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11228 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11229 (i386_emit_void_call_2): Likewise.
11231 2011-04-26 Yao Qi <yao@codesourcery.com>
11233 * linux-low.c: Move common macros to linux-ptrace.h.
11234 Include linux-ptrace.h.
11235 * Makefile.in (linux_ptrace_h): New.
11236 (linux-low.o): Depends on linux-ptrace.h.
11238 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11240 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11241 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11242 (remote_prepare): New function with most of the TCP code from ...
11243 (remote_open): ... here. Detect PORT here unconditionally. Move also
11244 setting transport_is_reliable.
11245 * server.c (run_once): New variable.
11246 (gdbserver_usage): Document it.
11247 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11248 the first run if RUN_ONCE.
11249 * server.h (run_once, remote_prepare): New declarations.
11251 2011-04-19 Tom Tromey <tromey@redhat.com>
11253 * win32-low.c (handle_load_dll): Remove duplicate "the".
11255 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11257 Remove support for old Cygwin 1.5 versions.
11258 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11259 function to avoid warning.
11260 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11263 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11265 * gdbserver/server.h (Macro _): Define it if not available.
11267 2011-03-14 Michael Snyder <msnyder@vmware.com>
11269 * hostio.c (handle_close): Remove unnecessary null test.
11271 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11273 * Makefile.in (maintainer-clean realclean distclean): Remove
11274 "make ... subdir_do" command.
11276 2011-03-10 Michael Snyder <msnyder@vmware.com>
11278 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11280 * server.c (handle_v_run): Free alloced buffer on early return.
11282 2011-03-09 Yao Qi <yao@codesourcery.com>
11285 2011-03-04 Yao Qi <yao@codesourcery.com>
11287 * Makefile.in: Remove GNU make feature --directory.
11289 2011-03-05 Yao Qi <yao@codesourcery.com>
11291 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11292 (subdir_do): New make target. Copied from gdb/Makefile.
11293 (maintainer-clean, realclean, distclean, clean): Call corresponding
11294 make targets in common/Makefile.
11296 2011-02-11 Yao Qi <yao@codesourcery.com>
11298 * configure.ac: Call AC_PROG_RANLIB.
11299 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11300 * configure: Regenerate.
11302 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11304 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11306 2011-03-06 Yao Qi <yao@codesourcery.com>
11308 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11310 2011-03-05 Yao Qi <yao@codesourcery.com>
11312 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11313 (subdir_do): New make target. Copied from gdb/Makefile.
11314 (maintainer-clean, realclean, distclean, clean): Call corresponding
11315 make targets in common/Makefile.
11317 2011-03-04 Yao Qi <yao@codesourcery.com>
11319 * Makefile.in: Remove GNU make feature --directory.
11321 2011-03-04 Michael Snyder <msnyder@vmware.com>
11323 * server.c (queue_stop_reply): Call xmalloc not malloc.
11325 2011-03-02 Michael Snyder <msnyder@vmware.com>
11327 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11329 2011-02-28 Michael Snyder <msnyder@vmware.com>
11331 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11332 (cmd_qtframe): Ditto.
11333 (cmd_qtbuffer): Ditto.
11334 (cmd_bigqtbuffer): Ditto.
11336 * utils.c (decimal2str): Initialize 'width' to nine, then
11337 don't mess with it.
11339 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11341 * hostio.c (require_data): Free *data, not data.
11343 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11345 * hostio.c (require_data): Use free, not xfree.
11347 2011-02-27 Michael Snyder <msnyder@vmware.com>
11349 * server.c (handle_query): Discard unused value.
11351 * hostio.c (require_data): Free malloc memory before returning
11354 2011-02-26 Michael Snyder <msnyder@vmware.com>
11356 * linux-low.c (list_threads): Call closedir for dirent.
11358 2011-02-27 Michael Snyder <msnyder@vmware.com>
11360 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11361 a case statement falls through.
11363 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11365 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11368 2011-02-26 Michael Snyder <msnyder@vmware.com>
11370 * utils.c (decimal2str): Eliminate dead code and dead param.
11371 (pulongest): Drop dead param from call to decimal2str.
11374 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11376 Revert the following patch (not approved yet):
11377 2011-02-21 Hui Zhu <teawater@gmail.com>
11378 * tracepoint.c (tp_printf): New function.
11379 (eval_agent_expr): Handle gdb_agent_op_printf.
11381 2011-02-21 Hui Zhu <teawater@gmail.com>
11383 * tracepoint.c (tp_printf): New function.
11384 (eval_agent_expr): Handle gdb_agent_op_printf.
11386 2011-02-18 Tom Tromey <tromey@redhat.com>
11388 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11389 (tracepoint.o): Likewise.
11390 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11391 (gdb_agent_op_names): Likewise.
11393 2011-02-18 Tom Tromey <tromey@redhat.com>
11395 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11396 gdb_agent_op_rot>: New constants.
11397 (gdb_agent_op_names): Add pick and roll.
11398 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11401 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11403 * aclocal.m4: Regenerated with aclocal-1.11.1.
11405 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11407 * server.c (handle_qxfer_traceframe_info): New.
11408 (qxfer_packets): Register "traceframe-info".
11409 (handle_query): Report support for qXfer:traceframe-info:read+.
11410 * tracepoint.c (match_blocktype): New.
11411 (traceframe_find_block_type): Rename to ...
11412 (traceframe_walk_blocks): ... this. Add callback filter argument,
11414 (traceframe_find_block_type): New, reimplemented on top of
11415 traceframe_walk_blocks.
11416 (build_traceframe_info_xml): New.
11417 (traceframe_read_info): New.
11418 * server.h (traceframe_read_info): Declare.
11420 2011-02-11 Yao Qi <yao@codesourcery.com>
11422 * configure.ac: Call AC_PROG_RANLIB.
11423 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11424 * configure: Regenerate.
11426 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11428 * server.c (gdb_read_memory): Change return semantics to allow
11430 (handle_search_memory_1): Adjust.
11431 (process_serial_event) <'m' packet>: Handle partial transfers.
11432 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11434 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11436 * regcache.c (init_register_cache): Initialize
11437 regcache->register_status.
11438 (free_register_cache): Release regcache->register_status.
11439 (regcache_cpy): Copy register_status.
11440 (registers_to_string): Print 'x's for unavailable registers.
11441 (supply_register): Mark the register's status valid or
11442 unavailable, depending on whether a buffer was passed in or not.
11443 (supply_register_zeroed): New.
11444 (supply_regblock): Mark the registers' status valid or
11445 unavailable, depending on whether a buffer was passed in or not.
11446 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11447 (struct regcache): New `register_status' field.
11448 (supply_register_zeroed): Declare.
11449 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11450 supply_register_zeroed, rather than passing a NULL buffer to
11452 * tracepoint.c (fetch_traceframe_registers): Update comment.
11454 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11456 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11459 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11461 * server.h (decode_xfer_write): Change prototype.
11462 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11463 and don't extract the annex here.
11464 * server.c (decode_xfer_read): Remove `annex' parameter,
11465 and don't extract the annex here.
11466 (decode_xfer): New.
11467 (struct qxfer): New.
11468 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11469 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11470 (handle_qxfer_statictrace): New functions, abstracted out from
11471 handle_query, and made to use the struct qxfer interface.
11472 (handle_threads_qxfer_proper): Rename to ...
11473 (handle_qxfer_threads_proper): ... this.
11474 (handle_threads_qxfer): Rename to ...
11475 (handle_qxfer_threads): ... this. Adjust.
11476 (qxfer_packets): New array.
11477 (handle_qxfer): New function.
11478 (handle_query): Use handle_qxfer.
11480 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11482 * gdbreplay.c: Shorten lines of >= 80 columns.
11483 * linux-low.c: Ditto.
11484 * linux-ppc-low.c: Ditto.
11485 * linux-s390-low.c: Ditto.
11486 * linux-sparc-low.c: Ditto.
11487 * linux-x86-low.c: Ditto.
11488 * linux-xtensa-low.c: Ditto.
11489 * mem-break.c: Ditto.
11490 * nto-low.c: Ditto.
11491 * regcache.h: Ditto.
11492 * remote-utils.c: Ditto.
11495 * thread-db.c: Ditto.
11496 * tracepoint.c: Ditto.
11498 * win32-low.h: Ditto.
11500 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11502 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11505 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11507 * server.c (gdbserver_version): Update copyright year in version
11509 * gdbreplay.c (gdbreplay_version): Ditto.
11511 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11513 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11514 * linux-bfin-low.c: New file.
11515 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11516 PT_DATA_ADDR for BFIN targets.
11517 * Makefile.in (SFILES): Add linux-bfin-low.c.
11518 (clean): Remove reg-bfin.c.
11519 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11520 * README: Mention supported Blackfin targets.
11522 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11524 * .gitignore: New file.
11526 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11528 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11530 2010-10-22 Jie Zhang <jie@codesourcery.com>
11532 * Makefile.in: Add FLAGS_TO_PASS variable.
11533 (install): Remove dependency of install-only and recursively
11534 invoke make for install-only.
11536 2010-10-04 Doug Evans <dje@google.com>
11538 * Makefile.in (uninstall): Use $(DESTDIR).
11540 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11544 * linux-x86-low.c (compat_siginfo_from_siginfo)
11545 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11546 si_code is < 0. Check for si_code == SI_TIMER before checking for
11549 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11551 * lynx-i386-low.c: New file.
11552 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11554 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11556 * lynx-low.c (ptrace_request_to_str): Remove handling for
11557 request values that have been removed in LynxOS 5.x.
11559 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11561 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11564 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11566 * configure.ac: Add --enable-inprocess-agent option.
11567 * configure: Rebuilt.
11569 2010-09-06 Yao Qi <yao@codesourcery.com>
11571 * linux-low.c (linux_kill): Remove unused variable.
11572 (linux_stabilize_threads): Likewise.
11573 * server.c (start_inferior): Likewise.
11574 (queue_stop_reply_callback): Likewise.
11575 * tracepoint.c (do_action_at_tracepoint): Likewise.
11577 2010-09-06 Yao Qi <yao@codesourcery.com>
11579 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11582 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11584 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11586 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11588 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11591 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11593 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11594 gdbserver/lynx-ppc-low.c: New files.
11595 * Makefile.in (lynx_low_h): New variable.
11596 (lynx-low.o, lynx-ppc-low.o): New rules.
11597 * configure.ac: On LynxOS, link with -lnetinet.
11598 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11599 * configure: regenerate.
11601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11603 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11604 * configure.ac: Add check for vasprintf and vsnprintf.
11605 * configure, config.in: Regenerate.
11606 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11608 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11610 * gdbreplay.c: Move include of alloca.h up, next to include of
11612 * server.h: Add include of malloc.h.
11613 * mem-break.c: Remove include of malloc.h.
11614 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11616 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11618 * Makefile.in (memmem.o): Build with -Wno-error.
11620 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11622 * utils.c (xsnprintf): Make non-static.
11623 * server.h: Add xsnprintf declaration.
11624 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11625 replace calls to snprintf by calls to xsnprintf throughout.
11627 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11629 * configure.ac: Add configure check for alloca.
11630 * configure, config.in: Regenerate.
11631 * server.h: Include alloca.h if it exists.
11632 * gdbreplay.c: Include alloca.h if it exists.
11634 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11636 * linux-low.c (__SIGRTMIN): Define if not already defined.
11637 (linux_create_inferior): Check for __ANDROID__ rather than
11639 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11640 are already deferred.
11641 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11642 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11643 stopped and already has a pending signal to report.
11644 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11645 a pending signal to report or is moving out of a jump pad.
11646 (linux_init_signals): Check for __ANDROID__ rather than
11649 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11651 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11652 debug_threads check. Avoid a linear search when not doing debug
11655 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11657 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11658 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11659 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11660 (process_event): Change local fd's type to gdb_fildes_t.
11661 (create_file_handler): Adjust prototype.
11662 (delete_file_handler): Adjust prototype.
11663 (handle_file_event): Adjust prototype. Use pfildes.
11664 (create_file_event): Adjsut prototype.
11665 * remote-utils.c (remote_desc, listen_desc): Change type to
11667 * server.h: New gdb_fildes_t typedef.
11668 [USE_WIN32API]: Include winsock2.h.
11669 (delete_file_handler, add_file_handler): Adjust prototypes.
11670 (pfildes): Declare.
11671 * utils.c (pfildes): New.
11673 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11675 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11676 * configure: Regenerate.
11678 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11680 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11681 (linux_done_accessing_memory): ... this.
11682 (linux_target_ops): Adjust.
11683 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11684 * nto-low.c (nto_target_ops): Adjust comment.
11685 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11686 * spu-low.c (spu_target_ops): Adjust comment.
11687 * target.h (target_ops): Rename unprepare_to_access_memory field
11688 to done_accessing_memory.
11689 (unprepare_to_access_memory): Rename to ...
11690 (done_accessing_memory): ... this.
11692 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11694 * linux-low.c (linux_prepare_to_access_memory): New.
11695 (linux_unprepare_to_access_memory): New.
11696 (linux_target_ops): Install them.
11697 * server.c (read_memory): Rename to ...
11698 (gdb_read_memory): ... this. Use
11699 prepare_to_access_memory/prepare_to_access_memory.
11700 (write_memory): Rename to ...
11701 (gdb_write_memory): ... this. Use
11702 prepare_to_access_memory/prepare_to_access_memory.
11703 (handle_search_memory_1): Adjust.
11704 (process_serial_event): Adjust.
11705 * target.h (struct target_ops): New fields
11706 prepare_to_access_memory and unprepare_to_access_memory.
11707 (prepare_to_access_memory, unprepare_to_access_memory): New.
11708 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11709 prepare_to_access_memory/prepare_to_access_memory.
11710 * nto-low.c (nto_target_ops): Adjust.
11711 * spu-low.c (spu_target_ops): Adjust.
11712 * win32-low.c (win32_target_ops): Adjust.
11714 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11716 * Makefile.in (WARN_CFLAGS): Get it from configure.
11717 (WERROR_CFLAGS): New.
11718 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11719 * configure.ac: Introduce --enable-werror, which adds -Werror to
11720 the compiler command line. Enabled by default. Disable with
11721 --disable-werror. Add -Wdeclaration-after-statement
11722 Wpointer-arith and -Wformat-nonliteral to warning flags.
11723 * configure: Regenerate.
11725 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11727 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11729 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11731 * gdbreplay.c (remote_error): New.
11733 (expect): Use gdbchar. Check for error reading from GDB.
11734 Clarify sync error output.
11735 (play): Check for errors writing to GDB.
11736 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11737 * remote-utils.c (getpkt): Check for errors writing to the remote
11740 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11742 * linux-low.c (linux_wait_1): Move non-debugging code out of
11743 `debug_threads' control.
11745 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11747 * linux-low.c (linux_wait_1): Don't set last_status here.
11748 * server.c (push_event, queue_stop_reply_callback): Assert we're
11749 not pushing a TARGET_WAITKIND_IGNORE event.
11750 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11751 (myresume, handle_target_event): Set the thread's last_resume_kind
11752 and last_status from the target returned status.
11754 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11758 * linux-x86-low.c (update_debug_registers_callback): New.
11759 (i386_dr_low_set_addr): Use it.
11760 (i386_dr_low_get_addr): New.
11761 (i386_dr_low_set_control): Use update_debug_registers_callback.
11762 (i386_dr_low_get_control): New.
11763 (i386_dr_low_get_status): Adjust.
11764 * linux-low.c (linux_stop_lwp): New.
11765 * linux-low.h (linux_stop_lwp): Declare.
11767 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11768 argument instead of a i386_debug_reg_state.
11769 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11770 a i386_debug_reg_state.
11771 (i386_insert_aligned_watchpoint): Adjust.
11772 (i386_remove_aligned_watchpoint): Adjust.
11773 (i386_low_stopped_data_address): Read the debug registers from the
11774 inferior instead of from the mirrors.
11775 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11776 (i386_dr_low_get_addr): Declare.
11777 (i386_dr_low_get_control): Declare.
11778 (i386_dr_low_get_status): Change prototype.
11780 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11781 (i386_dr_low_get_addr): New.
11782 (i386_dr_low_get_control): New.
11783 (i386_dr_low_get_status): Adjust prototype. Return
11785 (i386_initial_stuff): Clear dr_status_mirror and
11787 (i386_get_thread_context): Adjust.
11788 (i386_set_thread_context): Adjust.
11789 (i386_thread_added): Adjust.
11791 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11793 * linux-low.h (linux_thread_area): Delete declaration.
11795 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11797 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11798 after its termination.
11800 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11802 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11803 (gdb_wants_all_stopped): Delete.
11804 (linux_wait_1): Don't call them.
11805 * server.c (handle_v_cont): Tag all threads as want-stopped.
11806 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11807 stopped as "client-wants-stopped".
11809 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11811 * Makefile.in (signals_h): New.
11812 (server_h): Depend on it.
11813 (server.o): Don't depend on $(signals_def).
11814 (signals.o): Depend on $(signals_def).
11816 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11818 * Makefile.in (signals_def): New.
11819 (server_h): Append include/gdb/signals.h and signals_def.
11820 (server.o): Append signals_def.
11822 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11824 * server.c (handle_target_event): Use target_signal_to_host for
11825 resume_info.sig initialization.
11826 * target.h (struct thread_resume) <sig>: New comment.
11828 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11830 * server.c (handle_query): strcpy() the returned string from paddress()
11831 instead of sprintf().
11832 * utils.c (paddress): Return phex_nz().
11834 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11836 * server.c (handle_v_cont): Call mourn_inferior if process
11838 (myresume): Likewise.
11840 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11842 Static tracepoints, and integration with UST.
11844 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11845 * mem-break.c (uninsert_all_breakpoints)
11846 (reinsert_all_breakpoints): New.
11847 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11848 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11849 (gdb_agent_ust_loaded, helper_thread_id)
11850 (gdb_agent_helper_thread_id): New macros.
11851 (struct ipa_sym_addresses): Add addr_ust_loaded,
11852 addr_helper_thread_id, addr_cmd_buf.
11853 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11854 (in_process_agent_loaded_ust): New.
11855 (write_e_ust_not_loaded): New.
11856 (maybe_write_ipa_ust_not_loaded): New.
11857 (struct collect_static_trace_data_action): New.
11858 (enum tracepoint_type) <static_tracepoint>: New.
11859 (struct tracepoint) <handle>: Mention static tracepoints.
11860 (struct static_tracepoint_ctx): New.
11861 (CMD_BUF_SIZE): New.
11862 (add_tracepoint_action): Handle static tracepoint actions.
11863 (unprobe_marker_at): New.
11864 (clear_installed_tracepoints): Handle static tracepoints.
11865 (cmd_qtdp): Handle static tracepoints.
11866 (probe_marker_at): New.
11867 (cmd_qtstart): Handle static tracepoints.
11868 (response_tracepoint): Handle static tracepoints.
11869 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11870 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11871 (get_context_regcache): Handle static tracepoints.
11872 (do_action_at_tracepoint): Handle static tracepoint actions.
11873 (traceframe_find_block_type): Handle static trace data blocks.
11874 (traceframe_read_sdata): New.
11875 (download_tracepoints): Download static tracepoint actions.
11876 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11877 (GDB_PROBE_NAME): New.
11879 (GET_UST_SYM): New.
11882 (ust_marker_to_static_tracepoint): New.
11884 (collect_ust_data_at_tracepoint): New.
11885 (gdb_ust_probe): New.
11886 (UNIX_PATH_MAX, SOCK_DIR): New.
11887 (gdb_ust_connect_sync_socket): New.
11888 (resume_thread, stop_thread): New.
11889 (run_inferior_command): New.
11890 (init_named_socket): New.
11891 (gdb_ust_socket_init): New.
11892 (cstr_to_hexstr): New.
11894 (first_marker, next_marker): New.
11895 (response_ust_marker): New.
11896 (cmd_qtfstm, cmd_qtsstm): New.
11897 (unprobe_marker_at, probe_marker_at): New.
11898 (cmd_qtstmat, gdb_ust_thread): New.
11899 (gdb_ust_init): New.
11900 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11901 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11902 (ST_REGENTRY): New.
11903 (x86_64_st_collect_regmap): New.
11904 (X86_64_NUM_ST_COLLECT_GREGS): New.
11905 (AMD64_RIP_REGNUM): New.
11906 (supply_static_tracepoint_registers): New.
11907 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11908 (ST_REGENTRY): New.
11909 (i386_st_collect_regmap): New.
11910 (i386_NUM_ST_COLLECT_GREGS): New.
11911 (supply_static_tracepoint_registers): New.
11912 * server.c (handle_query): Handle qXfer:statictrace:read.
11913 <qSupported>: Report support for StaticTracepoints, and
11914 qXfer:statictrace:read features.
11915 * server.h (traceframe_read_sdata)
11916 (supply_static_tracepoint_registers): Declare.
11917 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11918 (unpack_varlen_hex): Include in IPA build.
11919 * Makefile.in (ustlibs, ustinc): New.
11920 (IPA_OBJS): Add remote-utils-ipa.o.
11921 ($(IPA_LIB)): Link -ldl and -lpthread.
11923 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11924 * config.in, configure: Regenerate.
11926 2010-06-20 Ian Lance Taylor <iant@google.com>
11927 Pedro Alves <pedro@codesourcery.com>
11929 * linux-x86-low.c (always_true): Delete.
11930 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11931 trying to fool the compiler with always_true.
11933 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11935 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11936 conditions in gdbserver.
11938 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11940 * spu-low.c (spu_read_memory): Wrap around local store limit.
11941 (spu_write_memory): Likewise.
11943 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11945 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11946 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11948 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11950 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11951 uses with LONGEST uses.
11953 2010-06-14 Stan Shebs <stan@codesourcery.com>
11954 Pedro Alves <pedro@codesourcery.com>
11958 * linux-x86-low.c: Include limits.h.
11960 (always_true): New.
11963 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11964 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11965 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11966 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11967 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11968 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11969 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11970 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11971 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11972 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11973 (amd64_emit_void_call_2): New.
11974 (amd64_emit_ops): New.
11975 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11976 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11977 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11978 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11979 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11980 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11981 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11982 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11983 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11984 (i386_emit_stack_adjust, i386_emit_int_call_1)
11985 (i386_emit_void_call_2): New.
11986 (i386_emit_ops): New.
11987 (x86_emit_ops): New.
11988 (the_low_target): Install x86_emit_ops.
11989 * server.h (struct emit_ops): New.
11990 (get_raw_reg_func_addr): Declare.
11991 (current_insn_ptr, emit_error): Declare.
11992 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11993 (set_trace_state_variable_value): New defines.
11994 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11995 addr_get_trace_state_variable_value and
11996 addr_set_trace_state_variable_value.
11997 (symbol_list): New fields for get_raw_reg,
11998 get_trace_state_variable_value and set_trace_state_variable_value.
11999 (condfn): New typedef.
12000 (struct tracepoint): New field `compiled_cond'.
12001 (do_action_at_tracepoint): Clear compiled_cond.
12002 (get_trace_state_variable_value, set_trace_state_variable_value):
12004 (condition_true_at_tracepoint): If there's a compiled condition,
12006 (current_insn_ptr, emit_error): New globals.
12007 (struct bytecode_address): New.
12008 (get_raw_reg_func_addr): New.
12009 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12010 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12011 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12012 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12013 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12014 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12015 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12016 (compile_tracepoint_condition, compile_bytecodes): New.
12017 * target.h (emit_ops): Forward declare.
12018 (struct target_ops): New field emit_ops.
12019 (target_emit_ops): New.
12020 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12021 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12022 * linux-low.c (linux_emit_ops): New.
12023 (linux_target_ops): Install it.
12024 * linux-low.h (struct linux_target_ops): New field emit_ops.
12026 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12028 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12029 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12031 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12032 Stan Shebs <stan@codesourcery.com>
12034 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12035 (all): Depend on $(extra_libraries).
12036 (install-only): Install the IPA.
12037 (IPA_OBJS, IPA_LIB): New.
12038 (clean): Remove the IPA lib.
12039 (IPAGENT_CFLAGS): New.
12040 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12041 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12042 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12043 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12044 * configure.ac: Check for atomic builtins support in the compiler.
12045 (IPA_DEPFILES, extra_libraries): Define.
12046 * configure.srv (ipa_obj): Add description.
12047 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12048 (i[34567]86-*-linux*): Set ipa_obj.
12049 (x86_64-*-linux*): Set ipa_obj.
12050 * linux-low.c (stabilizing_threads): New.
12051 (supports_fast_tracepoints): New.
12052 (linux_detach): Stabilize threads before detaching.
12053 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12054 the lwp is either not stabilizing, or is moving out of a jump pad.
12055 (linux_fast_tracepoint_collecting): New.
12056 (maybe_move_out_of_jump_pad): New.
12057 (enqueue_one_deferred_signal): New.
12058 (dequeue_one_deferred_signal): New.
12059 (linux_wait_for_event_1): If moving out of a jump pad, defer
12060 pending signals to later.
12061 (linux_stabilize_threads): New.
12062 (linux_wait_1): Check if threads need moving out of jump pads, and
12064 (stuck_in_jump_pad_callback): New.
12065 (move_out_of_jump_pad_callback): New.
12066 (lwp_running): New.
12067 (linux_resume_one_lwp): Handle moving out of jump pads.
12068 (linux_set_resume_request): Dequeue deferred signals.
12069 (need_step_over_p): Also step over fast tracepoint jumps.
12070 (start_step_over): Also uninsert fast tracepoint jumps.
12071 (finish_step_over): Also reinsert fast tracepoint jumps.
12072 (linux_install_fast_tracepoint_jump): New.
12073 (linux_target_ops): Install linux_stabilize_threads and
12074 linux_install_fast_tracepoint_jump_pad.
12075 * linux-low.h (linux_target_ops) <get_thread_area,
12076 install_fast_tracepoint_jump_pad>: New fields.
12077 (struct lwp_info) <collecting_fast_tracepoint,
12078 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12079 (linux_get_thread_area): Declare.
12080 * linux-x86-low.c (jump_insn): New.
12081 (x86_get_thread_area): New.
12082 (append_insns): New.
12083 (push_opcode): New.
12084 (amd64_install_fast_tracepoint_jump_pad): New.
12085 (i386_install_fast_tracepoint_jump_pad): New.
12086 (x86_install_fast_tracepoint_jump_pad): New.
12087 (the_low_target): Install x86_get_thread_area and
12088 x86_install_fast_tracepoint_jump_pad.
12089 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12090 (struct fast_tracepoint_jump): New.
12091 (fast_tracepoint_jump_insn): New.
12092 (fast_tracepoint_jump_shadow): New.
12093 (find_fast_tracepoint_jump_at): New.
12094 (fast_tracepoint_jump_here): New.
12095 (delete_fast_tracepoint_jump): New.
12096 (set_fast_tracepoint_jump): New.
12097 (uninsert_fast_tracepoint_jumps_at): New.
12098 (reinsert_fast_tracepoint_jumps_at): New.
12099 (set_breakpoint_at): Use write_inferior_memory.
12100 (uninsert_raw_breakpoint): Use write_inferior_memory.
12101 (check_mem_read): Mask out fast tracepoint jumps.
12102 (check_mem_write): Mask out fast tracepoint jumps.
12103 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12104 (set_fast_tracepoint_jump): Declare.
12105 (delete_fast_tracepoint_jump)
12106 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12107 (reinsert_fast_tracepoint_jumps_at): Declare.
12108 * regcache.c: Don't compile many functions when building the
12109 in-process agent library.
12110 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12111 the register buffer in the heap.
12112 (free_register_cache): If the register buffer isn't owned by the
12113 regcache, don't free it.
12114 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12115 pre-existing register caches.
12116 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12118 (convert_ascii_to_int): : Constify `from' parameter type.
12119 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12120 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12121 the needed buffer in-place.
12122 (relocate_instruction): New.
12123 * server.c (handle_query) <qSymbols>: If the target supports
12124 tracepoints, give it a chance of looking up symbols. Report
12125 support for fast tracepoints.
12126 (handle_status): Stabilize threads.
12127 (process_serial_event): Adjust.
12128 * server.h (struct fast_tracepoint_jump): Forward declare.
12129 (struct process_info) <fast_tracepoint_jumps>: New field.
12130 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12131 (decode_X_packet, decode_M_packet): Adjust.
12132 (relocate_instruction): Declare.
12133 (in_process_agent_loaded): Declare.
12134 (tracepoint_look_up_symbols): Declare.
12135 (struct fast_tpoint_collect_status): Declare.
12136 (fast_tracepoint_collecting): Declare.
12137 (force_unlock_trace_buffer): Declare.
12138 (handle_tracepoint_bkpts): Declare.
12139 (initialize_low_tracepoint)
12140 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12141 * target.h (struct target_ops) <stabilize_threads,
12142 install_fast_tracepoint_jump_pad>: New fields.
12143 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12144 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12145 [HAVE_STDINT_H]: Include stdint.h.
12146 (trace_debug_1): Rename to ...
12147 (trace_vdebug): ... this.
12148 (trace_debug): Rename to ...
12149 (trace_debug_1): ... this. Add `level' parameter.
12150 (trace_debug): New.
12151 (ATTR_USED, ATTR_NOINLINE): New.
12152 (IP_AGENT_EXPORT): New.
12153 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12154 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12155 (about_to_request_buffer_space, trace_buffer_is_full)
12156 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12157 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12158 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12159 (traceframe_write_count, traceframes_created)
12160 (trace_state_variables)
12161 New renaming defines.
12162 (struct ipa_sym_addresses): New.
12163 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12164 (symbol_list): New.
12165 (ipa_sym_addrs): New.
12166 (all_tracepoint_symbols_looked_up): New.
12167 (in_process_agent_loaded): New.
12168 (write_e_ipa_not_loaded): New.
12169 (maybe_write_ipa_not_loaded): New.
12170 (tracepoint_look_up_symbols): New.
12171 (debug_threads) [IN_PROCESS_AGENT]: New.
12172 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12173 (UNKNOWN_SIDE_EFFECTS): New.
12174 (stop_tracing): New.
12175 (flush_trace_buffer): New.
12176 (stop_tracing_bkpt): New.
12177 (flush_trace_buffer_bkpt): New.
12178 (read_inferior_integer): New.
12179 (read_inferior_uinteger): New.
12180 (read_inferior_data_pointer): New.
12181 (write_inferior_data_pointer): New.
12182 (write_inferior_integer): New.
12183 (write_inferior_uinteger): New.
12184 (struct collect_static_trace_data_action): Delete.
12185 (enum tracepoint_type): New.
12186 (struct tracepoint) <type>: New field `type'.
12187 <actions_str, step_actions, step_actions_str>: Only include in
12189 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12190 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12191 (tracepoints): Use IP_AGENT_EXPORT.
12192 (last_tracepoint): Don't include in the IPA.
12193 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12194 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12195 (alloced_trace_state_variables): New.
12196 (trace_state_variables): Use IP_AGENT_EXPORT.
12197 (traceframe_t): Delete unused variable.
12198 (circular_trace_buffer): Don't include in the IPA.
12199 (trace_buffer_start): Delete.
12200 (struct trace_buffer_control): New.
12201 (trace_buffer_free): Delete.
12202 (struct ipa_trace_buffer_control): New.
12203 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12204 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12206 (trace_buffer_ctrl): New.
12207 (TRACE_BUFFER_CTRL_CURR): New.
12208 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12209 Reimplement as macros.
12210 (trace_buffer_wrap): Delete.
12211 (traceframe_write_count, traceframe_read_count)
12212 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12213 (struct tracepoint_hit_ctx) <type>: New field.
12214 (struct fast_tracepoint_ctx): New.
12215 (memory_barrier): New.
12217 (record_tracepoint_error): Update atomically in the IPA.
12218 (clear_inferior_trace_buffer): New.
12219 (about_to_request_buffer_space): New.
12220 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12221 updating the same buffer.
12222 (add_tracepoint): Default the tracepoint's type to trap
12223 tracepoint, and orig_size to -1.
12224 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12225 internal variables.
12226 (create_trace_state_variable): New parameter `gdb'. Handle it.
12227 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12228 (cmd_qtdp): Handle fast tracepoints.
12229 (cmd_qtdv): Adjust.
12230 (max_jump_pad_size): New.
12231 (gdb_jump_pad_head): New.
12232 (get_jump_space_head): New.
12233 (claim_jump_space): New.
12234 (sort_tracepoints): New.
12235 (MAX_JUMP_SIZE): New.
12236 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12238 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12239 support. Upload fast traceframes, and delete internal IPA
12241 (stop_tracing_handler): New.
12242 (flush_trace_buffer_handler): New.
12243 (cmd_qtstop): Upload fast tracepoints.
12244 (response_tracepoint): Handle fast tracepoints.
12245 (tracepoint_finished_step): Upload fast traceframes. Set the
12246 tracepoint hit context's tracepoint type.
12247 (handle_tracepoint_bkpts): New.
12248 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12249 type. Add comment about fast tracepoints.
12250 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12251 non-existing action_str field.
12252 (get_context_regcache): Handle fast tracepoints.
12253 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12255 (fast_tracepoint_from_jump_pad_address): New.
12256 (fast_tracepoint_from_ipa_tpoint_address): New.
12257 (collecting_t): New.
12258 (force_unlock_trace_buffer): New.
12259 (fast_tracepoint_collecting): New.
12261 (gdb_collect): New.
12262 (write_inferior_data_ptr): New.
12263 (target_tp_heap): New.
12264 (target_malloc): New.
12265 (download_agent_expr): New.
12267 (download_tracepoints): New.
12268 (download_trace_state_variables): New.
12269 (upload_fast_traceframes): New.
12270 (IPA_FIRST_TRACEFRAME): New.
12271 (IPA_NEXT_TRACEFRAME_1): New.
12272 (IPA_NEXT_TRACEFRAME): New.
12273 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12274 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12275 (gdb_jump_pad_buffer_end): New.
12276 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12277 (initialize_tracepoint): Adjust.
12278 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12279 buffer. Initialize the low module.
12280 * utils.c (PREFIX, TOOLNAME): New.
12281 (malloc_failure): Use PREFIX.
12282 (error): In the IPA, an error causes an exit.
12283 (fatal, warning): Use PREFIX.
12284 (internal_error): Use TOOLNAME.
12285 (NUMCELLS): Increase to 10.
12286 * configure, config.in: Regenerate.
12288 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12290 * server.c (handle_query) <qSupported>: Do two passes over the
12291 qSupported string to avoid nesting strtok.
12293 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12295 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12297 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12298 -Wl,--dynamic-list.
12299 * configure: Regenerate.
12300 * proc-service.list: New.
12302 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12304 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12307 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12309 * gdbreplay.c (remote_open): Check error return from socket() call by
12310 its equality to -1 not by it being negative.
12311 * remote-utils.c (remote_open): Likewise.
12313 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12315 * config.h: Regenerate.
12317 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12319 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12320 doesn't provide PTRACE_GET_THREAD_AREA.
12322 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12324 * linux-m68k-low.c: Include <asm/ptrace.h>
12325 (ps_get_thread_area): Implement.
12327 2010-05-03 Doug Evans <dje@google.com>
12329 * event-loop.c (struct callback_event): New struct.
12330 (callback_list): New global.
12331 (append_callback_event, delete_callback_event): New functions.
12332 (process_callback): New function.
12333 (start_event_loop): Call it.
12334 * remote-utils.c (NOT_SCHEDULED): Define.
12335 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12336 moved out of readchar.
12337 (readchar): Rewrite. Call reschedule before returning.
12338 (reset_readchar): New function.
12339 (remote_close): Call it.
12340 (process_remaining, reschedule): New functions.
12341 * server.h (callback_handler_func): New typedef.
12342 (append_callback_event, delete_callback_event): Declare.
12344 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12346 * proc-service.c (ps_pglobal_lookup): Use
12347 thread_db_look_up_one_symbol.
12348 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12349 parameter. Use it instead of all_symbols_looked_up.
12350 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12352 (all_symbols_looked_up): Don't declare.
12353 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12354 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12356 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12357 Set all_symbols_looked_up here.
12358 (thread_db_look_up_one_symbol): New.
12359 (thread_db_get_tls_address): Adjust.
12360 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12361 thread_db object on the heap, and tentatively set it in the
12363 (thread_db_init): Don't set all_symbols_looked_up here.
12364 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12366 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12368 * linux-low.c (linux_kill, linux_detach): Adjust.
12369 (status_pending_p_callback): Remove redundant statement. Check
12370 for !TARGET_WAITIKIND_IGNORE, instead of
12371 TARGET_WAITKIND_STOPPED.
12372 (handle_tracepoints): Make sure LWP is locked. Adjust.
12373 (linux_wait_for_event_1): Adjust.
12374 (linux_cancel_breakpoints): New.
12375 (unsuspend_one_lwp): New.
12376 (unsuspend_all_lwps): New.
12377 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12378 (send_sigstop_callback): Change return type to int, add new
12379 `except' parameter and handle it.
12380 (suspend_and_send_sigstop_callback): New.
12381 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12382 pass them down. If SUSPEND, also increment the lwp's suspend
12384 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12385 (need_step_over_p): Don't consider suspended LWPs.
12386 (start_step_over): Adjust.
12387 (proceed_one_lwp): Change return type to int, add new `except'
12388 parameter and handle it.
12389 (unsuspend_and_proceed_one_lwp): New.
12390 (proceed_all_lwps): Use find_inferior instead of
12392 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12393 also decrement the suspend count of LWPs. Pass `except' down,
12394 instead of hacking its suspend count.
12395 (linux_pause_all): Add `freeze' parameter. Adjust.
12396 (linux_unpause_all): New.
12397 (linux_target_ops): Install linux_unpause_all.
12398 * server.c (handle_status): Adjust.
12399 * target.h (struct target_ops): New fields `unpause_all' and
12400 `cancel_breakpoints'. Add new parameter to `pause_all'.
12401 (pause_all): Add new `freeze' parameter.
12402 (unpause_all): New.
12403 (cancel_breakpoints): New.
12404 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12405 cancel breakpoints.
12406 (cmd_qtstart): Pause threads.
12407 (stop_tracing): Pause threads, and cancel breakpoints.
12408 * win32-low.c (win32_target_ops): Adjust.
12410 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12412 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12413 the inferior right away from here...
12414 (linux_wait_1): ... to here, and adjust to check the thread's
12415 last_resume_kind instead of the lwp's step or stop_expected flags.
12417 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12419 * README: Use consistent `GDB' and `GDBserver' spellings.
12421 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12423 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12424 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12425 (linux_detach_one_lwp): Assume the lwp is stopped.
12426 (any_thread_of): Delete.
12427 (linux_detach): Stop all lwps here. Don't blindly delete all
12429 (delete_lwp_callback): New.
12430 (linux_mourn): Delete all lwps of the process that is gone.
12431 (linux_wait_1): Don't delete the last lwp of the process here.
12432 * mem-break.h (mark_breakpoints_out): Declare.
12433 * mem-break.c (mark_breakpoints_out): New.
12434 (free_all_breakpoints): Use it.
12435 * server.c (handle_target_event): If the process is gone, mark
12437 * thread-db.c (struct thread_db) <create_bp>: New field.
12438 (thread_db_enable_reporting): Fix prototype. Store a thread event
12439 breakpoint reference in the thread_db struct.
12440 (thread_db_load_search): Clear the thread_db object.
12441 (try_thread_db_load_1): Ditto.
12442 (switch_to_process): New.
12443 (disable_thread_event_reporting): Use it.
12444 (remove_thread_event_breakpoints): New.
12445 (thread_db_detach, thread_db_mourn): Use it.
12447 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12449 * linux-low.c (linux_enable_event_reporting): New.
12450 (linux_wait_for_event_1, handle_extended_wait): Use it.
12452 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12454 * linux-low.c (linux_kill_one_lwp, linux_kill)
12455 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12456 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12457 SIGSTOP even if the LWP is stopped.
12458 (send_sigstop_callback): New.
12459 (stop_all_lwps): Use send_sigstop_callback instead.
12460 (linux_resume_one_thread): Adjust.
12461 (proceed_one_lwp): Still proceed an LWP that the client has
12462 requested to stop, if we haven't reported it as stopped yet. Make
12463 sure that LWPs the client want stopped, have a pending SIGSTOP.
12465 2010-04-26 Doug Evans <dje@google.com>
12467 * server.c (handle_general_set): Make static.
12469 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12470 Print received char after testing for error/eof instead of before.
12471 (input_interrupt): Tweak comment.
12473 2010-04-23 Doug Evans <dje@google.com>
12475 * server.c (start_inferior): Print inferior argv if --debug.
12477 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12479 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12480 * nto-x86-low.c: Include server.h
12482 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12484 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12485 be consistent with other sources of this directory.
12486 (init_registers_amd64): Correct name of source file of this function
12489 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12491 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12492 64-bit executables.
12494 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12496 * win32-i386-low.c: Add 64-bit support.
12497 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12498 (init_registers_amd64): Declare.
12499 (mappings): Add 64-bit version of array.
12500 (init_windows_x86): New function.
12501 (the_low_target): Change init_arch field to init_windows_x86.
12503 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12505 * win32-low.c: Adapt to support also 64-bit architecture.
12506 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12507 (get_image_name): Use SIZE_T type for local variable `done'.
12508 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12509 (toolhelp_get_dll_name): Idem.
12510 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12511 Use uintptr_t typecast to avoid warning.
12512 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12513 (handle_exception): Use phex_nz to avoid warning.
12514 (win32_wait): Remove unused local variable `process'.
12516 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12518 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12521 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12523 * configure.ac: Use `ws2_32' library for srv_mingw.
12524 * configure: Regenerate.
12525 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12526 * remote-utils.c: Likewise.
12528 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12530 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12531 if __x86_64__ is defined.
12533 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12535 * configure: Regenerate.
12537 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12539 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12540 * target.h (target_ops): New get_tib_address field.
12541 * win32-low.h (win32_thread_info): Add thread_local_base field.
12542 * win32-low.c (child_add_thread): Add tlb argument.
12543 Set thread_local_base field to TLB.
12544 (get_child_debug_event): Adapt to child_add_thread change.
12545 (win32_get_tib_address): New function.
12546 (win32_target_ops): Set get_tib_address field to
12547 win32_get_tib_address.
12548 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12550 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12552 * linux-low.c (linux_mourn): Also remove the process.
12553 * server.c (handle_target_event): Don't remove the process here.
12554 * nto-low.c (nto_mourn): New.
12555 (nto_target_ops): Install it.
12556 * spu-low.c (spu_mourn): New.
12557 (spu_target_ops): Install it.
12558 * win32-low.c (win32_mourn): New.
12559 (win32_target_ops): Install it.
12561 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12563 * server.h (buffer_xml_printf): Remove redundant `;'.
12565 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12567 * regcache.c (set_register_cache): Invalidate regcaches before
12568 changing the register cache layout.
12569 (regcache_invalidate_one): Allow a NULL regcache.
12570 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12571 regcaches before changing the register cache layout or the target
12574 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12576 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12577 variable warning on Linux/x86-64.
12579 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12581 GDBserver disconnected tracing support.
12583 * linux-low.c (linux_remove_process): Delete.
12584 (add_lwp): Don't set last_resume_kind here.
12585 (linux_kill): Use `mourn'.
12586 (linux_detach): Use `thread_db_detach', and `mourn'.
12587 (linux_mourn): New.
12588 (linux_attach_lwp_1): Adjust comment.
12589 (linux_attach): last_resume_kind moved the thread_info; adjust.
12590 (status_pending_p_callback): Adjust.
12591 (linux_wait_for_event_1): Adjust.
12592 (count_events_callback, select_singlestep_lwp_callback)
12593 (select_event_lwp_callback, cancel_breakpoints_callback)
12594 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12595 (proceed_one_lwp): Adjust.
12596 (linux_async): Add debug output.
12597 (linux_thread_stopped): New.
12598 (linux_pause_all): New.
12599 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12601 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12602 (thread_db_free): Delete declaration.
12603 (thread_db_detach, thread_db_mourn): Declare.
12604 * thread-db.c (thread_db_init): Use thread_db_mourn.
12605 (thread_db_free): Delete, split in two.
12606 (disable_thread_event_reporting): New.
12607 (thread_db_detach): New.
12608 (thread_db_mourn): New.
12610 * server.h (struct thread_info) <last_resume_kind>: New field.
12611 <attached>: Add comment.
12612 <gdb_detached>: New field.
12613 (handler_func): Change return type to int.
12614 (handle_serial_event, handle_target_event): Ditto.
12615 (gdb_connected): Declare.
12617 (disconnected_tracing): Declare.
12618 (stop_tracing): Declare.
12620 * server.c (handle_query) <qSupported>: Report support for
12621 disconnected tracing.
12622 (queue_stop_reply_callback): Account for running threads.
12623 (gdb_wants_thread_stopped): New.
12624 (gdb_wants_all_threads_stopped): New.
12625 (gdb_reattached_process): New.
12626 (handle_status): Clear the `gdb_detached' flag of all processes.
12627 In all-stop, stop all threads.
12628 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12629 (process_serial_event): If the remote connection breaks, or if an
12630 exit was forced with "monitor exit", force an event loop exit.
12631 Handle disconnected tracing on detach.
12632 (handle_serial_event): Adjust.
12633 (handle_target_event): If GDB isn't connected, forward events back
12634 to the inferior, unless the last process exited, in which case,
12635 exit gdbserver. Adjust interface.
12637 * remote-utils.c (remote_open): Don't block in accept. Instead
12638 register an event loop source on the listen socket file
12639 descriptor. Refactor bits into ...
12640 (listen_desc): ... this new global.
12641 (gdb_connected): ... this new function.
12642 (enable_async_notification): ... this new function.
12643 (handle_accept_event): ... this new function.
12644 (remote_close): Clear remote_desc.
12646 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12648 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12650 (mourn_inferior): Define.
12651 (target_process_qsupported): Avoid the dangling else problem.
12652 (thread_stopped): Define.
12653 (pause_all): Define.
12654 (target_waitstatus_to_string): Declare.
12655 * target.c (target_waitstatus_to_string): New.
12657 * tracepoint.c (tracing): Make extern.
12658 (disconnected_tracing): New.
12659 (stop_tracing): Make extern. Handle tracing stops due to GDB
12661 (cmd_qtdisconnected): New.
12662 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12663 (handle_tracepoint_general_set): Handle QTDisconnected.
12665 * event-loop.c (event_handler_func): Change return type to int.
12666 (process_event): Bail out if the event handler wants the event
12668 (handle_file_event): Ditto.
12669 (start_event_loop): Bail out if the event handler wants the event
12672 * nto-low.c (nto_target_ops): Adjust.
12673 * spu-low.c (spu_wait): Don't remove the process here.
12674 (spu_target_ops): Adjust.
12675 * win32-low.c (win32_wait): Don't remove the process here.
12676 (win32_target_ops): Adjust.
12678 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12680 * regcache.c (realloc_register_cache): Invalidate inferior's
12681 regcache before recreating it.
12683 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12685 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12687 2010-04-09 Stan Shebs <stan@codesourcery.com>
12688 Pedro Alves <pedro@codesourcery.com>
12690 * server.h (LONGEST): New.
12691 (struct thread_info) <while_stepping>: New field.
12692 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12694 (initialize_tracepoint, handle_tracepoint_general_set)
12695 (handle_tracepoint_query, tracepoint_finished_step)
12696 (tracepoint_was_hit, release_while_stepping_state_list):
12697 (current_traceframe): Declare.
12698 * server.c (handle_general_set): Handle tracepoint packets.
12699 (read_memory): New.
12700 (write_memory): New.
12701 (handle_search_memory_1): Use read_memory.
12702 (handle_query): Report support for conditional tracepoints, trace
12703 state variables, and tracepoint sources. Handle tracepoint
12705 (main): Initialize the tracepoints module.
12706 (process_serial_event): Handle traceframe reads/writes.
12708 * linux-low.c (handle_tracepoints): New.
12709 (linux_wait_1): Call it.
12710 (linux_resume_one_lwp): Handle while-stepping.
12711 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12712 (linux_target_ops): Install them.
12713 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12715 * linux-x86-low.c (x86_supports_tracepoints): New.
12716 (the_low_target). Install it.
12718 * mem-break.h (delete_breakpoint): Declare.
12719 * mem-break.c (delete_breakpoint): Make external.
12721 * target.h (struct target_ops): Add `supports_tracepoints',
12722 `read_pc', and `write_pc' fields.
12723 (target_supports_tracepoints): Define.
12724 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12727 * regcache.h (struct regcache) <registers_owned>: New field.
12728 (init_register_cache, regcache_cpy): Declare.
12729 (regcache_read_pc, regcache_write_pc): Declare.
12730 (register_cache_size): Declare.
12731 (supply_regblock): Declare.
12732 * regcache.c (init_register_cache): New.
12733 (new_register_cache): Use it.
12734 (regcache_cpy): New.
12735 (register_cache_size): New.
12736 (supply_regblock): New.
12737 (regcache_read_pc, regcache_write_pc): New.
12739 * tracepoint.c: New.
12741 * Makefile.in (OBS): Add tracepoint.o.
12742 (tracepoint.o): New rule.
12744 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12746 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12748 (i386-mmx.c): Likewise.
12749 (i386-mmx-linux.o): Likewise.
12750 (i386-mmx-linux.c): Likewise.
12752 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12753 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12754 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12755 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12757 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12758 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12759 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12761 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12763 * Makefile.in (clean): Updated.
12765 (i386-avx.c): Likewise.
12766 (i386-avx-linux.o): Likewise.
12767 (i386-avx-linux.c): Likewise.
12768 (amd64-avx.o): Likewise.
12769 (amd64-avx.c): Likewise.
12770 (amd64-avx-linux.o): Likewise.
12771 (amd64-avx-linux.c): Likewise.
12773 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12774 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12775 (srv_amd64_regobj): Add amd64-avx.o.
12776 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12777 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12778 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12779 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12780 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12781 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12782 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12784 * i387-fp.c: Include "i386-xstate.h".
12786 (i387_cache_to_xsave): Likewise.
12787 (i387_xsave_to_cache): Likewise.
12788 (x86_xcr0): Likewise.
12790 * i387-fp.h (i387_cache_to_xsave): Likewise.
12791 (i387_xsave_to_cache): Likewise.
12792 (x86_xcr0): Likewise.
12794 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12795 * linux-crisv32-low.c (target_regsets): Likewise.
12796 * linux-m68k-low.c (target_regsets): Likewise.
12797 * linux-mips-low.c (target_regsets): Likewise.
12798 * linux-ppc-low.c (target_regsets): Likewise.
12799 * linux-s390-low.c (target_regsets): Likewise.
12800 * linux-sh-low.c (target_regsets): Likewise.
12801 * linux-sparc-low.c (target_regsets): Likewise.
12802 * linux-xtensa-low.c (target_regsets): Likewise.
12804 * linux-low.c: Include <sys/uio.h>.
12805 (regsets_fetch_inferior_registers): Support nt_type.
12806 (regsets_store_inferior_registers): Likewise.
12807 (linux_process_qsupported): New.
12808 (linux_target_ops): Add linux_process_qsupported.
12810 * linux-low.h (regset_info): Add nt_type.
12811 (linux_target_ops): Add process_qsupported.
12813 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12815 (init_registers_i386_avx_linux): New.
12816 (init_registers_amd64_avx_linux): Likewise.
12817 (xmltarget_i386_linux_no_xml): Likewise.
12818 (xmltarget_amd64_linux_no_xml): Likewise.
12819 (PTRACE_GETREGSET): Likewise.
12820 (PTRACE_SETREGSET): Likewise.
12821 (x86_fill_xstateregset): Likewise.
12822 (x86_store_xstateregset): Likewise.
12823 (use_xml): Likewise.
12824 (x86_linux_update_xmltarget): Likewise.
12825 (x86_linux_process_qsupported): Likewise.
12826 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12827 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12828 init_registers_i386_linux here. Call
12829 x86_linux_update_xmltarget.
12830 (the_low_target): Add x86_linux_process_qsupported.
12832 * server.c (handle_query): Call target_process_qsupported.
12834 * target.h (target_ops): Add process_qsupported.
12835 (target_process_qsupported): New.
12837 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12839 * inferiors.c (add_thread): Set last_status kind to
12840 TARGET_WAITKIND_IGNORE.
12841 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12842 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12843 (linux_wait_1): Move `thread' local definition to block that uses
12844 it. Don't NULL initialize `event_child'.
12845 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12846 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12847 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12849 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12851 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12852 an extended waitstatus, or by a watchpoint.
12853 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12854 thread was stepping or has been stopped by a watchpoint.
12856 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12858 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12859 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12860 of another, then delete the previous, and validate all
12862 (validate_inserted_breakpoint): New.
12863 (delete_disabled_breakpoints): New.
12864 (validate_breakpoints): New.
12865 (check_mem_read): Validate breakpoints before trusting their
12866 shadow. Delete disabled breakpoints.
12867 (check_mem_write): Validate breakpoints before trusting they
12868 should be inserted. Delete disabled breakpoints.
12869 * mem-break.h (validate_breakpoints):
12870 * server.c (handle_query): Validate breakpoints when we see a
12873 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12875 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12876 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12877 if we could tell there's a GDB breakpoint at stop_pc.
12878 (need_step_over_p): Don't do a step over if we find a GDB
12879 breakpoint at the resume PC.
12881 * mem-break.c (struct raw_breakpoint): New.
12882 (enum bkpt_type): New type `gdb_breakpoint'.
12883 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12884 fields. New field `raw'.
12885 (find_raw_breakpoint_at): New.
12886 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12887 breakpoint instead.
12888 (set_breakpoint_at): Adjust.
12889 (delete_raw_breakpoint): New.
12890 (release_breakpoint): New.
12891 (delete_breakpoint): Rename to...
12892 (delete_breakpoint_1): ... this. Add proc parameter. Use
12893 release_breakpoint. Return ENOENT.
12894 (delete_breakpoint): Reimplement.
12895 (find_breakpoint_at): Delete.
12896 (find_gdb_breakpoint_at): New.
12897 (delete_breakpoint_at): Delete.
12898 (set_gdb_breakpoint_at): New.
12899 (delete_gdb_breakpoint_at): New.
12900 (gdb_breakpoint_here): New.
12901 (set_reinsert_breakpoint): Use release_breakpoint.
12902 (uninsert_breakpoint): Rename to ...
12903 (uninsert_raw_breakpoint): ... this.
12904 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12905 (reinsert_raw_breakpoint): Change parameter type to
12907 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12909 (check_breakpoints): Adjust. Use release_breakpoint.
12910 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12911 (breakpoint_inserted_here): Ditto.
12912 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12913 Don't trust the breakpoint's shadow if it is not inserted.
12914 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12915 (delete_all_breakpoints): Adjust.
12916 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12917 use delete_breakpoint_1.
12919 * mem-break.h (breakpoints_supported): Delete declaration.
12920 (set_gdb_breakpoint_at): Declare.
12921 (gdb_breakpoint_here): Declare.
12922 (delete_breakpoint_at): Delete.
12923 (delete_gdb_breakpoint_at): Declare.
12925 * server.h (struct raw_breakpoint): Forward declare.
12926 (struct process_info): New field `raw_breakpoints'.
12928 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12931 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12933 * linux-low.c (status_pending_p_callback): Fix comment.
12934 (linux_wait_for_event_1): Move most of the internal breakpoint
12935 handling from here...
12936 (linux_wait_1): ... to here.
12937 (count_events_callback): New.
12938 (select_singlestep_lwp_callback): New.
12939 (select_event_lwp_callback): New.
12940 (cancel_breakpoints_callback): New.
12941 (select_event_lwp): New.
12942 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12943 priority to all LWPs that have had events that should be reported
12944 to the client. Cancel breakpoints when about to reporting the
12945 event to the client, not while stopping lwps. No longer cancel
12946 finished single-steps here.
12947 (cancel_finished_single_step): Delete.
12948 (cancel_finished_single_steps): Delete.
12950 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12952 * mem-break.c (enum bkpt_type): New.
12953 (struct breakpoint): New field `type'.
12954 (set_breakpoint_at): Change return type to struct breakpoint
12955 pointer. Set type to `other_breakpoint' by default.
12956 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12957 in the breakpoint list.
12958 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12959 (reinsert_breakpoint): Rename to ...
12960 (reinsert_raw_breakpoint): ... this.
12961 (reinsert_breakpoints_at): Adjust.
12962 * mem-break.h (struct breakpoint): Declare.
12963 (set_breakpoint_at): Change return type to struct breakpoint
12966 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12968 * server.c (handle_query): Assign, not compare.
12970 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12972 Teach linux gdbserver to step-over-breakpoints.
12974 * linux-low.c (can_hardware_single_step): New.
12975 (supports_breakpoints): New.
12976 (handle_extended_wait): If stopping threads, read the stop pc of
12977 the new cloned LWP.
12979 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12980 low target doesn't support retrieving the PC.
12981 (add_lwp): Set last_resume_kind to resume_continue.
12982 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12983 (linux_attach): Don't clear stop_expected. Set the lwp's
12984 last_resume_kind to resume_stop.
12985 (linux_detach_one_lwp): Don't check for removed breakpoints.
12986 (check_removed_breakpoint): Delete.
12987 (status_pending_p): Rename to ...
12988 (status_pending_p_callback): ... this. Don't check for removed
12989 breakpoints. Don't consider threads that are stopped from GDB's
12991 (linux_wait_for_lwp): Always read the stop_pc here.
12992 (cancel_breakpoint): New.
12993 (step_over_bkpt): New global.
12994 (linux_wait_for_event_1): Implement stepping over breakpoints.
12995 (gdb_wants_lwp_stopped): New.
12996 (gdb_wants_all_stopped): New.
12997 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12998 single-step traps here. Store the thread's last reported target
13000 (send_sigstop): Don't clear stop_expected. Always set it,
13002 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13003 (cancel_finished_single_step): New.
13004 (cancel_finished_single_steps): New.
13005 (wait_for_sigstop): Don't cancel finished single-step traps here.
13006 (linux_resume_one_lwp): Don't check for removed breakpoints.
13007 Don't set `step' on non-hardware step archs.
13008 (linux_set_resume_request): Ignore resume_stop requests if already
13009 stopping or stopped. Set the lwp's last_resume_kind.
13010 (resume_status_pending_p): Don't check for removed breakpoints.
13011 (need_step_over_p): New.
13012 (start_step_over): New.
13013 (finish_step_over): New.
13014 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13015 requests. Clear the thread's last reported target waitstatus.
13016 Don't use the `suspended' flag. Don't consider pending breakpoints.
13017 (linux_resume): Start a step-over if necessary.
13018 (proceed_one_lwp): New.
13019 (proceed_all_lwps): New.
13020 (unstop_all_lwps): New.
13021 * linux-low.h (struct lwp_info): Rewrite comment for the
13022 `suspended' flag. Add the `stop_pc' field. Delete the
13023 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13024 Add `'last_resume_kind' and `need_step_over' fields.
13025 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13026 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13027 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13028 (set_raw_breakpoint_at): New.
13029 (set_breakpoint_at): Rewrite to use it.
13030 (reinsert_breakpoint_handler): Delete.
13031 (set_reinsert_breakpoint): New.
13032 (reinsert_breakpoint_by_bp): Delete.
13033 (delete_reinsert_breakpoints): New.
13034 (uninsert_breakpoint): Rewrite.
13035 (uninsert_breakpoints_at): New.
13036 (reinsert_breakpoint): Rewrite.
13037 (reinsert_breakpoints_at): New.
13038 (check_breakpoints): Rewrite.
13039 (breakpoint_here): New.
13040 (breakpoint_inserted_here): New.
13041 (check_mem_read): Adjust.
13042 * mem-break.h (breakpoints_supported, breakpoint_here)
13043 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13044 (reinsert_breakpoint_by_bp): Delete declaration.
13045 (delete_reinsert_breakpoints): Declare.
13046 (reinsert_breakpoint): Delete declaration.
13047 (reinsert_breakpoints_at): Declare.
13048 (uninsert_breakpoint): Delete declaration.
13049 (uninsert_breakpoints_at): Declare.
13050 (check_breakpoints): Adjust prototype.
13051 * server.h: Adjust include order.
13052 (struct thread_info): Declare here. Add a `last_status' field.
13054 2010-03-23 Michael Snyder <msnyder@vmware.com>
13056 * server.c (crc32): New function.
13057 (handle_query): Add handling for 'qCRC:' request.
13059 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13061 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13062 lwp had been stopped by a watchpoint.
13064 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13066 * server.h (internal_error): Declare.
13067 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13068 * utils.c (internal_error): New function.
13070 2010-03-15 Andreas Schwab <schwab@redhat.com>
13072 * configure.srv: Fix typo setting srv_regobj.
13074 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13076 * linux-low.c (fetch_register): Avoid passing a non string literal
13078 (usr_store_inferior_registers): Ditto.
13080 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13082 * linux-low.c (linux_write_memory): Bail out early if peeking
13085 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13087 * linux-low.h (struct lwp_info): New fields
13088 `stopped_by_watchpoint' and `stopped_data_address'.
13089 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13090 here, and cache them in the lwp object.
13091 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13093 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13095 (linux_stopped_by_watchpoint): Rewrite.
13096 (linux_stopped_data_address): Rewrite.
13098 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13100 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13101 switching the current inferior, not before.
13103 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13105 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13106 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13107 i386-linux.c and amd64-linux.c.
13108 (reg-i386.o): Removed.
13109 (reg-i386.c): Likewise.
13110 (reg-i386-linux.o): Likewise.
13111 (reg-i386-linux.c): Likewise.
13112 (reg-x86-64.o): Likewise.
13113 (reg-x86-64.c): Likewise.
13114 (reg-x86-64-linux.o): Likewise.
13115 (reg-x86-64-linux.c): Likewise.
13117 (i386.c): Likewise.
13118 (i386-linux.o): Likewise.
13119 (i386-linux.c): Likewise.
13120 (amd64.o): Likewise.
13121 (amd64.c): Likewise.
13122 (amd64-linux.o): Likewise.
13123 (amd64-linux.c): Likewise.
13125 * configure.srv (srv_i386_regobj): New.
13126 (srv_i386_linux_regobj): Likewise.
13127 (srv_amd64_regobj): Likewise.
13128 (srv_amd64_linux_regobj): Likewise.
13129 (srv_i386_32bit_xmlfiles): Likewise.
13130 (srv_i386_64bit_xmlfiles): Likewise.
13131 (srv_i386_xmlfiles): Likewise.
13132 (srv_amd64_xmlfiles): Likewise.
13133 (srv_i386_linux_xmlfiles): Likewise.
13134 (srv_amd64_linux_xmlfiles): Likewise.
13135 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13136 srv_xmlfiles to $srv_i386_xmlfiles.
13137 (i[34567]86-*-mingw32ce*): Likewise.
13138 (i[34567]86-*-mingw*): Likewise.
13139 (i[34567]86-*-nto*): Likewise.
13140 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13141 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13142 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13143 (x86_64-*-linux*): Likewise.
13145 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13146 (init_registers_amd64_linux): New.
13147 (x86_arch_setup): Replace init_registers_x86_64_linux with
13148 init_registers_amd64_linux.
13150 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13152 * configure.ac: Check for libdl. If it is not available link against
13153 static libthread_db.
13154 * configure: Regenerate.
13156 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13160 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13161 handing a read watchpoint.
13162 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13164 2010-02-12 Doug Evans <dje@google.com>
13166 * linux-low.c (linux_supports_tracefork_flag): Document.
13167 (linux_look_up_symbols): Add comment.
13169 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13171 * regcache.c (supply_register): Clear regcache if buf is NULL.
13173 2010-02-02 Nicolas Roche <roche@sourceware.org>
13174 Joel Brobecker <brobecker@adacore.com>
13176 * inferiors.c (find_inferior): Add function documentation.
13177 (unloaded_dll): Handle the case where the unloaded dll has not
13178 been previously registered in the dll list.
13180 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13182 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13183 (thumb2_breakpoint): New.
13184 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13186 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13188 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13189 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13192 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13194 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13196 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13198 * linux-s390-low.c (s390_collect_ptrace_register)
13199 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13201 2010-01-21 Doug Evans <dje@google.com>
13203 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13204 (PTRACE_ARG4_TYPE): New macro.
13205 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13206 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13207 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13208 (usr_store_inferior_registers): Ditto.
13209 (linux_read_memory, linux_write_memory): Ditto.
13210 (linux_test_for_tracefork): Ditto.
13212 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13213 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13215 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13217 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13220 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13222 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13223 prototype to take a regcache. Adjust.
13225 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13227 * regcache.h (struct thread_info): Forward declare.
13228 (struct regcache): New.
13229 (new_register_cache): Adjust prototype.
13230 (get_thread_regcache): Declare.
13231 (free_register_cache): Adjust prototype.
13232 (registers_to_string, registers_from_string): Ditto.
13233 (supply_register, supply_register_by_name, collect_register)
13234 (collect_register_as_string, collect_register_by_name): Ditto.
13235 * regcache.c (struct inferior_regcache_data): Delete.
13236 (get_regcache): Rename to ...
13237 (get_thread_regcache): ... this. Adjust. Switch inferior before
13238 fetching registers.
13239 (regcache_invalidate_one): Adjust.
13240 (regcache_invalidate): Fix prototype.
13241 (new_register_cache): Return the new register cache.
13242 (free_register_cache): Change prototype.
13243 (realloc_register_cache): Adjust.
13244 (registers_to_string): Change prototype to take a regcache. Adjust.
13245 (registers_from_string): Ditto.
13246 (register_data): Ditto.
13247 (supply_register): Ditto.
13248 (supply_register_by_name): Ditto.
13249 (collect_register): Ditto.
13250 (collect_register_as_string): Ditto.
13251 (collect_register_by_name): Ditto.
13252 * server.c (process_serial_event): Adjust.
13253 * linux-low.h (regset_fill_func, regset_store_func): Change
13255 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13257 * linux-low.c (get_stop_pc): Adjust.
13258 (check_removed_breakpoint): Adjust.
13259 (linux_wait_for_event): Adjust.
13260 (linux_resume_one_lwp): Adjust.
13261 (fetch_register): Add regcache parameter. Adjust.
13262 (usr_store_inferior_registers): Ditto.
13263 (regsets_fetch_inferior_registers): Ditto.
13264 (regsets_store_inferior_registers): Ditto.
13265 (linux_fetch_registers, linux_store_registers): Ditto.
13266 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13268 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13270 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13271 prototype to take a regcache.
13272 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13273 * remote-utils.c (convert_ascii_to_int, outreg)
13274 (prepare_resume_reply): Change prototype to take a regcache.
13276 * target.h (struct target_ops) <fetch_registers, store_registers>:
13277 Change prototype to take a regcache.
13278 (fetch_inferior_registers, store_inferior_registers): Change
13279 prototype to take a regcache. Adjust.
13280 * proc-service.c (ps_lgetregs): Adjust.
13281 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13282 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13283 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13284 take a regcache. Adjust.
13285 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13286 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13287 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13288 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13289 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13290 (cris_cannot_fetch_register):
13291 (cris_breakpoint_at): Change prototype to take a regcache.
13293 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13294 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13295 to take a regcache. Adjust.
13296 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13298 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13299 take a regcache. Adjust.
13300 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13301 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13302 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13303 * linux-mips-low.c (mips_get_pc):
13304 (mips_set_pc): Change prototype to take a regcache. Adjust.
13305 (mips_reinsert_addr): Adjust.
13306 (mips_collect_register): Change prototype to take a regcache.
13308 (mips_supply_register):
13309 (mips_collect_register_32bit, mips_supply_register_32bit)
13310 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13311 (mips_store_fpregset): Ditto.
13312 * linux-ppc-low.c (ppc_supply_ptrace_register)
13313 (ppc_supply_ptrace_register): Ditto.
13314 (parse_spufs_run): Adjust.
13315 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13316 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13317 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13318 take a regcache. Adjust.
13319 * linux-s390-low.c (s390_collect_ptrace_register)
13320 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13321 (s390_set_pc): Change prototype to take a regcache. Adjust.
13322 (s390_arch_setup): Adjust.
13323 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13324 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13325 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13326 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13327 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13329 (sparc_breakpoint_at): Adjust.
13330 * linux-xtensa-low.c (xtensa_fill_gregset):
13331 (xtensa_store_gregset):
13332 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13333 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13334 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13335 prototype to take a regcache. Adjust.
13336 * win32-arm-low.c (arm_fetch_inferior_register)
13337 (arm_store_inferior_register): Change prototype to take a
13339 * win32-i386-low.c (i386_fetch_inferior_register)
13340 (i386_store_inferior_register): Change prototype to take a
13342 * win32-low.c (child_fetch_inferior_registers)
13343 (child_store_inferior_registers): Change prototype to take a
13345 (win32_wait): Adjust.
13346 (win32_fetch_inferior_registers): Change prototype to take a
13348 (win32_store_inferior_registers): Adjust.
13349 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13350 store_inferior_register>: Change prototype to take a regcache.
13352 2010-01-20 Doug Evans <dje@google.com>
13354 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13356 (linux_wait_for_event1, linux_init_signals): Ditto.
13357 (W_STOPCODE): Provide definition if missing.
13359 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13361 * linux-low.c (linux_core_of_thread): New.
13362 (compare_ints, show_process, list_threads): New.
13363 (linux_qxfer_osdata): Report threads and cores.
13364 (linux_target_op): Register linux_core_of_thread.
13365 * remote-utils.c (prepare_resume_reply): Report the core.
13366 (buffer_xml_printf): Support %d specifier.
13367 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13369 (handle_query): Handle qXfer:threads. Announce availability
13371 * target.h (struct target_ops): New field core_of_thread.
13373 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13375 * Makefile.in (clean): Remove new generated files.
13376 (reg-s390.o, reg-s390.c): Remove rules.
13377 (reg-s390x.o, reg-s390x.c): Likewise.
13378 (s390-linux32.o, s390-linux32.c): Add rules.
13379 (s390-linux64.o, s390-linux64.c): Likewise.
13380 (s390x-linux64.o, s390x-linux64.c): Likewise.
13381 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13382 * linux-s390-low.c: Include <elf.h>.
13383 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13384 (init_registers_s390): Remove prototype.
13385 (init_registers_s390x): Likewise.
13386 (init_registers_s390_linux32): Add prototype.
13387 (init_registers_s390_linux64): Likewise.
13388 (init_registers_s390x_linux64): Likewise.
13389 (s390_num_regs_3264): New define.
13390 (s390_regmap_3264): New global variable.
13391 (s390_cannot_fetch_register): Remove obsolete check.
13392 (s390_cannot_store_register): Likewise.
13393 (s390_collect_ptrace_register): Handle upper/lower register halves.
13394 (s390_supply_ptrace_register): Likewise.
13395 (s390_fill_gregset): Update to register number changes.
13396 (s390_get_hwcap): New routine.
13397 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13398 Install appropriate regmap and register set.
13400 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13402 * server.c (gdbserver_version): Update copyright year to 2010.
13403 * gdbreplay.c (gdbreplay_version): Likewise.
13405 2009-12-28 Doug Evans <dje@google.com>
13407 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13408 elf/external.h. Include <elf.h> instead but only if necessary.
13410 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13412 * linux-low.c (linux_remove_process): Remove `detaching'
13413 parameter. Don't release/detach from thread_db here.
13414 (linux_kill): Release/detach from thread_db here, ...
13415 (linux_detach): ... and here, before actually detaching.
13416 (linux_wait_1): ... and here, when a process exits.
13417 * thread-db.c (any_thread_of): New.
13418 (thread_db_free): Switch the current inferior to a thread of the
13421 2009-12-21 Doug Evans <dje@google.com>
13423 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13425 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13426 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13427 warning ifndef __NR_tkill. Move setting of errno there too.
13428 Delete unnecessary resetting of errno after syscall.
13429 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13431 * configure.ac: Check for dladdr.
13432 * config.in: Regenerate.
13433 * configure: Regenerate.
13434 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13435 (try_thread_db_load): Update.
13437 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13439 2009-12-18 Doug Evans <dje@google.com>
13441 * event-loop.c: Include unistd.h if it exists.
13443 * linux-low.c (my_waitpid): Move definition away from being in
13444 between linux_tracefork_child/linux_test_for_tracefork.
13446 * gdb_proc_service.h (psaddr_t): Fix type.
13447 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13448 signature to match glibc.
13450 2009-12-16 Doug Evans <dje@google.com>
13452 * linux-low.c (linux_read_memory): Fix argument to read.
13454 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13456 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13457 events, don't leave current_inferior pointing at null.
13459 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13461 * win32-low.c (LOG): Delete.
13462 (OUTMSG): Output to stderr.
13463 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13464 on compile time LOG macro.
13465 (win32_wait): Fix debug output.
13467 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13469 * win32-low.c (win32_add_one_solib): If the dll name is
13470 "ntdll.dll", prepend the system directory to the dll path.
13472 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13474 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13476 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13477 Vladimir Prus <vladimir@codesourcery.com>
13479 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13480 * configure.ac: Check for __mcoldfire__ and set
13481 gdb_cv_m68k_is_coldfire.
13482 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13483 reg-cf.o and reg-m68k.o.
13484 * configure: Regenerated.
13486 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13488 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13489 Pass it to thread_db_free.
13490 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13491 proper `detaching' argument to linux_remove_process.
13492 * linux-low.h (thread_db_free): Add `detaching' parameter.
13493 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13495 (thread_db_free): Add `detaching' parameter. Only
13496 call td_ta_clear_event if detaching from process.
13498 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13500 * thread-db.c (thread_db_free): Fix typo.
13502 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13505 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13507 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13509 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13510 with an i686 compiler.
13511 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13513 * configure: Rebuilt.
13515 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13519 * server.c (handle_search_memory_1): Correct read_addr initialization
13520 in loop for searching subsequent chunks.
13522 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13524 * configure.ac: New --with-libthread-db option.
13525 * thread-db.c: Allow direct dependence on libthread_db.
13526 (thread_db_free): Adjust.
13527 * config.in: Regenerate.
13528 * configure: Likewise.
13530 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13533 * thread-db.c (attach_thread): New function.
13534 (maybe_attach_thread): Return success/failure.
13535 (find_new_threads_callback): Adjust.
13536 (thread_db_find_new_threads): Loop until no new threads.
13538 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13540 * proc-service.c (ps_lgetregs): Formatting.
13542 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13544 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13545 * configure.ac: Adjust.
13546 * linux-low.h (struct process_info_private): Move members to struct
13548 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13549 * linux-low.c (linux_remove_process): Adjust.
13550 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13551 * server.c (handle_query): Move code ...
13552 (handle_monitor_command): ... here. New function.
13553 * target.h (struct target_ops): New member.
13554 * thread-db.c (struct thread_db): New.
13555 (libthread_db_search_path): New variable.
13556 (thread_db_create_event, thread_db_enable_reporting)
13557 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13558 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13559 (try_thread_db_load_1, dladdr_to_soname): New functions.
13560 (try_thread_db_load, thread_db_load_search): New functions.
13561 (thread_db_init): Search for libthread_db.
13562 (thread_db_free): New function.
13563 (thread_db_handle_monitor_command): Likewise.
13564 * config.in: Regenerate.
13565 * configure: Regenerate.
13567 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13569 * spu-low.c (spu_kill): Wait for inferior to terminate.
13570 Call clear_inferiors.
13571 (spu_detach): Call clear_inferiors.
13573 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13575 * aclocal.m4: Regenerate.
13576 * config.in: Likewise.
13577 * configure: Likewise.
13579 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13581 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13582 (parse_spufs_run): New function.
13583 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13584 (ppc_breakpoint_at): Handle SPU breakpoints.
13586 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13588 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13589 (SPUFS_MAGIC): Define.
13590 (spu_enumerate_spu_ids): New function.
13591 (linux_qxfer_spu): New function.
13592 (linux_target_ops): Install linux_qxfer_spu.
13594 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13596 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13597 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13598 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13599 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13600 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13601 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13602 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13603 (init_registers_powerpc_cell32l): Add prototype.
13604 (init_registers_powerpc_cell64l): Likewise.
13605 (ppc_arch_setup): Detect Cell/B.E. architecture.
13607 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13609 * Makefile.in (datarootdir): New variable.
13611 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13613 * linux-low.c (linux_write_memory): Update debugging output.
13614 * Makefile.in (clean): Add new descriptions.
13615 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13616 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13617 * configure.srv: Add new files for arm*-*-linux*.
13618 * linux-arm-low.c: Add new declarations.
13619 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13620 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13621 (HWCAP_VFPv3D16): New.
13622 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13623 instead of __IWMMXT__.
13624 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13625 (arm_arch_setup): New.
13626 (target_regsets): Remove #ifdef. Add VFP regset.
13627 (the_low_target): Use arm_arch_setup.
13629 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13631 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13632 the main thread again.
13634 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13636 Adding Neutrino gdbserver.
13637 * configure: Regenerated.
13638 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13639 * configure.srv (i[34567]86-*-nto*): New target.
13640 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13641 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13642 (nto_comctrl) [__QNX__]: New function.
13643 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13645 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13647 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13650 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13651 Pedro Alves <pedro@codesourcery.com>
13653 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13654 don't support CONTEXT_EXTENDED_REGISTERS.
13655 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13656 (the_low_target): Install them.
13657 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13658 failing with ERROR_PIPE_NOT_CONNECTED.
13660 2009-06-30 Doug Evans <dje@google.com>
13661 Pierre Muller <muller@ics.u-strasbg.fr>
13663 Add h/w watchpoint support to x86-linux, win32-i386.
13664 * Makefile.in (SFILES): Add i386-low.c
13665 (i386_low_h): Define.
13666 (i386-low.o): Add dependencies.
13667 (linux-x86-low.o): Add i386-low.h dependency.
13668 (win32-i386-low.o): Ditto.
13669 * i386-low.c: New file.
13670 * i386-low.h: New file.
13671 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13672 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13673 * linux-low.c (linux_add_process): Initialize arch_private.
13674 (linux_remove_process): Free arch_private.
13675 (add_lwp): Initialize arch_private.
13676 (delete_lwp): Free arch_private.
13677 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13679 * linux-low.h (process_info_private): New member arch_private.
13680 (lwp_info): New member arch_private.
13681 (linux_target_ops): New members new_process, new_thread,
13683 (ptid_of): New macro.
13684 * linux-x86-low.c: Include stddef.h, i386-low.h.
13685 (arch_process_info): New struct.
13686 (arch_lwp_info): New struct.
13687 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13688 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13689 (i386_dr_low_get_status): New function.
13690 (x86_insert_point, x86_remove_point): New functions.
13691 (x86_stopped_by_watchpoint): New function.
13692 (x86_stopped_data_address): New function.
13693 (x86_linux_new_process, x86_linux_new_thread): New functions.
13694 (x86_linux_prepare_to_resume): New function.
13695 (the_low_target): Add entries for insert_point, remove_point,
13696 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13698 * server.c (debug_hw_points): New global.
13699 (monitor_show_help): Document set debug-hw-points.
13700 (handle_query): Process "set debug-hw-points".
13701 * server.h (debug_hw_points): Declare.
13702 (paddress): Declare.
13703 * utils.c (NUMCELLS, CELLSIZE): New macros.
13704 (get_sell, xsnprintf, paddress): New functions.
13705 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13706 remove_point, stopped_by_watchpoint, stopped_data_address.
13707 * win32-i386-low.c: Include i386-low.h.
13708 (debug_reg_state): Replaces dr.
13709 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13710 (i386_dr_low_get_status): New function.
13711 (i386_insert_point, i386_remove_point): New functions.
13712 (i386_stopped_by_watchpoint): New function.
13713 (i386_stopped_data_address): New function.
13714 (i386_initial_stuff): Update.
13715 (get_thread_context,set_thread_context,i386_thread_added): Update.
13716 (the_low_target): Add entries for insert_point,
13717 remove_point, stopped_by_watchpoint, stopped_data_address.
13718 * win32-low.c (win32_insert_watchpoint): New function.
13719 (win32_remove_watchpoint): New function.
13720 (win32_stopped_by_watchpoint): New function.
13721 (win32_stopped_data_address): New function.
13722 (win32_target_ops): Add entries for insert_watchpoint,
13723 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13724 * win32-low.h (win32_target_ops): New members insert_point,
13725 remove_point, stopped_by_watchpoint, stopped_data_address.
13727 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13729 * server.c (process_serial_event): Re-return unsupported, not
13730 error, if the type isn't recognized. Re-allow supporting only
13731 insert or remove packets. Also call require_running for
13732 breakpoints. Add missing break statement to default case. Tidy.
13733 * target.h (struct target_ops): Rename insert_watchpoint to
13734 insert_point, and remove_watchpoint to remove_point.
13736 * linux-low.h (struct linux_target_ops): Likewise.
13737 * linux-low.c (linux_insert_watchpoint): Rename to ...
13738 (linux_insert_point): ... this. Adjust.
13739 (linux_remove_watchpoint): Rename to ...
13740 (linux_remove_point): ... this. Adjust.
13741 (linux_target_ops): Adjust.
13742 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13743 (cris_insert_point): ... this.
13744 (cris_remove_watchpoint): Rename to ...
13745 (cris_remove_point): ... this.
13746 (the_low_target): Adjust.
13748 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13750 * server.c (handle_v_kill): Pass signal_pid to
13751 kill_inferior if multi_process is zero.
13753 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13755 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13756 * target.h (target_ops): Comment for *_watchpoint to make it clear
13757 the functions can get types '0' and '1'.
13759 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13761 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13762 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13763 * regcache.c (get_regcache): Likewise.
13764 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13765 * win32-low.c (child_fetch_inferior_registers): Remove check for
13768 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13769 Pedro Alves <pedro@codesourcery.com>
13771 * target.h (struct target_ops) <supports_multi_process>: New
13773 (target_supports_multi_process): New.
13774 * server.c (handle_query): Even if GDB reports support, only
13775 enable multi-process if the target also supports it. Report
13776 multi-process support only if the target backend supports it.
13777 * linux-low.c (linux_supports_multi_process): New function.
13778 (linux_target_ops): Install it as target_supports_multi_process
13781 2009-05-24 Doug Evans <dje@google.com>
13783 Global renaming of find_thread_pid to find_thread_ptid.
13784 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13785 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13786 All callers updated.
13788 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13789 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13792 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13793 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13794 (linux_resume_one_lwp): Ditto.
13796 2009-05-23 Doug Evans <dje@google.com>
13798 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13799 from struct inferior_list_entry * to struct lwp_info *.
13800 All callers updated.
13802 2009-05-13 Doug Evans <dje@google.com>
13804 * linux-x86-low.c: Don't include assert.h.
13805 (x86_siginfo_fixup): Use fatal, not assert.
13806 (x86_arch_setup): Fix comment.
13808 2009-05-12 Doug Evans <dje@google.com>
13810 Biarch support for i386/amd64 gdbserver.
13811 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13812 Add linux-x86-low.c.
13813 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13814 (linux-x86-low.o): Add.
13815 * linux-x86-64-low.c: Delete.
13816 * linux-i386-low.c: Delete.
13817 * linux-x86-low.c: New file.
13818 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13820 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13822 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13823 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13824 (linux_child_pid_to_exec_file): New function.
13825 (elf_64_header_p, elf_64_file_p): New functions.
13826 (siginfo_fixup): New function.
13827 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13828 give target a chance to convert layout.
13829 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13830 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13832 2009-05-07 Doug Evans <dje@google.com>
13834 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13835 (regsets_store_inferior_registers): Ditto.
13837 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13841 * linux-low.c (must_set_ptrace_flags): Delete.
13842 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13844 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13845 `lwp->must_set_ptrace_flags' instead.
13846 (linux_wait_for_event_1): Set ptrace options here.
13847 (linux_wait_1): ... not here.
13849 2009-04-30 Doug Evans <dje@google.com>
13851 * inferiors.c (started_inferior_callback): New function.
13852 (attached_inferior_callback): New function.
13853 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13854 * server.c (print_started_pid, print_attached_pid): New functions.
13855 (detach_or_kill_for_exit): New function.
13856 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13857 * server.h (have_started_inferiors_p): Declare.
13858 (have_attached_inferiors_p): Declare.
13860 * inferiors.c (remove_process): Fix memory leak, free process.
13861 * linux-low.c (linux_remove_process): New function.
13862 (linux_kill): Call it instead of remove_process.
13863 (linux_detach, linux_wait_1): Ditto.
13865 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13867 * configure.srv: Add x86 Windows CE target.
13869 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13871 * inferiors.c (get_thread_process): Make global.
13872 * server.h (get_thread_process): Add prototype.
13873 * thread-db.c (find_one_thread): Use get_thread_process
13874 instead of current_process.
13875 (thread_db_get_tls_address): Do not crash if called when
13876 thread layer is not yet initialized.
13878 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13880 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13881 * spu-low.c (current_tid): Rename to ...
13882 (current_ptid): ... this.
13883 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13884 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13885 ptid_get_lwp (current_ptid) instead of current_tid.
13886 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13887 instead of current_tid. Use find_process_pid to verify pid
13888 argument is valid. Pass proper argument to remove_process.
13889 (spu_thread_alive): Compare current_ptid instead of current_tid.
13890 (spu_resume): Likewise.
13892 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13894 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13897 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13899 Implement the multiprocess extensions, and add linux multiprocess
13902 * server.h (ULONGEST): Declare.
13903 (struct ptid, ptid_t): New.
13904 (minus_one_ptid, null_ptid): Declare.
13905 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13906 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13907 (struct inferior_list_entry): Change `id' type from unsigned from
13909 (struct sym_cache, struct breakpoint, struct
13910 process_info_private): Forward declare.
13911 (struct process_info): Declare.
13912 (current_process): Declare.
13913 (all_processes): Declare.
13914 (initialize_inferiors): Declare.
13915 (add_thread): Adjust to use ptid_t.
13916 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13917 (add_process, remove_process, find_thread_pid): Declare.
13918 (find_inferior_id): Adjust to use ptid_t.
13919 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13920 (multi_process): Declare.
13921 (push_event): Adjust to use ptid_t.
13922 (read_ptid, write_ptid): Declare.
13923 (prepare_resume_reply): Adjust to use ptid_t.
13924 (clear_symbol_cache): Declare.
13925 * inferiors.c (all_processes): New.
13926 (null_ptid, minus_one_ptid): New.
13927 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13928 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13929 (add_thread): Change unsigned long to ptid. Remove gdb_id
13931 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13932 (gdb_id_to_thread): Rename to ...
13933 (find_thread_pid): ... this. Change unsigned long to ptid.
13934 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13935 (loaded_dll, pull_pid_from_list): Adjust.
13936 (add_process, remove_process, find_process_pid)
13937 (get_thread_process, current_process, initialize_inferiors): New.
13938 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13939 (struct target_waitstatus) <related_pid>: Ditto.
13940 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13941 return type to int.
13942 (struct target_ops) <join>: Add `pid' argument.
13943 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13944 (struct target_ops) <wait>: Add `ptid' field. Change return type
13946 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13947 (mywait): Add `ptid' argument. Change return type to ptid_t.
13948 (target_pid_to_str): Declare.
13949 * target.c (set_desired_inferior): Adjust to use ptids.
13950 (mywait): Add new `ptid' argument. Adjust.
13951 (target_pid_to_str): New.
13952 * mem-break.h (free_all_breakpoints): Declare.
13953 * mem-break.c (breakpoints): Delelete.
13954 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13955 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13956 to use per-process breakpoint list.
13957 (free_all_breakpoints): New.
13958 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13959 (symbol_cache, all_symbols_looked_up): Delete.
13961 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13963 (prepare_resume_reply): Change ptid argument's type from unsigned
13964 long to ptid_t. Adjust. Implement W;process and X;process.
13965 (free_sym_cache, clear_symbol_cache): New.
13966 (look_up_one_symbol): Adjust to per-process symbol cache. *
13967 * server.c (cont_thread, general_thread, step_thread): Change type
13969 (attached): Delete.
13970 (multi_process): New.
13971 (last_ptid): Change type to ptid_t.
13972 (struct vstop_notif) <ptid>: Change type to ptid_t.
13973 (queue_stop_reply, push_event): Change `ptid' argument's type to
13975 (discard_queued_stop_replies): Add `pid' argument.
13976 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13977 changes. Don't reference the `attached' global.
13978 (attach_inferior): Adjust to mywait interface changes.
13979 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13980 features. Handle and report "multiprocess+". Handle
13982 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13984 (handle_v_kill): New.
13985 (handle_v_stopped): Adjust to use target_pid_to_str.
13986 (handle_v_requests): Allow multiple attaches and runs when
13987 multiprocess extensions are in effect. Handle "vKill".
13988 (myresume): Adjust to use ptids.
13989 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13990 (handle_status): Adjust to discard_queued_stop_replies interface
13992 (first_thread_of, kill_inferior_callback)
13993 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13994 (main): Call initialize_inferiors. Adjust to use ptids, killing
13995 and detaching from all inferiors. Handle multiprocess packet
13997 * linux-low.h: Include gdb_proc_service.h.
13998 (struct process_info_private): New.
13999 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14000 <lwpid_of>: Use ptid_get_lwp.
14001 (get_lwp_thread): Adjust.
14002 (struct lwp_info): Add `dead' member.
14003 (find_lwp_pid): Declare.
14004 * linux-low.c (thread_db_active): Delete.
14005 (new_inferior): Adjust comment.
14006 (inferior_pid): Delete.
14007 (linux_add_process): New.
14008 (handle_extended_wait): Adjust.
14009 (add_lwp): Change unsigned long to ptid.
14010 (linux_create_inferior): Add process to processes table. Adjust
14011 to use ptids. Don't set new_inferior here.
14012 (linux_attach_lwp): Rename to ...
14013 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14014 it. Adjust to use ptids.
14015 (linux_attach_lwp): New.
14016 (linux_attach): Add process to processes table. Don't set
14018 (struct counter): New.
14019 (second_thread_of_pid_p, last_thread_of_process_p): New.
14020 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14021 multiple processes.
14022 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14023 processes. Remove process from process table.
14024 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14025 to multiple processes.
14026 (any_thread_of): New.
14027 (linux_detach): Add `pid' argument, and handle it. Remove process
14028 from processes table.
14029 (linux_join): Add `pid' argument. Handle it.
14030 (linux_thread_alive): Change unsighed long argument to ptid_t.
14031 Consider dead lwps as not being alive.
14032 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14033 threads we're not interested in.
14034 (same_lwp, find_lwp_pid): New.
14035 (linux_wait_for_lwp): Change `pid' argument's type from int to
14037 (linux_wait_for_event): Rename to ...
14038 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14039 from int to ptid_t. Adjust.
14040 (linux_wait_for_event): New.
14041 (linux_wait_1): Add `ptid' argument. Change return type to
14042 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14043 that exit from the process table.
14044 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14046 (mark_lwp_dead): New.
14047 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14048 stopping all threads, mark its main lwp as dead.
14049 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14051 (fetch_register, usr_store_inferior_registers)
14052 (regsets_fetch_inferior_registers)
14053 (regsets_store_inferior_registers, linux_read_memory)
14054 (linux_write_memory): Inline `inferior_pid'.
14055 (linux_look_up_symbols): Adjust to use per-process
14056 `thread_db_active'.
14057 (linux_request_interrupt): Adjust to use ptids.
14058 (linux_read_auxv): Inline `inferior_pid'.
14059 (initialize_low): Don't reference thread_db_active.
14060 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14061 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14062 (ps_getpid): Return the pid of the current inferior.
14063 * thread-db.c (proc_handle, thread_agent): Delete.
14064 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14066 (find_one_thread): Change argument type to ptid_t. Adjust to
14068 (maybe_attach_thread): Adjust to per-process data and ptids.
14069 (thread_db_find_new_threads): Ditto.
14070 (thread_db_init): Ditto.
14071 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14072 processes table. Adjust to use ptids.
14073 (spu_kill, spu_detach): Adjust interface. Remove process from
14075 (spu_join, spu_thread_alive): Adjust interface.
14076 (spu_wait): Adjust interface. Remove process from processes
14077 table. Adjust to use ptids.
14078 * win32-low.c (current_inferior_tid): Delete.
14079 (current_inferior_ptid): New.
14080 (debug_event_ptid): New.
14081 (thread_rec): Take a ptid. Adjust.
14082 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14083 (child_delete_thread): Ditto.
14084 (do_initial_child_stuff): Add `attached' argument. Add process to
14086 (child_fetch_inferior_registers, child_store_inferior_registers):
14088 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14089 (win32_attach): Pass 1 to do_initial_child_stuff.
14090 (win32_kill): Adjust interface. Remove process from processes
14092 (win32_detach): Ditto.
14093 (win32_join): Adjust interface.
14094 (win32_thread_alive): Take a ptid.
14095 (win32_resume): Adjust to use ptids.
14096 (get_child_debug_event): Ditto.
14097 (win32_wait): Adjust interface. Remove exiting process from
14100 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14102 Non-stop mode support.
14104 * server.h (non_stop): Declare.
14105 (gdb_client_data, handler_func): Declare.
14106 (delete_file_handler, add_file_handler, start_event_loop):
14108 (handle_serial_event, handle_target_event, push_event)
14109 (putpkt_notif): Declare.
14110 * target.h (enum resume_kind): New.
14111 (struct thread_resume): Replace `step' field by `kind' field.
14112 (TARGET_WNOHANG): Define.
14113 (struct target_ops) <wait>: Add `options' argument.
14114 <supports_non_stop, async, start_non_stop>: New fields.
14115 (target_supports_non_stop, target_async): New.
14116 (start_non_stop): Declare.
14117 (mywait): Add `options' argument.
14118 * target.c (mywait): Add `options' argument. Print child exit
14119 notifications here.
14120 (start_non_stop): New.
14121 * server.c (non_stop, own_buf, mem_buf): New globals.
14122 (struct vstop_notif): New.
14123 (notif_queue): New global.
14124 (queue_stop_reply, push_event, discard_queued_stop_replies)
14125 (send_next_stop_reply): New.
14126 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14128 (attach_inferior): In non-stop mode, don't wait for the target
14130 (handle_general_set): Handle QNonStop.
14131 (handle_query): When handling qC, return the current general
14132 thread, instead of the first thread of the list.
14133 (handle_query): If the backend supports non-stop mode, include
14134 QNonStop+ in the qSupported query response.
14135 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14137 (handle_v_attach, handle_v_run): Handle non-stop mode.
14138 (handle_v_stopped): New.
14139 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14140 (myresume): Adjust to use resume_kind. Handle non-stop.
14141 (queue_stop_reply_callback): New.
14142 (handle_status): Handle non-stop mode.
14143 (main): Clear non_stop flag on reconnection. Use the event-loop.
14144 Refactor serial protocol handling from here ...
14145 (process_serial_event): ... to this new function. When GDB
14146 selects any thread, select one here. In non-stop mode, wait until
14147 GDB acks all pending events before exiting.
14148 (handle_serial_event, handle_target_event): New.
14149 * remote-utils.c (remote_open): Install remote_desc in the event
14151 (remote_close): Remove remote_desc from the event loop.
14152 (putpkt_binary): Rename to...
14153 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14154 (putpkt_binary): New as wrapper around putpkt_binary_1.
14155 (putpkt_notif): New.
14156 (prepare_resume_reply): In non-stop mode, don't change the
14158 * event-loop.c: New.
14159 * Makefile.in (OBJ): Add event-loop.o.
14160 (event-loop.o): New rule.
14162 * linux-low.h (pid_of): Moved here.
14164 (get_lwp_thread): Use lwpid_of.
14165 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14166 * linux-low.c (pid_of): Delete.
14167 (inferior_pid): Use lwpid_of.
14168 (linux_event_pipe): New.
14169 (target_is_async_p): New.
14171 (handle_extended_wait): Use lwpid_of.
14172 (add_lwp): Don't set lwpid field.
14173 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14174 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14175 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14176 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14177 first. Adjust to linux_wait_for_event interface changes. Use
14179 (linux_detach): Don't delete the main lwp here.
14180 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14181 (status_pending_p): Don't consider explicitly suspended lwps.
14182 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14183 pointer. Add OPTIONS argument. Change return type to int. Use
14184 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14185 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14186 pointer. Add status pointer argument. Return a pid instead of a
14187 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14188 changes. In non-stop mode, don't switch to a random thread.
14189 (linux_wait): Rename to...
14190 (linux_wait_1): ... this. Add target_options argument, and handle
14191 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14192 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14193 clean exit and signal exit code. Don't stop all threads in
14194 non-stop mode. In all-stop mode, only stop all threads when
14195 reporting a stop to GDB. Handle explicit thread stop requests.
14196 (async_file_flush, async_file_mark): New.
14198 (send_sigstop): Use lwpid_of.
14199 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14200 interface changes. In non-stop mode, don't switch to a random
14202 (linux_resume_one_lwp): Use lwpid_of.
14203 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14204 (linux_resume_one_thread): ... this. Handle resume_stop. In
14205 non-stop mode, don't look for pending flag in all threads.
14206 (resume_status_pending_p): Don't consider explicitly suspended
14208 (my_waitpid): Reimplement. Emulate __WALL.
14209 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14211 (sigchld_handler, linux_supports_non_stop, linux_async)
14212 (linux_start_non_stop): New.
14213 (linux_target_ops): Register linux_supports_non_stop, linux_async
14214 and linux_start_non_stop.
14215 (initialize_low): Install SIGCHLD handler.
14216 * thread-db.c (thread_db_create_event, find_one_thread)
14217 (thread_db_get_tls_address): Use lwpid_of.
14218 * win32-low.c (win32_detach): Adjust to use resume_kind.
14219 (win32_wait): Add `options' argument.
14220 * spu-low.c (spu_resume): Adjust to use resume_kind.
14221 (spu_wait): Add `options' argument.
14223 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14225 Decouple target code from remote protocol.
14227 * target.h (enum target_waitkind): New.
14228 (struct target_waitstatus): New.
14229 (struct target_ops) <wait>: Return an unsigned long. Take a
14230 target_waitstatus pointer instead of a char pointer.
14231 (mywait): Likewise.
14232 * target.c (mywait): Change prototype to return an unsigned long.
14233 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14234 * server.h (thread_from_wait, old_thread_from_wait): Delete
14236 (prepare_resume_reply): Change prototype to take a
14238 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14239 (last_status, last_ptid): New.
14240 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14241 pid instead of a signal.
14242 (attach_inferior): Remove "status" and "signal" parameters.
14244 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14246 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14247 (handle_v_requests, myresume): Remove "status" and "signal"
14248 parameters. Adjust.
14249 (handle_status): New.
14250 (main): Delete local `status'. Adjust.
14251 * remote-utils.c: Include target.h.
14252 (prepare_resume_reply): Change prototype to take a
14253 target_waitstatus. Adjust.
14255 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14257 * spu-low.c (spu_wait): Adjust.
14258 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14260 (win32_wait): Adjust.
14262 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14264 * target.h (struct thread_resume): Delete leave_stopped member.
14265 (struct target_ops): Add a `n' argument to the `resume' callback.
14266 * server.c (start_inferior): Adjust.
14267 (handle_v_cont, myresume): Adjust.
14268 * linux-low.c (check_removed_breakpoint): Adjust to resume
14269 interface change, and to removed leave_stopped field.
14270 (resume_ptr): Delete.
14271 (struct thread_resume_array): New.
14272 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14273 resume interface change.
14274 (linux_continue_one_thread, linux_queue_one_thread)
14275 (resume_status_pending_p): Check if the resume field is NULL
14276 instead of checking the leave_stopped member.
14277 (linux_resume): Adjust to the target resume interface change.
14278 * spu-low.c (spu_resume): Adjust to the target resume interface
14280 * win32-low.c (win32_detach, win32_resume): Ditto.
14282 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14284 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14286 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14288 (linux_continue_one_thread): Only preserve the stepping flag if
14289 there's a pending breakpoint.
14291 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14293 * server.c (main): After the inferior having exited, call
14294 remote_close before exiting gdbserver.
14296 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14298 Fix size of FPSCR in Power 7 processors.
14299 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14300 (PPC_FEATURE_HAS_DFP): New #define.
14301 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14304 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14306 * server.c (handle_query) Whitespace and formatting.
14308 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14310 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14311 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14312 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14313 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14314 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14315 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14316 Makefile.in, configure.ac: Fix whitespace throughout.
14317 * configure: Regenerate.
14319 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14321 * inferiors.c (find_inferior): Make it safe for the callback
14322 function to delete the currently iterated inferior.
14324 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14326 * Makefile.in (linuw_low_h): Move higher.
14327 (thread-db.o): Depend on $(linux_low_h).
14329 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14331 Rename "process" to "lwp" throughout.
14333 * linux-low.c (all_processes): Rename to...
14334 (all_lwps): ... this.
14335 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14336 (add_process): Rename to ...
14337 (add_lwp): ... this. Adjust.
14338 (linux_create_inferior): Adjust.
14339 (linux_attach_lwp): Adjust.
14340 (linux_attach): Adjust.
14341 (linux_kill_one_process): Rename to ...
14342 (linux_kill_one_lwp): ... this. Adjust.
14343 (linux_kill): Adjust.
14344 (linux_detach_one_process): Rename to ...
14345 (linux_detach_one_lwp): ... this. Adjust.
14346 (linux_detach): Adjust.
14347 (check_removed_breakpoint): Adjust.
14348 (status_pending_p): Adjust.
14349 (linux_wait_for_process): Rename to ...
14350 (linux_wait_for_lwp): ... this. Adjust.
14351 (linux_wait_for_event): Adjust.
14352 (send_sigstop): Adjust.
14353 (wait_for_sigstop): Adjust.
14354 (stop_all_processes): Rename to ...
14355 (stop_all_lwps): ... this.
14356 (linux_resume_one_process): Rename to ...
14357 (linux_resume_one_lwp): ... this. Adjust.
14358 (linux_set_resume_request, linux_continue_one_thread)
14359 (linux_queue_one_thread, resume_status_pending_p)
14360 (usr_store_inferior_registers, regsets_store_inferior_registers)
14361 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14363 * linux-low.h (get_process): Rename to ...
14364 (get_lwp): ... this. Adjust.
14365 (get_thread_process): Rename to ...
14366 (get_thread_lwp): ... this. Adjust.
14367 (get_process_thread): Rename to ...
14368 (get_lwp_thread): ... this. Adjust.
14369 (struct process_info): Rename to ...
14370 (struct lwp_info): ... this.
14371 (all_processes): Rename to ...
14372 (all_lwps): ... this.
14373 * proc-service.c (ps_lgetregs): Adjust.
14374 * thread-db.c (thread_db_create_event, find_one_thread)
14375 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14377 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14379 * server.c (handle_query): Handle "qAttached".
14381 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14383 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14384 GPLv3, update license URL.
14386 2009-03-01 Doug Evans <dje@google.com>
14388 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14389 (server_h): Add gdb_signals.h.
14390 (signals.o): Update.
14391 * server.h (target_signal_from_host,target_signal_to_host_p)
14392 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14394 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14396 * remote-utils.c (getpkt): Also generate remote-debug
14397 information if noack_mode is set.
14399 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14401 * server.c (handle_query): Report qXfer:siginfo:read and
14402 qXfer:siginfo:write as supported and handle them.
14403 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14404 * linux-low.c (linux_xfer_siginfo): New.
14405 (linux_target_ops): Set it.
14407 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14409 * server.c (gdbserver_usage): Mention --remote-debug.
14410 (main): Accept '--remote-debug' switch.
14412 2009-01-18 Doug Evans <dje@google.com>
14414 * regcache.c (new_register_cache): No need to check result of xcalloc.
14415 * server.c (handle_search_memory): Back out calls to xmalloc,
14416 result is checked and error is returned to user upon failure.
14417 (handle_query): Ditto. Add more checks for result of malloc.
14418 (handle_v_cont): Check result of malloc, report error back to
14420 (handle_v_run): Ditto. Call freeargv.
14421 * server.h (freeargv): Declare.
14422 * utils.c (freeargv): New fn.
14424 2009-01-15 Doug Evans <dje@google.com>
14426 * gdbreplay.c (perror_with_name): Make arg const char *.
14427 * server.h (target_signal_to_name): Make return type const char *.
14428 * thread-db.c (thread_db_err_str): Make return type const char *.
14429 * utils.c (perror_with_name): Make arg const char *.
14431 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14433 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14434 when handling a EXIT_PROCESS_DEBUG_EVENT.
14436 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14438 * gdbreplay.c (gdbreplay_version): Update copyright year.
14439 * server.c (gdbserver_version): Likewise.
14441 2009-01-05 Doug Evans <dje@google.com>
14443 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14444 (handle_extended_wait): Improve comment.
14446 2008-12-13 Doug Evans <dje@google.com>
14448 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14449 * server.h (ATTR_MALLOC): New macro.
14450 (xmalloc,xcalloc,xstrdup): Declare.
14451 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14452 * inferiors.c: Ditto.
14453 * linux-low.c: Ditto.
14454 * mem-break.c: Ditto.
14455 * regcache.c: Ditto.
14456 * remote-utils.c: Ditto.
14459 * win32-low.c: Ditto.
14461 2008-12-12 Doug Evans <dje@google.com>
14463 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14464 in debugging printf.
14466 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14468 2008-12-09 Doug Evans <dje@google.com>
14470 * linux-low.h (struct process_info): Delete member tid, unused.
14471 * thread-db.c (find_one_thread): Update.
14472 (maybe_attach_thread): Update.
14474 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14476 * target.h (struct target_ops): Add qxfer_osdata member.
14477 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14479 (linux_qxfer_osdata): New functions.
14480 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14482 * server.c (handle_query): Handle "qXfer:osdata:read:".
14483 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14484 (buffer_xml_printf): New functions.
14485 * server.h (struct buffer): New.
14486 (buffer_grow_str, buffer_grow_str0): New macros.
14487 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14488 (buffer_xml_printf): Declare.
14490 2008-11-24 Doug Evans <dje@google.com>
14492 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14494 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14496 * server.c (handle_v_run): Always use the supplied argument list.
14498 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14500 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14501 (xtensa_regmap_table): Add entry for scompare1.
14503 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14505 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14506 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14507 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14508 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14509 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14510 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14511 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14512 XML target descriptions.
14513 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14514 when inferior is running on an ISA 2.05 or later processor. Add
14515 special case to return offset for full 64-bit slot of FPSCR when
14518 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14520 * Makefile.in (SFILES, clean): Added sparc64 files.
14521 (reg-sparc64.o, reg-sparc64.c): New.
14522 * configure.srv (sparc*-*-linux*): New configuration.
14523 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14524 syscall arguments for SPARC.
14525 (regsets_store_inferior_registers): Likewise.
14526 * linux-sparc-low.c: New file.
14528 2008-10-21 Doug Evans <dje@google.com>
14530 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14531 (READLINE_DIR,READLINE_DEP): Delete.
14532 (INTERNAL_CFLAGS): Update.
14533 (LINTFLAGS): Update.
14535 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14537 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14538 whole argv from the last run, not just argv[0].
14540 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14542 * regcache.c (new_register_cache): Return NULL if the register
14543 cache size isn't known yet.
14544 (free_register_cache): Avoid dereferencing a NULL regcache.
14546 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14548 * configure.srv: Merge MIPS and MIPS64.
14550 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14552 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14554 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14556 * Makefile.in: Add required vsx dependencies.
14558 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14559 Declare init_registers_powerpc_vsx32l.
14560 Declare init_registers_powerpc_vsx64l.
14561 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14562 (ppc_arch_setup): Check for VSX in hwcap.
14563 (ppc_fill_vsxregset): New function.
14564 (ppc_store_vsxregset): New function.
14565 Add new VSX entry in regset_info target_regsets.
14567 * configure.srv: Add new VSX dependencies.
14569 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14571 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14572 (remote_open): Set or clear transport_is_reliable.
14573 (putpkt_binary): Don't expect acks in noack mode.
14574 (getpkt): Don't send ack/nac in noack mode.
14575 * server.c (handle_general_set): Handle QStartNoAckMode.
14576 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14578 (main): Reset noack_mode on every connection.
14579 * server.h (noack_mode): Declare.
14581 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14583 * Makefile.in (GDBREPLAY_OBS): New variable.
14584 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14586 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14587 Daniel Jacobowitz <dan@codesourcery.com>
14589 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14590 (usr_store_inferior_registers): Likewise.
14591 (regsets_store_inferior_registers): Likewise.
14593 2008-07-31 Rolf Jansen <rj@surtec.com>
14594 Pedro Alves <pedro@codesourcery.com>
14596 * configure.ac: Check for memmem declaration.
14597 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14598 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14599 (disable_packet_qfThreadInfo): Unconditionally compile.
14600 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14601 * configure, config.in: Regenerate.
14603 2008-07-28 Doug Kwan <dougkwan@google.com>
14605 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14606 (linux_write_memory): Remove declaration of errno.
14608 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14610 * linux-low.c (handle_extended_wait): Do not use "status"
14611 variable uninitialized.
14613 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14615 * server.c (handle_v_attach): Inhibit reporting dll changes.
14617 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14619 * remote-utils.c (prepare_resume_reply): If requested, don't
14620 output "thread:TID" in the T stop reply.
14622 * server.c (disable_packet_vCont, disable_packet_Tthread)
14623 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14624 (handle_query): If requested, disable support for qC, qfThreadInfo
14626 (handle_v_requests): If requested, disable support for vCont.
14627 (gdbserver_show_disableable): New.
14628 (main): Handle --disable-packet and --disable-packet=LIST.
14630 * server.h (disable_packet_vCont, disable_packet_Tthread)
14631 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14633 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14635 * server.c (gdbserver_usage): Mention --version.
14637 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14639 * Makefile.in (gdbreplay.o): New rule.
14641 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14643 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14644 message, not gdbserver.
14646 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14647 Nathan Sidwell <nathan@codesourcery.com>
14648 Joseph Myers <joseph@codesourcery.com>
14650 * acinclude.m4: Include ../../config/acx.m4.
14651 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14652 * configure, config.in: Regenerate.
14653 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14654 * server.c (gdbserver_version): Print PKGVERSION.
14655 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14656 (main): Adjust gdbserver_usage calls.
14657 * gdbreplay.c (version, host_name): Add declarations.
14658 (gdbreplay_version, gdbreplay_usage): New.
14659 (main): Accept --version and --help options.
14661 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14663 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14664 (arm_breakpoint_at): Handle Thumb.
14665 (the_low_target): Add comment.
14667 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14669 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14671 2008-05-09 Doug Evans <dje@google.com>
14673 * server.h (decode_search_memory_packet): Declare.
14674 * remote-utils.c (decode_search_memory_packet): New fn.
14675 * server.c (handle_search_memory_1): New fn.
14676 (handle_search_memory): New fn.
14677 (handle_query): Process qSearch:memory packets.
14679 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14681 * regcache.c (registers_length): Remove.
14682 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14683 full register packet.
14684 * regcache.h (registers_length): Remove prototype.
14685 * server.h (PBUFSIZ): Define to 16384.
14687 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14689 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14690 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14691 powerpc-64l.o, and powerpc-altivec64l.o.
14692 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14693 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14694 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14695 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14696 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14699 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14700 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14701 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14702 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14703 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14704 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14705 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14706 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14707 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14708 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14711 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14712 (init_registers_powerpc_32l): ... this new prototype.
14713 (init_registers_powerpc_32): Remove, replace by ...
14714 (init_registers_powerpc_altivec32l): ... this new prototype.
14715 (init_registers_powerpc_e500): Remove, replace by ...
14716 (init_registers_powerpc_e500l): ... this new prototype.
14717 (init_registers_ppc64): Remove, replace by ...
14718 (init_registers_powerpc_64l): ... this new prototype.
14719 (init_registers_powerpc_64): Remove, replace by ...
14720 (init_registers_powerpc_altivec64l): ... this new prototype.
14721 (ppc_num_regs): Set to 73.
14722 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14723 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14724 (ppc_cannot_store_register): Handle orig_r3 and trap.
14725 (ppc_arch_setup): Update init_registers_... calls.
14726 (ppc_fill_gregset): Handle orig_r3 and trap.
14728 * inferiors.c (clear_inferiors): Reset current_inferior.
14730 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14732 * acinclude.m4: Add override.m4.
14733 * configure: Regenerate.
14735 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14737 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14738 initial call to init_register_ppc64.
14740 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14742 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14743 single powerpc*-*-linux* case.
14744 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14746 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14748 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14749 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14751 * linux-ppc-low.c: Include <elf.h>.
14752 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14753 (ppc_hwcap): New global variable.
14754 (ppc_regmap): Remove __SPE__ #ifdef sections.
14755 (ppc_regmap_e500): New global variable.
14756 (ppc_cannot_store_register): Update __SPE__ special case.
14757 (ppc_get_hwcap): New function.
14758 (ppc_arch_setup): Use it to determine whether inferior supports
14759 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14760 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14761 Do not access registers if target does not support AltiVec.
14762 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14763 Do not access registers if target does not support SPE.
14764 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14766 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14768 * linux-low.c (disabled_regsets, num_regsets): New.
14769 (use_regsets_p): Delete.
14770 (linux_wait_for_process): Clear disabled_regsets.
14771 (regsets_fetch_inferior_registers): Check and set it.
14772 (regsets_store_inferior_registers): Likewise.
14773 (linux_fetch_registers, linux_store_registers): Do not use
14775 (initialize_low): Allocate disabled_regsets.
14777 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14779 * Makefile.in (LIBOBJS): New.
14780 (OBS): Use LIBOBJS.
14781 (memmem.o): New rule.
14782 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14783 * configure: Regenerated.
14785 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14787 * server.c (handle_query): Never return "unsupported" for
14788 qXfer:features:read queries.
14790 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14792 * server.c (get_features_xml): Fix inverted condition.
14793 (handle_query): Always support qXfer:feature:read.
14795 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14797 * server.c (wrapper_argv): New.
14798 (start_inferior): Handle wrapper_argv. If set, expect an extra
14800 (gdbserver_usage): Document --wrapper.
14801 (main): Parse --wrapper.
14803 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14805 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14806 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14807 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14808 (ppc_set_pc): Likewise.
14809 (ppc_arch_setup): New function.
14810 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14811 of collect_register.
14812 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14814 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14816 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14817 instead of linux-ppc64-low.o.
14818 * linux-ppc64-low.c: Remove file.
14819 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14820 (linux-ppc64-low.o): Remove rule.
14822 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14823 (init_registers_powerpc_64): Likewise.
14824 (ppc_regmap): Conditionally define depending on __powerpc64__.
14825 (ppc_cannot_store_register): Do not special-case "fpscr" when
14826 compiled on __powerpc64__.
14827 (ppc_collect_ptrace_register): New function.
14828 (ppc_supply_ptrace_register): New function.
14829 (ppc_breakpoint): Change type to "unsigned int".
14830 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14831 (the_low_target): Conditionally provide initializers for the
14832 arch_setup member depending on __powerpc64__. Install
14833 collect_ptrace_register and supply_ptrace_register members.
14835 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14837 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14838 * server.c (gdbserver_xmltarget): Define.
14839 (get_features_xml): Use it to replace "target.xml" and arch_string.
14841 * configure.srv: Remove srv_xmltarget. Add XML files that were
14842 mentioned there to srv_xmlfiles instead. Remove conditional tests
14843 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14844 srv_xmlfiles and srv_regobj to include all possible choices.
14845 * configure.ac (srv_xmltarget): Remove.
14846 (srv_xmlfiles): Do not add "target.xml".
14847 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14848 checks for supplementary target information.
14849 * configure: Regenerate.
14850 * Makefile.in (XML_TARGET): Remove.
14851 (target.xml): Remove rule.
14852 (clean): Do not clean up target.xml.
14853 (.PRECIOUS): Do not mention target.xml.
14855 * target.h (struct target_ops): Remove arch_string member.
14856 * linux-low.c (linux_arch_string): Remove.
14857 (linux_target_ops): Remove arch_string initializer.
14858 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14859 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14860 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14861 * spu-low.c (spu_arch_string): Remove.
14862 (spu_target_ops): Remove arch_string initializer.
14863 * win32-low.c (win32_arch_string): Remove.
14864 (win32_target_ops): Remove arch_string initializer.
14865 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14866 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14867 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14869 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14871 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14872 by collect_ptrace_register and supply_ptrace_register hooks.
14873 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14874 instead of checking for the_low_target.left_pad_xfer.
14875 (usr_store_inferior_registers): Use collect_ptrace_register callback
14876 instead of checking for the_low_target.left_pad_xfer.
14878 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14879 (s390_supply_ptrace_register): Likewise.
14880 (s390_fill_gregset): Call s390_collect_ptrace_register.
14881 (the_low_target): Update.
14883 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14884 (ppc_supply_ptrace_register): Likewise.
14885 (the_low_target): Update.
14887 * linux-i386-low.c (the_low_target): Update.
14888 * linux-x86-64-low.c (the_low_target): Update.
14890 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14892 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14893 reg-s390.o and reg-s390x.o.
14895 * linux-low.c (new_inferior): New global variable.
14896 (linux_create_inferior, linux_attach): Set it.
14897 (linux_wait_for_process): Call the_low_target.arch_setup after the
14898 target has stopped for the first time.
14899 (initialize_low): Do not call the_low_target.arch_setup.
14901 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14902 (s390_set_pc): Likewise.
14903 (s390_arch_setup): New function.
14904 (the_low_target): Use s390_arch_setup as arch_setup routine.
14906 * regcache.c (realloc_register_cache): New function.
14907 (set_register_cache): Call it for each existing regcache.
14909 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14911 * server.h (init_registers): Remove prototype.
14913 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14914 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14915 instead of init_registers ().
14916 * linux-arm-low.c (init_registers_arm): Add prototype.
14917 (init_registers_arm_with_iwmmxt): Likewise.
14918 (the_low_target): Add initializer for arch_setup field.
14919 * linux-cris-low.c (init_registers_cris): Add prototype.
14920 (the_low_target): Add initializer for arch_setup field.
14921 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14922 (the_low_target): Add initializer for arch_setup field.
14923 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14924 (the_low_target): Add initializer for arch_setup field.
14925 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14926 (the_low_target): Add initializer for arch_setup field.
14927 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14928 (the_low_target): Add initializer for arch_setup field.
14929 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14930 (the_low_target): Add initializer for arch_setup field.
14931 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14932 (init_registers_mips64_linux): Likewise.
14933 (the_low_target): Add initializer for arch_setup field.
14934 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14935 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14936 (the_low_target): Add initializer for arch_setup field.
14937 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14938 (init_registers_powerpc_64): Likewise.
14939 (the_low_target): Add initializer for arch_setup field.
14940 * linux-s390-low.c (init_registers_s390): Add prototype.
14941 (init_registers_s390x): Likewise.
14942 (the_low_target): Add initializer for arch_setup field.
14943 * linux-sh-low.c (init_registers_sh): Add prototype.
14944 (the_low_target): Add initializer for arch_setup field.
14945 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14946 (the_low_target): Add initializer for arch_setup field.
14947 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14948 (the_low_target): Add initializer for arch_setup field.
14950 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14951 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14952 instead of init_registers ().
14953 * win32-arm-low.c (init_registers_arm): Add prototype.
14954 (the_low_target): Add initializer for arch_setup field.
14955 * win32-i386-low.c (init_registers_i386): Add prototype.
14956 (the_low_target): Add initializer for arch_setup field.
14958 * spu-low.c (init_registers_spu): Add prototype.
14959 (initialize_low): Call initialie_registers_spu () instead of
14960 initialize_registers ().
14962 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14964 * server.c (handle_v_requests): When handling the vRun and vAttach
14965 packets, if already debugging a process, don't kill it. Return an
14968 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14970 * server.c (handle_query): Correct length check.
14972 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14974 * win32-low.c (do_initial_child_stuff): Add process handle
14975 parameter. Set current_process_handle and current_process_id from the
14976 parameters. Clear globals.
14977 (win32_create_inferior): Don't set current_process_handle and
14978 current_process_id here. Instead pass them on the call to
14979 do_initial_child_stuff.
14980 (win32_attach): Likewise.
14981 (win32_clear_inferiors): New.
14982 (win32_kill): Don't close the current process handle or the
14983 current thread handle here. Instead call win32_clear_inferiors.
14984 (win32_detach): Don't open a new handle to the process. Call
14985 win32_clear_inferiors.
14986 (win32_join): Don't rely on current_process_handle; open a new
14987 handle using the process id.
14988 (win32_wait): Call win32_clear_inferiors when the inferior process
14991 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14993 * server.c (monitor_show_help): Add "exit".
14995 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14997 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14998 (clean): Add reg-xtensa.c.
14999 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15000 * configure.srv (xtensa*-*-linux*) New target.
15001 * linux-xtensa-low.c: New.
15002 * xtensa-xtregs.c: New.
15004 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15006 * hostio.c: Don't include errno.h.
15007 (errno_to_fileio_errno): Move to hostio-errno.
15008 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15009 error number outputting to the target->hostio_last_error callback.
15010 (hostio_packet_error): Use FILEIO_EINVAL directly.
15011 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15012 calls to hostio_error.
15013 * hostio-errno.c: New.
15014 * server.h (hostio_last_error_from_errno): Declare.
15015 * target.h (target_ops): Add hostio_last_error member.
15016 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15017 as hostio_last_error handler.
15018 * spu-low.c (spu_target_ops): Likewise.
15019 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15020 (wince_hostio_last_error): New functions.
15021 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15022 as hostio_last_error handler.
15023 (win32_target_ops) [!_WIN32_WCE]: Register
15024 hostio_last_error_from_errno as hostio_last_error handler.
15025 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15026 (hostio-errno.o): New rule.
15027 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15028 * configure.srv (srv_hostio_err_objs): New variable. Default to
15030 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15031 * configure: Regenerate.
15033 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15035 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15036 (linux_kill, linux_detach): Clean up the process list.
15037 * remote-utils.c (remote_open): Improve port number parsing.
15038 (putpkt_binary, input_interrupt): Only send interrupts if the target
15040 * server.c (extended_protocol): Make static.
15041 (attached): Define earlier.
15042 (exit_requested, response_needed, program_argv): New variables.
15043 (target_running): New.
15044 (start_inferior): Clear attached here.
15045 (attach_inferior): Set attached here.
15046 (require_running): Define.
15047 (handle_query): Use require_running and target_running. Implement
15049 (handle_v_attach, handle_v_run): New.
15050 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15051 (gdbserver_usage): Update.
15052 (main): Redo argument parsing. Handle --debug and --multi. Handle
15053 --attach along with other options or after the port. Save
15054 program_argv. Support no initial program. Resynchronize
15055 communication with GDB after an error. Handle "monitor exit".
15056 Use require_running and target_running. Always allow the extended
15057 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15058 restart in extended mode.
15059 * README: Refer to the GDB manual. Update --attach usage.
15061 2007-12-20 Andreas Schwab <schwab@suse.de>
15063 * linux-low.c (STACK_SIZE): Define.
15064 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15065 (linux_test_for_tracefork): Likewise.
15067 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15069 * linux-low.c (linux_wait_for_event): Update messages. Do not
15070 reinsert auto-delete breakpoints.
15071 * mem-break.c (struct breakpoint): Change return type of handler to
15073 (set_breakpoint_at): Update handler type.
15074 (reinsert_breakpoint_handler): Return 1 instead of calling
15076 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15078 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15079 * mem-break.h (set_breakpoint_at): Update handler type.
15080 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15081 * win32-low.c (auto_delete_breakpoint): New.
15082 (get_child_debug_event): Use it.
15084 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15086 * configure.ac: Check for pread and pwrite.
15087 * hostio.c (handle_pread): Fall back to lseek and read.
15088 (handle_pwrite): Fall back to lseek and write.
15089 * config.in, configure: Regenerated.
15091 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15093 * server.c (myresume): Add own_buf argument.
15094 (main): Update calls.
15096 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15098 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15099 * remote-utils.c (remote_open): Do not call disable_async_io.
15100 (block_async_io): Delete.
15101 (unblock_async_io): Make static.
15102 (initialize_async_io): New.
15103 * server.c (handle_v_cont): Handle async I/O here.
15104 (myresume): Likewise. Move other common resume tasks here...
15105 (main): ... from here. Call initialize_async_io. Disable async
15106 I/O before the main loop.
15107 * server.h (initialize_async_io): Declare.
15108 (block_async_io, unblock_async_io): Delete prototypes.
15109 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15111 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15113 * remote-utils.c (readchar): Allow binary data in received messages.
15115 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15117 * win32-low.c (attaching): New global.
15118 (win32_create_inferior): Clear the `attaching' global.
15119 (win32_attach): Set the `attaching' global.
15120 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15121 attaching. Only set a breakpoint at the entry point if not
15124 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15126 * server.c (main): Don't report dll events on the initial
15127 connection on attaches.
15129 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15131 * server.c (main): Relax numerical bases supported for the pid of
15132 the --attach command line argument.
15134 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15136 * win32-low.c (win32_attach): Call OpenProcess before
15137 DebugActiveProcess, not after. Add last error output to error
15140 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15142 * win32-low.c (win32_get_thread_context)
15143 (win32_set_thread_context): New functions.
15144 (thread_rec): Use win32_get_thread_context.
15145 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15146 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15149 2007-12-03 Leo Zayas
15150 Pedro Alves <pedro_alves@portugalmail.pt>
15152 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15154 (child_add_thread): Minor cleanup.
15155 (child_continue): Resume artificially suspended threads before
15156 calling ContinueDebugEvent.
15157 (suspend_one_thread): New.
15158 (fake_breakpoint_event): New.
15159 (get_child_debug_event): Change return type to int. Check here if
15160 gdb sent an interrupt request. If a soft interrupt was requested,
15161 fake a breakpoint event. Return 0 if there is no event to handle,
15163 (win32_wait): Don't check here if gdb sent an interrupt request.
15164 Ensure there is a valid event to handle.
15165 (win32_request_interrupt): Add soft interruption method as last
15168 2007-12-03 Leo Zayas
15169 Pedro Alves <pedro_alves@portugalmail.pt>
15171 * win32-low.h (win32_thread_info): Add descriptions to the
15172 structure members. Replace `suspend_count' counter by a
15174 * win32-low.c (thread_rec): Update condition of when to get the
15175 context from the inferior. Rely on ContextFlags being set if it
15176 has already been retrieved. Only suspend the inferior thread if
15177 we haven't already. Warn if that fails.
15178 (continue_one_thread): s/suspend_count/suspended/. Only call
15179 ResumeThread once. Warn if that fails.
15181 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15183 * win32-low.c (win32_wait): Don't read from the inferior when it
15184 has already exited.
15186 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15188 * Makefile.in (win32_low_h): New variable.
15189 (win32-low.o): Add dependency on $(win32_low_h).
15190 (win32-arm-low.o, win32-i386-low.o): New rules.
15192 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15194 * hostio.c: Correct copyright year.
15196 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15198 * Makefile.in (OBS): Add hostio.o.
15199 (hostio.o): New rule.
15200 * server.h (handle_vFile): Declare.
15201 * hostio.c: New file.
15202 * server.c (handle_v_requests): Take packet_len and new_packet_len
15203 for binary packets. Call handle_vFile.
15204 (main): Update call to handle_v_requests.
15206 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15208 * linux-low.c: Include <sched.h>.
15210 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15212 * linux-low.c (linux_tracefork_grandchild): New.
15213 (linux_tracefork_child): Use clone.
15214 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15216 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15218 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15220 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15222 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15224 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15226 * inferiors.c (change_inferior_id): Delete.
15227 (add_pid_to_list, pull_pid_from_list): New.
15228 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15229 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15230 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15231 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15232 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15233 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15234 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15235 (using_threads): Always set to 1.
15236 (handle_extended_wait): New.
15237 (add_process): Do not set TID.
15238 (linux_create_inferior): Set must_set_ptrace_flags.
15239 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15240 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15241 (linux_thread_alive): Rename TID argument to LWPID.
15242 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15243 (linux_wait_for_event): Do not use TID or check using_threads. Update
15244 call to dead_thread_notify. Call handle_extended_wait.
15245 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15246 (send_sigstop): Delete sigstop_sent.
15247 (wait_for_sigstop): Avoid TID.
15248 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15249 (linux_test_for_tracefork): New.
15250 (linux_lookup_signals): Use thread_db_active and
15251 linux_supports_tracefork_flag.
15252 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15253 * linux-low.h (get_process_thread): Avoid TID.
15254 (struct process_ifo): Move thread_known and tid to the end. Remove
15256 (linux_attach_lwp, thread_db_init): Update prototypes.
15257 * server.h (change_inferior_id): Delete prototype.
15258 (add_pid_to_list, pull_pid_from_list): New prototypes.
15259 * thread-db.c (thread_db_use_events): New.
15260 (find_first_thread): Rename to...
15261 (find_one_thread): ...this. Update callers and messages. Do not
15262 call fatal. Check thread_db_use_events. Do not call
15263 change_inferior_id or new_thread_notify.
15264 (maybe_attach_thread): Update. Do not call new_thread_notify.
15265 (thread_db_init): Set thread_db_use_events. Check use_events.
15266 * utils.c (fatal, warning): Correct message prefix.
15268 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15270 * Makefile.in (clean): Remove new files.
15271 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15272 (powerpc-64.o, powerpc-64.c): New rules.
15273 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15274 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15276 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15278 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15280 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15281 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15282 (target_regsets): Add AltiVec and SPE register sets.
15283 * configure.ac: Check for AltiVec and SPE.
15284 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15285 (ppc_fill_vrregset, ppc_store_vrregset): New.
15286 (target_regsets): Add AltiVec register set.
15287 * configure: Regenerated.
15289 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15291 * linux-low.c (O_LARGEFILE): Define.
15292 (linux_read_memory): Use /proc/PID/mem.
15293 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15294 * configure, config.in: Regenerated.
15296 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15298 * linux-low.c (linux_wait_for_event): Do not pass signals while
15301 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15303 * win32-low.c (create_process): New.
15304 (win32_create_inferior): Use create_process instead of
15305 CreateProcess. If create_process failed retry appending an ".exe"
15306 suffix. Store the GetLastError result immediatelly after
15307 create_process calls and use it on the call to error.
15309 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15311 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15313 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15315 * configure.ac: Switch license to GPLv3.
15317 2007-08-01 Michael Snyder <msnyder@access-company.com>
15319 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15321 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15323 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15325 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15326 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15327 CloseToolhelp32Snapshot.
15328 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15329 CloseToolhelp32Snapshot.
15331 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15333 * server.c (main): Check for inferior exit before main loop.
15335 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15337 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15338 instead of on tmp_desc.
15340 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15341 Daniel Jacobowitz <dan@codesourcery.com>
15343 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15344 (add_thread): Minor cleanups.
15345 (clear_inferiors): Move lower in the file. Clear the DLL
15347 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15348 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15349 (xml_escape_text): New.
15350 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15352 (handle_v_cont): Report errors.
15353 (gdbserver_version): Update.
15354 (main): Correct size of own_buf. Do not report initial DLL events.
15355 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15356 (unloaded_dll, xml_escape_text): New.
15357 * win32-low.c (enum target_waitkind): Update comments.
15358 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15359 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15360 (win32_EnumProcessModules, win32_GetModuleInformation)
15361 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15362 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15363 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15364 (win32_Module32First, win32_Module32Next, load_toolhelp)
15365 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15366 (get_child_debug_event): Handle DLL events.
15367 (win32_wait): Likewise.
15369 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15371 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15372 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15374 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15376 * win32-low.c (handle_output_debug_string): Ignore event if not
15379 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15381 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15383 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15385 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15387 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15389 * inferiors.c (change_inferior_id): Add comment.
15390 * linux-low.c (check_removed_breakpoint): Add an early
15391 prototype. Improve debug output.
15392 (linux_attach): Doc update.
15393 (linux_detach_one_process, linux_detach): Clean up before releasing
15395 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15396 * linux-low.h (struct process_info): Doc improvement.
15397 * mem-break.c (delete_all_breakpoints): New.
15398 * mem-break.h (delete_all_breakpoints): New prototype.
15399 * thread-db.c (find_first_thread): New.
15400 (thread_db_create_event): Call it instead of
15401 thread_db_find_new_threads. Clean up unused variables.
15402 (maybe_attach_thread): Remove first thread handling.
15403 (thread_db_find_new_threads): Use find_first_thread.
15404 (thread_db_get_tls_address): Likewise.
15406 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15408 * thread-db.c (thread_db_find_new_threads): Add prototype.
15409 (thread_db_create_event): Check for the main thread before adding
15411 (maybe_attach_thread): Only enable event reporting if TID == 0.
15412 (thread_db_get_tls_address): Check for new threads.
15414 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15416 * linux-low.c (linux_create_inferior): Try execv before execvp.
15417 * spu-low.c (spu_create_inferior): Likewise.
15419 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15421 * linux-low.c (linux_create_inferior): Change execv to execvp.
15422 * spu-low.c (spu_create_inferior): Likewies.
15424 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15426 * Makefile.in (clean): Clean new files instead of deleted ones.
15427 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15428 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15430 * configure.srv: Specify XML files and new regformats for MIPS and
15432 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15433 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15434 an entry for the restart register.
15435 (mips_cannot_fetch_register, mips_cannot_store_register)
15436 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15437 register names to match the XML descriptions.
15438 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15439 restart register instead of $0.
15441 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15442 Markus Deuling <deuling@de.ibm.com>
15444 * remote-utils.c (decode_xfer_write): New function.
15445 * server.h (decode_xfer_write): Add prototype.
15446 * server.c (handle_query): Add PACKET_LEN argument. Support
15447 qXfer:spu:read and qXfer:spu:write packets.
15448 (main): Pass packet_len to handle_query.
15449 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15450 * target.h (target_ops): Add qxfer_spu.
15452 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15454 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15455 accessing non-seekable spufs files.
15457 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15459 * server.c (handle_query): Add reply for qC packet.
15461 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15462 Leo Zayas <lerele@champenstudios@com>
15464 * server.h (check_remote_input_interrupt_request): New function.
15465 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15466 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15467 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15468 (check_remote_input_interrupt_request): New function.
15469 * server.h (check_remote_input_interrupt_request): Declare.
15470 * win32-low.c (winapi_DebugBreakProcess,
15471 winapi_GenerateConsoleCtrlEvent): New typedefs.
15472 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15474 (win32_wait): Check for remote interrupt request
15475 with check_remote_input_interrupt_request.
15476 (win32_request_interrupt): New function.
15477 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15479 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15481 * win32-low.c (debug_registers_changed,
15482 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15483 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15484 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15485 (thread_rec): Get context using the low target.
15486 (child_add_thread): Call thread_added on the low target,
15487 which does the same thing.
15489 (do_initial_child_stuff): Remove debug registers references.
15490 Set context using the low target. Resume threads after
15491 setting the contexts.
15492 (child_continue): Remove dead variable. Remove debug
15493 registers references.
15494 (child_fetch_inferior_registers): Go through the low target.
15495 (do_child_store_inferior_registers): Remove.
15496 (child_store_inferior_registers): Go through the low target.
15497 (win32_resume): Remove debug registers references.
15498 Set context using the low target.
15499 (handle_exception): Change return type to void. Don't record
15500 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15501 first chance exception.
15502 (get_child_debug_event): Change return type to void. Remove
15503 goto loop. Always return after waiting for debug event.
15504 (win32_wait): Convert to switch statement. Handle spurious
15507 * win32-i386-low.c (debug_registers_changed,
15508 debug_registers_used): New.
15509 (initial_stuff): Rename to ...
15510 (i386_initial_stuff): ... this. Clear debug registers
15512 (store_debug_registers): Delete.
15513 (i386_get_thread_context): New.
15514 (load_debug_registers): Delete.
15515 (i386_set_thread_context): New.
15516 (i386_thread_added): New.
15517 (single_step): Rename to ...
15518 (i386_single_step): ... this.
15519 (do_fetch_inferior_registers): Rename to ...
15520 (i386_fetch_inferior_register): ... this.
15521 (i386_store_inferior_register): New.
15522 (the_low_target): Adapt to new interface.
15524 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15525 (arm_get_thread_context): New.
15526 (arm_set_thread_context): New.
15528 (do_fetch_inferior_registers): Rename to ...
15529 (arm_fetch_inferior_register): ... this.
15530 (arm_store_inferior_register): New.
15531 (arm_wince_breakpoint): Reimplement as unsigned long.
15532 (arm_wince_breakpoint_len): Define.
15533 (the_low_target): Adapt to new interface.
15535 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15536 load_debug_registers. Add get_thread_context, set_thread_context,
15537 thread_added and store_inferior_register. Rename
15538 fetch_inferior_registers to fetch_inferior_register.
15539 (regptr): Remove declaration.
15541 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15543 * linux-low.c (linux_detach): Change return type to int. Return 0.
15544 * spu-low.c (spu_detach): Likewise.
15546 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15548 * target.h (target_ops): Change return type of detach to int.
15550 (join_inferior): New.
15551 * server.c (main): Don't skip detach support on mingw32.
15552 If the inferior doesn't support detaching return error.
15553 Call join_inferior instead of using waitpid.
15554 * linux-low.c (linux_join): New.
15555 (linux_target_op): Add linux_join.
15556 * spu-low.c (spu_join): New.
15557 (spu_target_ops): Add spu_join.
15558 * win32-low.c (win32_detach): Adapt to new interface.
15559 Reopen current_process_handle before detaching. Issue a child
15560 resume before detaching.
15562 (win32_target_op): Add win32_join.
15564 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15566 * win32-low.c (win32-attach): Fix return value.
15567 * target.h (target_ops): Describe ATTACH return values.
15569 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15571 * win32-low.c (GETPROCADDRESS): Define.
15572 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15573 (winapi_DebugSetProcessKillOnExit): Likewise.
15574 (win32_create_inferior): Force usage of ansi CreateProcessA.
15575 (win32_attach): Use GETPROCADDRESS.
15576 (win32_detach): Likewise.
15578 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15580 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15582 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15584 * win32-low.c: Commit leftover changes from 2007-03-29.
15586 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15588 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15589 fields short instead of int. Add explicit padding.
15590 (i387_cache_to_fsave): Remove unnecessary casts.
15591 (i387_fsave_to_cache): Doc fix.
15592 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15594 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15596 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15597 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15599 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15601 * configure.srv (arm*-*-mingw32ce*): Move near the other
15604 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15606 * configure.ac: Add errno checking.
15607 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15608 sys/file.h and malloc.h.
15609 (AC_CHECK_DECLS): Add perror.
15610 (srv_mingwce): Handle.
15611 * configure.srv (i[34567]86-*-cygwin*): Add
15612 win32-i386-low.o to srv_tgtobj.
15613 (i[34567]86-*-mingw*): Likewise.
15614 (arm*-*-mingw32ce*): Add case.
15615 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15616 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15617 [__MINGW32CE__] (strerror): New function.
15618 [__MINGW32CE__] (errno): Define to GetLastError.
15619 [__MINGW32CE__] (COUNTOF): New macro.
15620 (remote_open): Remove extra close call.
15621 * mem-break.c (delete_breakpoint_at): New function.
15622 * mem-break.h (delete_breakpoint_at): Declare.
15623 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15624 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15625 [USE_WIN32API] (read, write): Add char* casts.
15626 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15627 * server.h: Include wincecompat.h on Windows CE.
15628 [HAVE_ERRNO_H]: Check.
15629 (perror): Declare if not declared.
15630 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15631 (perror_with_name): Remove errno declaration.
15632 * wincecompat.h: New.
15633 * wincecompat.c: New.
15634 * win32-low.h: New.
15635 * win32-arm-low.c: New.
15636 * win32-i386-low.c: New.
15637 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15638 (OUTMSG2): Make it safe.
15640 (COUNTOF): New macro.
15641 (NUM_REGS): Get it from the low target.
15642 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15643 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15644 (thread_rec): Let low target handle debug registers.
15645 (child_add_thread): Likewise.
15646 (child_init_thread_list): Likewise.
15647 (continue_one_thread): Likewise.
15649 (do_child_fetch_inferior_registers): Move to ...
15650 * win32-i386-low.c: ... here, and rename to ...
15651 (do_fetch_inferior_registers): ... this.
15652 * win32-low.c (child_fetch_inferior_registers):
15653 Go through the low target.
15654 (do_child_store_inferior_registers): Use regptr.
15655 (strwinerror): New function.
15656 (win32_create_inferior): Handle Windows CE.
15657 Use strwinerror instead of strerror on Windows error
15658 codes. Add program to the error output.
15659 Don't close the main thread handle on Windows CE.
15660 (win32_attach): Use coredll.dll on Windows CE.
15661 (win32_kill): Close current process and current
15663 (win32_detach): Use coredll.dll on Windows CE.
15664 (win32_resume): Let low target handle debug registers, and
15666 (handle_exception): Add/Remove initial breakpoint. Avoid
15667 non-existant WSTOPSIG on Windows CE.
15668 (win32_read_inferior_memory): Cast to remove warning.
15669 (win32_arch_string): Go through the low target.
15670 (initialize_low): Call set_breakpoint_data with the low
15671 target's breakpoint.
15672 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15673 FOP_REGNUM, mappings): Move to ...
15674 * win32-i386-low.c: ... here.
15675 * win32-low.c (win32_thread_info): Move to ...
15676 * win32-low.h: ... here.
15677 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15678 win32-arm-low.c and wincecompat.c.
15679 (all:): Add $EXEEXT.
15680 (install-only:): Likewise.
15681 (gdbserver:): Likewise.
15682 (gdbreplay:): Likewise.
15683 * config.in: Regenerate.
15684 * configure: Regenerate.
15686 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15688 * win32-low.c: Rename typedef thread_info to
15689 win32_thread_info throughout.
15691 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15693 * win32-i386-low.c: Rename to ...
15694 * win32-low.c: ... this.
15695 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15696 * Makefile.in: Likewise.
15698 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15700 * remote-utils.c (monitor_output): Constify msg parameter.
15701 * server.h (monitor_output): Likewise.
15702 * win32-i386-low.c (handle_output_debug_string): New.
15703 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15704 handle_output_debug_string.
15705 (get_child_debug_event): Likewise.
15707 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15709 * server.c (main): Correct strtoul check.
15711 2007-03-27 Jon Ringle <jon@ringle.org>
15713 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15715 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15717 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15719 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15721 * terminal.h: Check HAVE_SGTTY_H.
15723 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15725 * remote-utils.c (remote_open): Print out the assigned port number.
15727 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15729 * remote-utils.c (monitor_output): New function.
15730 * server.c (debug_threads): Define here.
15731 (monitor_show_help): New function.
15732 (handle_query): Handle qRcmd.
15733 (main): Do not handle 'd' packet.
15734 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15735 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15738 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15740 * Makefile.in (EXEEXT): New.
15741 (clean): Use $(EXEEXT).
15743 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15745 * target.h (target_ops): Rename send_signal to request_interrupt,
15746 and remove enum target_signal parameter.
15747 * linux-low.c (linux_request_interrupt): Rename from
15748 linux_send_signal, and always send SIGINT.
15749 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15750 and always send SIGINT.
15751 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15753 (input_interrupt): Likewise.
15755 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15757 * server.c (get_features_xml): Check if target implemented
15759 * win32-i386-low.c (win32_arch_string): New.
15760 (win32_target_ops): Add win32_arch_string as arch_string member.
15762 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15764 * spu-low.c (spu_arch_string): New.
15765 (spu_target_ops): Add spu_arch_string.
15767 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15769 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15770 * configure.ac: Do not check for terminal.h.
15771 * configure, config.in: Regenerated.
15773 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15775 * Makefile.in (OBS): Add $(XML_BUILTIN).
15776 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15778 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15779 (arm-with-iwmmxt.c): New.
15780 * config.in, configure: Regenerate.
15781 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15782 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15783 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15784 (arm*-*-linux*): Add iWMMXt and regset support.
15785 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15786 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15787 (arm_store_wmmxregset, target_regsets): New.
15788 * server.c (get_features_xml): Take annex argument. Check builtin
15790 (handle_query): Handle multiple annexes.
15792 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15794 * remote-utils.c [USE_WIN32API] (read, write): Define.
15795 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15798 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15800 * linux-i386-low.c (the_low_target): Set arch_string.
15801 * linux-x86-64-low.c (the_low_target): Likewise.
15802 * linux-low.c (linux_arch_string): New.
15803 (linux_target_ops): Add it.
15804 * linux-low.h (struct linux_target_ops): Add arch_string.
15805 * server.c (write_qxfer_response): Use const void * for DATA.
15806 (get_features_xml): New.
15807 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15808 * target.h (struct target_ops): Add arch_string method.
15810 2007-01-03 Denis Pilat <denis.pilat@st.com>
15811 Daniel Jacobowitz <dan@codesourcery.com>
15813 * linux-low.c (linux_kill): Handle being called with no threads.
15814 * win32-i386-low.c (win32_kill): Likewise.
15815 (get_child_debug_event): Clear current_process_handle.
15817 2006-12-30 Denis PILAT <denis.pilat@st.com>
15818 Daniel Jacobowitz <dan@codesourcery.com>
15820 * remote-utils.c (remote_open): Check the type of specified
15821 serial port devices before opening them.
15822 * server.c (main): Kill the inferior if an error occurs during
15823 the first remote_open.
15825 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15827 * README: Update supported targets.
15829 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15831 * Makefile.in (clean): Remove reg-mips64.c.
15832 (reg-mips64.c, reg-mips64.o): New rules.
15833 * configure.srv: Handle mips64. Include regset support for mips.
15834 * linux-mips-low.c (union mips_register): New.
15835 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15836 (mips_breakpoint, mips_breakpoint_at): Use int.
15837 (mips_collect_register, mips_supply_register)
15838 (mips_collect_register_32bit, mips_supply_register_32bit)
15839 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15840 (mips_store_fpregset, target_regsets): New.
15841 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15843 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15845 * configure.srv: Add target "spu*-*-*".
15846 * Makefile.in (clean): Remove reg-spu.c.
15847 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15848 * spu-low.c: New file.
15850 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15852 * configure.ac: Correct td_thr_tls_get_addr test.
15853 * configure: Regenerated.
15855 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15857 * linux-low.c (linux_wait_for_event): Reformat. Use the
15858 pass_signals array.
15859 * remote-utils.c (decode_address_to_semicolon): New.
15860 * server.c (pass_signals, handle_general_set): New.
15861 (handle_query): Mention QPassSignals for qSupported.
15862 (main): Call handle_general_set.
15863 * server.h (pass_signals, decode_address_to_semicolon): New.
15865 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15867 * server.c (handle_query): Correct error handling for read_auxv.
15869 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15871 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15872 and srv_linux_thread_db to yes.
15873 * linux-s390-low.c (s390_fill_gregset): New function.
15874 (target_regsets): Define data structure.
15876 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15878 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15879 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15880 * config.in, configure: Regenerated.
15881 * inferiors.c (gdb_id_to_thread): New function.
15882 (gdb_id_to_thread_id): Use it.
15883 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15884 * linux-low.h (struct process_info): Add th member.
15885 (thread_db_get_tls_address): New prototype.
15886 * remote-utils.c (decode_address): Make non-static.
15887 * server.c (handle_query): Handle qGetTLSAddr.
15888 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15889 * target.h (struct target_ops): Add get_tls_address.
15890 * thread-db.c (maybe_attach_thread): Save the thread handle.
15891 (thread_db_get_tls_address): New.
15893 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15895 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15896 (linux_resume_one_process): Take a siginfo_t *. Update all
15897 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15898 (struct pending_signals): Add a siginfo_t.
15899 (linux_wait_for_process): Always set last_status.
15900 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15901 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15902 * linux-low.h (struct process_info): Add last_status.
15904 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15906 * remote-utils.c (try_rle): New function.
15907 (putpkt_binary): Use it.
15909 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15911 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15912 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15913 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15914 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15915 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15918 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15920 * server.c (terminal_fd): New variable.
15921 (old_foreground_pgrp): Likewise.
15922 (restore_old_foreground_pgrp): New function.
15923 (start_inferior): Record the terminal file descriptor in terminal_fd
15924 and its original foreground group in old_foreground_pgrp. Register
15925 restore_old_foreground_pgrp with atexit().
15927 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15929 * server.c (handle_query): Correct qPart to qXfer.
15931 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15933 * configure.ac: Check for more headers which are missing on
15934 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15935 * configure.srv: Add Cygwin and mingw32.
15936 * remote-utils.c: Don't include headers unconditionally which
15937 are missing on mingw32. Include <winsock.h> for mingw32.
15938 (remote_open): Adjust for mingw32 support. Flush
15939 standard error after writing to it.
15940 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15941 (unblock_async_io, enable_async_io, disable_async_io)
15942 (readchar, getpkt): Update for Winsock support.
15943 (prepare_resume_reply): Expect a protocol signal number.
15944 * server.c: Disable <sys/wait.h> on mingw32.
15945 (start_inferior): Adjust for mingw32 support. Flush
15946 standard error after writing to it.
15947 (attach_inferior): Likewise. Use protocol signal
15949 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15951 * win32-i386-low.c: New file.
15952 * Makefile.in (XM_CLIBS): Set.
15953 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15954 (win32-i386-low.o): New dependency rule.
15955 * linux-low.c (linux_wait): Use target signal numbers.
15956 * target.h (struct target_ops): Doc fix.
15957 * server.h (target_signal_to_name): New prototype.
15958 * gdbreplay.c: Don't include headers unconditionally which
15959 are missing on mingw32. Include <winsock.h> for mingw32.
15960 (remote_close, remote_open): Adjust for Winsock support.
15961 * configure, config.in: Regenerated.
15963 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15965 * server.c (decode_xfer_read, write_qxfer_response): New.
15966 (handle_query): Take a packet length argument. Handle
15967 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15968 the qSupported response.
15969 (main): Update call to handle_query.
15971 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15973 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15974 (putpkt_binary): Renamed from putpkt and adjusted for binary
15976 (putpkt): New wrapper for putpkt_binary.
15977 (readchar): Don't mask off the high bit.
15978 (decode_X_packet): New function.
15979 * server.c (main): Call putpkt_binary if a handler sets the packet
15980 length. Save the length of the incoming packet. Handle 'X'.
15981 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15983 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15985 * server.c (handle_query): Handle qSupported.
15987 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15989 * remote-utils.c (all_symbols_looked_up): New variable.
15990 (look_up_one_symbol): Check it.
15991 * server.h (look_up_one_symbol): New declaration.
15992 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15994 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15996 * Makefile.in (linux-arm-low.o): Update dependencies.
15997 * linux-arm-low.c: Include "gdb_proc_service.h".
15998 (PTRACE_GET_THREAD_AREA): Define.
15999 (ps_get_thread_area): New function.
16001 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16003 * configure.srv (m68k*-*-uclinux*): New target.
16004 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16005 (linux_resume_one_process): Remove extraneous cast.
16006 (linux_read_offsets): New.
16007 (linux_target_op): Add linux_read_offsets on mmuless systems.
16008 * server.c (handle_query): Add qOffsets logic.
16009 * target.h (struct target_ops): Add read_offsets.
16011 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16013 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16014 (PTRACE_GET_THREAD_AREA): Define.
16015 (ps_get_thread_area): New function.
16016 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16017 (linux-x86-64-low.o): Update.
16019 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16021 * configure.ac: Remove checks for prfpregset_t.
16022 * gdb_proc_service.h: New file.
16023 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16024 new "gdb_proc_service.h".
16025 * proc-service.c: Likewise.
16026 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16027 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16028 * Makefile.in (gdb_proc_service_h): Updated.
16029 * configure, config.in: Regenerated.
16031 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16033 * remote-utils.c (prepare_resume_reply): Move declaration
16034 of gdb_id_from_wait to the top of the block.
16036 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16038 * linux-low.c (regsets_store_inferior_registers): Read the regset
16039 from the target before filling it.
16041 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16043 * server.c (attach_inferior): Return SIGTRAP for a successful
16046 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16048 * Makefile.in (OBS): Add version.o.
16049 (STAGESTUFF): Delete.
16050 (version.o): Add dependencies.
16051 (version.c): Replace rule.
16052 (clean): Remove version.c.
16053 * server.c (gdbserver_version): New.
16054 (gdbserver_usage): Use printf.
16055 (main): Handle --version and --help.
16056 * server.h (version, host_name): Add declarations.
16058 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16070 * linux-x86-64-low.c:
16072 * linux-s390-low.c:
16073 * linux-ppc64-low.c:
16075 * linux-mips-low.c:
16076 * linux-m68k-low.c:
16077 * linux-m32r-low.c:
16080 * linux-ia64-low.c:
16081 * linux-i386-low.c:
16082 * linux-crisv32-low.c:
16094 * gdbserver.1: Add (C) after Copyright. Update the FSF
16097 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16099 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16100 (arm_breakpoint_at): Recognize both breakpoints.
16101 (the_low_target): Use the correct breakpoint instruction.
16103 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16105 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16106 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16107 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16108 (the_low_target): Update.
16110 2005-10-25 Andreas Schwab <schwab@suse.de>
16112 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16114 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16115 (ia64_num_regs): Reduce to 462.
16117 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16119 * acinclude.m4: Correct quoting.
16120 * aclocal.m4: Regenerated.
16122 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16123 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16124 (thread_db_init): Call thread_db_err_str.
16125 * configure.ac: Check for TD_VERSION.
16126 * config.in, configure: Regenerated.
16128 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16130 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16132 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16134 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16135 is not available. Define HAVE_PTRACE_GETREGS if it is.
16136 * config.in, configure: Regenerated.
16137 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16138 * linux-i386-low.c, linux-m68k-low.c: Update to use
16139 HAVE_PTRACE_GETREGS.
16140 * linux-low.c (regsets_fetch_inferior_registers)
16141 (regsets_store_inferior_registers): Only return 0 if we processed
16143 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16144 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16146 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16148 * inferiors.c (struct thread_info): Add gdb_id.
16149 (add_thread): Add gdb_id argument.
16150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16151 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16152 calls to add_thread.
16153 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16154 * server.c (handle_query): Use thread_to_gdb_id.
16155 (handle_v_cont, main): Use gdb_id_to_thread_id.
16156 * server.h (add_thread): Update prototype.
16157 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16160 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16162 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16163 left-padded registers.
16164 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16165 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16167 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16169 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16170 * configure: Regenerate.
16171 * config.in: Regenerate.
16172 * server.h (NEED_DECLARATION_STRERROR):
16173 Replace with !HAVE_DECL_STRERROR.
16175 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16177 * linux-low.c (linux_wait, linux_send_signal): Don't test
16178 an unsigned long variable for > 0 if it could be MAX_ULONG.
16179 * server.c (myresume): Likewise.
16180 * target.c (set_desired_inferior): Likewise.
16182 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16184 * configure.ac: Simplify and improve check for socklen_t.
16185 * configure, config.in: Regenerate.
16187 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16189 * acconfig.h: Remove.
16190 * configure.ac: Add a test for socklen_t. Use three-argument
16191 AC_DEFINE throughout.
16192 * config.in: Regenerated using autoheader 2.59.
16193 * configure: Regenerated.
16195 * gdbreplay.c (socklen_t): Provide a default.
16196 (remote_open): Use socklen_t.
16197 * remote-utils.c (socklen_t): Provide a default.
16198 (remote_open): Use socklen_t.
16199 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16202 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16204 * linux-low.c (linux_read_memory, linux_write_memory)
16205 (linux_read_auxv): Likewise.
16206 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16207 (check_mem_write): Likewise.
16208 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16210 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16211 (registers_from_string, register_data): Likewise.
16212 * server.c (handle_query, main): Likewise.
16213 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16214 (decode_M_packet): Likewise.
16215 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16216 * target.h (struct target_ops): Update read_memory, write_memory,
16218 (read_inferior_memory, write_inferior_memory): Update.
16219 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16220 to unsigned char *.
16221 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16222 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16223 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16224 linux-s390-low.c, linux-sh-low.c: Update for changes in
16225 read_inferior_memory and the_low_target->breakpoint.
16227 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16229 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16230 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16231 * configure.srv: Add powerpc64-*-linux*.
16232 * linux-ppc64-low.c: New file.
16234 2005-05-23 Orjan Friberg <orjanf@axis.com>
16236 * linux-cris-low.c: New file with support for CRIS.
16237 * linux-crisv32-low.c: Ditto for CRISv32.
16238 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16239 (clean): Add reg-cris.c and reg-crisv32.c.
16240 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16241 reg-crisv32.o, and reg-crisv32.c to make rules.
16242 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16243 recognized targets.
16245 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16247 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16248 of sizeof (PTRACE_XFER_TYPE).
16249 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16251 2005-05-12 Orjan Friberg <orjanf@axis.com>
16253 * target.h (struct target_ops): Add insert_watchpoint,
16254 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16255 pointers for hardware watchpoint support.
16256 * linux-low.h (struct linux_target_ops): Ditto.
16257 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16258 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16259 to linux_target_ops.
16260 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16262 * server.c (main): Recognize 'Z' and 'z' packets.
16264 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16266 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16267 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16268 (the_low_target): Add new members.
16270 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16272 * proc-service.c (ps_lgetregs): Search all_processes instead of
16275 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16277 * server.c (start_inferior): Change return type to int.
16278 (attach_inferior): Change sigptr to int *.
16279 (handle_v_cont, handle_v_requests): Change signal to int *.
16280 (main): Change signal to int.
16282 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16284 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16285 * configure.srv: Add m32r*-*-linux*.
16286 * linux-m32r-low.c: New file.
16288 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16290 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16292 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16294 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16295 Take unsigned long arguments for PIDs.
16296 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16297 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16298 (wait_for_sigstop, linux_resume_one_process)
16299 (regsets_fetch_inferior_registers, linux_send_signal)
16300 (linux_read_auxv): Likewise. Update the types of variables holding
16301 PIDs. Update format string specifiers.
16302 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16303 * remote-utils.c (prepare_resume_reply): Likewise.
16304 * server.c (cont_thread, general_thread, step_thread)
16305 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16307 (handle_query): Update format specifiers.
16308 (handle_v_cont, main): Use strtoul for thread IDs.
16309 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16310 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16311 (general_thread, step_thread, thread_from_wait)
16312 (old_thread_from_wait): Update.
16313 * target.h (struct thread_resume): Use unsigned long for THREAD.
16314 (struct target_ops): Use unsigned long for arguments to attach and
16317 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16319 * acinclude.m4: Include bfd/bfd.m4 directly.
16320 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16321 <agriffis@toolchain.org>.
16322 * aclocal.m4, configure: Regenerated.
16324 2005-01-07 Andrew Cagney <cagney@gnu.org>
16326 * configure.ac: Rename configure.in, require autoconf 2.59.
16327 * configure: Re-generate.
16329 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16331 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16332 LIBS when finished.
16333 * aclocal.m4: Regenerated.
16334 * configure: Regenerated.
16336 2004-11-21 Andreas Schwab <schwab@suse.de>
16338 * linux-m68k-low.c (m68k_num_gregs): Define.
16339 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16340 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16341 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16342 (m68k_breakpoint_at): New. Add to the_low_target.
16344 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16345 srv_linux_thread_db to yes.
16347 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16349 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16350 (ARCH_SET_FS): Likewise.
16351 (ARCH_GET_FS): Likewise.
16352 (ARCH_GET_GS): Likewise.
16354 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16356 * linux-i386-low.c (ps_get_thread_area): New.
16357 * linux-x86-64-low.c (ps_get_thread_area): New.
16358 * linux-low.c: Include <sys/syscall.h>.
16359 (linux_kill_one_process): Don't kill the first thread here.
16360 (linux_kill): Kill the first thread here.
16361 (kill_lwp): New function.
16362 (send_sigstop, linux_send_signal): Use it.
16363 * proc-service.c: Clean up #ifdefs.
16364 (fpregset_info): Delete.
16365 (ps_lgetregs): Update and enable implementation.
16366 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16368 * remote-utils.c (struct sym_cache, symbol_cache): New.
16369 (input_interrupt): Print a clearer message.
16370 (async_io_enabled): New variable.
16371 (enable_async_io, disable_async_io): Use it. Update comments.
16372 (look_up_one_symbol): Use the symbol cache.
16373 * thread-db.c (thread_db_look_up_symbols): New function.
16374 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16376 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16378 * configure.in: Test for -rdynamic.
16379 * configure: Regenerated.
16380 * Makefile (INTERNAL_LDFLAGS): New.
16381 (gdbserver, gdbreplay): Use it.
16383 2004-09-02 Andrew Cagney <cagney@gnu.org>
16385 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16387 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16389 * linux-low.c (linux_wait): Clear all_processes list also.
16391 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16393 * linux-low.c: Include <errno.h>. Remove extern declaration of
16396 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16398 * gdbreplay.c, server.h, utils.c: Update copyright years.
16400 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16402 * server.c (main): Print child status or termination signal from
16403 variable 'signal', not 'sig'.
16405 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16407 * linux-low.c (linux_read_memory): Change return type to
16408 int. Check for and return error from ptrace().
16409 * target.c (read_inferior_memory): Change return type to int. Pass
16410 back return status from the_target->read_memory().
16411 * target.h (struct target_ops): Adapt *read_memory() prototype.
16413 (read_inferior_memory): Adapt prototype.
16414 * server.c (main): Return an error packet if
16415 read_inferior_memory() returns an error.
16417 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16419 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16420 Unify with other clean targets.
16422 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16424 * server.c (handle_v_cont): Call set_desired_inferior.
16426 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16428 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16432 * linux-low.c (linux_wait): Unblock async I/O.
16433 (linux_resume): Block and enable async I/O.
16434 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16435 * server.h (block_async_io, unblock_async_io): Add prototypes.
16437 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16439 * remote-utils.c (remote_open): Print a status notice after
16440 opening a TCP port.
16441 * server.c (attach_inferior): Print a status notice after
16444 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16446 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16448 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16450 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16452 * server.c, target.h: Update copyright years.
16454 2004-02-25 Roland McGrath <roland@redhat.com>
16456 * target.h (struct target_ops): New member `read_auxv'.
16457 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16458 * linux-low.c (linux_read_auxv): New function.
16459 (linux_target_ops): Initialize `read_auxv' member to that.
16461 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16463 Committed by Jim Blandy <jimb@redhat.com>.
16465 * linux-s390-low.c (s390_num_regs): Update.
16466 (s390_regmap): Remove control registers. Use __s390x__ predefine
16467 instead of GPR_SIZE to distiguish s390 and s390x targets.
16469 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16471 * linux-low.c: Update copyright year.
16472 (check_removed_breakpoint): Clear pending_is_breakpoint.
16473 (linux_set_resume_request, linux_queue_one_thread)
16474 (resume_status_pending_p): New functions.
16475 (linux_continue_one_thread): Use process->resume.
16476 (linux_resume): Only resume threads if there are no pending events.
16477 * linux-low.h (struct process_info): Add resume request
16480 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16482 * regcache.c (new_register_cache): Clear the allocated register
16483 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16485 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16487 * linux-low.c (linux_resume): Take a struct thread_resume *
16489 (linux_wait): Update call.
16490 (resume_ptr): New static variable.
16491 (linux_continue_one_thread): Renamed from
16492 linux_continue_one_process. Use resume_ptr.
16493 (linux_resume): Use linux_continue_one_thread.
16494 * server.c (handle_v_cont, handle_v_requests): New functions.
16495 (myresume): New function.
16496 (main): Handle 'v' case.
16497 * target.h (struct thread_resume): New type.
16498 (struct target_ops): Change argument of "resume" to struct
16500 (myresume): Delete macro.
16502 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16504 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16505 (uninstall): Support DESTDIR.
16507 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16509 * configure.srv: Add xscale*linux copy of arm*linux entry.
16511 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16513 * linux-arm-low.c (arm_reinsert_addr): New function.
16514 (the_low_target): Add arm_reinsert_addr.
16516 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16518 * mem-break.c: Remove whitespace at end of file.
16520 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16522 * configure.in: Check whether we need to prototype strerror.
16523 * server.h: Optionally prototype strerror.
16524 * gdbreplay.c (perror_with_name): Use strerror.
16525 * linux-low.c (linux_attach_lwp): Use strerror.
16526 * utils.c (perror_with_name): Use strerror.
16527 * config.in, configure: Regenerated.
16529 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16531 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16532 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16534 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16536 * Makefile.in (SFILES): Update.
16537 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16538 low-sun3.c: Remove files.
16540 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16542 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16543 (linux_detach_one_process, linux_detach): New functions.
16544 (linux_target_ops): Add linux_detach.
16545 * server.c (main): Handle 'D' packet.
16546 * target.h (struct target_ops): Add "detach" member.
16547 (detach_inferior): Define.
16549 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16551 From Kelley Cook <kelleycook@wideopenwest.com>:
16552 * configure.srv: Accept i[34567]86 variants.
16554 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16556 * linux-low.c (linux_wait_for_event): Correct comment typos.
16557 (linux_resume_one_process): Call check_removed_breakpoint.
16558 (linux_send_signal): New function.
16559 (linux_target_ops): Add linux_send_signal.
16560 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16562 * target.h (struct target_ops): Add send_signal.
16564 2003-05-29 Jim Blandy <jimb@redhat.com>
16566 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16567 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16568 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16569 away part of the register's value.
16571 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16573 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16574 (linux_wait_for_event, linux_init_signals): Likewise.
16576 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16578 * configure.in: Check for stdlib.h.
16579 * configure: Regenerated.
16580 * config.in: Regenerated.
16582 2003-01-04 Andreas Schwab <schwab@suse.de>
16584 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16586 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16588 * Makefile.in: Remove obsolete code.
16590 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16592 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16593 defined(PT_FPR0_HI).
16595 2002-11-17 Stuart Hughes <seh@zee2.com>
16597 * linux-arm-low.c (arm_num_regs): Increase.
16598 (arm_regmap): Include status register.
16600 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16602 * linux-low.c (register_addr): Remove incorrect -1 check.
16604 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16606 * linux-low.c (linux_create_inferior): Call setpgid. Return
16608 (unstopped_p, linux_signal_pid): Remove.
16609 (linux_target_ops): Remove linux_signal_pid.
16610 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16611 global instead of target method.
16612 * target.h (struct target_ops): Remove signal_pid. Update comment
16613 for create_inferior.
16614 * server.c (signal_pid): New variable.
16615 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16616 gdbserver. Set the child to be the foreground process group.
16617 (attach_inferior): Set signal_pid.
16619 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16621 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16623 2002-08-20 Jim Blandy <jimb@redhat.com>
16625 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16628 2002-08-01 Andrew Cagney <cagney@redhat.com>
16630 * Makefile.in: Make chill references obsolete.
16632 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16634 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16635 * configure: Regenerate.
16636 * config.in: Regenerate.
16638 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16640 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16641 (perror_with_name, remote_close, remote_open, expect, play): Static.
16643 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16645 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16646 byte offsets instead of an array of indexes.
16647 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16649 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16651 * regcache.c: Add comment.
16653 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16655 * thread-db.c: New file.
16656 * proc-service.c: New file.
16657 * acinclude.m4: New file.
16658 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16659 proc-service.o, and thread-db.o.
16660 (linux-low.o): Add USE_THREAD_DB.
16661 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16662 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16663 * aclocal.m4: Regenerated.
16664 * config.in: Regenerated.
16665 * configure: Regenerated.
16666 * configure.in: Check for proc_service.h, sys/procfs.h,
16667 thread_db.h, and linux/elf.h headrs.
16668 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16669 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16670 Check for -lthread_db and thread support.
16671 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16672 PowerPC, and SuperH.
16673 * i387-fp.c: Constify arguments.
16674 * i387-fp.h: Likewise.
16675 * inferiors.c: (struct thread_info): Renamed from
16676 `struct inferior_info'. Remove PID member. Use generic inferior
16677 list header. All uses updated.
16678 (inferiors, signal_pid): Removed.
16679 (all_threads): New variable.
16680 (get_thread): Define.
16681 (add_inferior_to_list): New function.
16682 (for_each_inferior): New function.
16683 (change_inferior_id): New function.
16684 (add_inferior): Removed.
16685 (remove_inferior): New function.
16686 (add_thread): New function.
16687 (free_one_thread): New function.
16688 (remove_thread): New function.
16689 (clear_inferiors): Use for_each_inferior and free_one_thread.
16690 (find_inferior): New function.
16691 (find_inferior_id): New function.
16692 (inferior_target_data): Update argument type.
16693 (set_inferior_target_data): Likewise.
16694 (inferior_regcache_data): Likewise.
16695 (set_inferior_regcache_data): Likewise.
16696 * linux-low.c (linux_bp_reinsert): Remove.
16697 (all_processes, stopping_threads, using_thrads)
16698 (struct pending_signals, debug_threads, pid_of): New.
16699 (inferior_pid): Replace with macro.
16700 (struct inferior_linux_data): Remove.
16701 (get_stop_pc, add_process): New functions.
16702 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16703 Use add_process and add_thread.
16704 (linux_attach_lwp): New function, based on old linux_attach. Use
16705 add_process and add_thread. Set stop_expected for new threads.
16706 (linux_attach): New function.
16707 (linux_kill_one_process): New function.
16708 (linux_kill): Kill all LWPs.
16709 (linux_thread_alive): Use find_inferior_id.
16710 (check_removed_breakpoints, status_pending_p): New functions.
16711 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16712 Update. Use WNOHANG. Wait for cloned processes also. Update process
16713 struct for the found process.
16714 (linux_wait_for_event): New function.
16715 (linux_wait): Use it. Support LWPs.
16716 (send_sigstop, wait_for_sigstop, stop_all_processes)
16717 (linux_resume_one_process, linux_continue_one_process): New functions.
16718 (linux_resume): Support LWPs.
16719 (REGISTER_RAW_SIZE): Remove.
16720 (fetch_register): Use register_size instead. Call supply_register.
16721 (usr_store_inferior_registers): Likewise. Call collect_register.
16722 Fix recursive case.
16723 (regsets_fetch_inferior_registers): Improve error message.
16724 (regsets_store_inferior_registers): Add debugging.
16725 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16726 (unstopped_p, linux_signal_pid): New functions.
16727 (linux_target_ops): Add linux_signal_pid.
16728 (linux_init_signals): New function.
16729 (initialize_low): Call it. Initialize using_threads.
16730 * regcache.c (inferior_regcache_data): Add valid
16732 (get_regcache): Fetch registers lazily. Add fetch argument
16733 and update all callers.
16734 (regcache_invalidate_one, regcache_invalidate): New
16736 (new_register_cache): Renamed from create_register_cache.
16737 Return the new regcache.
16738 (free_register_cache): Change argument to a void *.
16739 (registers_to_string, registers_from_string): Call get_regcache
16740 with fetch flag set.
16741 (register_data): Make static. Pass fetch flag to get_regcache.
16742 (supply_register): Call get_regcache with fetch flag clear.
16743 (collect_register): Call get_regcache with fetch flag set.
16744 (collect_register_as_string): New function.
16745 * regcache.h: Update.
16746 * remote-utils.c (putpkt): Flush after debug output and use
16748 Handle input interrupts while waiting for an ACK.
16749 (input_interrupt): Use signal_pid method.
16750 (getpkt): Flush after debug output and use stderr.
16751 (outreg): Use collect_register_as_string.
16752 (new_thread_notify, dead_thread_notify): New functions.
16753 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16754 and general_thread.
16755 (look_up_one_symbol): Flush after debug output.
16756 * server.c (step_thread, server_waiting): New variables.
16757 (start_inferior): Don't use signal_pid. Update call to mywait.
16758 (attach_inferior): Update call to mywait.
16759 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16760 (main): Don't fetch/store registers explicitly. Use
16761 set_desired_inferior. Support proposed ``Hs'' packet. Update
16763 * server.h: Update.
16764 (struct inferior_list, struct_inferior_list_entry): New.
16765 * target.c (set_desired_inferior): New.
16766 (write_inferior_memory): Constify.
16767 (mywait): New function.
16768 * target.h: Update.
16769 (struct target_ops): New signal_pid method.
16770 (mywait): Removed macro, added prototype.
16772 * linux-low.h (regset_func): Removed.
16773 (regset_fill_func, regset_store_func): New.
16774 (enum regset_type): New.
16775 (struct regset_info): Add type field. Use new operation types.
16776 (struct linux_target_ops): stop_pc renamed to get_pc.
16777 Add decr_pc_after_break and breakpoint_at.
16778 (get_process, get_thread_proess, get_process_thread)
16779 (strut process_info, all_processes, linux_attach_lwp)
16780 (thread_db_init): New.
16782 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16783 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16784 (the_low_target): Add new members.
16785 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16786 (i386_store_fpxregset): Constify.
16787 (target_regsets): Add new kind identifier.
16788 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16789 (i386_set_pc): Add debugging.
16790 (i386_breakpoint_at): New function.
16791 (the_low_target): Add new members.
16792 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16793 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16794 (mips_breakpoint_at): New.
16795 (the_low_target): Add new members.
16796 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16797 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16798 (the_low_target): Add new members.
16799 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16800 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16801 (the_low_target): Add new members.
16802 * linux-x86-64-low.c (target_regsets): Add new kind
16805 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16807 From Martin Pool <mbp@samba.org>:
16808 * server.c (gdbserver_usage): New function.
16811 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16813 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16814 stop_at -> stop_pc.
16816 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16818 * Makefile.in: Remove obsolete code.
16820 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16822 * linux-low.c (regsets_fetch_inferior_registers),
16823 (regsets_store_inferior_registers): Removed cast to int from
16825 * regcache.h: Added declaration of struct inferior_info.
16827 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16829 * inferiors.c (struct inferior_info): Add regcache_data.
16830 (add_inferior): Call create_register_cache.
16831 (clear_inferiors): Call free_register_cache.
16832 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16833 * regcache.c (struct inferior_regcache_data): New.
16834 (registers): Remove.
16835 (get_regcache): New function.
16836 (create_register_cache, free_register_cache): New functions.
16837 (set_register_cache): Don't initialize the register cache here.
16838 (registers_to_string, registers_from_string, register_data): Call
16840 * regcache.h: Add prototypes.
16841 * server.h: Likewise.
16843 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16845 * mem-break.c: New file.
16846 * mem-break.h: New file.
16847 * Makefile.in: Add mem-break.o rule; update server.h
16849 * inferiors.c (struct inferior_info): Add target_data
16851 (clear_inferiors): Free target_data member if set.
16852 (inferior_target_data, set_inferior_target_data): New functions.
16853 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16854 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16855 * linux-low.c (linux_bp_reinsert): New variable.
16856 (struct inferior_linux_data): New.
16857 (linux_create_inferior): Use set_inferior_target_data.
16858 (linux_attach): Likewise. Call add_inferior.
16859 (linux_wait_for_one_inferior): New function.
16860 (linux_wait): Call it.
16861 (linux_write_memory): Add const.
16862 (initialize_low): Call set_breakpoint_data.
16863 * linux-low.h (struct linux_target_ops): Add breakpoint
16865 * server.c (attach_inferior): Remove extra add_inferior
16867 * server.h: Include mem-break.h. Update inferior.c
16869 * target.c (read_inferior_memory)
16870 (write_inferior_memory): New functions.
16871 * target.h (read_inferior_memory)
16872 (write_inferior_memory): Change macros to prototypes.
16873 (struct target_ops): Update comments. Add const to write_memory
16876 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16878 * linux-low.c (usr_store_inferior_registers): Support
16879 registers which are allowed to fail to store.
16880 * linux-low.h (linux_target_ops): Likewise.
16881 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16882 (ppc_cannot_store_register): FPSCR may not be storable.
16884 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16886 * server.h: Include <string.h> if HAVE_STRING_H.
16887 * ChangeLog: Correct paths in last ChangeLog entry.
16889 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16891 * linux-low.h: Remove obsolete prototypes.
16892 (struct linux_target_ops): New.
16893 (extern the_low_target): New.
16894 * linux-low.c (num_regs, regmap): Remove declarations.
16895 (register_addr): Use the_low_target explicitly.
16896 (fetch_register): Likewise.
16897 (usr_fetch_inferior_registers): Likewise.
16898 (usr_store_inferior_registers): Likewise.
16899 * linux-arm-low.c (num_regs): Remove.
16900 (arm_num_regs): Define.
16901 (arm_regmap): Renamed from regmap, made static.
16902 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16904 (arm_cannot_store_register): Renamed from cannot_store_register,
16906 (the_low_target): New.
16907 * linux-i386-low.c (num_regs): Remove.
16908 (i386_num_regs): Define.
16909 (i386_regmap): Renamed from regmap, made static.
16910 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16912 (i386_cannot_store_register): Renamed from cannot_store_register,
16914 (the_low_target): New.
16915 * linux-ia64-low.c (num_regs): Remove.
16916 (ia64_num_regs): Define.
16917 (ia64_regmap): Renamed from regmap, made static.
16918 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16920 (ia64_cannot_store_register): Renamed from cannot_store_register,
16922 (the_low_target): New.
16923 * linux-m68k-low.c (num_regs): Remove.
16924 (m68k_num_regs): Define.
16925 (m68k_regmap): Renamed from regmap, made static.
16926 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16928 (m68k_cannot_store_register): Renamed from cannot_store_register,
16930 (the_low_target): New.
16931 * linux-mips-low.c (num_regs): Remove.
16932 (mips_num_regs): Define.
16933 (mips_regmap): Renamed from regmap, made static.
16934 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16936 (mips_cannot_store_register): Renamed from cannot_store_register,
16938 (the_low_target): New.
16939 * linux-ppc-low.c (num_regs): Remove.
16940 (ppc_num_regs): Define.
16941 (ppc_regmap): Renamed from regmap, made static.
16942 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16944 (ppc_cannot_store_register): Renamed from cannot_store_register,
16946 (the_low_target): New.
16947 * linux-s390-low.c (num_regs): Remove.
16948 (s390_num_regs): Define.
16949 (s390_regmap): Renamed from regmap, made static.
16950 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16952 (s390_cannot_store_register): Renamed from cannot_store_register,
16954 (the_low_target): New.
16955 * linux-sh-low.c (num_regs): Remove.
16956 (sh_num_regs): Define.
16957 (sh_regmap): Renamed from regmap, made static.
16958 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16960 (sh_cannot_store_register): Renamed from cannot_store_register,
16962 (the_low_target): New.
16963 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16964 (the_low_target): New.
16966 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16968 * Makefile.in: Add stamp-h target.
16969 * configure.in: Create stamp-h.
16970 * configure: Regenerated.
16972 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16974 * inferiors.c: New file.
16975 * target.c: New file.
16976 * target.h: New file.
16977 * Makefile.in: Add target.o and inferiors.o. Update
16979 * linux-low.c (inferior_pid): New static variable,
16980 moved from server.c.
16981 (linux_create_inferior): Renamed from create_inferior.
16982 Call add_inferior. Return 0 on success instead of a PID.
16983 (linux_attach): Renamed from myattach.
16984 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16985 (linux_thread_alive): Renamed from mythread_alive.
16986 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16988 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16989 (regsets_store_inferior_registers): Correct error message.
16990 Add missing ``return 0''.
16991 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16992 (linux_store_registers): Renamed from store_inferior_registers.
16993 (linux_read_memory): Renamed from read_inferior_memory.
16994 (linux_write_memory): Renamed from write_inferior_memory.
16995 (linux_target_ops): New structure.
16996 (initialize_low): Call set_target_ops ().
16997 * remote-utils.c (unhexify): New function.
16998 (hexify): New function.
16999 (input_interrupt): Send signals to ``signal_pid''.
17000 * server.c (inferior_pid): Remove.
17001 (start_inferior): Update create_inferior call.
17002 (attach_inferior): Call add_inferior.
17003 (handle_query): New function.
17004 (main): Call handle_query for `q' packets.
17005 * server.h: Include "target.h". Remove obsolete prototypes.
17006 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17008 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17010 * Makefile.in: Add WARN_CFLAGS. Update configury
17012 * configure.in: Check for <string.h>
17013 * configure: Regenerate.
17014 * config.in: Regenerate.
17015 * gdbreplay.c: Include needed system headers.
17016 (remote_open): Remove strchr prototype.
17017 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17018 * regcache.c (supply_register): Change buf argument to const void *.
17019 (supply_register_by_name): Likewise.
17020 (collect_register): Change buf argument to void *.
17021 (collect_register_by_name): Likewise.
17022 * regcache.h: Add missing prototypes.
17023 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17024 * server.c (handle_query): New function.
17025 (attached): New static variable, moved out of main.
17026 (main): Quiet longjmp clobber warnings.
17027 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17028 * utils.c (error): Remove NORETURN.