1 2018-08-27 Tom Tromey <tom@tromey.com>
6 2018-08-27 Tom Tromey <tom@tromey.com>
8 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
9 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
10 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
11 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
12 (s390x_emit_stack_adjust): Add casts to unsigned char.
14 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
18 * server.h (struct client_state) <disable_randomization>:
21 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
23 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
25 (mips_supply_ptrace_register): Likewise.
27 2018-07-22 Tom Tromey <tom@tromey.com>
31 2018-07-22 Tom Tromey <tom@tromey.com>
33 * win32-low.c (win32_create_inferior): Remove unused variables.
34 * gdbreplay.c (remote_open): Remove unused variable.
35 * remote-utils.c (remote_prepare): Remove unused variable.
36 * x86-tdesc.h (X86_TDESC_H): Define.
37 (amd64_expedite_regs): Define conditionally.
38 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
39 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
40 * remote-utils.c (readchar): Remove unused variable.
42 2018-07-13 Pedro Alves <palves@redhat.com>
44 * linux-low.c (linux_kill): Change parameter to process_info
45 pointer instead of pid. Adjust.
46 * lynx-low.c (lynx_kill): Likewise.
47 * nto-low.c (nto_kill): Likewise.
48 * spu-low.c (spu_kill): Likewise.
49 * win32-low.c (win32_kill): Likewise.
50 * server.c (handle_v_kill, kill_inferior_callback)
51 (detach_or_kill_for_exit): Adjust.
52 * target.c (kill_inferior): Change parameter to process_info
53 pointer instead of pid. Adjust.
54 * target.h (struct target_ops) <kill>: Change parameter to
55 process_info pointer instead of pid. Adjust all implementations
57 (kill_inferior): Likewise.
59 2018-07-13 Pedro Alves <palves@redhat.com>
61 * linux-low.c (linux_detach, linux_join): Change parameter to
62 process_info pointer instead of pid. Adjust.
63 * lynx-low.c (lynx_detach, lynx_join): Likewise.
64 * nto-low.c (nto_detach): Likewise.
65 * spu-low.c (spu_detach, spu_join): Likewise.
66 * win32-low.c (win32_detach, win32_join): Likewise.
67 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
68 * target.h (struct target_ops) <detach, join>: Change parameter to
69 process_info pointer instead of pid. Adjust all implementations
71 (detach_inferior, join_inferior): Rename 'pid' parameter to
74 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
75 Jan Kratochvil <jan.kratochvil@redhat.com>
76 Paul Fertser <fercerpav@gmail.com>
77 Tsutomu Seki <sekiriki@gmail.com>
79 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
80 (OBS): Add 'common/netstuff.o'.
81 (GDBREPLAY_OBS): Likewise.
82 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
83 (remote_open): Implement support for IPv6
85 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
87 (handle_accept_event): Accept connections from IPv6 sources.
88 (remote_prepare): Handle IPv6-style hostnames; implement
89 support for IPv6 connections.
90 (remote_open): Implement support for printing connections from
93 2018-07-11 Pedro Alves <palves@redhat.com>
96 * mem-break.c (any_persistent_commands): Add process_info
97 parameter and use it instead of relying on the current process.
98 Change return type to bool.
99 * mem-break.h (any_persistent_commands): Add process_info
100 parameter and change return type to bool.
101 * server.c (handle_detach): Remove require_running_or_return call.
102 Look up the process_info for the process we're about to detach.
103 If not found, return back error to GDB. Adjust
104 any_persistent_commands call to pass down a process pointer.
106 2018-07-11 Pedro Alves <palves@redhat.com>
108 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
109 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
110 instead of collect_register_by_name.
111 * regcache.c (regcache_raw_get_unsigned_by_name): New.
112 * regcache.h (regcache_raw_get_unsigned_by_name): New.
114 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
115 Pedro Alves <palves@redhat.com>
117 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
119 2018-07-03 Tom Tromey <tom@tromey.com>
121 * linux-low.c: Update.
122 * lynx-low.c: Update.
123 * mem-break.c: Update.
125 * remote-utils.c: Update.
129 * win32-low.c: Update.
131 2018-07-03 Tom Tromey <tom@tromey.com>
135 2018-07-03 Tom Tromey <tom@tromey.com>
137 * linux-low.c: Update.
139 2018-07-03 Tom Tromey <tom@tromey.com>
143 2018-07-03 Tom Tromey <tom@tromey.com>
145 * linux-low.c: Update.
146 * linux-mips-low.c: Update.
147 * lynx-low.c: Update.
149 * remote-utils.c: Update.
153 * thread-db.c: Update.
155 2018-07-03 Tom Tromey <tom@tromey.com>
157 * linux-low.c: Update.
158 * linux-mips-low.c: Update.
159 * lynx-low.c: Update.
160 * mem-break.c: Update.
162 * remote-utils.c: Update.
166 * tracepoint.c: Update.
168 2018-07-03 Tom Tromey <tom@tromey.com>
170 * linux-low.c: Update.
171 * linux-ppc-low.c: Update.
172 * linux-x86-low.c: Update.
173 * proc-service.c: Update.
176 * thread-db.c: Update.
177 * win32-low.c: Update.
179 2018-07-03 Tom Tromey <tom@tromey.com>
181 * linux-low.c: Update.
182 * lynx-low.c: Update.
184 * remote-utils.c: Update.
186 * thread-db.c: Update.
187 * win32-low.c: Update.
189 2018-06-29 Joel Brobecker <brobecker@adacore.com>
191 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
192 parameter in call to 'amd64_create_target_description'.
194 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
196 * x86-tdesc.h: Remove executable permission flag.
198 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
200 * configure.ac: Remove AC_PREREQ, add missing quoting.
201 * configure: Re-generate.
202 * config.in: Re-generate.
203 * aclocal.m4: Re-generate.
205 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
207 * tracepoint.h (current_traceframe): Remove declaration.
209 2018-06-18 Alan Hayward <alan.hayward@arm.com>
211 * linux-aarch64-low.c (is_sve_tdesc): New function.
212 (aarch64_sve_regs_copy_to_regcache): Likewise.
213 (aarch64_sve_regs_copy_from_regcache): Likewise.
214 (aarch64_regs_info): Add SVE checks.
215 (initialize_low_arch): Initialize SVE.
217 2018-06-18 Alan Hayward <alan.hayward@arm.com>
219 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
221 2018-06-11 Alan Hayward <alan.hayward@arm.com>
223 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
224 (initialize_low_tracepoint): Likewise
225 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
226 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
228 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
230 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
232 2018-06-11 Alan Hayward <alan.hayward@arm.com>
234 * server.h (PBUFSIZ): Increase size
236 2018-06-11 Alan Hayward <alan.hayward@arm.com>
238 * regcache.c (regcache::raw_compare): New function.
239 * regcache.h (regcache::raw_compare): New declaration.
241 2018-06-11 Alan Hayward <alan.hayward@arm.com>
243 * regcache.c (new_register_cache): Use new.
244 (free_register_cache): Use delete.
245 (register_data): Use const.
246 (supply_register): Move body inside regcache.
247 (regcache::raw_supply): New override function.
248 (collect_register): Move body inside regcache.
249 (regcache::raw_collect): New override function.
250 (regcache::get_register_status): New override function.
251 * regcache.h (struct regcache): Inherit from reg_buffer_common.
253 2018-06-09 Tom Tromey <tom@tromey.com>
255 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
257 (event_queue): Use std::queue.
258 (gdb_event_xfree): Remove.
259 (initialize_event_loop, process_event, wait_for_event): Update.
261 2018-06-08 Stan Cox <scox@redhat.com>
263 * win32-low.c (win32_create_inferior): last_ptid and last_status
264 moved to client_state.
266 2018-06-08 Pedro Alves <palves@redhat.com>
268 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
269 common/common-exceptions.o, common/common-utils.o,
270 common/errors.o, common/print-utils.o and utils.o.
271 * gdbreplay.c: Include "common-defs.h" instead of the two
272 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
273 string.h or alloca.h.
274 (perror_with_name): Delete.
275 (remote_open): Use xstrdup instead of strdup.
276 (main): Rename to ...
277 (captured_main): ... this.
280 2018-06-08 Tom Tromey <tom@tromey.com>
282 * linux-low.c (linux_low_read_btrace): Update.
284 2018-06-04 Stan Cox <scox@redhat.com>
286 * server.h (struct client_state): New.
287 * server.c (cont_thread, general_thread, multi_process)
288 (report_fork_events, report_vfork_events, report_exec_events)
289 (report_thread_events, swbreak_feature, hwbreak_feature)
290 (vCont_supported, disable_randomization, pass_signals)
291 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
292 Moved to client_state.
293 * remote-utils.c (remote_debug, noack_mode)
294 (transport_is_reliable): Moved to client_state.
295 * tracepoint.c (current_traceframe): Moved to client_state.
298 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
299 linux-low.c, remote-utils.h, target.c: Use client_state.
301 2018-05-31 Alan Hayward <alan.hayward@arm.com>
303 * configure.srv: Add new c/h file.
305 2018-05-31 Alan Hayward <alan.hayward@arm.com>
307 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
310 2018-05-25 Maciej W. Rozycki <macro@mips.com>
312 * gdb.arch/mips-fpregset-core.exp: New test.
313 * gdb.arch/mips-fpregset-core.c: New test source.
315 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
318 * hostio.c (require_int): Do not report overflow for integers
319 between 0xfffffff and 0x7fffffff.
321 2018-05-22 Maciej W. Rozycki <macro@mips.com>
323 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
324 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
325 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
327 (the_low_target): Wire them.
329 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
331 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
332 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
333 mode. Call collect_register_by_name with vscr using
334 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
335 (ppc_store_vrregset): Add and set vscr_offset variable as in
336 ppc_fill_vrregset. Call supply_register_by_name with vscr using
339 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
341 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
342 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
343 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
345 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
347 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
348 (ppc_store_vsxregset): Likewise.
349 (ppc_fill_vrregset): Likewise.
350 (ppc_store_vrregset): Likewise.
351 (ppc_fill_evrregset): Likewise.
352 (ppc_store_evrregset): Likewise.
353 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
354 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
357 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
359 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
360 wordsize of the inferior. Call ppc_linux_target_wordsize.
362 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
364 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
365 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
366 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
367 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
368 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
369 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
370 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
371 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
372 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
373 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
374 (tdesc_powerpc_e500l): Remove.
375 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
376 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
377 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
378 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
380 (ppc_arch_setup): Remove target description matching code. Fill a
381 ppc_linux_features struct and call ppc_linux_match_description
384 2018-05-22 Maciej W. Rozycki <macro@mips.com>
386 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
387 width of the requested register exceeds the width of the
389 (mips_cannot_store_register): Likewise.
391 2018-05-21 Maciej W. Rozycki <macro@mips.com>
393 * linux-mips-low.c (mips_fetch_register): New function. Update
395 (mips_store_gregset): Supply 0 rather than $restart for $zero.
396 (the_low_target): Wire `mips_fetch_register'.
398 2018-05-10 Joel Brobecker <brobecker@adacore.com>
400 * lynx-i386-low.c (LYNXOS_178): New macro.
401 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
402 the layout on LynxOS-178.
403 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
404 handle floating point registers that are not supported by
407 2018-05-10 Tom Tromey <tom@tromey.com>
409 * configure: Rebuild.
411 2018-05-10 Joel Brobecker <brobecker@adacore.com>
414 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
415 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
416 Use it to set the expedite_regs field in the given tdesc.
417 * x86-tdesc.h: New file.
418 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
419 Adjust following the addition of the new expedite_regs parameter
421 * linux-tic6x-low.c (tic6x_read_description): Likewise.
422 * linux-x86-tdesc.c: #include "x86-tdesc.h".
423 (i386_linux_read_description, amd64_linux_read_description):
424 Adjust following the addition of the new expedite_regs parameter
426 * lynx-i386-low.c: #include "x86-tdesc.h".
427 (lynx_i386_arch_setup): Adjust following the addition of the new
428 expedite_regs parameter to init_target_desc.
429 * nto-x86-low.c: #include "x86-tdesc.h".
430 (nto_x86_arch_setup): Adjust following the addition of the new
431 expedite_regs parameter to init_target_desc.
432 * win32-i386-low.c: #include "x86-tdesc.h".
433 (i386_arch_setup): Adjust following the addition of the new
434 expedite_regs parameter to init_target_desc.
436 2018-05-10 Joel Brobecker <brobecker@adacore.com>
439 * win32-low.c (win32_create_inferior): Add call to my_wait
440 setting last_status global.
442 2018-05-10 Joel Brobecker <brobecker@adacore.com>
445 * win32-low.c (create_process): Only call gdb_tilde_expand if
446 inferior_cwd is not NULL.
448 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
450 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
451 registers to the cache if their values have changed.
452 (i387_xsave_to_cache): Provide default values for x87 control
453 registers when these features are available, but disabled.
454 * regcache.c (supply_register_by_name_zeroed): New function.
455 * regcache.h (supply_register_by_name_zeroed): Declare new
458 2018-05-07 Tom Tromey <tom@tromey.com>
460 * configure: Rebuild.
462 2018-05-04 Tom Tromey <tom@tromey.com>
464 * configure: Rebuild.
466 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
467 Pedro Alves <palves@redhat.com>
469 * linux-aarch64-low.c (aarch64_stopped_data_address):
472 2018-04-27 Tom Tromey <tom@tromey.com>
474 * configure: Rebuild.
476 2018-04-23 Tom Tromey <tom@tromey.com>
478 * configure: Rebuild.
480 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
482 * Makefile.in (depcomp): Add "..".
483 (all_deps_files): New and use it.
485 2018-04-18 Alan Hayward <alan.hayward@arm.com>
487 * configure.srv (aarch64*-*-linux*): Don't include xml.
488 (i[34567]86-*-cygwin*): Likewise.
489 (i[34567]86-*-linux*): Likewise.
490 (i[34567]86-*-lynxos*): Likewise.
491 (i[34567]86-*-mingw32ce*): Likewise.
492 (i[34567]86-*-mingw*): Likewise.
493 (i[34567]86-*-nto*): Likewise.
494 (tic6x-*-uclinux): Likewise.
495 (x86_64-*-linux*): Likewise.
496 (x86_64-*-mingw*): Likewise.
497 (x86_64-*-cygwin*): Likewise.
499 2018-04-18 Alan Hayward <alan.hayward@arm.com>
501 * tdesc.c: Remove xml parameter.
503 2018-04-18 Alan Hayward <alan.hayward@arm.com>
505 * server.c (get_features_xml): Remove cast.
506 * tdesc.c (void target_desc::accept): Fill in function.
507 (tdesc_get_features_xml): Remove old xml creation.
508 (print_xml_feature::visit_pre): Add xml vistor.
509 * tdesc.h (struct target_desc): Make xmltarget mutable.
510 (tdesc_get_features_xml): Remove declaration.
512 2018-04-18 Alan Hayward <alan.hayward@arm.com>
514 * tdesc.c (tdesc_architecture_name): Add new function.
515 (tdesc_osabi_name): Likewise.
516 (tdesc_get_features_xml): Use new functions.
518 2018-04-18 Alan Hayward <alan.hayward@arm.com>
520 * tdesc.c (tdesc_create_flags): Remove.
521 (tdesc_add_flag): Likewise.
522 (tdesc_named_type): Likewise.
523 (tdesc_create_union): Likewise.
524 (tdesc_create_struct): Likewise.
525 (tdesc_create_vector): Likewise.
526 (tdesc_add_bitfield): Likewise.
527 (tdesc_add_field): Likewise.
528 (tdesc_set_struct_size): Likewise.
530 2018-04-18 Alan Hayward <alan.hayward@arm.com>
532 * tdesc.c (~target_desc): Remove implictly deleted items.
533 (init_target_desc): Iterate all features.
534 (tdesc_get_features_xml): Use vector.
535 (tdesc_create_feature): Create feature.
536 * tdesc.h (tdesc_feature) Remove
537 (target_desc): Add features.
539 2018-04-18 Alan Hayward <alan.hayward@arm.com>
541 * Makefile.in: Add common/tdesc.c
542 * tdesc.c (init_target_desc): init all reg_defs from register
544 (tdesc_create_reg): Create tdesc_reg.
545 * tdesc.h (tdesc_feature): Add register vector.
547 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
549 * tdesc.h (struct target_desc) <features>: Change type to
550 std::vector<std::string>.
551 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
553 (tdesc_get_features_xml): Likewise.
554 (tdesc_create_feature): Likewise.
556 2018-03-26 Alan Hayward <alan.hayward@arm.com>
558 * regcache.c (find_register_by_number): Return a ref.
559 (find_regno): Use references.
560 (register_size): Likewise.
561 (register_data): Likewise.
562 * tdesc.c (target_desc::~target_desc): Remove free calls.
563 (target_desc::operator==): Use std::vector compare.
564 (init_target_desc): Use reference.
565 (tdesc_create_reg): Use reg constructors.
566 * tdesc.h (struct target_desc): Replace pointer with object.
568 2018-03-23 Alan Hayward <alan.hayward@arm.com>
570 * regcache.c (find_register_by_number): Make static.
571 (find_regno): Use find_register_by_number
572 * regcache.h (struct reg): Remove declaration.
574 2018-03-23 Alan Hayward <alan.hayward@arm.com>
576 * tdesc.c (target_desc::~target_desc): Move to here.
577 (target_desc::operator==): Likewise.
578 * tdesc.h (target_desc::~target_desc): Move from here.
579 (target_desc::operator==): Likewise.
581 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
583 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
585 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
587 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
589 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
590 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
591 and init_registers_s390_gs_linux64.
593 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
595 * linux-s390-low.c (s390_fill_gs): Remove function.
596 (s390_fill_gsbc): Remove function.
597 (s390_regsets): Set fill functions for the guarded storage regsets
600 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
602 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
603 the word size. Add comment.
604 (s390_get_wordsize): New function.
605 (s390_arch_setup): No longer select a temporary tdesc to fetch the
606 pswm with it. Instead, use s390_get_wordsize to determine the
607 word size first and derive the correct tdesc from that directly.
609 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
611 * Makefile.in: Include silent-rules.mk.
612 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
613 (COMPILE): Add ECHO_CXX.
614 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
615 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
616 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
617 (version-generated.c): Add ECHO_GEN.
618 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
619 (IPAGENT_COMPILE): Add ECHO_CXX.
620 (%-generated.c): Add ECHO_REGDAT.
622 2018-03-14 Tom Tromey <tom@tromey.com>
625 * ax.c (ax_printf): Special case for NULL.
627 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
629 * linux-low.c (linux_qxfer_libraries_svr4): Use
630 xml_escape_text_append.
632 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
634 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
636 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
638 * server.c (handle_general_set): Remove unnecessary xstrdup.
640 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
642 * server.c (parse_debug_format_options): Adjust to
643 delim_string_to_char_ptr_vec changes.
644 * thread-db.c (thread_db_load_search): Adjust to
645 dirnames_to_char_ptr_vec changes.
647 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
649 * target.h (target_enable_btrace, target_disable_btrace)
650 (target_read_btrace, target_read_btrace_conf): Turn macro into
651 inline function. Throw error if target method is not defined.
652 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
653 check for btrace target method. Be prepared to handle exceptions
654 from btrace target methods.
656 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
658 * server.c (captured_main): Change order of error message printed
659 when the current working directory cannot be found.
661 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
663 * server.c: Include "filenames.h" and "pathstuff.h".
664 (program_name): Delete variable.
665 (program_path): New anonymous class.
666 (get_exec_wrapper): Use "program_path" instead of
668 (handle_v_run): Likewise.
669 (captured_main): Likewise.
670 (process_serial_event): Likewise.
672 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
674 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
675 (OBJS): Add "pathstuff.o".
676 * server.c (current_directory): New global variable.
677 (captured_main): Initialize "current_directory".
679 2018-02-26 Alan Hayward <alan.hayward@arm.com>
681 * tdesc.c: Use common/tdesc.h.
684 2018-02-20 Alan Hayward <alan.hayward@arm.com>
685 Simon Marchi <simon.marchi@ericsson.com>
687 * Makefile.in: Switch order of make rules.
689 2018-02-19 Alan Hayward <alan.hayward@arm.com>
691 * Makefile.in: Add common directory in build.
692 * configure.ac: Add common reference.
693 * configure: Regenerate.
695 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
697 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
698 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
699 * spu-low.c (spu_target_ops): Likewise.
700 * win32-low.c (win32_target_ops): Likewise.
701 * server.c (supported_btrace_packets): Report packets unconditionally.
702 * target.h (target_ops) <supports_btrace>: Remove.
703 (target_supports_btrace): Remove.
705 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
707 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
708 (handle_btrace_disable): Change return type to void. Use exceptions
710 (handle_btrace_general_set): Catch exception and copy message to
713 2018-02-08 Tom Tromey <tom@tromey.com>
715 * linux-low.c (install_software_single_step_breakpoints): Use
717 * inferiors.c (make_cleanup_restore_current_thread): Remove.
718 (do_restore_current_thread_cleanup): Remove.
719 * gdbthread.h (make_cleanup_restore_current_thread): Don't
722 2018-02-08 Tom Tromey <tom@tromey.com>
724 * mem-break.c (set_raw_breakpoint_at): Use
725 gdb::unique_xmalloc_ptr.
727 2018-01-30 Pedro Alves <palves@redhat.com>
730 * target.c (target_terminal::terminal_state): Rename to ...
731 (target_terminal::m_terminal_state): ... this.
733 2018-01-19 James Clarke <jrtc27@jrtc27.com>
735 * linux-low.c (handle_extended_wait): Surround call to
736 thread_db_notice_clone with #ifdef USE_THREAD_DB.
738 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
740 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
741 linux_ptrace_attach_fail_reason_string now returning an
743 (linux_attach): Likewise.
744 * thread-db.c (attach_thread): Likewise.
746 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
749 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
750 checking for fs_base/gs_base fields in struct user_regs_struct.
751 * configure: Regenerate.
753 2018-01-16 Yao Qi <yao.qi@linaro.org>
756 * linux-low.c (fetch_register): Call supply_register instead of
759 2018-01-08 Yao Qi <yao.qi@linaro.org>
760 Simon Marchi <simon.marchi@ericsson.com>
762 * Makefile.in (OBS): Remove selftest.o.
763 * configure.ac: Set srv_selftest_objs if $development is true.
764 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
765 * configure: Re-generated.
766 * server.c (captured_main): Wrap variable selftest_filter with
769 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
771 * server.c (parse_debug_format_options): Return std::string.
772 (handle_monitor_command, captured_main): Adjust.
774 2018-01-05 Pedro Alves <palves@redhat.com>
777 * server.c (captured_main): Pass quiet=false to
778 save_original_signals_state.
780 2018-01-01 Joel Brobecker <brobecker@adacore.com>
782 * gdbreplay.c (gdbreplay_version): Update copyright year in
784 * server.c (gdbserver_version): Likewise.
786 2017-12-08 Tom Tromey <tom@tromey.com>
788 * ax.c (ax_printf): Update.
790 2017-12-07 Yao Qi <yao.qi@linaro.org>
792 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
793 aarch64_linux_read_description.
794 * linux-amd64-ipa.c (idx2mask): New array.
795 (get_ipa_tdesc): Move idx2mask out.
796 (initialize_low_tracepoint): Initialize target descriptions.
797 * linux-i386-ipa.c (idx2mask): New array.
798 (get_ipa_tdesc): Move idx2mask out.
799 (initialize_low_tracepoint): Initialize target descriptions.
801 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
803 * tdesc.c (struct tdesc_type): Change return type.
804 (tdesc_add_flag): Change parameter type.
805 (tdesc_add_bitfield): Likewise.
806 (tdesc_add_field): Likewise.
807 (tdesc_set_struct_size): Likewise.
809 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
811 * regcache.c (registers_to_string): Remove unused variable.
813 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
815 * inferiors.c (for_each_inferior_with_data): Remove.
816 * inferiors.h (for_each_inferior_with_data): Remove.
817 * server.c (handle_qxfer_threads_worker): Change parameter type.
818 (handle_qxfer_threads_proper): Use for_each_thread.
820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
822 * inferiors.c (for_each_inferior): Remove.
823 (clear_inferiors): Use for_each_thread.
824 * inferiors.h (for_each_inferior): Remove.
825 * linux-low.c (linux_wait_for_event_filtered): Use
827 (linux_stabilize_threads): Likewise.
828 * regcache.c (regcache_release): Likewise.
829 * server.c (gdb_wants_all_threads_stopped): Likewise.
830 (clear_pending_status_callback): Remove.
831 (handle_status): Use for_each_thread.
832 (captured_main): Likewise.
833 * win32-low.c (child_init_thread_list): Likewise.
834 (win32_clear_inferiors): Likewise.
835 (fake_breakpoint_event): Likewise.
837 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
839 * inferiors.h (find_inferior): Remove.
840 * inferiors.c (find_inferior): Remove.
842 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
844 * linux-low.c (resume_status_pending_p): Update comment.
845 (need_step_over_p): Update comment.
847 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
849 * linux-low.c (proceed_one_lwp): Return void, change parameter
851 (unsuspend_and_proceed_one_lwp): Likewise.
852 (proceed_all_lwps): Use for_each_thread.
853 (unstop_all_lwps): Likewise.
855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
857 * linux-low.c (linux_resume_one_thread): Return void, take
859 (linux_resume): Use for_each_thread.
861 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
863 * linux-low.c (send_sigstop_callback): Return void, change
864 parameter type. Rename to...
865 (send_sigstop): ... this.
866 (suspend_and_send_sigstop_callback): Return void, change parameter
868 (suspend_and_send_sigstop): ... this.
869 (stop_all_lwps): Use for_each_thread.
871 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
873 * linux-low.c (lwp_running): Return bool, remove unused
875 (linux_stabilize_threads): Use find_thread.
877 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
879 * linux-low.c (select_singlestep_lwp_callback): Remove.
880 (count_events_callback): Remove.
881 (select_event_lwp_callback): Remove.
882 (select_event_lwp): Use find_thread/for_each_thread.
884 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
886 * linux-low.c (not_stopped_callback): Return bool, take filter
888 (linux_wait_for_event_filtered): Use find_thread.
889 (linux_wait_1): Likewise.
891 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
893 * linux-low.c (same_lwp): Remove.
894 (find_lwp_pid): Use find_thread.
896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
898 * linux-low.c (delete_lwp_callback): Remove.
899 (linux_mourn): Use for_each_thread.
901 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
903 * linux-low.c (linux_detach_lwp_callback): Return void, remove
904 args parameter, don't check for pid.
905 (linux_detach): Use for_each_thread.
907 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
909 * linux-low.c (struct counter): Remove.
910 (second_thread_of_pid_p): Remove.
911 (last_thread_of_process_p): Use find_thread.
913 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
915 * inferiors.c (find_inferior_in_random): Remove.
916 * inferiors.h (find_inferior_in_random): Remove.
917 * linux-low.c (status_pending_p_callback): Return bool, accept
918 parameter ptid directly.
919 (linux_wait_for_event_filtered): Use find_thread_in_random.
920 (linux_wait_1): Likewise.
922 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
924 * inferiors.c (find_inferior_id): Remove.
925 (find_thread_ptid): Move implemention from find_inferior_id to
927 * inferiors.h (find_inferior_id): Remove.
928 * server.c (handle_status): Use find_thread_ptid.
929 (process_serial_event): Likewise.
930 * thread-db.c (find_one_thread): Likewise.
931 (thread_db_thread_handle): Likewise.
932 * win32-low.c (thread_rec): Likewise.
933 (child_delete_thread): Likewise.
934 (win32_thread_alive): Likewise.
935 (get_child_debug_event): Likewise.
937 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
939 * linux-mips-low.c (update_watch_registers_callback): Return
940 void, remove pid_p parameter, don't check for pid.
941 (mips_insert_point, mips_remove_point): Use for_each_thread.
943 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
945 * lynx.low (lynx_delete_thread_callback): Remove.
946 (lynx_mourn): Use for_each_thread.
948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
950 * regcache.c (regcache_invalidate_one): Remove.
951 (regcache_invalidate_pid): use for_each_thread.
953 2017-11-26 Tom Tromey <tom@tromey.com>
955 * linux-low.c (linux_create_inferior): Update.
957 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
959 * spu-low.c (spu_create_inferior): Fix typo in argument name.
961 2017-11-24 Alan Hayward <alan.hayward@arm.com>
963 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
964 * linux-aarch64-low.c (initialize_low_arch): Call init func.
965 * linux-aarch64-tdesc-selftest.c: New file.
966 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
968 2017-11-24 Alan Hayward <alan.hayward@arm.com>
970 * configure.srv: Add new file.
971 * linux-aarch64-low.c (initialize_low_arch): Call init func.
972 * linux-aarch64-tdesc-selftest.c: New file.
973 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
975 2017-11-24 Alan Hayward <alan.hayward@arm.com>
977 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
978 * linux-aarch64-low.c (initialize_low_arch): Remove init.
979 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
981 2017-11-24 Alan Hayward <alan.hayward@arm.com>
983 * configure.srv: Add new files.
984 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
985 aarch64_linux_read_description.
986 * linux-aarch64-low.c (aarch64_linux_read_description):
987 Merge with aarch64_arch_setup.
988 (aarch64_arch_setup): Call aarch64_linux_read_description.
989 * linux-aarch64-tdesc.c: New file.
990 * linux-aarch64-tdesc.h: New file.
992 2017-11-24 Yao Qi <yao.qi@linaro.org>
994 * configure.srv: Set $srv_regobj for tic6x-linux.
995 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
996 (tic6x_read_description): Move some code to tic6x_arch_setup.
997 (tic6x_tdesc_test): New function.
998 (initialize_low_arch): Call selftests::register_test.
1000 2017-11-22 Yao Qi <yao.qi@linaro.org>
1002 * remote-utils.c (prepare_resume_reply): Use memcpy.
1004 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1006 * linux-low.c (kill_one_lwp_callback): Return void, take
1007 argument directly, don't filter on pid.
1008 (linux_kill): Use for_each_thread.
1010 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1012 * linux-low.c (need_step_over_p): Return bool, remove dummy
1014 (linux_resume, proceed_all_lwps): Use find_thread.
1016 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1018 * linux-low.c (resume_status_pending_p): Return bool, remove
1020 (linux_resume): Use find_thread.
1022 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1024 * linux-low.c (struct thread_resume_array): Remove.
1025 (linux_set_resume_request): Return void, take arguments
1027 (linux_resume): Use for_each_thread.
1029 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1031 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1032 return bool, remove data argument.
1033 (linux_stabilize_threads): Use find_thread.
1035 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1037 * linux-low.c (unsuspend_one_lwp): Remove.
1038 (unsuspend_all_lwps): Use for_each_thread, inline code from
1041 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1043 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1044 * linux-low.c (struct iterate_over_lwps_args): Remove.
1045 (iterate_over_lwps_filter): Remove.
1046 (iterate_over_lwps): Use find_thread.
1048 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1050 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1051 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1052 code from reset_lwp_ptrace_options_callback.
1054 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1056 * linux-arm-low.c (struct update_registers_data): Remove.
1057 (update_registers_callback): Return void, take arguments
1058 directly, don't check thread's pid.
1059 (arm_insert_point, arm_remove_point): Use for_each_thread.
1061 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1063 * win32-low.c (continue_one_thread): Return void, take argument
1065 (child_continue): Use for_each_thread.
1067 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1069 * win32-i386-low.c (update_debug_registers_callback): Rename
1071 (update_debug_registers): ... this, return void, remove pid_p arg.
1072 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1074 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1076 * inferiors.h (struct process_info): Add constructor, initialize
1078 <syscalls_to_catch>: Change type to std::vector<int>.
1079 * inferiors.c (add_process): Allocate process_info with new.
1080 (remove_process): Free process_info with delete.
1081 * linux-low.c (handle_extended_wait): Adjust.
1082 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1083 * server.c (handle_general_set): Adjust.
1085 2017-11-16 Pedro Alves <palves@redhat.com>
1087 * remote-utils.c (remote_close): Block SIGIO signals instead of
1088 uninstalling the SIGIO handler.
1090 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1092 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1094 2017-11-16 Yao Qi <yao.qi@linaro.org>
1096 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1097 (tic6x_store_gregset): Likewise.
1098 (tic6x_usrregs_info): Move it up.
1100 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1102 * Makefile.in: Update arch rules.
1103 * configure.srv: Explicitly mark arch/ files.
1105 2017-11-13 Andreas Schwab <schwab@suse.de>
1107 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1109 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1111 2017-11-06 Pedro Alves <palves@redhat.com>
1113 * config.in, configure: Regenerate.
1115 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1117 * target.c (struct thread_search): Remove.
1118 (thread_search_callback): Remove.
1119 (prepare_to_access_memory): Use for_each_thread instead of
1120 find_inferior. Inline code from thread_search_callback.
1122 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1124 * server.c (struct visit_actioned_threads_data): Remove.
1125 (visit_actioned_threads): Change prototype to take arguments
1127 (resume): Use find_thread instead of find_inferior.
1129 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1131 * server.c (queue_stop_reply_callback): Change prototype, return
1133 (find_status_pending_thread_callback): Remove.
1134 (handle_status): Replace find_inferior with find_thread and
1137 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1139 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1141 (aarch64_store_gregset): Likewise.
1142 (aarch64_fill_fpregset): Likewise.
1143 (aarch64_store_fpregset): Likewise.
1145 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1147 * gdbthread.h (find_thread, for_each_thread): New functions.
1148 * inferiors.c (thread_of_pid): Remove.
1149 (find_any_thread_of_pid): Use find_thread.
1150 * linux-low.c (num_lwps): Use for_each_thread.
1152 2017-10-17 Yao Qi <yao.qi@linaro.org>
1154 * Makefile.in: Remove one rule.
1155 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1157 2017-10-17 Yao Qi <yao.qi@linaro.org>
1159 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1160 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1162 2017-10-17 Yao Qi <yao.qi@linaro.org>
1164 * configure.srv: Rename arm.o with arch/arm.o.
1166 2017-10-17 Yao Qi <yao.qi@linaro.org>
1168 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1169 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1170 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1171 (arch-i386.o, arch-amd64.o): Remove rules.
1172 (arch/%.o): New rule.
1173 Update POSTCOMPILE and COMPILE.pre.
1174 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1175 * configure: Re-generated.
1176 * configure.srv: Replace arch-i386.o with arch/i386.o.
1177 Replace arch-amd64.o with arch/amd64.o.
1179 2017-10-16 Yao Qi <yao.qi@linaro.org>
1181 * configure: Regenerated.
1183 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1185 * inferiors.h: (struct inferior_list): Remove.
1186 (struct inferior_list_entry); Remove.
1187 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1188 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1189 get_first_inferior): Remove.
1190 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1191 find_inferior_id, find_inferior_in_random): Change signature.
1192 * inferiors.c (all_threads): Change type to
1193 std::list<thread_info *>.
1194 (get_thread): Remove macro.
1195 (find_inferior, find_inferior_id): Change signature, implement
1197 (find_inferior_in_random): Change signature, implement using
1198 find_thread_in_random.
1199 (for_each_inferior, for_each_inferior_with_data): Change
1200 signature, implement using for_each_thread.
1201 (add_inferior_to_list, remove_inferior): Remove.
1202 (add_thread, get_first_thread, thread_of_pid,
1203 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1204 (get_first_inferior, one_inferior_p, clear_inferior_list):
1206 (clear_inferiors, get_thread_process): Update.
1207 * gdbthread.h: Include <list>.
1208 (struct thread_info) <entry>: Remove field.
1210 (all_threads): Change type to std::list<thread_info *>.
1211 (get_first_inferior): Add doc.
1212 (find_thread, for_each_thread, find_thread_in_random): New
1214 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1215 * linux-arm-low.c (update_registers_callback): Update.
1216 * linux-low.c (second_thread_of_pid_p): Update.
1217 (kill_one_lwp_callback, linux_detach_lwp_callback,
1218 delete_lwp_callback, status_pending_p_callback, same_lwp,
1219 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1220 iterate_over_lwps, not_stopped_callback,
1221 resume_stopped_resumed_lwps, count_events_callback,
1222 select_singlestep_lwp_callback, select_event_lwp_callback,
1223 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1224 suspend_and_send_sigstop_callback, wait_for_sigstop,
1225 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1226 lwp_running, linux_set_resume_request, resume_status_pending_p,
1227 need_step_over_p, start_step_over, linux_resume_one_thread,
1228 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1229 reset_lwp_ptrace_options_callback): Update.
1230 * linux-mips-low.c (update_watch_registers_callback): Update.
1231 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1233 (free_register_cache_thread_one): Remove.
1234 (regcache_release): Update.
1235 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1236 handle_qxfer_threads_worker): Update.
1237 (handle_query): Update, use list iterator.
1238 (visit_actioned_threads, handle_pending_status,
1239 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1240 clear_pending_status_callback, set_pending_status_callback,
1241 find_status_pending_thread_callback, handle_status,
1242 process_serial_event): Update.
1243 * target.c (thread_search_callback): Update.
1244 * thread-db.c (thread_db_get_tls_address): Update.
1245 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1247 * win32-i386-low.c (update_debug_registers_callback): Update.
1248 * win32-low.c (delete_thread_info, child_delete_thread,
1249 continue_one_thread, suspend_one_thread,
1250 get_child_debug_event): Adjust.
1252 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1254 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1255 * inferiors.h: Include <list>.
1256 (struct process_info) <entry>: Remove field.
1258 (pid_of): Change macro to function.
1259 (ptid_of, lwpid_of): Remove macro.
1260 (all_processes): Change type to std::list<process_info *>.
1261 (ALL_PROCESSES): Remove macro.
1262 (for_each_process, find_process): New function.
1263 * inferiors.c (all_processes): Change type to
1264 std::list<process_info *>.
1265 (find_thread_process): Adjust.
1266 (add_process): Likewise.
1267 (remove_process): Likewise.
1268 (find_process_pid): Likewise.
1269 (get_first_process): Likewise.
1270 (started_inferior_callback): Remove.
1271 (have_started_inferiors_p): Adjust.
1272 (attached_inferior_callback): Remove.
1273 (have_attached_inferiors_p): Adjust.
1274 * linux-low.c (check_zombie_leaders): Likewise.
1275 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1276 (x86_linux_update_xmltarget): Adjust.
1277 * server.c (handle_query): Likewise.
1278 (gdb_reattached_process): Remove.
1279 (handle_status): Adjust.
1280 (kill_inferior_callback): Likewise.
1281 (detach_or_kill_inferior): Remove.
1282 (print_started_pid): Likewise.
1283 (print_attached_pid): Likewise.
1284 (detach_or_kill_for_exit): Update.
1285 (process_serial_event): Likewise.
1286 * linux-arm-low.c (arm_new_fork): Likewise.
1288 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1290 * dll.h: Include <list>.
1291 (struct dll_info): Add constructor.
1292 <entry>: Remove field.
1293 (all_dlls): Change type to std::list<dll_info>.
1294 * dll.c: Include <algorithm>.
1295 (get_dll): Remove macro.
1296 (all_dlls): Change type to std::list<dll_info *>.
1297 (free_one_dll): Remove.
1298 (match_dll): Likewise.
1299 (loaded_dll): Adjust.
1300 (unloaded_dll): Adjust to all_dlls type change, use
1301 std::find_if. Inline code from match_dll.
1302 (clear_dlls): Adjust to all_dlls type change.
1303 * server.c (emit_dll_description): Remove.
1304 (handle_qxfer_libraries): Adjust to all_dlls type change,
1305 integrate emit_dll_description's functionality.
1307 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1309 * linux-low.h (struct linux_target_ops) <delete_process>: New
1311 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1312 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1313 (struct linux_target_ops): Add delete_process callback.
1314 * linux-arm-low.c (arm_delete_process): New.
1315 (struct linux_target_ops): Add delete_process callback.
1316 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1317 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1318 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1319 * linux-mips-low.c (mips_linux_delete_process): New.
1320 (struct linux_target_ops): Add delete_process callback.
1321 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1322 * linux-s390-low.c (struct linux_target_ops): Likewise.
1323 * linux-sh-low.c (struct linux_target_ops): Likewise.
1324 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1325 * linux-tile-low.c (struct linux_target_ops): Likewise.
1326 * linux-x86-low.c (x86_linux_delete_process): New.
1327 (struct linux_target_ops): Add delete_process callback.
1328 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1330 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1332 * linux-aarch64-low.c (the_low_target): Add thread delete
1334 * linux-arm-low.c (arm_delete_thread): New function.
1335 (the_low_target): Add thread delete callback.
1336 * linux-bfin-low.c (the_low_target): Likewise.
1337 * linux-crisv32-low.c (the_low_target): Likewise.
1338 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1340 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1342 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1343 * linux-mips-low.c (mips_linux_delete_thread): New function.
1344 (the_low_target): Add thread delete callback.
1345 * linux-ppc-low.c (the_low_target): Likewise.
1346 * linux-s390-low.c (the_low_target): Likewise.
1347 * linux-sh-low.c (the_low_target): Likewise.
1348 * linux-tic6x-low.c (the_low_target): Likewise.
1349 * linux-tile-low.c (the_low_target): Likewise.
1350 * linux-x86-low.c (the_low_target): Likewise.
1351 * linux-xtensa-low.c (the_low_target): Likewise.
1353 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1355 * win32-low.c: Include "common-inferior.h".
1357 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1359 * inferiors.c (set_inferior_cwd): New function.
1360 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1361 (handle_query): Inform that QSetWorkingDir is supported.
1362 * win32-low.c (create_process): Pass the inferior's cwd to
1365 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1367 * inferiors.c (current_inferior_cwd): New global variable.
1368 (get_inferior_cwd): New function.
1369 * inferiors.h (struct process_info) <cwd>: New field.
1371 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1373 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1374 (OBS): Add gdb_tilde_expand.o.
1376 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1378 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1379 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1381 2017-09-29 Pedro Alves <palves@redhat.com>
1383 * ax.c (gdb_parse_agent_expr): Constify.
1384 * ax.h (gdb_parse_agent_expr): Constify.
1385 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1387 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1388 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1389 * remote-utils.h (read_ptid): Constify.
1390 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1391 (process_point_options, process_serial_event): Constify.
1392 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1393 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1394 (cmd_qtbuffer): Constify.
1396 2017-09-29 Pedro Alves <palves@redhat.com>
1398 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1401 2017-09-29 Pedro Alves <palves@redhat.com>
1403 * linux-low.c (handle_extended_wait): Pass parent thread instead
1404 of process to thread_db_notice_clone.
1405 * linux-low.h (thread_db_notice_clone): Replace parent process
1406 parameter with parent thread parameter.
1407 * thread-db.c (find_one_thread): Add comment.
1408 (thread_db_notice_clone): Replace parent process parameter with
1409 parent thread parameter. Temporarily switch to the parent thread.
1411 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1413 * gdbthread.h: Include "common-gdbthread.h".
1414 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1415 "if" when validating the ptid.
1416 * remote-utils.c: Include "gdbthread.h".
1417 (prepare_resume_reply): Use "switch_to_thread".
1418 * target.c (done_accessing_memory): Likewise.
1420 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1422 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1423 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1424 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1425 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1426 s390x-gs-linux64-ipa.o to ipa_obj.
1427 * linux-s390-low.c (HWCAP_S390_GS): New define.
1428 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1430 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1431 (s390_arch_setup): Check for guarded-storage support and choose
1433 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1434 init_registers_s390x_gs_linux64.
1435 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1437 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1438 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1440 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1442 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1444 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1446 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1447 (thread_db_thread_handle): Declare.
1448 * linux-low.c (linux_target_ops): Initialize thread_handle.
1449 * server.c (handle_qxfer_threads_worker): Add support for
1451 * target.h (struct target_ops): Add new function pointer,
1453 (target_thread_handle): Define.
1454 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1456 (thread_db_thread_handle): New function.
1458 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1460 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1461 * linux-low.h (thread_db_notice_clone): Declare.
1462 * thread-db.c (thread_db_notice_clone): New function.
1464 2017-09-21 Pedro Alves <palves@redhat.com>
1466 * server.c (gdb_read_memory, handle_status, process_serial_event)
1467 (handle_serial_event, handle_target_event): Adjust to
1468 set_desired_thread prototype change.
1469 * target.c (set_desired_thread): Remove 'use_general' parameter
1471 * target.h (set_desired_thread): Remove 'use_general' parameter.
1473 2017-09-20 Tom Tromey <tom@tromey.com>
1475 * target.c (target_terminal::terminal_state): Define.
1476 (target_terminal::init): Rename from target_terminal_init.
1477 (target_terminal::inferior): Rename from
1478 target_terminal_inferior.
1479 (target_terminal::ours): Rename from target_terminal_ours.
1480 (target_terminal::ours_for_output, target_terminal::info): New.
1482 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1484 * server.c (accumulate_file_name_length): Remove.
1485 (emit_dll_description): Adjust to std::string change.
1486 (handle_qxfer_libraries): Use std::string to hold document.
1488 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1490 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1491 return type of xml_escape_text.
1492 * server.c (emit_dll_description): Likewise.
1494 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1496 * server.c (captured_main): Accept argument for --selftest.
1497 Update run_tests call.
1498 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1499 when registering selftests.
1501 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1503 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1504 instead of "VEC" for "target_desc.reg_defs".
1505 (regcache_cpy): Likewise.
1506 (registers_to_string): Likewise.
1507 (registers_from_string): Likewise.
1508 (find_regno): Likewise.
1509 (supply_regblock): Likewise.
1510 (regcache_raw_read_unsigned): Likewise.
1511 * tdesc.c (init_target_desc): Likewise.
1512 (tdesc_create_reg): Likewise.
1513 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1514 (struct target_desc) <reg_defs>: Convert to "std::vector".
1515 (target_desc): Do not initialize "reg_defs".
1516 (~target_desc): Update code to use "std::vector" instead of "VEC"
1517 for "target_desc.reg_defs".
1518 (operator==): Likewise.
1520 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1522 * inferiors.h (thread_to_gdb_id): Remove.
1523 * inferiors.c (thread_to_gdb_id): Remove.
1524 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1525 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1526 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1528 * nto-low.c (nto_fetch_registers, nto_store_registers,
1529 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1531 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1533 * inferiors.h (gdb_id_to_thread_id): Remove.
1534 * inferiors.c (gdb_id_to_thread_id): Remove.
1535 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1536 removal. Move pid declaration closer to where it's used.
1538 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1540 * server.c (handle_detach): New function.
1541 (process_serial_event): Move code out, call handle_detach.
1543 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1545 * server.c (require_running): Rename to ...
1546 (require_running_or_return): ... this ...
1547 (require_running_or_break): ... and this.
1548 (handle_query, process_serial_event): Adjust.
1550 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1552 * linux-low.c (linux_set_resume_request): Remove unused
1555 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1557 * server.c (first_thread_of): Remove.
1558 (process_serial_event): Replace usage of first_thread_of with
1559 find_any_thread_of_pid.
1560 * tracepoint.c (same_process_p): Remove.
1561 (gdb_agent_about_to_close): Replace usage of same_process_p with
1562 find_any_thread_of_pid.
1563 * linux-x86-low.c (same_process_callback): Remove.
1564 (x86_arch_setup_process_callback): Replace usage of
1565 same_process_callback with find_any_thread_of_pid.
1566 * thread-db.c (any_thread_of): Remove.
1567 (switch_to_process): Replace usage of any_thread_of with
1568 find_any_thread_of_pid.
1569 * inferiors.c (thread_pid_matches_callback): Remove.
1570 (find_thread_process): Adjust to use find_any_thread_of_pid.
1572 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1574 * regcache.c (get_thread_regcache): Guard calls to "memset"
1577 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1579 * linux-low.c (handle_extended_wait): Use
1580 "allocate_target_description" instead of "XNEW".
1581 * linux-x86-low.c (initialize_low_arch): Likewise.
1583 2017-09-05 Yao Qi <yao.qi@linaro.org>
1585 * configure.srv (srv_i386_regobj): Remove.
1586 (srv_amd64_regobj): Remove.
1587 (srv_regobj): Set it to "" for x86 non-linux targets.
1588 * linux-x86-tdesc.c (i386_linux_read_description):
1589 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1590 (init_registers_i386): Remove the declaration.
1591 (tdesc_i386): Remove the declaration.
1592 (lynx_i386_arch_setup): Call i386_create_target_description.
1593 * nto-x86-low.c: Likewise.
1594 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1595 [!__x86_64__]: include arch/i386.h.
1596 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1598 2017-09-05 Yao Qi <yao.qi@linaro.org>
1600 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1601 i386/amd64-XXX-linux from it.
1603 2017-09-05 Yao Qi <yao.qi@linaro.org>
1605 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1607 (ipa_amd64_linux_regobj): Remove.
1608 (ipa_x32_linux_regobj): Remove.
1610 2017-09-05 Yao Qi <yao.qi@linaro.org>
1612 * Makefile.in (arch-amd64.o): New rule.
1613 * configure.srv: Append arch-amd64.o.
1614 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1615 (get_ipa_tdesc): Call amd64_linux_read_description.
1616 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1617 and init_registers_amd64_XXX.
1618 * linux-x86-low.c (x86_linux_read_description): Call
1619 amd64_linux_read_description.
1620 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1621 (initialize_low_arch): Don't call init_registers_x32_XXX and
1622 init_registers_amd64_XXX.
1623 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1624 and tdesc_amd64_XXX.
1625 [__x86_64__] (amd64_tdesc_test): New function.
1626 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1627 and init_registers_amd64_XXX.
1628 * linux-x86-tdesc.c: Include arch/amd64.h.
1629 (xcr0_to_tdesc_idx): New function.
1630 (i386_linux_read_description): New function.
1631 (amd64_get_ipa_tdesc_idx): New function.
1632 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1633 (amd64_get_ipa_tdesc): Declare.
1635 2017-09-05 Yao Qi <yao.qi@linaro.org>
1637 * configure.srv (srv_i386_linux_xmlfiles): Remove
1638 i386/i386-XXX-linux.xml from it.
1640 2017-09-05 Yao Qi <yao.qi@linaro.org>
1642 * configure.srv: Set srv_i386_linux_regobj empty if $development
1644 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1645 initialize_low_tdesc.
1646 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1647 with #if initialize_low_tdesc.
1648 * linux-x86-tdesc-selftest.c: New file.
1649 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1651 2017-09-05 Yao Qi <yao.qi@linaro.org>
1653 * Makefile.in (arch-i386.o): New rule.
1654 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1655 (x86_64-*-linux*): Likewise.
1656 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1657 include arch/i386.h.
1658 (i386_linux_read_description): Remove code and call
1659 i386_create_target_description.
1660 * tdesc.c (allocate_target_description): New function.
1661 * tdesc.h (set_tdesc_architecture): Remove declaration.
1662 (set_tdesc_osabi): Likewise.
1664 2017-09-05 Yao Qi <yao.qi@linaro.org>
1666 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1667 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1668 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1670 * server.c (get_features_xml): Call tdesc_get_features_xml.
1671 * tdesc.c (set_tdesc_architecture): New function.
1672 (set_tdesc_osabi): New function.
1673 (tdesc_get_features_xml): New function.
1674 (tdesc_create_feature): Add an argument.
1675 * tdesc.h (struct target_desc) <features>: New field.
1676 <arch, osabi>: New field.
1677 (~target_desc): xfree features, arch, and osabi.
1678 (target_desc::oerator==): Don't compare .xmltarget.
1679 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1680 (set_tdesc_osabi): Likewise.
1681 (tdesc_get_features_xml): Likewise.
1683 2017-09-05 Yao Qi <yao.qi@linaro.org>
1685 * linux-x86-tdesc.c: Include selftest.h.
1686 (i386_tdesc_test): New function.
1687 (initialize_low_tdesc): Call selftests::register_test.
1688 * tdesc.h: Include regdef.h.
1689 (target_desc): Override operator == and !=.
1691 2017-09-05 Yao Qi <yao.qi@linaro.org>
1693 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1694 (ipa_obj): Likewise.
1695 * linux-i386-ipa.c: Include common/x86-xstate.h
1696 (get_ipa_tdesc): Call i386_linux_read_description.
1697 (initialize_low_tracepoint): Don't call init_registers_XXX
1698 functions, call initialize_low_tdesc instead.
1699 * linux-x86-low.c (x86_linux_read_description): Call
1700 i386_linux_read_description.
1701 (initialize_low_arch): Don't call init_registers_i386_XXX
1702 functions, call initialize_low_tdesc.
1703 * linux-x86-tdesc.c: New file.
1704 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1705 (i386_get_ipa_tdesc_idx): Declare.
1706 (i386_get_ipa_tdesc): Declare.
1707 (initialize_low_tdesc): Declare.
1709 2017-09-05 Yao Qi <yao.qi@linaro.org>
1711 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1714 2017-09-05 Yao Qi <yao.qi@linaro.org>
1716 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1717 * regcache.c (get_thread_regcache): Use VEC_length.
1718 (init_register_cache): Likewise.
1719 (regcache_cpy): Likewise.
1720 (registers_to_string): Iterate reg_defs via VEC_iterate.
1721 (find_regno): Likewise.
1722 (find_register_by_number): Use VEC_index.
1723 (register_size): Call find_register_by_number.
1724 (register_data): Call find_register_by_number.
1725 (supply_regblock): Use VEC_length.
1726 (regcache_raw_read_unsigned): Likewise.
1727 * tdesc.c (init_target_desc): Iterate reg_defs via
1729 (default_description): Update initializer.
1730 (copy_target_description): Don't update field num_registers.
1731 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1732 <num_registers>: Remove.
1734 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1736 * Makefile.in (.SECONDARY): Define target.
1738 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1740 * linux-low.c (linux_wait_1): Adjust.
1741 * server.c (queue_stop_reply_callback): Adjust.
1743 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1745 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1746 QEnvironmentUnset and QEnvironmentReset packets.
1747 (handle_query): Inform remote that QEnvironmentHexEncoded,
1748 QEnvironmentUnset and QEnvironmentReset are supported.
1750 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1752 * inferiors.h (inferior_target_data): Rename to ...
1753 (thread_target_data): ... this.
1754 (inferior_regcache_data): Rename to ...
1755 (thread_regcache_data): ... this.
1756 (set_inferior_regcache_data): Rename to ...
1757 (set_thread_regcache_data): ... this.
1758 * inferiors.c (inferior_target_data): Rename to ...
1759 (thread_target_data): ... this.
1760 (inferior_regcache_data): Rename to ...
1761 (thread_regcache_data): ... this.
1762 (set_inferior_regcache_data): Rename to ...
1763 (set_thread_regcache_data): ... this.
1764 (free_one_thread): Update.
1765 * linux-low.h (get_thread_lwp): Update.
1766 * regcache.c (get_thread_regcache): Update.
1767 (regcache_invalidate_thread): Update.
1768 (free_register_cache_thread): Update.
1769 * win32-i386-low.c (update_debug_registers_callback): Update.
1770 (win32_get_current_dr): Update.
1771 * win32-low.c (thread_rec): Update.
1772 (delete_thread_info): Update.
1773 (continue_one_thread): Update.
1774 (suspend_one_thread): Update.
1776 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1778 * inferiors.c (set_inferior_target_data): Remove.
1779 * inferiors.h (set_inferior_target_data): Remove.
1781 2017-08-18 Yao Qi <yao.qi@linaro.org>
1783 * Makefile.in (OBS): Add selftest.o.
1784 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1785 * configure, config.in: Re-generated.
1786 * server.c: Include common/sefltest.h.
1787 (captured_main): Handle option --selftest.
1789 2017-08-09 Yao Qi <yao.qi@linaro.org>
1791 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1792 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1793 i386-avx-mpx.o and i386-mmx.o.
1794 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1795 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1796 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1797 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1798 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1799 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1800 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1801 i386/amd64-avx-mpx.xml.
1803 2017-08-09 Yao Qi <yao.qi@linaro.org>
1805 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1806 and x32-avx-avx512.o.
1807 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1808 i386/x32-avx-avx512.xml.
1810 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1812 * tracepoint.h (enum class fast_tpoint_collect_result): New
1814 (fast_tracepoint_collecting): Change return type to
1815 fast_tpoint_collect_result.
1816 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1817 * linux-low.h: Include tracepoint.h.
1818 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1819 fast_tpoint_collect_result.
1820 * linux-low.c (handle_tracepoints): Adjust.
1821 (linux_fast_tracepoint_collecting): Change return type to
1822 fast_tpoint_collect_result.
1823 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1824 linux_wait_1, stuck_in_jump_pad_callback,
1825 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1826 proceed_one_lwp): Adjust to type change.
1828 2017-07-10 Yao Qi <yao.qi@linaro.org>
1830 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1832 2017-06-29 Yao Qi <yao.qi@linaro.org>
1834 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1836 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1838 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1840 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1842 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1844 * linux-low.c (linux_create_inferior): Adjust code to access the
1845 environment information via 'gdb_environ' class.
1846 * lynx-low.c (lynx_create_inferior): Likewise.
1847 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1848 (get_environ): Return a pointer to 'our_environ'.
1849 (captured_main): Initialize 'our_environ'.
1850 * server.h (get_environ): Adjust prototype.
1851 * spu-low.c (spu_create_inferior): Adjust code to access the
1852 environment information via 'gdb_environ' class.
1854 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1856 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1857 usage of "register" keyword.
1859 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1861 * configure: Re-generate.
1863 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1865 * configure: Re-generate.
1867 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1869 * Makefile.in (COMPILE.pre): Add "-x c++".
1871 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1873 * fork-child.c: Conditionally include <signal.h>.
1875 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1877 * server.c (handle_general_set): Handle new packet
1878 "QStartupWithShell".
1879 (handle_query): Add "QStartupWithShell" to the list of supported
1881 (gdbserver_usage): Add help text explaining the
1882 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1884 (captured_main): Recognize and act upon the presence of the new
1887 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1888 Pedro Alves <palves@redhat.com>
1890 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1891 * configure: Regenerate.
1892 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1894 (i[34567]86-*-lynxos*): Likewise.
1895 (spu*-*-*): Likewise.
1896 * fork-child.c: New file.
1897 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1899 (linux_ptrace_fun): New function.
1900 (linux_create_inferior): Adjust function prototype to reflect
1901 change on "target.h". Adjust function code to use
1903 (linux_request_interrupt): Delete "signal_pid".
1904 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1905 (lynx_ptrace_fun): New function.
1906 (lynx_create_inferior): Adjust function prototype to reflect
1907 change on "target.h". Adjust function code to use
1909 * nto-low.c (nto_create_inferior): Adjust function prototype and
1910 code to reflect change on "target.h". Update comments.
1911 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1912 "common-terminal.h" and "environ.h".
1913 (terminal_fd): Moved to fork-child.c.
1914 (old_foreground_pgrp): Likewise.
1915 (restore_old_foreground_pgrp): Likewise.
1916 (last_status): Make it global.
1917 (last_ptid): Likewise.
1918 (our_environ): New variable.
1919 (startup_with_shell): Likewise.
1920 (program_name): Likewise.
1921 (program_argv): Rename to...
1922 (program_args): ...this.
1923 (wrapper_argv): New variable.
1924 (start_inferior): Delete function.
1925 (get_exec_wrapper): New function.
1926 (get_exec_file): Likewise.
1927 (get_environ): Likewise.
1928 (prefork_hook): Likewise.
1929 (post_fork_inferior): Likewise.
1930 (postfork_hook): Likewise.
1931 (postfork_child_hook): Likewise.
1932 (handle_v_run): Update code to deal with arguments coming from the
1933 remote host. Update calls from "start_inferior" to
1935 (captured_main): Likewise. Initialize environment variable. Call
1937 * server.h (post_fork_inferior): New prototype.
1938 (get_environ): Likewise.
1939 (last_status): Declare.
1940 (last_ptid): Likewise.
1941 (signal_pid): Likewise.
1942 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1943 (spu_ptrace_fun): New function.
1944 (spu_create_inferior): Adjust function prototype to reflect change
1945 on "target.h". Adjust function code to use "fork_inferior".
1946 * target.c (target_terminal_init): New function.
1947 (target_terminal_inferior): Likewise.
1948 (target_terminal_ours): Likewise.
1949 * target.h: Include <vector>.
1950 (struct target_ops) <create_inferior>: Update prototype.
1951 (create_inferior): Update macro.
1952 * utils.c (gdb_flush_out_err): New function.
1953 * win32-low.c (win32_create_inferior): Adjust function prototype
1954 and code to reflect change on "target.h".
1956 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1958 * inferiors.c (switch_to_thread): New function.
1960 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1962 * Makefile.in (SFILE): Add "common/job-control.c".
1963 (OBS): Add "job-control.o".
1965 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1967 * Makefile: Remove "@host_makefile_frag@".
1969 2017-05-05 Pedro Alves <palves@redhat.com>
1971 * configure: Regenerate.
1973 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1975 * configure: Regenerate.
1977 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1979 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1980 software_single_step change of return type to
1981 std::vector<CORE_ADDR>.
1982 * linux-low.c (install_software_single_step_breakpoints):
1984 * linux-low.h (install_software_single_step_breakpoints):
1987 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1989 * remote-utils.c: Include "gdb_termios.h" instead of
1991 * terminal.h: Delete file.
1993 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1995 * server.c: Include <vector>.
1996 <program_argv, wrapper_argv>: Convert to std::vector.
1997 (start_inferior): Rewrite function to use C++.
1998 (handle_v_run): Likewise. Update code that calculates the argv
1999 based on the vRun packet; use C++.
2000 (captured_main): Likewise.
2002 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2004 * server.c (handle_v_cont): Initialize thread_resume::thread
2007 2017-04-05 Pedro Alves <palves@redhat.com>
2009 * configure: Regenerate.
2011 2017-04-05 Pedro Alves <palves@redhat.com>
2013 * gdbreplay.c (sync_error): Constify.
2014 * linux-x86-low.c (push_opcode): Constify.
2016 2017-04-05 Pedro Alves <palves@redhat.com>
2018 * win32-low.c (get_child_debug_event)
2019 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2020 Report TARGET_WAITKIND_SPURIOUS instead.
2022 2017-04-05 Pedro Alves <palves@redhat.com>
2024 * remote-utils.c (remote_prepare, remote_open): Constify.
2025 * remote-utils.h (remote_prepare, remote_open): Constify.
2026 * server.c (captured_main): Constify 'port' handling.
2028 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2030 * Makefile.in (clean): Clear .deps.
2032 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2034 * .gitignore: Remove generated files, replace with wildcard.
2035 * (clean): Replace removal of generated files with wildcard.
2036 (version.c): Replace with...
2037 (version-generated.c): ...this.
2038 (xml-builtin.c): Replace with...
2039 (xml-builtin-generated.c): ...this.
2040 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2041 (%.c: *regformats*): Replace with...
2042 (%-generated.c: *regformats*): ...this.
2044 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2046 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2047 (xtensa_fill_gregset): Call collect_register_by_name for
2049 (xtensa_store_gregset): Call supply_register_by_name for
2052 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2054 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2055 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2056 (xtensa_store_gregset): Call supply_register for all registers in
2057 a0_regnum..a0_regnum + C0_NREGS range.
2059 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2061 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2062 (ax-ipa.o: ax.c): Remove.
2063 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2064 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2065 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2066 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2067 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2069 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2071 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2072 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2073 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2074 (errors-ipa.o: ../common/errors.c): Remove.
2075 (format-ipa.o: ../common/format.c): Remove.
2076 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2078 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2080 * Makefile.in (%-ipa.o: %.c): New rule.
2081 (tracepoint-ipa.o: tracepoint.c): Remove.
2082 (utils-ipa.o: utils.c): Remove.
2083 (remote-utils-ipa.o: remote-utils.c): Remove.
2084 (regcache-ipa.o: regcache.c): Remove.
2085 (i386-linux-ipa.o: i386-linux.c): Remove.
2086 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2087 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2088 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2089 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2090 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2091 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2092 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2093 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2094 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2095 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2096 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2097 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2098 (aarch64-ipa.o: aarch64.c): Remove.
2099 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2100 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2101 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2102 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2103 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2104 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2105 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2106 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2107 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2108 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2109 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2110 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2111 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2112 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2113 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2114 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2115 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2116 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2117 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2118 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2119 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2120 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2121 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2122 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2123 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2124 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2125 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2126 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2127 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2128 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2129 (tdesc-ipa.o: tdesc.c): Remove.
2130 (x32-linux-ipa.o: x32-linux.c): Remove.
2131 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2132 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2136 * Makefile.in (%.o: ../arch/%.c): New rule.
2137 (arm.o: ../arch/arm.c): Remove.
2138 (arm-linux.o: ../arch/arm-linux.c): Remove.
2139 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2140 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2142 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2144 * Makefile.in (%.o: ../nat/%.c): New rule.
2145 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2146 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2147 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2148 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2149 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2150 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2151 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2152 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2153 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2154 (linux-personality.o: ../nat/linux-personality.c): Remove.
2155 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2156 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2157 (x86-linux.o: ../nat/x86-linux.c): Remove.
2158 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2159 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2161 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2163 * Makefile.in (%.o: ../common/%.c): New rule.
2164 (signals.o: ../common/signals.c): Remove.
2165 (print-utils.o: ../common/print-utils.c): Remove.
2166 (rsp-low.o: ../common/rsp-low.c): Remove.
2167 (common-utils.o: ../common/common-utils.c): Remove.
2168 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2169 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2170 (vec.o: ../common/vec.c): Remove.
2171 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2172 (xml-utils.o: ../common/xml-utils.c): Remove.
2173 (ptid.o: ../common/ptid.c): Remove.
2174 (buffer.o: ../common/buffer.c): Remove.
2175 (format.o: ../common/format.c): Remove.
2176 (filestuff.o: ../common/filestuff.c): Remove.
2177 (agent.o: ../common/agent.c): Remove.
2178 (errors.o: ../common/errors.c): Remove.
2179 (environ.o: ../common/environ.c): Remove.
2180 (common-debug.o: ../common/common-debug.c): Remove.
2181 (cleanups.o: ../common/cleanups.c): Remove.
2182 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2183 (fileio.o: ../common/fileio.c): Remove.
2184 (common-regcache.o: ../common/common-regcache.c): Remove.
2185 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2186 (new-op.o: ../common/new-op.c): Remove.
2187 (btrace-common.o: ../common/btrace-common.c): Remove.
2189 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2191 * Makefile.in (%.o: ../target/%.c): New rule.
2192 (waitstatus.o: ../target/waitstatus.c): Remove.
2194 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2197 (%.c: ../regformats/%.dat,
2198 (%.c: ../regformats/arm/%.dat,
2199 (%.c: ../regformats/i386/%.dat,
2200 (%.c: ../regformats/rs6000/%.dat): New rules.
2201 (aarch64.c): Remove.
2202 (reg-arm.c): Remove.
2203 (arm-with-iwmmxt.c): Remove.
2204 (arm-with-vfpv2.c): Remove.
2205 (arm-with-vfpv3.c): Remove.
2206 (arm-with-neon.c): Remove.
2207 (reg-bfin.c): Remove.
2208 (reg-cris.c): Remove.
2209 (reg-crisv32.c): Remove.
2211 (i386-linux.c): Remove.
2212 (i386-avx.c): Remove.
2213 (i386-avx-linux.c): Remove.
2214 (i386-avx-avx512.c): Remove.
2215 (i386-avx-avx512-linux.c): Remove.
2216 (i386-mpx.c): Remove.
2217 (i386-mpx-linux.c): Remove.
2218 (i386-avx-mpx-avx512-pku.c): Remove.
2219 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2220 (i386-avx-mpx.c): Remove.
2221 (i386-avx-mpx-linux.c): Remove.
2222 (i386-mmx.c): Remove.
2223 (i386-mmx-linux.c): Remove.
2224 (reg-ia64.c): Remove.
2225 (reg-m32r.c): Remove.
2226 (reg-m68k.c): Remove.
2228 (mips-linux.c): Remove.
2229 (mips-dsp-linux.c): Remove.
2230 (mips64-linux.c): Remove.
2231 (mips64-dsp-linux.c): Remove.
2232 (nios2-linux.c): Remove.
2233 (powerpc-32.c): Remove.
2234 (powerpc-32l.c): Remove.
2235 (powerpc-altivec32l.c): Remove.
2236 (powerpc-cell32l.c): Remove.
2237 (powerpc-vsx32l.c): Remove.
2238 (powerpc-isa205-32l.c): Remove.
2239 (powerpc-isa205-altivec32l.c): Remove.
2240 (powerpc-isa205-vsx32l.c): Remove.
2241 (powerpc-e500l.c): Remove.
2242 (powerpc-64l.c): Remove.
2243 (powerpc-altivec64l.c): Remove.
2244 (powerpc-cell64l.c): Remove.
2245 (powerpc-vsx64l.c): Remove.
2246 (powerpc-isa205-64l.c): Remove.
2247 (powerpc-isa205-altivec64l.c): Remove.
2248 (powerpc-isa205-vsx64l.c): Remove.
2249 (s390-linux32.c): Remove.
2250 (s390-linux32v1.c): Remove.
2251 (s390-linux32v2.c): Remove.
2252 (s390-linux64.c): Remove.
2253 (s390-linux64v1.c): Remove.
2254 (s390-linux64v2.c): Remove.
2255 (s390-te-linux64.c): Remove.
2256 (s390-vx-linux64.c): Remove.
2257 (s390-tevx-linux64.c): Remove.
2258 (s390x-linux64.c): Remove.
2259 (s390x-linux64v1.c): Remove.
2260 (s390x-linux64v2.c): Remove.
2261 (s390x-te-linux64.c): Remove.
2262 (s390x-vx-linux64.c): Remove.
2263 (s390x-tevx-linux64.c): Remove.
2264 (tic6x-c64xp-linux.c): Remove.
2265 (tic6x-c64x-linux.c): Remove.
2266 (tic6x-c62x-linux.c): Remove.
2268 (reg-sparc64.c): Remove.
2269 (reg-spu.c): Remove.
2271 (amd64-linux.c): Remove.
2272 (amd64-avx.c): Remove.
2273 (amd64-avx-linux.c): Remove.
2274 (amd64-avx-avx512.c): Remove.
2275 (amd64-avx-avx512-linux.c): Remove.
2276 (amd64-mpx.c): Remove.
2277 (amd64-mpx-linux.c): Remove.
2278 (amd64-avx-mpx-avx512-pku.c): Remove.
2279 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2280 (amd64-avx-mpx.c): Remove.
2281 (amd64-avx-mpx-linux.c): Remove.
2283 (x32-linux.c): Remove.
2284 (x32-avx.c): Remove.
2285 (x32-avx-linux.c): Remove.
2286 (x32-avx-avx512.c): Remove.
2287 (x32-avx-avx512-linux.c): Remove.
2288 (reg-xtensa.c): Remove.
2289 (reg-tilegx.c): Remove.
2290 (reg-tilegx32.c): Remove.
2292 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2294 * Makefile.in (SFILES): Add "common/environ.c".
2295 (OBJS): Add "common/environ.h".
2297 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2299 * configure.ac: Check if the fs_base and gs_base members of
2300 `struct user_regs_struct' exist.
2301 * config.in: Regenerated.
2302 * configure: Likewise.
2304 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2306 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2308 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2309 (get_next_pcs_syscall_next_pc): Likewise.
2311 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2313 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2314 * nto-x86-low.c: Likewise.
2316 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2318 * Makefile.in: Include disable-implicit-rules.mk.
2320 2016-11-23 Pedro Alves <palves@redhat.com>
2322 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2323 (debug_vprintf): Use std::chrono::steady_clock instead of
2324 gettimeofday. Use '.' instead of ':'.
2325 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2326 (get_timestamp): Use std::chrono::steady_clock instead of
2329 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2331 * Makefile.in: Fix whitespace formatting.
2333 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2335 * Makefile.in (SFILES, OBS): Flatten list and order
2338 2016-11-23 Pedro Alves <palves@redhat.com>
2340 * event-loop.c (handle_file_event): Use warning.
2341 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2342 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2345 2016-11-23 Pedro Alves <palves@redhat.com>
2347 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2349 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2350 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2351 debug_printf and debug_flush for debug output.
2352 * server.c (handle_general_set): Likewise.
2353 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2356 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2358 * Makefile.in (.c.o): Replace rule with ...
2359 (%.o: %.c): ... this one.
2361 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2363 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2364 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2366 * configure.ac: Remove checks for the make program.
2367 * configure: Re-generate.
2369 2016-10-28 Pedro Alves <palves@redhat.com>
2371 * Makefile.in (CXX_DIALECT): Get from configure.
2372 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2373 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2374 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2375 * config.in: Regenerate.
2376 * configure: Regenerate.
2378 2016-10-27 Yao Qi <yao.qi@linaro.org>
2380 * linux-low.c (linux_supports_range_stepping): Return true if
2381 can_software_single_step return true.
2383 2016-10-27 Yao Qi <yao.qi@linaro.org>
2385 * inferiors.c (find_inferior_in_random): New function.
2386 * inferiors.h (find_inferior_in_random): Declare.
2387 * linux-low.c (linux_wait_for_event_filtered): Call
2388 find_inferior_in_random instead of find_inferior.
2390 2016-10-27 Yao Qi <yao.qi@linaro.org>
2392 * linux-low.c (linux_wait_1): If single-step breakpoints are
2393 inserted, remove them.
2395 2016-10-26 Pedro Alves <palves@redhat.com>
2397 * linux-low.c (handle_extended_wait): Link parent/child fork
2399 (linux_wait_1): Unlink them.
2400 (linux_set_resume_request): Ignore resume requests for
2401 already-resumed and unhandled fork child threads.
2402 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2403 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2405 (handle_v_requests) <vCont>: Don't call require_running.
2406 * server.h (in_queued_stop_replies): New declaration.
2408 2016-10-24 Yao Qi <yao.qi@linaro.org>
2411 * linux-aarch64-low.c (append_insns): Cast the return value to
2414 2016-10-10 Yao Qi <yao.qi@linaro.org>
2416 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2418 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2420 * target.c (target_supports_multi_process): New function, moved
2422 * target.h (target_supports_multi_process): ... here. Remove
2425 2016-10-05 Tom Tromey <tom@tromey.com>
2428 * tracepoint.c (handle_tracepoint_bkpts): Check
2429 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2431 2016-10-05 Yao Qi <yao.qi@linaro.org>
2433 * configure.srv: Update the path of arm-*.xml files.
2435 2016-10-05 Terry Guo <terry.guo@arm.com>
2436 Yao Qi <yao.qi@linaro.org>
2438 * Makefile.in: Adjust the path of rules.
2439 * configure.srv: Update the path of xml files.
2440 * regformats/arm-with-iwmmxt.dat: Regenerated.
2441 * regformats/arm-with-neon.dat: Likewise.
2442 * regformats/arm-with-vfpv2.dat: Likewise.
2443 * regformats/arm-with-vfpv3.dat Likewise.
2445 2016-09-30 Yao Qi <yao.qi@linaro.org>
2448 * target.c (target_stop_and_wait): Don't call
2449 target_continue_no_signal, use resume_stop instead.
2451 2016-09-26 Yao Qi <yao.qi@linaro.org>
2453 * linux-low.c (linux_wait_1): Call debug_exit.
2455 2016-09-23 Pedro Alves <palves@redhat.com>
2457 * Makefile.in (SFILES): Add common/new-op.c.
2458 (OBS): Add common/new-op.o.
2459 (new-op.o): New rule.
2461 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2463 * .gitinore: Ignore more files.
2465 2016-09-21 Yao Qi <yao.qi@linaro.org>
2467 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2470 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2472 * server.c (start_inferior): Call target_mourn_inferior instead of
2473 mourn_inferior; pass ptid_t argument to it.
2475 (handle_target_event): Likewise.
2476 * target.c (target_mourn_inferior): New function.
2477 * target.h (mourn_inferior): Delete macro.
2479 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2481 * linux-low.c (lwp_is_stepping): New function.
2483 2016-09-06 Carl Love <cel@us.ibm.com>
2485 * server.c (start_inferior): Fixed comment, requested comment change
2486 didn't get updated correctly. Removed reference to ptrace () call as
2487 it is only true on Linux systems.
2489 2016-09-06 Carl Love <cel@us.ibm.com>
2491 * server.c (start_inferior): Do not call
2492 function target_post_create_inferior () if the
2493 inferior process has already exited.
2495 2016-09-05 Pedro Alves <palves@redhat.com>
2497 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2498 (COMPILE.pre, CC_LD): Use CXX directly.
2499 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2500 * acinclude.m4: Don't include build-with-cxx.m4.
2501 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2502 * configure: Regenerate.
2504 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2507 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2508 call writing data to own_buf.
2510 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2512 * target.c (mywait): Call target_wait instead of
2514 (target_wait): New function.
2516 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2518 * server.c (start_inferior): New variable 'ptid'. Replace calls
2519 to the_target->resume by target_continue{,_no_signal}, depending
2521 * target.c (target_stop_and_wait): Call target_continue_no_signal
2522 instead of the_target->resume.
2523 (target_continue): New function.
2525 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2527 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2529 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2532 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2534 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2535 * linux-arm-low.c (ps_get_thread_area): Likewise.
2536 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2537 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2538 * linux-mips-low.c (ps_get_thread_area): Likewise.
2539 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2540 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2541 * linux-x86-low.c (ps_get_thread_area): Likewise.
2542 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2544 2016-08-19 Pedro Alves <palves@redhat.com>
2546 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2548 2016-08-19 Pedro Alves <palves@redhat.com>
2550 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2551 comment. Use memcpy instead of casting through unsigned long.
2553 2016-08-19 Pedro Alves <palves@redhat.com>
2555 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2556 allocating around 0x80000000.
2558 2016-08-19 Pedro Alves <palves@redhat.com>
2561 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2562 (x32-avx512-linux-ipa.o): New rules.
2563 * configure.ac (x86_64-*-linux*): New x32 check.
2564 * configure.srv (ipa_x32_linux_regobj): New.
2565 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2566 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2568 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2570 * configure: Regenerate.
2572 2016-08-09 Pedro Alves <palves@redhat.com>
2575 * Makefile.in (OBS): Add signals-state-save-restore.o.
2576 (signals-state-save-restore.o): New rule.
2577 * config.in: Regenerate.
2578 * configure: Regenerate.
2579 * linux-low.c: Include "signals-state-save-restore.h".
2580 (linux_create_inferior): Call
2581 restore_original_signals_state.
2582 * server.c: Include "dispositions-save-restore.h".
2583 (captured_main): Call save_original_signals_state.
2585 2016-08-05 Pedro Alves <palves@redhat.com>
2587 * configure: Regenerate.
2589 2016-08-04 Yao Qi <yao.qi@linaro.org>
2591 * linux-low.c (regsets_fetch_inferior_registers): Check
2592 errno is ESRCH or not.
2594 2016-08-02 Yao Qi <yao.qi@linaro.org>
2596 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2597 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2598 (thread_db_load_search): Update.
2599 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2600 td_ta_set_event and td_ta_event_getmsg.
2602 2016-07-26 Pedro Alves <palves@redhat.com>
2605 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2606 of unsigned long for 64-bit registers and use uint32_t instead of
2607 unsigned int for 32-bit registers.
2609 2016-07-26 Pedro Alves <palves@redhat.com>
2611 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2614 2016-07-21 Tom Tromey <tom@tromey.com>
2616 * configure: Rebuild.
2618 2016-07-21 Yao Qi <yao.qi@linaro.org>
2620 * mem-break.c (find_gdb_breakpoint): Cast bp to
2621 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2623 2016-07-21 Yao Qi <yao.qi@linaro.org>
2625 * server.c (handle_v_requests): Support s and S actions
2626 if target_supports_software_single_step return true.
2628 2016-07-21 Yao Qi <yao.qi@linaro.org>
2630 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2631 is resume_step, call maybe_hw_step.
2632 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2634 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2636 (proceed_one_lwp): If resume request is resume_step, install
2637 reinsert breakpoints and call maybe_hw_step.
2639 2016-07-21 Yao Qi <yao.qi@linaro.org>
2641 * linux-low.c (proceed_one_lwp): Declare.
2642 (linux_resume_one_thread): Remove local variable 'step'.
2643 Lift code enqueue signal. Call proceed_one_lwp instead of
2644 linux_resume_one_lwp.
2646 2016-07-21 Yao Qi <yao.qi@linaro.org>
2648 * linux-low.c (linux_resume_one_thread): Call
2649 enqueue_pending_signal.
2651 2016-07-21 Yao Qi <yao.qi@linaro.org>
2653 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2654 * inferiors.c (do_restore_current_thread_cleanup): New function.
2655 (make_cleanup_restore_current_thread): Likewise.
2656 * linux-low.c (install_software_single_step_breakpoints): Call
2657 make_cleanup_restore_current_thread. Switch current_thread to
2660 2016-07-21 Yao Qi <yao.qi@linaro.org>
2662 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2663 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2664 (clone_one_breakpoint): Likewise.
2665 (delete_reinsert_breakpoints): Change parameter to thread.
2667 (has_reinsert_breakpoints): Likewise.
2668 (uninsert_reinsert_breakpoints): Likewise.
2669 (reinsert_reinsert_breakpoints): Likewise.
2670 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2671 (delete_reinsert_breakpoints): Likewise.
2672 (reinsert_reinsert_breakpoints): Likewise.
2673 (uninsert_reinsert_breakpoints): Likewise.
2674 (has_reinsert_breakpoints): Likewise.
2676 2016-07-21 Yao Qi <yao.qi@linaro.org>
2678 * inferiors.c (get_thread_process): Make parameter const.
2679 * inferiors.h (get_thread_process): Update declaration.
2680 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2681 Add new parameters child_thread and parent_thread. Callers
2683 * mem-break.h (clone_all_breakpoints): Update declaration.
2685 2016-07-21 Yao Qi <yao.qi@linaro.org>
2687 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2688 <command_list, handler>: Remove.
2689 (struct gdb_breakpoint): New.
2690 (struct other_breakpoint): New.
2691 (struct reinsert_breakpoint): New.
2692 (is_gdb_breakpoint): New function.
2693 (any_persistent_commands): Update command_list if
2694 is_gdb_breakpoint returns true.
2695 (set_breakpoint): Create breakpoints according to their types.
2696 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2697 (set_gdb_breakpoint_1): Likewise.
2698 (set_gdb_breakpoint): Likewise.
2699 (clear_breakpoint_conditions): Change parameter type to
2700 'struct gdb_breakpoint *'.
2701 (clear_breakpoint_commands): Likewise.
2702 (clear_breakpoint_conditions_and_commands): Likewise.
2703 (add_condition_to_breakpoint): Likewise.
2704 (add_breakpoint_condition): Likewise.
2705 (add_commands_to_breakpoint): Likewise.
2706 (check_breakpoints): Check other_breakpoint.
2707 (clone_one_breakpoint): Clone breakpopint according to its type.
2708 * mem-break.h (struct gdb_breakpoint): Declare.
2709 (set_gdb_breakpoint): Update declaration.
2710 (clear_breakpoint_conditions_and_commands): Likewise.
2711 (add_breakpoint_condition): Likewise.
2712 (add_breakpoint_commands): Likewise.
2713 * server.c (process_point_options): Change parameter type to
2714 'struct gdb_breakpoint *'.
2716 2016-07-21 Yao Qi <yao.qi@linaro.org>
2718 * mem-break.c (set_breakpoint_at): Rename it to ...
2719 (set_breakpoint_type_at): ... it.
2720 (set_breakpoint_at): Call set_breakpoint_type_at.
2721 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2722 * mem-break.h (set_breakpoint_at): Update comments.
2724 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2726 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2728 (nios2_store_gregset): Likewise.
2730 2016-07-01 Pedro Alves <palves@redhat.com>
2731 Antoine Tremblay <antoine.tremblay@ericsson.com>
2733 * linux-low.c: Change interface to take the target lwp_info
2734 pointer directly and return void. Handle detaching from a zombie
2736 (linux_detach_lwp_callback): New function.
2737 (linux_detach): Detach from the leader thread after detaching from
2740 2016-06-28 Yao Qi <yao.qi@linaro.org>
2742 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2743 for variable new_offset.
2744 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2745 (aarch64_ftrace_insn_reloc_cb): Likewise.
2746 (aarch64_ftrace_insn_reloc_tb): Likewise.
2747 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2748 PRIx64 instead of PRIx32.
2750 2016-06-28 Yao Qi <yao.qi@linaro.org>
2752 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2753 (the_low_target): Install arm_get_syscall_trapinfo.
2755 2016-06-28 Yao Qi <yao.qi@linaro.org>
2757 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2759 (the_low_target): Install aarch64_get_syscall_trapinfo.
2761 2016-06-28 Yao Qi <yao.qi@linaro.org>
2763 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2765 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2766 Remove parameter sysno.
2767 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2770 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2772 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2773 (s390_emit_ne_goto): Likewise.
2774 (s390_emit_lt_goto): Likewise.
2775 (s390_emit_le_goto): Likewise.
2776 (s390_emit_gt_goto): Likewise.
2777 (s390_emit_ge_goto): Likewise.
2778 (s390x_emit_eq_goto): Likewise.
2779 (s390x_emit_ne_goto): Likewise.
2780 (s390x_emit_lt_goto): Likewise.
2781 (s390x_emit_le_goto): Likewise.
2782 (s390x_emit_gt_goto): Likewise.
2783 (s390x_emit_ge_goto): Likewise.
2784 (s390_emit_ops_impl): Mark variable static.
2785 (s390x_emit_ops): Likewise.
2787 2016-06-17 Yao Qi <yao.qi@linaro.org>
2789 * linux-low.c (handle_extended_wait): Call
2790 uninsert_reinsert_breakpoints for the parent process. Remove
2791 reinsert breakpoints from the child process. Reinsert them to
2792 the parent process when vfork is done.
2793 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2794 (reinsert_reinsert_breakpoints): New function.
2795 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2796 (reinsert_reinsert_breakpoints): Declare.
2798 2016-06-17 Yao Qi <yao.qi@linaro.org>
2800 * linux-low.c (handle_extended_wait): If the parent is doing
2801 step-over, remove the reinsert breakpoints from the forked child.
2803 2016-06-17 Yao Qi <yao.qi@linaro.org>
2805 * linux-low.c (unsuspend_all_lwps): Declare.
2806 (linux_low_filter_event): If thread exited, call finish_step_over.
2807 If step-over is finished, unsuspend other threads.
2809 2016-06-17 Yao Qi <yao.qi@linaro.org>
2811 * linux-low.c (linux_resume_one_lwp_throw): Assert
2812 has_reinsert_breakpoints returns false.
2813 * mem-break.c (delete_disabled_breakpoints): Assert
2814 bp type isn't reinsert_breakpoint.
2816 2016-06-17 Yao Qi <yao.qi@linaro.org>
2818 * linux-low.c (maybe_hw_step): New function.
2819 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2820 (finish_step_over): Switch current_thread to lwp temporarily,
2821 and assert has_reinsert_breakpoints returns true.
2822 (proceed_one_lwp): Call maybe_hw_step.
2823 * mem-break.c (has_reinsert_breakpoints): New function.
2824 * mem-break.h (has_reinsert_breakpoints): Declare.
2826 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2828 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2830 2016-05-17 Yao Qi <yao.qi@linaro.org>
2832 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2833 instead of find_inferior.
2835 2016-05-05 Yao Qi <yao.qi@linaro.org>
2837 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2838 Initialize res to zero.
2840 2016-05-05 Yao Qi <yao.qi@linaro.org>
2842 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2845 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2847 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2848 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2849 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2851 2016-04-28 Par Olsson <par.olsson@windriver.com>
2852 Simon Marchi <simon.marchi@ericsson.com>
2854 * tracepoint.c (write_inferior_int8): New function.
2855 (cmd_qtenable_disable): Write enable flag using
2856 write_inferior_int8.
2858 2016-04-25 Yao Qi <yao.qi@linaro.org>
2860 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2861 (need_step_over_p): Return zero if the LWP has pending signals
2862 can be delivered on software single step target.
2864 2016-04-25 Yao Qi <yao.qi@linaro.org>
2866 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2867 return instead of error.
2869 2016-04-22 Yao Qi <yao.qi@linaro.org>
2871 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2874 2016-04-22 Yao Qi <yao.qi@linaro.org>
2876 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2877 signal when stepping over breakpoint with software single
2880 2016-04-21 Pedro Alves <palves@redhat.com>
2882 * linux-s390-low.c (s390_collect_ptrace_register)
2883 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2885 (s390_check_regset): Use void * instead of gdb_byte *.
2887 2016-04-20 Pedro Alves <palves@redhat.com>
2889 * configure: Renegerate.
2891 2016-04-20 Yao Qi <yao.qi@linaro.org>
2893 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2894 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2896 (arm_store_gregset): Likewise.
2898 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2900 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2901 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2902 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2903 (amd64-avx-mpx-linux.c): New rules.
2904 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2905 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2906 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2907 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2908 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2909 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2910 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2911 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2912 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2913 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2914 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2915 * linux-x86-low.c (x86_linux_read_description): Add case for
2916 X86_XSTATE_AVX_MPX_MASK.
2917 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2918 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2919 init_registers_i386_avx_mpx_linux.
2920 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2921 (initialize_low_tracepoint): Call
2922 init_registers_i386_avx_mpx_linux.
2923 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2924 (initialize_low_tracepoint): Call
2925 init_registers_amd64_avx_mpx_linux.
2926 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2927 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2928 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2931 2016-04-18 Pedro Alves <palves@redhat.com>
2933 * configure: Regenerate.
2935 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2937 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2938 (aarch64_emit_sub): Likewise.
2940 2016-04-12 Pedro Alves <palves@redhat.com>
2942 * utils.c (prepare_to_throw_exception): Delete.
2944 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2946 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2948 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2950 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2952 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2954 * linux-aarch64-ipa.c: Add <elf.h> include.
2955 * linux-ppc-ipa.c: Add <elf.h> include.
2956 * linux-s390-ipa.c: Add <elf.h> include.
2958 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2960 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2961 (get_raw_reg_ptr): Likewise.
2962 (get_trace_state_variable_value_ptr): Likewise.
2963 (set_trace_state_variable_value_ptr): Likewise.
2964 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2967 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2968 Marcin Kościelnicki <koriakin@0x04.net>
2971 * linux-ppc-low.c (emit_insns): New function.
2972 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2973 (ppc_emit_prologue): New function.
2974 (ppc_emit_epilogue): New function.
2975 (ppc_emit_add): New function.
2976 (ppc_emit_sub): New function.
2977 (ppc_emit_mul): New function.
2978 (ppc_emit_lsh): New function.
2979 (ppc_emit_rsh_signed): New function.
2980 (ppc_emit_rsh_unsigned): New function.
2981 (ppc_emit_ext): New function.
2982 (ppc_emit_zero_ext): New function.
2983 (ppc_emit_log_not): New function.
2984 (ppc_emit_bit_and): New function.
2985 (ppc_emit_bit_or): New function.
2986 (ppc_emit_bit_xor): New function.
2987 (ppc_emit_bit_not): New function.
2988 (ppc_emit_equal): New function.
2989 (ppc_emit_less_signed): New function.
2990 (ppc_emit_less_unsigned): New function.
2991 (ppc_emit_ref): New function.
2992 (ppc_emit_const): New function.
2993 (ppc_emit_reg): New function.
2994 (ppc_emit_pop): New function.
2995 (ppc_emit_stack_flush): New function.
2996 (ppc_emit_swap): New function.
2997 (ppc_emit_stack_adjust): New function.
2998 (ppc_emit_call): New function.
2999 (ppc_emit_int_call_1): New function.
3000 (ppc_emit_void_call_2): New function.
3001 (ppc_emit_if_goto): New function.
3002 (ppc_emit_goto): New function.
3003 (ppc_emit_eq_goto): New function.
3004 (ppc_emit_ne_goto): New function.
3005 (ppc_emit_lt_goto): New function.
3006 (ppc_emit_le_goto): New function.
3007 (ppc_emit_gt_goto): New function.
3008 (ppc_emit_ge_goto): New function.
3009 (ppc_write_goto_address): New function.
3010 (ppc_emit_ops_impl): New static variable.
3011 (ppc64v1_emit_prologue): New function.
3012 (ppc64v2_emit_prologue): New function.
3013 (ppc64_emit_epilogue): New function.
3014 (ppc64_emit_add): New function.
3015 (ppc64_emit_sub): New function.
3016 (ppc64_emit_mul): New function.
3017 (ppc64_emit_lsh): New function.
3018 (ppc64_emit_rsh_signed): New function.
3019 (ppc64_emit_rsh_unsigned): New function.
3020 (ppc64_emit_ext): New function.
3021 (ppc64_emit_zero_ext): New function.
3022 (ppc64_emit_log_not): New function.
3023 (ppc64_emit_bit_and): New function.
3024 (ppc64_emit_bit_or): New function.
3025 (ppc64_emit_bit_xor): New function.
3026 (ppc64_emit_bit_not): New function.
3027 (ppc64_emit_equal): New function.
3028 (ppc64_emit_less_signed): New function.
3029 (ppc64_emit_less_unsigned): New function.
3030 (ppc64_emit_ref): New function.
3031 (ppc64_emit_const): New function.
3032 (ppc64v1_emit_reg): New function.
3033 (ppc64v2_emit_reg): New function.
3034 (ppc64_emit_pop): New function.
3035 (ppc64_emit_stack_flush): New function.
3036 (ppc64_emit_swap): New function.
3037 (ppc64v1_emit_call): New function.
3038 (ppc64v2_emit_call): New function.
3039 (ppc64v1_emit_int_call_1): New function.
3040 (ppc64v2_emit_int_call_1): New function.
3041 (ppc64v1_emit_void_call_2): New function.
3042 (ppc64v2_emit_void_call_2): New function.
3043 (ppc64_emit_if_goto): New function.
3044 (ppc64_emit_eq_goto): New function.
3045 (ppc64_emit_ne_goto): New function.
3046 (ppc64_emit_lt_goto): New function.
3047 (ppc64_emit_le_goto): New function.
3048 (ppc64_emit_gt_goto): New function.
3049 (ppc64_emit_ge_goto): New function.
3050 (ppc64v1_emit_ops_impl): New static variable.
3051 (ppc64v2_emit_ops_impl): New static variable.
3052 (ppc_emit_ops): New function.
3053 (linux_low_target): Wire in ppc_emit_ops.
3055 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3056 Marcin Kościelnicki <koriakin@0x04.net>
3059 * Makefile.in: Add powerpc-*-ipa.o
3060 * configure.srv: Add ipa_obj for powerpc*-linux.
3061 * linux-ppc-ipa.c: New file.
3062 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3064 (PPC_FIELD): New macro.
3065 (PPC_SEXT): New macro.
3066 (PPC_OP6): New macro.
3067 (PPC_BO): New macro.
3068 (PPC_LI): New macro.
3069 (PPC_BD): New macro.
3070 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3071 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3072 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3073 (ppc_get_thread_area): New function.
3074 (is_elfv2_inferior): New function.
3075 (gen_ds_form): New function.
3076 (GEN_STD): New macro.
3077 (GEN_STDU): New macro.
3078 (GEN_LD): New macro.
3079 (GEN_LDU): New macro.
3080 (gen_d_form): New function.
3081 (GEN_ADDI): New macro.
3082 (GEN_ADDIS): New macro.
3083 (GEN_LI): New macro.
3084 (GEN_LIS): New macro.
3085 (GEN_ORI): New macro.
3086 (GEN_ORIS): New macro.
3087 (GEN_LWZ): New macro.
3088 (GEN_STW): New macro.
3089 (GEN_STWU): New macro.
3090 (gen_xfx_form): New function.
3091 (GEN_MFSPR): New macro.
3092 (GEN_MTSPR): New macro.
3093 (GEN_MFCR): New macro.
3094 (GEN_MTCR): New macro.
3095 (GEN_SYNC): New macro.
3096 (GEN_LWSYNC): New macro.
3097 (gen_x_form): New function.
3098 (GEN_OR): New macro.
3099 (GEN_MR): New macro.
3100 (GEN_LWARX): New macro.
3101 (GEN_STWCX): New macro.
3102 (GEN_CMPW): New macro.
3103 (gen_md_form): New function.
3104 (GEN_RLDICL): New macro.
3105 (GEN_RLDICR): New macro.
3106 (gen_i_form): New function.
3108 (GEN_BL): New macro.
3109 (gen_b_form): New function.
3110 (GEN_BNE): New macro.
3111 (GEN_LOAD): New macro.
3112 (GEN_STORE): New macro.
3113 (gen_limm): New function.
3114 (gen_atomic_xchg): New function.
3115 (gen_call): New function.
3116 (ppc_relocate_instruction): New function.
3117 (ppc_install_fast_tracepoint_jump_pad): New function.
3118 (ppc_get_min_fast_tracepoint_insn_len): New function.
3119 (ppc_get_ipa_tdesc_idx): New function.
3120 (the_low_target): Wire in the new functions.
3121 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3123 * linux-ppc-tdesc.h: New file.
3125 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3127 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3128 (alloc_jump_pad_buffer): New function.
3129 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3130 (alloc_jump_pad_buffer): New function.
3131 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3132 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3133 (alloc_jump_pad_buffer): New function.
3134 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3135 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3136 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3137 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3139 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3141 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3142 * linux-amd64-ipa.c: Likewise.
3143 * linux-i386-ipa.c: Likewise.
3144 * linux-s390-ipa.c: Likewise.
3145 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3146 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3147 set_trace_state_variable_value_ptr.
3148 (struct ipa_sym_addresses): Likewise.
3149 (symbol_list): Likewise.
3150 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3151 accessing gdb_collect directly.
3152 (gdb_collect_ptr_type): New typedef.
3153 (get_raw_reg_ptr_type): New typedef.
3154 (get_trace_state_variable_value_ptr_type): New typedef.
3155 (set_trace_state_variable_value_ptr_type): New typedef.
3156 (gdb_collect_ptr): New global.
3157 (get_raw_reg_ptr): New global.
3158 (get_trace_state_variable_value_ptr): New global.
3159 (set_trace_state_variable_value_ptr): New global.
3160 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3161 accessing get_raw_reg directly.
3162 (get_get_tsv_func_addr): Likewise for
3163 get_trace_state_variable_value_ptr.
3164 (get_set_tsv_func_addr): Likewise for
3165 set_trace_state_variable_value_ptr.
3166 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3168 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3170 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3172 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3174 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3176 (relocate_instruction): Remove own_buf.
3177 * server.c (own_buf): Make global.
3178 (handle_v_requests): Make global.
3179 * server.h (own_buf): New declaration.
3180 (handle_v_requests): New prototype.
3182 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3185 * linux-s390-low.c (add_insns): New function.
3186 (s390_emit_prologue): New function.
3187 (s390_emit_epilogue): New function.
3188 (s390_emit_add): New function.
3189 (s390_emit_sub): New function.
3190 (s390_emit_mul): New function.
3191 (s390_emit_lsh): New function.
3192 (s390_emit_rsh_signed): New function.
3193 (s390_emit_rsh_unsigned): New function.
3194 (s390_emit_ext): New function.
3195 (s390_emit_log_not): New function.
3196 (s390_emit_bit_and): New function.
3197 (s390_emit_bit_or): New function.
3198 (s390_emit_bit_xor): New function.
3199 (s390_emit_bit_not): New function.
3200 (s390_emit_equal): New function.
3201 (s390_emit_less_signed): New function.
3202 (s390_emit_less_unsigned): New function.
3203 (s390_emit_ref): New function.
3204 (s390_emit_if_goto): New function.
3205 (s390_emit_goto): New function.
3206 (s390_write_goto_address): New function.
3207 (s390_emit_litpool): New function.
3208 (s390_emit_const): New function.
3209 (s390_emit_call): New function.
3210 (s390_emit_reg): New function.
3211 (s390_emit_pop): New function.
3212 (s390_emit_stack_flush): New function.
3213 (s390_emit_zero_ext): New function.
3214 (s390_emit_swap): New function.
3215 (s390_emit_stack_adjust): New function.
3216 (s390_emit_set_r2): New function.
3217 (s390_emit_int_call_1): New function.
3218 (s390_emit_void_call_2): New function.
3219 (s390_emit_eq_goto): New function.
3220 (s390_emit_ne_goto): New function.
3221 (s390_emit_lt_goto): New function.
3222 (s390_emit_le_goto): New function.
3223 (s390_emit_gt_goto): New function.
3224 (s390_emit_ge_goto): New function.
3225 (s390x_emit_prologue): New function.
3226 (s390x_emit_epilogue): New function.
3227 (s390x_emit_add): New function.
3228 (s390x_emit_sub): New function.
3229 (s390x_emit_mul): New function.
3230 (s390x_emit_lsh): New function.
3231 (s390x_emit_rsh_signed): New function.
3232 (s390x_emit_rsh_unsigned): New function.
3233 (s390x_emit_ext): New function.
3234 (s390x_emit_log_not): New function.
3235 (s390x_emit_bit_and): New function.
3236 (s390x_emit_bit_or): New function.
3237 (s390x_emit_bit_xor): New function.
3238 (s390x_emit_bit_not): New function.
3239 (s390x_emit_equal): New function.
3240 (s390x_emit_less_signed): New function.
3241 (s390x_emit_less_unsigned): New function.
3242 (s390x_emit_ref): New function.
3243 (s390x_emit_if_goto): New function.
3244 (s390x_emit_const): New function.
3245 (s390x_emit_call): New function.
3246 (s390x_emit_reg): New function.
3247 (s390x_emit_pop): New function.
3248 (s390x_emit_stack_flush): New function.
3249 (s390x_emit_zero_ext): New function.
3250 (s390x_emit_swap): New function.
3251 (s390x_emit_stack_adjust): New function.
3252 (s390x_emit_int_call_1): New function.
3253 (s390x_emit_void_call_2): New function.
3254 (s390x_emit_eq_goto): New function.
3255 (s390x_emit_ne_goto): New function.
3256 (s390x_emit_lt_goto): New function.
3257 (s390x_emit_le_goto): New function.
3258 (s390x_emit_gt_goto): New function.
3259 (s390x_emit_ge_goto): New function.
3260 (s390_emit_ops): New function.
3261 (struct linux_target_ops): Fill in emit_ops hook.
3263 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3266 * Makefile.in: Add s390 IPA files.
3267 * configure.srv: Build IPA for s390.
3268 * linux-s390-ipa.c: New file.
3269 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3270 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3271 (tdesc_s390_linux32): Likewise.
3272 (init_registers_s390_linux32v1): Likewise.
3273 (tdesc_s390_linux32v1): Likewise.
3274 (init_registers_s390_linux32v2): Likewise.
3275 (tdesc_s390_linux32v2): Likewise.
3276 (init_registers_s390_linux64): Likewise.
3277 (tdesc_s390_linux64): Likewise.
3278 (init_registers_s390_linux64v1): Likewise.
3279 (tdesc_s390_linux64v1): Likewise.
3280 (init_registers_s390_linux64v2): Likewise.
3281 (tdesc_s390_linux64v2): Likewise.
3282 (init_registers_s390_te_linux64): Likewise.
3283 (tdesc_s390_te_linux64): Likewise.
3284 (init_registers_s390_vx_linux64): Likewise.
3285 (tdesc_s390_vx_linux64): Likewise.
3286 (init_registers_s390_tevx_linux64): Likewise.
3287 (tdesc_s390_tevx_linux64): Likewise.
3288 (init_registers_s390x_linux64): Likewise.
3289 (tdesc_s390x_linux64): Likewise.
3290 (init_registers_s390x_linux64v1): Likewise.
3291 (tdesc_s390x_linux64v1): Likewise.
3292 (init_registers_s390x_linux64v2): Likewise.
3293 (tdesc_s390x_linux64v2): Likewise.
3294 (init_registers_s390x_te_linux64): Likewise.
3295 (tdesc_s390x_te_linux64): Likewise.
3296 (init_registers_s390x_vx_linux64): Likewise.
3297 (tdesc_s390x_vx_linux64): Likewise.
3298 (init_registers_s390x_tevx_linux64): Likewise.
3299 (tdesc_s390x_tevx_linux64): Likewise.
3300 (have_hwcap_s390_vx): New static variable.
3301 (s390_arch_setup): Fill have_hwcap_s390_vx.
3302 (s390_get_thread_area): New function.
3303 (s390_ft_entry_gpr_esa): New const.
3304 (s390_ft_entry_gpr_zarch): New const.
3305 (s390_ft_entry_misc): New const.
3306 (s390_ft_entry_fr): New const.
3307 (s390_ft_entry_vr): New const.
3308 (s390_ft_main_31): New const.
3309 (s390_ft_main_64): New const.
3310 (s390_ft_exit_fr): New const.
3311 (s390_ft_exit_vr): New const.
3312 (s390_ft_exit_misc): New const.
3313 (s390_ft_exit_gpr_esa): New const.
3314 (s390_ft_exit_gpr_zarch): New const.
3315 (append_insns): New function.
3316 (s390_relocate_instruction): New function.
3317 (s390_install_fast_tracepoint_jump_pad): New function.
3318 (s390_get_min_fast_tracepoint_insn_len): New function.
3319 (s390_get_ipa_tdesc_idx): New function.
3320 (struct linux_target_ops): Wire in the above functions.
3321 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3322 * linux-s390-tdesc.h: New file.
3324 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3326 * linux-s390-low.c (s390_supports_tracepoints): New function.
3327 (struct linux_target_ops): Fill supports_tracepoints hook.
3329 2016-03-18 Yao Qi <yao.qi@linaro.org>
3331 * linux-low.c (lwp_signal_can_be_delivered): New function.
3332 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3334 2016-03-18 Yao Qi <yao.qi@linaro.org>
3336 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3337 0 if signal is enqueued. Remove 'signal' from one debugging
3338 message. Move one debugging message to some lines below.
3339 Remove code setting 'signal' to 0.
3341 2016-03-18 Yao Qi <yao.qi@linaro.org>
3343 * linux-low.c (linux_low_filter_event): Remove redundant
3344 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3346 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3348 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3349 (struct linux_target_ops): Wire in the above.
3351 2016-03-03 Yao Qi <yao.qi@linaro.org>
3353 * linux-low.c: Update comments to start_step_over.
3355 2016-03-03 Yao Qi <yao.qi@linaro.org>
3358 * linux-low.c (handle_extended_wait): Set child suspended
3359 if event_lwp->bp_reinsert isn't zero.
3361 2016-03-02 Yao Qi <yao.qi@linaro.org>
3363 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3364 enqueue_pending_signal.
3366 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3368 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3371 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3373 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3374 (s390_regmap_3264) [!__s390x__]: New global.
3375 (s390_collect_ptrace_register): Skip map entries containing -1.
3376 (s390_supply_ptrace_register): Ditto.
3377 (s390_fill_gprs_high): New function.
3378 (s390_store_gprs_high): New function.
3379 (s390_regsets): Add NT_S390_HIGH_GPRS.
3380 (s390_get_hwcap): Enable on 31-bit.
3381 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3382 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3383 Detect NT_S390_HIGH_GPRS.
3384 (s390_usrregs_info_3264): Enable on 31-bit.
3385 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3386 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3388 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3391 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3392 * configure.srv: Ditto.
3393 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3394 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3395 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3396 (init_registers_amd64_linux): Remove prototype.
3397 (tdesc_amd64_linux): Remove declaration.
3398 (get_ipa_tdesc): New function.
3399 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3400 initialize remaining tdescs.
3401 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3402 (init_registers_i386_linux): Remove prototype.
3403 (tdesc_i386_linux): Remove declaration.
3404 (get_ipa_tdesc): New function.
3405 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3406 initialize remaining tdescs.
3407 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3408 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3409 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3410 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3411 (x86_get_ipa_tdesc_idx): New function.
3412 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3413 * linux-x86-tdesc.h: New file.
3414 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3415 (target_get_ipa_tdesc_idx): New macro.
3416 * tracepoint.c (ipa_tdesc_idx): New macro.
3417 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3418 (symbol_list): Add ipa_tdesc_idx.
3419 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3420 (ipa_tdesc): Remove.
3421 (ipa_tdesc_idx): New variable.
3422 (get_context_regcache): Use get_ipa_tdesc.
3423 (gdb_collect): Ditto.
3425 * tracepoint.h (get_ipa_tdesc): New prototype.
3426 (ipa_tdesc): Remove.
3428 2016-02-24 Pedro Alves <palves@redhat.com>
3430 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3431 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3432 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3433 Factor out common code between the USE_SIGTRAP_SIGINFO and
3434 !USE_SIGTRAP_SIGINFO blocks.
3435 (linux_low_filter_event): Call save_stop_reason instead of
3436 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3438 (linux_wait_1): Update comments.
3440 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3442 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3443 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3444 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3445 ppc_insert_point, ppc_remove_point.
3447 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3449 * linux-s390-low.c (s390_supports_z_point_type): New function.
3450 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3452 2016-02-16 Yao Qi <yao.qi@linaro.org>
3454 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3455 PC. Get pc from regcache_read_pc.
3457 2016-02-12 Yao Qi <yao.qi@linaro.org>
3459 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3460 or linux_get_pc_32bit.
3461 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3463 2016-02-12 Yao Qi <yao.qi@linaro.org>
3465 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3466 arm_linux_get_next_pcs_fixup.
3468 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3470 * tracepoint.c (x_tracepoint_action_download): Change
3471 write_inferior_data_ptr to write_inferior_data_pointer.
3472 (cmd_qtstart): Likewise.
3473 (write_inferior_data_ptr): Remove.
3474 (download_agent_expr): Change write_inferior_data_ptr to
3475 write_inferior_data_pointer.
3476 (download_tracepoint_1): Likewise.
3477 (download_tracepoint): Likewise.
3478 (download_trace_state_variables): Likewise.
3480 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3481 Marcin Kościelnicki <koriakin@0x04.net>
3483 * tracepoint.c (struct tracepoint_action_ops): Remove.
3484 (struct tracepoint_action): Remove ops.
3485 (m_tracepoint_action_download, r_tracepoint_action_download)
3486 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3487 size and offset accordingly.
3488 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3489 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3490 (tracepoint_action_send, tracepoint_action_download): New functions.
3491 Helpers for trace action handlers.
3492 (add_tracepoint_action): Remove setup actions ops.
3493 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3495 2016-02-10 Yao Qi <yao.qi@linaro.org>
3497 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3499 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3501 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3503 * configure: Regenerate.
3505 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3507 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3508 void * to gdb_byte *.
3509 * linux-low.c (siginfo_fixup): Likewise.
3510 (linux_xfer_siginfo): Likewise.
3511 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3513 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3515 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3517 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3519 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3521 * linux-x86-low.c [__x86_64__]: Include
3522 "nat/amd64-linux-siginfo.h".
3523 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3524 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3525 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3526 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3527 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3528 (cpt_si_fd, si_timerid, si_overrun): Move from
3529 nat/amd64-linux-siginfo.c.
3530 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3532 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3534 * server.c (skip_to_semicolon): Remove.
3535 (process_point_options): Use strchrnul instead of
3538 2016-01-26 Yao Qi <yao.qi@linaro.org>
3540 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3541 * linux-low.c (install_software_single_step_breakpoints): Don't
3542 call regcache_read_pc.
3543 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3546 2016-01-26 Yao Qi <yao.qi@linaro.org>
3548 * linux-low.c (install_software_single_step_breakpoints): Call
3549 regcache_read_pc instead of get_pc.
3551 2016-01-26 Yao Qi <yao.qi@linaro.org>
3553 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3554 (unblock_async_io): Rename to ...
3555 (block_unblock_async_io): ... it. New function.
3556 (enable_async_io): Don't install SIGIO handler. Unblock it
3558 (disable_async_io): Don't ignore SIGIO. Block it instead.
3559 (initialize_async_io): Install SIGIO handler. Don't call
3562 2016-01-26 Yao Qi <yao.qi@linaro.org>
3564 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3565 first character is '\003', call *the_target->request_interrupt.
3567 2016-01-25 Yao Qi <yao.qi@linaro.org>
3569 * remote-utils.c (new_thread_notify): Remove.
3570 (dead_thread_notify): Likewise.
3571 * remote-utils.h (new_thread_notify): Remove declaration.
3572 (dead_thread_notify): Likewise.
3574 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3576 * gdb.trace/pending.exp: Fix expected message on continue.
3578 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3580 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3581 it works properly on big-endian machines where sizeof (CORE_ADDR)
3584 2016-01-21 Pedro Alves <palves@redhat.com>
3586 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3587 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3588 * configure: Regenerate.
3590 2016-01-21 Yao Qi <yao.qi@linaro.org>
3592 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3593 is_thumb and set it according to CPSR saved on the stack.
3594 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3595 arm_sigreturn_next_pc.
3597 2016-01-18 Yao Qi <yao.qi@linaro.org>
3599 * linux-low.c (linux_set_pc_64bit): New function.
3600 (linux_get_pc_64bit): New function.
3601 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3603 * linux-sparc-low.c (debug_threads): Remove declaration.
3604 (sparc_get_pc): Remove.
3605 (the_low_target): Use linux_get_pc_64bit instead of
3607 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3608 (the_low_target): Use linux_get_pc_64bit and
3611 2016-01-18 Yao Qi <yao.qi@linaro.org>
3613 * linux-arm-low.c (debug_threads): Remove declaration.
3614 (arm_get_pc, arm_set_pc): Remove.
3615 (the_low_target): Use linux_get_pc_32bit and
3617 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3618 (the_low_target): Use linux_get_pc_32bit and
3620 * linux-cris-low.c (debug_threads): Remove declaration.
3621 (cris_get_pc, cris_set_pc,): Remove.
3622 (the_low_target): Use linux_get_pc_32bit and
3624 * linux-crisv32-low.c (debug_threads): Remove declaration.
3625 (cris_get_pc, cris_set_pc): Remove.
3626 (the_low_target): Use linux_get_pc_32bit and
3628 * linux-low.c: Include inttypes.h.
3629 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3630 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3631 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3632 (the_low_target): Use linux_get_pc_32bit and
3634 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3635 (the_low_target): Use linux_get_pc_32bit and
3637 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3638 (the_low_target): Use linux_get_pc_32bit and
3640 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3641 (the_low_target): Use linux_get_pc_32bit and
3643 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3644 (the_low_target): Use linux_get_pc_32bit and
3647 2016-01-18 Gary Benson <gbenson@redhat.com>
3649 * configure.ac (AC_FUNC_FORK): New check.
3650 * config.in: Regenerate.
3651 * configure: Likewise.
3653 2016-01-14 Yao Qi <yao.qi@linaro.org>
3655 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3656 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3657 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3658 arm_get_next_pcs_ctor.
3660 2016-01-12 Josh Stone <jistone@redhat.com>
3661 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3663 * inferiors.h: Include "gdb_vecs.h".
3664 (struct process_info): Add syscalls_to_catch.
3665 * inferiors.c (remove_process): Free syscalls_to_catch.
3666 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3667 syscall_return stops.
3668 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3669 * server.c (handle_general_set): Handle QCatchSyscalls.
3670 (handle_query): Report support for QCatchSyscalls.
3671 * target.h (struct target_ops): Add supports_catch_syscall.
3672 (target_supports_catch_syscall): New macro.
3673 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3674 (struct lwp_info): Add syscall_state.
3675 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3676 Maintain syscall_state and syscalls_to_catch across exec.
3677 (get_syscall_trapinfo): New function, proxy to the_low_target.
3678 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3679 (linux_low_filter_event): Toggle syscall_state entry/return for
3680 syscall traps, and set it ignored for all others.
3681 (gdb_catching_syscalls_p): New function.
3682 (gdb_catch_this_syscall_p): New function.
3683 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3684 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3685 (linux_supports_catch_syscall): New function.
3686 (linux_target_ops): Install it.
3687 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3688 (the_low_target): Install it.
3690 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3692 * acinclude.m4: Include new ../warning.m4 file.
3693 * configure: Regenerated.
3694 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3696 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3698 * ax.c (is_goto_target): Mark static.
3699 * linux-low.c (register_addr): Likewise.
3700 (linux_fetch_registers, linux_store_registers): Likewise.
3701 * mem-break.c (any_persistent_commands): Fix old prototype.
3702 (add_commands_to_breakpoint): Mark static.
3703 * regcache.c (find_register_by_name): Delete unused func.
3704 * remote-utils.c (hex_or_minus_one): Mark static.
3705 * server.c (monitor_show_help): Mark static.
3706 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3707 handle_v_requests): Likewise.
3709 2016-01-12 Pedro Alves <palves@redhat.com>
3711 Remove use of the registered trademark symbol throughout.
3713 2016-01-08 Yao Qi <yao.qi@linaro.org>
3715 * remote-utils.c (getpkt): If c is '\003', call target hook
3718 2016-01-06 Yao Qi <yao.qi@linaro.org>
3720 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3721 linux-aarch32-low.c.
3722 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3723 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3724 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3725 (thumb2_breakpoint): Declare.
3726 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3727 linux-aarch32-low.h.
3728 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3729 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3730 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3732 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3734 * gdbreplay.c (gdbreplay_version): Change copyright year in
3736 * server.c (gdbserver_version): Likewise.
3738 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3740 * server.c (crc32_table): Delete.
3741 (crc32): Use libiberty's xcrc32 function.
3743 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3745 * lynx-low.c (lynx_delete_thread_callback): New function.
3746 (lynx_mourn): Properly delete our process and all of its
3747 threads. Remove call to clear_inferiors.
3749 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3751 * target.c (thread_search_callback): Add check that
3752 the thread_stopped target callback is not NULL before
3755 2015-12-21 Yao Qi <yao.qi@linaro.org>
3757 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3760 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3762 * server.c (handle_query): Call target_supports_software_single_step.
3764 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3766 * linux-low.c (single_step): New function.
3767 (linux_resume_one_lwp_throw): Call single_step.
3768 (start_step_over): Likewise.
3770 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3772 * Makefile.in (SFILES): Append arch/arm-linux.c,
3773 arch/arm-get-next-pcs.c.
3774 (arm-linux.o): New rule.
3775 (arm-get-next-pcs.o): New rule.
3776 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3778 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3779 to linux-aarch32-low.c.
3780 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3781 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3782 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3783 (thumb2_breakpoint_len): Likewise.
3784 (arm_is_thumb_mode): Make non-static.
3785 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3786 from linux-aarch32-low.c.
3787 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3788 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3789 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3790 (thumb2_breakpoint_len): Likewise.
3791 (arm_is_thumb_mode): New declaration.
3792 * linux-arm-low.c: Include arch/arm-linux.h
3793 aarch/arm-get-next-pcs.h, sys/syscall.h.
3794 (get_next_pcs_ops): New struct.
3795 (get_next_pcs_addr_bits_remove): New function.
3796 (get_next_pcs_is_thumb): New function.
3797 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3798 (arm_sigreturn_next_pc): Likewise.
3799 (get_next_pcs_syscall_next_pc): Likewise.
3800 (arm_gdbserver_get_next_pcs): Likewise.
3801 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3803 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3804 * server.h: Include gdb_vecs.h.
3806 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3808 * Makefile.in (SFILES): Append common/common-regcache.c.
3809 (OBS): Append common-regcache.o.
3810 (common-regcache.o): New rule.
3811 * regcache.c (init_register_cache): Initialize cache to
3813 (regcache_raw_read_unsigned): New function.
3814 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3815 register_status enum.
3817 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3819 * linux-aarch64-low.c (the_low_targets): Rename
3820 breakpoint_reinsert_addr to get_next_pcs.
3821 * linux-arm-low.c (the_low_targets): Likewise.
3822 * linux-bfin-low.c (the_low_targets): Likewise.
3823 * linux-cris-low.c (the_low_targets): Likewise.
3824 * linux-crisv32-low.c (the_low_targets): Likewise.
3825 * linux-low.c (can_software_single_step): Likewise.
3826 (install_software_single_step_breakpoints): New function.
3827 (start_step_over): Use install_software_single_step_breakpoints.
3828 * linux-low.h: New CORE_ADDR vector.
3829 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3831 * linux-mips-low.c (the_low_targets): Likewise.
3832 * linux-nios2-low.c (the_low_targets): Likewise.
3833 * linux-sparc-low.c (the_low_targets): Likewise.
3835 2015-12-17 Pedro Alves <palves@redhat.com>
3837 * linux-low.c (linux_kill_one_lwp): Remove references to
3839 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3841 (linux_init_signals): Delete.
3842 (initialize_low): Adjust.
3843 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3845 2015-12-16 Pedro Alves <palves@redhat.com>
3847 * configure.ac (compiler warning flags): When testing a
3848 -Wno-foo option, check whether -Wfoo works instead.
3849 * configure: Regenerate.
3851 2015-12-11 Don Breazeal <donb@codesourcery.com>
3853 * server.c (process_serial_event): Don't exit from gdbserver
3854 in remote mode if there are still active inferiors.
3856 2015-12-11 Yao Qi <yao.qi@linaro.org>
3858 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3859 arm_breakpoint_at if the process is 32-bit.
3861 2015-12-11 Yao Qi <yao.qi@linaro.org>
3863 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3866 2015-12-07 Yao Qi <yao.qi@linaro.org>
3868 * configure.srv: Append arm.o to srv_tgtobj for
3869 aarch64*-*-linux* target.
3870 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3871 from linux-arm-low.c.
3872 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3873 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3874 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3875 (thumb2_breakpoint_len): Likewise.
3876 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3877 (arm_breakpoint_kinds): Likewise.
3878 (arm_breakpoint_kind_from_pc): Likewise.
3879 (arm_sw_breakpoint_from_kind): Likewise.
3880 (arm_breakpoint_kind_from_current_state): Likewise.
3881 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3882 (arm_sw_breakpoint_from_kind): Declare.
3883 (arm_breakpoint_kind_from_current_state): Declare.
3884 (arm_breakpoint_at): Declare.
3885 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3886 arm_sw_breakpoint_from_kind if process is 32-bit.
3887 (aarch64_breakpoint_kind_from_pc): New function.
3888 (aarch64_breakpoint_kind_from_current_state): New function.
3889 (the_low_target): Initialize fields breakpoint_kind_from_pc
3890 and breakpoint_kind_from_current_state.
3891 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3892 linux-aarch32-low.c.
3893 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3894 (arm_breakpoint, arm_breakpoint_len): Likewise.
3895 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3896 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3897 (arm_is_thumb_mode): Likewise.
3898 (arm_breakpoint_at): Likewise.
3899 (arm_breakpoint_kind_from_pc): Likewise.
3900 (arm_sw_breakpoint_from_kind): Likewise.
3901 (arm_breakpoint_kind_from_current_state): Likewise.
3904 2015-08-04 Yao Qi <yao.qi@linaro.org>
3906 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3907 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3908 * server.c (extended_protocol): Remove "static".
3909 * server.h (extended_protocol): Declare it.
3911 2015-12-04 Josh Stone <jistone@redhat.com>
3913 * target.h (struct target_ops) <arch_setup>: Rename to ...
3914 (struct target_ops) <post_create_inferior>: ... this.
3915 (target_arch_setup): Rename to ...
3916 (target_post_create_inferior): ... this, calling post_create_inferior.
3917 * server.c (start_inferior): Update target_arch_setup calls to
3918 target_post_create_inferior.
3919 * linux-low.c (linux_low_ptrace_options): Forward declare.
3920 (linux_arch_setup): Update its comment for general use.
3921 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3922 (struct linux_target_ops): Use linux_post_create_inferior.
3923 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3924 to post_create_inferior.
3925 * nto-low.c (struct nto_target_ops): Likewise.
3926 * spu-low.c (struct spu_target_ops): Likewise.
3927 * win32-low.c (struct win32_target_ops): Likewise.
3929 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3931 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3933 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3935 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3936 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3937 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3938 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3939 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3940 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3941 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3942 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3943 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3944 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3945 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3946 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3948 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3950 * linux-low.c (linux_look_up_symbols): Don't call
3951 linux_supports_traceclone.
3952 * linux-low.h (thread_db_init): Remove use_events argument.
3953 * thread-db.c (thread_db_use_event): Remove global variable.
3954 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3955 (struct thread_db) <td_create_bp>: Remove field.
3956 (thread_db_create_event): Remove function.
3957 (thread_db_enable_reporting): Likewise.
3958 (find_one_thread): Don't check for thread_db_use_events.
3959 (attach_thread): Likewise.
3960 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3961 (try_thread_db_load_1): Don't check for thread_db_use_events.
3962 (thread_db_init): Remove use_events argument and thread events
3964 (remove_thread_event_breakpoints): Remove function.
3965 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3967 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3969 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3971 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3972 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3973 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3974 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3975 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3977 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3979 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3980 * linux-low.c (can_hardware_single_step): Use
3981 supports_hardware_single_step.
3982 (can_software_single_step): New function.
3983 (start_step_over): Call can_software_single_step.
3984 (linux_supports_hardware_single_step): New function.
3985 (struct target_ops) <supports_software_single_step>: Initialize.
3986 * linux-low.h (struct linux_target_ops)
3987 <supports_hardware_single_step>: Initialize.
3988 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3989 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3990 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3991 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3992 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3993 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3994 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3995 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3996 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3997 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3999 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4000 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4002 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4004 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4006 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4007 * target.h (struct target_ops): <supports_software_single_step>:
4009 (target_supports_software_single_step): New macro.
4011 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4013 * linux-low.c (linux_wait_1): Fix pc advance condition.
4014 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4015 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4017 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4019 * linux-arm-low.c (arm_is_thumb_mode): New function.
4020 (arm_breakpoint_at): Use arm_is_thumb_mode.
4021 (arm_breakpoint_kind_from_current_state): New function.
4022 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4024 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4025 (linux_breakpoint_kind_from_current_state): New function.
4026 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4027 * linux-low.h (struct linux_target_ops)
4028 <breakpoint_kind_from_current_state>: New field.
4029 * target.h (struct target_ops): Likewise.
4030 (target_breakpoint_kind_from_current_state): New macro.
4032 2015-11-30 Pedro Alves <palves@redhat.com>
4034 * linux-low.c (linux_resume): Wake up the event loop before
4037 2015-11-30 Pedro Alves <palves@redhat.com>
4039 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4041 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4043 * target.c (struct thread_search): New structure.
4044 (thread_search_callback): New function.
4045 (prev_general_thread): New global.
4046 (prepare_to_access_memory, done_accessing_memory): New functions.
4047 * target.h (prepare_to_access_memory, done_accessing_memory):
4048 Replace macros with function declarations.
4050 2015-11-30 Pedro Alves <palves@redhat.com>
4053 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4054 report TARGET_WAITKIND_NO_RESUMED.
4055 * remote-utils.c (prepare_resume_reply): Handle
4056 TARGET_WAITKIND_NO_RESUMED.
4057 * server.c (report_no_resumed): New global.
4058 (handle_query) <qSupported>: Handle "no-resumed+". Report
4059 "no-resumed+" support.
4060 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4061 return error if the client doesn't support no-resumed events.
4062 (push_stop_notification): New function.
4063 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4064 events if the client supports them.
4066 2015-11-30 Pedro Alves <palves@redhat.com>
4068 * linux-low.c (thread_still_has_status_pending_p): Don't check
4070 (lwp_resumed): New function.
4071 (status_pending_p_callback): Return early if the LWP is not
4072 supposed to be resumed.
4074 2015-11-30 Pedro Alves <palves@redhat.com>
4076 * linux-low.c (handle_extended_wait): Assert that the LWP's
4077 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4078 thread create events, leave the new child's status pending.
4079 (linux_low_filter_event): If GDB wants to hear about thread exit
4080 events, leave the LWP marked dead and don't delete it.
4081 (linux_wait_for_event_filtered): Don't check for thread exit.
4082 (filter_exit_event): New function.
4083 (linux_wait_1): Use it, when returning an exit event.
4084 (linux_resume_one_lwp_throw): Assert that the LWP's
4085 waitstatus is TARGET_WAITKIND_IGNORE.
4086 * remote-utils.c (prepare_resume_reply): Handle
4087 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4088 * server.c (report_thread_events): New global.
4089 (handle_general_set): Handle QThreadEvents.
4090 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4091 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4092 TARGET_WAITKIND_THREAD_EXITED.
4093 * server.h (report_thread_events): Declare.
4095 2015-11-30 Pedro Alves <palves@redhat.com>
4097 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4098 the thread's last_resume_kind was resume_stop.
4100 2015-11-30 Pedro Alves <palves@redhat.com>
4102 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4105 2015-11-30 Pedro Alves <palves@redhat.com>
4107 * server.c (handle_v_requests): Handle vCtrlC.
4109 2015-11-30 Pedro Alves <palves@redhat.com>
4111 * gdbthread.h (find_any_thread_of_pid): Declare.
4112 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4114 * server.c (handle_query): If current_thread is NULL, look for
4115 another thread of the selected process.
4117 2015-11-26 Daniel Colascione <dancol@dancol.org>
4118 Simon Marchi <simon.marchi@ericsson.com>
4120 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4121 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4123 * target.h (struct target_ops) <thread_name>: New field.
4124 (target_thread_name): New macro.
4126 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4128 * regcache.h (regcache_invalidate_pid): Add declaration.
4129 * regcache.c (regcache_invalidate_pid): New function, extracted
4130 from regcache_invalidate.
4131 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4132 Add trivial documentation comment.
4133 * lynx-low.c: Use regcache_invalidate_pid instead of
4134 regcache_invalidate.
4136 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4138 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4139 and Elf64_auxv_t if the target is Android.
4141 2015-11-22 Doug Evans <xdje42@gmail.com>
4143 * target.h: #include <sys/types.h>.
4145 2015-11-19 Pedro Alves <palves@redhat.com>
4147 * linux-low.c (linux_process_qsupported): Change prototype.
4149 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4151 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4152 and adjust to loop over all features.
4153 * server.c (handle_query) <qSupported>: Adjust to call
4154 target_process_qsupported once, passing it a vector of unprocessed
4156 * target.h (struct target_ops) <process_qsupported>: Change
4158 (target_process_qsupported): Adjust.
4160 2015-11-19 Pedro Alves <palves@redhat.com>
4162 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4164 * configure: Regenerate.
4166 2015-11-19 Pedro Alves <palves@redhat.com>
4168 * configure: Regenerate.
4170 2015-11-19 Yao Qi <yao.qi@linaro.org>
4172 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4175 2015-11-19 Yao Qi <yao.qi@linaro.org>
4177 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4178 (struct aarch64_operand): Move enum out.
4180 2015-11-19 Yao Qi <yao.qi@linaro.org>
4182 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4183 struct user_fpsimd_state *.
4184 (aarch64_store_fpregset): Likewise.
4186 2015-11-19 Yao Qi <yao.qi@linaro.org>
4188 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4189 struct user_pt_regs *.
4190 (aarch64_store_gregset): Likewise.
4192 2015-11-18 Pedro Alves <palves@redhat.com>
4194 * Makefile.in (all_object_files): Add $IPA_OBJS.
4196 2015-11-17 Pedro Alves <palves@redhat.com>
4198 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4199 GDB_SIGNAL_0 and gdb_signal_to_string.
4201 2015-11-17 Pedro Alves <palves@redhat.com>
4203 * win32-low.c (handle_output_debug_string): Remove parameter.
4204 (win32_kill): Remove our_status local and adjust call to
4205 handle_output_debug_string.
4206 (get_child_debug_event): Adjust call to
4207 handle_output_debug_string.
4209 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4211 * linux-mips-low.c (mips_fill_gregset): Add cast.
4212 (mips_store_gregset): Likewise.
4213 (mips_fill_fpregset): Likewise.
4214 (mips_store_fpregset): Likewise.
4216 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4218 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4221 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4223 * linux-mips-low.c (mips_linux_new_thread): Change type of
4224 watch_type to enum target_hw_bp_type.
4226 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4228 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4229 Change return type to arm_hwbp_type.
4231 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4233 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4234 (arm_store_gregset): Likewise.
4235 * linux-arm-low.c (arm_get_hwcap): Likewise.
4236 (arm_read_description): Likewise.
4238 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4240 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4242 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4244 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4245 (ppc_fill_vsxregset): Likewise.
4246 (ppc_store_vsxregset): Likewise.
4247 (ppc_fill_vrregset): Likewise.
4248 (ppc_store_vrregset): Likewise.
4249 (ppc_fill_evrregset): Likewise.
4250 (ppc_store_evrregset): Likewise.
4252 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4254 * linux-ppc-low.c (ppc_usrregs_info): Remove
4255 forward-declaration.
4256 (ppc_arch_setup): Move lower in file.
4258 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4260 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4261 (ps_pdwrite): Likewise.
4263 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4265 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4266 to after assert checks.
4268 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4270 * proc-service.c (ps_pdread): Add/adjust casts.
4271 (ps_pdwrite): Add/adjust casts.
4273 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4275 * server.c (handle_search_memory_1): Cast return value of
4278 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4280 * server.c (write_qxfer_response): Change type of data to
4283 2015-10-29 Pedro Alves <palves@redhat.com>
4285 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4287 2015-10-29 Pedro Alves <palves@redhat.com>
4289 * tracepoint.c (clear_installed_tracepoints): Add casts.
4291 2015-10-29 Pedro Alves <palves@redhat.com>
4293 * server.c (handle_v_cont, process_serial_event): Add enum
4294 gdb_signal casts to signal parsing code.
4296 2015-10-29 Pedro Alves <palves@redhat.com>
4298 * linux-low.h (NULL_REGSET): Define.
4299 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4300 * linux-arm-low.c (arm_regsets): Likewise.
4301 * linux-crisv32-low.c (cris_regsets): Likewise.
4302 * linux-m68k-low.c (m68k_regsets): Likewise.
4303 * linux-mips-low.c (mips_regsets): Likewise.
4304 * linux-nios2-low.c (nios2_regsets): Likewise.
4305 * linux-ppc-low.c (ppc_regsets): Likewise.
4306 * linux-s390-low.c (s390_regsets): Likewise.
4307 * linux-sh-low.c (sh_regsets): Likewise.
4308 * linux-sparc-low.c (sparc_regsets): Likewise.
4309 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4310 * linux-tile-low.c (tile_regsets): Likewise.
4311 * linux-x86-low.c (x86_regsets): Likewise.
4312 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4314 2015-10-29 Pedro Alves <palves@redhat.com>
4316 * linux-low.h (NULL_REGSET): Define.
4317 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4318 * linux-arm-low.c (arm_regsets): Likewise.
4319 * linux-crisv32-low.c (cris_regsets): Likewise.
4320 * linux-m68k-low.c (m68k_regsets): Likewise.
4321 * linux-mips-low.c (mips_regsets): Likewise.
4322 * linux-nios2-low.c (nios2_regsets): Likewise.
4323 * linux-ppc-low.c (ppc_regsets): Likewise.
4324 * linux-s390-low.c (s390_regsets): Likewise.
4325 * linux-sh-low.c (sh_regsets): Likewise.
4326 * linux-sparc-low.c (sparc_regsets): Likewise.
4327 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4328 * linux-tile-low.c (tile_regsets): Likewise.
4329 * linux-x86-low.c (x86_regsets): Likewise.
4330 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4332 2015-10-26 Doug Evans <dje@google.com>
4334 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4336 2015-10-26 Doug Evans <dje@google.com>
4338 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4340 2015-10-26 Doug Evans <dje@google.com>
4342 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4344 (attach_thread, find_new_threads_callback): Ditto.
4346 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4348 * mem-break.h (set_breakpoint_data): Remove.
4350 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4352 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4353 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4354 (initialize_low): Remove set_breakpoint_data call.
4355 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4356 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4357 (initialize_low): Remove set_breakpoint_data call.
4358 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4359 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4360 (initialize_low): Remove set_breakpoint_data call.
4362 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4364 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4365 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4366 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4367 * target.h (target_breakpoint_kind_from_pc): New macro.
4369 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4371 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4372 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4373 the default breakpoint kind.
4375 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4377 * linux-arm-low.c (arm_supports_z_point_type): Add software
4380 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4382 * linux-arm-low.c: Refactor breakpoint definitions.
4383 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4384 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4386 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4388 * Makefile.in: Add arm.c/o.
4389 * configure.srv: Likewise.
4390 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4391 (arm_breakpoint_kind_from_pc): New function.
4392 (arm_sw_breakpoint_from_kind): Return proper kind.
4393 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4395 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4397 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4399 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4400 (struct raw_breakpoint) <size>: Remove.
4401 (struct raw_breakpoint) <kind>: Add.
4402 (bp_size): New function.
4403 (bp_opcode): Likewise.
4404 (find_raw_breakpoint_at): Adjust for kind.
4405 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4406 (remove_memory_breakpoint): Adjust for kind call bp_size.
4407 (set_raw_breakpoint_at): Adjust for kind.
4408 (set_breakpoint): Likewise.
4409 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4410 (delete_raw_breakpoint): Adjust for kind.
4411 (delete_breakpoint): Likewise.
4412 (find_gdb_breakpoint): Likewise.
4413 (set_gdb_breakpoint_1): Likewise.
4414 (set_gdb_breakpoint): Likewise.
4415 (delete_gdb_breakpoint_1): Likewise.
4416 (delete_gdb_breakpoint): Likewise.
4417 (uninsert_raw_breakpoint): Likewise.
4418 (reinsert_raw_breakpoint): Likewise.
4419 (set_breakpoint_data): Remove.
4420 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4421 (check_mem_read): Adjust for kind call bp_size.
4422 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4423 (clone_one_breakpoint): Adjust for kind.
4424 * mem-break.h (set_gdb_breakpoint): Likewise.
4425 (delete_gdb_breakpoint): Likewise.
4426 * server.c (process_serial_event): Likewise.
4428 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4430 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4431 (struct linux_target_ops) <breakpoint>: Remove.
4432 (struct linux_target_ops) <breakpoint_len>: Remove.
4433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4435 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4436 (arm_sw_breakpoint_from_kind): New function.
4437 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4438 (struct linux_target_ops) <breakpoint>: Remove.
4439 (struct linux_target_ops) <breakpoint_len>: Remove.
4440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4442 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4443 (struct linux_target_ops) <breakpoint>: Remove.
4444 (struct linux_target_ops) <breakpoint_len>: Remove.
4445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4447 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4448 (struct linux_target_ops) <breakpoint>: Remove.
4449 (struct linux_target_ops) <breakpoint_len>: Remove.
4450 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4451 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4452 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4453 and sw_breakpoint_from_kind to increment the pc.
4454 (linux_breakpoint_kind_from_pc): New function.
4455 (linux_sw_breakpoint_from_kind): New function.
4456 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4457 (initialize_low): Call breakpoint_kind_from_pc and
4458 sw_breakpoint_from_kind to replace breakpoint_data/len.
4459 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4462 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4463 (struct linux_target_ops) <breakpoint>: Remove.
4464 (struct linux_target_ops) <breakpoint_len>: Remove.
4465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4467 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4468 (struct linux_target_ops) <breakpoint>: Remove.
4469 (struct linux_target_ops) <breakpoint_len>: Remove.
4470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4472 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4473 (struct linux_target_ops) <breakpoint>: Remove.
4474 (struct linux_target_ops) <breakpoint_len>: Remove.
4475 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4476 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4477 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4478 (struct linux_target_ops) <breakpoint>: Remove.
4479 (struct linux_target_ops) <breakpoint_len>: Remove.
4480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4482 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4483 (struct linux_target_ops) <breakpoint>: Remove.
4484 (struct linux_target_ops) <breakpoint_len>: Remove.
4485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4487 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4488 (struct linux_target_ops) <breakpoint>: Remove.
4489 (struct linux_target_ops) <breakpoint_len>: Remove.
4490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4492 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4493 (struct linux_target_ops) <breakpoint>: Remove.
4494 (struct linux_target_ops) <breakpoint_len>: Remove.
4495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4497 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4498 (struct linux_target_ops) <breakpoint>: Remove.
4499 (struct linux_target_ops) <breakpoint_len>: Remove.
4500 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4501 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4502 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4503 (struct linux_target_ops) <breakpoint>: Remove.
4504 (struct linux_target_ops) <breakpoint_len>: Remove.
4505 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4507 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4508 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4509 (struct linux_target_ops) <breakpoint>: Remove.
4510 (struct linux_target_ops) <breakpoint_len>: Remove.
4511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4514 (struct linux_target_ops) <breakpoint>: Remove.
4515 (struct linux_target_ops) <breakpoint_len>: Remove.
4516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4519 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4521 * linux-cris-low.c (cris_get_pc): Remove void arg.
4523 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4525 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4528 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4530 * inferiors.c (thread_pid_matches_callback): New function.
4531 (find_thread_process): New function.
4532 (remove_thread): Reset current_thread.
4533 (remove_process): Assert threads have been removed first.
4535 2015-10-15 Yao Qi <yao.qi@linaro.org>
4537 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4539 (aarch64_remove_point): Likewise.
4540 * regcache.c (regcache_register_size): New function.
4542 2015-10-12 Yao Qi <yao.qi@linaro.org>
4544 * linux-aarch64-low.c: Update all callers as emit_load_store
4545 is renamed to aarch64_emit_load_store.
4547 2015-10-12 Yao Qi <yao.qi@linaro.org>
4549 * linux-aarch64-low.c: Update all callers of function renaming
4550 from emit_insn to aarch64_emit_insn.
4552 2015-10-12 Yao Qi <yao.qi@linaro.org>
4554 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4555 arch/aarch64-insn.h.
4556 (struct aarch64_memory_operand): Likewise.
4558 (emit_insn): Move to arch/aarch64-insn.c.
4559 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4560 (emit_load_store): Move to arch/aarch64-insn.c.
4561 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4562 (can_encode_int32): Remove.
4564 2015-10-12 Yao Qi <yao.qi@linaro.org>
4566 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4567 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4568 (aarch64_relocate_instruction): Likewise.
4569 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4570 (struct aarch64_insn_visitor): Likewise.
4572 2015-10-12 Yao Qi <yao.qi@linaro.org>
4574 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4575 (struct aarch64_insn_visitor): New.
4576 (struct aarch64_insn_relocation_data): New.
4577 (aarch64_ftrace_insn_reloc_b): New function.
4578 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4579 (aarch64_ftrace_insn_reloc_cb): Likewise.
4580 (aarch64_ftrace_insn_reloc_tb): Likewise.
4581 (aarch64_ftrace_insn_reloc_adr): Likewise.
4582 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4583 (aarch64_ftrace_insn_reloc_others): Likewise.
4585 (aarch64_relocate_instruction): Use visitor.
4587 2015-10-12 Yao Qi <yao.qi@linaro.org>
4589 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4590 int. Add argument buf.
4591 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4592 aarch64_relocate_instruction.
4594 2015-10-12 Yao Qi <yao.qi@linaro.org>
4596 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4597 argument insn. Remove local variable insn. Don't call
4599 (aarch64_install_fast_tracepoint_jump_pad): Call
4602 2015-09-30 Yao Qi <yao.qi@linaro.org>
4604 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4605 (emit_load_store_pair): Likewise.
4607 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4609 * dll.c (match_dll): Add cast(s).
4610 (unloaded_dll): Likewise.
4611 * linux-low.c (second_thread_of_pid_p): Likewise.
4612 (delete_lwp_callback): Likewise.
4613 (count_events_callback): Likewise.
4614 (select_event_lwp_callback): Likewise.
4615 (linux_set_resume_request): Likewise.
4616 * server.c (accumulate_file_name_length): Likewise.
4617 (emit_dll_description): Likewise.
4618 (handle_qxfer_threads_worker): Likewise.
4619 (visit_actioned_threads): Likewise.
4620 * thread-db.c (any_thread_of): Likewise.
4621 * tracepoint.c (same_process_p): Likewise.
4622 (match_blocktype): Likewise.
4623 (build_traceframe_info_xml): Likewise.
4625 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4627 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4629 (gdb_unparse_agent_expr): Likewise.
4630 * hostio.c (require_data): Likewise.
4631 (handle_pread): Likewise.
4632 * linux-low.c (disable_regset): Likewise.
4633 (fetch_register): Likewise.
4634 (store_register): Likewise.
4635 (get_dynamic): Likewise.
4636 (linux_qxfer_libraries_svr4): Likewise.
4637 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4638 (set_fast_tracepoint_jump): Likewise.
4639 (uninsert_fast_tracepoint_jumps_at): Likewise.
4640 (reinsert_fast_tracepoint_jumps_at): Likewise.
4641 (validate_inserted_breakpoint): Likewise.
4642 (clone_agent_expr): Likewise.
4643 * regcache.c (init_register_cache): Likewise.
4644 * remote-utils.c (putpkt_binary_1): Likewise.
4645 (decode_M_packet): Likewise.
4646 (decode_X_packet): Likewise.
4647 (look_up_one_symbol): Likewise.
4648 (relocate_instruction): Likewise.
4649 (monitor_output): Likewise.
4650 * server.c (handle_search_memory): Likewise.
4651 (handle_qxfer_exec_file): Likewise.
4652 (handle_qxfer_libraries): Likewise.
4653 (handle_qxfer): Likewise.
4654 (handle_query): Likewise.
4655 (handle_v_cont): Likewise.
4656 (handle_v_run): Likewise.
4657 (captured_main): Likewise.
4658 * target.c (write_inferior_memory): Likewise.
4659 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4660 * tracepoint.c (init_trace_buffer): Likewise.
4661 (add_tracepoint_action): Likewise.
4662 (add_traceframe): Likewise.
4663 (add_traceframe_block): Likewise.
4664 (cmd_qtdpsrc): Likewise.
4665 (cmd_qtdv): Likewise.
4666 (cmd_qtstatus): Likewise.
4667 (response_source): Likewise.
4668 (response_tsv): Likewise.
4669 (cmd_qtnotes): Likewise.
4670 (gdb_collect): Likewise.
4671 (initialize_tracepoint): Likewise.
4673 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4675 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4676 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4677 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4679 (enum aarch64_condition_codes): New enum.
4680 (w0): New static global.
4683 (struct aarch64_memory_operand) <type>: New
4684 MEMORY_OPERAND_POSTINDEX type.
4685 (postindex_memory_operand): New helper function.
4686 (emit_ret): New function.
4687 (emit_load_store_pair): New function, factored out of emit_stp
4688 with support for MEMORY_OPERAND_POSTINDEX.
4689 (emit_stp): Rewrite using emit_load_store_pair.
4690 (emit_ldp): New function.
4691 (emit_load_store): Likewise.
4692 (emit_ldr): Mention post-index instruction in comment.
4693 (emit_ldrh): New function.
4694 (emit_ldrb): New function.
4695 (emit_ldrsw): Mention post-index instruction in comment.
4696 (emit_str): Likewise.
4697 (emit_subs): New function.
4698 (emit_cmp): Likewise.
4699 (emit_and): Likewise.
4700 (emit_orr): Likewise.
4701 (emit_orn): Likewise.
4702 (emit_eor): Likewise.
4703 (emit_mvn): Likewise.
4704 (emit_lslv): Likewise.
4705 (emit_lsrv): Likewise.
4706 (emit_asrv): Likewise.
4707 (emit_mul): Likewise.
4708 (emit_sbfm): Likewise.
4709 (emit_sbfx): Likewise.
4710 (emit_ubfm): Likewise.
4711 (emit_ubfx): Likewise.
4712 (emit_csinc): Likewise.
4713 (emit_cset): Likewise.
4714 (emit_nop): Likewise.
4715 (emit_ops_insns): New helper function.
4716 (emit_pop): Likewise.
4717 (emit_push): Likewise.
4718 (aarch64_emit_prologue): New function.
4719 (aarch64_emit_epilogue): Likewise.
4720 (aarch64_emit_add): Likewise.
4721 (aarch64_emit_sub): Likewise.
4722 (aarch64_emit_mul): Likewise.
4723 (aarch64_emit_lsh): Likewise.
4724 (aarch64_emit_rsh_signed): Likewise.
4725 (aarch64_emit_rsh_unsigned): Likewise.
4726 (aarch64_emit_ext): Likewise.
4727 (aarch64_emit_log_not): Likewise.
4728 (aarch64_emit_bit_and): Likewise.
4729 (aarch64_emit_bit_or): Likewise.
4730 (aarch64_emit_bit_xor): Likewise.
4731 (aarch64_emit_bit_not): Likewise.
4732 (aarch64_emit_equal): Likewise.
4733 (aarch64_emit_less_signed): Likewise.
4734 (aarch64_emit_less_unsigned): Likewise.
4735 (aarch64_emit_ref): Likewise.
4736 (aarch64_emit_if_goto): Likewise.
4737 (aarch64_emit_goto): Likewise.
4738 (aarch64_write_goto_address): Likewise.
4739 (aarch64_emit_const): Likewise.
4740 (aarch64_emit_call): Likewise.
4741 (aarch64_emit_reg): Likewise.
4742 (aarch64_emit_pop): Likewise.
4743 (aarch64_emit_stack_flush): Likewise.
4744 (aarch64_emit_zero_ext): Likewise.
4745 (aarch64_emit_swap): Likewise.
4746 (aarch64_emit_stack_adjust): Likewise.
4747 (aarch64_emit_int_call_1): Likewise.
4748 (aarch64_emit_void_call_2): Likewise.
4749 (aarch64_emit_eq_goto): Likewise.
4750 (aarch64_emit_ne_goto): Likewise.
4751 (aarch64_emit_lt_goto): Likewise.
4752 (aarch64_emit_le_goto): Likewise.
4753 (aarch64_emit_gt_goto): Likewise.
4754 (aarch64_emit_ge_got): Likewise.
4755 (aarch64_emit_ops_impl): New static global variable.
4756 (aarch64_emit_ops): New target function, return
4757 &aarch64_emit_ops_impl.
4758 (struct linux_target_ops): Install it.
4760 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4762 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4763 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4765 * linux-aarch64-ipa.c: New file.
4766 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4768 (aarch64_get_thread_area): New target method.
4769 (extract_signed_bitfield): New helper function.
4770 (aarch64_decode_ldr_literal): New function.
4771 (enum aarch64_opcodes): New enum.
4772 (struct aarch64_register): New struct.
4773 (struct aarch64_operand): New struct.
4774 (x0): New static global.
4783 (aarch64_register): New helper function.
4784 (register_operand): Likewise.
4785 (immediate_operand): Likewise.
4786 (struct aarch64_memory_operand): New struct.
4787 (offset_memory_operand): New helper function.
4788 (preindex_memory_operand): Likewise.
4789 (enum aarch64_system_control_registers): New enum.
4790 (ENCODE): New macro.
4791 (emit_insn): New helper function.
4792 (emit_b): New function.
4793 (emit_bcond): Likewise.
4794 (emit_cb): Likewise.
4795 (emit_tb): Likewise.
4796 (emit_blr): Likewise.
4797 (emit_stp): Likewise.
4798 (emit_ldp_q_offset): Likewise.
4799 (emit_stp_q_offset): Likewise.
4800 (emit_load_store): Likewise.
4801 (emit_ldr): Likewise.
4802 (emit_ldrsw): Likewise.
4803 (emit_str): Likewise.
4804 (emit_ldaxr): Likewise.
4805 (emit_stxr): Likewise.
4806 (emit_stlr): Likewise.
4807 (emit_data_processing_reg): Likewise.
4808 (emit_data_processing): Likewise.
4809 (emit_add): Likewise.
4810 (emit_sub): Likewise.
4811 (emit_mov): Likewise.
4812 (emit_movk): Likewise.
4813 (emit_mov_addr): Likewise.
4814 (emit_mrs): Likewise.
4815 (emit_msr): Likewise.
4816 (emit_sevl): Likewise.
4817 (emit_wfe): Likewise.
4818 (append_insns): Likewise.
4819 (can_encode_int32_in): New helper function.
4820 (aarch64_relocate_instruction): New function.
4821 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4822 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4823 (struct linux_target_ops): Install aarch64_get_thread_area,
4824 aarch64_install_fast_tracepoint_jump_pad and
4825 aarch64_get_min_fast_tracepoint_insn_len.
4827 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4829 * Makefile.in (aarch64-insn.o): New rule.
4830 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4832 2015-09-21 Yao Qi <yao.qi@linaro.org>
4834 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4836 2015-09-21 Yao Qi <yao.qi@linaro.org>
4838 * tracepoint.c (max_jump_pad_size): Remove.
4840 2015-09-18 Yao Qi <yao.qi@linaro.org>
4842 * linux-aarch64-low.c: Don't include sys/uio.h.
4843 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4845 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4847 * tracepoint.c (eval_result_type): Change prototype.
4848 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4850 2015-09-15 Pedro Alves <palves@redhat.com>
4852 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4853 Check whether to report exec events instead of checking whether
4854 multiprocess is enabled.
4856 2015-09-15 Pedro Alves <palves@redhat.com>
4859 * remote-utils.c (prepare_resume_reply): Merge
4860 TARGET_WAITKIND_VFORK_DONE switch case with the
4861 TARGET_WAITKIND_FORKED case.
4863 2015-09-15 Yao Qi <yao.qi@linaro.org>
4865 * server.c (handle_query): Check string comparison using
4866 "else if" instead of "if".
4868 2015-09-15 Yao Qi <yao.qi@linaro.org>
4870 * server.c (vCont_supported): New global variable.
4871 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4872 matches. Append ";vContSupported+" to own_buf.
4873 (handle_v_requests): Append ";s;S" to own_buf if target supports
4874 hardware single step or vCont_supported is false.
4875 (capture_main): Set vCont_supported to zero.
4877 2015-09-15 Yao Qi <yao.qi@linaro.org>
4879 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4881 (linux_supports_hardware_single_step): ... New function.
4882 (linux_target_ops): Update.
4883 * lynx-low.c (lynx_target_ops): Set field
4884 supports_hardware_single_step to target_can_do_hardware_single_step.
4885 * nto-low.c (nto_target_ops): Likewise.
4886 * spu-low.c (spu_target_ops): Likewise.
4887 * win32-low.c (win32_target_ops): Likewise.
4888 * target.c (target_can_do_hardware_single_step): New function.
4889 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4890 Remove. <supports_hardware_single_step>: New field.
4891 (target_supports_conditional_breakpoints): Remove.
4892 (target_supports_hardware_single_step): New macro.
4893 (target_can_do_hardware_single_step): Declare.
4894 * server.c (handle_query): Use target_supports_hardware_single_step
4895 instead of target_supports_conditional_breakpoints.
4897 2015-09-15 Yao Qi <yao.qi@linaro.org>
4899 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4901 (struct linux_target_ops the_low_target): Install
4902 aarch64_linux_siginfo_fixup.
4904 2015-09-11 Don Breazeal <donb@codesourcery.com>
4905 Luis Machado <lgustavo@codesourcery.com>
4907 * linux-low.c (linux_mourn): Static declaration.
4908 (linux_arch_setup): Move in front of
4909 handle_extended_wait.
4910 (linux_arch_setup_thread): New function.
4911 (handle_extended_wait): Handle exec events. Call
4912 linux_arch_setup_thread. Make event_lwp argument a
4913 pointer-to-a-pointer.
4914 (check_zombie_leaders): Do not check stopped threads.
4915 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4916 (linux_low_filter_event): Add lwp and thread for exec'ing
4917 non-leader thread if leader thread has been deleted.
4918 Refactor code into linux_arch_setup_thread and call it.
4919 Pass child lwp pointer by reference to handle_extended_wait.
4920 (linux_wait_for_event_filtered): Update comment.
4921 (linux_wait_1): Prevent clobbering exec event status.
4922 (linux_supports_exec_events): New function.
4923 (linux_target_ops) <supports_exec_events>: Initialize new member.
4924 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4926 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4927 * server.c (report_exec_events): New global variable.
4928 (handle_query): Handle qSupported query for exec-events feature.
4929 (captured_main): Initialize report_exec_events.
4930 * server.h (report_exec_events): Declare new global variable.
4931 * target.h (struct target_ops) <supports_exec_events>: New
4933 (target_supports_exec_events): New macro.
4934 * win32-low.c (win32_target_ops) <supports_exec_events>:
4935 Initialize new member.
4937 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4939 * linux-low.c (linux_low_enable_btrace): Remove.
4940 (linux_target_ops): Replace linux_low_enable_btrace with
4941 linux_enable_btrace.
4943 2015-09-03 Yao Qi <yao.qi@linaro.org>
4945 * linux-aarch64-low.c (aarch64_insert_point): Call
4946 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4949 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4951 * linux-low.c (check_stopped_by_breakpoint): Use
4952 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4954 2015-08-27 Pedro Alves <palves@redhat.com>
4956 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4958 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4960 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4961 the XNEW-family equivalent.
4962 (compile_bytecodes): Likewise.
4963 * dll.c (loaded_dll): Likewise.
4964 * event-loop.c (append_callback_event): Likewise.
4965 (create_file_handler): Likewise.
4966 (create_file_event): Likewise.
4967 * hostio.c (handle_open): Likewise.
4968 * inferiors.c (add_thread): Likewise.
4969 (add_process): Likewise.
4970 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4971 * linux-arm-low.c (arm_new_process): Likewise.
4972 (arm_new_thread): Likewise.
4973 * linux-low.c (add_to_pid_list): Likewise.
4974 (linux_add_process): Likewise.
4975 (handle_extended_wait): Likewise.
4976 (add_lwp): Likewise.
4977 (enqueue_one_deferred_signal): Likewise.
4978 (enqueue_pending_signal): Likewise.
4979 (linux_resume_one_lwp_throw): Likewise.
4980 (linux_resume_one_thread): Likewise.
4981 (linux_read_memory): Likewise.
4982 (linux_write_memory): Likewise.
4983 * linux-mips-low.c (mips_linux_new_process): Likewise.
4984 (mips_linux_new_thread): Likewise.
4985 (mips_add_watchpoint): Likewise.
4986 * linux-x86-low.c (initialize_low_arch): Likewise.
4987 * lynx-low.c (lynx_add_process): Likewise.
4988 * mem-break.c (set_raw_breakpoint_at): Likewise.
4989 (set_breakpoint): Likewise.
4990 (add_condition_to_breakpoint): Likewise.
4991 (add_commands_to_breakpoint): Likewise.
4992 (clone_agent_expr): Likewise.
4993 (clone_one_breakpoint): Likewise.
4994 * regcache.c (new_register_cache): Likewise.
4995 * remote-utils.c (look_up_one_symbol): Likewise.
4996 * server.c (queue_stop_reply): Likewise.
4997 (start_inferior): Likewise.
4998 (queue_stop_reply_callback): Likewise.
4999 (handle_target_event): Likewise.
5000 * spu-low.c (fetch_ppc_memory): Likewise.
5001 (store_ppc_memory): Likewise.
5002 * target.c (set_target_ops): Likewise.
5003 * thread-db.c (thread_db_load_search): Likewise.
5004 (try_thread_db_load_1): Likewise.
5005 * tracepoint.c (add_tracepoint): Likewise.
5006 (add_tracepoint_action): Likewise.
5007 (create_trace_state_variable): Likewise.
5008 (cmd_qtdpsrc): Likewise.
5009 (cmd_qtro): Likewise.
5010 (add_while_stepping_state): Likewise.
5011 * win32-low.c (child_add_thread): Likewise.
5012 (get_image_name): Likewise.
5014 2015-08-25 Yao Qi <yao.qi@linaro.org>
5016 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5018 2015-08-25 Yao Qi <yao.qi@linaro.org>
5020 * Makefile.in (aarch64-linux.o): New rule.
5021 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5023 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5024 (aarch64_init_debug_reg_state): Make it extern.
5025 (aarch64_linux_prepare_to_resume): Remove.
5027 2015-08-25 Yao Qi <yao.qi@linaro.org>
5029 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5030 lwp_arch_private_info and ptid_of_lwp.
5032 2015-08-25 Yao Qi <yao.qi@linaro.org>
5034 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5035 Find proc_info by find_process_pid. All callers updated.
5037 2015-08-25 Yao Qi <yao.qi@linaro.org>
5039 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5041 (debug_reg_change_callback): Remove.
5042 (aarch64_notify_debug_reg_change): Remove.
5044 2015-08-25 Yao Qi <yao.qi@linaro.org>
5046 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5047 Call current_lwp_ptid.
5049 2015-08-25 Yao Qi <yao.qi@linaro.org>
5051 * linux-aarch64-low.c (debug_reg_change_callback): Use
5054 2015-08-25 Yao Qi <yao.qi@linaro.org>
5056 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5058 2015-08-25 Yao Qi <yao.qi@linaro.org>
5060 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5062 2015-08-25 Yao Qi <yao.qi@linaro.org>
5064 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5067 2015-08-25 Yao Qi <yao.qi@linaro.org>
5069 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5071 (debug_reg_change_callback): Remove argument entry and add argument
5072 lwp. Remove local variable thread. Don't print thread id in the
5073 debugging output. Don't check whether pid of thread equals to pid.
5074 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5075 iterate_over_lwps instead find_inferior.
5077 2015-08-24 Pedro Alves <palves@redhat.com>
5079 * inferiors.c (get_first_process): New function.
5080 * inferiors.h (get_first_process): New declaration.
5081 * remote-utils.c (read_ptid): Default to the first process in the
5082 list, instead of to the current thread's process.
5084 2015-08-24 Pedro Alves <palves@redhat.com>
5086 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5087 * event-loop.c: Likewise.
5088 * remote-utils.c: Likewise.
5089 * tracepoint.c: Likewise.
5091 2015-08-24 Pedro Alves <palves@redhat.com>
5093 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5096 2015-08-21 Pedro Alves <palves@redhat.com>
5098 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5099 instead of literal 1.
5101 2015-08-21 Pedro Alves <palves@redhat.com>
5103 * tdesc.c (default_description): Explicitly zero-initialize.
5105 2015-08-21 Pedro Alves <palves@redhat.com>
5108 * inferiors.c (remove_thread): Discard any pending stop reply for
5110 * server.c (remove_all_on_match_pid): Rename to ...
5111 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5113 (discard_queued_stop_replies): Change parameter to a ptid. Now
5115 (handle_v_kill, kill_inferior_callback, captured_main)
5116 (process_serial_event): Adjust.
5117 * server.h (discard_queued_stop_replies): Declare.
5119 2015-08-21 Pedro Alves <palves@redhat.com>
5121 * linux-low.c (wait_for_sigstop): Always switch to no thread
5122 selected if the previously current thread dies.
5123 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5124 process instead of the current thread's.
5125 * remote-utils.c (input_interrupt): Don't check if there's no
5127 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5128 current thread to the general thread fails, error out.
5129 (handle_qxfer_auxv, handle_qxfer_libraries)
5130 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5131 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5132 (handle_query): Check if there's a thread selected instead of
5133 checking whether there's any thread in the thread list.
5134 (handle_qxfer_threads, handle_qxfer_btrace)
5135 (handle_qxfer_btrace_conf): Don't error out early if there's no
5136 thread in the thread list.
5137 (handle_v_cont, myresume): Don't set the current thread to the
5139 (process_serial_event) <Hg handling>: Also set thread_id if the
5140 previous general thread is still alive.
5141 (process_serial_event) <g/G handling>: If setting the current
5142 thread to the general thread fails, error out.
5143 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5144 thread's lwp instead of the current thread's.
5145 * target.c (set_desired_thread): If the desired thread was not
5146 found, leave the current thread pointing to NULL. Return an int
5147 (boolean) indicating success.
5148 * target.h (set_desired_thread): Change return type to int.
5150 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5152 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5153 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5155 (ps_get_thread_area): New function.
5157 2015-08-19 Gary Benson <gbenson@redhat.com>
5159 * hostio.c (handle_pread): Do not attempt to read more data
5160 than hostio_reply_with_data can fit in a packet.
5162 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5164 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5166 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5168 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5170 2015-08-06 Pedro Alves <palves@redhat.com>
5172 * tracepoint.c (expr_eval_result): Now an int.
5174 2015-08-06 Pedro Alves <palves@redhat.com>
5176 * gdbthread.h (struct regcache): Forward declare.
5177 (struct thread_info) <regcache_data>: Now a struct regcache
5179 * inferiors.c (inferior_regcache_data)
5180 (set_inferior_regcache_data): Now work with struct regcache
5182 * inferiors.h (struct regcache): Forward declare.
5183 (inferior_regcache_data, set_inferior_regcache_data): Now work
5184 with struct regcache pointers.
5185 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5186 (free_register_cache_thread): Remove struct regcache pointer
5189 2015-08-06 Pedro Alves <palves@redhat.com>
5191 * server.c (captured_main): On error, print the exception message
5192 to stderr, and if run_once is set, throw a quit.
5194 2015-08-06 Pedro Alves <palves@redhat.com>
5196 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5199 2015-08-06 Pedro Alves <palves@redhat.com>
5201 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5202 reading beyond the passed in buffer length.
5204 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5206 * tracepoint.c (symbol_list) <required>: Remove.
5208 2015-08-06 Pedro Alves <palves@redhat.com>
5210 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5211 count if stopping and suspending threads.
5212 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5213 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5214 (linux_detach): Complete an ongoing step-over.
5215 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5217 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5218 (linux_wait_1): If passing a signal to the inferior after
5219 finishing a step-over, unsuspend and re-resume all lwps. If we
5220 see a single-step event but the thread should be continuing, don't
5221 pass the trap to gdb.
5222 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5223 internal_error instead of gdb_assert.
5224 (enqueue_pending_signal): New function.
5225 (check_ptrace_stopped_lwp_gone): Add debug output.
5226 (start_step_over): Use internal_error instead of gdb_assert.
5227 (complete_ongoing_step_over): New function.
5228 (linux_resume_one_thread): Don't resume a suspended thread.
5229 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5232 2015-08-06 Pedro Alves <palves@redhat.com>
5234 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5235 (linux_thread_alive): Use lwp_is_marked_dead.
5236 (extended_event_reported): Delete.
5237 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5238 instead of extended_event_reported.
5239 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5241 (lwp_is_marked_dead): New function.
5242 (lwp_running): Use lwp_is_marked_dead.
5243 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5246 2015-08-06 Pedro Alves <palves@redhat.com>
5248 * linux-low.c (linux_wait_1): Move fork event output out of the
5249 !report_to_gdb check. Pass event_child->waitstatus to
5250 target_waitstatus_to_string instead of ourstatus.
5252 2015-08-04 Yao Qi <yao.qi@linaro.org>
5254 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5255 if current_thread is 32 bit.
5257 2015-08-04 Yao Qi <yao.qi@linaro.org>
5259 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5260 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5261 * server.c (extended_protocol): Remove "static".
5262 * server.h (extended_protocol): Declare it.
5264 2015-08-04 Yao Qi <yao.qi@linaro.org>
5266 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5267 both aarch64 and aarch32.
5268 (aarch64_set_pc): Likewise.
5270 2015-08-04 Yao Qi <yao.qi@linaro.org>
5272 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5273 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5274 arm-with-neon.xml to srv_xmlfiles.
5275 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5276 (is_64bit_tdesc): New function.
5277 (aarch64_linux_read_description): New function.
5278 (aarch64_arch_setup): Call aarch64_linux_read_description.
5279 (regs_info): Rename to regs_info_aarch64.
5280 (aarch64_regs_info): Return right regs_info.
5281 (initialize_low_arch): Call initialize_low_arch_aarch32.
5283 2015-08-04 Yao Qi <yao.qi@linaro.org>
5285 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5286 * linux-aarch32-low.c: New file.
5287 * linux-aarch32-low.h: New file.
5288 * linux-arm-low.c (arm_fill_gregset): Move it to
5289 linux-aarch32-low.c.
5290 (arm_store_gregset): Likewise.
5291 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5292 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5293 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5294 (regs_info): Rename to regs_info_arm.
5295 (arm_regs_info): Return regs_info_aarch32 if
5296 have_ptrace_getregset is 1 and target description is
5297 arm_with_neon or arm_with_vfpv3.
5298 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5299 Call initialize_low_arch_aarch32 instead.
5301 2015-08-04 Yao Qi <yao.qi@linaro.org>
5303 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5304 * linux-low.c: ... here.
5305 * linux-low.h (have_ptrace_getregset): Declare it.
5307 2015-08-04 Pedro Alves <palves@redhat.com>
5309 * thread-db.c (struct thread_db): Use new typedefs.
5310 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5312 (disable_thread_event_reporting): Cast result of dlsym to
5313 destination function pointer type.
5314 (thread_db_mourn): Use td_ta_delete_ftype.
5316 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5318 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5320 (CDX_BREAKPOINT): Define for R2.
5321 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5322 (the_low_target): Add comments.
5324 2015-07-30 Yao Qi <yao.qi@linaro.org>
5326 * linux-arm-low.c (arm_hwcap): Remove it.
5327 (arm_read_description): New local variable arm_hwcap. Don't
5328 set arm_hwcap to zero.
5330 2015-07-30 Yao Qi <yao.qi@linaro.org>
5332 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5333 Use regcache->tdesc instead.
5334 (arm_store_wmmxregset): Likewise.
5335 (arm_fill_vfpregset): Likewise.
5336 (arm_store_vfpregset): Likewise.
5338 2015-07-30 Yao Qi <yao.qi@linaro.org>
5340 * linux-arm-low.c: Include arch/arm.h.
5341 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5342 (arm_store_gregset): Likewise.
5344 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5346 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5347 ptrace's 4th parameter.
5349 2015-07-27 Yao Qi <yao.qi@linaro.org>
5351 * configure.srv (case aarch64*-*-linux*): Don't set
5354 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5356 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5358 * linux-arm-low.c: Likewise.
5359 * linux-cris-low.c: Likewise.
5360 * linux-crisv32-low.c: Likewise.
5361 * linux-low.c: Likewise.
5362 * linux-m68k-low.c: Likewise.
5363 * linux-mips-low.c: Likewise.
5364 * linux-nios2-low.c: Likewise.
5365 * linux-s390-low.c: Likewise.
5366 * linux-sparc-low.c: Likewise.
5367 * linux-tic6x-low.c: Likewise.
5368 * linux-tile-low.c: Likewise.
5369 * linux-x86-low.c: Likewise.
5371 2015-07-24 Pedro Alves <palves@redhat.com>
5373 * config.in: Regenerate.
5374 * configure: Regenerate.
5376 2015-07-24 Pedro Alves <palves@redhat.com>
5378 * acinclude.m4: Include ../ptrace.m4.
5379 * configure.ac: Call GDB_AC_PTRACE.
5380 * config.in, configure: Regenerate.
5382 2015-07-24 Yao Qi <yao.qi@linaro.org>
5384 * linux-low.c (linux_create_inferior): Remove setting to
5385 proc->priv->new_inferior.
5386 (linux_attach): Likewise.
5387 (linux_low_filter_event): Likewise.
5388 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5390 2015-07-24 Yao Qi <yao.qi@linaro.org>
5392 * linux-low.c (linux_arch_setup): New function.
5393 (linux_low_filter_event): If proc->tdesc is NULL and
5394 proc->attached is true, call the_low_target.arch_setup.
5395 Otherwise, keep status pending, and return.
5396 (linux_resume_one_lwp_throw): Don't call get_pc if
5397 thread->while_stepping isn't NULL. Don't call
5398 get_thread_regcache if proc->tdesc is NULL.
5399 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5400 (linux_target_ops): Install arch_setup.
5401 * server.c (start_inferior): Call the_target->arch_setup.
5402 * target.h (struct target_ops) <arch_setup>: New field.
5403 (target_arch_setup): New marco.
5404 * lynx-low.c (lynx_target_ops): Update.
5405 * nto-low.c (nto_target_ops): Update.
5406 * spu-low.c (spu_target_ops): Update.
5407 * win32-low.c (win32_target_ops): Update.
5409 2015-07-24 Yao Qi <yao.qi@linaro.org>
5411 * linux-low.c (linux_add_process): Don't set
5412 proc->priv->new_inferior.
5413 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5414 (linux_attach): Likewise.
5416 2015-07-24 Yao Qi <yao.qi@linaro.org>
5418 * server.c (start_inferior): Code refactor.
5420 2015-07-24 Yao Qi <yao.qi@linaro.org>
5422 * server.c (process_serial_event): Set general_thread.
5424 2015-07-21 Yao Qi <yao.qi@linaro.org>
5426 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5427 aarch64_linux_get_debug_reg_capacity.
5429 2015-07-17 Yao Qi <yao.qi@linaro.org>
5431 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5432 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5433 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5434 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5435 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5436 (AARCH64_HWP_ALIGNMENT): Likewise.
5437 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5438 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5439 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5440 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5441 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5442 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5443 (struct aarch64_debug_reg_state): Likewise.
5444 (struct arch_lwp_info): Likewise.
5445 (aarch64_align_watchpoint): Likewise.
5446 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5447 (aarch64_watchpoint_length): Likewise.
5448 (aarch64_point_encode_ctrl_reg): Likewise
5449 (aarch64_point_is_aligned): Likewise.
5450 (aarch64_align_watchpoint): Likewise.
5451 (aarch64_linux_set_debug_regs):
5452 (aarch64_dr_state_insert_one_point): Likewise.
5453 (aarch64_dr_state_remove_one_point): Likewise.
5454 (aarch64_handle_breakpoint): Likewise.
5455 (aarch64_handle_aligned_watchpoint): Likewise.
5456 (aarch64_handle_unaligned_watchpoint): Likewise.
5457 (aarch64_handle_watchpoint): Likewise.
5459 2015-07-17 Yao Qi <yao.qi@linaro.org>
5461 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5462 and don't aarch64_get_debug_reg_state. All callers update.
5463 (aarch64_handle_aligned_watchpoint): Likewise.
5464 (aarch64_handle_unaligned_watchpoint): Likewise.
5465 (aarch64_handle_watchpoint): Likewise.
5466 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5467 (aarch64_remove_point): Likewise.
5469 2015-07-17 Yao Qi <yao.qi@linaro.org>
5471 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5473 (aarch64_handle_unaligned_watchpoint): Likewise.
5475 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5477 Revert the previous 3 commits:
5478 Move gdb_regex* to common/
5479 Move linux_find_memory_regions_full & co.
5480 gdbserver build-id attribute generator
5482 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5483 Jan Kratochvil <jan.kratochvil@redhat.com>
5485 gdbserver build-id attribute generator.
5486 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5487 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5488 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5490 (get_dynamic): Use find_pdhr to traverse program headers.
5491 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5492 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5493 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5494 (get_hex_build_id): New.
5495 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5496 to reply XML document.
5498 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5499 Jan Kratochvil <jan.kratochvil@redhat.com>
5501 * target.c: Include target/target-utils.h and fcntl.h.
5502 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5503 (target_fileio_read_stralloc): New functions.
5505 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5507 * Makefile.in (OBS): Add gdb_regex.o.
5509 * config.in: Rebuilt.
5510 * configure: Rebuilt.
5512 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5513 Jan Kratochvil <jan.kratochvil@redhat.com>
5515 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5516 * Makefile.in (OBS): Add target-utils.o.
5517 (linux-maps.o, target-utils.o): New.
5518 * configure.srv (srv_linux_obj): Add linux-maps.o.
5520 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5522 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5524 (the_low_target): Install it.
5526 2015-07-14 Pedro Alves <palves@redhat.com>
5528 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5529 Instead, ignore ECHILD, and throw an error for other errnos.
5531 2015-07-10 Pedro Alves <palves@redhat.com>
5533 * event-loop.c (struct callback_event) <data>: Change type to
5534 gdb_client_data instance instead of gdb_client_data pointer.
5535 (append_callback_event): Adjust.
5537 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5539 * linux-aarch64-low.c: Add comments for each linux_target_ops
5540 method. Remove comments already covered in target_ops and
5541 linux_target_ops definitions.
5542 (the_low_target): Add comments for each unimplemented method.
5544 2015-07-09 Yao Qi <yao.qi@linaro.org>
5546 * linux-aarch64-low.c (aarch64_regmap): Remove.
5547 (aarch64_usrregs_info): Remove.
5548 (regs_info): Set field usrregs to NULL.
5550 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5552 * linux-low.c: Include "rsp-low.h"
5553 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5554 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5555 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5556 (handle_btrace_enable_pt): New.
5557 (handle_btrace_general_set): Support "pt".
5558 (handle_btrace_conf_general_set): Support "pt:size".
5560 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5562 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5565 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5567 * linux-aarch64-low.c: Remove comment about endianness.
5568 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5569 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5572 2015-06-24 Gary Benson <gbenson@redhat.com>
5574 * linux-i386-ipa.c (stdint.h): Do not include.
5575 * lynx-i386-low.c (stdint.h): Likewise.
5576 * lynx-ppc-low.c (stdint.h): Likewise.
5577 * mem-break.c (stdint.h): Likewise.
5578 * thread-db.c (stdint.h): Likewise.
5579 * tracepoint.c (stdint.h): Likewise.
5580 * win32-low.c (stdint.h): Likewise.
5582 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5584 * server.c (write_qxfer_response): Update call to
5585 remote_escape_output.
5587 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5588 Jan Kratochvil <jan.kratochvil@redhat.com>
5590 Merge multiple hex conversions.
5591 * gdbreplay.c (tohex): Rename to 'fromhex'.
5592 (logchar): Use fromhex.
5594 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5596 * server.c (handle_qxfer_libraries): Set `version' attribute for
5599 2015-06-10 Gary Benson <gbenson@redhat.com>
5601 * target.h (struct target_ops) <multifs_open>: New field.
5602 <multifs_unlink>: Likewise.
5603 <multifs_readlink>: Likewise.
5604 * linux-low.c (nat/linux-namespaces.h): New include.
5605 (linux_target_ops): Initialize the_target->multifs_open,
5606 the_target->multifs_unlink and the_target->multifs_readlink.
5607 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5608 * hostio.c (hostio_fs_pid): New static variable.
5609 (hostio_handle_new_gdb_connection): New function.
5610 (handle_setfs): Likewise.
5611 (handle_open): Use the_target->multifs_open as appropriate.
5612 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5613 (handle_readlink): Use the_target->multifs_readlink as
5615 (handle_vFile): Handle vFile:setfs packets.
5616 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5617 after target_handle_new_gdb_connection.
5619 2015-06-10 Gary Benson <gbenson@redhat.com>
5621 * configure.ac (AC_CHECK_FUNCS): Add setns.
5622 * config.in: Regenerate.
5623 * configure: Likewise.
5624 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5625 (linux-namespaces.o): New rule.
5626 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5628 2015-06-09 Gary Benson <gbenson@redhat.com>
5630 * hostio.c (handle_open): Process mode argument with
5631 fileio_to_host_mode.
5633 2015-06-01 Yao Qi <yao.qi@linaro.org>
5635 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5636 * linux-x86-low.c: Likewise.
5638 2015-05-28 Don Breazeal <donb@codesourcery.com>
5640 * linux-low.c (handle_extended_wait): Initialize
5641 thread_info.last_resume_kind for new fork children.
5643 2015-05-15 Pedro Alves <palves@redhat.com>
5645 * target.h (target_handle_new_gdb_connection): Rewrite using if
5646 wrapped in do/while.
5648 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5650 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5651 * configure, config.in: Regenerate.
5652 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5655 2015-05-12 Don Breazeal <donb@codesourcery.com>
5657 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5658 PTRACE_EVENT_VFORK_DONE.
5659 (linux_low_ptrace_options, extended_event_reported): Add vfork
5661 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5662 and "vforkdone" for RSP 'T' Stop Reply Packet.
5663 * server.h (report_vfork_events): Declare
5666 2015-05-12 Don Breazeal <donb@codesourcery.com>
5668 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5669 (the_low_target) <new_fork>: Initialize new member.
5670 * linux-arm-low.c (arm_new_fork): New function.
5671 (the_low_target) <new_fork>: Initialize new member.
5672 * linux-low.c (handle_extended_wait): Call new target function
5674 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5675 * linux-mips-low.c (mips_add_watchpoint): New function
5676 extracted from mips_insert_point.
5677 (the_low_target) <new_fork>: Initialize new member.
5678 (mips_linux_new_fork): New function.
5679 (mips_insert_point): Call mips_add_watchpoint.
5680 * linux-x86-low.c (x86_linux_new_fork): New function.
5681 (the_low_target) <new_fork>: Initialize new member.
5683 2015-05-12 Don Breazeal <donb@codesourcery.com>
5685 * linux-low.c (handle_extended_wait): Implement return value,
5686 rename argument 'event_child' to 'event_lwp', handle
5687 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5688 (linux_low_ptrace_options): New function.
5689 (linux_low_filter_event): Call linux_low_ptrace_options,
5690 use different argument fo linux_enable_event_reporting,
5691 use return value from handle_extended_wait.
5692 (extended_event_reported): New function.
5693 (linux_wait_1): Call extended_event_reported and set
5694 status to report fork events.
5695 (linux_write_memory): Add pid to debug message.
5696 (reset_lwp_ptrace_options_callback): New function.
5697 (linux_handle_new_gdb_connection): New function.
5698 (linux_target_ops): Initialize new structure member.
5699 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5700 * lynx-low.c: Initialize new structure member.
5701 * remote-utils.c (prepare_resume_reply): Implement stop reason
5702 "fork" for "T" stop message.
5703 * server.c (handle_query): Call handle_new_gdb_connection.
5704 * server.h (report_fork_events): Declare global flag.
5705 * target.h (struct target_ops) <handle_new_gdb_connection>:
5707 (target_handle_new_gdb_connection): New macro.
5708 * win32-low.c: Initialize new structure member.
5710 2015-05-12 Don Breazeal <donb@codesourcery.com>
5712 * mem-break.c (APPEND_TO_LIST): Define macro.
5713 (clone_agent_expr): New function.
5714 (clone_one_breakpoint): New function.
5715 (clone_all_breakpoints): New function.
5716 * mem-break.h: Declare new functions.
5718 2015-05-12 Don Breazeal <donb@codesourcery.com>
5720 * linux-low.c (linux_supports_fork_events): New function.
5721 (linux_supports_vfork_events): New function.
5722 (linux_target_ops): Initialize new structure members.
5723 (initialize_low): Call linux_check_ptrace_features.
5724 * lynx-low.c (lynx_target_ops): Initialize new structure
5726 * server.c (report_fork_events, report_vfork_events):
5728 (handle_query): Add new features to qSupported packet and
5730 (captured_main): Initialize new global variables.
5731 * target.h (struct target_ops) <supports_fork_events>:
5733 <supports_vfork_events>: New member.
5734 (target_supports_fork_events): New macro.
5735 (target_supports_vfork_events): New macro.
5736 * win32-low.c (win32_target_ops): Initialize new structure
5739 2015-05-12 Gary Benson <gbenson@redhat.com>
5741 * server.c (handle_qxfer_exec_file): Use current process
5744 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5746 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5747 Remove HAVE_PTRACE_GETREGS conditionals.
5748 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5749 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5751 2015-05-08 Yao Qi <yao.qi@linaro.org>
5753 * linux-low.c (linux_supports_conditional_breakpoints): New
5755 (linux_target_ops): Install new target method.
5756 * lynx-low.c (lynx_target_ops): Install NULL hook for
5757 supports_conditional_breakpoints.
5758 * nto-low.c (nto_target_ops): Likewise.
5759 * spu-low.c (spu_target_ops): Likewise.
5760 * win32-low.c (win32_target_ops): Likewise.
5761 * server.c (handle_query): Check
5762 target_supports_conditional_breakpoints.
5763 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5765 (target_supports_conditional_breakpoints): New macro.
5767 2015-05-06 Pedro Alves <palves@redhat.com>
5770 * server.c (start_inferior): If the process exits, mourn it.
5772 2015-04-21 Gary Benson <gbenson@redhat.com>
5774 * hostio.c (fileio_open_flags_to_host): Factored out to
5775 fileio_to_host_openflags in common/fileio.c. Single use
5778 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5780 * linux-xtensa-low.c (xtensa_fill_gregset)
5781 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5784 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5786 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5787 (regs_info): Replace usrregs pointer with NULL.
5789 2015-04-17 Gary Benson <gbenson@redhat.com>
5791 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5792 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5793 * server.c (handle_qxfer_exec_file): New function.
5794 (qxfer_packets): Add exec-file entry.
5795 (handle_query): Report qXfer:exec-file:read as supported packet.
5797 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5799 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5801 2015-04-09 Gary Benson <gbenson@redhat.com>
5803 * hostio-errno.c (errno_to_fileio_error): Remove function.
5804 Update caller to use remote_fileio_to_fio_error.
5806 2015-04-09 Yao Qi <yao.qi@linaro.org>
5808 * linux-low.c (linux_insert_point): Call
5809 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5810 (linux_remove_point): Call remove_memory_breakpoint if type is
5812 * linux-x86-low.c (x86_insert_point): Don't call
5813 insert_memory_breakpoint.
5814 (x86_remove_point): Don't call remove_memory_breakpoint.
5816 2015-04-01 Pedro Alves <palves@redhat.com>
5817 Cleber Rosa <crosa@redhat.com>
5819 * server.c (gdbserver_usage): Reorganize and extend the usage
5822 2015-03-24 Pedro Alves <palves@redhat.com>
5824 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5825 output. Also dump TRAP_TRACE.
5826 (linux_low_filter_event): In debug output, distinguish a
5827 resume_stop SIGSTOP from a delayed SIGSTOP.
5829 2015-03-24 Gary Benson <gbenson@redhat.com>
5831 * linux-x86-low.c (x86_linux_new_thread): Moved to
5833 (x86_linux_prepare_to_resume): Likewise.
5835 2015-03-24 Gary Benson <gbenson@redhat.com>
5837 * Makefile.in (x86-linux-dregs.o): New rule.
5838 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5839 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5840 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5841 (x86_linux_dr_get): Likewise.
5842 (x86_linux_dr_set): Likewise.
5843 (update_debug_registers_callback): Likewise.
5844 (x86_linux_dr_set_addr): Likewise.
5845 (x86_linux_dr_get_addr): Likewise.
5846 (x86_linux_dr_set_control): Likewise.
5847 (x86_linux_dr_get_control): Likewise.
5848 (x86_linux_dr_get_status): Likewise.
5849 (x86_linux_update_debug_registers): Likewise.
5851 2015-03-24 Gary Benson <gbenson@redhat.com>
5853 * linux-x86-low.c (x86_linux_update_debug_registers):
5854 New function, factored out from...
5855 (x86_linux_prepare_to_resume): ...this.
5857 2015-03-24 Gary Benson <gbenson@redhat.com>
5859 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5860 (x86_linux_dr_set): Likewise.
5861 (update_debug_registers_callback): Likewise.
5862 (x86_linux_dr_set_addr): Likewise.
5863 (x86_linux_dr_get_addr): Likewise.
5864 (x86_linux_dr_set_control): Likewise.
5865 (x86_linux_dr_get_control): Likewise.
5866 (x86_linux_dr_get_status): Likewise.
5867 (x86_linux_prepare_to_resume): Likewise.
5869 2015-03-24 Gary Benson <gbenson@redhat.com>
5871 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5872 Use perror_with_name. Pass string through gettext.
5873 (x86_linux_dr_set): Likewise.
5875 2015-03-24 Gary Benson <gbenson@redhat.com>
5877 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5878 (x86_linux_dr_set_addr): ...this.
5879 (x86_dr_low_get_addr): Rename to...
5880 (x86_linux_dr_get_addr): ...this.
5881 (x86_dr_low_set_control): Rename to...
5882 (x86_linux_dr_set_control): ...this.
5883 (x86_dr_low_get_control): Rename to...
5884 (x86_linux_dr_get_control): ...this.
5885 (x86_dr_low_get_status): Rename to...
5886 (x86_linux_dr_get_status): ...this.
5887 (x86_dr_low): Update with new function names.
5889 2015-03-24 Gary Benson <gbenson@redhat.com>
5891 * Makefile.in (x86-linux.o): New rule.
5892 * configure.srv: Add x86-linux.o to relevant targets.
5893 * linux-low.c (lwp_set_arch_private_info): New function.
5894 (lwp_arch_private_info): Likewise.
5895 * linux-x86-low.c: Include nat/x86-linux.h.
5896 (arch_lwp_info): Removed structure.
5897 (update_debug_registers_callback):
5898 Use lwp_set_debug_registers_changed.
5899 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5900 and lwp_set_debug_registers_changed.
5901 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5903 2015-03-24 Gary Benson <gbenson@redhat.com>
5905 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5906 * linux-arm-low.c (arm_new_thread): Likewise.
5907 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5908 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5909 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5910 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5912 2015-03-24 Gary Benson <gbenson@redhat.com>
5914 * linux-low.c (ptid_of_lwp): New function.
5915 (lwp_is_stopped): Likewise.
5916 (lwp_stop_reason): Likewise.
5917 * linux-x86-low.c (update_debug_registers_callback):
5919 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5922 2015-03-24 Gary Benson <gbenson@redhat.com>
5924 * linux-low.h (linux_stop_lwp): Remove declaration.
5926 2015-03-24 Gary Benson <gbenson@redhat.com>
5928 * linux-low.h: Include nat/linux-nat.h.
5929 * linux-low.c (iterate_over_lwps_args): New structure.
5930 (iterate_over_lwps_filter): New function.
5931 (iterate_over_lwps): Likewise.
5932 * linux-x86-low.c (update_debug_registers_callback):
5933 Update signature to what iterate_over_lwps expects.
5934 Remove PID check that iterate_over_lwps now performs.
5935 (x86_dr_low_set_addr): Use iterate_over_lwps.
5936 (x86_dr_low_set_control): Likewise.
5938 2015-03-24 Gary Benson <gbenson@redhat.com>
5940 * linux-x86-low.c (x86_debug_reg_state): New function.
5941 (x86_linux_prepare_to_resume): Use the above.
5943 2015-03-24 Gary Benson <gbenson@redhat.com>
5945 * linux-low.c (current_lwp_ptid): New function.
5946 * linux-x86-low.c: Include nat/linux-nat.h.
5947 (x86_dr_low_get_addr): Use current_lwp_ptid.
5948 (x86_dr_low_get_control): Likewise.
5949 (x86_dr_low_get_status): Likewise.
5951 2015-03-20 Pedro Alves <palves@redhat.com>
5953 * tracepoint.c (cmd_qtstatus): Make "str" const.
5955 2015-03-20 Pedro Alves <palves@redhat.com>
5957 * server.c (handle_general_set): Make "req_str" const.
5959 2015-03-19 Pedro Alves <palves@redhat.com>
5961 * linux-low.c (linux_resume_one_lwp): Rename to ...
5962 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5963 instead call perror_with_name.
5964 (check_ptrace_stopped_lwp_gone): New function.
5965 (linux_resume_one_lwp): Reimplement as wrapper around
5966 linux_resume_one_lwp_throw that swallows errors if the LWP is
5969 2015-03-19 Pedro Alves <palves@redhat.com>
5971 * linux-low.c (count_events_callback, select_event_lwp_callback):
5972 No longer check whether the thread has resume_stop as last resume
5975 2015-03-19 Pedro Alves <palves@redhat.com>
5977 * linux-low.c (count_events_callback, select_event_lwp_callback):
5978 Use the lwp's status_pending_p field, not the thread's.
5980 2015-03-19 Pedro Alves <palves@redhat.com>
5982 * linux-low.c (select_event_lwp_callback): Update comments to
5983 no longer mention SIGTRAP.
5985 2015-03-18 Gary Benson <gbenson@redhat.com>
5987 * server.c (handle_query): Do not report vFile:fstat as supported.
5989 2015-03-11 Gary Benson <gbenson@redhat.com>
5991 * hostio.c (sys/types.h): New include.
5992 (sys/stat.h): Likewise.
5993 (common-remote-fileio.h): Likewise.
5994 (handle_fstat): New function.
5995 (handle_vFile): Handle vFile:fstat packets.
5997 2015-03-11 Gary Benson <gbenson@redhat.com>
5999 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6000 struct stat.st_blocks and struct stat.st_blksize.
6001 * configure: Regenerate.
6002 * config.in: Likewise.
6003 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6004 (OBS): Add common-remote-fileio.o.
6005 (common-remote-fileio.o): New rule.
6007 2015-03-09 Pedro Alves <palves@redhat.com>
6009 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6010 'struct sockaddr' pointer in 'accept' call.
6012 2015-03-09 Pedro Alves <palves@redhat.com>
6015 2015-03-07 Pedro Alves <palves@redhat.com>
6016 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6017 or <winsock2.h> here. Instead include "gdb_socket.h".
6018 (remote_open): Use union gdb_sockaddr_u.
6019 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6020 or <winsock2.h> here. Instead include "gdb_socket.h".
6021 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6022 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6024 (init_named_socket, gdb_agent_helper_thread): Use union
6027 2015-03-07 Pedro Alves <palves@redhat.com>
6029 * configure.ac (build_warnings): Move
6030 -Wdeclaration-after-statement to the C-specific set.
6031 * configure: Regenerate.
6033 2015-03-07 Pedro Alves <palves@redhat.com>
6035 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6036 or <winsock2.h> here. Instead include "gdb_socket.h".
6037 (remote_open): Use union gdb_sockaddr_u.
6038 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6039 or <winsock2.h> here. Instead include "gdb_socket.h".
6040 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6041 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6043 (init_named_socket, gdb_agent_helper_thread): Use union
6046 2015-03-07 Pedro Alves <palves@redhat.com>
6048 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6051 2015-03-06 Yao Qi <yao.qi@linaro.org>
6053 * linux-aarch64-low.c (aarch64_insert_point): Use
6054 show_debug_regs as a boolean.
6055 (aarch64_remove_point): Likewise.
6057 2015-03-05 Pedro Alves <palves@redhat.com>
6059 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6060 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6061 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6062 * nto-low.c (nto_target_ops): Likewise.
6063 * spu-low.c (spu_target_ops): Likewise.
6064 * win32-low.c (win32_target_ops): Likewise.
6066 2015-03-04 Pedro Alves <palves@redhat.com>
6068 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6069 Decide whether a breakpoint triggered based on the SIGTRAP's
6071 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6072 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6073 (linux_low_filter_event): Check for breakpoints before checking
6075 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6077 (linux_stopped_by_sw_breakpoint)
6078 (linux_supports_stopped_by_sw_breakpoint)
6079 (linux_stopped_by_hw_breakpoint)
6080 (linux_supports_stopped_by_hw_breakpoint): New functions.
6081 (linux_target_ops): Install new target methods.
6083 2015-03-04 Pedro Alves <palves@redhat.com>
6085 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6086 * server.c (swbreak_feature, hwbreak_feature): New globals.
6087 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6088 (captured_main): Clear swbreak_feature and hwbreak_feature.
6089 * server.h (swbreak_feature, hwbreak_feature): Declare.
6090 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6091 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6092 supports_stopped_by_hw_breakpoint>: New fields.
6093 (target_supports_stopped_by_sw_breakpoint)
6094 (target_stopped_by_sw_breakpoint)
6095 (target_supports_stopped_by_hw_breakpoint)
6096 (target_stopped_by_hw_breakpoint): Declare.
6098 2015-03-04 Pedro Alves <palves@redhat.com>
6100 enum lwp_stop_reason -> enum target_stop_reason
6101 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6102 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6103 (linux_wait_1, stuck_in_jump_pad_callback)
6104 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6105 (linux_stopped_by_watchpoint):
6106 * linux-low.h (enum lwp_stop_reason): Delete.
6107 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6108 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6110 2015-03-04 Yao Qi <yao.qi@linaro.org>
6112 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6114 2015-03-03 Gary Benson <gbenson@redhat.com>
6116 * hostio.c (handle_vFile): Fix prefix lengths.
6118 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6120 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6123 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6125 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6126 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6127 (clean): Add "rm -f" for above C files.
6128 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6129 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6130 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6131 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6132 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6133 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6134 (init_registers_s390x_vx_linux64)
6135 (init_registers_s390x_tevx_linux64)
6136 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6137 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6139 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6140 (s390_store_vxrs_high): New functions.
6141 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6143 (s390_arch_setup): Add logic for selecting one of the new target
6144 descriptions. Activate the new vector regsets if applicable.
6145 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6146 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6147 and init_registers_s390x_tevx_linux64.
6149 2015-03-01 Pedro Alves <palves@redhat.com>
6151 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6154 2015-02-27 Pedro Alves <palves@redhat.com>
6156 * linux-x86-low.c (u_debugreg_offset): New function.
6157 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6159 2015-02-27 Pedro Alves <palves@redhat.com>
6161 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6162 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6163 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6164 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6165 (ps_lsetfpregs, ps_getpid)
6166 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6167 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6168 (ps_lsetxregs, ps_plog): Declare.
6170 2015-02-27 Pedro Alves <palves@redhat.com>
6172 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6173 IP_AGENT_EXPORT_FUNC.
6174 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6175 IP_AGENT_EXPORT_FUNC.
6176 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6177 (IP_AGENT_EXPORT): Delete.
6178 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6179 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6180 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6181 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6182 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6183 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6184 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6185 (traceframe_read_count, traceframe_write_count)
6186 (traceframes_created, trace_state_variables, get_raw_reg)
6187 (get_trace_state_variable_value, set_trace_state_variable_value)
6188 (ust_loaded, helper_thread_id, cmd_buf): Use
6189 IPA_SYM_EXPORTED_NAME.
6190 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6191 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6192 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6193 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6194 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6195 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6196 EXTERN_C_PUSH/EXTERN_C_POP.
6197 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6198 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6199 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6200 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6201 (traceframe_write_count, traceframe_read_count)
6202 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6203 (about_to_request_buffer_space, get_trace_state_variable_value)
6204 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6205 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6206 EXTERN_C_PUSH/EXTERN_C_POP.
6207 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6208 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6209 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6210 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6211 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6212 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6213 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6214 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6216 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6217 (IP_AGENT_EXPORT_VAR_DECL): Define.
6219 (gdb_agent_get_raw_reg): Declare.
6221 2015-02-27 Tom Tromey <tromey@redhat.com>
6222 Pedro Alves <palves@redhat.com>
6224 Rename symbols whose names are reserved C++ keywords throughout.
6226 2015-02-27 Pedro Alves <palves@redhat.com>
6228 * Makefile.in (COMPILER): New, get it from autoconf.
6229 (CXX): Get from autoconf instead.
6230 (COMPILE.pre): Use COMPILER.
6231 (CC-LD): Rename to ...
6232 (CC_LD): ... this. Use COMPILER.
6233 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6234 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6235 * acinclude.m4: Include build-with-cxx.m4.
6236 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6237 Disable -Werror by default if building in C++ mode.
6238 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6239 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6240 the C++ compiler. Save/restore CXXFLAGS too.
6241 * configure: Regenerate.
6243 2015-02-27 Pedro Alves <palves@redhat.com>
6245 * acinclude.m4: Include libiberty.m4.
6246 * configure.ac: Call libiberty_INIT.
6247 * config.in, configure: Regenerate.
6249 2015-02-26 Pedro Alves <palves@redhat.com>
6251 * linux-low.c (linux_wait_1): When incrementing the PC past a
6252 program breakpoint always use the_low_target.breakpoint_len as
6253 increment, rather than the maximum between that and
6254 the_low_target.decr_pc_after_break.
6256 2015-02-23 Pedro Alves <palves@redhat.com>
6258 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6259 thread was doing a step-over; always adjust the PC if
6260 we stepped over a permanent breakpoint.
6261 (linux_wait_1): If we stepped over breakpoint that was on top of a
6262 permanent breakpoint, manually advance the PC past it.
6264 2015-02-23 Pedro Alves <palves@redhat.com>
6266 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6268 (x86_fill_gregset, x86_store_gregset): Use it when handling
6271 2015-02-20 Pedro Alves <palves@redhat.com>
6273 * thread-db.c: Include "nat/linux-procfs.h".
6274 (thread_db_init): Skip listing new threads if the kernel supports
6275 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6277 2015-02-20 Pedro Alves <palves@redhat.com>
6279 * linux-low.c (status_pending_p_callback): Use ptid_match.
6281 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6283 PR breakpoints/16812
6284 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6285 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6286 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6288 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6290 PR breakpoints/15956
6291 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6293 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6295 * linux-low.c (linux_low_btrace_conf): Print size.
6296 * server.c (handle_btrace_conf_general_set): New.
6297 (hanle_general_set): Call handle_btrace_conf_general_set.
6298 (handle_query): Report Qbtrace-conf:bts:size as supported.
6300 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6302 * linux-low.c (linux_low_enable_btrace): Update parameters.
6303 (linux_low_btrace_conf): New.
6304 (linux_target_ops)<to_btrace_conf>: Initialize.
6305 * server.c (current_btrace_conf): New.
6306 (handle_btrace_enable): Rename to ...
6307 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6308 to target_enable_btrace. Update comment. Update users.
6309 (handle_qxfer_btrace_conf): New.
6310 (qxfer_packets): Add btrace-conf entry.
6311 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6312 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6313 (target_ops)<read_btrace_conf>: New.
6314 (target_enable_btrace): Update parameters.
6315 (target_read_btrace_conf): New.
6317 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6319 * server.c (handle_btrace_general_set): Remove call to
6320 target_supports_btrace.
6321 (supported_btrace_packets): New.
6322 (handle_query): Call supported_btrace_packets.
6323 * target.h: include btrace-common.h.
6324 (btrace_target_info): Removed.
6325 (supports_btrace, target_supports_btrace): Update parameters.
6327 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6329 * Makefile.in (SFILES): Add common/btrace-common.c.
6330 (OBS): Add common/btrace-common.o.
6331 (btrace-common.o): Add build rules.
6332 * linux-low: Include btrace-common.h.
6333 (linux_low_read_btrace): Use struct btrace_data. Call
6334 btrace_data_init and btrace_data_fini.
6336 2015-02-06 Pedro Alves <palves@redhat.com>
6338 * thread-db.c (find_new_threads_callback): Add debug output.
6340 2015-02-04 Pedro Alves <palves@redhat.com>
6342 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6343 (resume_stopped_resumed_lwps): New function.
6344 (linux_wait_for_event_filtered): Use it.
6346 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6348 * Makefile.in (SFILES): Add linux-personality.c.
6349 (linux-personality.o): New rule.
6350 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6351 list of objects to be built.
6352 * linux-low.c: Include nat/linux-personality.h.
6353 (linux_create_inferior): Remove code to disable address space
6354 randomization (moved to ../nat/linux-personality.c). Create
6355 cleanup to disable address space randomization.
6357 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6359 * Makefile.in (posix-strerror.o): New rule.
6360 (mingw-strerror.o): Likewise.
6361 * configure: Regenerated.
6362 * configure.ac: Source file ../common/common.host. Initialize new
6363 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6365 2015-01-14 Yao Qi <yao@codesourcery.com>
6367 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6368 (ppc-linux.o): New rule.
6369 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6370 * configure.ac: AC_CHECK_FUNCS(getauxval).
6371 * config.in: Re-generated.
6372 * configure: Re-generated.
6373 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6374 ppc64_64bit_inferior_p
6376 2015-01-14 Yao Qi <yao@codesourcery.com>
6378 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6379 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6380 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6381 (PT_ORIG_R3, PT_TRAP): Likewise.
6382 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6383 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6384 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6386 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6388 * i387-fp.c (i387_cache_to_xsave): In look over
6389 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6390 zmmh_low_space field by use of zmmh_high_space.
6392 2015-01-09 Pedro Alves <palves@redhat.com>
6394 * linux-low.c (step_over_bkpt): Move higher up in the file.
6395 (handle_extended_wait): Don't store the stop_pc here.
6396 (get_stop_pc): Adjust comments and rename to ...
6397 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6398 stopped for a software breakpoint or hardware breakpoint.
6399 (thread_still_has_status_pending_p): New function.
6400 (status_pending_p_callback): Use
6401 thread_still_has_status_pending_p. If the event is no longer
6402 interesting, resume the LWP.
6403 (handle_tracepoints): Add assert.
6404 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6405 (wstatus_maybe_breakpoint): New function.
6406 (cancel_breakpoint): Delete function.
6407 (check_stopped_by_watchpoint): New function, factored out from
6408 linux_low_filter_event.
6409 (lp_status_maybe_breakpoint): Delete function.
6410 (linux_low_filter_event): Remove filter_ptid argument.
6411 Leave thread group exits pending here. Store the LWP's stop PC.
6412 Always leave events pending.
6413 (linux_wait_for_event_filtered): Pull all events out of the
6414 kernel, and leave them all pending.
6415 (count_events_callback, select_event_lwp_callback): Consider all
6417 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6418 (select_event_lwp): Only give preference to the stepping LWP in
6419 all-stop mode. Adjust comments.
6420 (ignore_event): New function.
6421 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6422 references to cancel_breakpoints. Adjust to renames. Also give
6423 equal priority to all LWPs that have had events in non-stop mode.
6424 If reporting a software breakpoint event, unadjust the LWP's PC.
6425 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6426 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6428 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6429 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6430 (linux_stopped_by_watchpoint): Adjust.
6431 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6432 * linux-low.h (enum lwp_stop_reason): New.
6433 (struct lwp_info) <stop_pc>: Adjust comment.
6434 <stopped_by_watchpoint>: Delete field.
6435 <stop_reason>: New field.
6436 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6437 * mem-break.c (software_breakpoint_inserted_here)
6438 (hardware_breakpoint_inserted_here): New function.
6439 * mem-break.h (software_breakpoint_inserted_here)
6440 (hardware_breakpoint_inserted_here): Declare.
6441 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6442 (cancel_breakpoints): Delete.
6443 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6444 (upload_fast_traceframes): Remove references to
6447 2015-01-09 Pedro Alves <palves@redhat.com>
6449 * thread-db.c (find_new_threads_callback): Ignore thread if the
6450 kernel thread ID is -1.
6452 2015-01-09 Pedro Alves <palves@redhat.com>
6454 * linux-low.c (linux_attach_fail_reason_string): Move to
6455 nat/linux-ptrace.c, and rename.
6456 (linux_attach_lwp): Update comment.
6457 (attach_proc_task_lwp_callback): New function.
6458 (linux_attach): Adjust to rename and use
6459 linux_proc_attach_tgid_threads.
6460 (linux_attach_fail_reason_string): Delete declaration.
6462 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6464 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6465 * server.c (gdbserver_version): Likewise.
6467 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6469 * remote-utils.c: Include ctype.h.
6470 (input_interrupt): Explicitly handle the case when the char
6471 received is the NUL byte. Improve the printing of non-ASCII
6474 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6476 * linux-low.c (linux_low_filter_event): Update call to
6477 linux_enable_event_reporting following the addition of
6478 a new parameter to that function.
6480 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6483 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6484 (AARCH64_FPCR_REGNO): Likewise.
6485 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6486 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6487 (aarch64_store_fpregset): Likewise.
6489 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6491 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6492 Remove FIXME comment about assumption about N.
6494 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6496 * configure.ac: If large-file support is disabled in GDBserver,
6497 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6498 * configure: Regenerate.
6500 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6502 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6503 warning upon ENODATA from ptrace.
6504 * linux-s390-low.c (s390_store_tdb): New.
6505 (s390_regsets): Add regset for NT_S390_TDB.
6507 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6509 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6510 without a fill_function.
6511 * linux-s390-low.c (s390_fill_last_break): Remove.
6512 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6513 (s390_arch_setup): Use regset's size instead of fill_function for
6516 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6518 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6519 the regset's store function when ptrace returned an error.
6520 * regcache.c (get_thread_regcache): Invalidate register cache
6521 before fetching inferior's registers.
6523 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6525 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6526 while-loop as for-loop.
6527 (regsets_store_inferior_registers): Likewise.
6529 2014-11-28 Yao Qi <yao@codesourcery.com>
6531 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6532 * config.in, configure: Re-generate.
6533 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6536 2014-11-21 Yao Qi <yao@codesourcery.com>
6538 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6539 (AC_CHECK_HEADERS): Remove malloc.h.
6540 * configure: Re-generated.
6541 * config.in: Re-generated.
6542 * server.h: Don't include alloca.h and malloc.h.
6543 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6544 Don't include malloc.h.
6546 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6548 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6549 corresponding ERRNO check in same block.
6551 2014-11-12 Pedro Alves <palves@redhat.com>
6553 * server.c (cont_thread): Update comment.
6554 (start_inferior, attach_inferior): No longer clear cont_thread.
6555 (handle_v_cont): No longer set cont_thread.
6556 (captured_main): Clear cont_thread each time a GDB connects.
6558 2014-11-12 Pedro Alves <palves@redhat.com>
6560 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6561 thread, and don't resume all threads if the Hc thread has exited.
6563 2014-11-12 Pedro Alves <palves@redhat.com>
6565 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6566 the process group instead of to a specific LWP.
6568 2014-10-15 Pedro Alves <palves@redhat.com>
6571 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6573 (arm_set_thread_context): Delete.
6574 (the_low_target): Adjust.
6575 * win32-i386-low.c (debug_registers_changed)
6576 (debug_registers_used): Delete.
6577 (update_debug_registers_callback): New function.
6578 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6579 needing to update their debug registers.
6580 (win32_get_current_dr): New function.
6581 (x86_dr_low_get_addr, x86_dr_low_get_control)
6582 (x86_dr_low_get_status): Fetch the debug register from the thread
6584 (i386_initial_stuff): Adjust.
6585 (i386_get_thread_context): Remove current_event parameter. Don't
6586 clear debug_registers_changed nor copy DR values to
6588 (i386_set_thread_context): Delete.
6589 (i386_prepare_to_resume): New function.
6590 (i386_thread_added): Mark the thread as needing to update irs
6592 (the_low_target): Remove i386_set_thread_context and install
6593 i386_prepare_to_resume.
6594 * win32-low.c (win32_get_thread_context): Adjust.
6595 (win32_set_thread_context): Use SetThreadContext
6597 (win32_prepare_to_resume): New function.
6598 (win32_require_context): New function, factored out from ...
6599 (thread_rec): ... this.
6600 (continue_one_thread): Call win32_prepare_to_resume on each thread
6601 we're about to continue.
6602 (win32_resume): Call win32_prepare_to_resume on the event thread.
6603 * win32-low.h (struct win32_thread_info)
6604 <debug_registers_changed>: New field.
6605 (struct win32_target_ops): Change prototype of set_thread_context,
6606 delete set_thread_context and add prepare_to_resume.
6607 (win32_require_context): New declaration.
6609 2014-10-08 Gary Benson <gbenson@redhat.com>
6611 * server.h: Do not include common-exceptions.h.
6613 2014-10-08 Gary Benson <gbenson@redhat.com>
6615 * server.h: Do not include cleanups.h.
6617 2014-09-30 James Hogan <james.hogan@imgtec.com>
6619 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6622 2014-09-23 Yao Qi <yao@codesourcery.com>
6624 * linux-low.c (lp_status_maybe_breakpoint): New function.
6625 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6626 (count_events_callback): Likewise.
6627 (select_event_lwp_callback): Likewise.
6628 (cancel_breakpoints_callback): Likewise.
6630 2014-09-19 Don Breazeal <donb@codesourcery.com>
6632 * linux-low.c (handle_extended_wait): Call
6633 linux_ptrace_get_extended_event.
6634 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6635 linux_is_extended_waitstatus.
6637 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6639 * Makefile.in (CPPFLAGS): Define.
6640 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6641 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6643 2014-09-16 Gary Benson <gbenson@redhat.com>
6645 * inferiors.h (current_inferior): Renamed as...
6646 (current_thread): New variable. All uses updated.
6647 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6648 (maybe_move_out_of_jump_pad): Likewise.
6649 (cancel_breakpoint): Likewise.
6650 (linux_low_filter_event): Likewise.
6651 (wait_for_sigstop): Likewise.
6652 (linux_resume_one_lwp): Likewise.
6653 (need_step_over_p): Likewise.
6654 (start_step_over): Likewise.
6655 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6656 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6657 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6658 and save_inferior as saved_thread.
6659 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6661 (regcache_invalidate_thread): Likewise.
6662 * remote-utils.c (prepare_resume_reply): Likewise.
6663 * thread-db.c (thread_db_get_tls_address): Likewise.
6664 (disable_thread_event_reporting): Likewise.
6665 (remove_thread_event_breakpoints): Likewise.
6666 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6668 * target.h (set_desired_inferior): Renamed as...
6669 (set_desired_thread): New declaration. All uses updated.
6670 * server.c (myresume): Updated comment to reference thread instead
6672 (handle_serial_event): Likewise.
6673 (handle_target_event): Likewise.
6675 2014-09-12 Tom Tromey <tromey@redhat.com>
6676 Gary Benson <gbenson@redhat.com>
6678 * regcache.h: Include common-regcache.h.
6679 (regcache_read_pc): Don't declare.
6680 * regcache.c (get_thread_regcache_for_ptid): New function.
6682 2014-09-11 Tom Tromey <tromey@redhat.com>
6683 Gary Benson <gbenson@redhat.com>
6685 * symbol.c: New file.
6686 * Makefile.in (SFILES): Add symbol.c.
6687 (OBS): Add symbol.o.
6689 2014-09-11 Gary Benson <gbenson@redhat.com>
6691 * target.c (target_stop_ptid, target_continue_ptid): New
6694 2014-09-11 Tom Tromey <tromey@redhat.com>
6695 Gary Benson <gbenson@redhat.com>
6697 * target.h: Include target/target.h.
6698 * target.c (target_read_memory, target_read_uint32)
6699 (target_write_memory): New functions.
6701 2014-09-11 Gary Benson <gbenson@redhat.com>
6703 * server.h (debug_hw_points): Don't declare.
6704 * server.c (debug_hw_points): Don't define. Replace all uses
6705 with show_debug_regs.
6706 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6707 all uses with show_debug_regs.
6709 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6711 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6712 endianness into account.
6713 (ppc_supply_ptrace_register): Likewise.
6715 2014-09-03 James Hogan <james.hogan@imgtec.com>
6717 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6718 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6720 2014-09-03 Gary Benson <gbenson@redhat.com>
6722 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6723 ALL_DEBUG_ADDRESS_REGISTERS.
6725 2014-09-02 Gary Benson <gbenson@redhat.com>
6727 * i386-low.h: Renamed as...
6728 * x86-low.h: New file. All type, function and variable name
6729 prefixes changed from "i386_" to "x86_". All references updated.
6730 * i386-low.c: Renamed as...
6731 * x86-low.c: New file. All type, function and variable name
6732 prefixes changed from "i386_" to "x86_". All references updated.
6734 2014-09-02 Gary Benson <gbenson@redhat.com>
6736 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6737 (x86_linux_new_thread): Likewise.
6739 2014-08-29 Gary Benson <gbenson@redhat.com>
6741 * server.h (setjmp.h): Do not include.
6742 (toplevel): Do not declare.
6743 (common-exceptions.h): Include.
6744 (cleanups.h): Likewise.
6745 * server.c (toplevel): Do not define.
6746 (exit_code): New static global.
6747 (detach_or_kill_for_exit_cleanup): New function.
6748 (main): New function. Original main renamed to...
6749 (captured_main): New function.
6750 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6752 2014-08-29 Gary Benson <gbenson@redhat.com>
6754 * Makefile.in (SFILES): Add common/common-exceptions.c.
6755 (OBS): Add common-exceptions.o.
6756 (common-exceptions.o): New rule.
6757 * utils.c (prepare_to_throw_exception): New function.
6759 2014-08-29 Gary Benson <gbenson@redhat.com>
6761 * config.in: Regenerate.
6762 * configure: Likewise.
6764 2014-08-29 Gary Benson <gbenson@redhat.com>
6766 * Makefile.in (SFILES): Add common/cleanups.c.
6768 (cleanups.o): New rule.
6770 2014-08-29 Gary Benson <gbenson@redhat.com>
6772 * utils.c (internal_vwarning): New function.
6774 2014-08-28 Gary Benson <gbenson@redhat.com>
6776 * utils.h (fatal): Remove declaration.
6777 * utils.c (fatal): Remove function.
6779 2014-08-28 Gary Benson <gbenson@redhat.com>
6781 * tracepoint.c (gdb_agent_init): Replace fatal with
6783 (initialize_tracepoint): Likewise.
6785 2014-08-28 Gary Benson <gbenson@redhat.com>
6787 * remote-utils.c (remote_prepare): Replace fatal with error.
6789 2014-08-28 Gary Benson <gbenson@redhat.com>
6791 * linux-low.c (linux_async): Replace fatal with warning.
6793 (linux_start_non_stop): Return -1 if linux_async failed.
6795 2014-08-28 Gary Benson <gbenson@redhat.com>
6797 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6799 (i386_dr_low_get_addr): Remove vague comment.
6800 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6803 2014-08-28 Gary Benson <gbenson@redhat.com>
6805 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6806 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6808 (linux_resume_one_lwp): Likewise.
6809 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6811 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6812 with internal_error.
6813 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6814 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6815 (find_register_by_name): Replace fatal with internal_error.
6816 (find_regno): Likewise.
6817 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6818 * thread-db.c (thread_db_create_event): Likewise.
6819 (thread_db_load_search): Likewise.
6820 (try_thread_db_load_1): Likewise.
6821 * tracepoint.c (get_jump_space_head): Replace fatal with
6823 (claim_trampoline_space): Likewise.
6824 (have_fast_tracepoint_trampoline_buffer): Likewise.
6825 (cmd_qtstart): Likewise.
6826 (stop_tracing): Likewise.
6827 (fast_tracepoint_collecting): Likewise.
6828 (target_malloc): Likewise.
6829 (download_tracepoint): Likewise.
6830 (download_trace_state_variables): Replace check with gdb_assert.
6831 (upload_fast_traceframes): Replace fatal with internal_error.
6833 2014-08-19 Tom Tromey <tromey@redhat.com>
6834 Gary Benson <gbenson@redhat.com>
6836 * Makefile.in (SFILES): Add common/common-debug.c.
6837 (OBS): Add common-debug.o.
6838 (common-debug.o): New rule.
6839 * debug.h (debug_printf): Don't declare.
6840 * debug.c (debug_printf): Renamed and rewritten as...
6841 (debug_vprintf): New function.
6843 2014-08-19 Gary Benson <gbenson@redhat.com>
6845 * utils.h: Do not include print-utils.h.
6847 2014-08-19 Tom Tromey <tromey@redhat.com>
6848 Gary Benson <gbenson@redhat.com>
6850 * server.h: Add static assertion.
6851 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6853 2014-08-19 Tom Tromey <tromey@redhat.com>
6854 Gary Benson <gbenson@redhat.com>
6856 * Makefile.in (SFILES): Add common/errors.c.
6857 (OBS): Add errors.o.
6858 (IPA_OBS): Add errors-ipa.o.
6859 (errors.o): New rule.
6860 (errors-ipa.o): Likewise.
6861 * utils.h (perror_with_name, error, warning): Don't declare.
6862 * utils.c (warning): Renamed and rewritten as...
6863 (vwarning): New function.
6864 (error): Renamed and rewritten as...
6865 (verror): New function.
6866 (internal_error): Renamed and rewritten as...
6867 (internal_verror): New function.
6869 2014-08-07 Gary Benson <gbenson@redhat.com>
6871 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6872 * configure: Regenerate.
6873 * config.in: Likewise.
6874 * server.h: Do not include errno.h.
6875 * event-loop.c: Likewise.
6876 * hostio-errno.c: Likewise.
6877 * linux-low.c: Likewise.
6878 * remote-utils.c: Likewise.
6879 * spu-low.c: Likewise.
6880 * utils.c: Likewise.
6881 * gdbreplay.c: Unconditionally include errno.h.
6883 2014-08-07 Gary Benson <gbenson@redhat.com>
6885 * server.h: Do not include string.h.
6886 * event-loop.c: Likewise.
6887 * linux-low.c: Likewise.
6888 * regcache.c: Likewise.
6889 * remote-utils.c: Likewise.
6890 * spu-low.c: Likewise.
6891 * utils.c: Likewise.
6893 2014-08-07 Gary Benson <gbenson@redhat.com>
6895 * server.h: Do not include gdb_assert.h.
6897 2014-08-07 Gary Benson <gbenson@redhat.com>
6899 * server.h: Do not include common-utils.h.
6901 2014-08-07 Gary Benson <gbenson@redhat.com>
6903 * server.h: Do not include ptid.h.
6904 * notif.h: Likewise.
6906 2014-08-07 Gary Benson <gbenson@redhat.com>
6908 * server.h: Do not include gdb_locale.h.
6910 2014-08-07 Gary Benson <gbenson@redhat.com>
6912 * server.h: Do not include gdb/signals.h.
6913 * win32-low.c: Likewise.
6915 2014-08-07 Gary Benson <gbenson@redhat.com>
6917 * server.h: Do not include pathmax.h.
6919 2014-08-07 Gary Benson <gbenson@redhat.com>
6921 * server.h: Do not include libiberty.h.
6922 * linux-bfin-low.c: Likewise.
6924 2014-08-07 Gary Benson <gbenson@redhat.com>
6926 * server.h: Do not include ansidecl.h.
6928 2014-08-07 Gary Benson <gbenson@redhat.com>
6930 * linux-x86-low.c: Do not include stddef.h.
6931 * lynx-ppc-low.c: Likewise.
6932 * tracepoint.c: Likewise.
6934 2014-08-07 Gary Benson <gbenson@redhat.com>
6936 * server.h: Do not include stdarg.h.
6937 * nto-low.c: Likewise.
6939 2014-08-07 Gary Benson <gbenson@redhat.com>
6941 * server.h: Do not include stdlib.h.
6942 * inferiors.c: Likewise.
6943 * linux-low.c: Likewise.
6944 * regcache.c: Likewise.
6945 * spu-low.c: Likewise.
6946 * tracepoint.c: Likewise.
6947 * utils.c: Likewise.
6949 2014-08-07 Gary Benson <gbenson@redhat.com>
6951 * server.h: Do not include stdio.h.
6952 * linux-low.c: Likewise.
6953 * remote-utils.c: Likewise.
6954 * spu-low.c: Likewise.
6955 * utils.c: Likewise.
6956 * wincecompat.c: Likewise.
6958 2014-08-06 Gary Benson <gbenson@redhat.com>
6960 * regcache.c (init_register_cache): Move conditionals inside if.
6962 2014-08-06 Gary Benson <gbenson@redhat.com>
6964 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6966 2014-07-31 Gary Benson <gbenson@redhat.com>
6968 * ax.h: Do not include server.h.
6969 * gdbthread.h: Likewise.
6970 * lynx-low.h: Likewise.
6971 * notif.h: Likewise.
6973 2014-07-30 Gary Benson <gbenson@redhat.com>
6975 * server.h: Include common-defs.h.
6976 Do not include config.h or build-gnulib-gdbserver/config.h.
6978 2014-07-30 Gary Benson <gbenson@redhat.com>
6980 * hostio-errno.c: Move server.h to top of includes list.
6981 * inferiors.c: Likewise.
6982 * linux-x86-low.c: Likewise.
6983 * notif.c: Include server.h.
6985 2014-07-24 Tom Tromey <tromey@redhat.com>
6986 Gary Benson <gbenson@redhat.com>
6988 * server.h (CORE_ADDR): Now unsigned.
6990 2014-07-16 Pedro Alves <palves@redhat.com>
6992 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6994 2014-07-15 Pedro Alves <palves@redhat.com>
6996 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6999 2014-07-11 Pedro Alves <palves@redhat.com>
7001 * linux-low.c (kill_wait_lwp): New function, based on
7002 kill_one_lwp_callback, but use my_waitpid directly.
7003 (kill_one_lwp_callback, linux_kill): Use it.
7005 2014-06-23 Pedro Alves <palves@redhat.com>
7007 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7008 before setting DR0..DR3.
7010 2014-06-20 Gary Benson <gbenson@redhat.com>
7012 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7013 * configure: Regenerated.
7014 * config.in: Likewise.
7016 2014-06-20 Gary Benson <gbenson@redhat.com>
7018 * Makefile.in (SFILES): Update locations for files moved
7020 (object file files): Reordered.
7022 2014-06-20 Gary Benson <gbenson@redhat.com>
7024 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7025 (i386_dr_low_set_addr): Likewise.
7026 (i386_dr_low_get_addr): Likewise.
7027 (i386_dr_low_can_set_control): Likewise.
7028 (i386_dr_low_set_control): Likewise.
7029 (i386_dr_low_get_control): Likewise.
7030 (i386_dr_low_get_status): Likewise.
7031 (i386_get_debug_register_length): Likewise.
7032 * linux-x86-low.c (i386_dr_low_set_addr):
7033 Changed signature. Made static.
7034 (i386_dr_low_get_addr): Likewise.
7035 (i386_dr_low_set_control): Likewise.
7036 (i386_dr_low_get_control): Likewise.
7037 (i386_dr_low_get_status): Likewise.
7038 (i386_dr_low): New global variable.
7039 * win32-i386-low.c (i386_dr_low_set_addr):
7040 Changed signature. Made static.
7041 (i386_dr_low_get_addr): Likewise.
7042 (i386_dr_low_set_control): Likewise.
7043 (i386_dr_low_get_control): Likewise.
7044 (i386_dr_low_get_status): Likewise.
7045 (i386_dr_low): New global variable.
7047 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7049 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7050 * Makefile.in (AR, AR_FLAGS): Define.
7051 * configure: Regenerate.
7053 2014-06-19 Gary Benson <gbenson@redhat.com>
7055 * Makefile.in (i386-dregs.o): New rule.
7056 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7057 * i386-low.c (target.h): Remove include.
7058 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7059 (DR_CONTROL_SHIFT): Likewise.
7060 (DR_CONTROL_SIZE): Likewise.
7061 (DR_RW_EXECUTE): Likewise.
7062 (DR_RW_WRITE): Likewise.
7063 (DR_RW_READ): Likewise.
7064 (DR_RW_IORW): Likewise.
7065 (DR_LEN_1): Likewise.
7066 (DR_LEN_2): Likewise.
7067 (DR_LEN_4): Likewise.
7068 (DR_LEN_8): Likewise.
7069 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7070 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7071 (DR_ENABLE_SIZE): Likewise.
7072 (DR_LOCAL_SLOWDOWN): Likewise.
7073 (DR_GLOBAL_SLOWDOWN): Likewise.
7074 (DR_CONTROL_RESERVED): Likewise.
7075 (I386_DR_CONTROL_MASK): Likewise.
7076 (I386_DR_VACANT): Likewise.
7077 (I386_DR_LOCAL_ENABLE): Likewise.
7078 (I386_DR_GLOBAL_ENABLE): Likewise.
7079 (I386_DR_DISABLE): Likewise.
7080 (I386_DR_SET_RW_LEN): Likewise.
7081 (I386_DR_GET_RW_LEN): Likewise.
7082 (I386_DR_WATCH_HIT): Likewise.
7083 (i386_wp_op_t): Likewise.
7084 (i386_show_dr): Likewise.
7085 (i386_length_and_rw_bits): Likewise.
7086 (i386_insert_aligned_watchpoint): Likewise.
7087 (i386_remove_aligned_watchpoint): Likewise.
7088 (i386_handle_nonaligned_watchpoint): Likewise.
7089 i386_update_inferior_debug_regs(): Likewise.
7090 (i386_dr_insert_watchpoint): Likewise.
7091 (i386_dr_remove_watchpoint): Likewise.
7092 (i386_dr_region_ok_for_watchpoint): Likewise.
7093 (i386_dr_stopped_data_address): Likewise.
7094 (i386_dr_stopped_by_watchpoint): Likewise.
7096 2014-06-19 Gary Benson <gbenson@redhat.com>
7098 * i386-low.c (i386_dr_show): Renamed to
7099 i386_show_dr and made static. All uses updated.
7100 (i386_dr_length_and_rw_bits): Renamed to
7101 i386_length_and_rw_bits and made static.
7103 (i386_dr_insert_aligned_watchpoint): Renamed to
7104 i386_insert_aligned_watchpoint and made static.
7106 (i386_dr_remove_aligned_watchpoint): Renamed to
7107 i386_remove_aligned_watchpoint and made static.
7109 (i386_dr_update_inferior_debug_regs): Renamed to
7110 i386_update_inferior_debug_regs and made static.
7113 2014-06-18 Gary Benson <gbenson@redhat.com>
7115 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7116 (i386_dr_low_can_set_control): Likewise.
7117 (i386_get_debug_register_length): Likewise.
7118 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7119 (i386_dr_low_can_set_control): Likewise.
7120 (i386_get_debug_register_length): Likewise.
7122 2014-06-17 Gary Benson <gbenson@redhat.com>
7124 * i386-low.h (i386-dregs.h): New include.
7125 (DR_FIRSTADDR): Now in i386-dregs.h.
7126 (DR_LASTADDR): Likewise.
7127 (DR_NADDR): Likewise.
7128 (DR_STATUS): Likewise.
7129 (DR_CONTROL): Likewise.
7130 (i386_debug_reg_state): Likewise.
7131 (i386_dr_insert_watchpoint): Likewise.
7132 (i386_dr_remove_watchpoint): Likewise.
7133 (i386_dr_region_ok_for_watchpoint): Likewise.
7134 (i386_dr_stopped_data_address): Likewise.
7135 (i386_dr_stopped_by_watchpoint): Likewise.
7136 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7138 2014-06-18 Gary Benson <gbenson@redhat.com>
7140 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7141 i386_dr_insert_watchpoint.
7142 (i386_low_remove_watchpoint): Renamed to
7143 i386_dr_remove_watchpoint.
7144 (i386_low_region_ok_for_watchpoint): Renamed to
7145 i386_dr_region_ok_for_watchpoint.
7146 (i386_low_stopped_data_address): Renamed to
7147 i386_dr_stopped_data_address.
7148 (i386_low_stopped_by_watchpoint): Renamed to
7149 i386_dr_stopped_by_watchpoint.
7150 * i386-low.c (i386_show_dr): Renamed to
7151 i386_dr_show and made nonstatic. All uses updated.
7152 (i386_length_and_rw_bits): Renamed to
7153 i386_dr_length_and_rw_bits and made nonstatic.
7155 (i386_insert_aligned_watchpoint): Renamed to
7156 i386_dr_insert_aligned_watchpoint and made nonstatic.
7158 (i386_remove_aligned_watchpoint): Renamed to
7159 i386_dr_remove_aligned_watchpoint and made nonstatic.
7161 (i386_update_inferior_debug_regs): Renamed to
7162 i386_dr_update_inferior_debug_regs and made nonstatic.
7164 (i386_low_insert_watchpoint): Renamed to
7165 i386_dr_insert_watchpoint. All uses updated.
7166 (i386_low_remove_watchpoint): Renamed to
7167 i386_dr_remove_watchpoint. All uses updated.
7168 (i386_low_region_ok_for_watchpoint): Renamed to
7169 i386_dr_region_ok_for_watchpoint. All uses updated.
7170 (i386_low_stopped_data_address): Renamed to
7171 i386_dr_stopped_data_address. All uses updated.
7172 (i386_low_stopped_by_watchpoint): Renamed to
7173 i386_dr_stopped_by_watchpoint. All uses updated.
7175 2014-06-18 Gary Benson <gbenson@redhat.com>
7177 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7178 (i386_dr_low_can_set_control): Likewise.
7179 (i386_insert_aligned_watchpoint): New check.
7181 2014-06-18 Gary Benson <gbenson@redhat.com>
7183 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7186 2014-06-18 Gary Benson <gbenson@redhat.com>
7188 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7189 instead of fatal and error.
7190 (i386_handle_nonaligned_watchpoint): Likewise.
7192 2014-06-18 Gary Benson <gbenson@redhat.com>
7194 * i386-low.c (i386_get_debug_register_length): New macro.
7195 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7196 (i386_show_dr): Use debug_printf instead of fprintf. Use
7197 phex to format values.
7199 2014-06-18 Gary Benson <gbenson@redhat.com>
7201 * i386-low.h: Comment changes.
7202 * i386-low.c: Likewise.
7204 2014-06-18 Gary Benson <gbenson@redhat.com>
7206 * i386-low.c: Whitespace changes.
7208 2014-06-12 Tom Tromey <tromey@redhat.com>
7210 * utils.c (freeargv): Remove.
7212 2014-06-12 Tom Tromey <tromey@redhat.com>
7214 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7215 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7216 (parse_debug_format_options): Likewise.
7217 (gdbserver_usage): Likewise.
7218 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7219 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7220 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7222 ($(LIBGNU)): Depend on libiberty.
7223 (all-lib): Recurse into all subdirs.
7224 (install-only): Invoke "install" target in subdirs.
7225 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7227 * configure: Rebuild.
7228 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7229 for vasprintf, vsnprintf, or gettimeofday.
7230 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7233 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7235 * development.sh: Delete.
7236 * Makefile.in (config.status): Adjust dependency on development.sh.
7237 * configure.ac: Adjust development.sh source call.
7238 * configure: Regenerate.
7240 2014-06-02 Pedro Alves <palves@redhat.com>
7242 * ax.c (gdb_free_agent_expr): New function.
7243 * ax.h (gdb_free_agent_expr): New declaration.
7244 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7246 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7248 (clear_breakpoint_conditions_and_commands): New function.
7249 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7250 (clear_breakpoint_conditions_and_commands): New declaration.
7252 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7254 * linux-aarch64-low.c (asm/ptrace.h): Include.
7256 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7258 Fix TLS access for -static -pthread.
7259 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7260 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7261 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7263 2014-05-20 Pedro Alves <palves@redhat.com>
7265 * linux-aarch64-low.c (aarch64_insert_point)
7266 (aarch64_remove_point): No longer check whether the type is
7267 supported here. Adjust to new interface.
7268 (the_low_target): Install aarch64_supports_z_point_type as
7269 supports_z_point_type method.
7270 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7271 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7272 instead of a Z packet char. Adjust.
7273 (arm_supports_z_point_type): New function.
7274 (arm_insert_point, arm_remove_point): Adjust to new interface.
7275 (the_low_target): Install arm_supports_z_point_type.
7276 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7277 (cris_insert_point, cris_remove_point): Adjust to new interface.
7278 Don't check whether the type is supported here.
7279 (the_low_target): Install cris_supports_z_point_type.
7280 * linux-low.c (linux_supports_z_point_type): New function.
7281 (linux_insert_point, linux_remove_point): Adjust to new interface.
7282 * linux-low.h (struct linux_target_ops) <insert_point,
7283 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7284 raw_breakpoint pointer parameter.
7285 <supports_z_point_type>: New method.
7286 * linux-mips-low.c (mips_supports_z_point_type): New function.
7287 (mips_insert_point, mips_remove_point): Adjust to new interface.
7288 Use mips_supports_z_point_type.
7289 (the_low_target): Install mips_supports_z_point_type.
7290 * linux-ppc-low.c (the_low_target): Install NULL as
7291 supports_z_point_type method.
7292 * linux-s390-low.c (the_low_target): Install NULL as
7293 supports_z_point_type method.
7294 * linux-sparc-low.c (the_low_target): Install NULL as
7295 supports_z_point_type method.
7296 * linux-x86-low.c (x86_supports_z_point_type): New function.
7297 (x86_insert_point): Adjust to new insert_point interface. Use
7298 insert_memory_breakpoint. Adjust to new
7299 i386_low_insert_watchpoint interface.
7300 (x86_remove_point): Adjust to remove_point interface. Use
7301 remove_memory_breakpoint. Adjust to new
7302 i386_low_remove_watchpoint interface.
7303 (the_low_target): Install x86_supports_z_point_type.
7304 * lynx-low.c (lynx_target_ops): Install NULL as
7305 supports_z_point_type callback.
7306 * nto-low.c (nto_supports_z_point_type): New.
7307 (nto_insert_point, nto_remove_point): Adjust to new interface.
7308 (nto_target_ops): Install nto_supports_z_point_type.
7309 * mem-break.c: Adjust intro comment.
7310 (struct raw_breakpoint) <raw_type, size>: New fields.
7311 <inserted>: Update comment.
7312 <shlib_disabled>: Delete field.
7313 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7314 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7315 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7316 (raw_bkpt_type_to_target_hw_bp_type): New function.
7317 (find_enabled_raw_code_breakpoint_at): New function.
7318 (find_raw_breakpoint_at): New type and size parameters. Use them.
7319 (insert_memory_breakpoint): New function, based off
7320 set_raw_breakpoint_at.
7321 (remove_memory_breakpoint): New function.
7322 (set_raw_breakpoint_at): Reimplement.
7323 (set_breakpoint): New, based on set_breakpoint_at.
7324 (set_breakpoint_at): Reimplement.
7325 (delete_raw_breakpoint): Go through the_target->remove_point
7326 instead of assuming memory breakpoints.
7327 (find_gdb_breakpoint_at): Delete.
7328 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7329 (find_gdb_breakpoint): New function.
7330 (set_gdb_breakpoint_at): Delete.
7331 (z_type_supported): New function.
7332 (set_gdb_breakpoint_1): New function, loosely based off
7333 set_gdb_breakpoint_at.
7334 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7335 (delete_gdb_breakpoint_at): Delete.
7336 (delete_gdb_breakpoint_1): New function, loosely based off
7337 delete_gdb_breakpoint_at.
7338 (delete_gdb_breakpoint): New function.
7339 (clear_gdb_breakpoint_conditions): Rename to ...
7340 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7342 (add_condition_to_breakpoint): Make static.
7343 (add_breakpoint_condition): Take a struct breakpoint pointer
7344 instead of an address. Adjust.
7345 (gdb_condition_true_at_breakpoint): Rename to ...
7346 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7348 (gdb_condition_true_at_breakpoint): Reimplement.
7349 (add_breakpoint_commands): Take a struct breakpoint pointer
7350 instead of an address. Adjust.
7351 (gdb_no_commands_at_breakpoint): Rename to ...
7352 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7353 parameter. Return true if no breakpoint was found. Change debug
7355 (gdb_no_commands_at_breakpoint): Reimplement.
7356 (run_breakpoint_commands): Rename to ...
7357 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7358 and change return type to boolean.
7359 (run_breakpoint_commands): New function.
7360 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7361 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7362 breakpoint. Go through the_target->remove_point instead of
7363 assuming memory breakpoint.
7364 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7365 software and hardware breakpoints.
7366 (reinsert_raw_breakpoint): Go through the_target->insert_point
7367 instead of assuming memory breakpoint.
7368 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7369 software and hardware breakpoints.
7370 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7371 Check both software and hardware breakpoints.
7372 (validate_inserted_breakpoint): Assert the breakpoint is a
7373 software breakpoint. Set the inserted flag to -1 instead of
7374 setting shlib_disabled.
7375 (delete_disabled_breakpoints): Adjust.
7376 (validate_breakpoints): Only validate software breakpoints.
7377 Adjust to inserted flag change.
7378 (check_mem_read, check_mem_write): Skip breakpoint types other
7379 than software breakpoints. Adjust to inserted flag change.
7380 * mem-break.h (enum raw_bkpt_type): New enum.
7381 (raw_breakpoint, struct process_info): Forward declare.
7382 (Z_packet_to_target_hw_bp_type): Delete declaration.
7383 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7384 (set_gdb_breakpoint, delete_gdb_breakpoint)
7385 (clear_breakpoint_conditions): New declarations.
7386 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7387 (breakpoint_inserted_here): Update comment.
7388 (add_breakpoint_condition, add_breakpoint_commands): Replace
7389 address parameter with a breakpoint pointer parameter.
7390 (gdb_breakpoint_here): Update comment.
7391 (delete_gdb_breakpoint_at): Delete.
7392 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7393 * server.c (process_point_options): Take a struct breakpoint
7394 pointer instead of an address. Adjust.
7395 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7396 delete_gdb_breakpoint.
7397 * spu-low.c (spu_target_ops): Install NULL as
7398 supports_z_point_type method.
7399 * target.h: Include mem-break.h.
7400 (struct target_ops) <prepare_to_access_memory>: Update comment.
7401 <supports_z_point_type>: New field.
7402 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7403 instead of a char. Also take a raw breakpoint pointer.
7404 * win32-arm-low.c (the_low_target): Install NULL as
7405 supports_z_point_type.
7406 * win32-i386-low.c (i386_supports_z_point_type): New function.
7407 (i386_insert_point, i386_remove_point): Adjust to new interface.
7408 (the_low_target): Install i386_supports_z_point_type.
7409 * win32-low.c (win32_supports_z_point_type): New function.
7410 (win32_insert_point, win32_remove_point): Adjust to new interface.
7411 (win32_target_ops): Install win32_supports_z_point_type.
7412 * win32-low.h (struct win32_target_ops):
7413 <supports_z_point_type>: New method.
7414 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7415 instead of a char. Also take a raw breakpoint pointer.
7417 2014-05-20 Pedro Alves <palves@redhat.com>
7419 * mem-break.h: Include break-common.h.
7420 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7421 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7422 (Z_packet_to_target_hw_bp_type): New declaration.
7423 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7424 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7425 (Z_PACKET_ACCESS_WP): Delete macros.
7426 (Z_packet_to_hw_type): Delete function.
7427 * i386-low.h: Don't include break-common.h here.
7428 (Z_packet_to_hw_type): Delete declaration.
7429 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7430 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7431 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7432 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7433 * linux-aarch64-low.c: Don't include break-common.h here.
7434 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7435 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7436 (Z_packet_to_target_hw_bp_type): Delete function.
7437 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7439 (mips_insert_point, mips_remove_point): Use
7440 Z_packet_to_target_hw_bp_type.
7442 2014-05-20 Pedro Alves <palves@redhat.com>
7444 * linux-aarch64-low.c: Include break-common.h.
7445 (enum target_point_type): Delete.
7446 (Z_packet_to_point_type): Rename to ...
7447 (Z_packet_to_target_hw_bp_type): ... this, and return a
7448 target_hw_bp_type instead.
7449 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7450 instead of an enum target_point_type.
7451 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7453 (aarch64_dr_state_insert_one_point)
7454 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7455 (aarch64_handle_aligned_watchpoint)
7456 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7457 Take an enum target_hw_bp_type instead of an enum
7459 (aarch64_supports_z_point_type): New function.
7460 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7461 use Z_packet_to_target_hw_bp_type.
7463 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7465 * configure.ac: Only use -Werror by default when DEVELOPMENT
7467 * configure: Regenerate.
7469 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7471 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7472 * linux-x86-low.c (X86_64_USER_REGS): New.
7473 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7475 2014-04-28 Yao Qi <yao@codesourcery.com>
7477 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7480 2014-04-25 Pedro Alves <palves@redhat.com>
7483 * linux-low.c (linux_attach_fail_reason_string): New function.
7484 (linux_attach_lwp): Delete.
7485 (linux_attach_lwp_1): Rename to ...
7486 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7487 argument. Remove "initial" parameter. Return int instead of
7488 void. Don't error or warn here.
7489 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7490 failure to attach to the tgid. Call warning when failing to
7492 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7493 argument. Remove "initial" parameter. Return int instead of
7494 void. Don't error or warn here.
7495 (linux_attach_fail_reason_string): New declaration.
7496 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7497 interface change. Use linux_attach_fail_reason_string.
7499 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7500 Walfred Tedeschi <walfred.tedeschi@intel.com>
7502 * Makefile.in: Added rules to handle new files
7503 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7504 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7505 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7506 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7507 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7508 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7510 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7511 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7512 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7513 i386/x32-avx512.xml.
7514 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7515 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7516 i386/x32-avx512-linux.xml.
7517 * i387-fp.c (num_avx512_k_registers): New constant for number
7519 (num_avx512_zmmh_low_registers): New constant for number of
7520 lower ZMM registers (0-15).
7521 (num_avx512_zmmh_high_registers): New constant for number of
7522 higher ZMM registers (16-31).
7523 (num_avx512_ymmh_registers): New contant for number of higher
7524 YMM registers (ymm16-31 added by avx521 on x86_64).
7525 (num_avx512_xmm_registers): New constant for number of higher
7526 XMM registers (xmm16-31 added by AVX512 on x86_64).
7527 (struct i387_xsave): Add space for AVX512 registers.
7528 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7529 Add code to handle AVX512 registers.
7530 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7531 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7532 prototypei from generated file.
7533 (tdesc_amd64_avx512_linux): Likewise.
7534 (init_registers_x32_avx512_linux): Likewise.
7535 (tdesc_x32_avx512_linux): Likewise.
7536 (init_registers_i386_avx512_linux): Likewise.
7537 (tdesc_i386_avx512_linux): Likewise.
7538 (x86_64_regmap): Add AVX512 registers.
7539 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7541 (initialize_low_arch): Add code to initialize AVX512 registers.
7543 2014-04-23 Pedro Alves <palves@redhat.com>
7545 * mem-break.c (find_gdb_breakpoint_at): Make static.
7546 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7548 2014-04-23 Pedro Alves <palves@redhat.com>
7550 * i386-low.c: Don't include break-common.h here.
7551 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7552 prototype to take target_hw_bp_type as argument instead of a Z
7554 * i386-low.h: Include break-common.h here.
7555 (Z_packet_to_hw_type): Declare.
7556 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7558 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7559 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7560 (x86_remove_point): Convert the packet number to a
7561 target_hw_bp_type before calling i386_low_remove_watchpoint.
7562 * win32-i386-low.c (i386_insert_point): Convert the packet number
7563 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7564 (i386_remove_point): Convert the packet number to a
7565 target_hw_bp_type before calling i386_low_remove_watchpoint.
7567 2014-04-23 Pedro Alves <palves@redhat.com>
7569 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7571 2014-04-10 Pedro Alves <palves@redhat.com>
7573 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7574 Check if the condition or command is NULL before checking if the
7575 breakpoint is known. On success, return true.
7576 * mem-break.h (add_breakpoint_condition): Document return.
7577 (add_breakpoint_commands): Add describing comment.
7578 * server.c (skip_to_semicolon): New function.
7579 (process_point_options): Use it.
7581 2014-04-09 Pedro Alves <palves@redhat.com>
7583 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7586 2014-02-27 Pedro Alves <palves@redhat.com>
7589 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7591 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7593 (last_thread_of_process_p): Take a PID argument instead of a
7595 (linux_wait_for_lwp): Delete.
7596 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7598 (linux_low_filter_event): New function, party factored out from
7599 linux_wait_for_event.
7600 (linux_wait_for_event): Rename to ...
7601 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7602 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7603 sigsuspend. Check for zombie leaders.
7604 (linux_wait_for_event): Reimplement as wrapper around
7605 linux_wait_for_event_filtered.
7606 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7607 a normal or signal exit is seen, it's the whole process exiting.
7608 (wait_for_sigstop): No longer a for_each_inferior callback.
7609 Rewrite on top of linux_wait_for_event_filtered.
7610 (stop_all_lwps): Call wait_for_sigstop directly.
7611 * server.c (resume, handle_target_event): Handle
7612 TARGET_WAITKIND_NO_RESUMED.
7614 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7616 * win32-low.c (psapi_get_dll_name,
7617 * win32_CreateToolhelp32Snapshot): Delete.
7618 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7619 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7621 (handle_load_dll): Add function description.
7622 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7624 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7626 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7628 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7629 base address when calling win32_add_one_solib.
7630 (handle_load_dll): Delete local variable load_addr.
7631 Remove 0x1000 offset applied to DLL base address when calling
7632 win32_add_one_solib.
7633 (handle_unload_dll): Add comment.
7635 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7637 * win32-low.c (win32_add_all_dlls): Renames
7638 win32_ensure_ntdll_loaded. Rewrite function documentation.
7639 Adjust implementation to always load all DLLs.
7640 Add 0x1000 offset to DLL base address when calling
7641 win32_add_one_solib.
7642 (child_initialization_done): New static global.
7643 (do_initial_child_stuff): Set child_initialization_done to
7644 zero during child initialization, and 1 after. Replace call
7645 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7647 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7648 (handle_unload_dll): Add function documentation.
7649 (get_child_debug_event): Ignore load and unload DLL events
7650 during child initialization.
7652 2014-02-20 Doug Evans <dje@google.com>
7654 Remove global all_lwps.
7655 * inferiors.h (ptid_of): Move here from linux-low.h.
7656 (pid_of, lwpid_of): Ditto.
7657 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7658 parameter is a struct thread_info * now.
7659 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7660 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7661 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7663 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7664 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7665 * linux-arm-low.c (update_registers_callback): Update, "entry"
7666 parameter is a struct thread_info * now.
7667 Fetch lwpid from current_inferior directly.
7668 (arm_insert_point): Pass &all_threads to find_inferior instead of
7670 (arm_remove_point): Ditto.
7671 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7672 (arm_prepare_to_resume): Fetch pid from thread.
7673 (arm_read_description): Fetch lwpid from current_inferior directly.
7674 * linux-low.c (all_lwps): Delete.
7675 (delete_lwp): Delete call to remove_inferior.
7676 (handle_extended_wait): Fetch lwpid from thread.
7677 (add_lwp): Don't set lwp->entry.id. Remove call to
7678 add_inferior_to_list.
7679 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7680 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7681 (kill_one_lwp_callback): Ditto.
7682 (linux_kill): Don't dereference NULL pointer.
7683 Fetch ptid,lwpid from thread.
7684 (get_detach_signal): Fetch ptid from thread.
7685 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7686 Simplify call to regcache_invalidate_thread.
7687 (delete_lwp_callback): Update, "entry" parameter is a
7688 struct thread_info * now. Fetch pid from thread.
7689 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7690 (status_pending_p_callback): Update, "entry" parameter is a
7691 struct thread_info * now. Fetch ptid from thread.
7692 (find_lwp_pid): Update, "entry" parameter is a
7693 struct thread_info * now.
7694 (linux_wait_for_lwp): Fetch pid from thread.
7695 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7696 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7697 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7698 (dequeue_one_deferred_signal): Ditto.
7699 (cancel_breakpoint): Fetch ptid from current_inferior.
7700 (linux_wait_for_event): Pass &all_threads to find_inferior,
7701 not &all_lwps. Fetch ptid, lwpid from thread.
7702 (count_events_callback): Update, "entry" parameter is a
7703 struct thread_info * now.
7704 (select_singlestep_lwp_callback): Ditto.
7705 (select_event_lwp_callback): Ditto.
7706 (cancel_breakpoints_callback): Ditto.
7707 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7709 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7710 (unsuspend_one_lwp): Update, "entry" parameter is a
7711 struct thread_info * now.
7712 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7714 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7715 Fetch lwpid from thread, not lwp.
7716 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7717 Pass &all_threads to find_inferior, not &all_lwps.
7718 (send_sigstop): Fetch lwpid from thread, not lwp.
7719 (send_sigstop_callback): Update, "entry" parameter is a
7720 struct thread_info * now.
7721 (suspend_and_send_sigstop_callback): Ditto.
7722 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7723 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7724 struct thread_info * now.
7725 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7727 (lwp_running): Update, "entry" parameter is a
7728 struct thread_info * now.
7729 (stop_all_lwps): Fetch ptid from thread.
7730 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7731 (linux_resume_one_lwp): Fetch lwpid from thread.
7732 (linux_set_resume_request): Update, "entry" parameter is a
7733 struct thread_info * now. Fetch pid, lwpid from thread.
7734 (resume_status_pending_p): Update, "entry" parameter is a
7735 struct thread_info * now.
7736 (need_step_over_p): Ditto. Fetch lwpid from thread.
7737 (start_step_over): Fetch lwpid from thread.
7738 (linux_resume_one_thread): Update, "entry" parameter is a
7739 struct thread_info * now. Fetch lwpid from thread.
7740 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7741 (proceed_one_lwp): Update, "entry" parameter is a
7742 struct thread_info * now. Fetch lwpid from thread.
7743 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7744 struct thread_info * now.
7745 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7746 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7747 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7749 (regsets_store_inferior_registers): Ditto.
7750 (fetch_register, store_register): Ditto.
7751 (linux_read_memory, linux_write_memory): Ditto.
7752 (linux_request_interrupt): Ditto.
7753 (linux_read_auxv): Ditto.
7754 (linux_xfer_siginfo): Ditto.
7755 (linux_qxfer_spu): Ditto.
7756 (linux_qxfer_libraries_svr4): Ditto.
7757 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7758 moved to inferiors.h.
7760 (get_thread_lwp): Update.
7761 (struct lwp_info): Delete member "entry". Simplify comment for
7764 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7765 current_inferior directly.
7766 (update_watch_registers_callback): Update, "entry" parameter is a
7767 struct thread_info * now. Fetch pid from thread.
7768 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7769 (mips_insert_point): Fetch lwpid from current_inferior.
7770 Pass &all_threads to find_inferior, not &all_lwps.
7771 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7772 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7774 (mips_stopped_data_address): Ditto.
7775 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7777 * linux-tile-low.c (tile_arch_setup): Ditto.
7778 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7779 (update_debug_registers_callback): Update, "entry" parameter is a
7780 struct thread_info * now. Fetch pid from thread.
7781 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7782 Pass &all_threads to find_inferior, not &all_lwps.
7783 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7784 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7785 Pass &all_threads to find_inferior, not &all_lwps.
7786 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7787 (i386_dr_low_get_status): Ditto.
7788 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7789 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7790 (x86_linux_read_description): Ditto.
7791 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7793 2014-02-20 Doug Evans <dje@google.com>
7795 * inferiors.c (get_first_inferior): Fix buglet.
7797 2014-02-19 Doug Evans <dje@google.com>
7799 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7800 * inferiors.c (add_thread): Change result type to struct thread_info *.
7801 All callers updated.
7802 (add_lwp): Call add_thread here instead of in callers.
7803 All callers updated.
7804 * linux-low.h (get_lwp_thread): Rewrite.
7805 (struct lwp_info): New member "thread".
7807 2014-02-19 Doug Evans <dje@google.com>
7809 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7810 All callers updated.
7812 2014-02-19 Doug Evans <dje@google.com>
7814 * inferiors.c (add_thread): Fix whitespace.
7816 2014-02-19 Doug Evans <dje@google.com>
7818 * dll.c (clear_dlls): Replace accessing list implemention details
7820 * gdbthread.h (get_first_thread): Declare.
7821 * inferiors.c (for_each_inferior_with_data): New function.
7822 (get_first_thread): New function.
7823 (find_thread_ptid): Simplify.
7824 (get_first_inferior): New function.
7825 (clear_list): Delete.
7826 (one_inferior_p): New function.
7827 (clear_inferior_list): New function.
7828 (clear_inferiors): Update.
7829 * inferiors.h (for_each_inferior_with_data): Declare.
7830 (clear_inferior_list): Declare.
7831 (one_inferior_p): Declare.
7832 (get_first_inferior): Declare.
7833 * linux-low.c (linux_wait_for_event): Replace accessing list
7834 implemention details with API function.
7835 * server.c (target_running): Ditto.
7836 (accumulate_file_name_length): New function.
7837 (emit_dll_description): New function.
7838 (handle_qxfer_libraries): Replace accessing list implemention
7839 details with API function.
7840 (handle_qxfer_threads_worker): New function.
7841 (handle_qxfer_threads_proper): Replace accessing list implemention
7842 details with API function.
7843 (handle_query): Ditto.
7844 (visit_actioned_threads_callback_ftype): New typedef.
7845 (visit_actioned_threads_data): New struct.
7846 (visit_actioned_threads): Rewrite to be find_inferior callback.
7847 (resume): Call find_inferior.
7848 (handle_status): Replace accessing list implemention
7849 details with API function.
7850 (process_serial_event): Replace accessing list implemention details
7852 * target.c (set_desired_inferior): Replace accessing list implemention
7853 details with API function.
7854 * tracepoint.c (same_process_p): New function.
7855 (gdb_agent_about_to_close): Replace accessing list implemention
7856 details with API function.
7857 * win32-low.c (child_delete_thread): Replace accessing list
7858 implemention details with API function.
7859 (match_dll_by_basename): New function.
7860 (dll_is_loaded_by_basename): New function.
7861 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7862 details call to dll_is_loaded_by_basename.
7864 2014-02-19 Doug Evans <dje@google.com>
7866 * dll.h (struct dll_info): Add comment.
7867 * gdbthread.h (struct thread_info): Add comment.
7868 (current_ptid): Simplify.
7869 * inferiors.c (add_process): Update.
7870 (remove_process): Update.
7871 * inferiors.h (struct process_info): Rename member "head" to "entry".
7872 * linux-low.c (delete_lwp): Update.
7874 (last_thread_of_process_p): Update.
7875 (kill_one_lwp_callback, linux_kill): Update.
7876 (status_pending_p_callback): Update.
7877 (wait_for_sigstop): Update. Simplify read of ptid.
7878 (start_step_over): Update.
7879 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7880 (get_lwp_thread): Update.
7881 (struct lwp_info): Rename member "head" to "entry".
7882 * regcache.h (inferior_list_entry): Delete.
7883 * server.c (kill_inferior_callback): Update.
7884 (detach_or_kill_inferior_callback): Update.
7885 (print_started_pid): Update.
7886 (print_attached_pid): Update.
7887 (process_serial_event): Simplify read of ptid.
7888 * thread-db.c (thread_db_create_event): Update.
7889 (thread_db_get_tls_address): Update.
7890 * win32-low.c (current_inferior_ptid): Simplify.
7892 2014-02-19 Tom Tromey <tromey@redhat.com>
7894 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7896 (target_supports_btrace): Update.
7898 2014-02-14 Yao Qi <yao@codesourcery.com>
7900 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7901 (rsp-low-ipa.o): New target.
7903 2014-02-12 Tom Tromey <tromey@redhat.com>
7905 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7906 convert_ascii_to_int.
7907 * regcache.c (registers_to_string): Likewise.
7908 * remote-utils.c (decode_M_packet): Likewise.
7909 * server.c (process_serial_event): Likewise.
7911 2014-02-12 Tom Tromey <tromey@redhat.com>
7913 * server.c (handle_query, handle_v_run): Use hex2bin, not
7915 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7917 2014-02-12 Tom Tromey <tromey@redhat.com>
7919 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7920 convert_int_to_ascii.
7921 * regcache.c (registers_to_string, collect_register_as_string):
7923 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7925 * server.c (process_serial_event): Likewise.
7926 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7927 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7929 2014-02-12 Tom Tromey <tromey@redhat.com>
7931 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7932 bin2hex, not hexify.
7933 * tracepoint.c (cmd_qtstatus): Likewise.
7935 2014-02-12 Tom Tromey <tromey@redhat.com>
7937 * remote-utils.c (monitor_output): Pass explicit length to
7940 2014-02-12 Tom Tromey <tromey@redhat.com>
7942 * tracepoint.c: Include rsp-low.h.
7943 * server.c: Include rsp-low.h.
7944 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7945 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7947 * remote-utils.c: Include rsp-low.h.
7948 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7949 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7950 (convert_int_to_ascii, convert_ascii_to_int): Move to
7952 * regcache.c: Include rsp-low.h.
7953 * ax.c: Include rsp-low.h.
7954 * Makefile.in (SFILES): Add common/rsp-low.c.
7955 (OBS): Add rsp-low.o.
7956 (rsp-low.o): New target.
7958 2014-02-12 Tom Tromey <tromey@redhat.com>
7960 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7961 Include print-utils.h.
7962 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7963 (plongest, thirty_two, phex_nz): Remove.
7964 * Makefile.in (SFILES): Add common/print-utils.c.
7965 (OBS): Add print-utils.o.
7966 (print-utils-ipa.o): New target.
7967 (print-utils.o): New target.
7968 (IPA_OBJS): Add print-utils-ipa.o.
7970 2014-02-06 Tom Tromey <tromey@redhat.com>
7972 * Makefile.in (SFILES): Fix indentation.
7974 2014-02-05 Doug Evans <dje@google.com>
7976 * linux-low.c (linux_wait_for_event): Improve comment.
7977 (linux_wait_1): Keep current_inferior in sync with event_child.
7979 2014-01-22 Doug Evans <dje@google.com>
7981 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7983 2014-01-22 Doug Evans <dje@google.com>
7985 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7986 * configure: Regenerate.
7987 * config.in: Regenerate.
7988 * Makefile.in (SFILES): Add debug.c.
7990 * debug.c: New file.
7991 * debug.h: New file.
7992 * linux-aarch64-low.c (*): Update all debugging printfs to use
7993 debug_printf instead of fprintf.
7994 * linux-arm-low.c (*): Ditto.
7995 * linux-cris-low.c (*): Ditto.
7996 * linux-crisv32-low.c (*): Ditto.
7997 * linux-m32r-low.c (*): Ditto.
7998 * linux-sparc-low.c (*): Ditto.
7999 * linux-x86.c (*): Ditto.
8000 * linux-low.c (*): Ditto.
8001 (linux_wait_1): Add calls to debug_enter, debug_exit.
8002 (linux_wait): Remove redundant debugging printf.
8003 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8004 (linux_resume, unstop_all_lwps): Ditto.
8005 * mem-break.c (*): Update all debugging printfs to use
8006 debug_printf instead of fprintf.
8007 * remote-utils.c (*): Ditto.
8008 * thread-db.c (*): Ditto.
8009 * server.c #include <ctype.h>, "gdb_vecs.h".
8010 (debug_threads): Moved to debug.c.
8011 (*): Update all debugging printfs to use debug_printf instead of
8013 (start_inferior): Replace call to fflush with call to debug_flush.
8014 (monitor_show_help): Mention set debug-format.
8015 (parse_debug_format_options): New function.
8016 (handle_monitor_command): Handle "monitor set debug-format".
8017 (gdbserver_usage): Mention --debug-format.
8018 (main): Parse --debug-format.
8019 * server.h (debug_threads): Declaration moved to debug.h.
8021 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8022 trace_debug_1 that uses debug_printf.
8023 (tracepoint_look_up_symbols): Update all debugging printfs to use
8024 debug_printf instead of fprintf.
8026 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8028 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8031 2014-01-17 Pedro Alves <palves@redhat.com>
8034 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8035 defined after including gdb_proc_service.h.
8037 2014-01-16 Doug Evans <dje@google.com>
8039 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8040 (match_dll): Use it.
8042 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8044 * target.h (target_ops) <read_btrace>: Change parameters and
8045 return type to allow error reporting.
8046 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8047 trace reading errors on.
8048 * linux-low.c (linux_low_read_btrace): Pass trace reading
8050 (linux_low_disable_btrace): New.
8052 2014-01-15 Doug Evans <dje@google.com>
8054 * inferiors.c (thread_id_to_gdb_id): Delete.
8055 * inferiors.h (thread_id_to_gdb_id): Delete.
8057 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8059 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8060 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8063 2014-01-08 Pedro Alves <palves@redhat.com>
8065 * server.c (handle_status): Don't discard previous queued stop
8066 replies or thread's pending status here.
8067 (main) <disconnection>: Do it here instead.
8069 2014-01-08 Pedro Alves <palves@redhat.com>
8071 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8072 * server.c (visit_actioned_threads, handle_pending_status): New
8074 (handle_v_cont): Factor out parts to ...
8075 (resume): ... this new function. If in all-stop, and a thread
8076 being resumed has a pending status, report it without actually
8078 (myresume): Adjust to use the new 'resume' function.
8079 (clear_pending_status_callback, set_pending_status_callback)
8080 (find_status_pending_thread_callback): New functions.
8081 (handle_status): Handle the case of multiple threads having
8082 interesting statuses to report. Report threads' real last signal
8083 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8084 with an interesting thread to report the status for, instead of
8085 always reporting the status of the first thread.
8087 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8089 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8090 * gdbreplay.c (gdbreplay_version): Likewise.
8092 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8094 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8095 iov.iov_len with the real length in use.
8097 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8099 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8100 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8101 for all targets that use win32-low.c.
8102 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8103 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8105 2013-12-13 Pedro Alves <palves@redhat.com>
8107 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8108 if equal to TARGET_WAITKIND_LOADED.
8109 * win32-low.c (cached_status): New static global.
8110 (win32_wait): Add declaration.
8111 (do_initial_child_stuff): Flush all initial pending debug events
8112 up to the initial breakpoint.
8113 (win32_wait): If CACHED_STATUS was set, return that instead
8114 of doing a real wait. Remove the code resuming the execution
8115 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8116 during the initial phase. Also remove the code changing
8117 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8118 TARGET_WAITKIND_STOPPED.
8120 2013-12-11 Yao Qi <yao@codesourcery.com>
8122 * notif.c (handle_notif_ack): Return 0 if no notification
8125 2013-11-20 Doug Evans <dje@google.com>
8127 * linux-low.c (linux_set_resume_request): Fix comment.
8129 2013-11-20 Doug Evans <dje@google.com>
8131 * linux-low.c (resume_status_pending_p): Tweak comment.
8133 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8135 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8136 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8137 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8138 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8139 (srv_amd64_regobj): Add amd64-mpx.o.
8140 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8141 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8142 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8143 * i387-fp.c (num_pl_bnd_register) Added constant.
8144 (num_pl_bnd_cfg_registers) Added constant.
8145 (struct i387_xsave) Added reserved area and MPX fields.
8146 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8147 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8149 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8150 (init_registers_amd64_mpx_linux): Declare new function.
8151 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8152 (x86_64_regmap): Add MPX registers.
8153 (x86_linux_read_description): Add MPX case.
8154 (initialize_low_arch): Initialize MPX targets.
8156 2013-11-18 Tom Tromey <tromey@redhat.com>
8158 * configure: Rebuild.
8159 * configure.ac: Don't check for stdlib.h.
8160 * gdbreplay.c: Unconditionally include stdlib.h.
8162 2013-11-18 Tom Tromey <tromey@redhat.com>
8164 * config.in: Rebuild.
8165 * configure: Rebuild.
8166 * configure.ac: Don't use AC_HEADER_DIRENT.
8168 2013-11-18 Tom Tromey <tromey@redhat.com>
8170 * server.h: Don't check HAVE_STRING_H.
8171 * gdbreplay.c: Don't check HAVE_STRING_H.
8172 * configure: Rebuild.
8174 2013-11-18 Tom Tromey <tromey@redhat.com>
8176 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8179 2013-11-08 Tom Tromey <tromey@redhat.com>
8181 * configure, config.in: Rebuild.
8182 * configure.ac: Remove unused configury.
8184 2013-11-08 Tom Tromey <tromey@redhat.com>
8186 * acinclude.m4: Include common.m4, codeset.m4.
8187 * configure, config.in: Rebuild.
8188 * configure.ac: Use GDB_AC_COMMON.
8190 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8192 * linux-s390-low.c (HWCAP_S390_TE): New define.
8193 (s390_arch_setup): Consider the TE field in the HWCAP for
8194 determining 'have_regset_tdb'.
8196 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8199 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8202 2013-10-02 Pedro Alves <palves@redhat.com>
8204 * server.c (process_serial_event): Don't output "GDBserver
8205 exiting" if GDB is connected through stdio.
8206 * target.c (mywait): Likewise, be silent if GDB is connected
8209 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8211 * lynx-low.c (lynx_add_threads_after_attach): New function.
8212 (lynx_attach): Remove call to add_thread. Add call to
8213 lynx_add_threads_after_attach instead.
8215 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8217 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8218 * config.in, configure: Regenerated.
8220 2013-09-18 Yao Qi <yao@codesourcery.com>
8223 * server.c (start_inferior): Clear 'resume_info'.
8225 2013-09-16 Jiong Wang <jiwang@tilera.com>
8227 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8230 2013-09-16 Jiong Wang <jiwang@tilera.com>
8232 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8233 linux-tile-low.o to srv_tgtobj.
8235 2013-09-16 Will Newton <will.newton@linaro.org>
8237 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8240 2013-09-06 Pedro Alves <palves@redhat.com>
8242 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8243 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8244 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8245 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8246 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8247 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8249 2013-09-06 Pedro Alves <palves@redhat.com>
8251 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8252 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8254 2013-09-06 Pedro Alves <palves@redhat.com>
8256 * linux-amd64-ipa.c: Include tracepoint.h.
8257 * linux-i386-ipa.c: Include tracepoint.h.
8259 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8261 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8262 (ps_get_thread_area): New function.
8264 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8266 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8267 (initialize_low_arch): Call init_registers_crisv32 rather than
8268 init_register_crisv32.
8270 2013-09-05 Pedro Alves <palves@redhat.com>
8272 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8274 * hostio.h: ... this new file.
8275 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8276 win32-low.c: Include hostio.h.
8278 2013-09-05 Pedro Alves <palves@redhat.com>
8280 * server.h (gdb_client_data, handler_func, callback_handler_func)
8281 (delete_file_handler, add_file_handler, append_callback_event)
8282 (delete_callback_event, start_event_loop, initialize_event_loop):
8283 Move to event-loop.h and include it.
8284 * event-loop.h: New file.
8286 2013-09-05 Pedro Alves <palves@redhat.com>
8288 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8289 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8290 (loaded_dll, unloaded_dll): Move to ...
8291 * dll.h: ... this new file.
8292 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8294 2013-09-05 Pedro Alves <palves@redhat.com>
8296 * server.h (current_process, get_thread_process, all_processes)
8297 (add_inferior_to_list, for_each_inferior, current_inferior)
8298 (remove_inferior, add_process, remove_process, find_process_pid)
8299 (have_started_inferiors_p, have_attached_inferiors_p)
8300 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8301 (clear_inferiors, find_inferior, find_inferior_id)
8302 (inferior_target_data, set_inferior_target_data)
8303 (inferior_regcache_data, set_inferior_regcache_data): Move to
8304 inferiors.h, and include it.
8305 * inferiors.h: New file.
8307 2013-09-05 Pedro Alves <palves@redhat.com>
8309 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8313 2013-09-05 Pedro Alves <palves@redhat.com>
8315 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8317 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8318 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8319 (handle_tracepoint_general_set, handle_tracepoint_query)
8320 (tracepoint_finished_step, tracepoint_was_hit)
8321 (release_while_stepping_state_list, current_traceframe)
8322 (in_readonly_region, traceframe_read_mem)
8323 (fetch_traceframe_registers, traceframe_read_sdata)
8324 (traceframe_read_info, struct fast_tpoint_collect_status)
8325 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8326 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8327 (supply_fast_tracepoint_registers)
8328 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8329 (ipa_tdesc, claim_trampoline_space)
8330 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8331 (agent_mem_read, agent_get_trace_state_variable_value)
8332 (agent_set_trace_state_variable_value, agent_tsv_read)
8333 (agent_mem_read_string, get_raw_reg_func_addr)
8334 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8335 * tracepoint.h: ... this new file.
8337 2013-09-05 Pedro Alves <palves@redhat.com>
8339 * server.h (perror_with_name, error, fatal, warning, paddress)
8340 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8342 * utils.h: New file.
8344 2013-09-05 Pedro Alves <palves@redhat.com>
8346 * server.h (remote_debug, noack_mode, transport_is_reliable)
8347 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8348 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8349 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8350 (write_enn, initialize_async_io, enable_async_io)
8351 (disable_async_io, check_remote_input_interrupt_request)
8352 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8353 (dead_thread_notify, prepare_resume_reply)
8354 (decode_address_to_semicolon, decode_address, decode_m_packet)
8355 (decode_M_packet, decode_X_packet, decode_xfer_write)
8356 (decode_search_memory_packet, unhexify, hexify)
8357 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8358 (look_up_one_symbol, relocate_instruction)
8359 (monitor_output): Move to remote-utils.h, and include it.
8360 * remote-utils.h: New file.
8362 2013-09-05 Pedro Alves <palves@redhat.com>
8364 * server.h (_): Delete.
8366 2013-09-02 Pedro Alves <palves@redhat.com>
8368 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8369 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8371 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8373 2013-09-02 Pierre Muller <muller@sourceware.org>
8375 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8376 or WriteProcessMemory complete successfully and handle
8377 ERROR_PARTIAL_COPY error.
8379 2013-09-02 Pedro Alves <palves@redhat.com>
8381 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8382 error instead of EIO.
8384 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8387 * linux-low.c: Include filestuff.h.
8388 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8389 * lynx-low.c: Include filestuff.h.
8390 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8391 * server.c: Include filestuff.h.
8392 (main): Call notice_open_fds.
8393 * spu-low.c: Include filestuff.h.
8394 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8396 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8398 * Makefile.in: Explain why ../target and ../nat are not
8399 listed as include file search paths.
8400 (linux-waitpid.o): New object file rule.
8401 * configure.srv (srv_native_linux_obj): New variable.
8402 Replace all occurrences of linux native object files with
8403 $srv_native_linux_obj.
8404 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8405 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8406 (linux_enable_event_reporting): Remove declaration.
8407 (my_waitpid): Moved to common/linux-waitpid.c.
8408 (linux_wait_for_event): Pass ptid when calling
8409 linux_enable_event_reporting.
8410 (linux_supports_tracefork_flag): Remove.
8411 (linux_enable_event_reporting): Likewise.
8412 (linux_tracefork_grandchild): Remove.
8413 (STACK_SIZE): Moved to common/linux-ptrace.c.
8414 (linux_tracefork_child): Remove.
8415 (linux_test_for_tracefork): Remove.
8416 (linux_look_up_symbols): Call linux_supports_traceclone.
8417 (initialize_low): Remove call to linux_test_for_tracefork.
8418 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8419 common/linux-ptrace.h.
8420 (PTRACE_TYPE_ARG4): Likewise.
8421 Include linux-ptrace.h.
8423 2013-08-21 Pedro Alves <palves@redhat.com>
8425 * config.in: Renegerate.
8427 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8429 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8430 (SFILES): Remove $(srcdir)/common/target-common.c and
8431 add $(srcdir)/target/waitstatus.c.
8432 (OBS): Remove target-common.o and add waitstatus.o.
8433 (server_h): Remove $(srcdir)/../common/target-common.h and
8434 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8435 and $(srcdir)/../target/waitstatus.h.
8436 (target-common.o): Remove.
8437 (waitstatus.o): New target object file.
8438 * target.h: Do not include target-common.h and
8439 include target/resume.h, target/wait.h and
8440 target/waitstatus.h.
8442 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8444 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8445 to PTRACE_TYPE_ARG3.
8446 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8447 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8449 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8450 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8452 2013-07-27 Jie Zhang <jie@codesourcery.com>
8453 Daniel Jacobowitz <dan@codesourcery.com>
8454 Yao Qi <yao@codesourcery.com>
8456 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8457 (mips-linux-watch.o): New rule.
8458 (mips_linux_watch_h): New variable.
8459 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8461 * linux-mips-low.c: Include mips-linux-watch.h.
8462 (struct arch_process_info, struct arch_lwp_info): New.
8463 (update_watch_registers_callback): New function.
8464 (mips_linux_new_process, mips_linux_new_thread) New functions.
8465 (mips_linux_prepare_to_resume, mips_insert_point): New
8467 (mips_remove_point, mips_stopped_by_watchpoint): New
8469 (rsp_bp_type_to_target_hw_bp_type): New function.
8470 (mips_stopped_data_address): New function.
8471 (the_low_target): Add watchpoint support functions.
8473 2013-07-27 Yao Qi <yao@codesourcery.com>
8475 * i386-low.c: Include break-common.h.
8476 (enum target_hw_bp_type): Remove.
8478 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8480 * Makefile.in (SFILES): /common/target-common.c.
8481 (OBS): Add target-common.o.
8482 (server_h): Add $(srcdir)/../common/target-common.h.
8483 (target-common.o): New target.
8484 * server.c (queue_stop_reply_callback): Free
8485 status string after use.
8486 * target.c (target_waitstatus_to_string): Remove.
8487 * target.h: Include target-common.h.
8488 (resume_kind): Likewise.
8489 (target_waitkind): Likewise.
8490 (target_waitstatus): Likewise.
8491 (TARGET_WNOHANG): Likewise.
8493 2013-07-04 Yao Qi <yao@codesourcery.com>
8495 * Makefile.in (host_alias): Use @host_noncanonical@.
8496 (target_alias): Use @target_noncanonical@.
8497 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8498 ACX_NONCANONICAL_HOST.
8499 * configure: Regenerated.
8502 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8504 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8505 * configure: Rebuild.
8506 * Makefile.in (version_host, version_target): Get from configure.
8507 (version.c): Use $(version_host) and $(version_target).
8509 2013-07-03 Pedro Alves <palves@redhat.com>
8511 * Makefile.in (config.status): Depend on development.sh.
8512 * acinclude.m4: Include libmcheck.m4.
8513 * configure: Regenerate.
8515 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8517 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8518 attribute inside the parentheses.
8519 (winapi_DebugSetProcessKillOnExit): Ditto.
8520 (winapi_DebugBreakProcess): Ditto.
8521 (winapi_GenerateConsoleCtrlEvent): Ditto.
8523 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8525 * notif.h (notif_event): Add a dummy member to avoid compiler
8528 2013-07-01 Pedro Alves <palves@redhat.com>
8530 * hostio.c (HOSTIO_PATH_MAX): Define.
8531 (require_filename, handle_open, handle_unlink, handle_readlink):
8534 2013-07-01 Pedro Alves <palves@redhat.com>
8536 * server.h: Include "pathmax.h".
8537 * linux-low.c: Don't include sys/param.h.
8538 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8540 * win32-low.c: Don't include sys/param.h.
8541 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8543 2013-07-01 Pedro Alves <palves@redhat.com>
8545 * event-loop.c: Don't check HAVE_UNISTD_H before including
8547 * gdbreplay.c: Likewise.
8548 * remote-utils.c: Likewise.
8549 * server.c: Likewise.
8550 * configure.ac: Don't check for unistd.h.
8551 * configure: Regenerate.
8553 2013-06-28 Tom Tromey <tromey@redhat.com>
8555 * Makefile.in (version.c): Use version.in, not
8558 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8560 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8561 * configure: Rebuild.
8562 * Makefile.in (version_host, version_target): Get from configure.
8563 (version.c): Use $(version_host) and $(version_target).
8565 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8567 Fix trace-status to output user name without trailing colon.
8568 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8570 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8572 Fix trace-status to output proper start-time and stop-time.
8573 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8574 output start time and stop time in hex as gdb expects.
8576 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8578 * tracepoint.c (build_traceframe_info_xml): Output trace state
8579 variables present in the trace buffer.
8581 2013-06-24 Tom Tromey <tromey@redhat.com>
8583 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8585 (version.o): Remove.
8586 * gdbreplay.c: Include version.h.
8587 (version, host_name): Don't declare.
8588 * server.h: Include version.h.
8589 (version, host_name): Don't declare.
8591 2013-06-12 Pedro Alves <palves@redhat.com>
8593 * linux-x86-low.c (linux_is_elf64): Delete global.
8594 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8595 with local linux_pid_exe_is_elf_64_file use.
8597 2013-06-11 Pedro Alves <palves@redhat.com>
8599 * linux-low.c (regset_disabled, disable_regset): New functions.
8600 (regsets_fetch_inferior_registers)
8601 (regsets_store_inferior_registers): Use them.
8602 (initialize_regsets_info); Don't allocate the disabled_regsets
8604 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8607 2013-06-11 Pedro Alves <palves@redhat.com>
8609 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8612 2013-06-11 Pedro Alves <palves@redhat.com>
8614 * linux-x86-low.c (initialize_low_arch): Call
8615 init_registers_x32_avx_linux.
8617 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8619 Fix compatibility with Android Bionic.
8620 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8623 2013-06-07 Pedro Alves <palves@redhat.com>
8626 * Makefile.in (OBS): Add tdesc.o.
8627 (IPA_OBJS): Add tdesc-ipa.o.
8628 (tdesc-ipa.o): New rule.
8629 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8631 * linux-low.c (new_inferior): Delete.
8632 (disabled_regsets, num_regsets): Delete.
8633 (linux_add_process): Adjust to set the new per-process
8635 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8636 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8637 was a stop. When calling arch_setup, switch the current inferior
8638 to the thread that got an event.
8639 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8640 (regsets_fetch_inferior_registers)
8641 (regsets_store_inferior_registers): New regsets_info parameter.
8643 (linux_register_in_regsets): New regs_info parameter. Adjust to
8645 (register_addr, fetch_register, store_register): New usrregs_info
8646 parameter. Adjust to use it.
8647 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8648 parameter regs_info. Adjust to use it.
8649 (linux_fetch_registers): Get the current inferior's regs_info, and
8651 (linux_store_registers): Ditto.
8652 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8653 (initialize_low): Don't initialize the target_regsets here. Call
8654 initialize_low_arch.
8655 * linux-low.h (target_regsets): Delete declaration.
8656 (struct regsets_info): New.
8657 (struct usrregs_info): New.
8658 (struct regs_info): New.
8659 (struct process_info_private) <new_inferior>: New field.
8660 (struct linux_target_ops): Delete the num_regs, regmap, and
8661 regset_bitmap fields. New field regs_info.
8662 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8663 * i387-fp.c (num_xmm_registers): Delete.
8664 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8665 calls to new interface.
8666 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8667 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8668 Infer the number of xmm registers from the regcache's target
8670 * i387-fp.h (num_xmm_registers): Delete.
8671 * inferiors.c (add_thread): Don't install the thread's regcache
8673 * proc-service.c (gregset_info): Fetch the current inferior's
8674 regs_info. Adjust to use it.
8675 * regcache.c: Include tdesc.h.
8676 (register_bytes, reg_defs, num_registers)
8677 (gdbserver_expedite_regs): Delete.
8678 (get_thread_regcache): If the thread doesn't have a regcache yet,
8679 create one, instead of aborting gdbserver.
8680 (regcache_invalidate_one): Rename to ...
8681 (regcache_invalidate_thread): ... this.
8682 (regcache_invalidate_one): New.
8683 (regcache_invalidate): Only invalidate registers of the current
8685 (init_register_cache): Add target_desc parameter, and use it.
8686 (new_register_cache): Ditto. Assert the target description has a
8687 non zero registers_size.
8688 (regcache_cpy): Add assertions. Adjust.
8689 (realloc_register_cache, set_register_cache): Delete.
8690 (registers_to_string, registers_from_string): Adjust.
8691 (find_register_by_name, find_regno, find_register_by_number)
8692 (register_cache_size): Add target_desc parameter, and use it.
8693 (free_register_cache_thread, free_register_cache_thread_one)
8694 (regcache_release, register_cache_size): New.
8695 (register_size): Add target_desc parameter, and use it.
8696 (register_data, supply_register, supply_register_zeroed)
8697 (supply_regblock, supply_register_by_name, collect_register)
8698 (collect_register_as_string, collect_register_by_name): Adjust.
8699 * regcache.h (struct target_desc): Forward declare.
8700 (struct regcache) <tdesc>: New field.
8701 (init_register_cache, new_register_cache): Add target_desc
8703 (regcache_invalidate_thread): Declare.
8704 (regcache_invalidate_one): Delete declaration.
8705 (regcache_release): Declare.
8706 (find_register_by_number, register_cache_size, register_size)
8707 (find_regno): Add target_desc parameter.
8708 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8710 * remote-utils.c: Include tdesc.h.
8711 (outreg, prepare_resume_reply): Adjust.
8712 * server.c: Include tdesc.h.
8713 (gdbserver_xmltarget): Delete declaration.
8714 (get_features_xml, process_serial_event): Adjust.
8715 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8717 (struct process_info) <tdesc>: New field.
8718 (ipa_tdesc): Declare.
8719 * tdesc.c: New file.
8720 * tdesc.h: New file.
8721 * tracepoint.c: Include tdesc.h.
8722 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8723 (get_context_regcache): Adjust to pass ipa_tdesc down.
8724 (do_action_at_tracepoint): Adjust to get the register cache size
8725 from the context regcache's description.
8726 (traceframe_walk_blocks): Adjust to get the register cache size
8727 from the current trace frame's description.
8728 (traceframe_get_pc): Adjust to get current trace frame's
8729 description and pass it down.
8730 (gdb_collect): Adjust to get the register cache size from the
8732 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8733 (gdbserver_xmltarget): Delete.
8734 (initialize_low_tracepoint): Set the ipa's target description.
8735 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8736 (initialize_low_tracepoint): Set the ipa's target description.
8737 * linux-x86-low.c: Include tdesc.h.
8738 [__x86_64__] (is_64bit_tdesc): New.
8739 (ps_get_thread_area, x86_get_thread_area): Use it.
8740 (i386_cannot_store_register): Rename to ...
8741 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8742 (i386_cannot_fetch_register): Rename to ...
8743 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8744 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8746 (target_regsets): Rename to ...
8747 (x86_regsets): ... this.
8748 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8750 (x86_siginfo_fixup): Use is_64bit_tdesc.
8751 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8752 (tdesc_x32_avx_linux, tdesc_x32_linux)
8753 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8755 (x86_linux_update_xmltarget): Delete.
8756 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8757 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8758 (AMD64_LINUX_USER64_CS): New.
8759 (x86_linux_read_description): New, based on
8760 x86_linux_update_xmltarget.
8761 (same_process_callback): New.
8762 (x86_arch_setup_process_callback): New.
8763 (x86_linux_update_xmltarget): New.
8764 (x86_regsets_info): New.
8765 (amd64_linux_regs_info): New.
8766 (i386_linux_usrregs_info): New.
8767 (i386_linux_regs_info): New.
8768 (x86_linux_regs_info): New.
8769 (x86_arch_setup): Reimplement.
8770 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8771 (x86_emit_ops): Ditto.
8772 (the_low_target): Adjust. Install x86_linux_regs_info,
8773 x86_cannot_fetch_register, and x86_cannot_store_register.
8774 (initialize_low_arch): New.
8775 * linux-ia64-low.c (tdesc_ia64): Declare.
8776 (ia64_fetch_register): Adjust.
8777 (ia64_usrregs_info, regs_info): New globals.
8778 (ia64_regs_info): New function.
8779 (the_low_target): Adjust.
8780 (initialize_low_arch): New function.
8781 * linux-sparc-low.c (tdesc_sparc64): Declare.
8782 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8784 (sparc_arch_setup): New function.
8785 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8786 (the_low_target): Adjust.
8787 (initialize_low_arch): New function.
8788 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8789 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8790 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8791 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8792 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8793 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8794 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8795 (tdesc_powerpc_isa205_vsx64l): Declare.
8796 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8797 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8798 (ppc_set_pc, ppc_get_hwcap): Adjust.
8799 (ppc_usrregs_info): Forward declare.
8800 (!__powerpc64__) ppc_regmap_adjusted: New global.
8801 (ppc_arch_setup): Adjust to the current process'es target
8803 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8804 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8805 (ppc_store_evrregset): Adjust.
8806 (target_regsets): Rename to ...
8807 (ppc_regsets): ... this, and make static.
8808 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8809 (ppc_regs_info): New function.
8810 (the_low_target): Adjust.
8811 (initialize_low_arch): New function.
8812 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8813 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8814 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8815 (tdesc_s390x_linux64v2): Declare.
8816 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8817 (s390_fill_gregset, s390_store_last_break): Adjust.
8818 (target_regsets): Rename to ...
8819 (s390_regsets): ... this, and make static.
8820 (s390_get_pc, s390_set_pc): Adjust.
8821 (s390_get_hwcap): New target_desc parameter, and use it.
8822 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8823 (s390_arch_setup): Adjust to set the current process'es target
8824 description. Don't adjust the regmap.
8825 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8826 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8827 (regs_info_3264): New globals.
8828 (s390_regs_info): New function.
8829 (the_low_target): Adjust.
8830 (initialize_low_arch): New function.
8831 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8832 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8833 [__mips64] (init_registers_mips_linux)
8834 (init_registers_mips_dsp_linux): Delete defines.
8835 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8836 (have_dsp): New global.
8837 (mips_read_description): New, based on mips_arch_setup.
8838 (mips_arch_setup): Reimplement.
8839 (get_usrregs_info): New function.
8840 (mips_cannot_fetch_register, mips_cannot_store_register)
8841 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8842 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8843 (target_regsets): Rename to ...
8844 (mips_regsets): ... this, and make static.
8845 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8846 (dsp_regs_info, regs_info): New globals.
8847 (mips_regs_info): New function.
8848 (the_low_target): Adjust.
8849 (initialize_low_arch): New function.
8850 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8851 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8853 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8854 (arm_read_description): New, with bits factored from
8856 (arm_arch_setup): Reimplement.
8857 (target_regsets): Rename to ...
8858 (arm_regsets): ... this, and make static.
8859 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8860 (arm_regs_info): New function.
8861 (the_low_target): Adjust.
8862 (initialize_low_arch): New function.
8863 * linux-m68k-low.c (tdesc_m68k): Declare.
8864 (target_regsets): Rename to ...
8865 (m68k_regsets): ... this, and make static.
8866 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8867 (m68k_regs_info): New function.
8868 (m68k_arch_setup): New function.
8869 (the_low_target): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-sh-low.c (tdesc_sharch): Declare.
8872 (target_regsets): Rename to ...
8873 (sh_regsets): ... this, and make static.
8874 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8875 (sh_regs_info, sh_arch_setup): New functions.
8876 (the_low_target): Adjust.
8877 (initialize_low_arch): New function.
8878 * linux-bfin-low.c (tdesc_bfin): Declare.
8879 (bfin_arch_setup): New function.
8880 (bfin_usrregs_info, regs_info): New globals.
8881 (bfin_regs_info): New function.
8882 (the_low_target): Adjust.
8883 (initialize_low_arch): New function.
8884 * linux-cris-low.c (tdesc_cris): Declare.
8885 (cris_arch_setup): New function.
8886 (cris_usrregs_info, regs_info): New globals.
8887 (cris_regs_info): New function.
8888 (the_low_target): Adjust.
8889 (initialize_low_arch): New function.
8890 * linux-cris-low.c (tdesc_crisv32): Declare.
8891 (cris_arch_setup): New function.
8892 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8893 (cris_regs_info): New function.
8894 (the_low_target): Adjust.
8895 (initialize_low_arch): New function.
8896 * linux-m32r-low.c (tdesc_m32r): Declare.
8897 (m32r_arch_setup): New function.
8898 (m32r_usrregs_info, regs_info): New globals.
8899 (m32r_regs_info): Adjust.
8900 (initialize_low_arch): New function.
8901 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8902 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8903 (tic6x_usrregs_info): Forward declare.
8904 (tic6x_read_description): New function, based on ...
8905 (tic6x_arch_setup): ... this. Reimplement.
8906 (target_regsets): Rename to ...
8907 (tic6x_regsets): ... this, and make static.
8908 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8909 (tic6x_regs_info): New function.
8910 (the_low_target): Adjust.
8911 (initialize_low_arch): New function.
8912 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8913 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8914 (target_regsets): Rename to ...
8915 (xtensa_regsets): ... this, and make static.
8916 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8918 (xtensa_arch_setup, xtensa_regs_info): New functions.
8919 (the_low_target): Adjust.
8920 (initialize_low_arch): New function.
8921 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8922 (nios2_arch_setup): Set the current process'es tdesc.
8923 (target_regsets): Rename to ...
8924 (nios2_regsets): ... this.
8925 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8926 (nios2_regs_info): New function.
8927 (the_low_target): Adjust.
8928 (initialize_low_arch): New function.
8929 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8930 (aarch64_arch_setup): Set the current process'es tdesc.
8931 (target_regsets): Rename to ...
8932 (aarch64_regsets): ... this.
8933 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8934 (aarch64_regs_info): New function.
8935 (the_low_target): Adjust.
8936 (initialize_low_arch): New function.
8937 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8939 (target_regsets): Rename to ...
8940 (tile_regsets): ... this.
8941 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8942 (tile_regs_info): New function.
8943 (tile_arch_setup): Set the current process'es tdesc.
8944 (the_low_target): Adjust.
8945 (initialize_low_arch): New function.
8946 * spu-low.c (tdesc_spu): Declare.
8947 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8948 * win32-arm-low.c (tdesc_arm): Declare.
8949 (arm_arch_setup): New function.
8950 (the_low_target): Install arm_arch_setup instead of
8952 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8953 (init_windows_x86): Rename to ...
8954 (i386_arch_setup): ... this. Set `win32_tdesc'.
8955 (the_low_target): Adjust.
8956 * win32-low.c (win32_tdesc): New global.
8957 (child_add_thread): Don't create the thread cache here.
8958 (do_initial_child_stuff): Set the new process'es tdesc.
8959 * win32-low.h (struct target_desc): Forward declare.
8960 (win32_tdesc): Declare.
8961 * lynx-i386-low.c (tdesc_i386): Declare global.
8962 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8963 * lynx-low.c (lynx_tdesc): New global.
8964 (lynx_add_process): Set the new process'es tdesc.
8965 * lynx-low.h (struct target_desc): Forward declare.
8966 (lynx_tdesc): Declare global.
8967 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8968 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8969 * nto-low.c (nto_tdesc): New global.
8970 (do_attach): Set the new process'es tdesc.
8971 * nto-low.h (struct target_desc): Forward declare.
8972 (nto_tdesc): Declare.
8973 * nto-x86-low.c (tdesc_i386): Declare.
8974 (nto_x86_arch_setup): Set `nto_tdesc'.
8976 2013-06-04 Gary Benson <gbenson@redhat.com>
8978 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8979 to qSupported response when appropriate.
8980 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8981 with nonzero-length annex.
8982 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8983 arguments supplied in annex.
8985 2013-05-31 Doug Evans <dje@google.com>
8988 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8989 64 bits in 64-cross-32 environment.
8991 2013-05-28 Pedro Alves <palves@redhat.com>
8993 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8994 (aarch64-without-fpu.c): Delete rule.
8995 * configure.srv (aarch64*-*-linux*): Remove references to
8996 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8997 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9000 2013-05-24 Pedro Alves <palves@redhat.com>
9002 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9003 instead of strchr/decode_address. Error if the range isn't split
9004 with a ','. Don't assume there's be a ':' in the action.
9006 2013-05-23 Yao Qi <yao@codesourcery.com>
9007 Pedro Alves <palves@redhat.com>
9009 * linux-low.c (lwp_in_step_range): New function.
9010 (linux_wait_1): If the thread was range stepping and stopped
9011 outside the stepping range, report the stop to GDB. Otherwise,
9012 continue stepping. Add range stepping debug output.
9013 (linux_set_resume_request): Copy the step range from the resume
9015 (linux_supports_range_stepping): New.
9016 (linux_target_ops) <supports_range_stepping>: Set to
9017 linux_supports_range_stepping.
9018 * linux-low.h (struct linux_target_ops)
9019 <supports_range_stepping>: New field.
9020 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9021 * linux-x86-low.c (x86_supports_range_stepping): New.
9022 (the_low_target) <supports_range_stepping>: Set to
9023 x86_supports_range_stepping.
9024 * server.c (handle_v_cont): Handle 'r' action.
9025 (handle_v_requests): Append ";r" if the target supports range
9027 * target.h (struct thread_resume) <step_range_start,
9028 step_range_end>: New fields.
9029 (struct target_ops) <supports_range_stepping>:
9031 (target_supports_range_stepping): New macro.
9033 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9035 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9036 confusion in comment.
9038 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9040 * lynx-low.c (struct process_info_private): New type.
9041 (lynx_add_process): New function.
9042 (lynx_create_inferior, lynx_attach): Replace calls to
9043 add_process by calls to lynx_add_process.
9044 (lynx_resume): If PTID is null, then try using
9045 current_process()->private->last_wait_event_ptid.
9047 (lynx_clear_inferiors): Delete. The contents of that function
9048 has been inlined in lynx_mourn;
9049 (lynx_wait_1): Save the ptid in the process's private data.
9050 (lynx_mourn): Free the process' private data. Replace call
9051 to lynx_clear_inferiors by call to clear_inferiors.
9053 2013-05-17 Yao Qi <yao@codesourcery.com>
9055 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9058 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9060 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9061 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9062 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9063 PT_TEXT_END_ADDR guards. Update comments.
9064 (linux_target_op) <read_offsets>: Conditionally define to
9065 linux_read_offsets if the target is UCLIBC and if it defines
9066 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9068 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9069 Andrew Jenner <andrew@codesourcery.com>
9071 * Makefile.in (SFILES): Add linux-nios2-low.c.
9072 (clean): Add action to delete nios2-linux.c.
9073 (nios2-linux.c): New rule.
9074 * configure.srv: Add nios2*-*-linux*.
9075 * linux-nios2-low.c: New.
9077 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9079 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9081 2013-04-25 Hui Zhu <hui@codesourcery.com>
9084 * ax.c (ax_printf): Add fflush.
9086 2013-04-22 Tom Tromey <tromey@redhat.com>
9088 * Makefile.in (SFILES): Add filestuff.c.
9089 (OBS): Add filestuff.o.
9090 (filestuff.o): New target.
9091 * config.in, configure: Rebuild.
9092 * configure.ac: Check for fdwalk, pipe2.
9094 2013-04-17 Pedro Alves <palves@redhat.com>
9096 * configure.ac (USE_THREAD_DB): Delete variable.
9097 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9098 Don't AC_SUBST USE_THREAD_DB.
9099 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9100 * config.in, configure: Regenerate.
9102 2013-04-16 Pedro Alves <palves@redhat.com>
9104 * linux-low.h (struct lwp_info) <thread_known>: Move under
9105 the USE_THREAD_DB #ifdef.
9107 2013-04-16 Pedro Alves <palves@redhat.com>
9109 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9110 (linux-low.o): Delete rule.
9111 * linux-low.h: Always include "gdb_thread_db.h" instead of
9112 conditionally including thread_db.h.
9113 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9116 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9118 * Makefile.in (install-only): Fix make install regression.
9120 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9122 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9123 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9125 * gdbserver.1: Remove.
9127 2013-03-22 Pedro Alves <palves@redhat.com>
9129 * linux-low.c (handle_extended_wait): Don't call
9130 linux_enable_event_reporting.
9132 2013-03-15 Tony Theodore <tonyt@logyst.com>
9135 * Makefile.in (SHELL): Use @SHELL@.
9137 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9139 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9142 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9144 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9145 Remove extraneous NULL element.
9147 2013-03-13 Yao Qi <yao@codesourcery.com>
9149 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9150 'V' block in trace frame.
9152 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9154 * target.h (struct target_ops): Add btrace ops.
9155 (target_supports_btrace): New macro.
9156 (target_enable_btrace): New macro.
9157 (target_disable_btrace): New macro.
9158 (target_read_btrace): New macro.
9159 * gdbthread.h (struct thread_info): Add btrace field.
9160 * server.c: Include btrace-common.h.
9161 (handle_btrace_general_set): New function.
9162 (handle_btrace_enable): New function.
9163 (handle_btrace_disable): New function.
9164 (handle_general_set): Call handle_btrace_general_set.
9165 (handle_qxfer_btrace): New function.
9166 (struct qxfer qxfer_packets[]): Add btrace entry.
9167 * inferiors.c (remove_thread): Disable btrace.
9168 * linux-low: Include linux-btrace.h.
9169 (linux_low_enable_btrace): New function.
9170 (linux_low_read_btrace): New function.
9171 (linux_target_ops): Add btrace ops.
9172 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9173 Add srv_linux_btrace=yes.
9174 (x86_64-*-linux*): Add linux-btrace.o.
9175 Add srv_linux_btrace=yes.
9176 * configure.ac: Define HAVE_LINUX_BTRACE.
9177 * config.in: Regenerated.
9178 * configure: Regenerated.
9180 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9182 * server.c (handle_qxfer): Preserve error message if -3 is
9184 (qxfer): Document the -3 return value.
9186 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9188 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9189 (linux_btrace_h): New variable.
9190 (linux-btrace.o): New rule.
9192 2013-03-08 Stan Shebs <stan@codesourcery.com>
9193 Hafiz Abid Qadeer <abidh@codesourcery.com>
9195 * tracepoint.c (trace_buffer_size): New global.
9196 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9197 (init_trace_buffer): Change to one-argument function. Allocate
9198 trace buffer memory.
9199 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9200 handle QTBuffer:size packet.
9201 (cmd_bigqtbuffer_size): New function.
9202 (initialize_tracepoint): Call init_trace_buffer with
9203 DEFAULT_TRACE_BUFFER_SIZE.
9204 * server.c (handle_query): Add QTBuffer:size in the
9207 2013-03-07 Yao Qi <yao@codesourcery.com>
9209 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9210 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9212 (cmd_qtsp): Adjust condition. Do post increment.
9213 Set cur_action and cur_step_action back to 0.
9215 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9218 * linux-low.c (linux_write_memory): Return early success if LEN is
9221 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9223 * configure.srv: Add x86_64-*-cygwin* as target.
9225 2013-02-28 Tom Tromey <tromey@redhat.com>
9227 * configure.ac: Invoke AC_SYS_LARGEFILE.
9228 * configure, config.in: Rebuild.
9230 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9232 * win32-low.c: Throughout, fix format strings and casts of
9233 printf-like functions to avoid type related warnings on all
9235 (get_child_debug_event): Print dwDebugEventCode as hex since
9236 that's how it's usually documented.
9238 2013-02-28 Yao Qi <yao@codesourcery.com>
9240 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9243 2013-02-27 Jiong Wang <jiwang@tilera.com>
9245 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9246 (reg-tilegx32.c): New rule.
9247 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9248 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9249 different register info initializer according to elf class.
9250 (init_registers_tilgx32): New function. The tilegx32 register info
9252 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9253 (tile_store_gregset): Likewise.
9255 2013-02-27 Yao Qi <yao@codesourcery.com>
9257 * server.c (process_point_options): Print debug message when
9258 debug_threads is true.
9260 2013-02-26 Yao Qi <yao@codesourcery.com>
9262 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9264 2013-02-19 Pedro Alves <palves@redhat.com>
9265 Kai Tietz <ktietz@redhat.com>
9269 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9270 instead of strtoul to extract address from packet.
9271 (process_serial_event) <'z'>: Likewise.
9273 2013-02-18 Yao Qi <yao@codesourcery.com>
9275 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9277 2013-02-14 Pedro Alves <palves@redhat.com>
9281 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9282 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9284 2013-02-14 Pedro Alves <palves@redhat.com>
9286 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9288 2013-02-14 Pedro Alves <palves@redhat.com>
9290 * tracepoint.c (save_string): Delete.
9291 (add_tracepoint_action): Use savestring instead of save_string.
9293 2013-02-12 Pedro Alves <palves@redhat.com>
9295 * linux-xtensa-low.c: Ditto.
9296 * xtensa-xtregs.c: Ditto.
9298 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9300 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9303 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9305 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9306 aarch64_num_wp_regs and aarch64_num_bp_regs to
9307 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9309 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9311 * linux-aarch64-low.c (ps_get_thread_area): Replace
9312 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9314 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9315 Marcus Shawcroft <marcus.shawcroft@arm.com>
9316 Nigel Stephens <nigel.stephens@arm.com>
9317 Yufeng Zhang <yufeng.zhang@arm.com>
9319 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9320 (aarch64.c, aarch64-without-fpu.c): New targets.
9321 * configure.srv (aarch64*-*-linux*): New.
9322 * linux-aarch64-low.c: New file.
9324 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9326 * linux-low.c (handle_extended_wait, linux_create_inferior)
9327 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9328 (dequeue_one_deferred_signal, linux_resume_one_thread)
9329 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9330 (linux_tracefork_grandchild, linux_test_for_tracefork)
9331 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9332 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9333 where the argument is 0.
9335 2013-01-25 Yao Qi <yao@codesourcery.com>
9337 * event-loop.c: Include "queue.h".
9338 (gdb_event_p): New typedef.
9339 (struct gdb_event) <next_event>: Remove.
9340 (event_queue): Change to QUEUE(gdb_event_p).
9341 (async_queue_event): Remove.
9342 (gdb_event_xfree): New.
9343 (initialize_event_loop): New.
9344 (process_event): Use API from QUEUE.
9345 (wait_for_event): Likewise.
9346 * server.c (main): Call initialize_event_loop.
9347 * server.h (initialize_event_loop): Declare.
9349 2013-01-18 Yao Qi <yao@codesourcery.com>
9351 * ax.h (struct eval_agent_expr_context): New.
9352 (gdb_eval_agent_expr): Update declaration.
9353 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9354 TFRAME. Add new argument CTX.
9355 * server.h (struct eval_agent_expr_context): Declare.
9356 (agent_mem_read, agent_tsv_read): Update declaration.
9357 (agent_mem_read_string): Likewise.
9358 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9359 (add_traceframe_block): Add new argument TPOINT.
9360 Increase TPOINT->traceframe_usage.
9361 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9362 eval_tracepoint_agent_expr.
9363 (condition_true_at_tracepoint): Likewise.
9364 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9365 (agent_mem_read_string, agent_tsv_read): Likewise.
9367 2013-01-16 Yao Qi <yao@codesourcery.com>
9369 * linux-low.c (linux_resume_one_lwp): Don't check
9370 'lwp->bp_reinsert != 0'.
9372 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9373 Pedro Alves <palves@redhat.com>
9375 * lynx-low.c (ptrace_request_to_str): Define a temporary
9376 macro and use it to simplify this function's implementation.
9378 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9380 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9383 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9385 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9387 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9389 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9391 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9393 * lynx-low.c (lynx_resume): Use the resume_info parameter
9394 to determine the ptid for the lynx_ptrace call, unless
9395 it is equal to minus_one_ptid, in which case we use the
9396 ptid of the current_inferior.
9397 (lynx_wait_1): After having received a thread create/exit
9398 event, resume the inferior's execution using the signaling
9399 thread's ptid, rather than the old ptid.
9401 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9403 * lynx-low.c (lynx_resume): Delete variable ret.
9405 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9407 * gdbreplay.c (gdbreplay_version): Update copyright year.
9408 * server.c (gdbserver_version): Likewise.
9410 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9412 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9415 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9417 * lynx-low.c (ptrace_request_to_str): Add handling for
9420 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9422 * lynx-low.c (lynx_attach): Delete variable new_process.
9424 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9426 * lynx-low.c (lynx_create_inferior): Delete variable
9429 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9431 * lynx-low.c (ptrace_request_to_str): Do not handle
9432 PTRACE_GETTHREADLIST if this macro does not exist.
9434 2012-12-15 Yao Qi <yao@codesourcery.com>
9436 * Makefile.in (OBS): Add notif.o.
9437 * notif.c, notif.h: New.
9438 * server.c: Include "notif.h".
9439 (struct vstop_notif) <next>: Remove.
9441 (queue_stop_reply): Update.
9442 (push_event, send_next_stop_reply): Remove.
9443 (discard_queued_stop_replies): Update.
9444 (notif_stop): New variable.
9445 (handle_v_stopped): Remove.
9446 (handle_v_requests): Don't call handle_v_stopped. Call
9447 handle_ack_notif instead.
9448 (queue_stop_reply_callback): Call notif_event_enque instead
9449 of queue_stop_reply.
9450 (handle_status): Don't call send_next_stop_reply, call
9451 notif_write_event instead.
9452 (kill_inferior_callback): Likewise.
9453 (detach_or_kill_inferior_callback): Likewise.
9454 (main): Call initialize_notif.
9455 (process_serial_event): Call QUEUE_is_empty.
9456 (handle_target_event): Call notif_push instead of push event.
9457 * server.h (push_event): Remove declaration.
9459 2012-12-10 Tom Tromey <tromey@redhat.com>
9461 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9462 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9465 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9466 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9467 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9468 (amd64-linux-ipa.o, ax.o): Rewrite.
9469 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9470 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9471 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9472 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9473 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9474 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9475 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9476 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9477 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9478 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9479 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9480 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9481 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9482 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9483 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9484 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9485 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9486 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9487 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9488 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9489 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9490 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9491 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9492 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9493 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9494 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9495 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9496 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9497 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9498 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9499 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9500 (reg-tilegx.o): Remove.
9501 (all_object_files): New macro.
9502 Include .deps files.
9503 * aclocal.m4, configure: Rebuild.
9504 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9505 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9506 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9508 2012-12-05 Tom Tromey <tromey@redhat.com>
9511 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9513 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9515 * configure.ac: Check for linux/perf_event.h.
9516 * config.in: Regenerated.
9517 * configure: Regenerated.
9519 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9521 * hostio.c (handle_readlink): Decrease buffer size
9522 parameter passed to readlink by one byte.
9524 2012-11-26 Yao Qi <yao@codesourcery.com>
9526 * configure.ac (build_warnings): Append '-Wempty-body'.
9527 * configure: Regenerated.
9528 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9531 2012-11-15 Pierre Muller <muller@sourceware.org>
9533 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9534 * config.in: Regenerate.
9535 * configure: Regenerate.
9536 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9537 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9538 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9539 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9541 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9542 instead of <sys/wait.h> header.
9543 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9545 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9547 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9548 (various make rules): Remove -DGDBSERVER
9550 2012-11-09 Yao Qi <yao@codesourcery.com>
9552 * spu-low.c (current_ptid): Move it to ..
9553 * gdbthread.h: ... here. New.
9554 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9555 * server.c (myresume, process_serial_event): Likewise.
9556 * thread-db.c (thread_db_find_new_threads): Likewise.
9557 * tracepoint.c (run_inferior_command): Likewise.
9559 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9561 * server.c (handle_search_memory_1): Include access length in
9564 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9566 * linux-crisv32-low.c: Fix compile errors.
9568 2012-09-04 Yao Qi <yao@codesourcery.com>
9570 * tracepoint.c (cmd_qtsv): Adjust debug message.
9571 Don't check CUR_TPOINT.
9573 2012-08-28 Yao Qi <yao@codesourcery.com>
9575 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9576 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9577 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9578 Remove declarations of xmalloc, xreallloc, xstrdup and
9580 * Makefile.in (libiberty_h): New.
9581 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9582 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9584 2012-08-23 Yao Qi <yao@codesourcery.com>
9586 * server.h: Remove declaration of 'xsnprintf'.
9588 2012-08-22 Keith Seitz <keiths@redhat.com>
9590 * server.h: Include build-gnulib-gbserver/config.h.
9591 * gdbreplay.c: Likewise.
9593 2012-08-08 Doug Evans <dje@google.com>
9595 * Makefile.in (SFILES): Add gdb_vecs.c.
9596 (OBS): Add gdb_vecs.o.
9597 (gdb_vecs_h, host_defs_h): New variables.
9598 (thread-db.o): Add $(gdb_vecs_h) dependency.
9599 (gdb_vecs.o): New rule.
9600 * thread-db.c: #include "gdb_vecs.h".
9601 (thread_db_load_search): Use a vector to iterate over path elements.
9602 Handle text appearing after "$pdir".
9604 * configure.ac: Add check for strstr.
9605 * config.in: Regenerate.
9606 * configure: Regenerate.
9608 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9610 * hostio.c (handle_pread): If pread fails, fall back to attempting
9612 (handle_pwrite): Likewise for pwrite.
9614 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9616 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9617 between unsupported TYPE and unimplementable ADDR/LEN combination.
9618 (arm_insert_point): Act on new return value.
9620 2012-07-31 Pedro Alves <palves@redhat.com>
9622 * server.c (process_point_options): Only skip tokens if we find
9623 one that is unrecognized. Don't treat 'X' specially while
9624 skipping unrecognized tokens.
9626 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9628 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9629 to 4-byte-align HW breakpoint addresses for Thumb.
9631 2012-07-27 Yao Qi <yao@codesourcery.com>
9635 * server.h: Declare gdb_agent_about_to_close.
9636 * target.c (kill_inferior): Include "agent.h".
9637 New. Send command 'kill'.
9638 * target.h (kill_inferior): Removed macro.
9639 * tracepoint.c (gdb_agent_about_to_close): New.
9640 (gdb_agent_helper_thread): Handle command 'close'.
9641 Wait endlessly until the inferior stops.
9642 Install gdb_agent_remove_socket to atexit hook.
9643 (agent_socket_name): New static variable.
9644 (gdb_agent_socket_init): Replace local variable 'name' with
9645 'agent_socket_name'.
9646 (gdb_agent_remove_socket): New.
9648 2012-07-27 Yao Qi <yao@codesourcery.com>
9650 * server.c (process_point_options): Stop at 'X' when parsing.
9652 2012-07-19 Michael Eager <eager@eagercon.com>
9654 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9656 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9657 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9658 hardware breakpoint.
9660 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9662 * gdbserver/linux-low.c (initialize_low): Call
9663 linux_ptrace_init_warnings.
9665 2012-07-02 Doug Evans <dje@google.com>
9667 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9670 2012-07-02 Stan Shebs <stan@codesourcery.com>
9672 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9673 (ax.o): Add it to build rule.
9675 (OBS): Add format.o.
9676 (IPA_OBS): Add format.o.
9677 * server.c (handle_query): Claim support for breakpoint commands.
9678 (process_point_options): Add command case.
9679 (process_serial_event): Leave running if there are printfs in
9681 * mem-break.h (any_persistent_commands): Declare.
9682 (add_breakpoint_commands): Declare.
9683 (gdb_no_commands_at_breakpoint): Declare.
9684 (run_breakpoint_commands): Declare.
9685 * mem-break.c (struct point_command_list): New struct.
9686 (struct breakpoint): New field command_list.
9687 (any_persistent_commands): New function.
9688 (add_commands_to_breakpoint): New function.
9689 (add_breakpoint_commands): New function.
9690 (gdb_no_commands_at_breakpoint): New function.
9691 (run_breakpoint_commands): New function.
9692 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9694 * ax.c: Include format.h.
9695 (ax_printf): New function.
9696 (gdb_eval_agent_expr): Add printf opcode.
9698 2012-06-13 Yao Qi <yao@codesourcery.com>
9700 * server.c (start_inferior): Remove duplicated writes to fields
9701 'last_resume_kind' and 'last_status' of 'current_inferior'.
9703 2012-06-12 Yao Qi <yao@codesourcery.com>
9704 Pedro Alves <palves@redhat.com>
9706 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9708 * server.c (handle_v_cont): Extend comment.
9710 2012-06-11 Yao Qi <yao@codesourcery.com>
9712 * linux-low.c (linux_attach): Add 'static'.
9714 2012-06-06 Yao Qi <yao@codesourcery.com>
9716 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9718 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9720 Fix gcc -flto compilation warning.
9721 * server.c (main): Make variable multi_mode and attach volatile.
9723 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9725 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9726 if the platform doesn't know about it.
9728 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9730 * Makefile.in (SFILES): Add linux-tile-low.c.
9731 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9732 * configure.srv: Handle tilegx-*-linux*.
9733 * linux-tile-low.c: New file.
9735 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9737 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9739 2012-05-24 Pedro Alves <palves@redhat.com>
9743 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9745 2012-05-24 Pedro Alves <palves@redhat.com>
9749 Replace target_signal with gdb_signal throughout.
9751 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9753 * linux-low.c (linux_store_registers): Avoid the copying sequence
9754 when no data has been retrieved by ptrace.
9756 2012-05-22 Will Deacon <will.deacon@arm.com>
9758 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9759 Include asm/ptrace.h.
9760 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9763 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9765 * linux-low.c (linux_store_registers): Don't re-retrieve data
9766 with ptrace that has already been obtained from /proc. Always
9767 copy any data retrieved with ptrace to the buffer supplied.
9769 2012-05-11 Yao Qi <yao@codesourcery.com>
9770 Pedro Alves <palves@redhat.com>
9772 * linux-low.c (enum stopping_threads_kind): New.
9773 (stopping_threads): Change type to `enum stopping_threads_kind'.
9774 (handle_extended_wait): If stopping and suspending threads, leave
9775 the new_lwp suspended too.
9776 (linux_wait_for_event): Adjust.
9777 (stop_all_lwps): Set `stopping_threads' to
9778 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9779 whether we're suspending threads or just stopping them. Assert no
9782 2012-04-29 Yao Qi <yao@codesourcery.com>
9784 * server.h: Move some code to ...
9785 * gdbthread.h: ... here. New.
9786 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9787 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9788 (nto-low.o, win32-low.o): Likewise.
9789 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9790 * regcache.c, remote-utils.c, server.c: Likewise.
9791 * target.c, tracepoint.c, win32-low.c: Likewise.
9793 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9795 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9796 (PTRACE_ARG4_TYPE): Likewise.
9797 (PTRACE_XFER_TYPE): Likewise.
9798 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9799 ptrace to PTRACE_ARG3_TYPE.
9800 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9801 (PTRACE_ARG4_TYPE): Likewise.
9802 (PTRACE_XFER_TYPE): Likewise.
9803 (linux_detach_one_lwp): Cast fourth argument of
9804 ptrace to long then PTRACE_ARG4_TYPE.
9805 (regsets_fetch_inferior_registers): Cast third argument of
9806 ptrace to long then PTRACE_ARG3_TYPE.
9807 (regsets_store_inferior_registers): Likewise.
9809 2012-04-20 Pedro Alves <palves@redhat.com>
9811 * configure: Regenerate.
9813 2012-04-19 Pedro Alves <palves@redhat.com>
9815 * Makefile.in (GNULIB_BUILDDIR): New.
9816 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9817 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9818 (all, install-only, uninstall, clean-info, all-lib, clean): No
9819 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9820 (maintainer-clean realclean distclean): Use subdir_do.
9822 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9823 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9824 * acinclude.m4: Include acx_configure_dir.m4.
9825 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9826 calls. Call AC_PROG_RANLIB. Configure gnulib using
9829 (GNULIB_STDINT_H): Adjust.
9830 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9831 * gdbreplay.c: Include build-gnulib/config.h.
9832 * server.h: Likewise.
9833 * aclocal.m4: Regenerate.
9834 * config.in: Regenerate.
9835 * configure: Regenerate.
9837 2012-04-19 Pedro Alves <palves@redhat.com>
9839 * Makefile.in (LIBGNU, INCGNU): Adjust.
9840 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9841 (all, install-only, uninstall, clean-info, all-lib, clean)
9842 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9843 * configure.ac: Adjust AC_OUTPUT output.
9844 * aclocal.m4: Regenerate.
9845 * configure: Regenerate.
9847 2012-04-19 Pedro Alves <palves@redhat.com>
9849 * Makefile.in (generated_files): New.
9850 (server_h): Remove the explicit dependency on config.h, and depend
9851 on $generated_files.
9853 2012-04-19 Pedro Alves <palves@redhat.com>
9855 * Makefile.in (INCGNU): Add -Ignulib.
9857 2012-04-19 Pedro Alves <palves@redhat.com>
9859 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9860 (INCGNU): ... this, and spell out -I here.
9861 (GNULIB_LIB): Rename to ...
9863 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9865 2012-04-19 Pedro Alves <palves@redhat.com>
9867 * config.in: Regenerate.
9869 2012-04-19 Pedro Alves <palves@redhat.com>
9871 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9872 * server.h (memmem): Remove declaration.
9873 * config.in: Regenerate.
9874 * configure: Regenerate.
9876 2012-04-19 Yao Qi <yao@codesourcery.com>
9878 * Makefile.in (SFILES): Add common/vec.c.
9882 2012-04-19 Yao Qi <yao@codesourcery.com>
9884 * remote-utils.c (prepare_resume_reply): Replace with macro
9885 target_core_of_thread.
9886 * server.c (handle_qxfer_threads_proper): Likewise.
9887 * target.h (traget_core_of_thread): New macro.
9889 2012-04-18 Pedro Alves <palves@redhat.com>
9891 * aclocal.m4: Regenerate.
9892 * configure: Regenerate.
9894 2012-04-16 Yao Qi <yao@codesourcery.com>
9896 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9897 duplicated on address.
9899 2012-04-16 Yao Qi <yao@codesourcery.com>
9901 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9902 (struct tracepoint_action_ops) <send>: New field.
9903 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9904 (agent_expr_send, x_tracepoint_action_send): New.
9905 (l_tracepoint_action_send): New.
9906 (cmd_qtdp): Download and install tracepoint
9907 according to `use_agent'.
9908 (run_inferior_command): Add one more parameter `len'.
9910 (tracepoint_send_agent): New.
9911 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9913 2012-04-16 Yao Qi <yao@codesourcery.com>
9915 * tracepoint.c (download_tracepoints): Moved to ...
9916 (cmd_qtstart): ... here.
9918 2012-04-14 Yao Qi <yao@codesourcery.com>
9920 * tracepoint.c: Include inttypes.h.
9921 (struct collect_memory_action): Use sized types.
9922 (struct tracepoint): Likewise.
9923 (cmd_qtdp, stop_tracing): Update print specifiers.
9924 (cmd_qtp, response_tracepoint): Likewise.
9925 (collect_data_at_tracepoint): Likewise.
9926 (collect_data_at_step): Likewise.
9928 2012-04-14 Yao Qi <yao@codesourcery.com>
9930 Import gnulib module inttypes.
9931 * aclocal.m4, config.in, configure: Regenerated.
9933 2012-04-14 Yao Qi <yao@codesourcery.com>
9935 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9936 Makefile and config.status at last.
9938 2012-04-13 Yao Qi <yao@codesourcery.com>
9940 * tracepoint.c: Include stdint.h unconditionally.
9942 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9944 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9945 on BFD_HAVE_SYS_PROCFS_TYPE.
9946 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9947 * configure: Regenerate.
9948 * config.in: Likewise.
9950 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9952 * Makefile.in (clean): Also remove x32.c x32-linux.c
9953 x32-avx.c x32-avx-linux.c.
9954 (x32.o): New target.
9956 (x32-linux.o): Likewise.
9957 (x32-linux.c): Likewise.
9958 (x32-avx.o): Likewise.
9959 (x32-avx.c): Likewise.
9960 (x32-avx-linux.o): Likewise.
9961 (x32-avx-linux.c): Likewise.
9963 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9964 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9965 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9966 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9967 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9968 i386/x32-avx-linux.xml.
9970 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9971 (init_registers_x32_avx_linux): Likwise.
9972 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9973 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9975 2012-04-13 Pedro Alves <palves@redhat.com>
9977 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9978 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9979 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9980 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9983 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9985 * linux-x86-low.c (compat_x32_clock_t): New.
9986 (compat_x32_siginfo_t): Likewise.
9987 (compat_x32_siginfo_from_siginfo): Likewise.
9988 (siginfo_from_compat_x32_siginfo): Likewise.
9989 (linux_is_elf64): Likewise.
9990 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9991 and siginfo_from_compat_x32_siginfo for x32.
9992 (x86_arch_setup): Set linux_is_elf64.
9994 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9997 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9999 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10000 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10001 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10002 compatible with process.
10004 2012-04-12 Yao Qi <yao@codesourcery.com>
10006 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10007 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10008 (install-only, install-info, clean): Handle sub dir gnulib.
10009 (all-lib, am--refresh): New targets.
10010 (memmem.o): Remove target.
10011 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10012 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10013 (AC_REPLACE_FUNCS): Remove memmem.
10014 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10015 (AC_OUTPUT): Generate Makefile in gnulib/.
10016 * aclocal.m4, config.in, configure: Regenerated.
10018 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10020 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10022 2012-04-05 Pedro Alves <palves@redhat.com>
10024 -Werror=strict-aliasing
10026 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10029 2012-04-04 Pedro Alves <palves@redhat.com>
10031 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10032 (sparc_store_gregset_from_stack, sparc_store_gregset)
10033 (sparc_breakpoint_at): Fix formatting.
10035 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10037 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10039 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10040 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10041 * config.in: Regenerate.
10042 * configure: Likewise.
10044 2012-03-29 Pedro Alves <palves@redhat.com>
10046 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10047 Correct ptrace arguments.
10049 2012-03-28 Pedro Alves <palves@redhat.com>
10051 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10052 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10053 (IA64_FR1_REGNUM): New defines.
10054 (ia64_fetch_register): New.
10055 (the_low_target): Install it.
10056 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10058 * linux-low.c (linux_fetch_registers): Try the
10059 the_low_target.fetch_register hook first.
10061 * linux-arm-low.c (the_low_target): Adjust.
10062 * linux-bfin-low.c (the_low_target): Adjust.
10063 * linux-cris-low.c (the_low_target): Adjust.
10064 * linux-crisv32-low.c (the_low_target): Adjust.
10065 * linux-m32r-low.c (the_low_target): Adjust.
10066 * linux-m68k-low.c (the_low_target): Adjust.
10067 * linux-mips-low.c (the_low_target): Adjust.
10068 * linux-ppc-low.c (the_low_target): Adjust.
10069 * linux-s390-low.c (the_low_target): Adjust.
10070 * linux-sh-low.c (the_low_target): Adjust.
10071 * linux-sparc-low.c (the_low_target): Adjust.
10072 * linux-tic6x-low.c (the_low_target): Adjust.
10073 * linux-x86-low.c (the_low_target): Adjust.
10074 * linux-xtensa-low.c (the_low_target): Adjust.
10076 2012-03-26 Pedro Alves <palves@redhat.com>
10078 * server.c (handle_qxfer_libraries): Don't bail early if
10079 the_target->qxfer_libraries_svr4 is not NULL.
10081 2012-03-26 Pedro Alves <palves@redhat.com>
10083 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10085 2012-03-23 Pedro Alves <palves@redhat.com>
10087 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10088 "library-list-svr4" element's start tag when the the DSO list is
10091 2012-03-23 Pedro Alves <palves@redhat.com>
10093 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10094 a variable whose type size is the same as the inferior's pointer
10097 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10099 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10101 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10102 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10103 * linux-low.h: Include <signal.h>.
10104 (struct siginfo): Remove forward declaration.
10105 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10108 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10110 * .gitignore: Ignore more files.
10112 2012-03-19 Pedro Alves <palves@redhat.com>
10113 Jan Kratochvil <jan.kratochvil@redhat.com>
10115 * server.c (cont_thread, general_thread): Add describing comments.
10116 (start_inferior): Clear `cont_thread'.
10117 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10120 2012-03-15 Yao Qi <yao@codesourcery.com>
10122 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10124 (cmd_qtdp): ... here.
10126 2012-03-15 Yao Qi <yao@codesourcery.com>
10128 * tracepoint.c (struct tracepoint_action_ops): New.
10129 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10130 (m_tracepoint_action_download): New.
10131 (r_tracepoint_action_download): New.
10132 (x_tracepoint_action_download): New.
10133 (l_tracepoint_action_download): New.
10134 (add_tracepoint_action): Install `action->ops' according type.
10135 (download_tracepoint_1): Move code `download' function pointer
10136 of various tracepoint_action_ops.
10138 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10140 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10141 linux_ptrace_attach_warnings.
10143 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10145 * Makefile.in (linux-ptrace.o): New.
10146 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10147 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10148 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10149 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10150 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10152 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10154 2012-03-08 Yao Qi <yao@codesourcery.com>
10155 Pedro Alves <palves@redhat.com>
10157 Fix PR server/13392.
10158 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10159 offset of JMP insn.
10160 * tracepoint.c (remove_tracepoint): New.
10161 (cmd_qtdp): Call remove_tracepoint when failed to install.
10163 2012-03-07 Pedro Alves <palves@redhat.com>
10165 * linux-low.c (get_detach_signal): New.
10166 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10167 Pass on pending signals to PTRACE_DETACH. Check the result of the
10169 * server.c (program_signals, program_signals_p): New.
10170 (handle_general_set): Handle QProgramSignals.
10171 * server.h (program_signals, program_signals_p): Declare.
10173 2012-03-05 Pedro Alves <palves@redhat.com>
10174 Jan Kratochvil <jan.kratochvil@redhat.com>
10176 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10179 2012-03-03 Yao Qi <yao@codesourcery.com>
10181 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10182 agent_look_up_symbols.
10184 2012-03-03 Yao Qi <yao@codesourcery.com>
10186 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10187 (linux-x86-low.o): Likewise.
10188 * server.h: Remove in_process_agent_loaded.
10189 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10193 2012-03-03 Yao Qi <yao@codesourcery.com>
10195 * tracepoint.c (gdb_agent_capability): New global.
10196 (in_process_agent_loaded_ust): Renamed to
10197 `in_process_agent_supports_ust'.
10199 (in_process_agent_supports_ust): Call agent_capability_check.
10200 (clear_installed_tracepoints): Assert that agent supports
10203 2012-03-03 Yao Qi <yao@codesourcery.com>
10205 * linux-low.c (linux_supports_agent): New.
10206 (linux_target_ops): Initialize field `supports_agent' with
10207 linux_supports_agent.
10208 * target.h (struct target_ops) <supports_agent>: New.
10209 (target_supports_agent): New macro.
10210 * server.c (handle_general_set): Handle packet 'QAgent'.
10211 (handle_query): Send `QAgent+'.
10212 * Makefile.in (server.o): Depends on agent.h.
10214 2012-03-03 Yao Qi <yao@codesourcery.com>
10216 * Makefile.in (OBS): Add agent.o.
10217 Add new rule for agent.o.
10218 Track dependence of tracepoint.c on agent.h.
10219 * tracepoint.c (run_inferior_command_1):
10220 (run_inferior_command): Call agent_run_command.
10221 (gdb_ust_connect_sync_socket): Deleted. Move it to
10223 (resume_thread, stop_thread): Likewise.
10224 (gdb_ust_socket_init): Renamed to ...
10225 (gdb_agent_socket_init): ... New.
10226 (gdb_ust_thread): Renamed to ...
10227 (gdb_agent_helper_thread): ... New.
10228 (gdb_ust_init): Move some code to ...
10229 (gdb_agent_init): ... here. New.
10230 [HAVE_UST]: Call gdb_ust_init.
10231 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10232 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10233 * config.in, configure: Regenerated.
10235 2012-03-02 Pedro Alves <palves@redhat.com>
10237 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10238 * linux-low.c (struct simple_pid_list): New.
10239 (stopped_pids): New a struct simple_pid_list pointer.
10240 (add_to_pid_list, pull_pid_from_list): New.
10241 (handle_extended_wait): Don't assume the first signal new children
10242 report is SIGSTOP. Adjust call to pull_pid_from_list.
10243 (linux_wait_for_lwp): Adjust.
10245 2012-03-02 Yao Qi <yao@codesourcery.com>
10247 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10250 2012-03-02 Yao Qi <yao@codesourcery.com>
10252 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10253 `stop_pc' and `tpoint'. Update caller.
10255 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10257 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10258 * linux-low.c (use_linux_regsets): New macro.
10259 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10260 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10261 (linux_register_in_regsets): New function.
10262 (usr_fetch_inferior_registers): Skip registers covered by
10264 (usr_store_inferior_registers): Likewise.
10265 (usr_fetch_inferior_registers): New macro.
10266 (usr_store_inferior_registers): Likewise.
10267 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10268 (linux_store_registers): Likewise.
10269 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10271 (init_registers_mips64_dsp_linux): Likewise.
10272 (init_registers_mips_linux): New macro.
10273 (init_registers_mips_dsp_linux): Likewise.
10274 (mips_dsp_num_regs): Likewise.
10275 (DSP_BASE, DSP_CONTROL): New fallback macros.
10276 (mips_base_regs): New macro.
10277 (mips_regmap): Use it. Fix the size.
10278 (mips_dsp_regmap): New variable.
10279 (mips_dsp_regset_bitmap): Likewise.
10280 (mips_arch_setup): New function.
10281 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10283 (mips_cannot_store_register): Likewise.
10284 (the_low_target): Update .arch_setup, .num_regs and .regmap
10285 initializers. Add .regset_bitmap initializer.
10286 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10288 * linux-bfin-low.c (the_low_target): Likewise.
10289 * linux-cris-low.c (the_low_target): Likewise.
10290 * linux-crisv32-low.c (the_low_target): Likewise.
10291 * linux-ia64-low.c (the_low_target): Likewise.
10292 * linux-m32r-low.c (the_low_target): Likewise.
10293 * linux-m68k-low.c (the_low_target): Likewise.
10294 * linux-ppc-low.c (the_low_target): Likewise.
10295 * linux-s390-low.c (the_low_target): Likewise.
10296 * linux-sh-low.c (the_low_target): Likewise.
10297 * linux-sparc-low.c (the_low_target): Likewise.
10298 * linux-tic6x-low.c (the_low_target): Likewise.
10299 * linux-x86-low.c (the_low_target): Likewise.
10300 * linux-xtensa-low.c (the_low_target): Likewise.
10301 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10302 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10303 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10305 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10306 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10308 2012-02-29 Yao Qi <yao@codesourcery.com>
10309 Pedro Alves <palves@redhat.com>
10311 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10312 `step_over_finished' is true.
10314 2012-02-27 Pedro Alves <palves@redhat.com>
10316 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10317 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10319 2012-02-27 Pedro Alves <palves@redhat.com>
10322 * linux-low.c (pid_is_stopped): New.
10323 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10325 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10327 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10330 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10332 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10334 2012-02-24 Luis Machado <lgustavo@codesourcery>
10336 * server.c (handle_query): Advertise support for target-side
10337 breakpoint condition evaluation.
10338 (process_point_options): New function.
10339 (process_serial_event): When inserting a breakpoint, check for
10340 a target-side condition that should be evaluated.
10342 * mem-break.c: Include regcache.h and ax.h.
10343 (point_cond_list_t): New data structure.
10344 (breakpoint) <cond_list>: New field.
10345 (find_gdb_breakpoint_at): Make non-static.
10346 (delete_gdb_breakpoint_at): Clear any target-side
10348 (clear_gdb_breakpoint_conditions): New function.
10349 (add_condition_to_breakpoint): Likewise.
10350 (add_breakpoint_condition): Likewise.
10351 (gdb_condition_true_at_breakpoint): Likewise.
10352 (gdb_breakpoint_here): Return result directly instead
10353 of going through a local variable.
10355 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10356 (clear_gdb_breakpoint_conditions): Likewise.
10357 (add_breakpoint_condition): Likewise.
10358 (gdb_condition_true_at_breakpoint): Likewise.
10360 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10361 (need_step_over_p): Take target-side breakpoint condition into
10364 2012-02-24 Luis Machado <lgustavo@codesourcery>
10366 * server.h: Include tracepoint.h.
10367 (agent_mem_read, agent_get_trace_state_variable_value,
10368 agent_set_trace_state_variable_value,
10369 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10370 get_set_tsv_func_addr): New prototypes.
10372 * ax.h: New include file.
10373 * ax.c: New source file.
10375 * tracepoint.c: Include ax.h.
10376 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10377 agent_expr, eval_result_type): Move to ax.h.
10378 (parse_agent_expr): Rename to ...
10379 (gdb_parse_agent_expr): ... this, make it non-static and move
10381 (unparse_agent_expr) Rename to ...
10382 (gdb_unparse_agent_expr): ... this, make it non-static and move
10384 (eval_agent_expr): Rename to ...
10385 (eval_tracepoint_agent_expr): ... this.
10386 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10387 forward declarations.
10388 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10389 (agent_get_trace_state_variable_value): New function.
10390 (agent_set_trace_state_variable_value): New function.
10391 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10392 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10393 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10394 (condition_true_at_tracepoint): Likewise.
10395 (parse_agent_expr): Rename to ...
10396 (gdb_parse_agent_expr): ... this and move to ax.c.
10397 (unparse_agent_expr): Rename to ...
10398 (gdb_unparse_agent_expr): ... this and move to ax.c.
10399 (gdb_agent_op_name): Move to ax.c.
10400 (eval_agent_expr): Rename to ...
10401 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10403 (eval_tracepoint_agent_expr): New function.
10404 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10406 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10408 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10409 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10410 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10411 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10412 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10413 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10414 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10415 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10416 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10417 (compile_bytecodes): Remove forward declaration.
10418 (is_goto_target): Move to ax.c.
10419 (compile_bytecodes): Move to ax.c and call
10420 agent_get_trace_state_variable_value (...) and
10421 agent_set_trace_state_variable_value (...).
10423 * Makefile.in: Update ax.c and IPA dependencies.
10425 2012-02-24 Pedro Alves <palves@redhat.com>
10427 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10428 (cmd_bigqtbuffer_circular): ... this. Only handle
10429 'QTBuffer:circular:'.
10430 (handle_tracepoint_general_set): Adjust.
10432 2012-02-16 Yao Qi <yao@codesourcery.com>
10434 * inferiors.c: Move code to ...
10435 * dll.c: .... here. New.
10436 * server.h: Declare clear_dlls.
10437 * Makefile.in (SFILES): Add dll.c.
10441 2012-02-11 Yao Qi <yao@codesourcery.com>
10443 * server.c: (handle_monitor_command): Add a new parameter
10445 (handle_query): Update caller.
10447 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10449 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10450 * configure, config.in: Regenerate.
10451 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10454 2012-02-02 Pedro Alves <palves@redhat.com>
10456 Try SIGKILL first, then PTRACE_KILL.
10457 * linux-low.c (linux_kill_one_lwp): New.
10458 (linux_kill_one_lwp): Rename to ...
10459 (kill_one_lwp_callback): ... this. Use the new
10460 linux_kill_one_lwp.
10462 2012-02-02 Pedro Alves <palves@redhat.com>
10464 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10467 2012-01-27 Pedro Alves <palves@redhat.com>
10469 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10470 (elf_64_file_p): Make static.
10471 (linux_pid_exe_is_elf_64_file): New.
10472 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10473 Delete declarations.
10474 (linux_pid_exe_is_elf_64_file): Declare.
10475 * linux-x86-low.c (x86_arch_setup): Use
10476 linux_pid_exe_is_elf_64_file.
10478 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10480 * linux-low.c (linux_wait_for_event_1): Rename to ...
10481 (linux_wait_for_event): ... here and merge it with former
10482 linux_wait_for_event - new variable wait_ptid, use it.
10483 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10485 2012-01-23 Pedro Alves <palves@redhat.com>
10487 * server.c (main): Avoid yet another case of infinite loop while
10488 detaching/killing after a longjmp.
10490 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10493 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10495 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10497 * hostio.c (handle_readlink): New function.
10498 (handle_vFile): Call it to handle "vFile:readlink" packets.
10500 2012-01-20 Pedro Alves <palves@redhat.com>
10501 Ulrich Weigand <ulrich.weigand@linaro.org>
10503 * server.c (handle_v_requests): Only support vAttach and vRun to
10504 start multiple processes when in extended protocol mode.
10506 2012-01-17 Pedro Alves <palves@redhat.com>
10508 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10509 memalign plus mprotect to allocate the scratch buffer.
10511 2012-01-13 Pedro Alves <palves@redhat.com>
10513 * server.c (attach_inferior): Clear `cont_thread'.
10515 2012-01-13 Pedro Alves <palves@redhat.com>
10517 * server.c (main): Avoid infinite loop while detaching/killing
10520 2012-01-09 Doug Evans <dje@google.com>
10522 * server.c (start_inferior): Set last_ptid in --wrapper case.
10524 2012-01-06 Yao Qi <yao@codesourcery.com>
10526 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10528 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10530 2012-01-04 Yao Qi <yao@codesourcery.com>
10532 * tracepoint.c (cmd_qtdp): Print debug message
10533 for static tracepoint.
10535 2012-01-04 Yao Qi <yao@codesourcery.com>
10537 * tracepoint.c (trace_vdebug): Differentiate debug message
10538 between gdbserver and IPA.
10540 2012-01-03 Yao Qi <yao@codesourcery.com>
10542 * tracepoint.c (tracepoint_was_hit): Don't collect for
10545 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10547 * terminal.h: Reformat copyright header.
10549 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10551 * server.c (gdbserver_version): Update copyright year.
10552 * gdbreplay.c (gdbreplay_version): Likewise.
10554 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10556 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10559 2011-12-18 Hui Zhu <teawater@gmail.com>
10560 * linux-low.c (linux_create_inferior): Save return value to ret.
10562 2011-12-18 Hui Zhu <teawater@gmail.com>
10564 * linux-low.c (linux_create_inferior): Save return value to ret.
10566 2011-12-16 Doug Evans <dje@google.com>
10568 * linux-low.c (linux_create_inferior): If stdio connection,
10569 redirect stdin from /dev/null, stdout to stderr.
10570 * remote-utils.c (remote_is_stdio): New static global.
10571 (remote_connection_is_stdio): New function.
10572 (remote_prepare): Handle stdio connection.
10573 (remote_open): Ditto.
10574 (remote_close): Don't close stdin for stdio connections.
10575 (read_prim,write_prim): New functions. Replace all calls to
10576 read/write to these.
10577 * server.c (main): Watch for "-" argument. Move call to
10578 remote_prepare before start_inferior.
10579 * server.h (STDIO_CONNECTION_NAME): New macro.
10580 (remote_connection_is_stdio): Declare.
10582 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10583 in debugging output.
10585 2011-12-15 Yao Qi <yao@codesourcery.com>
10587 * tracepoint.c: Include sys/syscall.h.
10588 (gdb_ust_thread): Remove preprocessor conditional.
10590 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10592 * linux-low.c (linux_detach_one_lwp): Call
10593 the_low_target.prepare_to_resume before detaching.
10595 2011-12-14 Yao Qi <yao@codesourcery.com>
10597 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10600 2011-12-14 Yao Qi <yao@codesourcery.com>
10602 * i386-low.c (i386_low_stopped_data_address): Initialize local
10603 variable `control'.
10605 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10609 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10610 DR_CONTROL unless necessary. Extend comments.
10611 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10612 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10614 2011-12-13 Yao Qi <yao@codesourcery.com>
10616 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10618 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10620 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10622 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10623 Print new debug message for such case.
10625 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10627 Fix overlapping memcpy.
10628 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10629 the read_inferior_memory transfer.
10630 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10631 write_inferior_memory transfer.
10632 (set_fast_tracepoint_jump): New variable buf. Use it for the
10633 read_inferior_memory and write_inferior_memory transfers.
10634 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10635 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10636 Use it for the write_inferior_memory transfer.
10637 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10640 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10642 * linux-low.c (fetch_register, store_register): Make code
10643 consistent, fix formatting.
10645 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10647 * linux-low.c (usr_store_inferior_registers): Factor out code
10648 to handle individual registers into...
10649 (store_register): ... this new function.
10651 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10653 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10654 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10655 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10656 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10657 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10658 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10659 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10660 (srv_xmlfiles): Add new XML files.
10662 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10664 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10665 (init_registers_s390_linux32v1): Add prototype.
10666 (init_registers_s390_linux32v2): Likewise.
10667 (init_registers_s390_linux64v1): Likewise.
10668 (init_registers_s390_linux64v2): Likewise.
10669 (init_registers_s390x_linux64v1): Likewise.
10670 (init_registers_s390x_linux64v2): Likewise.
10671 (s390_num_regs): Increment to 52.
10672 (s390_regmap): Add orig_r2 register.
10673 (s390_num_regs_3264): Increment to 68.
10674 (s390_regmap_3264): Add orig_r2 register.
10675 (s390_collect_ptrace_register): Handle orig_r2 register.
10676 (s390_supply_ptrace_register): Likewise.
10677 (s390_fill_last_break): New function.
10678 (s390_store_last_break): Likewise.
10679 (s390_fill_system_call): New function.
10680 (s390_store_system_call): Likewise.
10681 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10683 (s390_check_regset): New function.
10684 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10685 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10686 Update target_regsets for available register sets.
10688 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10689 Jan Kratochvil <jan.kratochvil@redhat.com>
10691 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10692 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10694 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10695 * linux-low.h (struct process_info_private): New member r_debug.
10696 * server.c (handle_qxfer_libraries): Call
10697 the_target->qxfer_libraries_svr4.
10698 (handle_qxfer_libraries_svr4): New function.
10699 (qxfer_packets): New entry "libraries-svr4".
10700 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10701 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10702 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10703 PACKET_qXfer_libraries_svr4.
10705 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10707 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10708 PSW address/mask between 8-byte and 16-byte formats.
10709 (s390_supply_ptrace_register): Likewise.
10710 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10711 basic addressing mode bit.
10713 2011-11-24 Stan Shebs <stan@codesourcery.com>
10715 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10717 2011-11-17 Stan Shebs <stan@codesourcery.com>
10719 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10720 (tracing_start_time): New global.
10721 (tracing_stop_time): New global.
10722 (tracing_user_name): New global.
10723 (tracing_notes): New global.
10724 (tracing_stop_note): New global.
10725 (cmd_qtstart): Set traceframe_usage, start_time.
10726 (stop_tracing): Set stop_time.
10727 (cmd_qtstatus): Report additional status.
10728 (cmd_qtp): New function.
10729 (handle_tracepoint_query): Call it.
10730 (cmd_qtnotes): New function.
10731 (handle_tracepoint_general_set): Call it.
10732 (get_timestamp): Rename from tsv_get_timestamp.
10734 2011-11-14 Stan Shebs <stan@codesourcery.com>
10735 Kwok Cheung Yeung <kcy@codesourcery.com>
10737 * linux-x86-low.c (small_jump_insn): New.
10738 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10739 trampoline and error message, build a trampoline and issue a small
10740 jump instruction to it.
10741 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10742 trampoline and error message.
10743 (x86_get_min_fast_tracepoint_insn_len): New.
10744 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10745 * linux-low.h (struct linux_target_ops): Add arguments to
10746 install_fast_tracepoint_jump_pad operation, add new operation.
10747 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10749 (linux_get_min_fast_tracepoint_insn_len): New function.
10750 (linux_target_op): Add new operation.
10751 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10752 (gdb_trampoline_buffer_end): Ditto.
10753 (gdb_trampoline_buffer_error): Ditto.
10754 (struct ipa_sym_addresses): Add fields for new IPA variables.
10755 (symbol_list): Add entries for new IPA variables.
10756 (struct tracepoint): Add fields to hold the address range of the
10757 trampoline used by the tracepoint.
10758 (trampoline_buffer_head): New static variable.
10759 (trampoline_buffer_tail): Ditto.
10760 (claim_trampoline_space): New function.
10761 (have_fast_tracepoint_trampoline_buffer): New function.
10762 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10764 (install_fast_tracepoint): Ditto, also add error buffer argument.
10765 (cmd_qtminftpilen): New function.
10766 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10767 (fast_tracepoint_from_trampoline_address): New function.
10768 (fast_tracepoint_collecting): Handle trampoline as part of jump
10770 (set_trampoline_buffer_space): New function.
10771 (initialize_tracepoint): Initialize new IPA variables.
10772 * target.h (struct target_ops): Add arguments to
10773 install_fast_tracepoint_jump_pad operation, add new
10774 get_min_fast_tracepoint_insn_len operation.
10775 (target_get_min_fast_tracepoint_insn_len): New.
10776 (install_fast_tracepoint_jump_pad): Add arguments.
10777 * server.h (IPA_BUFSIZ): Define.
10778 * linux-i386-ipa.c: Include extra header files.
10779 (initialize_fast_tracepoint_trampoline_buffer): New function.
10780 (initialize_low_tracepoint): Call it.
10781 * server.h (set_trampoline_buffer_space): Declare.
10782 (claim_trampoline_space): Ditto.
10783 (have_fast_tracepoint_trampoline_buffer): Ditto.
10785 2011-11-14 Yao Qi <yao@codesourcery.com>
10787 * server.c (handle_query): Handle InstallInTrace for qSupported.
10788 * tracepoint.c (add_tracepoint): Sort list.
10789 (install_tracepoint, download_tracepoint): New.
10790 (cmd_qtdp): Call them to install and download tracepoints.
10791 (sort_tracepoints): Removed.
10792 (cmd_qtstart): Update.
10794 2011-11-14 Yao Qi <yao@codesourcery.com>
10796 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10797 * mem-break.h: Declare.
10798 * tracepoint.c (cmd_qtstart): Move some code to ...
10799 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10801 (download_tracepoints): Move some code to ...
10802 (download_tracepoint_1): ... here. New.
10804 2011-11-08 Yao Qi <yao@codesourcery.com>
10806 * remote-utils.c (relocate_instruction): A comment fix.
10808 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10810 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10811 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10812 dr_status_mirror and dr_control_mirror from debug_reg_state.
10813 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10814 (i386_initial_stuff): Remove use of deleted globals.
10815 (i386_get_thread_context, i386_set_thread_context,
10816 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10817 from debug_reg_state.
10819 2011-11-05 Yao Qi <yao@codesourcery.com>
10821 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10822 address as TPOINT's.
10824 2011-11-02 Stan Shebs <stan@codesourcery.com>
10826 * tracepoint.c (agent_mem_read_string): New function.
10827 (eval_agent_expr): Call it for tracenz.
10828 * server.c (handle_query): Report support for tracenz.
10830 2011-11-02 Yao Qi <yao@codesourcery.com>
10832 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10834 2011-11-02 Yao Qi <yao@codesourcery.com>
10836 * target.h: Fix a typo in comment.
10838 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10840 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10841 clobber the breakpoints' shadows with fast tracepoint jumps.
10842 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10843 * target.c (write_inferior_memory): Also pass MYADDR down to
10846 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10848 * configure.ac: Check support for personality routine.
10849 * configure: Regenerate.
10850 * config.in: Likewise.
10851 * linux-low.c: Include <sys/personality.h>.
10852 Define ADDR_NO_RANDOMIZE if necessary.
10853 (linux_create_inferior): Disable address space randomization when
10854 forking inferior, if requested.
10855 (linux_supports_disable_randomization): New function.
10856 (linux_target_ops): Install it.
10857 * server.h (disable_randomization): Declare.
10858 * server.c (disable_randomization): New global variable.
10859 (handle_general_set): Handle QDisableRandomization.
10860 (handle_query): Likewise for qSupported.
10861 (main): Support --disable-randomization and --no-disable-randomization
10862 command line arguments.
10863 * target.h (struct target_ops): Add supports_disable_randomization.
10864 (target_supports_disable_randomization): New macro.
10866 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10868 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10870 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10871 [!PT_GETDSBT] (target_loadmap): New definition.
10872 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10873 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10874 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10875 and PT_GETDSBT to LINUX_LOADMAP.
10876 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10877 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10879 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10881 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10882 (arm_linux_hwbp_cap): New static variable.
10883 (arm_linux_get_hwbp_cap): Replace by ...
10884 (arm_linux_init_hwbp_cap): ... this new function.
10885 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10886 (arm_linux_get_hw_watchpoint_count): Likewise.
10887 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10888 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10889 (arm_prepare_to_resume): Use perror_with_name instead of error.
10891 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10893 * linux-arm-low.c: Include <signal.h>.
10894 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10895 (struct arm_linux_hwbp_cap): New data type.
10896 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10897 (struct arm_linux_hw_breakpoint): New data type.
10898 (MAX_BPTS, MAX_WPTS): Define.
10899 (struct arch_process_info, struct arch_lwp_info): New data types.
10900 (arm_linux_get_hwbp_cap): New function.
10901 (arm_linux_get_hw_breakpoint_count): Likewise.
10902 (arm_linux_get_hw_watchpoint_count): Likewise.
10903 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10904 (arm_hwbp_control_initialize): Likewise.
10905 (arm_hwbp_control_is_enabled): Likewise.
10906 (arm_hwbp_control_is_initialized): Likewise.
10907 (arm_hwbp_control_disable): Likewise.
10908 (arm_linux_hw_breakpoint_equal): Likewise.
10909 (arm_linux_hw_point_initialize): Likewise.
10910 (struct update_registers_data): New data structure.
10911 (update_registers_callback: New function.
10912 (arm_insert_point): Likewise.
10913 (arm_remove_point): Likewise.
10914 (arm_stopped_by_watchpoint): Likewise.
10915 (arm_stopped_data_address): Likewise.
10916 (arm_new_process): Likewise.
10917 (arm_new_thread): Likewise.
10918 (arm_prepare_to_resume): Likewise.
10919 (the_low_target): Register arm_insert_point, arm_remove_point,
10920 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10921 arm_new_thread, and arm_prepare_to_resume.
10923 2011-09-15 Stan Shebs <stan@codesourcery.com>
10925 * server.h (struct emit_ops): Add compare-goto fields.
10926 * tracepoint.c (gdb_agent_op_sizes): New table.
10927 (emit_eq_goto): New function.
10928 (emit_ne_goto): New function.
10929 (emit_lt_goto): New function.
10930 (emit_le_goto): New function.
10931 (emit_gt_goto): New function.
10932 (emit_ge_goto): New function.
10933 (is_goto_target): New function.
10934 (compile_bytecodes): Recognize special cases of compare-goto
10935 combinations and call specialized emitters for them.
10936 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10937 (amd64_emit_ne_goto): New function.
10938 (amd64_emit_lt_goto): New function.
10939 (amd64_emit_le_goto): New function.
10940 (amd64_emit_gt_goto): New function.
10941 (amd64_emit_ge_goto): New function.
10942 (amd64_emit_ops): Add the new functions.
10943 (i386_emit_eq_goto): New function.
10944 (i386_emit_ne_goto): New function.
10945 (i386_emit_lt_goto): New function.
10946 (i386_emit_le_goto): New function.
10947 (i386_emit_gt_goto): New function.
10948 (i386_emit_ge_goto): New function.
10949 (i386_emit_ops): Add the new functions.
10951 2011-09-08 Stan Shebs <stan@codesourcery.com>
10953 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10954 (i386_emit_epilogue): Restore %ebx.
10956 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10958 * server.c (step_thread): Remove definition.
10959 (process_serial_event): Don't handle Hs.
10960 * server.h (step_thread): Remove declaration.
10961 * target.c (set_desired_inferior): Remove use of step_thread.
10963 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10965 * linux-low.c: Include linux-procfs.h.
10966 (linux_attach_lwp_1): Update comments.
10967 (linux_attach): Scan for existing threads when attaching to a
10968 process that is the tgid.
10969 * Makefile.in: Update dependencies.
10971 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10973 * configure.srv: Add linux-procfs.o dependencies.
10975 2011-08-14 Yao Qi <yao@codesourcery.com>
10977 * target.h (struct target_ops): Fix indent.
10978 * win32-low.c (win32_target_ops): Fix comment.
10980 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10981 Yao Qi <yao@codesourcery.com>
10983 * Makefile.in (clean): Remove tic6x-*.c files.
10984 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10985 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10986 (tic6x-c64xp-linux.c): Likewise.
10987 * configure.srv: Add support for tic6x-*-uclinux.
10988 * linux-tic6x-low.c: New.
10989 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10991 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10992 Yao Qi <yao@codesourcery.com>
10994 * target.h (struct target_ops): Add read_loadmap.
10995 * linux-low.c (struct target_loadseg): New type.
10996 (struct target_loadmap): New type.
10997 (linux_read_loadmap): New function.
10998 (linux_target_ops): Add linux_read_loadmap.
10999 * server.c (handle_query): Support qXfer:fdpic:read packet.
11000 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11003 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11005 * win32-low.c: Include <stdint.h>.
11007 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11009 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11010 to the inferior here.
11011 (i386_remove_aligned_watchpoint): Ditto.
11012 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11013 fit part of the watchpoint in the debug registers.
11014 (i386_update_inferior_debug_regs): New.
11015 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11016 registers, and only update the inferior on success.
11017 (i386_low_remove_watchpoint): Ditto.
11019 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11021 * linux-low.c (compare_ints, unique, list_threads, show_process,
11022 linux_core_of_thread): Delete.
11023 (linux_target_ops): Change linux_core_of_thread to
11024 linux_common_core_of_thread.
11025 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11026 * utils.c (malloc_failure): Change type of argument.
11027 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11028 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11029 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11030 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11031 (IPA_OBJS): Add common-utils-ipa.o.
11032 (ptid_h, linux_osdata_h): New macros.
11033 (server_h): Add common/common-utils.h, common/xml-utils.h,
11034 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11036 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11037 ptid.o, buffer.o): New rules.
11038 (linux-low.o): Add common/linux-osdata.h as a dependency.
11039 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11040 * configure.ac: Add AC_HEADER_DIRENT check.
11041 * config.in: Regenerate.
11042 * configure: Regenerate.
11043 * remote-utils.c (xml_escape_text): Delete.
11044 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11045 buffer_xml_printf): Move to common/buffer.c.
11046 * server.c (main): Remove call to initialize_inferiors.
11047 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11048 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11049 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11050 internal_error, gdb_assert, gdb_assert_fail): Delete.
11051 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11052 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11054 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11055 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11056 initialize_inferiors): Delete.
11058 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11060 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11063 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11065 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11067 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11069 2011-05-26 Yao Qi <yao@codesourcery.com>
11071 * Makefile.in (thread-db.o): Track dependence to
11072 common/gdb_thread_db.h.
11073 * thread-db.c: include gdb_thread_db.h from right place.
11075 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11077 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11078 __FILE__ and __LINE__ to internal_error.
11080 2011-05-13 Doug Evans <dje@google.com>
11082 * thread-db.c (try_thread_db_load_from_sdir): New function.
11083 (try_thread_db_load_from_dir): New function.
11084 (thread_db_load_search): Handle $sdir, ignore $pdir.
11085 Remove trying of system directories if search of
11086 libthread-db-search-path fails, that is now done via $sdir.
11088 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11090 * server.c (handle_query): Add EnableDisableTracepoints to the list
11091 of supported features.
11092 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11094 (cmd_qtenable_disable): New.
11095 (cmd_qtstart): Install tracepoints even if disabled.
11096 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11097 receiving a QTEnable or QTDisable packet.
11098 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11099 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11101 (gdb_probe): Skip data collection if static tracepoint is disabled.
11103 2011-05-10 Doug Evans <dje@google.com>
11105 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11107 2011-05-04 Doug Evans <dje@google.com>
11109 * linux-low.c (linux_join): Skip process lookup.
11110 * spu-low.c (spu_join): Ditto.
11111 * server.c (join_inferiors_callback): Delete.
11112 (process_serial_event): For 'D' packet (detach) call join_inferior
11115 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11117 * README: Don't mention xscale*-*-linux*.
11118 * configure.srv (xscale*-*-linux*): Don't handle target.
11120 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11122 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11124 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11125 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11126 (i386_emit_void_call_2): Likewise.
11128 2011-04-26 Yao Qi <yao@codesourcery.com>
11130 * linux-low.c: Move common macros to linux-ptrace.h.
11131 Include linux-ptrace.h.
11132 * Makefile.in (linux_ptrace_h): New.
11133 (linux-low.o): Depends on linux-ptrace.h.
11135 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11137 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11138 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11139 (remote_prepare): New function with most of the TCP code from ...
11140 (remote_open): ... here. Detect PORT here unconditionally. Move also
11141 setting transport_is_reliable.
11142 * server.c (run_once): New variable.
11143 (gdbserver_usage): Document it.
11144 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11145 the first run if RUN_ONCE.
11146 * server.h (run_once, remote_prepare): New declarations.
11148 2011-04-19 Tom Tromey <tromey@redhat.com>
11150 * win32-low.c (handle_load_dll): Remove duplicate "the".
11152 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11154 Remove support for old Cygwin 1.5 versions.
11155 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11156 function to avoid warning.
11157 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11160 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11162 * gdbserver/server.h (Macro _): Define it if not available.
11164 2011-03-14 Michael Snyder <msnyder@vmware.com>
11166 * hostio.c (handle_close): Remove unnecessary null test.
11168 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11170 * Makefile.in (maintainer-clean realclean distclean): Remove
11171 "make ... subdir_do" command.
11173 2011-03-10 Michael Snyder <msnyder@vmware.com>
11175 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11177 * server.c (handle_v_run): Free alloced buffer on early return.
11179 2011-03-09 Yao Qi <yao@codesourcery.com>
11182 2011-03-04 Yao Qi <yao@codesourcery.com>
11184 * Makefile.in: Remove GNU make feature --directory.
11186 2011-03-05 Yao Qi <yao@codesourcery.com>
11188 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11189 (subdir_do): New make target. Copied from gdb/Makefile.
11190 (maintainer-clean, realclean, distclean, clean): Call corresponding
11191 make targets in common/Makefile.
11193 2011-02-11 Yao Qi <yao@codesourcery.com>
11195 * configure.ac: Call AC_PROG_RANLIB.
11196 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11197 * configure: Regenerate.
11199 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11201 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11203 2011-03-06 Yao Qi <yao@codesourcery.com>
11205 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11207 2011-03-05 Yao Qi <yao@codesourcery.com>
11209 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11210 (subdir_do): New make target. Copied from gdb/Makefile.
11211 (maintainer-clean, realclean, distclean, clean): Call corresponding
11212 make targets in common/Makefile.
11214 2011-03-04 Yao Qi <yao@codesourcery.com>
11216 * Makefile.in: Remove GNU make feature --directory.
11218 2011-03-04 Michael Snyder <msnyder@vmware.com>
11220 * server.c (queue_stop_reply): Call xmalloc not malloc.
11222 2011-03-02 Michael Snyder <msnyder@vmware.com>
11224 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11226 2011-02-28 Michael Snyder <msnyder@vmware.com>
11228 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11229 (cmd_qtframe): Ditto.
11230 (cmd_qtbuffer): Ditto.
11231 (cmd_bigqtbuffer): Ditto.
11233 * utils.c (decimal2str): Initialize 'width' to nine, then
11234 don't mess with it.
11236 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11238 * hostio.c (require_data): Free *data, not data.
11240 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11242 * hostio.c (require_data): Use free, not xfree.
11244 2011-02-27 Michael Snyder <msnyder@vmware.com>
11246 * server.c (handle_query): Discard unused value.
11248 * hostio.c (require_data): Free malloc memory before returning
11251 2011-02-26 Michael Snyder <msnyder@vmware.com>
11253 * linux-low.c (list_threads): Call closedir for dirent.
11255 2011-02-27 Michael Snyder <msnyder@vmware.com>
11257 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11258 a case statement falls through.
11260 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11262 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11265 2011-02-26 Michael Snyder <msnyder@vmware.com>
11267 * utils.c (decimal2str): Eliminate dead code and dead param.
11268 (pulongest): Drop dead param from call to decimal2str.
11271 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11273 Revert the following patch (not approved yet):
11274 2011-02-21 Hui Zhu <teawater@gmail.com>
11275 * tracepoint.c (tp_printf): New function.
11276 (eval_agent_expr): Handle gdb_agent_op_printf.
11278 2011-02-21 Hui Zhu <teawater@gmail.com>
11280 * tracepoint.c (tp_printf): New function.
11281 (eval_agent_expr): Handle gdb_agent_op_printf.
11283 2011-02-18 Tom Tromey <tromey@redhat.com>
11285 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11286 (tracepoint.o): Likewise.
11287 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11288 (gdb_agent_op_names): Likewise.
11290 2011-02-18 Tom Tromey <tromey@redhat.com>
11292 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11293 gdb_agent_op_rot>: New constants.
11294 (gdb_agent_op_names): Add pick and roll.
11295 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11298 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11300 * aclocal.m4: Regenerated with aclocal-1.11.1.
11302 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11304 * server.c (handle_qxfer_traceframe_info): New.
11305 (qxfer_packets): Register "traceframe-info".
11306 (handle_query): Report support for qXfer:traceframe-info:read+.
11307 * tracepoint.c (match_blocktype): New.
11308 (traceframe_find_block_type): Rename to ...
11309 (traceframe_walk_blocks): ... this. Add callback filter argument,
11311 (traceframe_find_block_type): New, reimplemented on top of
11312 traceframe_walk_blocks.
11313 (build_traceframe_info_xml): New.
11314 (traceframe_read_info): New.
11315 * server.h (traceframe_read_info): Declare.
11317 2011-02-11 Yao Qi <yao@codesourcery.com>
11319 * configure.ac: Call AC_PROG_RANLIB.
11320 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11321 * configure: Regenerate.
11323 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11325 * server.c (gdb_read_memory): Change return semantics to allow
11327 (handle_search_memory_1): Adjust.
11328 (process_serial_event) <'m' packet>: Handle partial transfers.
11329 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11331 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11333 * regcache.c (init_register_cache): Initialize
11334 regcache->register_status.
11335 (free_register_cache): Release regcache->register_status.
11336 (regcache_cpy): Copy register_status.
11337 (registers_to_string): Print 'x's for unavailable registers.
11338 (supply_register): Mark the register's status valid or
11339 unavailable, depending on whether a buffer was passed in or not.
11340 (supply_register_zeroed): New.
11341 (supply_regblock): Mark the registers' status valid or
11342 unavailable, depending on whether a buffer was passed in or not.
11343 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11344 (struct regcache): New `register_status' field.
11345 (supply_register_zeroed): Declare.
11346 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11347 supply_register_zeroed, rather than passing a NULL buffer to
11349 * tracepoint.c (fetch_traceframe_registers): Update comment.
11351 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11353 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11356 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11358 * server.h (decode_xfer_write): Change prototype.
11359 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11360 and don't extract the annex here.
11361 * server.c (decode_xfer_read): Remove `annex' parameter,
11362 and don't extract the annex here.
11363 (decode_xfer): New.
11364 (struct qxfer): New.
11365 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11366 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11367 (handle_qxfer_statictrace): New functions, abstracted out from
11368 handle_query, and made to use the struct qxfer interface.
11369 (handle_threads_qxfer_proper): Rename to ...
11370 (handle_qxfer_threads_proper): ... this.
11371 (handle_threads_qxfer): Rename to ...
11372 (handle_qxfer_threads): ... this. Adjust.
11373 (qxfer_packets): New array.
11374 (handle_qxfer): New function.
11375 (handle_query): Use handle_qxfer.
11377 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11379 * gdbreplay.c: Shorten lines of >= 80 columns.
11380 * linux-low.c: Ditto.
11381 * linux-ppc-low.c: Ditto.
11382 * linux-s390-low.c: Ditto.
11383 * linux-sparc-low.c: Ditto.
11384 * linux-x86-low.c: Ditto.
11385 * linux-xtensa-low.c: Ditto.
11386 * mem-break.c: Ditto.
11387 * nto-low.c: Ditto.
11388 * regcache.h: Ditto.
11389 * remote-utils.c: Ditto.
11392 * thread-db.c: Ditto.
11393 * tracepoint.c: Ditto.
11395 * win32-low.h: Ditto.
11397 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11399 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11402 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11404 * server.c (gdbserver_version): Update copyright year in version
11406 * gdbreplay.c (gdbreplay_version): Ditto.
11408 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11410 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11411 * linux-bfin-low.c: New file.
11412 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11413 PT_DATA_ADDR for BFIN targets.
11414 * Makefile.in (SFILES): Add linux-bfin-low.c.
11415 (clean): Remove reg-bfin.c.
11416 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11417 * README: Mention supported Blackfin targets.
11419 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11421 * .gitignore: New file.
11423 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11425 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11427 2010-10-22 Jie Zhang <jie@codesourcery.com>
11429 * Makefile.in: Add FLAGS_TO_PASS variable.
11430 (install): Remove dependency of install-only and recursively
11431 invoke make for install-only.
11433 2010-10-04 Doug Evans <dje@google.com>
11435 * Makefile.in (uninstall): Use $(DESTDIR).
11437 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11441 * linux-x86-low.c (compat_siginfo_from_siginfo)
11442 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11443 si_code is < 0. Check for si_code == SI_TIMER before checking for
11446 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11448 * lynx-i386-low.c: New file.
11449 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11451 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11453 * lynx-low.c (ptrace_request_to_str): Remove handling for
11454 request values that have been removed in LynxOS 5.x.
11456 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11458 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11461 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11463 * configure.ac: Add --enable-inprocess-agent option.
11464 * configure: Rebuilt.
11466 2010-09-06 Yao Qi <yao@codesourcery.com>
11468 * linux-low.c (linux_kill): Remove unused variable.
11469 (linux_stabilize_threads): Likewise.
11470 * server.c (start_inferior): Likewise.
11471 (queue_stop_reply_callback): Likewise.
11472 * tracepoint.c (do_action_at_tracepoint): Likewise.
11474 2010-09-06 Yao Qi <yao@codesourcery.com>
11476 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11479 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11481 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11483 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11485 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11488 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11490 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11491 gdbserver/lynx-ppc-low.c: New files.
11492 * Makefile.in (lynx_low_h): New variable.
11493 (lynx-low.o, lynx-ppc-low.o): New rules.
11494 * configure.ac: On LynxOS, link with -lnetinet.
11495 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11496 * configure: regenerate.
11498 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11500 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11501 * configure.ac: Add check for vasprintf and vsnprintf.
11502 * configure, config.in: Regenerate.
11503 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11505 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11507 * gdbreplay.c: Move include of alloca.h up, next to include of
11509 * server.h: Add include of malloc.h.
11510 * mem-break.c: Remove include of malloc.h.
11511 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11513 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11515 * Makefile.in (memmem.o): Build with -Wno-error.
11517 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11519 * utils.c (xsnprintf): Make non-static.
11520 * server.h: Add xsnprintf declaration.
11521 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11522 replace calls to snprintf by calls to xsnprintf throughout.
11524 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11526 * configure.ac: Add configure check for alloca.
11527 * configure, config.in: Regenerate.
11528 * server.h: Include alloca.h if it exists.
11529 * gdbreplay.c: Include alloca.h if it exists.
11531 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11533 * linux-low.c (__SIGRTMIN): Define if not already defined.
11534 (linux_create_inferior): Check for __ANDROID__ rather than
11536 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11537 are already deferred.
11538 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11539 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11540 stopped and already has a pending signal to report.
11541 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11542 a pending signal to report or is moving out of a jump pad.
11543 (linux_init_signals): Check for __ANDROID__ rather than
11546 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11548 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11549 debug_threads check. Avoid a linear search when not doing debug
11552 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11554 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11555 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11556 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11557 (process_event): Change local fd's type to gdb_fildes_t.
11558 (create_file_handler): Adjust prototype.
11559 (delete_file_handler): Adjust prototype.
11560 (handle_file_event): Adjust prototype. Use pfildes.
11561 (create_file_event): Adjsut prototype.
11562 * remote-utils.c (remote_desc, listen_desc): Change type to
11564 * server.h: New gdb_fildes_t typedef.
11565 [USE_WIN32API]: Include winsock2.h.
11566 (delete_file_handler, add_file_handler): Adjust prototypes.
11567 (pfildes): Declare.
11568 * utils.c (pfildes): New.
11570 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11572 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11573 * configure: Regenerate.
11575 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11577 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11578 (linux_done_accessing_memory): ... this.
11579 (linux_target_ops): Adjust.
11580 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11581 * nto-low.c (nto_target_ops): Adjust comment.
11582 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11583 * spu-low.c (spu_target_ops): Adjust comment.
11584 * target.h (target_ops): Rename unprepare_to_access_memory field
11585 to done_accessing_memory.
11586 (unprepare_to_access_memory): Rename to ...
11587 (done_accessing_memory): ... this.
11589 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11591 * linux-low.c (linux_prepare_to_access_memory): New.
11592 (linux_unprepare_to_access_memory): New.
11593 (linux_target_ops): Install them.
11594 * server.c (read_memory): Rename to ...
11595 (gdb_read_memory): ... this. Use
11596 prepare_to_access_memory/prepare_to_access_memory.
11597 (write_memory): Rename to ...
11598 (gdb_write_memory): ... this. Use
11599 prepare_to_access_memory/prepare_to_access_memory.
11600 (handle_search_memory_1): Adjust.
11601 (process_serial_event): Adjust.
11602 * target.h (struct target_ops): New fields
11603 prepare_to_access_memory and unprepare_to_access_memory.
11604 (prepare_to_access_memory, unprepare_to_access_memory): New.
11605 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11606 prepare_to_access_memory/prepare_to_access_memory.
11607 * nto-low.c (nto_target_ops): Adjust.
11608 * spu-low.c (spu_target_ops): Adjust.
11609 * win32-low.c (win32_target_ops): Adjust.
11611 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11613 * Makefile.in (WARN_CFLAGS): Get it from configure.
11614 (WERROR_CFLAGS): New.
11615 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11616 * configure.ac: Introduce --enable-werror, which adds -Werror to
11617 the compiler command line. Enabled by default. Disable with
11618 --disable-werror. Add -Wdeclaration-after-statement
11619 Wpointer-arith and -Wformat-nonliteral to warning flags.
11620 * configure: Regenerate.
11622 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11624 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11626 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11628 * gdbreplay.c (remote_error): New.
11630 (expect): Use gdbchar. Check for error reading from GDB.
11631 Clarify sync error output.
11632 (play): Check for errors writing to GDB.
11633 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11634 * remote-utils.c (getpkt): Check for errors writing to the remote
11637 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11639 * linux-low.c (linux_wait_1): Move non-debugging code out of
11640 `debug_threads' control.
11642 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11644 * linux-low.c (linux_wait_1): Don't set last_status here.
11645 * server.c (push_event, queue_stop_reply_callback): Assert we're
11646 not pushing a TARGET_WAITKIND_IGNORE event.
11647 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11648 (myresume, handle_target_event): Set the thread's last_resume_kind
11649 and last_status from the target returned status.
11651 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11655 * linux-x86-low.c (update_debug_registers_callback): New.
11656 (i386_dr_low_set_addr): Use it.
11657 (i386_dr_low_get_addr): New.
11658 (i386_dr_low_set_control): Use update_debug_registers_callback.
11659 (i386_dr_low_get_control): New.
11660 (i386_dr_low_get_status): Adjust.
11661 * linux-low.c (linux_stop_lwp): New.
11662 * linux-low.h (linux_stop_lwp): Declare.
11664 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11665 argument instead of a i386_debug_reg_state.
11666 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11667 a i386_debug_reg_state.
11668 (i386_insert_aligned_watchpoint): Adjust.
11669 (i386_remove_aligned_watchpoint): Adjust.
11670 (i386_low_stopped_data_address): Read the debug registers from the
11671 inferior instead of from the mirrors.
11672 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11673 (i386_dr_low_get_addr): Declare.
11674 (i386_dr_low_get_control): Declare.
11675 (i386_dr_low_get_status): Change prototype.
11677 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11678 (i386_dr_low_get_addr): New.
11679 (i386_dr_low_get_control): New.
11680 (i386_dr_low_get_status): Adjust prototype. Return
11682 (i386_initial_stuff): Clear dr_status_mirror and
11684 (i386_get_thread_context): Adjust.
11685 (i386_set_thread_context): Adjust.
11686 (i386_thread_added): Adjust.
11688 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11690 * linux-low.h (linux_thread_area): Delete declaration.
11692 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11694 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11695 after its termination.
11697 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11699 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11700 (gdb_wants_all_stopped): Delete.
11701 (linux_wait_1): Don't call them.
11702 * server.c (handle_v_cont): Tag all threads as want-stopped.
11703 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11704 stopped as "client-wants-stopped".
11706 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11708 * Makefile.in (signals_h): New.
11709 (server_h): Depend on it.
11710 (server.o): Don't depend on $(signals_def).
11711 (signals.o): Depend on $(signals_def).
11713 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11715 * Makefile.in (signals_def): New.
11716 (server_h): Append include/gdb/signals.h and signals_def.
11717 (server.o): Append signals_def.
11719 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11721 * server.c (handle_target_event): Use target_signal_to_host for
11722 resume_info.sig initialization.
11723 * target.h (struct thread_resume) <sig>: New comment.
11725 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11727 * server.c (handle_query): strcpy() the returned string from paddress()
11728 instead of sprintf().
11729 * utils.c (paddress): Return phex_nz().
11731 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11733 * server.c (handle_v_cont): Call mourn_inferior if process
11735 (myresume): Likewise.
11737 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11739 Static tracepoints, and integration with UST.
11741 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11742 * mem-break.c (uninsert_all_breakpoints)
11743 (reinsert_all_breakpoints): New.
11744 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11745 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11746 (gdb_agent_ust_loaded, helper_thread_id)
11747 (gdb_agent_helper_thread_id): New macros.
11748 (struct ipa_sym_addresses): Add addr_ust_loaded,
11749 addr_helper_thread_id, addr_cmd_buf.
11750 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11751 (in_process_agent_loaded_ust): New.
11752 (write_e_ust_not_loaded): New.
11753 (maybe_write_ipa_ust_not_loaded): New.
11754 (struct collect_static_trace_data_action): New.
11755 (enum tracepoint_type) <static_tracepoint>: New.
11756 (struct tracepoint) <handle>: Mention static tracepoints.
11757 (struct static_tracepoint_ctx): New.
11758 (CMD_BUF_SIZE): New.
11759 (add_tracepoint_action): Handle static tracepoint actions.
11760 (unprobe_marker_at): New.
11761 (clear_installed_tracepoints): Handle static tracepoints.
11762 (cmd_qtdp): Handle static tracepoints.
11763 (probe_marker_at): New.
11764 (cmd_qtstart): Handle static tracepoints.
11765 (response_tracepoint): Handle static tracepoints.
11766 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11767 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11768 (get_context_regcache): Handle static tracepoints.
11769 (do_action_at_tracepoint): Handle static tracepoint actions.
11770 (traceframe_find_block_type): Handle static trace data blocks.
11771 (traceframe_read_sdata): New.
11772 (download_tracepoints): Download static tracepoint actions.
11773 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11774 (GDB_PROBE_NAME): New.
11776 (GET_UST_SYM): New.
11779 (ust_marker_to_static_tracepoint): New.
11781 (collect_ust_data_at_tracepoint): New.
11782 (gdb_ust_probe): New.
11783 (UNIX_PATH_MAX, SOCK_DIR): New.
11784 (gdb_ust_connect_sync_socket): New.
11785 (resume_thread, stop_thread): New.
11786 (run_inferior_command): New.
11787 (init_named_socket): New.
11788 (gdb_ust_socket_init): New.
11789 (cstr_to_hexstr): New.
11791 (first_marker, next_marker): New.
11792 (response_ust_marker): New.
11793 (cmd_qtfstm, cmd_qtsstm): New.
11794 (unprobe_marker_at, probe_marker_at): New.
11795 (cmd_qtstmat, gdb_ust_thread): New.
11796 (gdb_ust_init): New.
11797 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11798 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11799 (ST_REGENTRY): New.
11800 (x86_64_st_collect_regmap): New.
11801 (X86_64_NUM_ST_COLLECT_GREGS): New.
11802 (AMD64_RIP_REGNUM): New.
11803 (supply_static_tracepoint_registers): New.
11804 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11805 (ST_REGENTRY): New.
11806 (i386_st_collect_regmap): New.
11807 (i386_NUM_ST_COLLECT_GREGS): New.
11808 (supply_static_tracepoint_registers): New.
11809 * server.c (handle_query): Handle qXfer:statictrace:read.
11810 <qSupported>: Report support for StaticTracepoints, and
11811 qXfer:statictrace:read features.
11812 * server.h (traceframe_read_sdata)
11813 (supply_static_tracepoint_registers): Declare.
11814 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11815 (unpack_varlen_hex): Include in IPA build.
11816 * Makefile.in (ustlibs, ustinc): New.
11817 (IPA_OBJS): Add remote-utils-ipa.o.
11818 ($(IPA_LIB)): Link -ldl and -lpthread.
11820 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11821 * config.in, configure: Regenerate.
11823 2010-06-20 Ian Lance Taylor <iant@google.com>
11824 Pedro Alves <pedro@codesourcery.com>
11826 * linux-x86-low.c (always_true): Delete.
11827 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11828 trying to fool the compiler with always_true.
11830 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11832 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11833 conditions in gdbserver.
11835 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11837 * spu-low.c (spu_read_memory): Wrap around local store limit.
11838 (spu_write_memory): Likewise.
11840 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11842 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11843 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11845 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11847 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11848 uses with LONGEST uses.
11850 2010-06-14 Stan Shebs <stan@codesourcery.com>
11851 Pedro Alves <pedro@codesourcery.com>
11855 * linux-x86-low.c: Include limits.h.
11857 (always_true): New.
11860 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11861 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11862 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11863 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11864 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11865 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11866 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11867 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11868 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11869 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11870 (amd64_emit_void_call_2): New.
11871 (amd64_emit_ops): New.
11872 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11873 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11874 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11875 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11876 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11877 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11878 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11879 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11880 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11881 (i386_emit_stack_adjust, i386_emit_int_call_1)
11882 (i386_emit_void_call_2): New.
11883 (i386_emit_ops): New.
11884 (x86_emit_ops): New.
11885 (the_low_target): Install x86_emit_ops.
11886 * server.h (struct emit_ops): New.
11887 (get_raw_reg_func_addr): Declare.
11888 (current_insn_ptr, emit_error): Declare.
11889 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11890 (set_trace_state_variable_value): New defines.
11891 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11892 addr_get_trace_state_variable_value and
11893 addr_set_trace_state_variable_value.
11894 (symbol_list): New fields for get_raw_reg,
11895 get_trace_state_variable_value and set_trace_state_variable_value.
11896 (condfn): New typedef.
11897 (struct tracepoint): New field `compiled_cond'.
11898 (do_action_at_tracepoint): Clear compiled_cond.
11899 (get_trace_state_variable_value, set_trace_state_variable_value):
11901 (condition_true_at_tracepoint): If there's a compiled condition,
11903 (current_insn_ptr, emit_error): New globals.
11904 (struct bytecode_address): New.
11905 (get_raw_reg_func_addr): New.
11906 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11907 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11908 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11909 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11910 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11911 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11912 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11913 (compile_tracepoint_condition, compile_bytecodes): New.
11914 * target.h (emit_ops): Forward declare.
11915 (struct target_ops): New field emit_ops.
11916 (target_emit_ops): New.
11917 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11918 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11919 * linux-low.c (linux_emit_ops): New.
11920 (linux_target_ops): Install it.
11921 * linux-low.h (struct linux_target_ops): New field emit_ops.
11923 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11925 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11926 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11928 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11929 Stan Shebs <stan@codesourcery.com>
11931 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11932 (all): Depend on $(extra_libraries).
11933 (install-only): Install the IPA.
11934 (IPA_OBJS, IPA_LIB): New.
11935 (clean): Remove the IPA lib.
11936 (IPAGENT_CFLAGS): New.
11937 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11938 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11939 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11940 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11941 * configure.ac: Check for atomic builtins support in the compiler.
11942 (IPA_DEPFILES, extra_libraries): Define.
11943 * configure.srv (ipa_obj): Add description.
11944 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11945 (i[34567]86-*-linux*): Set ipa_obj.
11946 (x86_64-*-linux*): Set ipa_obj.
11947 * linux-low.c (stabilizing_threads): New.
11948 (supports_fast_tracepoints): New.
11949 (linux_detach): Stabilize threads before detaching.
11950 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11951 the lwp is either not stabilizing, or is moving out of a jump pad.
11952 (linux_fast_tracepoint_collecting): New.
11953 (maybe_move_out_of_jump_pad): New.
11954 (enqueue_one_deferred_signal): New.
11955 (dequeue_one_deferred_signal): New.
11956 (linux_wait_for_event_1): If moving out of a jump pad, defer
11957 pending signals to later.
11958 (linux_stabilize_threads): New.
11959 (linux_wait_1): Check if threads need moving out of jump pads, and
11961 (stuck_in_jump_pad_callback): New.
11962 (move_out_of_jump_pad_callback): New.
11963 (lwp_running): New.
11964 (linux_resume_one_lwp): Handle moving out of jump pads.
11965 (linux_set_resume_request): Dequeue deferred signals.
11966 (need_step_over_p): Also step over fast tracepoint jumps.
11967 (start_step_over): Also uninsert fast tracepoint jumps.
11968 (finish_step_over): Also reinsert fast tracepoint jumps.
11969 (linux_install_fast_tracepoint_jump): New.
11970 (linux_target_ops): Install linux_stabilize_threads and
11971 linux_install_fast_tracepoint_jump_pad.
11972 * linux-low.h (linux_target_ops) <get_thread_area,
11973 install_fast_tracepoint_jump_pad>: New fields.
11974 (struct lwp_info) <collecting_fast_tracepoint,
11975 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11976 (linux_get_thread_area): Declare.
11977 * linux-x86-low.c (jump_insn): New.
11978 (x86_get_thread_area): New.
11979 (append_insns): New.
11980 (push_opcode): New.
11981 (amd64_install_fast_tracepoint_jump_pad): New.
11982 (i386_install_fast_tracepoint_jump_pad): New.
11983 (x86_install_fast_tracepoint_jump_pad): New.
11984 (the_low_target): Install x86_get_thread_area and
11985 x86_install_fast_tracepoint_jump_pad.
11986 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11987 (struct fast_tracepoint_jump): New.
11988 (fast_tracepoint_jump_insn): New.
11989 (fast_tracepoint_jump_shadow): New.
11990 (find_fast_tracepoint_jump_at): New.
11991 (fast_tracepoint_jump_here): New.
11992 (delete_fast_tracepoint_jump): New.
11993 (set_fast_tracepoint_jump): New.
11994 (uninsert_fast_tracepoint_jumps_at): New.
11995 (reinsert_fast_tracepoint_jumps_at): New.
11996 (set_breakpoint_at): Use write_inferior_memory.
11997 (uninsert_raw_breakpoint): Use write_inferior_memory.
11998 (check_mem_read): Mask out fast tracepoint jumps.
11999 (check_mem_write): Mask out fast tracepoint jumps.
12000 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12001 (set_fast_tracepoint_jump): Declare.
12002 (delete_fast_tracepoint_jump)
12003 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12004 (reinsert_fast_tracepoint_jumps_at): Declare.
12005 * regcache.c: Don't compile many functions when building the
12006 in-process agent library.
12007 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12008 the register buffer in the heap.
12009 (free_register_cache): If the register buffer isn't owned by the
12010 regcache, don't free it.
12011 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12012 pre-existing register caches.
12013 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12015 (convert_ascii_to_int): : Constify `from' parameter type.
12016 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12017 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12018 the needed buffer in-place.
12019 (relocate_instruction): New.
12020 * server.c (handle_query) <qSymbols>: If the target supports
12021 tracepoints, give it a chance of looking up symbols. Report
12022 support for fast tracepoints.
12023 (handle_status): Stabilize threads.
12024 (process_serial_event): Adjust.
12025 * server.h (struct fast_tracepoint_jump): Forward declare.
12026 (struct process_info) <fast_tracepoint_jumps>: New field.
12027 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12028 (decode_X_packet, decode_M_packet): Adjust.
12029 (relocate_instruction): Declare.
12030 (in_process_agent_loaded): Declare.
12031 (tracepoint_look_up_symbols): Declare.
12032 (struct fast_tpoint_collect_status): Declare.
12033 (fast_tracepoint_collecting): Declare.
12034 (force_unlock_trace_buffer): Declare.
12035 (handle_tracepoint_bkpts): Declare.
12036 (initialize_low_tracepoint)
12037 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12038 * target.h (struct target_ops) <stabilize_threads,
12039 install_fast_tracepoint_jump_pad>: New fields.
12040 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12041 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12042 [HAVE_STDINT_H]: Include stdint.h.
12043 (trace_debug_1): Rename to ...
12044 (trace_vdebug): ... this.
12045 (trace_debug): Rename to ...
12046 (trace_debug_1): ... this. Add `level' parameter.
12047 (trace_debug): New.
12048 (ATTR_USED, ATTR_NOINLINE): New.
12049 (IP_AGENT_EXPORT): New.
12050 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12051 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12052 (about_to_request_buffer_space, trace_buffer_is_full)
12053 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12054 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12055 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12056 (traceframe_write_count, traceframes_created)
12057 (trace_state_variables)
12058 New renaming defines.
12059 (struct ipa_sym_addresses): New.
12060 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12061 (symbol_list): New.
12062 (ipa_sym_addrs): New.
12063 (all_tracepoint_symbols_looked_up): New.
12064 (in_process_agent_loaded): New.
12065 (write_e_ipa_not_loaded): New.
12066 (maybe_write_ipa_not_loaded): New.
12067 (tracepoint_look_up_symbols): New.
12068 (debug_threads) [IN_PROCESS_AGENT]: New.
12069 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12070 (UNKNOWN_SIDE_EFFECTS): New.
12071 (stop_tracing): New.
12072 (flush_trace_buffer): New.
12073 (stop_tracing_bkpt): New.
12074 (flush_trace_buffer_bkpt): New.
12075 (read_inferior_integer): New.
12076 (read_inferior_uinteger): New.
12077 (read_inferior_data_pointer): New.
12078 (write_inferior_data_pointer): New.
12079 (write_inferior_integer): New.
12080 (write_inferior_uinteger): New.
12081 (struct collect_static_trace_data_action): Delete.
12082 (enum tracepoint_type): New.
12083 (struct tracepoint) <type>: New field `type'.
12084 <actions_str, step_actions, step_actions_str>: Only include in
12086 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12087 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12088 (tracepoints): Use IP_AGENT_EXPORT.
12089 (last_tracepoint): Don't include in the IPA.
12090 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12091 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12092 (alloced_trace_state_variables): New.
12093 (trace_state_variables): Use IP_AGENT_EXPORT.
12094 (traceframe_t): Delete unused variable.
12095 (circular_trace_buffer): Don't include in the IPA.
12096 (trace_buffer_start): Delete.
12097 (struct trace_buffer_control): New.
12098 (trace_buffer_free): Delete.
12099 (struct ipa_trace_buffer_control): New.
12100 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12101 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12103 (trace_buffer_ctrl): New.
12104 (TRACE_BUFFER_CTRL_CURR): New.
12105 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12106 Reimplement as macros.
12107 (trace_buffer_wrap): Delete.
12108 (traceframe_write_count, traceframe_read_count)
12109 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12110 (struct tracepoint_hit_ctx) <type>: New field.
12111 (struct fast_tracepoint_ctx): New.
12112 (memory_barrier): New.
12114 (record_tracepoint_error): Update atomically in the IPA.
12115 (clear_inferior_trace_buffer): New.
12116 (about_to_request_buffer_space): New.
12117 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12118 updating the same buffer.
12119 (add_tracepoint): Default the tracepoint's type to trap
12120 tracepoint, and orig_size to -1.
12121 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12122 internal variables.
12123 (create_trace_state_variable): New parameter `gdb'. Handle it.
12124 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12125 (cmd_qtdp): Handle fast tracepoints.
12126 (cmd_qtdv): Adjust.
12127 (max_jump_pad_size): New.
12128 (gdb_jump_pad_head): New.
12129 (get_jump_space_head): New.
12130 (claim_jump_space): New.
12131 (sort_tracepoints): New.
12132 (MAX_JUMP_SIZE): New.
12133 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12135 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12136 support. Upload fast traceframes, and delete internal IPA
12138 (stop_tracing_handler): New.
12139 (flush_trace_buffer_handler): New.
12140 (cmd_qtstop): Upload fast tracepoints.
12141 (response_tracepoint): Handle fast tracepoints.
12142 (tracepoint_finished_step): Upload fast traceframes. Set the
12143 tracepoint hit context's tracepoint type.
12144 (handle_tracepoint_bkpts): New.
12145 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12146 type. Add comment about fast tracepoints.
12147 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12148 non-existing action_str field.
12149 (get_context_regcache): Handle fast tracepoints.
12150 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12152 (fast_tracepoint_from_jump_pad_address): New.
12153 (fast_tracepoint_from_ipa_tpoint_address): New.
12154 (collecting_t): New.
12155 (force_unlock_trace_buffer): New.
12156 (fast_tracepoint_collecting): New.
12158 (gdb_collect): New.
12159 (write_inferior_data_ptr): New.
12160 (target_tp_heap): New.
12161 (target_malloc): New.
12162 (download_agent_expr): New.
12164 (download_tracepoints): New.
12165 (download_trace_state_variables): New.
12166 (upload_fast_traceframes): New.
12167 (IPA_FIRST_TRACEFRAME): New.
12168 (IPA_NEXT_TRACEFRAME_1): New.
12169 (IPA_NEXT_TRACEFRAME): New.
12170 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12171 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12172 (gdb_jump_pad_buffer_end): New.
12173 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12174 (initialize_tracepoint): Adjust.
12175 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12176 buffer. Initialize the low module.
12177 * utils.c (PREFIX, TOOLNAME): New.
12178 (malloc_failure): Use PREFIX.
12179 (error): In the IPA, an error causes an exit.
12180 (fatal, warning): Use PREFIX.
12181 (internal_error): Use TOOLNAME.
12182 (NUMCELLS): Increase to 10.
12183 * configure, config.in: Regenerate.
12185 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12187 * server.c (handle_query) <qSupported>: Do two passes over the
12188 qSupported string to avoid nesting strtok.
12190 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12192 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12194 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12195 -Wl,--dynamic-list.
12196 * configure: Regenerate.
12197 * proc-service.list: New.
12199 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12201 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12204 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12206 * gdbreplay.c (remote_open): Check error return from socket() call by
12207 its equality to -1 not by it being negative.
12208 * remote-utils.c (remote_open): Likewise.
12210 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12212 * config.h: Regenerate.
12214 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12216 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12217 doesn't provide PTRACE_GET_THREAD_AREA.
12219 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12221 * linux-m68k-low.c: Include <asm/ptrace.h>
12222 (ps_get_thread_area): Implement.
12224 2010-05-03 Doug Evans <dje@google.com>
12226 * event-loop.c (struct callback_event): New struct.
12227 (callback_list): New global.
12228 (append_callback_event, delete_callback_event): New functions.
12229 (process_callback): New function.
12230 (start_event_loop): Call it.
12231 * remote-utils.c (NOT_SCHEDULED): Define.
12232 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12233 moved out of readchar.
12234 (readchar): Rewrite. Call reschedule before returning.
12235 (reset_readchar): New function.
12236 (remote_close): Call it.
12237 (process_remaining, reschedule): New functions.
12238 * server.h (callback_handler_func): New typedef.
12239 (append_callback_event, delete_callback_event): Declare.
12241 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12243 * proc-service.c (ps_pglobal_lookup): Use
12244 thread_db_look_up_one_symbol.
12245 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12246 parameter. Use it instead of all_symbols_looked_up.
12247 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12249 (all_symbols_looked_up): Don't declare.
12250 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12251 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12253 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12254 Set all_symbols_looked_up here.
12255 (thread_db_look_up_one_symbol): New.
12256 (thread_db_get_tls_address): Adjust.
12257 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12258 thread_db object on the heap, and tentatively set it in the
12260 (thread_db_init): Don't set all_symbols_looked_up here.
12261 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12263 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12265 * linux-low.c (linux_kill, linux_detach): Adjust.
12266 (status_pending_p_callback): Remove redundant statement. Check
12267 for !TARGET_WAITIKIND_IGNORE, instead of
12268 TARGET_WAITKIND_STOPPED.
12269 (handle_tracepoints): Make sure LWP is locked. Adjust.
12270 (linux_wait_for_event_1): Adjust.
12271 (linux_cancel_breakpoints): New.
12272 (unsuspend_one_lwp): New.
12273 (unsuspend_all_lwps): New.
12274 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12275 (send_sigstop_callback): Change return type to int, add new
12276 `except' parameter and handle it.
12277 (suspend_and_send_sigstop_callback): New.
12278 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12279 pass them down. If SUSPEND, also increment the lwp's suspend
12281 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12282 (need_step_over_p): Don't consider suspended LWPs.
12283 (start_step_over): Adjust.
12284 (proceed_one_lwp): Change return type to int, add new `except'
12285 parameter and handle it.
12286 (unsuspend_and_proceed_one_lwp): New.
12287 (proceed_all_lwps): Use find_inferior instead of
12289 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12290 also decrement the suspend count of LWPs. Pass `except' down,
12291 instead of hacking its suspend count.
12292 (linux_pause_all): Add `freeze' parameter. Adjust.
12293 (linux_unpause_all): New.
12294 (linux_target_ops): Install linux_unpause_all.
12295 * server.c (handle_status): Adjust.
12296 * target.h (struct target_ops): New fields `unpause_all' and
12297 `cancel_breakpoints'. Add new parameter to `pause_all'.
12298 (pause_all): Add new `freeze' parameter.
12299 (unpause_all): New.
12300 (cancel_breakpoints): New.
12301 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12302 cancel breakpoints.
12303 (cmd_qtstart): Pause threads.
12304 (stop_tracing): Pause threads, and cancel breakpoints.
12305 * win32-low.c (win32_target_ops): Adjust.
12307 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12309 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12310 the inferior right away from here...
12311 (linux_wait_1): ... to here, and adjust to check the thread's
12312 last_resume_kind instead of the lwp's step or stop_expected flags.
12314 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12316 * README: Use consistent `GDB' and `GDBserver' spellings.
12318 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12320 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12321 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12322 (linux_detach_one_lwp): Assume the lwp is stopped.
12323 (any_thread_of): Delete.
12324 (linux_detach): Stop all lwps here. Don't blindly delete all
12326 (delete_lwp_callback): New.
12327 (linux_mourn): Delete all lwps of the process that is gone.
12328 (linux_wait_1): Don't delete the last lwp of the process here.
12329 * mem-break.h (mark_breakpoints_out): Declare.
12330 * mem-break.c (mark_breakpoints_out): New.
12331 (free_all_breakpoints): Use it.
12332 * server.c (handle_target_event): If the process is gone, mark
12334 * thread-db.c (struct thread_db) <create_bp>: New field.
12335 (thread_db_enable_reporting): Fix prototype. Store a thread event
12336 breakpoint reference in the thread_db struct.
12337 (thread_db_load_search): Clear the thread_db object.
12338 (try_thread_db_load_1): Ditto.
12339 (switch_to_process): New.
12340 (disable_thread_event_reporting): Use it.
12341 (remove_thread_event_breakpoints): New.
12342 (thread_db_detach, thread_db_mourn): Use it.
12344 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12346 * linux-low.c (linux_enable_event_reporting): New.
12347 (linux_wait_for_event_1, handle_extended_wait): Use it.
12349 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12351 * linux-low.c (linux_kill_one_lwp, linux_kill)
12352 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12353 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12354 SIGSTOP even if the LWP is stopped.
12355 (send_sigstop_callback): New.
12356 (stop_all_lwps): Use send_sigstop_callback instead.
12357 (linux_resume_one_thread): Adjust.
12358 (proceed_one_lwp): Still proceed an LWP that the client has
12359 requested to stop, if we haven't reported it as stopped yet. Make
12360 sure that LWPs the client want stopped, have a pending SIGSTOP.
12362 2010-04-26 Doug Evans <dje@google.com>
12364 * server.c (handle_general_set): Make static.
12366 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12367 Print received char after testing for error/eof instead of before.
12368 (input_interrupt): Tweak comment.
12370 2010-04-23 Doug Evans <dje@google.com>
12372 * server.c (start_inferior): Print inferior argv if --debug.
12374 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12376 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12377 * nto-x86-low.c: Include server.h
12379 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12381 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12382 be consistent with other sources of this directory.
12383 (init_registers_amd64): Correct name of source file of this function
12386 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12388 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12389 64-bit executables.
12391 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12393 * win32-i386-low.c: Add 64-bit support.
12394 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12395 (init_registers_amd64): Declare.
12396 (mappings): Add 64-bit version of array.
12397 (init_windows_x86): New function.
12398 (the_low_target): Change init_arch field to init_windows_x86.
12400 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12402 * win32-low.c: Adapt to support also 64-bit architecture.
12403 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12404 (get_image_name): Use SIZE_T type for local variable `done'.
12405 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12406 (toolhelp_get_dll_name): Idem.
12407 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12408 Use uintptr_t typecast to avoid warning.
12409 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12410 (handle_exception): Use phex_nz to avoid warning.
12411 (win32_wait): Remove unused local variable `process'.
12413 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12415 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12418 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12420 * configure.ac: Use `ws2_32' library for srv_mingw.
12421 * configure: Regenerate.
12422 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12423 * remote-utils.c: Likewise.
12425 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12427 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12428 if __x86_64__ is defined.
12430 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12432 * configure: Regenerate.
12434 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12436 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12437 * target.h (target_ops): New get_tib_address field.
12438 * win32-low.h (win32_thread_info): Add thread_local_base field.
12439 * win32-low.c (child_add_thread): Add tlb argument.
12440 Set thread_local_base field to TLB.
12441 (get_child_debug_event): Adapt to child_add_thread change.
12442 (win32_get_tib_address): New function.
12443 (win32_target_ops): Set get_tib_address field to
12444 win32_get_tib_address.
12445 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12447 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12449 * linux-low.c (linux_mourn): Also remove the process.
12450 * server.c (handle_target_event): Don't remove the process here.
12451 * nto-low.c (nto_mourn): New.
12452 (nto_target_ops): Install it.
12453 * spu-low.c (spu_mourn): New.
12454 (spu_target_ops): Install it.
12455 * win32-low.c (win32_mourn): New.
12456 (win32_target_ops): Install it.
12458 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12460 * server.h (buffer_xml_printf): Remove redundant `;'.
12462 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12464 * regcache.c (set_register_cache): Invalidate regcaches before
12465 changing the register cache layout.
12466 (regcache_invalidate_one): Allow a NULL regcache.
12467 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12468 regcaches before changing the register cache layout or the target
12471 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12473 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12474 variable warning on Linux/x86-64.
12476 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12478 GDBserver disconnected tracing support.
12480 * linux-low.c (linux_remove_process): Delete.
12481 (add_lwp): Don't set last_resume_kind here.
12482 (linux_kill): Use `mourn'.
12483 (linux_detach): Use `thread_db_detach', and `mourn'.
12484 (linux_mourn): New.
12485 (linux_attach_lwp_1): Adjust comment.
12486 (linux_attach): last_resume_kind moved the thread_info; adjust.
12487 (status_pending_p_callback): Adjust.
12488 (linux_wait_for_event_1): Adjust.
12489 (count_events_callback, select_singlestep_lwp_callback)
12490 (select_event_lwp_callback, cancel_breakpoints_callback)
12491 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12492 (proceed_one_lwp): Adjust.
12493 (linux_async): Add debug output.
12494 (linux_thread_stopped): New.
12495 (linux_pause_all): New.
12496 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12498 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12499 (thread_db_free): Delete declaration.
12500 (thread_db_detach, thread_db_mourn): Declare.
12501 * thread-db.c (thread_db_init): Use thread_db_mourn.
12502 (thread_db_free): Delete, split in two.
12503 (disable_thread_event_reporting): New.
12504 (thread_db_detach): New.
12505 (thread_db_mourn): New.
12507 * server.h (struct thread_info) <last_resume_kind>: New field.
12508 <attached>: Add comment.
12509 <gdb_detached>: New field.
12510 (handler_func): Change return type to int.
12511 (handle_serial_event, handle_target_event): Ditto.
12512 (gdb_connected): Declare.
12514 (disconnected_tracing): Declare.
12515 (stop_tracing): Declare.
12517 * server.c (handle_query) <qSupported>: Report support for
12518 disconnected tracing.
12519 (queue_stop_reply_callback): Account for running threads.
12520 (gdb_wants_thread_stopped): New.
12521 (gdb_wants_all_threads_stopped): New.
12522 (gdb_reattached_process): New.
12523 (handle_status): Clear the `gdb_detached' flag of all processes.
12524 In all-stop, stop all threads.
12525 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12526 (process_serial_event): If the remote connection breaks, or if an
12527 exit was forced with "monitor exit", force an event loop exit.
12528 Handle disconnected tracing on detach.
12529 (handle_serial_event): Adjust.
12530 (handle_target_event): If GDB isn't connected, forward events back
12531 to the inferior, unless the last process exited, in which case,
12532 exit gdbserver. Adjust interface.
12534 * remote-utils.c (remote_open): Don't block in accept. Instead
12535 register an event loop source on the listen socket file
12536 descriptor. Refactor bits into ...
12537 (listen_desc): ... this new global.
12538 (gdb_connected): ... this new function.
12539 (enable_async_notification): ... this new function.
12540 (handle_accept_event): ... this new function.
12541 (remote_close): Clear remote_desc.
12543 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12545 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12547 (mourn_inferior): Define.
12548 (target_process_qsupported): Avoid the dangling else problem.
12549 (thread_stopped): Define.
12550 (pause_all): Define.
12551 (target_waitstatus_to_string): Declare.
12552 * target.c (target_waitstatus_to_string): New.
12554 * tracepoint.c (tracing): Make extern.
12555 (disconnected_tracing): New.
12556 (stop_tracing): Make extern. Handle tracing stops due to GDB
12558 (cmd_qtdisconnected): New.
12559 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12560 (handle_tracepoint_general_set): Handle QTDisconnected.
12562 * event-loop.c (event_handler_func): Change return type to int.
12563 (process_event): Bail out if the event handler wants the event
12565 (handle_file_event): Ditto.
12566 (start_event_loop): Bail out if the event handler wants the event
12569 * nto-low.c (nto_target_ops): Adjust.
12570 * spu-low.c (spu_wait): Don't remove the process here.
12571 (spu_target_ops): Adjust.
12572 * win32-low.c (win32_wait): Don't remove the process here.
12573 (win32_target_ops): Adjust.
12575 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12577 * regcache.c (realloc_register_cache): Invalidate inferior's
12578 regcache before recreating it.
12580 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12582 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12584 2010-04-09 Stan Shebs <stan@codesourcery.com>
12585 Pedro Alves <pedro@codesourcery.com>
12587 * server.h (LONGEST): New.
12588 (struct thread_info) <while_stepping>: New field.
12589 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12591 (initialize_tracepoint, handle_tracepoint_general_set)
12592 (handle_tracepoint_query, tracepoint_finished_step)
12593 (tracepoint_was_hit, release_while_stepping_state_list):
12594 (current_traceframe): Declare.
12595 * server.c (handle_general_set): Handle tracepoint packets.
12596 (read_memory): New.
12597 (write_memory): New.
12598 (handle_search_memory_1): Use read_memory.
12599 (handle_query): Report support for conditional tracepoints, trace
12600 state variables, and tracepoint sources. Handle tracepoint
12602 (main): Initialize the tracepoints module.
12603 (process_serial_event): Handle traceframe reads/writes.
12605 * linux-low.c (handle_tracepoints): New.
12606 (linux_wait_1): Call it.
12607 (linux_resume_one_lwp): Handle while-stepping.
12608 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12609 (linux_target_ops): Install them.
12610 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12612 * linux-x86-low.c (x86_supports_tracepoints): New.
12613 (the_low_target). Install it.
12615 * mem-break.h (delete_breakpoint): Declare.
12616 * mem-break.c (delete_breakpoint): Make external.
12618 * target.h (struct target_ops): Add `supports_tracepoints',
12619 `read_pc', and `write_pc' fields.
12620 (target_supports_tracepoints): Define.
12621 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12624 * regcache.h (struct regcache) <registers_owned>: New field.
12625 (init_register_cache, regcache_cpy): Declare.
12626 (regcache_read_pc, regcache_write_pc): Declare.
12627 (register_cache_size): Declare.
12628 (supply_regblock): Declare.
12629 * regcache.c (init_register_cache): New.
12630 (new_register_cache): Use it.
12631 (regcache_cpy): New.
12632 (register_cache_size): New.
12633 (supply_regblock): New.
12634 (regcache_read_pc, regcache_write_pc): New.
12636 * tracepoint.c: New.
12638 * Makefile.in (OBS): Add tracepoint.o.
12639 (tracepoint.o): New rule.
12641 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12643 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12645 (i386-mmx.c): Likewise.
12646 (i386-mmx-linux.o): Likewise.
12647 (i386-mmx-linux.c): Likewise.
12649 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12650 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12651 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12652 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12654 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12655 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12656 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12658 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12660 * Makefile.in (clean): Updated.
12662 (i386-avx.c): Likewise.
12663 (i386-avx-linux.o): Likewise.
12664 (i386-avx-linux.c): Likewise.
12665 (amd64-avx.o): Likewise.
12666 (amd64-avx.c): Likewise.
12667 (amd64-avx-linux.o): Likewise.
12668 (amd64-avx-linux.c): Likewise.
12670 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12671 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12672 (srv_amd64_regobj): Add amd64-avx.o.
12673 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12674 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12675 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12676 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12677 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12678 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12679 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12681 * i387-fp.c: Include "i386-xstate.h".
12683 (i387_cache_to_xsave): Likewise.
12684 (i387_xsave_to_cache): Likewise.
12685 (x86_xcr0): Likewise.
12687 * i387-fp.h (i387_cache_to_xsave): Likewise.
12688 (i387_xsave_to_cache): Likewise.
12689 (x86_xcr0): Likewise.
12691 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12692 * linux-crisv32-low.c (target_regsets): Likewise.
12693 * linux-m68k-low.c (target_regsets): Likewise.
12694 * linux-mips-low.c (target_regsets): Likewise.
12695 * linux-ppc-low.c (target_regsets): Likewise.
12696 * linux-s390-low.c (target_regsets): Likewise.
12697 * linux-sh-low.c (target_regsets): Likewise.
12698 * linux-sparc-low.c (target_regsets): Likewise.
12699 * linux-xtensa-low.c (target_regsets): Likewise.
12701 * linux-low.c: Include <sys/uio.h>.
12702 (regsets_fetch_inferior_registers): Support nt_type.
12703 (regsets_store_inferior_registers): Likewise.
12704 (linux_process_qsupported): New.
12705 (linux_target_ops): Add linux_process_qsupported.
12707 * linux-low.h (regset_info): Add nt_type.
12708 (linux_target_ops): Add process_qsupported.
12710 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12712 (init_registers_i386_avx_linux): New.
12713 (init_registers_amd64_avx_linux): Likewise.
12714 (xmltarget_i386_linux_no_xml): Likewise.
12715 (xmltarget_amd64_linux_no_xml): Likewise.
12716 (PTRACE_GETREGSET): Likewise.
12717 (PTRACE_SETREGSET): Likewise.
12718 (x86_fill_xstateregset): Likewise.
12719 (x86_store_xstateregset): Likewise.
12720 (use_xml): Likewise.
12721 (x86_linux_update_xmltarget): Likewise.
12722 (x86_linux_process_qsupported): Likewise.
12723 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12724 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12725 init_registers_i386_linux here. Call
12726 x86_linux_update_xmltarget.
12727 (the_low_target): Add x86_linux_process_qsupported.
12729 * server.c (handle_query): Call target_process_qsupported.
12731 * target.h (target_ops): Add process_qsupported.
12732 (target_process_qsupported): New.
12734 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12736 * inferiors.c (add_thread): Set last_status kind to
12737 TARGET_WAITKIND_IGNORE.
12738 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12739 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12740 (linux_wait_1): Move `thread' local definition to block that uses
12741 it. Don't NULL initialize `event_child'.
12742 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12743 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12744 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12746 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12748 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12749 an extended waitstatus, or by a watchpoint.
12750 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12751 thread was stepping or has been stopped by a watchpoint.
12753 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12755 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12756 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12757 of another, then delete the previous, and validate all
12759 (validate_inserted_breakpoint): New.
12760 (delete_disabled_breakpoints): New.
12761 (validate_breakpoints): New.
12762 (check_mem_read): Validate breakpoints before trusting their
12763 shadow. Delete disabled breakpoints.
12764 (check_mem_write): Validate breakpoints before trusting they
12765 should be inserted. Delete disabled breakpoints.
12766 * mem-break.h (validate_breakpoints):
12767 * server.c (handle_query): Validate breakpoints when we see a
12770 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12772 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12773 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12774 if we could tell there's a GDB breakpoint at stop_pc.
12775 (need_step_over_p): Don't do a step over if we find a GDB
12776 breakpoint at the resume PC.
12778 * mem-break.c (struct raw_breakpoint): New.
12779 (enum bkpt_type): New type `gdb_breakpoint'.
12780 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12781 fields. New field `raw'.
12782 (find_raw_breakpoint_at): New.
12783 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12784 breakpoint instead.
12785 (set_breakpoint_at): Adjust.
12786 (delete_raw_breakpoint): New.
12787 (release_breakpoint): New.
12788 (delete_breakpoint): Rename to...
12789 (delete_breakpoint_1): ... this. Add proc parameter. Use
12790 release_breakpoint. Return ENOENT.
12791 (delete_breakpoint): Reimplement.
12792 (find_breakpoint_at): Delete.
12793 (find_gdb_breakpoint_at): New.
12794 (delete_breakpoint_at): Delete.
12795 (set_gdb_breakpoint_at): New.
12796 (delete_gdb_breakpoint_at): New.
12797 (gdb_breakpoint_here): New.
12798 (set_reinsert_breakpoint): Use release_breakpoint.
12799 (uninsert_breakpoint): Rename to ...
12800 (uninsert_raw_breakpoint): ... this.
12801 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12802 (reinsert_raw_breakpoint): Change parameter type to
12804 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12806 (check_breakpoints): Adjust. Use release_breakpoint.
12807 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12808 (breakpoint_inserted_here): Ditto.
12809 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12810 Don't trust the breakpoint's shadow if it is not inserted.
12811 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12812 (delete_all_breakpoints): Adjust.
12813 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12814 use delete_breakpoint_1.
12816 * mem-break.h (breakpoints_supported): Delete declaration.
12817 (set_gdb_breakpoint_at): Declare.
12818 (gdb_breakpoint_here): Declare.
12819 (delete_breakpoint_at): Delete.
12820 (delete_gdb_breakpoint_at): Declare.
12822 * server.h (struct raw_breakpoint): Forward declare.
12823 (struct process_info): New field `raw_breakpoints'.
12825 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12828 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12830 * linux-low.c (status_pending_p_callback): Fix comment.
12831 (linux_wait_for_event_1): Move most of the internal breakpoint
12832 handling from here...
12833 (linux_wait_1): ... to here.
12834 (count_events_callback): New.
12835 (select_singlestep_lwp_callback): New.
12836 (select_event_lwp_callback): New.
12837 (cancel_breakpoints_callback): New.
12838 (select_event_lwp): New.
12839 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12840 priority to all LWPs that have had events that should be reported
12841 to the client. Cancel breakpoints when about to reporting the
12842 event to the client, not while stopping lwps. No longer cancel
12843 finished single-steps here.
12844 (cancel_finished_single_step): Delete.
12845 (cancel_finished_single_steps): Delete.
12847 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12849 * mem-break.c (enum bkpt_type): New.
12850 (struct breakpoint): New field `type'.
12851 (set_breakpoint_at): Change return type to struct breakpoint
12852 pointer. Set type to `other_breakpoint' by default.
12853 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12854 in the breakpoint list.
12855 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12856 (reinsert_breakpoint): Rename to ...
12857 (reinsert_raw_breakpoint): ... this.
12858 (reinsert_breakpoints_at): Adjust.
12859 * mem-break.h (struct breakpoint): Declare.
12860 (set_breakpoint_at): Change return type to struct breakpoint
12863 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12865 * server.c (handle_query): Assign, not compare.
12867 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12869 Teach linux gdbserver to step-over-breakpoints.
12871 * linux-low.c (can_hardware_single_step): New.
12872 (supports_breakpoints): New.
12873 (handle_extended_wait): If stopping threads, read the stop pc of
12874 the new cloned LWP.
12876 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12877 low target doesn't support retrieving the PC.
12878 (add_lwp): Set last_resume_kind to resume_continue.
12879 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12880 (linux_attach): Don't clear stop_expected. Set the lwp's
12881 last_resume_kind to resume_stop.
12882 (linux_detach_one_lwp): Don't check for removed breakpoints.
12883 (check_removed_breakpoint): Delete.
12884 (status_pending_p): Rename to ...
12885 (status_pending_p_callback): ... this. Don't check for removed
12886 breakpoints. Don't consider threads that are stopped from GDB's
12888 (linux_wait_for_lwp): Always read the stop_pc here.
12889 (cancel_breakpoint): New.
12890 (step_over_bkpt): New global.
12891 (linux_wait_for_event_1): Implement stepping over breakpoints.
12892 (gdb_wants_lwp_stopped): New.
12893 (gdb_wants_all_stopped): New.
12894 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12895 single-step traps here. Store the thread's last reported target
12897 (send_sigstop): Don't clear stop_expected. Always set it,
12899 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12900 (cancel_finished_single_step): New.
12901 (cancel_finished_single_steps): New.
12902 (wait_for_sigstop): Don't cancel finished single-step traps here.
12903 (linux_resume_one_lwp): Don't check for removed breakpoints.
12904 Don't set `step' on non-hardware step archs.
12905 (linux_set_resume_request): Ignore resume_stop requests if already
12906 stopping or stopped. Set the lwp's last_resume_kind.
12907 (resume_status_pending_p): Don't check for removed breakpoints.
12908 (need_step_over_p): New.
12909 (start_step_over): New.
12910 (finish_step_over): New.
12911 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12912 requests. Clear the thread's last reported target waitstatus.
12913 Don't use the `suspended' flag. Don't consider pending breakpoints.
12914 (linux_resume): Start a step-over if necessary.
12915 (proceed_one_lwp): New.
12916 (proceed_all_lwps): New.
12917 (unstop_all_lwps): New.
12918 * linux-low.h (struct lwp_info): Rewrite comment for the
12919 `suspended' flag. Add the `stop_pc' field. Delete the
12920 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12921 Add `'last_resume_kind' and `need_step_over' fields.
12922 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12923 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12924 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12925 (set_raw_breakpoint_at): New.
12926 (set_breakpoint_at): Rewrite to use it.
12927 (reinsert_breakpoint_handler): Delete.
12928 (set_reinsert_breakpoint): New.
12929 (reinsert_breakpoint_by_bp): Delete.
12930 (delete_reinsert_breakpoints): New.
12931 (uninsert_breakpoint): Rewrite.
12932 (uninsert_breakpoints_at): New.
12933 (reinsert_breakpoint): Rewrite.
12934 (reinsert_breakpoints_at): New.
12935 (check_breakpoints): Rewrite.
12936 (breakpoint_here): New.
12937 (breakpoint_inserted_here): New.
12938 (check_mem_read): Adjust.
12939 * mem-break.h (breakpoints_supported, breakpoint_here)
12940 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12941 (reinsert_breakpoint_by_bp): Delete declaration.
12942 (delete_reinsert_breakpoints): Declare.
12943 (reinsert_breakpoint): Delete declaration.
12944 (reinsert_breakpoints_at): Declare.
12945 (uninsert_breakpoint): Delete declaration.
12946 (uninsert_breakpoints_at): Declare.
12947 (check_breakpoints): Adjust prototype.
12948 * server.h: Adjust include order.
12949 (struct thread_info): Declare here. Add a `last_status' field.
12951 2010-03-23 Michael Snyder <msnyder@vmware.com>
12953 * server.c (crc32): New function.
12954 (handle_query): Add handling for 'qCRC:' request.
12956 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12958 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12959 lwp had been stopped by a watchpoint.
12961 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12963 * server.h (internal_error): Declare.
12964 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12965 * utils.c (internal_error): New function.
12967 2010-03-15 Andreas Schwab <schwab@redhat.com>
12969 * configure.srv: Fix typo setting srv_regobj.
12971 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12973 * linux-low.c (fetch_register): Avoid passing a non string literal
12975 (usr_store_inferior_registers): Ditto.
12977 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12979 * linux-low.c (linux_write_memory): Bail out early if peeking
12982 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12984 * linux-low.h (struct lwp_info): New fields
12985 `stopped_by_watchpoint' and `stopped_data_address'.
12986 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12987 here, and cache them in the lwp object.
12988 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12990 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12992 (linux_stopped_by_watchpoint): Rewrite.
12993 (linux_stopped_data_address): Rewrite.
12995 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12997 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12998 switching the current inferior, not before.
13000 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13002 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13003 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13004 i386-linux.c and amd64-linux.c.
13005 (reg-i386.o): Removed.
13006 (reg-i386.c): Likewise.
13007 (reg-i386-linux.o): Likewise.
13008 (reg-i386-linux.c): Likewise.
13009 (reg-x86-64.o): Likewise.
13010 (reg-x86-64.c): Likewise.
13011 (reg-x86-64-linux.o): Likewise.
13012 (reg-x86-64-linux.c): Likewise.
13014 (i386.c): Likewise.
13015 (i386-linux.o): Likewise.
13016 (i386-linux.c): Likewise.
13017 (amd64.o): Likewise.
13018 (amd64.c): Likewise.
13019 (amd64-linux.o): Likewise.
13020 (amd64-linux.c): Likewise.
13022 * configure.srv (srv_i386_regobj): New.
13023 (srv_i386_linux_regobj): Likewise.
13024 (srv_amd64_regobj): Likewise.
13025 (srv_amd64_linux_regobj): Likewise.
13026 (srv_i386_32bit_xmlfiles): Likewise.
13027 (srv_i386_64bit_xmlfiles): Likewise.
13028 (srv_i386_xmlfiles): Likewise.
13029 (srv_amd64_xmlfiles): Likewise.
13030 (srv_i386_linux_xmlfiles): Likewise.
13031 (srv_amd64_linux_xmlfiles): Likewise.
13032 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13033 srv_xmlfiles to $srv_i386_xmlfiles.
13034 (i[34567]86-*-mingw32ce*): Likewise.
13035 (i[34567]86-*-mingw*): Likewise.
13036 (i[34567]86-*-nto*): Likewise.
13037 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13038 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13039 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13040 (x86_64-*-linux*): Likewise.
13042 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13043 (init_registers_amd64_linux): New.
13044 (x86_arch_setup): Replace init_registers_x86_64_linux with
13045 init_registers_amd64_linux.
13047 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13049 * configure.ac: Check for libdl. If it is not available link against
13050 static libthread_db.
13051 * configure: Regenerate.
13053 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13057 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13058 handing a read watchpoint.
13059 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13061 2010-02-12 Doug Evans <dje@google.com>
13063 * linux-low.c (linux_supports_tracefork_flag): Document.
13064 (linux_look_up_symbols): Add comment.
13066 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13068 * regcache.c (supply_register): Clear regcache if buf is NULL.
13070 2010-02-02 Nicolas Roche <roche@sourceware.org>
13071 Joel Brobecker <brobecker@adacore.com>
13073 * inferiors.c (find_inferior): Add function documentation.
13074 (unloaded_dll): Handle the case where the unloaded dll has not
13075 been previously registered in the dll list.
13077 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13079 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13080 (thumb2_breakpoint): New.
13081 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13083 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13085 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13086 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13089 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13091 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13093 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13095 * linux-s390-low.c (s390_collect_ptrace_register)
13096 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13098 2010-01-21 Doug Evans <dje@google.com>
13100 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13101 (PTRACE_ARG4_TYPE): New macro.
13102 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13103 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13104 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13105 (usr_store_inferior_registers): Ditto.
13106 (linux_read_memory, linux_write_memory): Ditto.
13107 (linux_test_for_tracefork): Ditto.
13109 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13110 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13112 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13114 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13117 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13119 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13120 prototype to take a regcache. Adjust.
13122 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13124 * regcache.h (struct thread_info): Forward declare.
13125 (struct regcache): New.
13126 (new_register_cache): Adjust prototype.
13127 (get_thread_regcache): Declare.
13128 (free_register_cache): Adjust prototype.
13129 (registers_to_string, registers_from_string): Ditto.
13130 (supply_register, supply_register_by_name, collect_register)
13131 (collect_register_as_string, collect_register_by_name): Ditto.
13132 * regcache.c (struct inferior_regcache_data): Delete.
13133 (get_regcache): Rename to ...
13134 (get_thread_regcache): ... this. Adjust. Switch inferior before
13135 fetching registers.
13136 (regcache_invalidate_one): Adjust.
13137 (regcache_invalidate): Fix prototype.
13138 (new_register_cache): Return the new register cache.
13139 (free_register_cache): Change prototype.
13140 (realloc_register_cache): Adjust.
13141 (registers_to_string): Change prototype to take a regcache. Adjust.
13142 (registers_from_string): Ditto.
13143 (register_data): Ditto.
13144 (supply_register): Ditto.
13145 (supply_register_by_name): Ditto.
13146 (collect_register): Ditto.
13147 (collect_register_as_string): Ditto.
13148 (collect_register_by_name): Ditto.
13149 * server.c (process_serial_event): Adjust.
13150 * linux-low.h (regset_fill_func, regset_store_func): Change
13152 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13154 * linux-low.c (get_stop_pc): Adjust.
13155 (check_removed_breakpoint): Adjust.
13156 (linux_wait_for_event): Adjust.
13157 (linux_resume_one_lwp): Adjust.
13158 (fetch_register): Add regcache parameter. Adjust.
13159 (usr_store_inferior_registers): Ditto.
13160 (regsets_fetch_inferior_registers): Ditto.
13161 (regsets_store_inferior_registers): Ditto.
13162 (linux_fetch_registers, linux_store_registers): Ditto.
13163 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13165 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13167 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13168 prototype to take a regcache.
13169 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13170 * remote-utils.c (convert_ascii_to_int, outreg)
13171 (prepare_resume_reply): Change prototype to take a regcache.
13173 * target.h (struct target_ops) <fetch_registers, store_registers>:
13174 Change prototype to take a regcache.
13175 (fetch_inferior_registers, store_inferior_registers): Change
13176 prototype to take a regcache. Adjust.
13177 * proc-service.c (ps_lgetregs): Adjust.
13178 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13179 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13180 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13181 take a regcache. Adjust.
13182 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13183 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13184 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13185 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13186 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13187 (cris_cannot_fetch_register):
13188 (cris_breakpoint_at): Change prototype to take a regcache.
13190 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13191 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13192 to take a regcache. Adjust.
13193 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13195 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13196 take a regcache. Adjust.
13197 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13198 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13199 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13200 * linux-mips-low.c (mips_get_pc):
13201 (mips_set_pc): Change prototype to take a regcache. Adjust.
13202 (mips_reinsert_addr): Adjust.
13203 (mips_collect_register): Change prototype to take a regcache.
13205 (mips_supply_register):
13206 (mips_collect_register_32bit, mips_supply_register_32bit)
13207 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13208 (mips_store_fpregset): Ditto.
13209 * linux-ppc-low.c (ppc_supply_ptrace_register)
13210 (ppc_supply_ptrace_register): Ditto.
13211 (parse_spufs_run): Adjust.
13212 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13213 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13214 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13215 take a regcache. Adjust.
13216 * linux-s390-low.c (s390_collect_ptrace_register)
13217 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13218 (s390_set_pc): Change prototype to take a regcache. Adjust.
13219 (s390_arch_setup): Adjust.
13220 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13221 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13222 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13223 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13224 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13226 (sparc_breakpoint_at): Adjust.
13227 * linux-xtensa-low.c (xtensa_fill_gregset):
13228 (xtensa_store_gregset):
13229 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13230 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13231 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13232 prototype to take a regcache. Adjust.
13233 * win32-arm-low.c (arm_fetch_inferior_register)
13234 (arm_store_inferior_register): Change prototype to take a
13236 * win32-i386-low.c (i386_fetch_inferior_register)
13237 (i386_store_inferior_register): Change prototype to take a
13239 * win32-low.c (child_fetch_inferior_registers)
13240 (child_store_inferior_registers): Change prototype to take a
13242 (win32_wait): Adjust.
13243 (win32_fetch_inferior_registers): Change prototype to take a
13245 (win32_store_inferior_registers): Adjust.
13246 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13247 store_inferior_register>: Change prototype to take a regcache.
13249 2010-01-20 Doug Evans <dje@google.com>
13251 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13253 (linux_wait_for_event1, linux_init_signals): Ditto.
13254 (W_STOPCODE): Provide definition if missing.
13256 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13258 * linux-low.c (linux_core_of_thread): New.
13259 (compare_ints, show_process, list_threads): New.
13260 (linux_qxfer_osdata): Report threads and cores.
13261 (linux_target_op): Register linux_core_of_thread.
13262 * remote-utils.c (prepare_resume_reply): Report the core.
13263 (buffer_xml_printf): Support %d specifier.
13264 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13266 (handle_query): Handle qXfer:threads. Announce availability
13268 * target.h (struct target_ops): New field core_of_thread.
13270 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13272 * Makefile.in (clean): Remove new generated files.
13273 (reg-s390.o, reg-s390.c): Remove rules.
13274 (reg-s390x.o, reg-s390x.c): Likewise.
13275 (s390-linux32.o, s390-linux32.c): Add rules.
13276 (s390-linux64.o, s390-linux64.c): Likewise.
13277 (s390x-linux64.o, s390x-linux64.c): Likewise.
13278 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13279 * linux-s390-low.c: Include <elf.h>.
13280 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13281 (init_registers_s390): Remove prototype.
13282 (init_registers_s390x): Likewise.
13283 (init_registers_s390_linux32): Add prototype.
13284 (init_registers_s390_linux64): Likewise.
13285 (init_registers_s390x_linux64): Likewise.
13286 (s390_num_regs_3264): New define.
13287 (s390_regmap_3264): New global variable.
13288 (s390_cannot_fetch_register): Remove obsolete check.
13289 (s390_cannot_store_register): Likewise.
13290 (s390_collect_ptrace_register): Handle upper/lower register halves.
13291 (s390_supply_ptrace_register): Likewise.
13292 (s390_fill_gregset): Update to register number changes.
13293 (s390_get_hwcap): New routine.
13294 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13295 Install appropriate regmap and register set.
13297 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13299 * server.c (gdbserver_version): Update copyright year to 2010.
13300 * gdbreplay.c (gdbreplay_version): Likewise.
13302 2009-12-28 Doug Evans <dje@google.com>
13304 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13305 elf/external.h. Include <elf.h> instead but only if necessary.
13307 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13309 * linux-low.c (linux_remove_process): Remove `detaching'
13310 parameter. Don't release/detach from thread_db here.
13311 (linux_kill): Release/detach from thread_db here, ...
13312 (linux_detach): ... and here, before actually detaching.
13313 (linux_wait_1): ... and here, when a process exits.
13314 * thread-db.c (any_thread_of): New.
13315 (thread_db_free): Switch the current inferior to a thread of the
13318 2009-12-21 Doug Evans <dje@google.com>
13320 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13322 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13323 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13324 warning ifndef __NR_tkill. Move setting of errno there too.
13325 Delete unnecessary resetting of errno after syscall.
13326 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13328 * configure.ac: Check for dladdr.
13329 * config.in: Regenerate.
13330 * configure: Regenerate.
13331 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13332 (try_thread_db_load): Update.
13334 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13336 2009-12-18 Doug Evans <dje@google.com>
13338 * event-loop.c: Include unistd.h if it exists.
13340 * linux-low.c (my_waitpid): Move definition away from being in
13341 between linux_tracefork_child/linux_test_for_tracefork.
13343 * gdb_proc_service.h (psaddr_t): Fix type.
13344 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13345 signature to match glibc.
13347 2009-12-16 Doug Evans <dje@google.com>
13349 * linux-low.c (linux_read_memory): Fix argument to read.
13351 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13353 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13354 events, don't leave current_inferior pointing at null.
13356 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13358 * win32-low.c (LOG): Delete.
13359 (OUTMSG): Output to stderr.
13360 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13361 on compile time LOG macro.
13362 (win32_wait): Fix debug output.
13364 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13366 * win32-low.c (win32_add_one_solib): If the dll name is
13367 "ntdll.dll", prepend the system directory to the dll path.
13369 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13371 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13373 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13374 Vladimir Prus <vladimir@codesourcery.com>
13376 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13377 * configure.ac: Check for __mcoldfire__ and set
13378 gdb_cv_m68k_is_coldfire.
13379 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13380 reg-cf.o and reg-m68k.o.
13381 * configure: Regenerated.
13383 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13385 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13386 Pass it to thread_db_free.
13387 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13388 proper `detaching' argument to linux_remove_process.
13389 * linux-low.h (thread_db_free): Add `detaching' parameter.
13390 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13392 (thread_db_free): Add `detaching' parameter. Only
13393 call td_ta_clear_event if detaching from process.
13395 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13397 * thread-db.c (thread_db_free): Fix typo.
13399 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13402 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13404 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13406 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13407 with an i686 compiler.
13408 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13410 * configure: Rebuilt.
13412 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13416 * server.c (handle_search_memory_1): Correct read_addr initialization
13417 in loop for searching subsequent chunks.
13419 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13421 * configure.ac: New --with-libthread-db option.
13422 * thread-db.c: Allow direct dependence on libthread_db.
13423 (thread_db_free): Adjust.
13424 * config.in: Regenerate.
13425 * configure: Likewise.
13427 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13430 * thread-db.c (attach_thread): New function.
13431 (maybe_attach_thread): Return success/failure.
13432 (find_new_threads_callback): Adjust.
13433 (thread_db_find_new_threads): Loop until no new threads.
13435 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13437 * proc-service.c (ps_lgetregs): Formatting.
13439 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13441 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13442 * configure.ac: Adjust.
13443 * linux-low.h (struct process_info_private): Move members to struct
13445 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13446 * linux-low.c (linux_remove_process): Adjust.
13447 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13448 * server.c (handle_query): Move code ...
13449 (handle_monitor_command): ... here. New function.
13450 * target.h (struct target_ops): New member.
13451 * thread-db.c (struct thread_db): New.
13452 (libthread_db_search_path): New variable.
13453 (thread_db_create_event, thread_db_enable_reporting)
13454 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13455 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13456 (try_thread_db_load_1, dladdr_to_soname): New functions.
13457 (try_thread_db_load, thread_db_load_search): New functions.
13458 (thread_db_init): Search for libthread_db.
13459 (thread_db_free): New function.
13460 (thread_db_handle_monitor_command): Likewise.
13461 * config.in: Regenerate.
13462 * configure: Regenerate.
13464 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13466 * spu-low.c (spu_kill): Wait for inferior to terminate.
13467 Call clear_inferiors.
13468 (spu_detach): Call clear_inferiors.
13470 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13472 * aclocal.m4: Regenerate.
13473 * config.in: Likewise.
13474 * configure: Likewise.
13476 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13478 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13479 (parse_spufs_run): New function.
13480 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13481 (ppc_breakpoint_at): Handle SPU breakpoints.
13483 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13485 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13486 (SPUFS_MAGIC): Define.
13487 (spu_enumerate_spu_ids): New function.
13488 (linux_qxfer_spu): New function.
13489 (linux_target_ops): Install linux_qxfer_spu.
13491 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13493 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13494 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13495 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13496 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13497 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13498 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13499 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13500 (init_registers_powerpc_cell32l): Add prototype.
13501 (init_registers_powerpc_cell64l): Likewise.
13502 (ppc_arch_setup): Detect Cell/B.E. architecture.
13504 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13506 * Makefile.in (datarootdir): New variable.
13508 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13510 * linux-low.c (linux_write_memory): Update debugging output.
13511 * Makefile.in (clean): Add new descriptions.
13512 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13513 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13514 * configure.srv: Add new files for arm*-*-linux*.
13515 * linux-arm-low.c: Add new declarations.
13516 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13517 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13518 (HWCAP_VFPv3D16): New.
13519 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13520 instead of __IWMMXT__.
13521 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13522 (arm_arch_setup): New.
13523 (target_regsets): Remove #ifdef. Add VFP regset.
13524 (the_low_target): Use arm_arch_setup.
13526 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13528 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13529 the main thread again.
13531 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13533 Adding Neutrino gdbserver.
13534 * configure: Regenerated.
13535 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13536 * configure.srv (i[34567]86-*-nto*): New target.
13537 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13538 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13539 (nto_comctrl) [__QNX__]: New function.
13540 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13542 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13544 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13547 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13548 Pedro Alves <pedro@codesourcery.com>
13550 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13551 don't support CONTEXT_EXTENDED_REGISTERS.
13552 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13553 (the_low_target): Install them.
13554 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13555 failing with ERROR_PIPE_NOT_CONNECTED.
13557 2009-06-30 Doug Evans <dje@google.com>
13558 Pierre Muller <muller@ics.u-strasbg.fr>
13560 Add h/w watchpoint support to x86-linux, win32-i386.
13561 * Makefile.in (SFILES): Add i386-low.c
13562 (i386_low_h): Define.
13563 (i386-low.o): Add dependencies.
13564 (linux-x86-low.o): Add i386-low.h dependency.
13565 (win32-i386-low.o): Ditto.
13566 * i386-low.c: New file.
13567 * i386-low.h: New file.
13568 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13569 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13570 * linux-low.c (linux_add_process): Initialize arch_private.
13571 (linux_remove_process): Free arch_private.
13572 (add_lwp): Initialize arch_private.
13573 (delete_lwp): Free arch_private.
13574 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13576 * linux-low.h (process_info_private): New member arch_private.
13577 (lwp_info): New member arch_private.
13578 (linux_target_ops): New members new_process, new_thread,
13580 (ptid_of): New macro.
13581 * linux-x86-low.c: Include stddef.h, i386-low.h.
13582 (arch_process_info): New struct.
13583 (arch_lwp_info): New struct.
13584 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13585 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13586 (i386_dr_low_get_status): New function.
13587 (x86_insert_point, x86_remove_point): New functions.
13588 (x86_stopped_by_watchpoint): New function.
13589 (x86_stopped_data_address): New function.
13590 (x86_linux_new_process, x86_linux_new_thread): New functions.
13591 (x86_linux_prepare_to_resume): New function.
13592 (the_low_target): Add entries for insert_point, remove_point,
13593 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13595 * server.c (debug_hw_points): New global.
13596 (monitor_show_help): Document set debug-hw-points.
13597 (handle_query): Process "set debug-hw-points".
13598 * server.h (debug_hw_points): Declare.
13599 (paddress): Declare.
13600 * utils.c (NUMCELLS, CELLSIZE): New macros.
13601 (get_sell, xsnprintf, paddress): New functions.
13602 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13603 remove_point, stopped_by_watchpoint, stopped_data_address.
13604 * win32-i386-low.c: Include i386-low.h.
13605 (debug_reg_state): Replaces dr.
13606 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13607 (i386_dr_low_get_status): New function.
13608 (i386_insert_point, i386_remove_point): New functions.
13609 (i386_stopped_by_watchpoint): New function.
13610 (i386_stopped_data_address): New function.
13611 (i386_initial_stuff): Update.
13612 (get_thread_context,set_thread_context,i386_thread_added): Update.
13613 (the_low_target): Add entries for insert_point,
13614 remove_point, stopped_by_watchpoint, stopped_data_address.
13615 * win32-low.c (win32_insert_watchpoint): New function.
13616 (win32_remove_watchpoint): New function.
13617 (win32_stopped_by_watchpoint): New function.
13618 (win32_stopped_data_address): New function.
13619 (win32_target_ops): Add entries for insert_watchpoint,
13620 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13621 * win32-low.h (win32_target_ops): New members insert_point,
13622 remove_point, stopped_by_watchpoint, stopped_data_address.
13624 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13626 * server.c (process_serial_event): Re-return unsupported, not
13627 error, if the type isn't recognized. Re-allow supporting only
13628 insert or remove packets. Also call require_running for
13629 breakpoints. Add missing break statement to default case. Tidy.
13630 * target.h (struct target_ops): Rename insert_watchpoint to
13631 insert_point, and remove_watchpoint to remove_point.
13633 * linux-low.h (struct linux_target_ops): Likewise.
13634 * linux-low.c (linux_insert_watchpoint): Rename to ...
13635 (linux_insert_point): ... this. Adjust.
13636 (linux_remove_watchpoint): Rename to ...
13637 (linux_remove_point): ... this. Adjust.
13638 (linux_target_ops): Adjust.
13639 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13640 (cris_insert_point): ... this.
13641 (cris_remove_watchpoint): Rename to ...
13642 (cris_remove_point): ... this.
13643 (the_low_target): Adjust.
13645 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13647 * server.c (handle_v_kill): Pass signal_pid to
13648 kill_inferior if multi_process is zero.
13650 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13652 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13653 * target.h (target_ops): Comment for *_watchpoint to make it clear
13654 the functions can get types '0' and '1'.
13656 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13658 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13659 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13660 * regcache.c (get_regcache): Likewise.
13661 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13662 * win32-low.c (child_fetch_inferior_registers): Remove check for
13665 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13666 Pedro Alves <pedro@codesourcery.com>
13668 * target.h (struct target_ops) <supports_multi_process>: New
13670 (target_supports_multi_process): New.
13671 * server.c (handle_query): Even if GDB reports support, only
13672 enable multi-process if the target also supports it. Report
13673 multi-process support only if the target backend supports it.
13674 * linux-low.c (linux_supports_multi_process): New function.
13675 (linux_target_ops): Install it as target_supports_multi_process
13678 2009-05-24 Doug Evans <dje@google.com>
13680 Global renaming of find_thread_pid to find_thread_ptid.
13681 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13682 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13683 All callers updated.
13685 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13686 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13689 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13690 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13691 (linux_resume_one_lwp): Ditto.
13693 2009-05-23 Doug Evans <dje@google.com>
13695 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13696 from struct inferior_list_entry * to struct lwp_info *.
13697 All callers updated.
13699 2009-05-13 Doug Evans <dje@google.com>
13701 * linux-x86-low.c: Don't include assert.h.
13702 (x86_siginfo_fixup): Use fatal, not assert.
13703 (x86_arch_setup): Fix comment.
13705 2009-05-12 Doug Evans <dje@google.com>
13707 Biarch support for i386/amd64 gdbserver.
13708 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13709 Add linux-x86-low.c.
13710 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13711 (linux-x86-low.o): Add.
13712 * linux-x86-64-low.c: Delete.
13713 * linux-i386-low.c: Delete.
13714 * linux-x86-low.c: New file.
13715 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13717 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13719 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13720 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13721 (linux_child_pid_to_exec_file): New function.
13722 (elf_64_header_p, elf_64_file_p): New functions.
13723 (siginfo_fixup): New function.
13724 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13725 give target a chance to convert layout.
13726 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13727 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13729 2009-05-07 Doug Evans <dje@google.com>
13731 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13732 (regsets_store_inferior_registers): Ditto.
13734 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13738 * linux-low.c (must_set_ptrace_flags): Delete.
13739 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13741 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13742 `lwp->must_set_ptrace_flags' instead.
13743 (linux_wait_for_event_1): Set ptrace options here.
13744 (linux_wait_1): ... not here.
13746 2009-04-30 Doug Evans <dje@google.com>
13748 * inferiors.c (started_inferior_callback): New function.
13749 (attached_inferior_callback): New function.
13750 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13751 * server.c (print_started_pid, print_attached_pid): New functions.
13752 (detach_or_kill_for_exit): New function.
13753 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13754 * server.h (have_started_inferiors_p): Declare.
13755 (have_attached_inferiors_p): Declare.
13757 * inferiors.c (remove_process): Fix memory leak, free process.
13758 * linux-low.c (linux_remove_process): New function.
13759 (linux_kill): Call it instead of remove_process.
13760 (linux_detach, linux_wait_1): Ditto.
13762 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13764 * configure.srv: Add x86 Windows CE target.
13766 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13768 * inferiors.c (get_thread_process): Make global.
13769 * server.h (get_thread_process): Add prototype.
13770 * thread-db.c (find_one_thread): Use get_thread_process
13771 instead of current_process.
13772 (thread_db_get_tls_address): Do not crash if called when
13773 thread layer is not yet initialized.
13775 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13777 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13778 * spu-low.c (current_tid): Rename to ...
13779 (current_ptid): ... this.
13780 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13781 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13782 ptid_get_lwp (current_ptid) instead of current_tid.
13783 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13784 instead of current_tid. Use find_process_pid to verify pid
13785 argument is valid. Pass proper argument to remove_process.
13786 (spu_thread_alive): Compare current_ptid instead of current_tid.
13787 (spu_resume): Likewise.
13789 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13791 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13794 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13796 Implement the multiprocess extensions, and add linux multiprocess
13799 * server.h (ULONGEST): Declare.
13800 (struct ptid, ptid_t): New.
13801 (minus_one_ptid, null_ptid): Declare.
13802 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13803 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13804 (struct inferior_list_entry): Change `id' type from unsigned from
13806 (struct sym_cache, struct breakpoint, struct
13807 process_info_private): Forward declare.
13808 (struct process_info): Declare.
13809 (current_process): Declare.
13810 (all_processes): Declare.
13811 (initialize_inferiors): Declare.
13812 (add_thread): Adjust to use ptid_t.
13813 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13814 (add_process, remove_process, find_thread_pid): Declare.
13815 (find_inferior_id): Adjust to use ptid_t.
13816 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13817 (multi_process): Declare.
13818 (push_event): Adjust to use ptid_t.
13819 (read_ptid, write_ptid): Declare.
13820 (prepare_resume_reply): Adjust to use ptid_t.
13821 (clear_symbol_cache): Declare.
13822 * inferiors.c (all_processes): New.
13823 (null_ptid, minus_one_ptid): New.
13824 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13825 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13826 (add_thread): Change unsigned long to ptid. Remove gdb_id
13828 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13829 (gdb_id_to_thread): Rename to ...
13830 (find_thread_pid): ... this. Change unsigned long to ptid.
13831 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13832 (loaded_dll, pull_pid_from_list): Adjust.
13833 (add_process, remove_process, find_process_pid)
13834 (get_thread_process, current_process, initialize_inferiors): New.
13835 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13836 (struct target_waitstatus) <related_pid>: Ditto.
13837 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13838 return type to int.
13839 (struct target_ops) <join>: Add `pid' argument.
13840 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13841 (struct target_ops) <wait>: Add `ptid' field. Change return type
13843 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13844 (mywait): Add `ptid' argument. Change return type to ptid_t.
13845 (target_pid_to_str): Declare.
13846 * target.c (set_desired_inferior): Adjust to use ptids.
13847 (mywait): Add new `ptid' argument. Adjust.
13848 (target_pid_to_str): New.
13849 * mem-break.h (free_all_breakpoints): Declare.
13850 * mem-break.c (breakpoints): Delelete.
13851 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13852 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13853 to use per-process breakpoint list.
13854 (free_all_breakpoints): New.
13855 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13856 (symbol_cache, all_symbols_looked_up): Delete.
13858 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13860 (prepare_resume_reply): Change ptid argument's type from unsigned
13861 long to ptid_t. Adjust. Implement W;process and X;process.
13862 (free_sym_cache, clear_symbol_cache): New.
13863 (look_up_one_symbol): Adjust to per-process symbol cache. *
13864 * server.c (cont_thread, general_thread, step_thread): Change type
13866 (attached): Delete.
13867 (multi_process): New.
13868 (last_ptid): Change type to ptid_t.
13869 (struct vstop_notif) <ptid>: Change type to ptid_t.
13870 (queue_stop_reply, push_event): Change `ptid' argument's type to
13872 (discard_queued_stop_replies): Add `pid' argument.
13873 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13874 changes. Don't reference the `attached' global.
13875 (attach_inferior): Adjust to mywait interface changes.
13876 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13877 features. Handle and report "multiprocess+". Handle
13879 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13881 (handle_v_kill): New.
13882 (handle_v_stopped): Adjust to use target_pid_to_str.
13883 (handle_v_requests): Allow multiple attaches and runs when
13884 multiprocess extensions are in effect. Handle "vKill".
13885 (myresume): Adjust to use ptids.
13886 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13887 (handle_status): Adjust to discard_queued_stop_replies interface
13889 (first_thread_of, kill_inferior_callback)
13890 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13891 (main): Call initialize_inferiors. Adjust to use ptids, killing
13892 and detaching from all inferiors. Handle multiprocess packet
13894 * linux-low.h: Include gdb_proc_service.h.
13895 (struct process_info_private): New.
13896 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13897 <lwpid_of>: Use ptid_get_lwp.
13898 (get_lwp_thread): Adjust.
13899 (struct lwp_info): Add `dead' member.
13900 (find_lwp_pid): Declare.
13901 * linux-low.c (thread_db_active): Delete.
13902 (new_inferior): Adjust comment.
13903 (inferior_pid): Delete.
13904 (linux_add_process): New.
13905 (handle_extended_wait): Adjust.
13906 (add_lwp): Change unsigned long to ptid.
13907 (linux_create_inferior): Add process to processes table. Adjust
13908 to use ptids. Don't set new_inferior here.
13909 (linux_attach_lwp): Rename to ...
13910 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13911 it. Adjust to use ptids.
13912 (linux_attach_lwp): New.
13913 (linux_attach): Add process to processes table. Don't set
13915 (struct counter): New.
13916 (second_thread_of_pid_p, last_thread_of_process_p): New.
13917 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13918 multiple processes.
13919 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13920 processes. Remove process from process table.
13921 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13922 to multiple processes.
13923 (any_thread_of): New.
13924 (linux_detach): Add `pid' argument, and handle it. Remove process
13925 from processes table.
13926 (linux_join): Add `pid' argument. Handle it.
13927 (linux_thread_alive): Change unsighed long argument to ptid_t.
13928 Consider dead lwps as not being alive.
13929 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13930 threads we're not interested in.
13931 (same_lwp, find_lwp_pid): New.
13932 (linux_wait_for_lwp): Change `pid' argument's type from int to
13934 (linux_wait_for_event): Rename to ...
13935 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13936 from int to ptid_t. Adjust.
13937 (linux_wait_for_event): New.
13938 (linux_wait_1): Add `ptid' argument. Change return type to
13939 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13940 that exit from the process table.
13941 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13943 (mark_lwp_dead): New.
13944 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13945 stopping all threads, mark its main lwp as dead.
13946 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13948 (fetch_register, usr_store_inferior_registers)
13949 (regsets_fetch_inferior_registers)
13950 (regsets_store_inferior_registers, linux_read_memory)
13951 (linux_write_memory): Inline `inferior_pid'.
13952 (linux_look_up_symbols): Adjust to use per-process
13953 `thread_db_active'.
13954 (linux_request_interrupt): Adjust to use ptids.
13955 (linux_read_auxv): Inline `inferior_pid'.
13956 (initialize_low): Don't reference thread_db_active.
13957 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13958 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13959 (ps_getpid): Return the pid of the current inferior.
13960 * thread-db.c (proc_handle, thread_agent): Delete.
13961 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13963 (find_one_thread): Change argument type to ptid_t. Adjust to
13965 (maybe_attach_thread): Adjust to per-process data and ptids.
13966 (thread_db_find_new_threads): Ditto.
13967 (thread_db_init): Ditto.
13968 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13969 processes table. Adjust to use ptids.
13970 (spu_kill, spu_detach): Adjust interface. Remove process from
13972 (spu_join, spu_thread_alive): Adjust interface.
13973 (spu_wait): Adjust interface. Remove process from processes
13974 table. Adjust to use ptids.
13975 * win32-low.c (current_inferior_tid): Delete.
13976 (current_inferior_ptid): New.
13977 (debug_event_ptid): New.
13978 (thread_rec): Take a ptid. Adjust.
13979 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13980 (child_delete_thread): Ditto.
13981 (do_initial_child_stuff): Add `attached' argument. Add process to
13983 (child_fetch_inferior_registers, child_store_inferior_registers):
13985 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13986 (win32_attach): Pass 1 to do_initial_child_stuff.
13987 (win32_kill): Adjust interface. Remove process from processes
13989 (win32_detach): Ditto.
13990 (win32_join): Adjust interface.
13991 (win32_thread_alive): Take a ptid.
13992 (win32_resume): Adjust to use ptids.
13993 (get_child_debug_event): Ditto.
13994 (win32_wait): Adjust interface. Remove exiting process from
13997 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13999 Non-stop mode support.
14001 * server.h (non_stop): Declare.
14002 (gdb_client_data, handler_func): Declare.
14003 (delete_file_handler, add_file_handler, start_event_loop):
14005 (handle_serial_event, handle_target_event, push_event)
14006 (putpkt_notif): Declare.
14007 * target.h (enum resume_kind): New.
14008 (struct thread_resume): Replace `step' field by `kind' field.
14009 (TARGET_WNOHANG): Define.
14010 (struct target_ops) <wait>: Add `options' argument.
14011 <supports_non_stop, async, start_non_stop>: New fields.
14012 (target_supports_non_stop, target_async): New.
14013 (start_non_stop): Declare.
14014 (mywait): Add `options' argument.
14015 * target.c (mywait): Add `options' argument. Print child exit
14016 notifications here.
14017 (start_non_stop): New.
14018 * server.c (non_stop, own_buf, mem_buf): New globals.
14019 (struct vstop_notif): New.
14020 (notif_queue): New global.
14021 (queue_stop_reply, push_event, discard_queued_stop_replies)
14022 (send_next_stop_reply): New.
14023 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14025 (attach_inferior): In non-stop mode, don't wait for the target
14027 (handle_general_set): Handle QNonStop.
14028 (handle_query): When handling qC, return the current general
14029 thread, instead of the first thread of the list.
14030 (handle_query): If the backend supports non-stop mode, include
14031 QNonStop+ in the qSupported query response.
14032 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14034 (handle_v_attach, handle_v_run): Handle non-stop mode.
14035 (handle_v_stopped): New.
14036 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14037 (myresume): Adjust to use resume_kind. Handle non-stop.
14038 (queue_stop_reply_callback): New.
14039 (handle_status): Handle non-stop mode.
14040 (main): Clear non_stop flag on reconnection. Use the event-loop.
14041 Refactor serial protocol handling from here ...
14042 (process_serial_event): ... to this new function. When GDB
14043 selects any thread, select one here. In non-stop mode, wait until
14044 GDB acks all pending events before exiting.
14045 (handle_serial_event, handle_target_event): New.
14046 * remote-utils.c (remote_open): Install remote_desc in the event
14048 (remote_close): Remove remote_desc from the event loop.
14049 (putpkt_binary): Rename to...
14050 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14051 (putpkt_binary): New as wrapper around putpkt_binary_1.
14052 (putpkt_notif): New.
14053 (prepare_resume_reply): In non-stop mode, don't change the
14055 * event-loop.c: New.
14056 * Makefile.in (OBJ): Add event-loop.o.
14057 (event-loop.o): New rule.
14059 * linux-low.h (pid_of): Moved here.
14061 (get_lwp_thread): Use lwpid_of.
14062 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14063 * linux-low.c (pid_of): Delete.
14064 (inferior_pid): Use lwpid_of.
14065 (linux_event_pipe): New.
14066 (target_is_async_p): New.
14068 (handle_extended_wait): Use lwpid_of.
14069 (add_lwp): Don't set lwpid field.
14070 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14071 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14072 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14073 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14074 first. Adjust to linux_wait_for_event interface changes. Use
14076 (linux_detach): Don't delete the main lwp here.
14077 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14078 (status_pending_p): Don't consider explicitly suspended lwps.
14079 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14080 pointer. Add OPTIONS argument. Change return type to int. Use
14081 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14082 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14083 pointer. Add status pointer argument. Return a pid instead of a
14084 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14085 changes. In non-stop mode, don't switch to a random thread.
14086 (linux_wait): Rename to...
14087 (linux_wait_1): ... this. Add target_options argument, and handle
14088 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14089 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14090 clean exit and signal exit code. Don't stop all threads in
14091 non-stop mode. In all-stop mode, only stop all threads when
14092 reporting a stop to GDB. Handle explicit thread stop requests.
14093 (async_file_flush, async_file_mark): New.
14095 (send_sigstop): Use lwpid_of.
14096 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14097 interface changes. In non-stop mode, don't switch to a random
14099 (linux_resume_one_lwp): Use lwpid_of.
14100 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14101 (linux_resume_one_thread): ... this. Handle resume_stop. In
14102 non-stop mode, don't look for pending flag in all threads.
14103 (resume_status_pending_p): Don't consider explicitly suspended
14105 (my_waitpid): Reimplement. Emulate __WALL.
14106 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14108 (sigchld_handler, linux_supports_non_stop, linux_async)
14109 (linux_start_non_stop): New.
14110 (linux_target_ops): Register linux_supports_non_stop, linux_async
14111 and linux_start_non_stop.
14112 (initialize_low): Install SIGCHLD handler.
14113 * thread-db.c (thread_db_create_event, find_one_thread)
14114 (thread_db_get_tls_address): Use lwpid_of.
14115 * win32-low.c (win32_detach): Adjust to use resume_kind.
14116 (win32_wait): Add `options' argument.
14117 * spu-low.c (spu_resume): Adjust to use resume_kind.
14118 (spu_wait): Add `options' argument.
14120 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14122 Decouple target code from remote protocol.
14124 * target.h (enum target_waitkind): New.
14125 (struct target_waitstatus): New.
14126 (struct target_ops) <wait>: Return an unsigned long. Take a
14127 target_waitstatus pointer instead of a char pointer.
14128 (mywait): Likewise.
14129 * target.c (mywait): Change prototype to return an unsigned long.
14130 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14131 * server.h (thread_from_wait, old_thread_from_wait): Delete
14133 (prepare_resume_reply): Change prototype to take a
14135 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14136 (last_status, last_ptid): New.
14137 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14138 pid instead of a signal.
14139 (attach_inferior): Remove "status" and "signal" parameters.
14141 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14143 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14144 (handle_v_requests, myresume): Remove "status" and "signal"
14145 parameters. Adjust.
14146 (handle_status): New.
14147 (main): Delete local `status'. Adjust.
14148 * remote-utils.c: Include target.h.
14149 (prepare_resume_reply): Change prototype to take a
14150 target_waitstatus. Adjust.
14152 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14154 * spu-low.c (spu_wait): Adjust.
14155 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14157 (win32_wait): Adjust.
14159 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14161 * target.h (struct thread_resume): Delete leave_stopped member.
14162 (struct target_ops): Add a `n' argument to the `resume' callback.
14163 * server.c (start_inferior): Adjust.
14164 (handle_v_cont, myresume): Adjust.
14165 * linux-low.c (check_removed_breakpoint): Adjust to resume
14166 interface change, and to removed leave_stopped field.
14167 (resume_ptr): Delete.
14168 (struct thread_resume_array): New.
14169 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14170 resume interface change.
14171 (linux_continue_one_thread, linux_queue_one_thread)
14172 (resume_status_pending_p): Check if the resume field is NULL
14173 instead of checking the leave_stopped member.
14174 (linux_resume): Adjust to the target resume interface change.
14175 * spu-low.c (spu_resume): Adjust to the target resume interface
14177 * win32-low.c (win32_detach, win32_resume): Ditto.
14179 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14181 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14183 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14185 (linux_continue_one_thread): Only preserve the stepping flag if
14186 there's a pending breakpoint.
14188 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14190 * server.c (main): After the inferior having exited, call
14191 remote_close before exiting gdbserver.
14193 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14195 Fix size of FPSCR in Power 7 processors.
14196 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14197 (PPC_FEATURE_HAS_DFP): New #define.
14198 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14201 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14203 * server.c (handle_query) Whitespace and formatting.
14205 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14207 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14208 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14209 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14210 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14211 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14212 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14213 Makefile.in, configure.ac: Fix whitespace throughout.
14214 * configure: Regenerate.
14216 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14218 * inferiors.c (find_inferior): Make it safe for the callback
14219 function to delete the currently iterated inferior.
14221 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14223 * Makefile.in (linuw_low_h): Move higher.
14224 (thread-db.o): Depend on $(linux_low_h).
14226 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14228 Rename "process" to "lwp" throughout.
14230 * linux-low.c (all_processes): Rename to...
14231 (all_lwps): ... this.
14232 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14233 (add_process): Rename to ...
14234 (add_lwp): ... this. Adjust.
14235 (linux_create_inferior): Adjust.
14236 (linux_attach_lwp): Adjust.
14237 (linux_attach): Adjust.
14238 (linux_kill_one_process): Rename to ...
14239 (linux_kill_one_lwp): ... this. Adjust.
14240 (linux_kill): Adjust.
14241 (linux_detach_one_process): Rename to ...
14242 (linux_detach_one_lwp): ... this. Adjust.
14243 (linux_detach): Adjust.
14244 (check_removed_breakpoint): Adjust.
14245 (status_pending_p): Adjust.
14246 (linux_wait_for_process): Rename to ...
14247 (linux_wait_for_lwp): ... this. Adjust.
14248 (linux_wait_for_event): Adjust.
14249 (send_sigstop): Adjust.
14250 (wait_for_sigstop): Adjust.
14251 (stop_all_processes): Rename to ...
14252 (stop_all_lwps): ... this.
14253 (linux_resume_one_process): Rename to ...
14254 (linux_resume_one_lwp): ... this. Adjust.
14255 (linux_set_resume_request, linux_continue_one_thread)
14256 (linux_queue_one_thread, resume_status_pending_p)
14257 (usr_store_inferior_registers, regsets_store_inferior_registers)
14258 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14260 * linux-low.h (get_process): Rename to ...
14261 (get_lwp): ... this. Adjust.
14262 (get_thread_process): Rename to ...
14263 (get_thread_lwp): ... this. Adjust.
14264 (get_process_thread): Rename to ...
14265 (get_lwp_thread): ... this. Adjust.
14266 (struct process_info): Rename to ...
14267 (struct lwp_info): ... this.
14268 (all_processes): Rename to ...
14269 (all_lwps): ... this.
14270 * proc-service.c (ps_lgetregs): Adjust.
14271 * thread-db.c (thread_db_create_event, find_one_thread)
14272 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14274 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14276 * server.c (handle_query): Handle "qAttached".
14278 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14280 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14281 GPLv3, update license URL.
14283 2009-03-01 Doug Evans <dje@google.com>
14285 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14286 (server_h): Add gdb_signals.h.
14287 (signals.o): Update.
14288 * server.h (target_signal_from_host,target_signal_to_host_p)
14289 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14291 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14293 * remote-utils.c (getpkt): Also generate remote-debug
14294 information if noack_mode is set.
14296 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14298 * server.c (handle_query): Report qXfer:siginfo:read and
14299 qXfer:siginfo:write as supported and handle them.
14300 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14301 * linux-low.c (linux_xfer_siginfo): New.
14302 (linux_target_ops): Set it.
14304 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14306 * server.c (gdbserver_usage): Mention --remote-debug.
14307 (main): Accept '--remote-debug' switch.
14309 2009-01-18 Doug Evans <dje@google.com>
14311 * regcache.c (new_register_cache): No need to check result of xcalloc.
14312 * server.c (handle_search_memory): Back out calls to xmalloc,
14313 result is checked and error is returned to user upon failure.
14314 (handle_query): Ditto. Add more checks for result of malloc.
14315 (handle_v_cont): Check result of malloc, report error back to
14317 (handle_v_run): Ditto. Call freeargv.
14318 * server.h (freeargv): Declare.
14319 * utils.c (freeargv): New fn.
14321 2009-01-15 Doug Evans <dje@google.com>
14323 * gdbreplay.c (perror_with_name): Make arg const char *.
14324 * server.h (target_signal_to_name): Make return type const char *.
14325 * thread-db.c (thread_db_err_str): Make return type const char *.
14326 * utils.c (perror_with_name): Make arg const char *.
14328 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14330 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14331 when handling a EXIT_PROCESS_DEBUG_EVENT.
14333 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14335 * gdbreplay.c (gdbreplay_version): Update copyright year.
14336 * server.c (gdbserver_version): Likewise.
14338 2009-01-05 Doug Evans <dje@google.com>
14340 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14341 (handle_extended_wait): Improve comment.
14343 2008-12-13 Doug Evans <dje@google.com>
14345 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14346 * server.h (ATTR_MALLOC): New macro.
14347 (xmalloc,xcalloc,xstrdup): Declare.
14348 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14349 * inferiors.c: Ditto.
14350 * linux-low.c: Ditto.
14351 * mem-break.c: Ditto.
14352 * regcache.c: Ditto.
14353 * remote-utils.c: Ditto.
14356 * win32-low.c: Ditto.
14358 2008-12-12 Doug Evans <dje@google.com>
14360 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14361 in debugging printf.
14363 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14365 2008-12-09 Doug Evans <dje@google.com>
14367 * linux-low.h (struct process_info): Delete member tid, unused.
14368 * thread-db.c (find_one_thread): Update.
14369 (maybe_attach_thread): Update.
14371 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14373 * target.h (struct target_ops): Add qxfer_osdata member.
14374 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14376 (linux_qxfer_osdata): New functions.
14377 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14379 * server.c (handle_query): Handle "qXfer:osdata:read:".
14380 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14381 (buffer_xml_printf): New functions.
14382 * server.h (struct buffer): New.
14383 (buffer_grow_str, buffer_grow_str0): New macros.
14384 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14385 (buffer_xml_printf): Declare.
14387 2008-11-24 Doug Evans <dje@google.com>
14389 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14391 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14393 * server.c (handle_v_run): Always use the supplied argument list.
14395 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14397 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14398 (xtensa_regmap_table): Add entry for scompare1.
14400 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14402 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14403 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14404 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14405 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14406 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14407 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14408 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14409 XML target descriptions.
14410 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14411 when inferior is running on an ISA 2.05 or later processor. Add
14412 special case to return offset for full 64-bit slot of FPSCR when
14415 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14417 * Makefile.in (SFILES, clean): Added sparc64 files.
14418 (reg-sparc64.o, reg-sparc64.c): New.
14419 * configure.srv (sparc*-*-linux*): New configuration.
14420 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14421 syscall arguments for SPARC.
14422 (regsets_store_inferior_registers): Likewise.
14423 * linux-sparc-low.c: New file.
14425 2008-10-21 Doug Evans <dje@google.com>
14427 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14428 (READLINE_DIR,READLINE_DEP): Delete.
14429 (INTERNAL_CFLAGS): Update.
14430 (LINTFLAGS): Update.
14432 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14434 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14435 whole argv from the last run, not just argv[0].
14437 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14439 * regcache.c (new_register_cache): Return NULL if the register
14440 cache size isn't known yet.
14441 (free_register_cache): Avoid dereferencing a NULL regcache.
14443 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14445 * configure.srv: Merge MIPS and MIPS64.
14447 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14449 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14451 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14453 * Makefile.in: Add required vsx dependencies.
14455 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14456 Declare init_registers_powerpc_vsx32l.
14457 Declare init_registers_powerpc_vsx64l.
14458 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14459 (ppc_arch_setup): Check for VSX in hwcap.
14460 (ppc_fill_vsxregset): New function.
14461 (ppc_store_vsxregset): New function.
14462 Add new VSX entry in regset_info target_regsets.
14464 * configure.srv: Add new VSX dependencies.
14466 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14468 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14469 (remote_open): Set or clear transport_is_reliable.
14470 (putpkt_binary): Don't expect acks in noack mode.
14471 (getpkt): Don't send ack/nac in noack mode.
14472 * server.c (handle_general_set): Handle QStartNoAckMode.
14473 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14475 (main): Reset noack_mode on every connection.
14476 * server.h (noack_mode): Declare.
14478 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14480 * Makefile.in (GDBREPLAY_OBS): New variable.
14481 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14483 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14484 Daniel Jacobowitz <dan@codesourcery.com>
14486 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14487 (usr_store_inferior_registers): Likewise.
14488 (regsets_store_inferior_registers): Likewise.
14490 2008-07-31 Rolf Jansen <rj@surtec.com>
14491 Pedro Alves <pedro@codesourcery.com>
14493 * configure.ac: Check for memmem declaration.
14494 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14495 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14496 (disable_packet_qfThreadInfo): Unconditionally compile.
14497 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14498 * configure, config.in: Regenerate.
14500 2008-07-28 Doug Kwan <dougkwan@google.com>
14502 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14503 (linux_write_memory): Remove declaration of errno.
14505 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14507 * linux-low.c (handle_extended_wait): Do not use "status"
14508 variable uninitialized.
14510 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14512 * server.c (handle_v_attach): Inhibit reporting dll changes.
14514 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14516 * remote-utils.c (prepare_resume_reply): If requested, don't
14517 output "thread:TID" in the T stop reply.
14519 * server.c (disable_packet_vCont, disable_packet_Tthread)
14520 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14521 (handle_query): If requested, disable support for qC, qfThreadInfo
14523 (handle_v_requests): If requested, disable support for vCont.
14524 (gdbserver_show_disableable): New.
14525 (main): Handle --disable-packet and --disable-packet=LIST.
14527 * server.h (disable_packet_vCont, disable_packet_Tthread)
14528 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14530 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14532 * server.c (gdbserver_usage): Mention --version.
14534 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14536 * Makefile.in (gdbreplay.o): New rule.
14538 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14540 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14541 message, not gdbserver.
14543 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14544 Nathan Sidwell <nathan@codesourcery.com>
14545 Joseph Myers <joseph@codesourcery.com>
14547 * acinclude.m4: Include ../../config/acx.m4.
14548 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14549 * configure, config.in: Regenerate.
14550 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14551 * server.c (gdbserver_version): Print PKGVERSION.
14552 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14553 (main): Adjust gdbserver_usage calls.
14554 * gdbreplay.c (version, host_name): Add declarations.
14555 (gdbreplay_version, gdbreplay_usage): New.
14556 (main): Accept --version and --help options.
14558 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14560 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14561 (arm_breakpoint_at): Handle Thumb.
14562 (the_low_target): Add comment.
14564 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14566 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14568 2008-05-09 Doug Evans <dje@google.com>
14570 * server.h (decode_search_memory_packet): Declare.
14571 * remote-utils.c (decode_search_memory_packet): New fn.
14572 * server.c (handle_search_memory_1): New fn.
14573 (handle_search_memory): New fn.
14574 (handle_query): Process qSearch:memory packets.
14576 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14578 * regcache.c (registers_length): Remove.
14579 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14580 full register packet.
14581 * regcache.h (registers_length): Remove prototype.
14582 * server.h (PBUFSIZ): Define to 16384.
14584 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14586 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14587 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14588 powerpc-64l.o, and powerpc-altivec64l.o.
14589 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14590 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14591 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14592 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14593 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14596 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14597 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14598 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14599 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14600 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14601 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14602 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14603 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14604 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14605 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14608 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14609 (init_registers_powerpc_32l): ... this new prototype.
14610 (init_registers_powerpc_32): Remove, replace by ...
14611 (init_registers_powerpc_altivec32l): ... this new prototype.
14612 (init_registers_powerpc_e500): Remove, replace by ...
14613 (init_registers_powerpc_e500l): ... this new prototype.
14614 (init_registers_ppc64): Remove, replace by ...
14615 (init_registers_powerpc_64l): ... this new prototype.
14616 (init_registers_powerpc_64): Remove, replace by ...
14617 (init_registers_powerpc_altivec64l): ... this new prototype.
14618 (ppc_num_regs): Set to 73.
14619 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14620 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14621 (ppc_cannot_store_register): Handle orig_r3 and trap.
14622 (ppc_arch_setup): Update init_registers_... calls.
14623 (ppc_fill_gregset): Handle orig_r3 and trap.
14625 * inferiors.c (clear_inferiors): Reset current_inferior.
14627 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14629 * acinclude.m4: Add override.m4.
14630 * configure: Regenerate.
14632 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14634 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14635 initial call to init_register_ppc64.
14637 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14639 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14640 single powerpc*-*-linux* case.
14641 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14643 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14645 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14646 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14648 * linux-ppc-low.c: Include <elf.h>.
14649 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14650 (ppc_hwcap): New global variable.
14651 (ppc_regmap): Remove __SPE__ #ifdef sections.
14652 (ppc_regmap_e500): New global variable.
14653 (ppc_cannot_store_register): Update __SPE__ special case.
14654 (ppc_get_hwcap): New function.
14655 (ppc_arch_setup): Use it to determine whether inferior supports
14656 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14657 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14658 Do not access registers if target does not support AltiVec.
14659 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14660 Do not access registers if target does not support SPE.
14661 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14663 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14665 * linux-low.c (disabled_regsets, num_regsets): New.
14666 (use_regsets_p): Delete.
14667 (linux_wait_for_process): Clear disabled_regsets.
14668 (regsets_fetch_inferior_registers): Check and set it.
14669 (regsets_store_inferior_registers): Likewise.
14670 (linux_fetch_registers, linux_store_registers): Do not use
14672 (initialize_low): Allocate disabled_regsets.
14674 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14676 * Makefile.in (LIBOBJS): New.
14677 (OBS): Use LIBOBJS.
14678 (memmem.o): New rule.
14679 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14680 * configure: Regenerated.
14682 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14684 * server.c (handle_query): Never return "unsupported" for
14685 qXfer:features:read queries.
14687 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14689 * server.c (get_features_xml): Fix inverted condition.
14690 (handle_query): Always support qXfer:feature:read.
14692 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14694 * server.c (wrapper_argv): New.
14695 (start_inferior): Handle wrapper_argv. If set, expect an extra
14697 (gdbserver_usage): Document --wrapper.
14698 (main): Parse --wrapper.
14700 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14702 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14703 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14704 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14705 (ppc_set_pc): Likewise.
14706 (ppc_arch_setup): New function.
14707 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14708 of collect_register.
14709 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14711 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14713 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14714 instead of linux-ppc64-low.o.
14715 * linux-ppc64-low.c: Remove file.
14716 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14717 (linux-ppc64-low.o): Remove rule.
14719 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14720 (init_registers_powerpc_64): Likewise.
14721 (ppc_regmap): Conditionally define depending on __powerpc64__.
14722 (ppc_cannot_store_register): Do not special-case "fpscr" when
14723 compiled on __powerpc64__.
14724 (ppc_collect_ptrace_register): New function.
14725 (ppc_supply_ptrace_register): New function.
14726 (ppc_breakpoint): Change type to "unsigned int".
14727 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14728 (the_low_target): Conditionally provide initializers for the
14729 arch_setup member depending on __powerpc64__. Install
14730 collect_ptrace_register and supply_ptrace_register members.
14732 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14734 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14735 * server.c (gdbserver_xmltarget): Define.
14736 (get_features_xml): Use it to replace "target.xml" and arch_string.
14738 * configure.srv: Remove srv_xmltarget. Add XML files that were
14739 mentioned there to srv_xmlfiles instead. Remove conditional tests
14740 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14741 srv_xmlfiles and srv_regobj to include all possible choices.
14742 * configure.ac (srv_xmltarget): Remove.
14743 (srv_xmlfiles): Do not add "target.xml".
14744 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14745 checks for supplementary target information.
14746 * configure: Regenerate.
14747 * Makefile.in (XML_TARGET): Remove.
14748 (target.xml): Remove rule.
14749 (clean): Do not clean up target.xml.
14750 (.PRECIOUS): Do not mention target.xml.
14752 * target.h (struct target_ops): Remove arch_string member.
14753 * linux-low.c (linux_arch_string): Remove.
14754 (linux_target_ops): Remove arch_string initializer.
14755 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14756 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14757 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14758 * spu-low.c (spu_arch_string): Remove.
14759 (spu_target_ops): Remove arch_string initializer.
14760 * win32-low.c (win32_arch_string): Remove.
14761 (win32_target_ops): Remove arch_string initializer.
14762 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14763 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14764 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14766 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14768 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14769 by collect_ptrace_register and supply_ptrace_register hooks.
14770 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14771 instead of checking for the_low_target.left_pad_xfer.
14772 (usr_store_inferior_registers): Use collect_ptrace_register callback
14773 instead of checking for the_low_target.left_pad_xfer.
14775 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14776 (s390_supply_ptrace_register): Likewise.
14777 (s390_fill_gregset): Call s390_collect_ptrace_register.
14778 (the_low_target): Update.
14780 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14781 (ppc_supply_ptrace_register): Likewise.
14782 (the_low_target): Update.
14784 * linux-i386-low.c (the_low_target): Update.
14785 * linux-x86-64-low.c (the_low_target): Update.
14787 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14789 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14790 reg-s390.o and reg-s390x.o.
14792 * linux-low.c (new_inferior): New global variable.
14793 (linux_create_inferior, linux_attach): Set it.
14794 (linux_wait_for_process): Call the_low_target.arch_setup after the
14795 target has stopped for the first time.
14796 (initialize_low): Do not call the_low_target.arch_setup.
14798 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14799 (s390_set_pc): Likewise.
14800 (s390_arch_setup): New function.
14801 (the_low_target): Use s390_arch_setup as arch_setup routine.
14803 * regcache.c (realloc_register_cache): New function.
14804 (set_register_cache): Call it for each existing regcache.
14806 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14808 * server.h (init_registers): Remove prototype.
14810 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14811 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14812 instead of init_registers ().
14813 * linux-arm-low.c (init_registers_arm): Add prototype.
14814 (init_registers_arm_with_iwmmxt): Likewise.
14815 (the_low_target): Add initializer for arch_setup field.
14816 * linux-cris-low.c (init_registers_cris): Add prototype.
14817 (the_low_target): Add initializer for arch_setup field.
14818 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14819 (the_low_target): Add initializer for arch_setup field.
14820 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14821 (the_low_target): Add initializer for arch_setup field.
14822 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14823 (the_low_target): Add initializer for arch_setup field.
14824 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14825 (the_low_target): Add initializer for arch_setup field.
14826 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14827 (the_low_target): Add initializer for arch_setup field.
14828 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14829 (init_registers_mips64_linux): Likewise.
14830 (the_low_target): Add initializer for arch_setup field.
14831 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14832 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14833 (the_low_target): Add initializer for arch_setup field.
14834 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14835 (init_registers_powerpc_64): Likewise.
14836 (the_low_target): Add initializer for arch_setup field.
14837 * linux-s390-low.c (init_registers_s390): Add prototype.
14838 (init_registers_s390x): Likewise.
14839 (the_low_target): Add initializer for arch_setup field.
14840 * linux-sh-low.c (init_registers_sh): Add prototype.
14841 (the_low_target): Add initializer for arch_setup field.
14842 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14843 (the_low_target): Add initializer for arch_setup field.
14844 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14845 (the_low_target): Add initializer for arch_setup field.
14847 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14848 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14849 instead of init_registers ().
14850 * win32-arm-low.c (init_registers_arm): Add prototype.
14851 (the_low_target): Add initializer for arch_setup field.
14852 * win32-i386-low.c (init_registers_i386): Add prototype.
14853 (the_low_target): Add initializer for arch_setup field.
14855 * spu-low.c (init_registers_spu): Add prototype.
14856 (initialize_low): Call initialie_registers_spu () instead of
14857 initialize_registers ().
14859 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14861 * server.c (handle_v_requests): When handling the vRun and vAttach
14862 packets, if already debugging a process, don't kill it. Return an
14865 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14867 * server.c (handle_query): Correct length check.
14869 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14871 * win32-low.c (do_initial_child_stuff): Add process handle
14872 parameter. Set current_process_handle and current_process_id from the
14873 parameters. Clear globals.
14874 (win32_create_inferior): Don't set current_process_handle and
14875 current_process_id here. Instead pass them on the call to
14876 do_initial_child_stuff.
14877 (win32_attach): Likewise.
14878 (win32_clear_inferiors): New.
14879 (win32_kill): Don't close the current process handle or the
14880 current thread handle here. Instead call win32_clear_inferiors.
14881 (win32_detach): Don't open a new handle to the process. Call
14882 win32_clear_inferiors.
14883 (win32_join): Don't rely on current_process_handle; open a new
14884 handle using the process id.
14885 (win32_wait): Call win32_clear_inferiors when the inferior process
14888 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14890 * server.c (monitor_show_help): Add "exit".
14892 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14894 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14895 (clean): Add reg-xtensa.c.
14896 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14897 * configure.srv (xtensa*-*-linux*) New target.
14898 * linux-xtensa-low.c: New.
14899 * xtensa-xtregs.c: New.
14901 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14903 * hostio.c: Don't include errno.h.
14904 (errno_to_fileio_errno): Move to hostio-errno.
14905 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14906 error number outputting to the target->hostio_last_error callback.
14907 (hostio_packet_error): Use FILEIO_EINVAL directly.
14908 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14909 calls to hostio_error.
14910 * hostio-errno.c: New.
14911 * server.h (hostio_last_error_from_errno): Declare.
14912 * target.h (target_ops): Add hostio_last_error member.
14913 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14914 as hostio_last_error handler.
14915 * spu-low.c (spu_target_ops): Likewise.
14916 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14917 (wince_hostio_last_error): New functions.
14918 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14919 as hostio_last_error handler.
14920 (win32_target_ops) [!_WIN32_WCE]: Register
14921 hostio_last_error_from_errno as hostio_last_error handler.
14922 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14923 (hostio-errno.o): New rule.
14924 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14925 * configure.srv (srv_hostio_err_objs): New variable. Default to
14927 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14928 * configure: Regenerate.
14930 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14932 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14933 (linux_kill, linux_detach): Clean up the process list.
14934 * remote-utils.c (remote_open): Improve port number parsing.
14935 (putpkt_binary, input_interrupt): Only send interrupts if the target
14937 * server.c (extended_protocol): Make static.
14938 (attached): Define earlier.
14939 (exit_requested, response_needed, program_argv): New variables.
14940 (target_running): New.
14941 (start_inferior): Clear attached here.
14942 (attach_inferior): Set attached here.
14943 (require_running): Define.
14944 (handle_query): Use require_running and target_running. Implement
14946 (handle_v_attach, handle_v_run): New.
14947 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14948 (gdbserver_usage): Update.
14949 (main): Redo argument parsing. Handle --debug and --multi. Handle
14950 --attach along with other options or after the port. Save
14951 program_argv. Support no initial program. Resynchronize
14952 communication with GDB after an error. Handle "monitor exit".
14953 Use require_running and target_running. Always allow the extended
14954 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14955 restart in extended mode.
14956 * README: Refer to the GDB manual. Update --attach usage.
14958 2007-12-20 Andreas Schwab <schwab@suse.de>
14960 * linux-low.c (STACK_SIZE): Define.
14961 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14962 (linux_test_for_tracefork): Likewise.
14964 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14966 * linux-low.c (linux_wait_for_event): Update messages. Do not
14967 reinsert auto-delete breakpoints.
14968 * mem-break.c (struct breakpoint): Change return type of handler to
14970 (set_breakpoint_at): Update handler type.
14971 (reinsert_breakpoint_handler): Return 1 instead of calling
14973 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14975 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14976 * mem-break.h (set_breakpoint_at): Update handler type.
14977 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14978 * win32-low.c (auto_delete_breakpoint): New.
14979 (get_child_debug_event): Use it.
14981 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14983 * configure.ac: Check for pread and pwrite.
14984 * hostio.c (handle_pread): Fall back to lseek and read.
14985 (handle_pwrite): Fall back to lseek and write.
14986 * config.in, configure: Regenerated.
14988 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14990 * server.c (myresume): Add own_buf argument.
14991 (main): Update calls.
14993 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14995 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14996 * remote-utils.c (remote_open): Do not call disable_async_io.
14997 (block_async_io): Delete.
14998 (unblock_async_io): Make static.
14999 (initialize_async_io): New.
15000 * server.c (handle_v_cont): Handle async I/O here.
15001 (myresume): Likewise. Move other common resume tasks here...
15002 (main): ... from here. Call initialize_async_io. Disable async
15003 I/O before the main loop.
15004 * server.h (initialize_async_io): Declare.
15005 (block_async_io, unblock_async_io): Delete prototypes.
15006 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15008 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15010 * remote-utils.c (readchar): Allow binary data in received messages.
15012 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15014 * win32-low.c (attaching): New global.
15015 (win32_create_inferior): Clear the `attaching' global.
15016 (win32_attach): Set the `attaching' global.
15017 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15018 attaching. Only set a breakpoint at the entry point if not
15021 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15023 * server.c (main): Don't report dll events on the initial
15024 connection on attaches.
15026 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15028 * server.c (main): Relax numerical bases supported for the pid of
15029 the --attach command line argument.
15031 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15033 * win32-low.c (win32_attach): Call OpenProcess before
15034 DebugActiveProcess, not after. Add last error output to error
15037 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15039 * win32-low.c (win32_get_thread_context)
15040 (win32_set_thread_context): New functions.
15041 (thread_rec): Use win32_get_thread_context.
15042 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15043 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15046 2007-12-03 Leo Zayas
15047 Pedro Alves <pedro_alves@portugalmail.pt>
15049 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15051 (child_add_thread): Minor cleanup.
15052 (child_continue): Resume artificially suspended threads before
15053 calling ContinueDebugEvent.
15054 (suspend_one_thread): New.
15055 (fake_breakpoint_event): New.
15056 (get_child_debug_event): Change return type to int. Check here if
15057 gdb sent an interrupt request. If a soft interrupt was requested,
15058 fake a breakpoint event. Return 0 if there is no event to handle,
15060 (win32_wait): Don't check here if gdb sent an interrupt request.
15061 Ensure there is a valid event to handle.
15062 (win32_request_interrupt): Add soft interruption method as last
15065 2007-12-03 Leo Zayas
15066 Pedro Alves <pedro_alves@portugalmail.pt>
15068 * win32-low.h (win32_thread_info): Add descriptions to the
15069 structure members. Replace `suspend_count' counter by a
15071 * win32-low.c (thread_rec): Update condition of when to get the
15072 context from the inferior. Rely on ContextFlags being set if it
15073 has already been retrieved. Only suspend the inferior thread if
15074 we haven't already. Warn if that fails.
15075 (continue_one_thread): s/suspend_count/suspended/. Only call
15076 ResumeThread once. Warn if that fails.
15078 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15080 * win32-low.c (win32_wait): Don't read from the inferior when it
15081 has already exited.
15083 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15085 * Makefile.in (win32_low_h): New variable.
15086 (win32-low.o): Add dependency on $(win32_low_h).
15087 (win32-arm-low.o, win32-i386-low.o): New rules.
15089 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15091 * hostio.c: Correct copyright year.
15093 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15095 * Makefile.in (OBS): Add hostio.o.
15096 (hostio.o): New rule.
15097 * server.h (handle_vFile): Declare.
15098 * hostio.c: New file.
15099 * server.c (handle_v_requests): Take packet_len and new_packet_len
15100 for binary packets. Call handle_vFile.
15101 (main): Update call to handle_v_requests.
15103 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15105 * linux-low.c: Include <sched.h>.
15107 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15109 * linux-low.c (linux_tracefork_grandchild): New.
15110 (linux_tracefork_child): Use clone.
15111 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15113 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15115 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15117 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15119 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15121 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15123 * inferiors.c (change_inferior_id): Delete.
15124 (add_pid_to_list, pull_pid_from_list): New.
15125 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15126 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15127 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15128 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15129 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15130 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15131 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15132 (using_threads): Always set to 1.
15133 (handle_extended_wait): New.
15134 (add_process): Do not set TID.
15135 (linux_create_inferior): Set must_set_ptrace_flags.
15136 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15137 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15138 (linux_thread_alive): Rename TID argument to LWPID.
15139 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15140 (linux_wait_for_event): Do not use TID or check using_threads. Update
15141 call to dead_thread_notify. Call handle_extended_wait.
15142 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15143 (send_sigstop): Delete sigstop_sent.
15144 (wait_for_sigstop): Avoid TID.
15145 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15146 (linux_test_for_tracefork): New.
15147 (linux_lookup_signals): Use thread_db_active and
15148 linux_supports_tracefork_flag.
15149 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15150 * linux-low.h (get_process_thread): Avoid TID.
15151 (struct process_ifo): Move thread_known and tid to the end. Remove
15153 (linux_attach_lwp, thread_db_init): Update prototypes.
15154 * server.h (change_inferior_id): Delete prototype.
15155 (add_pid_to_list, pull_pid_from_list): New prototypes.
15156 * thread-db.c (thread_db_use_events): New.
15157 (find_first_thread): Rename to...
15158 (find_one_thread): ...this. Update callers and messages. Do not
15159 call fatal. Check thread_db_use_events. Do not call
15160 change_inferior_id or new_thread_notify.
15161 (maybe_attach_thread): Update. Do not call new_thread_notify.
15162 (thread_db_init): Set thread_db_use_events. Check use_events.
15163 * utils.c (fatal, warning): Correct message prefix.
15165 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15167 * Makefile.in (clean): Remove new files.
15168 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15169 (powerpc-64.o, powerpc-64.c): New rules.
15170 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15171 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15173 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15175 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15176 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15177 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15178 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15179 (target_regsets): Add AltiVec and SPE register sets.
15180 * configure.ac: Check for AltiVec and SPE.
15181 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15182 (ppc_fill_vrregset, ppc_store_vrregset): New.
15183 (target_regsets): Add AltiVec register set.
15184 * configure: Regenerated.
15186 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15188 * linux-low.c (O_LARGEFILE): Define.
15189 (linux_read_memory): Use /proc/PID/mem.
15190 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15191 * configure, config.in: Regenerated.
15193 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15195 * linux-low.c (linux_wait_for_event): Do not pass signals while
15198 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15200 * win32-low.c (create_process): New.
15201 (win32_create_inferior): Use create_process instead of
15202 CreateProcess. If create_process failed retry appending an ".exe"
15203 suffix. Store the GetLastError result immediatelly after
15204 create_process calls and use it on the call to error.
15206 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15208 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15210 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15212 * configure.ac: Switch license to GPLv3.
15214 2007-08-01 Michael Snyder <msnyder@access-company.com>
15216 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15218 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15220 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15222 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15223 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15224 CloseToolhelp32Snapshot.
15225 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15226 CloseToolhelp32Snapshot.
15228 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15230 * server.c (main): Check for inferior exit before main loop.
15232 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15234 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15235 instead of on tmp_desc.
15237 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15238 Daniel Jacobowitz <dan@codesourcery.com>
15240 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15241 (add_thread): Minor cleanups.
15242 (clear_inferiors): Move lower in the file. Clear the DLL
15244 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15245 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15246 (xml_escape_text): New.
15247 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15249 (handle_v_cont): Report errors.
15250 (gdbserver_version): Update.
15251 (main): Correct size of own_buf. Do not report initial DLL events.
15252 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15253 (unloaded_dll, xml_escape_text): New.
15254 * win32-low.c (enum target_waitkind): Update comments.
15255 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15256 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15257 (win32_EnumProcessModules, win32_GetModuleInformation)
15258 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15259 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15260 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15261 (win32_Module32First, win32_Module32Next, load_toolhelp)
15262 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15263 (get_child_debug_event): Handle DLL events.
15264 (win32_wait): Likewise.
15266 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15268 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15269 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15271 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15273 * win32-low.c (handle_output_debug_string): Ignore event if not
15276 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15278 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15280 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15282 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15284 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15286 * inferiors.c (change_inferior_id): Add comment.
15287 * linux-low.c (check_removed_breakpoint): Add an early
15288 prototype. Improve debug output.
15289 (linux_attach): Doc update.
15290 (linux_detach_one_process, linux_detach): Clean up before releasing
15292 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15293 * linux-low.h (struct process_info): Doc improvement.
15294 * mem-break.c (delete_all_breakpoints): New.
15295 * mem-break.h (delete_all_breakpoints): New prototype.
15296 * thread-db.c (find_first_thread): New.
15297 (thread_db_create_event): Call it instead of
15298 thread_db_find_new_threads. Clean up unused variables.
15299 (maybe_attach_thread): Remove first thread handling.
15300 (thread_db_find_new_threads): Use find_first_thread.
15301 (thread_db_get_tls_address): Likewise.
15303 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15305 * thread-db.c (thread_db_find_new_threads): Add prototype.
15306 (thread_db_create_event): Check for the main thread before adding
15308 (maybe_attach_thread): Only enable event reporting if TID == 0.
15309 (thread_db_get_tls_address): Check for new threads.
15311 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15313 * linux-low.c (linux_create_inferior): Try execv before execvp.
15314 * spu-low.c (spu_create_inferior): Likewise.
15316 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15318 * linux-low.c (linux_create_inferior): Change execv to execvp.
15319 * spu-low.c (spu_create_inferior): Likewies.
15321 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15323 * Makefile.in (clean): Clean new files instead of deleted ones.
15324 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15325 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15327 * configure.srv: Specify XML files and new regformats for MIPS and
15329 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15330 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15331 an entry for the restart register.
15332 (mips_cannot_fetch_register, mips_cannot_store_register)
15333 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15334 register names to match the XML descriptions.
15335 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15336 restart register instead of $0.
15338 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15339 Markus Deuling <deuling@de.ibm.com>
15341 * remote-utils.c (decode_xfer_write): New function.
15342 * server.h (decode_xfer_write): Add prototype.
15343 * server.c (handle_query): Add PACKET_LEN argument. Support
15344 qXfer:spu:read and qXfer:spu:write packets.
15345 (main): Pass packet_len to handle_query.
15346 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15347 * target.h (target_ops): Add qxfer_spu.
15349 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15351 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15352 accessing non-seekable spufs files.
15354 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15356 * server.c (handle_query): Add reply for qC packet.
15358 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15359 Leo Zayas <lerele@champenstudios@com>
15361 * server.h (check_remote_input_interrupt_request): New function.
15362 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15363 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15364 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15365 (check_remote_input_interrupt_request): New function.
15366 * server.h (check_remote_input_interrupt_request): Declare.
15367 * win32-low.c (winapi_DebugBreakProcess,
15368 winapi_GenerateConsoleCtrlEvent): New typedefs.
15369 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15371 (win32_wait): Check for remote interrupt request
15372 with check_remote_input_interrupt_request.
15373 (win32_request_interrupt): New function.
15374 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15376 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15378 * win32-low.c (debug_registers_changed,
15379 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15380 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15381 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15382 (thread_rec): Get context using the low target.
15383 (child_add_thread): Call thread_added on the low target,
15384 which does the same thing.
15386 (do_initial_child_stuff): Remove debug registers references.
15387 Set context using the low target. Resume threads after
15388 setting the contexts.
15389 (child_continue): Remove dead variable. Remove debug
15390 registers references.
15391 (child_fetch_inferior_registers): Go through the low target.
15392 (do_child_store_inferior_registers): Remove.
15393 (child_store_inferior_registers): Go through the low target.
15394 (win32_resume): Remove debug registers references.
15395 Set context using the low target.
15396 (handle_exception): Change return type to void. Don't record
15397 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15398 first chance exception.
15399 (get_child_debug_event): Change return type to void. Remove
15400 goto loop. Always return after waiting for debug event.
15401 (win32_wait): Convert to switch statement. Handle spurious
15404 * win32-i386-low.c (debug_registers_changed,
15405 debug_registers_used): New.
15406 (initial_stuff): Rename to ...
15407 (i386_initial_stuff): ... this. Clear debug registers
15409 (store_debug_registers): Delete.
15410 (i386_get_thread_context): New.
15411 (load_debug_registers): Delete.
15412 (i386_set_thread_context): New.
15413 (i386_thread_added): New.
15414 (single_step): Rename to ...
15415 (i386_single_step): ... this.
15416 (do_fetch_inferior_registers): Rename to ...
15417 (i386_fetch_inferior_register): ... this.
15418 (i386_store_inferior_register): New.
15419 (the_low_target): Adapt to new interface.
15421 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15422 (arm_get_thread_context): New.
15423 (arm_set_thread_context): New.
15425 (do_fetch_inferior_registers): Rename to ...
15426 (arm_fetch_inferior_register): ... this.
15427 (arm_store_inferior_register): New.
15428 (arm_wince_breakpoint): Reimplement as unsigned long.
15429 (arm_wince_breakpoint_len): Define.
15430 (the_low_target): Adapt to new interface.
15432 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15433 load_debug_registers. Add get_thread_context, set_thread_context,
15434 thread_added and store_inferior_register. Rename
15435 fetch_inferior_registers to fetch_inferior_register.
15436 (regptr): Remove declaration.
15438 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15440 * linux-low.c (linux_detach): Change return type to int. Return 0.
15441 * spu-low.c (spu_detach): Likewise.
15443 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15445 * target.h (target_ops): Change return type of detach to int.
15447 (join_inferior): New.
15448 * server.c (main): Don't skip detach support on mingw32.
15449 If the inferior doesn't support detaching return error.
15450 Call join_inferior instead of using waitpid.
15451 * linux-low.c (linux_join): New.
15452 (linux_target_op): Add linux_join.
15453 * spu-low.c (spu_join): New.
15454 (spu_target_ops): Add spu_join.
15455 * win32-low.c (win32_detach): Adapt to new interface.
15456 Reopen current_process_handle before detaching. Issue a child
15457 resume before detaching.
15459 (win32_target_op): Add win32_join.
15461 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15463 * win32-low.c (win32-attach): Fix return value.
15464 * target.h (target_ops): Describe ATTACH return values.
15466 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15468 * win32-low.c (GETPROCADDRESS): Define.
15469 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15470 (winapi_DebugSetProcessKillOnExit): Likewise.
15471 (win32_create_inferior): Force usage of ansi CreateProcessA.
15472 (win32_attach): Use GETPROCADDRESS.
15473 (win32_detach): Likewise.
15475 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15477 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15479 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15481 * win32-low.c: Commit leftover changes from 2007-03-29.
15483 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15485 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15486 fields short instead of int. Add explicit padding.
15487 (i387_cache_to_fsave): Remove unnecessary casts.
15488 (i387_fsave_to_cache): Doc fix.
15489 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15491 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15493 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15494 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15496 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15498 * configure.srv (arm*-*-mingw32ce*): Move near the other
15501 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15503 * configure.ac: Add errno checking.
15504 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15505 sys/file.h and malloc.h.
15506 (AC_CHECK_DECLS): Add perror.
15507 (srv_mingwce): Handle.
15508 * configure.srv (i[34567]86-*-cygwin*): Add
15509 win32-i386-low.o to srv_tgtobj.
15510 (i[34567]86-*-mingw*): Likewise.
15511 (arm*-*-mingw32ce*): Add case.
15512 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15513 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15514 [__MINGW32CE__] (strerror): New function.
15515 [__MINGW32CE__] (errno): Define to GetLastError.
15516 [__MINGW32CE__] (COUNTOF): New macro.
15517 (remote_open): Remove extra close call.
15518 * mem-break.c (delete_breakpoint_at): New function.
15519 * mem-break.h (delete_breakpoint_at): Declare.
15520 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15521 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15522 [USE_WIN32API] (read, write): Add char* casts.
15523 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15524 * server.h: Include wincecompat.h on Windows CE.
15525 [HAVE_ERRNO_H]: Check.
15526 (perror): Declare if not declared.
15527 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15528 (perror_with_name): Remove errno declaration.
15529 * wincecompat.h: New.
15530 * wincecompat.c: New.
15531 * win32-low.h: New.
15532 * win32-arm-low.c: New.
15533 * win32-i386-low.c: New.
15534 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15535 (OUTMSG2): Make it safe.
15537 (COUNTOF): New macro.
15538 (NUM_REGS): Get it from the low target.
15539 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15540 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15541 (thread_rec): Let low target handle debug registers.
15542 (child_add_thread): Likewise.
15543 (child_init_thread_list): Likewise.
15544 (continue_one_thread): Likewise.
15546 (do_child_fetch_inferior_registers): Move to ...
15547 * win32-i386-low.c: ... here, and rename to ...
15548 (do_fetch_inferior_registers): ... this.
15549 * win32-low.c (child_fetch_inferior_registers):
15550 Go through the low target.
15551 (do_child_store_inferior_registers): Use regptr.
15552 (strwinerror): New function.
15553 (win32_create_inferior): Handle Windows CE.
15554 Use strwinerror instead of strerror on Windows error
15555 codes. Add program to the error output.
15556 Don't close the main thread handle on Windows CE.
15557 (win32_attach): Use coredll.dll on Windows CE.
15558 (win32_kill): Close current process and current
15560 (win32_detach): Use coredll.dll on Windows CE.
15561 (win32_resume): Let low target handle debug registers, and
15563 (handle_exception): Add/Remove initial breakpoint. Avoid
15564 non-existant WSTOPSIG on Windows CE.
15565 (win32_read_inferior_memory): Cast to remove warning.
15566 (win32_arch_string): Go through the low target.
15567 (initialize_low): Call set_breakpoint_data with the low
15568 target's breakpoint.
15569 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15570 FOP_REGNUM, mappings): Move to ...
15571 * win32-i386-low.c: ... here.
15572 * win32-low.c (win32_thread_info): Move to ...
15573 * win32-low.h: ... here.
15574 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15575 win32-arm-low.c and wincecompat.c.
15576 (all:): Add $EXEEXT.
15577 (install-only:): Likewise.
15578 (gdbserver:): Likewise.
15579 (gdbreplay:): Likewise.
15580 * config.in: Regenerate.
15581 * configure: Regenerate.
15583 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15585 * win32-low.c: Rename typedef thread_info to
15586 win32_thread_info throughout.
15588 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15590 * win32-i386-low.c: Rename to ...
15591 * win32-low.c: ... this.
15592 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15593 * Makefile.in: Likewise.
15595 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15597 * remote-utils.c (monitor_output): Constify msg parameter.
15598 * server.h (monitor_output): Likewise.
15599 * win32-i386-low.c (handle_output_debug_string): New.
15600 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15601 handle_output_debug_string.
15602 (get_child_debug_event): Likewise.
15604 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15606 * server.c (main): Correct strtoul check.
15608 2007-03-27 Jon Ringle <jon@ringle.org>
15610 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15612 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15614 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15616 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15618 * terminal.h: Check HAVE_SGTTY_H.
15620 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15622 * remote-utils.c (remote_open): Print out the assigned port number.
15624 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15626 * remote-utils.c (monitor_output): New function.
15627 * server.c (debug_threads): Define here.
15628 (monitor_show_help): New function.
15629 (handle_query): Handle qRcmd.
15630 (main): Do not handle 'd' packet.
15631 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15632 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15635 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15637 * Makefile.in (EXEEXT): New.
15638 (clean): Use $(EXEEXT).
15640 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15642 * target.h (target_ops): Rename send_signal to request_interrupt,
15643 and remove enum target_signal parameter.
15644 * linux-low.c (linux_request_interrupt): Rename from
15645 linux_send_signal, and always send SIGINT.
15646 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15647 and always send SIGINT.
15648 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15650 (input_interrupt): Likewise.
15652 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15654 * server.c (get_features_xml): Check if target implemented
15656 * win32-i386-low.c (win32_arch_string): New.
15657 (win32_target_ops): Add win32_arch_string as arch_string member.
15659 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15661 * spu-low.c (spu_arch_string): New.
15662 (spu_target_ops): Add spu_arch_string.
15664 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15666 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15667 * configure.ac: Do not check for terminal.h.
15668 * configure, config.in: Regenerated.
15670 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15672 * Makefile.in (OBS): Add $(XML_BUILTIN).
15673 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15675 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15676 (arm-with-iwmmxt.c): New.
15677 * config.in, configure: Regenerate.
15678 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15679 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15680 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15681 (arm*-*-linux*): Add iWMMXt and regset support.
15682 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15683 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15684 (arm_store_wmmxregset, target_regsets): New.
15685 * server.c (get_features_xml): Take annex argument. Check builtin
15687 (handle_query): Handle multiple annexes.
15689 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15691 * remote-utils.c [USE_WIN32API] (read, write): Define.
15692 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15695 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15697 * linux-i386-low.c (the_low_target): Set arch_string.
15698 * linux-x86-64-low.c (the_low_target): Likewise.
15699 * linux-low.c (linux_arch_string): New.
15700 (linux_target_ops): Add it.
15701 * linux-low.h (struct linux_target_ops): Add arch_string.
15702 * server.c (write_qxfer_response): Use const void * for DATA.
15703 (get_features_xml): New.
15704 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15705 * target.h (struct target_ops): Add arch_string method.
15707 2007-01-03 Denis Pilat <denis.pilat@st.com>
15708 Daniel Jacobowitz <dan@codesourcery.com>
15710 * linux-low.c (linux_kill): Handle being called with no threads.
15711 * win32-i386-low.c (win32_kill): Likewise.
15712 (get_child_debug_event): Clear current_process_handle.
15714 2006-12-30 Denis PILAT <denis.pilat@st.com>
15715 Daniel Jacobowitz <dan@codesourcery.com>
15717 * remote-utils.c (remote_open): Check the type of specified
15718 serial port devices before opening them.
15719 * server.c (main): Kill the inferior if an error occurs during
15720 the first remote_open.
15722 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15724 * README: Update supported targets.
15726 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15728 * Makefile.in (clean): Remove reg-mips64.c.
15729 (reg-mips64.c, reg-mips64.o): New rules.
15730 * configure.srv: Handle mips64. Include regset support for mips.
15731 * linux-mips-low.c (union mips_register): New.
15732 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15733 (mips_breakpoint, mips_breakpoint_at): Use int.
15734 (mips_collect_register, mips_supply_register)
15735 (mips_collect_register_32bit, mips_supply_register_32bit)
15736 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15737 (mips_store_fpregset, target_regsets): New.
15738 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15740 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15742 * configure.srv: Add target "spu*-*-*".
15743 * Makefile.in (clean): Remove reg-spu.c.
15744 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15745 * spu-low.c: New file.
15747 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15749 * configure.ac: Correct td_thr_tls_get_addr test.
15750 * configure: Regenerated.
15752 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15754 * linux-low.c (linux_wait_for_event): Reformat. Use the
15755 pass_signals array.
15756 * remote-utils.c (decode_address_to_semicolon): New.
15757 * server.c (pass_signals, handle_general_set): New.
15758 (handle_query): Mention QPassSignals for qSupported.
15759 (main): Call handle_general_set.
15760 * server.h (pass_signals, decode_address_to_semicolon): New.
15762 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15764 * server.c (handle_query): Correct error handling for read_auxv.
15766 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15768 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15769 and srv_linux_thread_db to yes.
15770 * linux-s390-low.c (s390_fill_gregset): New function.
15771 (target_regsets): Define data structure.
15773 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15775 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15776 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15777 * config.in, configure: Regenerated.
15778 * inferiors.c (gdb_id_to_thread): New function.
15779 (gdb_id_to_thread_id): Use it.
15780 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15781 * linux-low.h (struct process_info): Add th member.
15782 (thread_db_get_tls_address): New prototype.
15783 * remote-utils.c (decode_address): Make non-static.
15784 * server.c (handle_query): Handle qGetTLSAddr.
15785 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15786 * target.h (struct target_ops): Add get_tls_address.
15787 * thread-db.c (maybe_attach_thread): Save the thread handle.
15788 (thread_db_get_tls_address): New.
15790 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15792 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15793 (linux_resume_one_process): Take a siginfo_t *. Update all
15794 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15795 (struct pending_signals): Add a siginfo_t.
15796 (linux_wait_for_process): Always set last_status.
15797 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15798 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15799 * linux-low.h (struct process_info): Add last_status.
15801 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15803 * remote-utils.c (try_rle): New function.
15804 (putpkt_binary): Use it.
15806 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15808 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15809 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15810 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15811 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15812 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15815 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15817 * server.c (terminal_fd): New variable.
15818 (old_foreground_pgrp): Likewise.
15819 (restore_old_foreground_pgrp): New function.
15820 (start_inferior): Record the terminal file descriptor in terminal_fd
15821 and its original foreground group in old_foreground_pgrp. Register
15822 restore_old_foreground_pgrp with atexit().
15824 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15826 * server.c (handle_query): Correct qPart to qXfer.
15828 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15830 * configure.ac: Check for more headers which are missing on
15831 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15832 * configure.srv: Add Cygwin and mingw32.
15833 * remote-utils.c: Don't include headers unconditionally which
15834 are missing on mingw32. Include <winsock.h> for mingw32.
15835 (remote_open): Adjust for mingw32 support. Flush
15836 standard error after writing to it.
15837 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15838 (unblock_async_io, enable_async_io, disable_async_io)
15839 (readchar, getpkt): Update for Winsock support.
15840 (prepare_resume_reply): Expect a protocol signal number.
15841 * server.c: Disable <sys/wait.h> on mingw32.
15842 (start_inferior): Adjust for mingw32 support. Flush
15843 standard error after writing to it.
15844 (attach_inferior): Likewise. Use protocol signal
15846 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15848 * win32-i386-low.c: New file.
15849 * Makefile.in (XM_CLIBS): Set.
15850 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15851 (win32-i386-low.o): New dependency rule.
15852 * linux-low.c (linux_wait): Use target signal numbers.
15853 * target.h (struct target_ops): Doc fix.
15854 * server.h (target_signal_to_name): New prototype.
15855 * gdbreplay.c: Don't include headers unconditionally which
15856 are missing on mingw32. Include <winsock.h> for mingw32.
15857 (remote_close, remote_open): Adjust for Winsock support.
15858 * configure, config.in: Regenerated.
15860 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15862 * server.c (decode_xfer_read, write_qxfer_response): New.
15863 (handle_query): Take a packet length argument. Handle
15864 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15865 the qSupported response.
15866 (main): Update call to handle_query.
15868 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15870 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15871 (putpkt_binary): Renamed from putpkt and adjusted for binary
15873 (putpkt): New wrapper for putpkt_binary.
15874 (readchar): Don't mask off the high bit.
15875 (decode_X_packet): New function.
15876 * server.c (main): Call putpkt_binary if a handler sets the packet
15877 length. Save the length of the incoming packet. Handle 'X'.
15878 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15880 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15882 * server.c (handle_query): Handle qSupported.
15884 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15886 * remote-utils.c (all_symbols_looked_up): New variable.
15887 (look_up_one_symbol): Check it.
15888 * server.h (look_up_one_symbol): New declaration.
15889 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15891 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15893 * Makefile.in (linux-arm-low.o): Update dependencies.
15894 * linux-arm-low.c: Include "gdb_proc_service.h".
15895 (PTRACE_GET_THREAD_AREA): Define.
15896 (ps_get_thread_area): New function.
15898 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15900 * configure.srv (m68k*-*-uclinux*): New target.
15901 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15902 (linux_resume_one_process): Remove extraneous cast.
15903 (linux_read_offsets): New.
15904 (linux_target_op): Add linux_read_offsets on mmuless systems.
15905 * server.c (handle_query): Add qOffsets logic.
15906 * target.h (struct target_ops): Add read_offsets.
15908 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15910 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15911 (PTRACE_GET_THREAD_AREA): Define.
15912 (ps_get_thread_area): New function.
15913 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15914 (linux-x86-64-low.o): Update.
15916 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15918 * configure.ac: Remove checks for prfpregset_t.
15919 * gdb_proc_service.h: New file.
15920 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15921 new "gdb_proc_service.h".
15922 * proc-service.c: Likewise.
15923 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15924 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15925 * Makefile.in (gdb_proc_service_h): Updated.
15926 * configure, config.in: Regenerated.
15928 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15930 * remote-utils.c (prepare_resume_reply): Move declaration
15931 of gdb_id_from_wait to the top of the block.
15933 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15935 * linux-low.c (regsets_store_inferior_registers): Read the regset
15936 from the target before filling it.
15938 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15940 * server.c (attach_inferior): Return SIGTRAP for a successful
15943 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15945 * Makefile.in (OBS): Add version.o.
15946 (STAGESTUFF): Delete.
15947 (version.o): Add dependencies.
15948 (version.c): Replace rule.
15949 (clean): Remove version.c.
15950 * server.c (gdbserver_version): New.
15951 (gdbserver_usage): Use printf.
15952 (main): Handle --version and --help.
15953 * server.h (version, host_name): Add declarations.
15955 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15967 * linux-x86-64-low.c:
15969 * linux-s390-low.c:
15970 * linux-ppc64-low.c:
15972 * linux-mips-low.c:
15973 * linux-m68k-low.c:
15974 * linux-m32r-low.c:
15977 * linux-ia64-low.c:
15978 * linux-i386-low.c:
15979 * linux-crisv32-low.c:
15991 * gdbserver.1: Add (C) after Copyright. Update the FSF
15994 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15996 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15997 (arm_breakpoint_at): Recognize both breakpoints.
15998 (the_low_target): Use the correct breakpoint instruction.
16000 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16002 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16003 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16004 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16005 (the_low_target): Update.
16007 2005-10-25 Andreas Schwab <schwab@suse.de>
16009 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16011 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16012 (ia64_num_regs): Reduce to 462.
16014 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16016 * acinclude.m4: Correct quoting.
16017 * aclocal.m4: Regenerated.
16019 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16020 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16021 (thread_db_init): Call thread_db_err_str.
16022 * configure.ac: Check for TD_VERSION.
16023 * config.in, configure: Regenerated.
16025 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16027 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16029 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16031 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16032 is not available. Define HAVE_PTRACE_GETREGS if it is.
16033 * config.in, configure: Regenerated.
16034 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16035 * linux-i386-low.c, linux-m68k-low.c: Update to use
16036 HAVE_PTRACE_GETREGS.
16037 * linux-low.c (regsets_fetch_inferior_registers)
16038 (regsets_store_inferior_registers): Only return 0 if we processed
16040 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16041 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16043 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16045 * inferiors.c (struct thread_info): Add gdb_id.
16046 (add_thread): Add gdb_id argument.
16047 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16048 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16049 calls to add_thread.
16050 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16051 * server.c (handle_query): Use thread_to_gdb_id.
16052 (handle_v_cont, main): Use gdb_id_to_thread_id.
16053 * server.h (add_thread): Update prototype.
16054 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16057 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16059 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16060 left-padded registers.
16061 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16062 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16064 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16066 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16067 * configure: Regenerate.
16068 * config.in: Regenerate.
16069 * server.h (NEED_DECLARATION_STRERROR):
16070 Replace with !HAVE_DECL_STRERROR.
16072 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16074 * linux-low.c (linux_wait, linux_send_signal): Don't test
16075 an unsigned long variable for > 0 if it could be MAX_ULONG.
16076 * server.c (myresume): Likewise.
16077 * target.c (set_desired_inferior): Likewise.
16079 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16081 * configure.ac: Simplify and improve check for socklen_t.
16082 * configure, config.in: Regenerate.
16084 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16086 * acconfig.h: Remove.
16087 * configure.ac: Add a test for socklen_t. Use three-argument
16088 AC_DEFINE throughout.
16089 * config.in: Regenerated using autoheader 2.59.
16090 * configure: Regenerated.
16092 * gdbreplay.c (socklen_t): Provide a default.
16093 (remote_open): Use socklen_t.
16094 * remote-utils.c (socklen_t): Provide a default.
16095 (remote_open): Use socklen_t.
16096 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16099 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16101 * linux-low.c (linux_read_memory, linux_write_memory)
16102 (linux_read_auxv): Likewise.
16103 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16104 (check_mem_write): Likewise.
16105 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16107 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16108 (registers_from_string, register_data): Likewise.
16109 * server.c (handle_query, main): Likewise.
16110 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16111 (decode_M_packet): Likewise.
16112 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16113 * target.h (struct target_ops): Update read_memory, write_memory,
16115 (read_inferior_memory, write_inferior_memory): Update.
16116 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16117 to unsigned char *.
16118 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16119 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16120 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16121 linux-s390-low.c, linux-sh-low.c: Update for changes in
16122 read_inferior_memory and the_low_target->breakpoint.
16124 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16126 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16127 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16128 * configure.srv: Add powerpc64-*-linux*.
16129 * linux-ppc64-low.c: New file.
16131 2005-05-23 Orjan Friberg <orjanf@axis.com>
16133 * linux-cris-low.c: New file with support for CRIS.
16134 * linux-crisv32-low.c: Ditto for CRISv32.
16135 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16136 (clean): Add reg-cris.c and reg-crisv32.c.
16137 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16138 reg-crisv32.o, and reg-crisv32.c to make rules.
16139 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16140 recognized targets.
16142 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16144 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16145 of sizeof (PTRACE_XFER_TYPE).
16146 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16148 2005-05-12 Orjan Friberg <orjanf@axis.com>
16150 * target.h (struct target_ops): Add insert_watchpoint,
16151 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16152 pointers for hardware watchpoint support.
16153 * linux-low.h (struct linux_target_ops): Ditto.
16154 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16155 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16156 to linux_target_ops.
16157 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16159 * server.c (main): Recognize 'Z' and 'z' packets.
16161 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16163 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16164 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16165 (the_low_target): Add new members.
16167 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16169 * proc-service.c (ps_lgetregs): Search all_processes instead of
16172 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16174 * server.c (start_inferior): Change return type to int.
16175 (attach_inferior): Change sigptr to int *.
16176 (handle_v_cont, handle_v_requests): Change signal to int *.
16177 (main): Change signal to int.
16179 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16181 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16182 * configure.srv: Add m32r*-*-linux*.
16183 * linux-m32r-low.c: New file.
16185 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16187 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16189 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16191 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16192 Take unsigned long arguments for PIDs.
16193 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16194 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16195 (wait_for_sigstop, linux_resume_one_process)
16196 (regsets_fetch_inferior_registers, linux_send_signal)
16197 (linux_read_auxv): Likewise. Update the types of variables holding
16198 PIDs. Update format string specifiers.
16199 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16200 * remote-utils.c (prepare_resume_reply): Likewise.
16201 * server.c (cont_thread, general_thread, step_thread)
16202 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16204 (handle_query): Update format specifiers.
16205 (handle_v_cont, main): Use strtoul for thread IDs.
16206 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16207 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16208 (general_thread, step_thread, thread_from_wait)
16209 (old_thread_from_wait): Update.
16210 * target.h (struct thread_resume): Use unsigned long for THREAD.
16211 (struct target_ops): Use unsigned long for arguments to attach and
16214 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16216 * acinclude.m4: Include bfd/bfd.m4 directly.
16217 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16218 <agriffis@toolchain.org>.
16219 * aclocal.m4, configure: Regenerated.
16221 2005-01-07 Andrew Cagney <cagney@gnu.org>
16223 * configure.ac: Rename configure.in, require autoconf 2.59.
16224 * configure: Re-generate.
16226 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16228 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16229 LIBS when finished.
16230 * aclocal.m4: Regenerated.
16231 * configure: Regenerated.
16233 2004-11-21 Andreas Schwab <schwab@suse.de>
16235 * linux-m68k-low.c (m68k_num_gregs): Define.
16236 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16237 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16238 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16239 (m68k_breakpoint_at): New. Add to the_low_target.
16241 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16242 srv_linux_thread_db to yes.
16244 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16246 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16247 (ARCH_SET_FS): Likewise.
16248 (ARCH_GET_FS): Likewise.
16249 (ARCH_GET_GS): Likewise.
16251 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16253 * linux-i386-low.c (ps_get_thread_area): New.
16254 * linux-x86-64-low.c (ps_get_thread_area): New.
16255 * linux-low.c: Include <sys/syscall.h>.
16256 (linux_kill_one_process): Don't kill the first thread here.
16257 (linux_kill): Kill the first thread here.
16258 (kill_lwp): New function.
16259 (send_sigstop, linux_send_signal): Use it.
16260 * proc-service.c: Clean up #ifdefs.
16261 (fpregset_info): Delete.
16262 (ps_lgetregs): Update and enable implementation.
16263 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16265 * remote-utils.c (struct sym_cache, symbol_cache): New.
16266 (input_interrupt): Print a clearer message.
16267 (async_io_enabled): New variable.
16268 (enable_async_io, disable_async_io): Use it. Update comments.
16269 (look_up_one_symbol): Use the symbol cache.
16270 * thread-db.c (thread_db_look_up_symbols): New function.
16271 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16273 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16275 * configure.in: Test for -rdynamic.
16276 * configure: Regenerated.
16277 * Makefile (INTERNAL_LDFLAGS): New.
16278 (gdbserver, gdbreplay): Use it.
16280 2004-09-02 Andrew Cagney <cagney@gnu.org>
16282 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16284 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16286 * linux-low.c (linux_wait): Clear all_processes list also.
16288 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16290 * linux-low.c: Include <errno.h>. Remove extern declaration of
16293 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16295 * gdbreplay.c, server.h, utils.c: Update copyright years.
16297 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16299 * server.c (main): Print child status or termination signal from
16300 variable 'signal', not 'sig'.
16302 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16304 * linux-low.c (linux_read_memory): Change return type to
16305 int. Check for and return error from ptrace().
16306 * target.c (read_inferior_memory): Change return type to int. Pass
16307 back return status from the_target->read_memory().
16308 * target.h (struct target_ops): Adapt *read_memory() prototype.
16310 (read_inferior_memory): Adapt prototype.
16311 * server.c (main): Return an error packet if
16312 read_inferior_memory() returns an error.
16314 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16316 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16317 Unify with other clean targets.
16319 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16321 * server.c (handle_v_cont): Call set_desired_inferior.
16323 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16325 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16327 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16329 * linux-low.c (linux_wait): Unblock async I/O.
16330 (linux_resume): Block and enable async I/O.
16331 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16332 * server.h (block_async_io, unblock_async_io): Add prototypes.
16334 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16336 * remote-utils.c (remote_open): Print a status notice after
16337 opening a TCP port.
16338 * server.c (attach_inferior): Print a status notice after
16341 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16343 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16345 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16347 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16349 * server.c, target.h: Update copyright years.
16351 2004-02-25 Roland McGrath <roland@redhat.com>
16353 * target.h (struct target_ops): New member `read_auxv'.
16354 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16355 * linux-low.c (linux_read_auxv): New function.
16356 (linux_target_ops): Initialize `read_auxv' member to that.
16358 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16360 Committed by Jim Blandy <jimb@redhat.com>.
16362 * linux-s390-low.c (s390_num_regs): Update.
16363 (s390_regmap): Remove control registers. Use __s390x__ predefine
16364 instead of GPR_SIZE to distiguish s390 and s390x targets.
16366 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16368 * linux-low.c: Update copyright year.
16369 (check_removed_breakpoint): Clear pending_is_breakpoint.
16370 (linux_set_resume_request, linux_queue_one_thread)
16371 (resume_status_pending_p): New functions.
16372 (linux_continue_one_thread): Use process->resume.
16373 (linux_resume): Only resume threads if there are no pending events.
16374 * linux-low.h (struct process_info): Add resume request
16377 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16379 * regcache.c (new_register_cache): Clear the allocated register
16380 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16382 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16384 * linux-low.c (linux_resume): Take a struct thread_resume *
16386 (linux_wait): Update call.
16387 (resume_ptr): New static variable.
16388 (linux_continue_one_thread): Renamed from
16389 linux_continue_one_process. Use resume_ptr.
16390 (linux_resume): Use linux_continue_one_thread.
16391 * server.c (handle_v_cont, handle_v_requests): New functions.
16392 (myresume): New function.
16393 (main): Handle 'v' case.
16394 * target.h (struct thread_resume): New type.
16395 (struct target_ops): Change argument of "resume" to struct
16397 (myresume): Delete macro.
16399 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16401 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16402 (uninstall): Support DESTDIR.
16404 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16406 * configure.srv: Add xscale*linux copy of arm*linux entry.
16408 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16410 * linux-arm-low.c (arm_reinsert_addr): New function.
16411 (the_low_target): Add arm_reinsert_addr.
16413 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16415 * mem-break.c: Remove whitespace at end of file.
16417 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16419 * configure.in: Check whether we need to prototype strerror.
16420 * server.h: Optionally prototype strerror.
16421 * gdbreplay.c (perror_with_name): Use strerror.
16422 * linux-low.c (linux_attach_lwp): Use strerror.
16423 * utils.c (perror_with_name): Use strerror.
16424 * config.in, configure: Regenerated.
16426 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16428 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16429 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16431 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16433 * Makefile.in (SFILES): Update.
16434 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16435 low-sun3.c: Remove files.
16437 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16439 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16440 (linux_detach_one_process, linux_detach): New functions.
16441 (linux_target_ops): Add linux_detach.
16442 * server.c (main): Handle 'D' packet.
16443 * target.h (struct target_ops): Add "detach" member.
16444 (detach_inferior): Define.
16446 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16448 From Kelley Cook <kelleycook@wideopenwest.com>:
16449 * configure.srv: Accept i[34567]86 variants.
16451 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16453 * linux-low.c (linux_wait_for_event): Correct comment typos.
16454 (linux_resume_one_process): Call check_removed_breakpoint.
16455 (linux_send_signal): New function.
16456 (linux_target_ops): Add linux_send_signal.
16457 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16459 * target.h (struct target_ops): Add send_signal.
16461 2003-05-29 Jim Blandy <jimb@redhat.com>
16463 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16464 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16465 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16466 away part of the register's value.
16468 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16470 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16471 (linux_wait_for_event, linux_init_signals): Likewise.
16473 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16475 * configure.in: Check for stdlib.h.
16476 * configure: Regenerated.
16477 * config.in: Regenerated.
16479 2003-01-04 Andreas Schwab <schwab@suse.de>
16481 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16483 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16485 * Makefile.in: Remove obsolete code.
16487 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16489 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16490 defined(PT_FPR0_HI).
16492 2002-11-17 Stuart Hughes <seh@zee2.com>
16494 * linux-arm-low.c (arm_num_regs): Increase.
16495 (arm_regmap): Include status register.
16497 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16499 * linux-low.c (register_addr): Remove incorrect -1 check.
16501 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16503 * linux-low.c (linux_create_inferior): Call setpgid. Return
16505 (unstopped_p, linux_signal_pid): Remove.
16506 (linux_target_ops): Remove linux_signal_pid.
16507 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16508 global instead of target method.
16509 * target.h (struct target_ops): Remove signal_pid. Update comment
16510 for create_inferior.
16511 * server.c (signal_pid): New variable.
16512 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16513 gdbserver. Set the child to be the foreground process group.
16514 (attach_inferior): Set signal_pid.
16516 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16518 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16520 2002-08-20 Jim Blandy <jimb@redhat.com>
16522 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16525 2002-08-01 Andrew Cagney <cagney@redhat.com>
16527 * Makefile.in: Make chill references obsolete.
16529 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16531 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16532 * configure: Regenerate.
16533 * config.in: Regenerate.
16535 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16537 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16538 (perror_with_name, remote_close, remote_open, expect, play): Static.
16540 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16542 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16543 byte offsets instead of an array of indexes.
16544 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16546 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16548 * regcache.c: Add comment.
16550 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16552 * thread-db.c: New file.
16553 * proc-service.c: New file.
16554 * acinclude.m4: New file.
16555 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16556 proc-service.o, and thread-db.o.
16557 (linux-low.o): Add USE_THREAD_DB.
16558 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16559 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16560 * aclocal.m4: Regenerated.
16561 * config.in: Regenerated.
16562 * configure: Regenerated.
16563 * configure.in: Check for proc_service.h, sys/procfs.h,
16564 thread_db.h, and linux/elf.h headrs.
16565 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16566 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16567 Check for -lthread_db and thread support.
16568 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16569 PowerPC, and SuperH.
16570 * i387-fp.c: Constify arguments.
16571 * i387-fp.h: Likewise.
16572 * inferiors.c: (struct thread_info): Renamed from
16573 `struct inferior_info'. Remove PID member. Use generic inferior
16574 list header. All uses updated.
16575 (inferiors, signal_pid): Removed.
16576 (all_threads): New variable.
16577 (get_thread): Define.
16578 (add_inferior_to_list): New function.
16579 (for_each_inferior): New function.
16580 (change_inferior_id): New function.
16581 (add_inferior): Removed.
16582 (remove_inferior): New function.
16583 (add_thread): New function.
16584 (free_one_thread): New function.
16585 (remove_thread): New function.
16586 (clear_inferiors): Use for_each_inferior and free_one_thread.
16587 (find_inferior): New function.
16588 (find_inferior_id): New function.
16589 (inferior_target_data): Update argument type.
16590 (set_inferior_target_data): Likewise.
16591 (inferior_regcache_data): Likewise.
16592 (set_inferior_regcache_data): Likewise.
16593 * linux-low.c (linux_bp_reinsert): Remove.
16594 (all_processes, stopping_threads, using_thrads)
16595 (struct pending_signals, debug_threads, pid_of): New.
16596 (inferior_pid): Replace with macro.
16597 (struct inferior_linux_data): Remove.
16598 (get_stop_pc, add_process): New functions.
16599 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16600 Use add_process and add_thread.
16601 (linux_attach_lwp): New function, based on old linux_attach. Use
16602 add_process and add_thread. Set stop_expected for new threads.
16603 (linux_attach): New function.
16604 (linux_kill_one_process): New function.
16605 (linux_kill): Kill all LWPs.
16606 (linux_thread_alive): Use find_inferior_id.
16607 (check_removed_breakpoints, status_pending_p): New functions.
16608 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16609 Update. Use WNOHANG. Wait for cloned processes also. Update process
16610 struct for the found process.
16611 (linux_wait_for_event): New function.
16612 (linux_wait): Use it. Support LWPs.
16613 (send_sigstop, wait_for_sigstop, stop_all_processes)
16614 (linux_resume_one_process, linux_continue_one_process): New functions.
16615 (linux_resume): Support LWPs.
16616 (REGISTER_RAW_SIZE): Remove.
16617 (fetch_register): Use register_size instead. Call supply_register.
16618 (usr_store_inferior_registers): Likewise. Call collect_register.
16619 Fix recursive case.
16620 (regsets_fetch_inferior_registers): Improve error message.
16621 (regsets_store_inferior_registers): Add debugging.
16622 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16623 (unstopped_p, linux_signal_pid): New functions.
16624 (linux_target_ops): Add linux_signal_pid.
16625 (linux_init_signals): New function.
16626 (initialize_low): Call it. Initialize using_threads.
16627 * regcache.c (inferior_regcache_data): Add valid
16629 (get_regcache): Fetch registers lazily. Add fetch argument
16630 and update all callers.
16631 (regcache_invalidate_one, regcache_invalidate): New
16633 (new_register_cache): Renamed from create_register_cache.
16634 Return the new regcache.
16635 (free_register_cache): Change argument to a void *.
16636 (registers_to_string, registers_from_string): Call get_regcache
16637 with fetch flag set.
16638 (register_data): Make static. Pass fetch flag to get_regcache.
16639 (supply_register): Call get_regcache with fetch flag clear.
16640 (collect_register): Call get_regcache with fetch flag set.
16641 (collect_register_as_string): New function.
16642 * regcache.h: Update.
16643 * remote-utils.c (putpkt): Flush after debug output and use
16645 Handle input interrupts while waiting for an ACK.
16646 (input_interrupt): Use signal_pid method.
16647 (getpkt): Flush after debug output and use stderr.
16648 (outreg): Use collect_register_as_string.
16649 (new_thread_notify, dead_thread_notify): New functions.
16650 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16651 and general_thread.
16652 (look_up_one_symbol): Flush after debug output.
16653 * server.c (step_thread, server_waiting): New variables.
16654 (start_inferior): Don't use signal_pid. Update call to mywait.
16655 (attach_inferior): Update call to mywait.
16656 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16657 (main): Don't fetch/store registers explicitly. Use
16658 set_desired_inferior. Support proposed ``Hs'' packet. Update
16660 * server.h: Update.
16661 (struct inferior_list, struct_inferior_list_entry): New.
16662 * target.c (set_desired_inferior): New.
16663 (write_inferior_memory): Constify.
16664 (mywait): New function.
16665 * target.h: Update.
16666 (struct target_ops): New signal_pid method.
16667 (mywait): Removed macro, added prototype.
16669 * linux-low.h (regset_func): Removed.
16670 (regset_fill_func, regset_store_func): New.
16671 (enum regset_type): New.
16672 (struct regset_info): Add type field. Use new operation types.
16673 (struct linux_target_ops): stop_pc renamed to get_pc.
16674 Add decr_pc_after_break and breakpoint_at.
16675 (get_process, get_thread_proess, get_process_thread)
16676 (strut process_info, all_processes, linux_attach_lwp)
16677 (thread_db_init): New.
16679 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16680 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16681 (the_low_target): Add new members.
16682 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16683 (i386_store_fpxregset): Constify.
16684 (target_regsets): Add new kind identifier.
16685 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16686 (i386_set_pc): Add debugging.
16687 (i386_breakpoint_at): New function.
16688 (the_low_target): Add new members.
16689 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16690 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16691 (mips_breakpoint_at): New.
16692 (the_low_target): Add new members.
16693 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16694 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16695 (the_low_target): Add new members.
16696 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16697 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16698 (the_low_target): Add new members.
16699 * linux-x86-64-low.c (target_regsets): Add new kind
16702 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16704 From Martin Pool <mbp@samba.org>:
16705 * server.c (gdbserver_usage): New function.
16708 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16710 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16711 stop_at -> stop_pc.
16713 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16715 * Makefile.in: Remove obsolete code.
16717 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16719 * linux-low.c (regsets_fetch_inferior_registers),
16720 (regsets_store_inferior_registers): Removed cast to int from
16722 * regcache.h: Added declaration of struct inferior_info.
16724 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16726 * inferiors.c (struct inferior_info): Add regcache_data.
16727 (add_inferior): Call create_register_cache.
16728 (clear_inferiors): Call free_register_cache.
16729 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16730 * regcache.c (struct inferior_regcache_data): New.
16731 (registers): Remove.
16732 (get_regcache): New function.
16733 (create_register_cache, free_register_cache): New functions.
16734 (set_register_cache): Don't initialize the register cache here.
16735 (registers_to_string, registers_from_string, register_data): Call
16737 * regcache.h: Add prototypes.
16738 * server.h: Likewise.
16740 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16742 * mem-break.c: New file.
16743 * mem-break.h: New file.
16744 * Makefile.in: Add mem-break.o rule; update server.h
16746 * inferiors.c (struct inferior_info): Add target_data
16748 (clear_inferiors): Free target_data member if set.
16749 (inferior_target_data, set_inferior_target_data): New functions.
16750 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16751 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16752 * linux-low.c (linux_bp_reinsert): New variable.
16753 (struct inferior_linux_data): New.
16754 (linux_create_inferior): Use set_inferior_target_data.
16755 (linux_attach): Likewise. Call add_inferior.
16756 (linux_wait_for_one_inferior): New function.
16757 (linux_wait): Call it.
16758 (linux_write_memory): Add const.
16759 (initialize_low): Call set_breakpoint_data.
16760 * linux-low.h (struct linux_target_ops): Add breakpoint
16762 * server.c (attach_inferior): Remove extra add_inferior
16764 * server.h: Include mem-break.h. Update inferior.c
16766 * target.c (read_inferior_memory)
16767 (write_inferior_memory): New functions.
16768 * target.h (read_inferior_memory)
16769 (write_inferior_memory): Change macros to prototypes.
16770 (struct target_ops): Update comments. Add const to write_memory
16773 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16775 * linux-low.c (usr_store_inferior_registers): Support
16776 registers which are allowed to fail to store.
16777 * linux-low.h (linux_target_ops): Likewise.
16778 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16779 (ppc_cannot_store_register): FPSCR may not be storable.
16781 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16783 * server.h: Include <string.h> if HAVE_STRING_H.
16784 * ChangeLog: Correct paths in last ChangeLog entry.
16786 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16788 * linux-low.h: Remove obsolete prototypes.
16789 (struct linux_target_ops): New.
16790 (extern the_low_target): New.
16791 * linux-low.c (num_regs, regmap): Remove declarations.
16792 (register_addr): Use the_low_target explicitly.
16793 (fetch_register): Likewise.
16794 (usr_fetch_inferior_registers): Likewise.
16795 (usr_store_inferior_registers): Likewise.
16796 * linux-arm-low.c (num_regs): Remove.
16797 (arm_num_regs): Define.
16798 (arm_regmap): Renamed from regmap, made static.
16799 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16801 (arm_cannot_store_register): Renamed from cannot_store_register,
16803 (the_low_target): New.
16804 * linux-i386-low.c (num_regs): Remove.
16805 (i386_num_regs): Define.
16806 (i386_regmap): Renamed from regmap, made static.
16807 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16809 (i386_cannot_store_register): Renamed from cannot_store_register,
16811 (the_low_target): New.
16812 * linux-ia64-low.c (num_regs): Remove.
16813 (ia64_num_regs): Define.
16814 (ia64_regmap): Renamed from regmap, made static.
16815 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16817 (ia64_cannot_store_register): Renamed from cannot_store_register,
16819 (the_low_target): New.
16820 * linux-m68k-low.c (num_regs): Remove.
16821 (m68k_num_regs): Define.
16822 (m68k_regmap): Renamed from regmap, made static.
16823 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16825 (m68k_cannot_store_register): Renamed from cannot_store_register,
16827 (the_low_target): New.
16828 * linux-mips-low.c (num_regs): Remove.
16829 (mips_num_regs): Define.
16830 (mips_regmap): Renamed from regmap, made static.
16831 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16833 (mips_cannot_store_register): Renamed from cannot_store_register,
16835 (the_low_target): New.
16836 * linux-ppc-low.c (num_regs): Remove.
16837 (ppc_num_regs): Define.
16838 (ppc_regmap): Renamed from regmap, made static.
16839 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16841 (ppc_cannot_store_register): Renamed from cannot_store_register,
16843 (the_low_target): New.
16844 * linux-s390-low.c (num_regs): Remove.
16845 (s390_num_regs): Define.
16846 (s390_regmap): Renamed from regmap, made static.
16847 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16849 (s390_cannot_store_register): Renamed from cannot_store_register,
16851 (the_low_target): New.
16852 * linux-sh-low.c (num_regs): Remove.
16853 (sh_num_regs): Define.
16854 (sh_regmap): Renamed from regmap, made static.
16855 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16857 (sh_cannot_store_register): Renamed from cannot_store_register,
16859 (the_low_target): New.
16860 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16861 (the_low_target): New.
16863 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16865 * Makefile.in: Add stamp-h target.
16866 * configure.in: Create stamp-h.
16867 * configure: Regenerated.
16869 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16871 * inferiors.c: New file.
16872 * target.c: New file.
16873 * target.h: New file.
16874 * Makefile.in: Add target.o and inferiors.o. Update
16876 * linux-low.c (inferior_pid): New static variable,
16877 moved from server.c.
16878 (linux_create_inferior): Renamed from create_inferior.
16879 Call add_inferior. Return 0 on success instead of a PID.
16880 (linux_attach): Renamed from myattach.
16881 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16882 (linux_thread_alive): Renamed from mythread_alive.
16883 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16885 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16886 (regsets_store_inferior_registers): Correct error message.
16887 Add missing ``return 0''.
16888 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16889 (linux_store_registers): Renamed from store_inferior_registers.
16890 (linux_read_memory): Renamed from read_inferior_memory.
16891 (linux_write_memory): Renamed from write_inferior_memory.
16892 (linux_target_ops): New structure.
16893 (initialize_low): Call set_target_ops ().
16894 * remote-utils.c (unhexify): New function.
16895 (hexify): New function.
16896 (input_interrupt): Send signals to ``signal_pid''.
16897 * server.c (inferior_pid): Remove.
16898 (start_inferior): Update create_inferior call.
16899 (attach_inferior): Call add_inferior.
16900 (handle_query): New function.
16901 (main): Call handle_query for `q' packets.
16902 * server.h: Include "target.h". Remove obsolete prototypes.
16903 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16905 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16907 * Makefile.in: Add WARN_CFLAGS. Update configury
16909 * configure.in: Check for <string.h>
16910 * configure: Regenerate.
16911 * config.in: Regenerate.
16912 * gdbreplay.c: Include needed system headers.
16913 (remote_open): Remove strchr prototype.
16914 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16915 * regcache.c (supply_register): Change buf argument to const void *.
16916 (supply_register_by_name): Likewise.
16917 (collect_register): Change buf argument to void *.
16918 (collect_register_by_name): Likewise.
16919 * regcache.h: Add missing prototypes.
16920 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16921 * server.c (handle_query): New function.
16922 (attached): New static variable, moved out of main.
16923 (main): Quiet longjmp clobber warnings.
16924 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16925 * utils.c (error): Remove NORETURN.