1 2018-07-13 Pedro Alves <palves@redhat.com>
3 * linux-low.c (linux_kill): Change parameter to process_info
4 pointer instead of pid. Adjust.
5 * lynx-low.c (lynx_kill): Likewise.
6 * nto-low.c (nto_kill): Likewise.
7 * spu-low.c (spu_kill): Likewise.
8 * win32-low.c (win32_kill): Likewise.
9 * server.c (handle_v_kill, kill_inferior_callback)
10 (detach_or_kill_for_exit): Adjust.
11 * target.c (kill_inferior): Change parameter to process_info
12 pointer instead of pid. Adjust.
13 * target.h (struct target_ops) <kill>: Change parameter to
14 process_info pointer instead of pid. Adjust all implementations
16 (kill_inferior): Likewise.
18 2018-07-13 Pedro Alves <palves@redhat.com>
20 * linux-low.c (linux_detach, linux_join): Change parameter to
21 process_info pointer instead of pid. Adjust.
22 * lynx-low.c (lynx_detach, lynx_join): Likewise.
23 * nto-low.c (nto_detach): Likewise.
24 * spu-low.c (spu_detach, spu_join): Likewise.
25 * win32-low.c (win32_detach, win32_join): Likewise.
26 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
27 * target.h (struct target_ops) <detach, join>: Change parameter to
28 process_info pointer instead of pid. Adjust all implementations
30 (detach_inferior, join_inferior): Rename 'pid' parameter to
33 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
34 Jan Kratochvil <jan.kratochvil@redhat.com>
35 Paul Fertser <fercerpav@gmail.com>
36 Tsutomu Seki <sekiriki@gmail.com>
38 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
39 (OBS): Add 'common/netstuff.o'.
40 (GDBREPLAY_OBS): Likewise.
41 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
42 (remote_open): Implement support for IPv6
44 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
46 (handle_accept_event): Accept connections from IPv6 sources.
47 (remote_prepare): Handle IPv6-style hostnames; implement
48 support for IPv6 connections.
49 (remote_open): Implement support for printing connections from
52 2018-07-11 Pedro Alves <palves@redhat.com>
55 * mem-break.c (any_persistent_commands): Add process_info
56 parameter and use it instead of relying on the current process.
57 Change return type to bool.
58 * mem-break.h (any_persistent_commands): Add process_info
59 parameter and change return type to bool.
60 * server.c (handle_detach): Remove require_running_or_return call.
61 Look up the process_info for the process we're about to detach.
62 If not found, return back error to GDB. Adjust
63 any_persistent_commands call to pass down a process pointer.
65 2018-07-11 Pedro Alves <palves@redhat.com>
67 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
68 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
69 instead of collect_register_by_name.
70 * regcache.c (regcache_raw_get_unsigned_by_name): New.
71 * regcache.h (regcache_raw_get_unsigned_by_name): New.
73 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
74 Pedro Alves <palves@redhat.com>
76 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
78 2018-07-03 Tom Tromey <tom@tromey.com>
80 * linux-low.c: Update.
82 * mem-break.c: Update.
84 * remote-utils.c: Update.
88 * win32-low.c: Update.
90 2018-07-03 Tom Tromey <tom@tromey.com>
94 2018-07-03 Tom Tromey <tom@tromey.com>
96 * linux-low.c: Update.
98 2018-07-03 Tom Tromey <tom@tromey.com>
102 2018-07-03 Tom Tromey <tom@tromey.com>
104 * linux-low.c: Update.
105 * linux-mips-low.c: Update.
106 * lynx-low.c: Update.
108 * remote-utils.c: Update.
112 * thread-db.c: Update.
114 2018-07-03 Tom Tromey <tom@tromey.com>
116 * linux-low.c: Update.
117 * linux-mips-low.c: Update.
118 * lynx-low.c: Update.
119 * mem-break.c: Update.
121 * remote-utils.c: Update.
125 * tracepoint.c: Update.
127 2018-07-03 Tom Tromey <tom@tromey.com>
129 * linux-low.c: Update.
130 * linux-ppc-low.c: Update.
131 * linux-x86-low.c: Update.
132 * proc-service.c: Update.
135 * thread-db.c: Update.
136 * win32-low.c: Update.
138 2018-07-03 Tom Tromey <tom@tromey.com>
140 * linux-low.c: Update.
141 * lynx-low.c: Update.
143 * remote-utils.c: Update.
145 * thread-db.c: Update.
146 * win32-low.c: Update.
148 2018-06-29 Joel Brobecker <brobecker@adacore.com>
150 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
151 parameter in call to 'amd64_create_target_description'.
153 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
155 * x86-tdesc.h: Remove executable permission flag.
157 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
159 * configure.ac: Remove AC_PREREQ, add missing quoting.
160 * configure: Re-generate.
161 * config.in: Re-generate.
162 * aclocal.m4: Re-generate.
164 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
166 * tracepoint.h (current_traceframe): Remove declaration.
168 2018-06-18 Alan Hayward <alan.hayward@arm.com>
170 * linux-aarch64-low.c (is_sve_tdesc): New function.
171 (aarch64_sve_regs_copy_to_regcache): Likewise.
172 (aarch64_sve_regs_copy_from_regcache): Likewise.
173 (aarch64_regs_info): Add SVE checks.
174 (initialize_low_arch): Initialize SVE.
176 2018-06-18 Alan Hayward <alan.hayward@arm.com>
178 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
180 2018-06-11 Alan Hayward <alan.hayward@arm.com>
182 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
183 (initialize_low_tracepoint): Likewise
184 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
185 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
187 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
189 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
191 2018-06-11 Alan Hayward <alan.hayward@arm.com>
193 * server.h (PBUFSIZ): Increase size
195 2018-06-11 Alan Hayward <alan.hayward@arm.com>
197 * regcache.c (regcache::raw_compare): New function.
198 * regcache.h (regcache::raw_compare): New declaration.
200 2018-06-11 Alan Hayward <alan.hayward@arm.com>
202 * regcache.c (new_register_cache): Use new.
203 (free_register_cache): Use delete.
204 (register_data): Use const.
205 (supply_register): Move body inside regcache.
206 (regcache::raw_supply): New override function.
207 (collect_register): Move body inside regcache.
208 (regcache::raw_collect): New override function.
209 (regcache::get_register_status): New override function.
210 * regcache.h (struct regcache): Inherit from reg_buffer_common.
212 2018-06-09 Tom Tromey <tom@tromey.com>
214 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
216 (event_queue): Use std::queue.
217 (gdb_event_xfree): Remove.
218 (initialize_event_loop, process_event, wait_for_event): Update.
220 2018-06-08 Stan Cox <scox@redhat.com>
222 * win32-low.c (win32_create_inferior): last_ptid and last_status
223 moved to client_state.
225 2018-06-08 Pedro Alves <palves@redhat.com>
227 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
228 common/common-exceptions.o, common/common-utils.o,
229 common/errors.o, common/print-utils.o and utils.o.
230 * gdbreplay.c: Include "common-defs.h" instead of the two
231 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
232 string.h or alloca.h.
233 (perror_with_name): Delete.
234 (remote_open): Use xstrdup instead of strdup.
235 (main): Rename to ...
236 (captured_main): ... this.
239 2018-06-08 Tom Tromey <tom@tromey.com>
241 * linux-low.c (linux_low_read_btrace): Update.
243 2018-06-04 Stan Cox <scox@redhat.com>
245 * server.h (struct client_state): New.
246 * server.c (cont_thread, general_thread, multi_process)
247 (report_fork_events, report_vfork_events, report_exec_events)
248 (report_thread_events, swbreak_feature, hwbreak_feature)
249 (vCont_supported, disable_randomization, pass_signals)
250 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
251 Moved to client_state.
252 * remote-utils.c (remote_debug, noack_mode)
253 (transport_is_reliable): Moved to client_state.
254 * tracepoint.c (current_traceframe): Moved to client_state.
257 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
258 linux-low.c, remote-utils.h, target.c: Use client_state.
260 2018-05-31 Alan Hayward <alan.hayward@arm.com>
262 * configure.srv: Add new c/h file.
264 2018-05-31 Alan Hayward <alan.hayward@arm.com>
266 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
269 2018-05-25 Maciej W. Rozycki <macro@mips.com>
271 * gdb.arch/mips-fpregset-core.exp: New test.
272 * gdb.arch/mips-fpregset-core.c: New test source.
274 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
277 * hostio.c (require_int): Do not report overflow for integers
278 between 0xfffffff and 0x7fffffff.
280 2018-05-22 Maciej W. Rozycki <macro@mips.com>
282 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
283 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
284 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
286 (the_low_target): Wire them.
288 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
290 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
291 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
292 mode. Call collect_register_by_name with vscr using
293 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
294 (ppc_store_vrregset): Add and set vscr_offset variable as in
295 ppc_fill_vrregset. Call supply_register_by_name with vscr using
298 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
300 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
301 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
302 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
304 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
306 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
307 (ppc_store_vsxregset): Likewise.
308 (ppc_fill_vrregset): Likewise.
309 (ppc_store_vrregset): Likewise.
310 (ppc_fill_evrregset): Likewise.
311 (ppc_store_evrregset): Likewise.
312 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
313 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
316 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
318 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
319 wordsize of the inferior. Call ppc_linux_target_wordsize.
321 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
323 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
324 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
325 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
326 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
327 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
328 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
329 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
331 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
332 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
333 (tdesc_powerpc_e500l): Remove.
334 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
335 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
336 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
337 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
339 (ppc_arch_setup): Remove target description matching code. Fill a
340 ppc_linux_features struct and call ppc_linux_match_description
343 2018-05-22 Maciej W. Rozycki <macro@mips.com>
345 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
346 width of the requested register exceeds the width of the
348 (mips_cannot_store_register): Likewise.
350 2018-05-21 Maciej W. Rozycki <macro@mips.com>
352 * linux-mips-low.c (mips_fetch_register): New function. Update
354 (mips_store_gregset): Supply 0 rather than $restart for $zero.
355 (the_low_target): Wire `mips_fetch_register'.
357 2018-05-10 Joel Brobecker <brobecker@adacore.com>
359 * lynx-i386-low.c (LYNXOS_178): New macro.
360 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
361 the layout on LynxOS-178.
362 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
363 handle floating point registers that are not supported by
366 2018-05-10 Tom Tromey <tom@tromey.com>
368 * configure: Rebuild.
370 2018-05-10 Joel Brobecker <brobecker@adacore.com>
373 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
374 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
375 Use it to set the expedite_regs field in the given tdesc.
376 * x86-tdesc.h: New file.
377 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
378 Adjust following the addition of the new expedite_regs parameter
380 * linux-tic6x-low.c (tic6x_read_description): Likewise.
381 * linux-x86-tdesc.c: #include "x86-tdesc.h".
382 (i386_linux_read_description, amd64_linux_read_description):
383 Adjust following the addition of the new expedite_regs parameter
385 * lynx-i386-low.c: #include "x86-tdesc.h".
386 (lynx_i386_arch_setup): Adjust following the addition of the new
387 expedite_regs parameter to init_target_desc.
388 * nto-x86-low.c: #include "x86-tdesc.h".
389 (nto_x86_arch_setup): Adjust following the addition of the new
390 expedite_regs parameter to init_target_desc.
391 * win32-i386-low.c: #include "x86-tdesc.h".
392 (i386_arch_setup): Adjust following the addition of the new
393 expedite_regs parameter to init_target_desc.
395 2018-05-10 Joel Brobecker <brobecker@adacore.com>
398 * win32-low.c (win32_create_inferior): Add call to my_wait
399 setting last_status global.
401 2018-05-10 Joel Brobecker <brobecker@adacore.com>
404 * win32-low.c (create_process): Only call gdb_tilde_expand if
405 inferior_cwd is not NULL.
407 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
409 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
410 registers to the cache if their values have changed.
411 (i387_xsave_to_cache): Provide default values for x87 control
412 registers when these features are available, but disabled.
413 * regcache.c (supply_register_by_name_zeroed): New function.
414 * regcache.h (supply_register_by_name_zeroed): Declare new
417 2018-05-07 Tom Tromey <tom@tromey.com>
419 * configure: Rebuild.
421 2018-05-04 Tom Tromey <tom@tromey.com>
423 * configure: Rebuild.
425 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
426 Pedro Alves <palves@redhat.com>
428 * linux-aarch64-low.c (aarch64_stopped_data_address):
431 2018-04-27 Tom Tromey <tom@tromey.com>
433 * configure: Rebuild.
435 2018-04-23 Tom Tromey <tom@tromey.com>
437 * configure: Rebuild.
439 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
441 * Makefile.in (depcomp): Add "..".
442 (all_deps_files): New and use it.
444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
446 * configure.srv (aarch64*-*-linux*): Don't include xml.
447 (i[34567]86-*-cygwin*): Likewise.
448 (i[34567]86-*-linux*): Likewise.
449 (i[34567]86-*-lynxos*): Likewise.
450 (i[34567]86-*-mingw32ce*): Likewise.
451 (i[34567]86-*-mingw*): Likewise.
452 (i[34567]86-*-nto*): Likewise.
453 (tic6x-*-uclinux): Likewise.
454 (x86_64-*-linux*): Likewise.
455 (x86_64-*-mingw*): Likewise.
456 (x86_64-*-cygwin*): Likewise.
458 2018-04-18 Alan Hayward <alan.hayward@arm.com>
460 * tdesc.c: Remove xml parameter.
462 2018-04-18 Alan Hayward <alan.hayward@arm.com>
464 * server.c (get_features_xml): Remove cast.
465 * tdesc.c (void target_desc::accept): Fill in function.
466 (tdesc_get_features_xml): Remove old xml creation.
467 (print_xml_feature::visit_pre): Add xml vistor.
468 * tdesc.h (struct target_desc): Make xmltarget mutable.
469 (tdesc_get_features_xml): Remove declaration.
471 2018-04-18 Alan Hayward <alan.hayward@arm.com>
473 * tdesc.c (tdesc_architecture_name): Add new function.
474 (tdesc_osabi_name): Likewise.
475 (tdesc_get_features_xml): Use new functions.
477 2018-04-18 Alan Hayward <alan.hayward@arm.com>
479 * tdesc.c (tdesc_create_flags): Remove.
480 (tdesc_add_flag): Likewise.
481 (tdesc_named_type): Likewise.
482 (tdesc_create_union): Likewise.
483 (tdesc_create_struct): Likewise.
484 (tdesc_create_vector): Likewise.
485 (tdesc_add_bitfield): Likewise.
486 (tdesc_add_field): Likewise.
487 (tdesc_set_struct_size): Likewise.
489 2018-04-18 Alan Hayward <alan.hayward@arm.com>
491 * tdesc.c (~target_desc): Remove implictly deleted items.
492 (init_target_desc): Iterate all features.
493 (tdesc_get_features_xml): Use vector.
494 (tdesc_create_feature): Create feature.
495 * tdesc.h (tdesc_feature) Remove
496 (target_desc): Add features.
498 2018-04-18 Alan Hayward <alan.hayward@arm.com>
500 * Makefile.in: Add common/tdesc.c
501 * tdesc.c (init_target_desc): init all reg_defs from register
503 (tdesc_create_reg): Create tdesc_reg.
504 * tdesc.h (tdesc_feature): Add register vector.
506 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
508 * tdesc.h (struct target_desc) <features>: Change type to
509 std::vector<std::string>.
510 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
512 (tdesc_get_features_xml): Likewise.
513 (tdesc_create_feature): Likewise.
515 2018-03-26 Alan Hayward <alan.hayward@arm.com>
517 * regcache.c (find_register_by_number): Return a ref.
518 (find_regno): Use references.
519 (register_size): Likewise.
520 (register_data): Likewise.
521 * tdesc.c (target_desc::~target_desc): Remove free calls.
522 (target_desc::operator==): Use std::vector compare.
523 (init_target_desc): Use reference.
524 (tdesc_create_reg): Use reg constructors.
525 * tdesc.h (struct target_desc): Replace pointer with object.
527 2018-03-23 Alan Hayward <alan.hayward@arm.com>
529 * regcache.c (find_register_by_number): Make static.
530 (find_regno): Use find_register_by_number
531 * regcache.h (struct reg): Remove declaration.
533 2018-03-23 Alan Hayward <alan.hayward@arm.com>
535 * tdesc.c (target_desc::~target_desc): Move to here.
536 (target_desc::operator==): Likewise.
537 * tdesc.h (target_desc::~target_desc): Move from here.
538 (target_desc::operator==): Likewise.
540 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
542 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
544 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
546 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
548 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
549 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
550 and init_registers_s390_gs_linux64.
552 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
554 * linux-s390-low.c (s390_fill_gs): Remove function.
555 (s390_fill_gsbc): Remove function.
556 (s390_regsets): Set fill functions for the guarded storage regsets
559 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
561 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
562 the word size. Add comment.
563 (s390_get_wordsize): New function.
564 (s390_arch_setup): No longer select a temporary tdesc to fetch the
565 pswm with it. Instead, use s390_get_wordsize to determine the
566 word size first and derive the correct tdesc from that directly.
568 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
570 * Makefile.in: Include silent-rules.mk.
571 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
572 (COMPILE): Add ECHO_CXX.
573 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
574 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
575 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
576 (version-generated.c): Add ECHO_GEN.
577 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
578 (IPAGENT_COMPILE): Add ECHO_CXX.
579 (%-generated.c): Add ECHO_REGDAT.
581 2018-03-14 Tom Tromey <tom@tromey.com>
584 * ax.c (ax_printf): Special case for NULL.
586 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
588 * linux-low.c (linux_qxfer_libraries_svr4): Use
589 xml_escape_text_append.
591 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
593 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
595 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
597 * server.c (handle_general_set): Remove unnecessary xstrdup.
599 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
601 * server.c (parse_debug_format_options): Adjust to
602 delim_string_to_char_ptr_vec changes.
603 * thread-db.c (thread_db_load_search): Adjust to
604 dirnames_to_char_ptr_vec changes.
606 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
608 * target.h (target_enable_btrace, target_disable_btrace)
609 (target_read_btrace, target_read_btrace_conf): Turn macro into
610 inline function. Throw error if target method is not defined.
611 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
612 check for btrace target method. Be prepared to handle exceptions
613 from btrace target methods.
615 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
617 * server.c (captured_main): Change order of error message printed
618 when the current working directory cannot be found.
620 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
622 * server.c: Include "filenames.h" and "pathstuff.h".
623 (program_name): Delete variable.
624 (program_path): New anonymous class.
625 (get_exec_wrapper): Use "program_path" instead of
627 (handle_v_run): Likewise.
628 (captured_main): Likewise.
629 (process_serial_event): Likewise.
631 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
633 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
634 (OBJS): Add "pathstuff.o".
635 * server.c (current_directory): New global variable.
636 (captured_main): Initialize "current_directory".
638 2018-02-26 Alan Hayward <alan.hayward@arm.com>
640 * tdesc.c: Use common/tdesc.h.
643 2018-02-20 Alan Hayward <alan.hayward@arm.com>
644 Simon Marchi <simon.marchi@ericsson.com>
646 * Makefile.in: Switch order of make rules.
648 2018-02-19 Alan Hayward <alan.hayward@arm.com>
650 * Makefile.in: Add common directory in build.
651 * configure.ac: Add common reference.
652 * configure: Regenerate.
654 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
656 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
657 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
658 * spu-low.c (spu_target_ops): Likewise.
659 * win32-low.c (win32_target_ops): Likewise.
660 * server.c (supported_btrace_packets): Report packets unconditionally.
661 * target.h (target_ops) <supports_btrace>: Remove.
662 (target_supports_btrace): Remove.
664 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
666 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
667 (handle_btrace_disable): Change return type to void. Use exceptions
669 (handle_btrace_general_set): Catch exception and copy message to
672 2018-02-08 Tom Tromey <tom@tromey.com>
674 * linux-low.c (install_software_single_step_breakpoints): Use
676 * inferiors.c (make_cleanup_restore_current_thread): Remove.
677 (do_restore_current_thread_cleanup): Remove.
678 * gdbthread.h (make_cleanup_restore_current_thread): Don't
681 2018-02-08 Tom Tromey <tom@tromey.com>
683 * mem-break.c (set_raw_breakpoint_at): Use
684 gdb::unique_xmalloc_ptr.
686 2018-01-30 Pedro Alves <palves@redhat.com>
689 * target.c (target_terminal::terminal_state): Rename to ...
690 (target_terminal::m_terminal_state): ... this.
692 2018-01-19 James Clarke <jrtc27@jrtc27.com>
694 * linux-low.c (handle_extended_wait): Surround call to
695 thread_db_notice_clone with #ifdef USE_THREAD_DB.
697 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
699 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
700 linux_ptrace_attach_fail_reason_string now returning an
702 (linux_attach): Likewise.
703 * thread-db.c (attach_thread): Likewise.
705 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
708 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
709 checking for fs_base/gs_base fields in struct user_regs_struct.
710 * configure: Regenerate.
712 2018-01-16 Yao Qi <yao.qi@linaro.org>
715 * linux-low.c (fetch_register): Call supply_register instead of
718 2018-01-08 Yao Qi <yao.qi@linaro.org>
719 Simon Marchi <simon.marchi@ericsson.com>
721 * Makefile.in (OBS): Remove selftest.o.
722 * configure.ac: Set srv_selftest_objs if $development is true.
723 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
724 * configure: Re-generated.
725 * server.c (captured_main): Wrap variable selftest_filter with
728 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
730 * server.c (parse_debug_format_options): Return std::string.
731 (handle_monitor_command, captured_main): Adjust.
733 2018-01-05 Pedro Alves <palves@redhat.com>
736 * server.c (captured_main): Pass quiet=false to
737 save_original_signals_state.
739 2018-01-01 Joel Brobecker <brobecker@adacore.com>
741 * gdbreplay.c (gdbreplay_version): Update copyright year in
743 * server.c (gdbserver_version): Likewise.
745 2017-12-08 Tom Tromey <tom@tromey.com>
747 * ax.c (ax_printf): Update.
749 2017-12-07 Yao Qi <yao.qi@linaro.org>
751 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
752 aarch64_linux_read_description.
753 * linux-amd64-ipa.c (idx2mask): New array.
754 (get_ipa_tdesc): Move idx2mask out.
755 (initialize_low_tracepoint): Initialize target descriptions.
756 * linux-i386-ipa.c (idx2mask): New array.
757 (get_ipa_tdesc): Move idx2mask out.
758 (initialize_low_tracepoint): Initialize target descriptions.
760 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
762 * tdesc.c (struct tdesc_type): Change return type.
763 (tdesc_add_flag): Change parameter type.
764 (tdesc_add_bitfield): Likewise.
765 (tdesc_add_field): Likewise.
766 (tdesc_set_struct_size): Likewise.
768 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
770 * regcache.c (registers_to_string): Remove unused variable.
772 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
774 * inferiors.c (for_each_inferior_with_data): Remove.
775 * inferiors.h (for_each_inferior_with_data): Remove.
776 * server.c (handle_qxfer_threads_worker): Change parameter type.
777 (handle_qxfer_threads_proper): Use for_each_thread.
779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
781 * inferiors.c (for_each_inferior): Remove.
782 (clear_inferiors): Use for_each_thread.
783 * inferiors.h (for_each_inferior): Remove.
784 * linux-low.c (linux_wait_for_event_filtered): Use
786 (linux_stabilize_threads): Likewise.
787 * regcache.c (regcache_release): Likewise.
788 * server.c (gdb_wants_all_threads_stopped): Likewise.
789 (clear_pending_status_callback): Remove.
790 (handle_status): Use for_each_thread.
791 (captured_main): Likewise.
792 * win32-low.c (child_init_thread_list): Likewise.
793 (win32_clear_inferiors): Likewise.
794 (fake_breakpoint_event): Likewise.
796 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
798 * inferiors.h (find_inferior): Remove.
799 * inferiors.c (find_inferior): Remove.
801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
803 * linux-low.c (resume_status_pending_p): Update comment.
804 (need_step_over_p): Update comment.
806 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
808 * linux-low.c (proceed_one_lwp): Return void, change parameter
810 (unsuspend_and_proceed_one_lwp): Likewise.
811 (proceed_all_lwps): Use for_each_thread.
812 (unstop_all_lwps): Likewise.
814 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
816 * linux-low.c (linux_resume_one_thread): Return void, take
818 (linux_resume): Use for_each_thread.
820 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
822 * linux-low.c (send_sigstop_callback): Return void, change
823 parameter type. Rename to...
824 (send_sigstop): ... this.
825 (suspend_and_send_sigstop_callback): Return void, change parameter
827 (suspend_and_send_sigstop): ... this.
828 (stop_all_lwps): Use for_each_thread.
830 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
832 * linux-low.c (lwp_running): Return bool, remove unused
834 (linux_stabilize_threads): Use find_thread.
836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
838 * linux-low.c (select_singlestep_lwp_callback): Remove.
839 (count_events_callback): Remove.
840 (select_event_lwp_callback): Remove.
841 (select_event_lwp): Use find_thread/for_each_thread.
843 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
845 * linux-low.c (not_stopped_callback): Return bool, take filter
847 (linux_wait_for_event_filtered): Use find_thread.
848 (linux_wait_1): Likewise.
850 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
852 * linux-low.c (same_lwp): Remove.
853 (find_lwp_pid): Use find_thread.
855 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
857 * linux-low.c (delete_lwp_callback): Remove.
858 (linux_mourn): Use for_each_thread.
860 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
862 * linux-low.c (linux_detach_lwp_callback): Return void, remove
863 args parameter, don't check for pid.
864 (linux_detach): Use for_each_thread.
866 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
868 * linux-low.c (struct counter): Remove.
869 (second_thread_of_pid_p): Remove.
870 (last_thread_of_process_p): Use find_thread.
872 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
874 * inferiors.c (find_inferior_in_random): Remove.
875 * inferiors.h (find_inferior_in_random): Remove.
876 * linux-low.c (status_pending_p_callback): Return bool, accept
877 parameter ptid directly.
878 (linux_wait_for_event_filtered): Use find_thread_in_random.
879 (linux_wait_1): Likewise.
881 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
883 * inferiors.c (find_inferior_id): Remove.
884 (find_thread_ptid): Move implemention from find_inferior_id to
886 * inferiors.h (find_inferior_id): Remove.
887 * server.c (handle_status): Use find_thread_ptid.
888 (process_serial_event): Likewise.
889 * thread-db.c (find_one_thread): Likewise.
890 (thread_db_thread_handle): Likewise.
891 * win32-low.c (thread_rec): Likewise.
892 (child_delete_thread): Likewise.
893 (win32_thread_alive): Likewise.
894 (get_child_debug_event): Likewise.
896 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
898 * linux-mips-low.c (update_watch_registers_callback): Return
899 void, remove pid_p parameter, don't check for pid.
900 (mips_insert_point, mips_remove_point): Use for_each_thread.
902 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
904 * lynx.low (lynx_delete_thread_callback): Remove.
905 (lynx_mourn): Use for_each_thread.
907 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
909 * regcache.c (regcache_invalidate_one): Remove.
910 (regcache_invalidate_pid): use for_each_thread.
912 2017-11-26 Tom Tromey <tom@tromey.com>
914 * linux-low.c (linux_create_inferior): Update.
916 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
918 * spu-low.c (spu_create_inferior): Fix typo in argument name.
920 2017-11-24 Alan Hayward <alan.hayward@arm.com>
922 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
923 * linux-aarch64-low.c (initialize_low_arch): Call init func.
924 * linux-aarch64-tdesc-selftest.c: New file.
925 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
927 2017-11-24 Alan Hayward <alan.hayward@arm.com>
929 * configure.srv: Add new file.
930 * linux-aarch64-low.c (initialize_low_arch): Call init func.
931 * linux-aarch64-tdesc-selftest.c: New file.
932 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
934 2017-11-24 Alan Hayward <alan.hayward@arm.com>
936 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
937 * linux-aarch64-low.c (initialize_low_arch): Remove init.
938 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
940 2017-11-24 Alan Hayward <alan.hayward@arm.com>
942 * configure.srv: Add new files.
943 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
944 aarch64_linux_read_description.
945 * linux-aarch64-low.c (aarch64_linux_read_description):
946 Merge with aarch64_arch_setup.
947 (aarch64_arch_setup): Call aarch64_linux_read_description.
948 * linux-aarch64-tdesc.c: New file.
949 * linux-aarch64-tdesc.h: New file.
951 2017-11-24 Yao Qi <yao.qi@linaro.org>
953 * configure.srv: Set $srv_regobj for tic6x-linux.
954 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
955 (tic6x_read_description): Move some code to tic6x_arch_setup.
956 (tic6x_tdesc_test): New function.
957 (initialize_low_arch): Call selftests::register_test.
959 2017-11-22 Yao Qi <yao.qi@linaro.org>
961 * remote-utils.c (prepare_resume_reply): Use memcpy.
963 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
965 * linux-low.c (kill_one_lwp_callback): Return void, take
966 argument directly, don't filter on pid.
967 (linux_kill): Use for_each_thread.
969 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
971 * linux-low.c (need_step_over_p): Return bool, remove dummy
973 (linux_resume, proceed_all_lwps): Use find_thread.
975 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
977 * linux-low.c (resume_status_pending_p): Return bool, remove
979 (linux_resume): Use find_thread.
981 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
983 * linux-low.c (struct thread_resume_array): Remove.
984 (linux_set_resume_request): Return void, take arguments
986 (linux_resume): Use for_each_thread.
988 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
990 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
991 return bool, remove data argument.
992 (linux_stabilize_threads): Use find_thread.
994 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
996 * linux-low.c (unsuspend_one_lwp): Remove.
997 (unsuspend_all_lwps): Use for_each_thread, inline code from
1000 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1002 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1003 * linux-low.c (struct iterate_over_lwps_args): Remove.
1004 (iterate_over_lwps_filter): Remove.
1005 (iterate_over_lwps): Use find_thread.
1007 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1009 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1010 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1011 code from reset_lwp_ptrace_options_callback.
1013 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1015 * linux-arm-low.c (struct update_registers_data): Remove.
1016 (update_registers_callback): Return void, take arguments
1017 directly, don't check thread's pid.
1018 (arm_insert_point, arm_remove_point): Use for_each_thread.
1020 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1022 * win32-low.c (continue_one_thread): Return void, take argument
1024 (child_continue): Use for_each_thread.
1026 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1028 * win32-i386-low.c (update_debug_registers_callback): Rename
1030 (update_debug_registers): ... this, return void, remove pid_p arg.
1031 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1033 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1035 * inferiors.h (struct process_info): Add constructor, initialize
1037 <syscalls_to_catch>: Change type to std::vector<int>.
1038 * inferiors.c (add_process): Allocate process_info with new.
1039 (remove_process): Free process_info with delete.
1040 * linux-low.c (handle_extended_wait): Adjust.
1041 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1042 * server.c (handle_general_set): Adjust.
1044 2017-11-16 Pedro Alves <palves@redhat.com>
1046 * remote-utils.c (remote_close): Block SIGIO signals instead of
1047 uninstalling the SIGIO handler.
1049 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1051 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1053 2017-11-16 Yao Qi <yao.qi@linaro.org>
1055 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1056 (tic6x_store_gregset): Likewise.
1057 (tic6x_usrregs_info): Move it up.
1059 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1061 * Makefile.in: Update arch rules.
1062 * configure.srv: Explicitly mark arch/ files.
1064 2017-11-13 Andreas Schwab <schwab@suse.de>
1066 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1068 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1070 2017-11-06 Pedro Alves <palves@redhat.com>
1072 * config.in, configure: Regenerate.
1074 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1076 * target.c (struct thread_search): Remove.
1077 (thread_search_callback): Remove.
1078 (prepare_to_access_memory): Use for_each_thread instead of
1079 find_inferior. Inline code from thread_search_callback.
1081 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1083 * server.c (struct visit_actioned_threads_data): Remove.
1084 (visit_actioned_threads): Change prototype to take arguments
1086 (resume): Use find_thread instead of find_inferior.
1088 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1090 * server.c (queue_stop_reply_callback): Change prototype, return
1092 (find_status_pending_thread_callback): Remove.
1093 (handle_status): Replace find_inferior with find_thread and
1096 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1098 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1100 (aarch64_store_gregset): Likewise.
1101 (aarch64_fill_fpregset): Likewise.
1102 (aarch64_store_fpregset): Likewise.
1104 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1106 * gdbthread.h (find_thread, for_each_thread): New functions.
1107 * inferiors.c (thread_of_pid): Remove.
1108 (find_any_thread_of_pid): Use find_thread.
1109 * linux-low.c (num_lwps): Use for_each_thread.
1111 2017-10-17 Yao Qi <yao.qi@linaro.org>
1113 * Makefile.in: Remove one rule.
1114 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1116 2017-10-17 Yao Qi <yao.qi@linaro.org>
1118 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1119 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1121 2017-10-17 Yao Qi <yao.qi@linaro.org>
1123 * configure.srv: Rename arm.o with arch/arm.o.
1125 2017-10-17 Yao Qi <yao.qi@linaro.org>
1127 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1128 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1129 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1130 (arch-i386.o, arch-amd64.o): Remove rules.
1131 (arch/%.o): New rule.
1132 Update POSTCOMPILE and COMPILE.pre.
1133 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1134 * configure: Re-generated.
1135 * configure.srv: Replace arch-i386.o with arch/i386.o.
1136 Replace arch-amd64.o with arch/amd64.o.
1138 2017-10-16 Yao Qi <yao.qi@linaro.org>
1140 * configure: Regenerated.
1142 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1144 * inferiors.h: (struct inferior_list): Remove.
1145 (struct inferior_list_entry); Remove.
1146 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1147 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1148 get_first_inferior): Remove.
1149 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1150 find_inferior_id, find_inferior_in_random): Change signature.
1151 * inferiors.c (all_threads): Change type to
1152 std::list<thread_info *>.
1153 (get_thread): Remove macro.
1154 (find_inferior, find_inferior_id): Change signature, implement
1156 (find_inferior_in_random): Change signature, implement using
1157 find_thread_in_random.
1158 (for_each_inferior, for_each_inferior_with_data): Change
1159 signature, implement using for_each_thread.
1160 (add_inferior_to_list, remove_inferior): Remove.
1161 (add_thread, get_first_thread, thread_of_pid,
1162 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1163 (get_first_inferior, one_inferior_p, clear_inferior_list):
1165 (clear_inferiors, get_thread_process): Update.
1166 * gdbthread.h: Include <list>.
1167 (struct thread_info) <entry>: Remove field.
1169 (all_threads): Change type to std::list<thread_info *>.
1170 (get_first_inferior): Add doc.
1171 (find_thread, for_each_thread, find_thread_in_random): New
1173 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1174 * linux-arm-low.c (update_registers_callback): Update.
1175 * linux-low.c (second_thread_of_pid_p): Update.
1176 (kill_one_lwp_callback, linux_detach_lwp_callback,
1177 delete_lwp_callback, status_pending_p_callback, same_lwp,
1178 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1179 iterate_over_lwps, not_stopped_callback,
1180 resume_stopped_resumed_lwps, count_events_callback,
1181 select_singlestep_lwp_callback, select_event_lwp_callback,
1182 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1183 suspend_and_send_sigstop_callback, wait_for_sigstop,
1184 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1185 lwp_running, linux_set_resume_request, resume_status_pending_p,
1186 need_step_over_p, start_step_over, linux_resume_one_thread,
1187 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1188 reset_lwp_ptrace_options_callback): Update.
1189 * linux-mips-low.c (update_watch_registers_callback): Update.
1190 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1192 (free_register_cache_thread_one): Remove.
1193 (regcache_release): Update.
1194 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1195 handle_qxfer_threads_worker): Update.
1196 (handle_query): Update, use list iterator.
1197 (visit_actioned_threads, handle_pending_status,
1198 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1199 clear_pending_status_callback, set_pending_status_callback,
1200 find_status_pending_thread_callback, handle_status,
1201 process_serial_event): Update.
1202 * target.c (thread_search_callback): Update.
1203 * thread-db.c (thread_db_get_tls_address): Update.
1204 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1206 * win32-i386-low.c (update_debug_registers_callback): Update.
1207 * win32-low.c (delete_thread_info, child_delete_thread,
1208 continue_one_thread, suspend_one_thread,
1209 get_child_debug_event): Adjust.
1211 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1213 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1214 * inferiors.h: Include <list>.
1215 (struct process_info) <entry>: Remove field.
1217 (pid_of): Change macro to function.
1218 (ptid_of, lwpid_of): Remove macro.
1219 (all_processes): Change type to std::list<process_info *>.
1220 (ALL_PROCESSES): Remove macro.
1221 (for_each_process, find_process): New function.
1222 * inferiors.c (all_processes): Change type to
1223 std::list<process_info *>.
1224 (find_thread_process): Adjust.
1225 (add_process): Likewise.
1226 (remove_process): Likewise.
1227 (find_process_pid): Likewise.
1228 (get_first_process): Likewise.
1229 (started_inferior_callback): Remove.
1230 (have_started_inferiors_p): Adjust.
1231 (attached_inferior_callback): Remove.
1232 (have_attached_inferiors_p): Adjust.
1233 * linux-low.c (check_zombie_leaders): Likewise.
1234 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1235 (x86_linux_update_xmltarget): Adjust.
1236 * server.c (handle_query): Likewise.
1237 (gdb_reattached_process): Remove.
1238 (handle_status): Adjust.
1239 (kill_inferior_callback): Likewise.
1240 (detach_or_kill_inferior): Remove.
1241 (print_started_pid): Likewise.
1242 (print_attached_pid): Likewise.
1243 (detach_or_kill_for_exit): Update.
1244 (process_serial_event): Likewise.
1245 * linux-arm-low.c (arm_new_fork): Likewise.
1247 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1249 * dll.h: Include <list>.
1250 (struct dll_info): Add constructor.
1251 <entry>: Remove field.
1252 (all_dlls): Change type to std::list<dll_info>.
1253 * dll.c: Include <algorithm>.
1254 (get_dll): Remove macro.
1255 (all_dlls): Change type to std::list<dll_info *>.
1256 (free_one_dll): Remove.
1257 (match_dll): Likewise.
1258 (loaded_dll): Adjust.
1259 (unloaded_dll): Adjust to all_dlls type change, use
1260 std::find_if. Inline code from match_dll.
1261 (clear_dlls): Adjust to all_dlls type change.
1262 * server.c (emit_dll_description): Remove.
1263 (handle_qxfer_libraries): Adjust to all_dlls type change,
1264 integrate emit_dll_description's functionality.
1266 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1268 * linux-low.h (struct linux_target_ops) <delete_process>: New
1270 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1271 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1272 (struct linux_target_ops): Add delete_process callback.
1273 * linux-arm-low.c (arm_delete_process): New.
1274 (struct linux_target_ops): Add delete_process callback.
1275 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1276 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1277 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1278 * linux-mips-low.c (mips_linux_delete_process): New.
1279 (struct linux_target_ops): Add delete_process callback.
1280 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1281 * linux-s390-low.c (struct linux_target_ops): Likewise.
1282 * linux-sh-low.c (struct linux_target_ops): Likewise.
1283 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1284 * linux-tile-low.c (struct linux_target_ops): Likewise.
1285 * linux-x86-low.c (x86_linux_delete_process): New.
1286 (struct linux_target_ops): Add delete_process callback.
1287 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1289 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1291 * linux-aarch64-low.c (the_low_target): Add thread delete
1293 * linux-arm-low.c (arm_delete_thread): New function.
1294 (the_low_target): Add thread delete callback.
1295 * linux-bfin-low.c (the_low_target): Likewise.
1296 * linux-crisv32-low.c (the_low_target): Likewise.
1297 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1299 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1301 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1302 * linux-mips-low.c (mips_linux_delete_thread): New function.
1303 (the_low_target): Add thread delete callback.
1304 * linux-ppc-low.c (the_low_target): Likewise.
1305 * linux-s390-low.c (the_low_target): Likewise.
1306 * linux-sh-low.c (the_low_target): Likewise.
1307 * linux-tic6x-low.c (the_low_target): Likewise.
1308 * linux-tile-low.c (the_low_target): Likewise.
1309 * linux-x86-low.c (the_low_target): Likewise.
1310 * linux-xtensa-low.c (the_low_target): Likewise.
1312 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1314 * win32-low.c: Include "common-inferior.h".
1316 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1318 * inferiors.c (set_inferior_cwd): New function.
1319 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1320 (handle_query): Inform that QSetWorkingDir is supported.
1321 * win32-low.c (create_process): Pass the inferior's cwd to
1324 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1326 * inferiors.c (current_inferior_cwd): New global variable.
1327 (get_inferior_cwd): New function.
1328 * inferiors.h (struct process_info) <cwd>: New field.
1330 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1332 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1333 (OBS): Add gdb_tilde_expand.o.
1335 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1337 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1338 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1340 2017-09-29 Pedro Alves <palves@redhat.com>
1342 * ax.c (gdb_parse_agent_expr): Constify.
1343 * ax.h (gdb_parse_agent_expr): Constify.
1344 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1346 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1347 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1348 * remote-utils.h (read_ptid): Constify.
1349 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1350 (process_point_options, process_serial_event): Constify.
1351 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1352 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1353 (cmd_qtbuffer): Constify.
1355 2017-09-29 Pedro Alves <palves@redhat.com>
1357 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1360 2017-09-29 Pedro Alves <palves@redhat.com>
1362 * linux-low.c (handle_extended_wait): Pass parent thread instead
1363 of process to thread_db_notice_clone.
1364 * linux-low.h (thread_db_notice_clone): Replace parent process
1365 parameter with parent thread parameter.
1366 * thread-db.c (find_one_thread): Add comment.
1367 (thread_db_notice_clone): Replace parent process parameter with
1368 parent thread parameter. Temporarily switch to the parent thread.
1370 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1372 * gdbthread.h: Include "common-gdbthread.h".
1373 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1374 "if" when validating the ptid.
1375 * remote-utils.c: Include "gdbthread.h".
1376 (prepare_resume_reply): Use "switch_to_thread".
1377 * target.c (done_accessing_memory): Likewise.
1379 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1381 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1382 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1383 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1384 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1385 s390x-gs-linux64-ipa.o to ipa_obj.
1386 * linux-s390-low.c (HWCAP_S390_GS): New define.
1387 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1389 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1390 (s390_arch_setup): Check for guarded-storage support and choose
1392 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1393 init_registers_s390x_gs_linux64.
1394 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1396 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1397 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1399 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1401 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1403 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1405 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1406 (thread_db_thread_handle): Declare.
1407 * linux-low.c (linux_target_ops): Initialize thread_handle.
1408 * server.c (handle_qxfer_threads_worker): Add support for
1410 * target.h (struct target_ops): Add new function pointer,
1412 (target_thread_handle): Define.
1413 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1415 (thread_db_thread_handle): New function.
1417 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1419 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1420 * linux-low.h (thread_db_notice_clone): Declare.
1421 * thread-db.c (thread_db_notice_clone): New function.
1423 2017-09-21 Pedro Alves <palves@redhat.com>
1425 * server.c (gdb_read_memory, handle_status, process_serial_event)
1426 (handle_serial_event, handle_target_event): Adjust to
1427 set_desired_thread prototype change.
1428 * target.c (set_desired_thread): Remove 'use_general' parameter
1430 * target.h (set_desired_thread): Remove 'use_general' parameter.
1432 2017-09-20 Tom Tromey <tom@tromey.com>
1434 * target.c (target_terminal::terminal_state): Define.
1435 (target_terminal::init): Rename from target_terminal_init.
1436 (target_terminal::inferior): Rename from
1437 target_terminal_inferior.
1438 (target_terminal::ours): Rename from target_terminal_ours.
1439 (target_terminal::ours_for_output, target_terminal::info): New.
1441 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1443 * server.c (accumulate_file_name_length): Remove.
1444 (emit_dll_description): Adjust to std::string change.
1445 (handle_qxfer_libraries): Use std::string to hold document.
1447 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1449 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1450 return type of xml_escape_text.
1451 * server.c (emit_dll_description): Likewise.
1453 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1455 * server.c (captured_main): Accept argument for --selftest.
1456 Update run_tests call.
1457 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1458 when registering selftests.
1460 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1462 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1463 instead of "VEC" for "target_desc.reg_defs".
1464 (regcache_cpy): Likewise.
1465 (registers_to_string): Likewise.
1466 (registers_from_string): Likewise.
1467 (find_regno): Likewise.
1468 (supply_regblock): Likewise.
1469 (regcache_raw_read_unsigned): Likewise.
1470 * tdesc.c (init_target_desc): Likewise.
1471 (tdesc_create_reg): Likewise.
1472 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1473 (struct target_desc) <reg_defs>: Convert to "std::vector".
1474 (target_desc): Do not initialize "reg_defs".
1475 (~target_desc): Update code to use "std::vector" instead of "VEC"
1476 for "target_desc.reg_defs".
1477 (operator==): Likewise.
1479 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1481 * inferiors.h (thread_to_gdb_id): Remove.
1482 * inferiors.c (thread_to_gdb_id): Remove.
1483 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1484 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1485 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1487 * nto-low.c (nto_fetch_registers, nto_store_registers,
1488 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1490 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1492 * inferiors.h (gdb_id_to_thread_id): Remove.
1493 * inferiors.c (gdb_id_to_thread_id): Remove.
1494 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1495 removal. Move pid declaration closer to where it's used.
1497 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1499 * server.c (handle_detach): New function.
1500 (process_serial_event): Move code out, call handle_detach.
1502 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1504 * server.c (require_running): Rename to ...
1505 (require_running_or_return): ... this ...
1506 (require_running_or_break): ... and this.
1507 (handle_query, process_serial_event): Adjust.
1509 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1511 * linux-low.c (linux_set_resume_request): Remove unused
1514 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1516 * server.c (first_thread_of): Remove.
1517 (process_serial_event): Replace usage of first_thread_of with
1518 find_any_thread_of_pid.
1519 * tracepoint.c (same_process_p): Remove.
1520 (gdb_agent_about_to_close): Replace usage of same_process_p with
1521 find_any_thread_of_pid.
1522 * linux-x86-low.c (same_process_callback): Remove.
1523 (x86_arch_setup_process_callback): Replace usage of
1524 same_process_callback with find_any_thread_of_pid.
1525 * thread-db.c (any_thread_of): Remove.
1526 (switch_to_process): Replace usage of any_thread_of with
1527 find_any_thread_of_pid.
1528 * inferiors.c (thread_pid_matches_callback): Remove.
1529 (find_thread_process): Adjust to use find_any_thread_of_pid.
1531 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1533 * regcache.c (get_thread_regcache): Guard calls to "memset"
1536 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1538 * linux-low.c (handle_extended_wait): Use
1539 "allocate_target_description" instead of "XNEW".
1540 * linux-x86-low.c (initialize_low_arch): Likewise.
1542 2017-09-05 Yao Qi <yao.qi@linaro.org>
1544 * configure.srv (srv_i386_regobj): Remove.
1545 (srv_amd64_regobj): Remove.
1546 (srv_regobj): Set it to "" for x86 non-linux targets.
1547 * linux-x86-tdesc.c (i386_linux_read_description):
1548 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1549 (init_registers_i386): Remove the declaration.
1550 (tdesc_i386): Remove the declaration.
1551 (lynx_i386_arch_setup): Call i386_create_target_description.
1552 * nto-x86-low.c: Likewise.
1553 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1554 [!__x86_64__]: include arch/i386.h.
1555 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1557 2017-09-05 Yao Qi <yao.qi@linaro.org>
1559 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1560 i386/amd64-XXX-linux from it.
1562 2017-09-05 Yao Qi <yao.qi@linaro.org>
1564 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1566 (ipa_amd64_linux_regobj): Remove.
1567 (ipa_x32_linux_regobj): Remove.
1569 2017-09-05 Yao Qi <yao.qi@linaro.org>
1571 * Makefile.in (arch-amd64.o): New rule.
1572 * configure.srv: Append arch-amd64.o.
1573 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1574 (get_ipa_tdesc): Call amd64_linux_read_description.
1575 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1576 and init_registers_amd64_XXX.
1577 * linux-x86-low.c (x86_linux_read_description): Call
1578 amd64_linux_read_description.
1579 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1580 (initialize_low_arch): Don't call init_registers_x32_XXX and
1581 init_registers_amd64_XXX.
1582 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1583 and tdesc_amd64_XXX.
1584 [__x86_64__] (amd64_tdesc_test): New function.
1585 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1586 and init_registers_amd64_XXX.
1587 * linux-x86-tdesc.c: Include arch/amd64.h.
1588 (xcr0_to_tdesc_idx): New function.
1589 (i386_linux_read_description): New function.
1590 (amd64_get_ipa_tdesc_idx): New function.
1591 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1592 (amd64_get_ipa_tdesc): Declare.
1594 2017-09-05 Yao Qi <yao.qi@linaro.org>
1596 * configure.srv (srv_i386_linux_xmlfiles): Remove
1597 i386/i386-XXX-linux.xml from it.
1599 2017-09-05 Yao Qi <yao.qi@linaro.org>
1601 * configure.srv: Set srv_i386_linux_regobj empty if $development
1603 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1604 initialize_low_tdesc.
1605 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1606 with #if initialize_low_tdesc.
1607 * linux-x86-tdesc-selftest.c: New file.
1608 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1610 2017-09-05 Yao Qi <yao.qi@linaro.org>
1612 * Makefile.in (arch-i386.o): New rule.
1613 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1614 (x86_64-*-linux*): Likewise.
1615 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1616 include arch/i386.h.
1617 (i386_linux_read_description): Remove code and call
1618 i386_create_target_description.
1619 * tdesc.c (allocate_target_description): New function.
1620 * tdesc.h (set_tdesc_architecture): Remove declaration.
1621 (set_tdesc_osabi): Likewise.
1623 2017-09-05 Yao Qi <yao.qi@linaro.org>
1625 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1626 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1627 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1629 * server.c (get_features_xml): Call tdesc_get_features_xml.
1630 * tdesc.c (set_tdesc_architecture): New function.
1631 (set_tdesc_osabi): New function.
1632 (tdesc_get_features_xml): New function.
1633 (tdesc_create_feature): Add an argument.
1634 * tdesc.h (struct target_desc) <features>: New field.
1635 <arch, osabi>: New field.
1636 (~target_desc): xfree features, arch, and osabi.
1637 (target_desc::oerator==): Don't compare .xmltarget.
1638 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1639 (set_tdesc_osabi): Likewise.
1640 (tdesc_get_features_xml): Likewise.
1642 2017-09-05 Yao Qi <yao.qi@linaro.org>
1644 * linux-x86-tdesc.c: Include selftest.h.
1645 (i386_tdesc_test): New function.
1646 (initialize_low_tdesc): Call selftests::register_test.
1647 * tdesc.h: Include regdef.h.
1648 (target_desc): Override operator == and !=.
1650 2017-09-05 Yao Qi <yao.qi@linaro.org>
1652 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1653 (ipa_obj): Likewise.
1654 * linux-i386-ipa.c: Include common/x86-xstate.h
1655 (get_ipa_tdesc): Call i386_linux_read_description.
1656 (initialize_low_tracepoint): Don't call init_registers_XXX
1657 functions, call initialize_low_tdesc instead.
1658 * linux-x86-low.c (x86_linux_read_description): Call
1659 i386_linux_read_description.
1660 (initialize_low_arch): Don't call init_registers_i386_XXX
1661 functions, call initialize_low_tdesc.
1662 * linux-x86-tdesc.c: New file.
1663 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1664 (i386_get_ipa_tdesc_idx): Declare.
1665 (i386_get_ipa_tdesc): Declare.
1666 (initialize_low_tdesc): Declare.
1668 2017-09-05 Yao Qi <yao.qi@linaro.org>
1670 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1673 2017-09-05 Yao Qi <yao.qi@linaro.org>
1675 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1676 * regcache.c (get_thread_regcache): Use VEC_length.
1677 (init_register_cache): Likewise.
1678 (regcache_cpy): Likewise.
1679 (registers_to_string): Iterate reg_defs via VEC_iterate.
1680 (find_regno): Likewise.
1681 (find_register_by_number): Use VEC_index.
1682 (register_size): Call find_register_by_number.
1683 (register_data): Call find_register_by_number.
1684 (supply_regblock): Use VEC_length.
1685 (regcache_raw_read_unsigned): Likewise.
1686 * tdesc.c (init_target_desc): Iterate reg_defs via
1688 (default_description): Update initializer.
1689 (copy_target_description): Don't update field num_registers.
1690 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1691 <num_registers>: Remove.
1693 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1695 * Makefile.in (.SECONDARY): Define target.
1697 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1699 * linux-low.c (linux_wait_1): Adjust.
1700 * server.c (queue_stop_reply_callback): Adjust.
1702 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1704 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1705 QEnvironmentUnset and QEnvironmentReset packets.
1706 (handle_query): Inform remote that QEnvironmentHexEncoded,
1707 QEnvironmentUnset and QEnvironmentReset are supported.
1709 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1711 * inferiors.h (inferior_target_data): Rename to ...
1712 (thread_target_data): ... this.
1713 (inferior_regcache_data): Rename to ...
1714 (thread_regcache_data): ... this.
1715 (set_inferior_regcache_data): Rename to ...
1716 (set_thread_regcache_data): ... this.
1717 * inferiors.c (inferior_target_data): Rename to ...
1718 (thread_target_data): ... this.
1719 (inferior_regcache_data): Rename to ...
1720 (thread_regcache_data): ... this.
1721 (set_inferior_regcache_data): Rename to ...
1722 (set_thread_regcache_data): ... this.
1723 (free_one_thread): Update.
1724 * linux-low.h (get_thread_lwp): Update.
1725 * regcache.c (get_thread_regcache): Update.
1726 (regcache_invalidate_thread): Update.
1727 (free_register_cache_thread): Update.
1728 * win32-i386-low.c (update_debug_registers_callback): Update.
1729 (win32_get_current_dr): Update.
1730 * win32-low.c (thread_rec): Update.
1731 (delete_thread_info): Update.
1732 (continue_one_thread): Update.
1733 (suspend_one_thread): Update.
1735 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1737 * inferiors.c (set_inferior_target_data): Remove.
1738 * inferiors.h (set_inferior_target_data): Remove.
1740 2017-08-18 Yao Qi <yao.qi@linaro.org>
1742 * Makefile.in (OBS): Add selftest.o.
1743 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1744 * configure, config.in: Re-generated.
1745 * server.c: Include common/sefltest.h.
1746 (captured_main): Handle option --selftest.
1748 2017-08-09 Yao Qi <yao.qi@linaro.org>
1750 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1751 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1752 i386-avx-mpx.o and i386-mmx.o.
1753 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1754 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1755 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1756 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1757 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1758 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1759 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1760 i386/amd64-avx-mpx.xml.
1762 2017-08-09 Yao Qi <yao.qi@linaro.org>
1764 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1765 and x32-avx-avx512.o.
1766 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1767 i386/x32-avx-avx512.xml.
1769 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1771 * tracepoint.h (enum class fast_tpoint_collect_result): New
1773 (fast_tracepoint_collecting): Change return type to
1774 fast_tpoint_collect_result.
1775 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1776 * linux-low.h: Include tracepoint.h.
1777 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1778 fast_tpoint_collect_result.
1779 * linux-low.c (handle_tracepoints): Adjust.
1780 (linux_fast_tracepoint_collecting): Change return type to
1781 fast_tpoint_collect_result.
1782 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1783 linux_wait_1, stuck_in_jump_pad_callback,
1784 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1785 proceed_one_lwp): Adjust to type change.
1787 2017-07-10 Yao Qi <yao.qi@linaro.org>
1789 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1791 2017-06-29 Yao Qi <yao.qi@linaro.org>
1793 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1795 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1797 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1799 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1801 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1803 * linux-low.c (linux_create_inferior): Adjust code to access the
1804 environment information via 'gdb_environ' class.
1805 * lynx-low.c (lynx_create_inferior): Likewise.
1806 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1807 (get_environ): Return a pointer to 'our_environ'.
1808 (captured_main): Initialize 'our_environ'.
1809 * server.h (get_environ): Adjust prototype.
1810 * spu-low.c (spu_create_inferior): Adjust code to access the
1811 environment information via 'gdb_environ' class.
1813 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1815 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1816 usage of "register" keyword.
1818 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1820 * configure: Re-generate.
1822 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1824 * configure: Re-generate.
1826 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1828 * Makefile.in (COMPILE.pre): Add "-x c++".
1830 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1832 * fork-child.c: Conditionally include <signal.h>.
1834 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1836 * server.c (handle_general_set): Handle new packet
1837 "QStartupWithShell".
1838 (handle_query): Add "QStartupWithShell" to the list of supported
1840 (gdbserver_usage): Add help text explaining the
1841 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1843 (captured_main): Recognize and act upon the presence of the new
1846 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1847 Pedro Alves <palves@redhat.com>
1849 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1850 * configure: Regenerate.
1851 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1853 (i[34567]86-*-lynxos*): Likewise.
1854 (spu*-*-*): Likewise.
1855 * fork-child.c: New file.
1856 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1858 (linux_ptrace_fun): New function.
1859 (linux_create_inferior): Adjust function prototype to reflect
1860 change on "target.h". Adjust function code to use
1862 (linux_request_interrupt): Delete "signal_pid".
1863 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1864 (lynx_ptrace_fun): New function.
1865 (lynx_create_inferior): Adjust function prototype to reflect
1866 change on "target.h". Adjust function code to use
1868 * nto-low.c (nto_create_inferior): Adjust function prototype and
1869 code to reflect change on "target.h". Update comments.
1870 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1871 "common-terminal.h" and "environ.h".
1872 (terminal_fd): Moved to fork-child.c.
1873 (old_foreground_pgrp): Likewise.
1874 (restore_old_foreground_pgrp): Likewise.
1875 (last_status): Make it global.
1876 (last_ptid): Likewise.
1877 (our_environ): New variable.
1878 (startup_with_shell): Likewise.
1879 (program_name): Likewise.
1880 (program_argv): Rename to...
1881 (program_args): ...this.
1882 (wrapper_argv): New variable.
1883 (start_inferior): Delete function.
1884 (get_exec_wrapper): New function.
1885 (get_exec_file): Likewise.
1886 (get_environ): Likewise.
1887 (prefork_hook): Likewise.
1888 (post_fork_inferior): Likewise.
1889 (postfork_hook): Likewise.
1890 (postfork_child_hook): Likewise.
1891 (handle_v_run): Update code to deal with arguments coming from the
1892 remote host. Update calls from "start_inferior" to
1894 (captured_main): Likewise. Initialize environment variable. Call
1896 * server.h (post_fork_inferior): New prototype.
1897 (get_environ): Likewise.
1898 (last_status): Declare.
1899 (last_ptid): Likewise.
1900 (signal_pid): Likewise.
1901 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1902 (spu_ptrace_fun): New function.
1903 (spu_create_inferior): Adjust function prototype to reflect change
1904 on "target.h". Adjust function code to use "fork_inferior".
1905 * target.c (target_terminal_init): New function.
1906 (target_terminal_inferior): Likewise.
1907 (target_terminal_ours): Likewise.
1908 * target.h: Include <vector>.
1909 (struct target_ops) <create_inferior>: Update prototype.
1910 (create_inferior): Update macro.
1911 * utils.c (gdb_flush_out_err): New function.
1912 * win32-low.c (win32_create_inferior): Adjust function prototype
1913 and code to reflect change on "target.h".
1915 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1917 * inferiors.c (switch_to_thread): New function.
1919 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1921 * Makefile.in (SFILE): Add "common/job-control.c".
1922 (OBS): Add "job-control.o".
1924 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1926 * Makefile: Remove "@host_makefile_frag@".
1928 2017-05-05 Pedro Alves <palves@redhat.com>
1930 * configure: Regenerate.
1932 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1934 * configure: Regenerate.
1936 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1938 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1939 software_single_step change of return type to
1940 std::vector<CORE_ADDR>.
1941 * linux-low.c (install_software_single_step_breakpoints):
1943 * linux-low.h (install_software_single_step_breakpoints):
1946 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1948 * remote-utils.c: Include "gdb_termios.h" instead of
1950 * terminal.h: Delete file.
1952 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1954 * server.c: Include <vector>.
1955 <program_argv, wrapper_argv>: Convert to std::vector.
1956 (start_inferior): Rewrite function to use C++.
1957 (handle_v_run): Likewise. Update code that calculates the argv
1958 based on the vRun packet; use C++.
1959 (captured_main): Likewise.
1961 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1963 * server.c (handle_v_cont): Initialize thread_resume::thread
1966 2017-04-05 Pedro Alves <palves@redhat.com>
1968 * configure: Regenerate.
1970 2017-04-05 Pedro Alves <palves@redhat.com>
1972 * gdbreplay.c (sync_error): Constify.
1973 * linux-x86-low.c (push_opcode): Constify.
1975 2017-04-05 Pedro Alves <palves@redhat.com>
1977 * win32-low.c (get_child_debug_event)
1978 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1979 Report TARGET_WAITKIND_SPURIOUS instead.
1981 2017-04-05 Pedro Alves <palves@redhat.com>
1983 * remote-utils.c (remote_prepare, remote_open): Constify.
1984 * remote-utils.h (remote_prepare, remote_open): Constify.
1985 * server.c (captured_main): Constify 'port' handling.
1987 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1989 * Makefile.in (clean): Clear .deps.
1991 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1993 * .gitignore: Remove generated files, replace with wildcard.
1994 * (clean): Replace removal of generated files with wildcard.
1995 (version.c): Replace with...
1996 (version-generated.c): ...this.
1997 (xml-builtin.c): Replace with...
1998 (xml-builtin-generated.c): ...this.
1999 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2000 (%.c: *regformats*): Replace with...
2001 (%-generated.c: *regformats*): ...this.
2003 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2005 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2006 (xtensa_fill_gregset): Call collect_register_by_name for
2008 (xtensa_store_gregset): Call supply_register_by_name for
2011 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2013 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2014 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2015 (xtensa_store_gregset): Call supply_register for all registers in
2016 a0_regnum..a0_regnum + C0_NREGS range.
2018 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2020 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2021 (ax-ipa.o: ax.c): Remove.
2022 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2023 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2024 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2025 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2026 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2028 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2030 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2031 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2032 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2033 (errors-ipa.o: ../common/errors.c): Remove.
2034 (format-ipa.o: ../common/format.c): Remove.
2035 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2037 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2039 * Makefile.in (%-ipa.o: %.c): New rule.
2040 (tracepoint-ipa.o: tracepoint.c): Remove.
2041 (utils-ipa.o: utils.c): Remove.
2042 (remote-utils-ipa.o: remote-utils.c): Remove.
2043 (regcache-ipa.o: regcache.c): Remove.
2044 (i386-linux-ipa.o: i386-linux.c): Remove.
2045 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2046 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2047 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2048 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2049 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2050 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2051 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2052 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2053 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2054 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2055 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2056 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2057 (aarch64-ipa.o: aarch64.c): Remove.
2058 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2059 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2060 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2061 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2062 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2063 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2064 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2065 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2066 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2067 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2068 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2069 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2070 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2071 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2072 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2073 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2074 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2075 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2076 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2077 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2078 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2079 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2080 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2081 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2082 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2083 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2084 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2085 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2086 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2087 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2088 (tdesc-ipa.o: tdesc.c): Remove.
2089 (x32-linux-ipa.o: x32-linux.c): Remove.
2090 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2091 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2093 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2095 * Makefile.in (%.o: ../arch/%.c): New rule.
2096 (arm.o: ../arch/arm.c): Remove.
2097 (arm-linux.o: ../arch/arm-linux.c): Remove.
2098 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2099 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2101 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2103 * Makefile.in (%.o: ../nat/%.c): New rule.
2104 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2105 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2106 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2107 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2108 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2109 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2110 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2111 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2112 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2113 (linux-personality.o: ../nat/linux-personality.c): Remove.
2114 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2115 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2116 (x86-linux.o: ../nat/x86-linux.c): Remove.
2117 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2118 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2120 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2122 * Makefile.in (%.o: ../common/%.c): New rule.
2123 (signals.o: ../common/signals.c): Remove.
2124 (print-utils.o: ../common/print-utils.c): Remove.
2125 (rsp-low.o: ../common/rsp-low.c): Remove.
2126 (common-utils.o: ../common/common-utils.c): Remove.
2127 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2128 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2129 (vec.o: ../common/vec.c): Remove.
2130 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2131 (xml-utils.o: ../common/xml-utils.c): Remove.
2132 (ptid.o: ../common/ptid.c): Remove.
2133 (buffer.o: ../common/buffer.c): Remove.
2134 (format.o: ../common/format.c): Remove.
2135 (filestuff.o: ../common/filestuff.c): Remove.
2136 (agent.o: ../common/agent.c): Remove.
2137 (errors.o: ../common/errors.c): Remove.
2138 (environ.o: ../common/environ.c): Remove.
2139 (common-debug.o: ../common/common-debug.c): Remove.
2140 (cleanups.o: ../common/cleanups.c): Remove.
2141 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2142 (fileio.o: ../common/fileio.c): Remove.
2143 (common-regcache.o: ../common/common-regcache.c): Remove.
2144 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2145 (new-op.o: ../common/new-op.c): Remove.
2146 (btrace-common.o: ../common/btrace-common.c): Remove.
2148 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2150 * Makefile.in (%.o: ../target/%.c): New rule.
2151 (waitstatus.o: ../target/waitstatus.c): Remove.
2153 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2156 (%.c: ../regformats/%.dat,
2157 (%.c: ../regformats/arm/%.dat,
2158 (%.c: ../regformats/i386/%.dat,
2159 (%.c: ../regformats/rs6000/%.dat): New rules.
2160 (aarch64.c): Remove.
2161 (reg-arm.c): Remove.
2162 (arm-with-iwmmxt.c): Remove.
2163 (arm-with-vfpv2.c): Remove.
2164 (arm-with-vfpv3.c): Remove.
2165 (arm-with-neon.c): Remove.
2166 (reg-bfin.c): Remove.
2167 (reg-cris.c): Remove.
2168 (reg-crisv32.c): Remove.
2170 (i386-linux.c): Remove.
2171 (i386-avx.c): Remove.
2172 (i386-avx-linux.c): Remove.
2173 (i386-avx-avx512.c): Remove.
2174 (i386-avx-avx512-linux.c): Remove.
2175 (i386-mpx.c): Remove.
2176 (i386-mpx-linux.c): Remove.
2177 (i386-avx-mpx-avx512-pku.c): Remove.
2178 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2179 (i386-avx-mpx.c): Remove.
2180 (i386-avx-mpx-linux.c): Remove.
2181 (i386-mmx.c): Remove.
2182 (i386-mmx-linux.c): Remove.
2183 (reg-ia64.c): Remove.
2184 (reg-m32r.c): Remove.
2185 (reg-m68k.c): Remove.
2187 (mips-linux.c): Remove.
2188 (mips-dsp-linux.c): Remove.
2189 (mips64-linux.c): Remove.
2190 (mips64-dsp-linux.c): Remove.
2191 (nios2-linux.c): Remove.
2192 (powerpc-32.c): Remove.
2193 (powerpc-32l.c): Remove.
2194 (powerpc-altivec32l.c): Remove.
2195 (powerpc-cell32l.c): Remove.
2196 (powerpc-vsx32l.c): Remove.
2197 (powerpc-isa205-32l.c): Remove.
2198 (powerpc-isa205-altivec32l.c): Remove.
2199 (powerpc-isa205-vsx32l.c): Remove.
2200 (powerpc-e500l.c): Remove.
2201 (powerpc-64l.c): Remove.
2202 (powerpc-altivec64l.c): Remove.
2203 (powerpc-cell64l.c): Remove.
2204 (powerpc-vsx64l.c): Remove.
2205 (powerpc-isa205-64l.c): Remove.
2206 (powerpc-isa205-altivec64l.c): Remove.
2207 (powerpc-isa205-vsx64l.c): Remove.
2208 (s390-linux32.c): Remove.
2209 (s390-linux32v1.c): Remove.
2210 (s390-linux32v2.c): Remove.
2211 (s390-linux64.c): Remove.
2212 (s390-linux64v1.c): Remove.
2213 (s390-linux64v2.c): Remove.
2214 (s390-te-linux64.c): Remove.
2215 (s390-vx-linux64.c): Remove.
2216 (s390-tevx-linux64.c): Remove.
2217 (s390x-linux64.c): Remove.
2218 (s390x-linux64v1.c): Remove.
2219 (s390x-linux64v2.c): Remove.
2220 (s390x-te-linux64.c): Remove.
2221 (s390x-vx-linux64.c): Remove.
2222 (s390x-tevx-linux64.c): Remove.
2223 (tic6x-c64xp-linux.c): Remove.
2224 (tic6x-c64x-linux.c): Remove.
2225 (tic6x-c62x-linux.c): Remove.
2227 (reg-sparc64.c): Remove.
2228 (reg-spu.c): Remove.
2230 (amd64-linux.c): Remove.
2231 (amd64-avx.c): Remove.
2232 (amd64-avx-linux.c): Remove.
2233 (amd64-avx-avx512.c): Remove.
2234 (amd64-avx-avx512-linux.c): Remove.
2235 (amd64-mpx.c): Remove.
2236 (amd64-mpx-linux.c): Remove.
2237 (amd64-avx-mpx-avx512-pku.c): Remove.
2238 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2239 (amd64-avx-mpx.c): Remove.
2240 (amd64-avx-mpx-linux.c): Remove.
2242 (x32-linux.c): Remove.
2243 (x32-avx.c): Remove.
2244 (x32-avx-linux.c): Remove.
2245 (x32-avx-avx512.c): Remove.
2246 (x32-avx-avx512-linux.c): Remove.
2247 (reg-xtensa.c): Remove.
2248 (reg-tilegx.c): Remove.
2249 (reg-tilegx32.c): Remove.
2251 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2253 * Makefile.in (SFILES): Add "common/environ.c".
2254 (OBJS): Add "common/environ.h".
2256 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2258 * configure.ac: Check if the fs_base and gs_base members of
2259 `struct user_regs_struct' exist.
2260 * config.in: Regenerated.
2261 * configure: Likewise.
2263 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2265 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2267 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2268 (get_next_pcs_syscall_next_pc): Likewise.
2270 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2272 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2273 * nto-x86-low.c: Likewise.
2275 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2277 * Makefile.in: Include disable-implicit-rules.mk.
2279 2016-11-23 Pedro Alves <palves@redhat.com>
2281 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2282 (debug_vprintf): Use std::chrono::steady_clock instead of
2283 gettimeofday. Use '.' instead of ':'.
2284 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2285 (get_timestamp): Use std::chrono::steady_clock instead of
2288 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2290 * Makefile.in: Fix whitespace formatting.
2292 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2294 * Makefile.in (SFILES, OBS): Flatten list and order
2297 2016-11-23 Pedro Alves <palves@redhat.com>
2299 * event-loop.c (handle_file_event): Use warning.
2300 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2301 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2304 2016-11-23 Pedro Alves <palves@redhat.com>
2306 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2308 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2309 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2310 debug_printf and debug_flush for debug output.
2311 * server.c (handle_general_set): Likewise.
2312 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2315 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2317 * Makefile.in (.c.o): Replace rule with ...
2318 (%.o: %.c): ... this one.
2320 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2322 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2323 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2325 * configure.ac: Remove checks for the make program.
2326 * configure: Re-generate.
2328 2016-10-28 Pedro Alves <palves@redhat.com>
2330 * Makefile.in (CXX_DIALECT): Get from configure.
2331 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2332 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2333 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2334 * config.in: Regenerate.
2335 * configure: Regenerate.
2337 2016-10-27 Yao Qi <yao.qi@linaro.org>
2339 * linux-low.c (linux_supports_range_stepping): Return true if
2340 can_software_single_step return true.
2342 2016-10-27 Yao Qi <yao.qi@linaro.org>
2344 * inferiors.c (find_inferior_in_random): New function.
2345 * inferiors.h (find_inferior_in_random): Declare.
2346 * linux-low.c (linux_wait_for_event_filtered): Call
2347 find_inferior_in_random instead of find_inferior.
2349 2016-10-27 Yao Qi <yao.qi@linaro.org>
2351 * linux-low.c (linux_wait_1): If single-step breakpoints are
2352 inserted, remove them.
2354 2016-10-26 Pedro Alves <palves@redhat.com>
2356 * linux-low.c (handle_extended_wait): Link parent/child fork
2358 (linux_wait_1): Unlink them.
2359 (linux_set_resume_request): Ignore resume requests for
2360 already-resumed and unhandled fork child threads.
2361 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2362 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2364 (handle_v_requests) <vCont>: Don't call require_running.
2365 * server.h (in_queued_stop_replies): New declaration.
2367 2016-10-24 Yao Qi <yao.qi@linaro.org>
2370 * linux-aarch64-low.c (append_insns): Cast the return value to
2373 2016-10-10 Yao Qi <yao.qi@linaro.org>
2375 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2377 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2379 * target.c (target_supports_multi_process): New function, moved
2381 * target.h (target_supports_multi_process): ... here. Remove
2384 2016-10-05 Tom Tromey <tom@tromey.com>
2387 * tracepoint.c (handle_tracepoint_bkpts): Check
2388 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2390 2016-10-05 Yao Qi <yao.qi@linaro.org>
2392 * configure.srv: Update the path of arm-*.xml files.
2394 2016-10-05 Terry Guo <terry.guo@arm.com>
2395 Yao Qi <yao.qi@linaro.org>
2397 * Makefile.in: Adjust the path of rules.
2398 * configure.srv: Update the path of xml files.
2399 * regformats/arm-with-iwmmxt.dat: Regenerated.
2400 * regformats/arm-with-neon.dat: Likewise.
2401 * regformats/arm-with-vfpv2.dat: Likewise.
2402 * regformats/arm-with-vfpv3.dat Likewise.
2404 2016-09-30 Yao Qi <yao.qi@linaro.org>
2407 * target.c (target_stop_and_wait): Don't call
2408 target_continue_no_signal, use resume_stop instead.
2410 2016-09-26 Yao Qi <yao.qi@linaro.org>
2412 * linux-low.c (linux_wait_1): Call debug_exit.
2414 2016-09-23 Pedro Alves <palves@redhat.com>
2416 * Makefile.in (SFILES): Add common/new-op.c.
2417 (OBS): Add common/new-op.o.
2418 (new-op.o): New rule.
2420 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2422 * .gitinore: Ignore more files.
2424 2016-09-21 Yao Qi <yao.qi@linaro.org>
2426 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2429 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2431 * server.c (start_inferior): Call target_mourn_inferior instead of
2432 mourn_inferior; pass ptid_t argument to it.
2434 (handle_target_event): Likewise.
2435 * target.c (target_mourn_inferior): New function.
2436 * target.h (mourn_inferior): Delete macro.
2438 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2440 * linux-low.c (lwp_is_stepping): New function.
2442 2016-09-06 Carl Love <cel@us.ibm.com>
2444 * server.c (start_inferior): Fixed comment, requested comment change
2445 didn't get updated correctly. Removed reference to ptrace () call as
2446 it is only true on Linux systems.
2448 2016-09-06 Carl Love <cel@us.ibm.com>
2450 * server.c (start_inferior): Do not call
2451 function target_post_create_inferior () if the
2452 inferior process has already exited.
2454 2016-09-05 Pedro Alves <palves@redhat.com>
2456 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2457 (COMPILE.pre, CC_LD): Use CXX directly.
2458 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2459 * acinclude.m4: Don't include build-with-cxx.m4.
2460 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2461 * configure: Regenerate.
2463 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2466 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2467 call writing data to own_buf.
2469 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2471 * target.c (mywait): Call target_wait instead of
2473 (target_wait): New function.
2475 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2477 * server.c (start_inferior): New variable 'ptid'. Replace calls
2478 to the_target->resume by target_continue{,_no_signal}, depending
2480 * target.c (target_stop_and_wait): Call target_continue_no_signal
2481 instead of the_target->resume.
2482 (target_continue): New function.
2484 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2486 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2488 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2491 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2493 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2494 * linux-arm-low.c (ps_get_thread_area): Likewise.
2495 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2496 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2497 * linux-mips-low.c (ps_get_thread_area): Likewise.
2498 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2499 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2500 * linux-x86-low.c (ps_get_thread_area): Likewise.
2501 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2503 2016-08-19 Pedro Alves <palves@redhat.com>
2505 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2507 2016-08-19 Pedro Alves <palves@redhat.com>
2509 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2510 comment. Use memcpy instead of casting through unsigned long.
2512 2016-08-19 Pedro Alves <palves@redhat.com>
2514 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2515 allocating around 0x80000000.
2517 2016-08-19 Pedro Alves <palves@redhat.com>
2520 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2521 (x32-avx512-linux-ipa.o): New rules.
2522 * configure.ac (x86_64-*-linux*): New x32 check.
2523 * configure.srv (ipa_x32_linux_regobj): New.
2524 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2525 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2527 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2529 * configure: Regenerate.
2531 2016-08-09 Pedro Alves <palves@redhat.com>
2534 * Makefile.in (OBS): Add signals-state-save-restore.o.
2535 (signals-state-save-restore.o): New rule.
2536 * config.in: Regenerate.
2537 * configure: Regenerate.
2538 * linux-low.c: Include "signals-state-save-restore.h".
2539 (linux_create_inferior): Call
2540 restore_original_signals_state.
2541 * server.c: Include "dispositions-save-restore.h".
2542 (captured_main): Call save_original_signals_state.
2544 2016-08-05 Pedro Alves <palves@redhat.com>
2546 * configure: Regenerate.
2548 2016-08-04 Yao Qi <yao.qi@linaro.org>
2550 * linux-low.c (regsets_fetch_inferior_registers): Check
2551 errno is ESRCH or not.
2553 2016-08-02 Yao Qi <yao.qi@linaro.org>
2555 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2556 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2557 (thread_db_load_search): Update.
2558 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2559 td_ta_set_event and td_ta_event_getmsg.
2561 2016-07-26 Pedro Alves <palves@redhat.com>
2564 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2565 of unsigned long for 64-bit registers and use uint32_t instead of
2566 unsigned int for 32-bit registers.
2568 2016-07-26 Pedro Alves <palves@redhat.com>
2570 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2573 2016-07-21 Tom Tromey <tom@tromey.com>
2575 * configure: Rebuild.
2577 2016-07-21 Yao Qi <yao.qi@linaro.org>
2579 * mem-break.c (find_gdb_breakpoint): Cast bp to
2580 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2582 2016-07-21 Yao Qi <yao.qi@linaro.org>
2584 * server.c (handle_v_requests): Support s and S actions
2585 if target_supports_software_single_step return true.
2587 2016-07-21 Yao Qi <yao.qi@linaro.org>
2589 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2590 is resume_step, call maybe_hw_step.
2591 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2593 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2595 (proceed_one_lwp): If resume request is resume_step, install
2596 reinsert breakpoints and call maybe_hw_step.
2598 2016-07-21 Yao Qi <yao.qi@linaro.org>
2600 * linux-low.c (proceed_one_lwp): Declare.
2601 (linux_resume_one_thread): Remove local variable 'step'.
2602 Lift code enqueue signal. Call proceed_one_lwp instead of
2603 linux_resume_one_lwp.
2605 2016-07-21 Yao Qi <yao.qi@linaro.org>
2607 * linux-low.c (linux_resume_one_thread): Call
2608 enqueue_pending_signal.
2610 2016-07-21 Yao Qi <yao.qi@linaro.org>
2612 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2613 * inferiors.c (do_restore_current_thread_cleanup): New function.
2614 (make_cleanup_restore_current_thread): Likewise.
2615 * linux-low.c (install_software_single_step_breakpoints): Call
2616 make_cleanup_restore_current_thread. Switch current_thread to
2619 2016-07-21 Yao Qi <yao.qi@linaro.org>
2621 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2622 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2623 (clone_one_breakpoint): Likewise.
2624 (delete_reinsert_breakpoints): Change parameter to thread.
2626 (has_reinsert_breakpoints): Likewise.
2627 (uninsert_reinsert_breakpoints): Likewise.
2628 (reinsert_reinsert_breakpoints): Likewise.
2629 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2630 (delete_reinsert_breakpoints): Likewise.
2631 (reinsert_reinsert_breakpoints): Likewise.
2632 (uninsert_reinsert_breakpoints): Likewise.
2633 (has_reinsert_breakpoints): Likewise.
2635 2016-07-21 Yao Qi <yao.qi@linaro.org>
2637 * inferiors.c (get_thread_process): Make parameter const.
2638 * inferiors.h (get_thread_process): Update declaration.
2639 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2640 Add new parameters child_thread and parent_thread. Callers
2642 * mem-break.h (clone_all_breakpoints): Update declaration.
2644 2016-07-21 Yao Qi <yao.qi@linaro.org>
2646 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2647 <command_list, handler>: Remove.
2648 (struct gdb_breakpoint): New.
2649 (struct other_breakpoint): New.
2650 (struct reinsert_breakpoint): New.
2651 (is_gdb_breakpoint): New function.
2652 (any_persistent_commands): Update command_list if
2653 is_gdb_breakpoint returns true.
2654 (set_breakpoint): Create breakpoints according to their types.
2655 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2656 (set_gdb_breakpoint_1): Likewise.
2657 (set_gdb_breakpoint): Likewise.
2658 (clear_breakpoint_conditions): Change parameter type to
2659 'struct gdb_breakpoint *'.
2660 (clear_breakpoint_commands): Likewise.
2661 (clear_breakpoint_conditions_and_commands): Likewise.
2662 (add_condition_to_breakpoint): Likewise.
2663 (add_breakpoint_condition): Likewise.
2664 (add_commands_to_breakpoint): Likewise.
2665 (check_breakpoints): Check other_breakpoint.
2666 (clone_one_breakpoint): Clone breakpopint according to its type.
2667 * mem-break.h (struct gdb_breakpoint): Declare.
2668 (set_gdb_breakpoint): Update declaration.
2669 (clear_breakpoint_conditions_and_commands): Likewise.
2670 (add_breakpoint_condition): Likewise.
2671 (add_breakpoint_commands): Likewise.
2672 * server.c (process_point_options): Change parameter type to
2673 'struct gdb_breakpoint *'.
2675 2016-07-21 Yao Qi <yao.qi@linaro.org>
2677 * mem-break.c (set_breakpoint_at): Rename it to ...
2678 (set_breakpoint_type_at): ... it.
2679 (set_breakpoint_at): Call set_breakpoint_type_at.
2680 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2681 * mem-break.h (set_breakpoint_at): Update comments.
2683 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2685 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2687 (nios2_store_gregset): Likewise.
2689 2016-07-01 Pedro Alves <palves@redhat.com>
2690 Antoine Tremblay <antoine.tremblay@ericsson.com>
2692 * linux-low.c: Change interface to take the target lwp_info
2693 pointer directly and return void. Handle detaching from a zombie
2695 (linux_detach_lwp_callback): New function.
2696 (linux_detach): Detach from the leader thread after detaching from
2699 2016-06-28 Yao Qi <yao.qi@linaro.org>
2701 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2702 for variable new_offset.
2703 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2704 (aarch64_ftrace_insn_reloc_cb): Likewise.
2705 (aarch64_ftrace_insn_reloc_tb): Likewise.
2706 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2707 PRIx64 instead of PRIx32.
2709 2016-06-28 Yao Qi <yao.qi@linaro.org>
2711 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2712 (the_low_target): Install arm_get_syscall_trapinfo.
2714 2016-06-28 Yao Qi <yao.qi@linaro.org>
2716 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2718 (the_low_target): Install aarch64_get_syscall_trapinfo.
2720 2016-06-28 Yao Qi <yao.qi@linaro.org>
2722 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2724 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2725 Remove parameter sysno.
2726 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2729 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2731 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2732 (s390_emit_ne_goto): Likewise.
2733 (s390_emit_lt_goto): Likewise.
2734 (s390_emit_le_goto): Likewise.
2735 (s390_emit_gt_goto): Likewise.
2736 (s390_emit_ge_goto): Likewise.
2737 (s390x_emit_eq_goto): Likewise.
2738 (s390x_emit_ne_goto): Likewise.
2739 (s390x_emit_lt_goto): Likewise.
2740 (s390x_emit_le_goto): Likewise.
2741 (s390x_emit_gt_goto): Likewise.
2742 (s390x_emit_ge_goto): Likewise.
2743 (s390_emit_ops_impl): Mark variable static.
2744 (s390x_emit_ops): Likewise.
2746 2016-06-17 Yao Qi <yao.qi@linaro.org>
2748 * linux-low.c (handle_extended_wait): Call
2749 uninsert_reinsert_breakpoints for the parent process. Remove
2750 reinsert breakpoints from the child process. Reinsert them to
2751 the parent process when vfork is done.
2752 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2753 (reinsert_reinsert_breakpoints): New function.
2754 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2755 (reinsert_reinsert_breakpoints): Declare.
2757 2016-06-17 Yao Qi <yao.qi@linaro.org>
2759 * linux-low.c (handle_extended_wait): If the parent is doing
2760 step-over, remove the reinsert breakpoints from the forked child.
2762 2016-06-17 Yao Qi <yao.qi@linaro.org>
2764 * linux-low.c (unsuspend_all_lwps): Declare.
2765 (linux_low_filter_event): If thread exited, call finish_step_over.
2766 If step-over is finished, unsuspend other threads.
2768 2016-06-17 Yao Qi <yao.qi@linaro.org>
2770 * linux-low.c (linux_resume_one_lwp_throw): Assert
2771 has_reinsert_breakpoints returns false.
2772 * mem-break.c (delete_disabled_breakpoints): Assert
2773 bp type isn't reinsert_breakpoint.
2775 2016-06-17 Yao Qi <yao.qi@linaro.org>
2777 * linux-low.c (maybe_hw_step): New function.
2778 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2779 (finish_step_over): Switch current_thread to lwp temporarily,
2780 and assert has_reinsert_breakpoints returns true.
2781 (proceed_one_lwp): Call maybe_hw_step.
2782 * mem-break.c (has_reinsert_breakpoints): New function.
2783 * mem-break.h (has_reinsert_breakpoints): Declare.
2785 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2787 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2789 2016-05-17 Yao Qi <yao.qi@linaro.org>
2791 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2792 instead of find_inferior.
2794 2016-05-05 Yao Qi <yao.qi@linaro.org>
2796 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2797 Initialize res to zero.
2799 2016-05-05 Yao Qi <yao.qi@linaro.org>
2801 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2804 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2806 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2807 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2808 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2810 2016-04-28 Par Olsson <par.olsson@windriver.com>
2811 Simon Marchi <simon.marchi@ericsson.com>
2813 * tracepoint.c (write_inferior_int8): New function.
2814 (cmd_qtenable_disable): Write enable flag using
2815 write_inferior_int8.
2817 2016-04-25 Yao Qi <yao.qi@linaro.org>
2819 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2820 (need_step_over_p): Return zero if the LWP has pending signals
2821 can be delivered on software single step target.
2823 2016-04-25 Yao Qi <yao.qi@linaro.org>
2825 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2826 return instead of error.
2828 2016-04-22 Yao Qi <yao.qi@linaro.org>
2830 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2833 2016-04-22 Yao Qi <yao.qi@linaro.org>
2835 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2836 signal when stepping over breakpoint with software single
2839 2016-04-21 Pedro Alves <palves@redhat.com>
2841 * linux-s390-low.c (s390_collect_ptrace_register)
2842 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2844 (s390_check_regset): Use void * instead of gdb_byte *.
2846 2016-04-20 Pedro Alves <palves@redhat.com>
2848 * configure: Renegerate.
2850 2016-04-20 Yao Qi <yao.qi@linaro.org>
2852 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2853 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2855 (arm_store_gregset): Likewise.
2857 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2859 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2860 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2861 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2862 (amd64-avx-mpx-linux.c): New rules.
2863 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2864 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2865 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2866 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2867 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2868 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2869 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2870 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2871 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2872 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2873 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2874 * linux-x86-low.c (x86_linux_read_description): Add case for
2875 X86_XSTATE_AVX_MPX_MASK.
2876 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2877 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2878 init_registers_i386_avx_mpx_linux.
2879 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2880 (initialize_low_tracepoint): Call
2881 init_registers_i386_avx_mpx_linux.
2882 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2883 (initialize_low_tracepoint): Call
2884 init_registers_amd64_avx_mpx_linux.
2885 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2886 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2887 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2890 2016-04-18 Pedro Alves <palves@redhat.com>
2892 * configure: Regenerate.
2894 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2896 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2897 (aarch64_emit_sub): Likewise.
2899 2016-04-12 Pedro Alves <palves@redhat.com>
2901 * utils.c (prepare_to_throw_exception): Delete.
2903 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2905 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2907 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2909 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2911 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2913 * linux-aarch64-ipa.c: Add <elf.h> include.
2914 * linux-ppc-ipa.c: Add <elf.h> include.
2915 * linux-s390-ipa.c: Add <elf.h> include.
2917 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2919 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2920 (get_raw_reg_ptr): Likewise.
2921 (get_trace_state_variable_value_ptr): Likewise.
2922 (set_trace_state_variable_value_ptr): Likewise.
2923 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2926 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2927 Marcin Kościelnicki <koriakin@0x04.net>
2930 * linux-ppc-low.c (emit_insns): New function.
2931 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2932 (ppc_emit_prologue): New function.
2933 (ppc_emit_epilogue): New function.
2934 (ppc_emit_add): New function.
2935 (ppc_emit_sub): New function.
2936 (ppc_emit_mul): New function.
2937 (ppc_emit_lsh): New function.
2938 (ppc_emit_rsh_signed): New function.
2939 (ppc_emit_rsh_unsigned): New function.
2940 (ppc_emit_ext): New function.
2941 (ppc_emit_zero_ext): New function.
2942 (ppc_emit_log_not): New function.
2943 (ppc_emit_bit_and): New function.
2944 (ppc_emit_bit_or): New function.
2945 (ppc_emit_bit_xor): New function.
2946 (ppc_emit_bit_not): New function.
2947 (ppc_emit_equal): New function.
2948 (ppc_emit_less_signed): New function.
2949 (ppc_emit_less_unsigned): New function.
2950 (ppc_emit_ref): New function.
2951 (ppc_emit_const): New function.
2952 (ppc_emit_reg): New function.
2953 (ppc_emit_pop): New function.
2954 (ppc_emit_stack_flush): New function.
2955 (ppc_emit_swap): New function.
2956 (ppc_emit_stack_adjust): New function.
2957 (ppc_emit_call): New function.
2958 (ppc_emit_int_call_1): New function.
2959 (ppc_emit_void_call_2): New function.
2960 (ppc_emit_if_goto): New function.
2961 (ppc_emit_goto): New function.
2962 (ppc_emit_eq_goto): New function.
2963 (ppc_emit_ne_goto): New function.
2964 (ppc_emit_lt_goto): New function.
2965 (ppc_emit_le_goto): New function.
2966 (ppc_emit_gt_goto): New function.
2967 (ppc_emit_ge_goto): New function.
2968 (ppc_write_goto_address): New function.
2969 (ppc_emit_ops_impl): New static variable.
2970 (ppc64v1_emit_prologue): New function.
2971 (ppc64v2_emit_prologue): New function.
2972 (ppc64_emit_epilogue): New function.
2973 (ppc64_emit_add): New function.
2974 (ppc64_emit_sub): New function.
2975 (ppc64_emit_mul): New function.
2976 (ppc64_emit_lsh): New function.
2977 (ppc64_emit_rsh_signed): New function.
2978 (ppc64_emit_rsh_unsigned): New function.
2979 (ppc64_emit_ext): New function.
2980 (ppc64_emit_zero_ext): New function.
2981 (ppc64_emit_log_not): New function.
2982 (ppc64_emit_bit_and): New function.
2983 (ppc64_emit_bit_or): New function.
2984 (ppc64_emit_bit_xor): New function.
2985 (ppc64_emit_bit_not): New function.
2986 (ppc64_emit_equal): New function.
2987 (ppc64_emit_less_signed): New function.
2988 (ppc64_emit_less_unsigned): New function.
2989 (ppc64_emit_ref): New function.
2990 (ppc64_emit_const): New function.
2991 (ppc64v1_emit_reg): New function.
2992 (ppc64v2_emit_reg): New function.
2993 (ppc64_emit_pop): New function.
2994 (ppc64_emit_stack_flush): New function.
2995 (ppc64_emit_swap): New function.
2996 (ppc64v1_emit_call): New function.
2997 (ppc64v2_emit_call): New function.
2998 (ppc64v1_emit_int_call_1): New function.
2999 (ppc64v2_emit_int_call_1): New function.
3000 (ppc64v1_emit_void_call_2): New function.
3001 (ppc64v2_emit_void_call_2): New function.
3002 (ppc64_emit_if_goto): New function.
3003 (ppc64_emit_eq_goto): New function.
3004 (ppc64_emit_ne_goto): New function.
3005 (ppc64_emit_lt_goto): New function.
3006 (ppc64_emit_le_goto): New function.
3007 (ppc64_emit_gt_goto): New function.
3008 (ppc64_emit_ge_goto): New function.
3009 (ppc64v1_emit_ops_impl): New static variable.
3010 (ppc64v2_emit_ops_impl): New static variable.
3011 (ppc_emit_ops): New function.
3012 (linux_low_target): Wire in ppc_emit_ops.
3014 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3015 Marcin Kościelnicki <koriakin@0x04.net>
3018 * Makefile.in: Add powerpc-*-ipa.o
3019 * configure.srv: Add ipa_obj for powerpc*-linux.
3020 * linux-ppc-ipa.c: New file.
3021 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3023 (PPC_FIELD): New macro.
3024 (PPC_SEXT): New macro.
3025 (PPC_OP6): New macro.
3026 (PPC_BO): New macro.
3027 (PPC_LI): New macro.
3028 (PPC_BD): New macro.
3029 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3030 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3031 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3032 (ppc_get_thread_area): New function.
3033 (is_elfv2_inferior): New function.
3034 (gen_ds_form): New function.
3035 (GEN_STD): New macro.
3036 (GEN_STDU): New macro.
3037 (GEN_LD): New macro.
3038 (GEN_LDU): New macro.
3039 (gen_d_form): New function.
3040 (GEN_ADDI): New macro.
3041 (GEN_ADDIS): New macro.
3042 (GEN_LI): New macro.
3043 (GEN_LIS): New macro.
3044 (GEN_ORI): New macro.
3045 (GEN_ORIS): New macro.
3046 (GEN_LWZ): New macro.
3047 (GEN_STW): New macro.
3048 (GEN_STWU): New macro.
3049 (gen_xfx_form): New function.
3050 (GEN_MFSPR): New macro.
3051 (GEN_MTSPR): New macro.
3052 (GEN_MFCR): New macro.
3053 (GEN_MTCR): New macro.
3054 (GEN_SYNC): New macro.
3055 (GEN_LWSYNC): New macro.
3056 (gen_x_form): New function.
3057 (GEN_OR): New macro.
3058 (GEN_MR): New macro.
3059 (GEN_LWARX): New macro.
3060 (GEN_STWCX): New macro.
3061 (GEN_CMPW): New macro.
3062 (gen_md_form): New function.
3063 (GEN_RLDICL): New macro.
3064 (GEN_RLDICR): New macro.
3065 (gen_i_form): New function.
3067 (GEN_BL): New macro.
3068 (gen_b_form): New function.
3069 (GEN_BNE): New macro.
3070 (GEN_LOAD): New macro.
3071 (GEN_STORE): New macro.
3072 (gen_limm): New function.
3073 (gen_atomic_xchg): New function.
3074 (gen_call): New function.
3075 (ppc_relocate_instruction): New function.
3076 (ppc_install_fast_tracepoint_jump_pad): New function.
3077 (ppc_get_min_fast_tracepoint_insn_len): New function.
3078 (ppc_get_ipa_tdesc_idx): New function.
3079 (the_low_target): Wire in the new functions.
3080 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3082 * linux-ppc-tdesc.h: New file.
3084 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3086 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3087 (alloc_jump_pad_buffer): New function.
3088 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3089 (alloc_jump_pad_buffer): New function.
3090 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3091 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3092 (alloc_jump_pad_buffer): New function.
3093 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3094 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3095 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3096 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3098 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3100 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3101 * linux-amd64-ipa.c: Likewise.
3102 * linux-i386-ipa.c: Likewise.
3103 * linux-s390-ipa.c: Likewise.
3104 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3105 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3106 set_trace_state_variable_value_ptr.
3107 (struct ipa_sym_addresses): Likewise.
3108 (symbol_list): Likewise.
3109 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3110 accessing gdb_collect directly.
3111 (gdb_collect_ptr_type): New typedef.
3112 (get_raw_reg_ptr_type): New typedef.
3113 (get_trace_state_variable_value_ptr_type): New typedef.
3114 (set_trace_state_variable_value_ptr_type): New typedef.
3115 (gdb_collect_ptr): New global.
3116 (get_raw_reg_ptr): New global.
3117 (get_trace_state_variable_value_ptr): New global.
3118 (set_trace_state_variable_value_ptr): New global.
3119 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3120 accessing get_raw_reg directly.
3121 (get_get_tsv_func_addr): Likewise for
3122 get_trace_state_variable_value_ptr.
3123 (get_set_tsv_func_addr): Likewise for
3124 set_trace_state_variable_value_ptr.
3125 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3127 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3129 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3131 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3133 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3135 (relocate_instruction): Remove own_buf.
3136 * server.c (own_buf): Make global.
3137 (handle_v_requests): Make global.
3138 * server.h (own_buf): New declaration.
3139 (handle_v_requests): New prototype.
3141 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3144 * linux-s390-low.c (add_insns): New function.
3145 (s390_emit_prologue): New function.
3146 (s390_emit_epilogue): New function.
3147 (s390_emit_add): New function.
3148 (s390_emit_sub): New function.
3149 (s390_emit_mul): New function.
3150 (s390_emit_lsh): New function.
3151 (s390_emit_rsh_signed): New function.
3152 (s390_emit_rsh_unsigned): New function.
3153 (s390_emit_ext): New function.
3154 (s390_emit_log_not): New function.
3155 (s390_emit_bit_and): New function.
3156 (s390_emit_bit_or): New function.
3157 (s390_emit_bit_xor): New function.
3158 (s390_emit_bit_not): New function.
3159 (s390_emit_equal): New function.
3160 (s390_emit_less_signed): New function.
3161 (s390_emit_less_unsigned): New function.
3162 (s390_emit_ref): New function.
3163 (s390_emit_if_goto): New function.
3164 (s390_emit_goto): New function.
3165 (s390_write_goto_address): New function.
3166 (s390_emit_litpool): New function.
3167 (s390_emit_const): New function.
3168 (s390_emit_call): New function.
3169 (s390_emit_reg): New function.
3170 (s390_emit_pop): New function.
3171 (s390_emit_stack_flush): New function.
3172 (s390_emit_zero_ext): New function.
3173 (s390_emit_swap): New function.
3174 (s390_emit_stack_adjust): New function.
3175 (s390_emit_set_r2): New function.
3176 (s390_emit_int_call_1): New function.
3177 (s390_emit_void_call_2): New function.
3178 (s390_emit_eq_goto): New function.
3179 (s390_emit_ne_goto): New function.
3180 (s390_emit_lt_goto): New function.
3181 (s390_emit_le_goto): New function.
3182 (s390_emit_gt_goto): New function.
3183 (s390_emit_ge_goto): New function.
3184 (s390x_emit_prologue): New function.
3185 (s390x_emit_epilogue): New function.
3186 (s390x_emit_add): New function.
3187 (s390x_emit_sub): New function.
3188 (s390x_emit_mul): New function.
3189 (s390x_emit_lsh): New function.
3190 (s390x_emit_rsh_signed): New function.
3191 (s390x_emit_rsh_unsigned): New function.
3192 (s390x_emit_ext): New function.
3193 (s390x_emit_log_not): New function.
3194 (s390x_emit_bit_and): New function.
3195 (s390x_emit_bit_or): New function.
3196 (s390x_emit_bit_xor): New function.
3197 (s390x_emit_bit_not): New function.
3198 (s390x_emit_equal): New function.
3199 (s390x_emit_less_signed): New function.
3200 (s390x_emit_less_unsigned): New function.
3201 (s390x_emit_ref): New function.
3202 (s390x_emit_if_goto): New function.
3203 (s390x_emit_const): New function.
3204 (s390x_emit_call): New function.
3205 (s390x_emit_reg): New function.
3206 (s390x_emit_pop): New function.
3207 (s390x_emit_stack_flush): New function.
3208 (s390x_emit_zero_ext): New function.
3209 (s390x_emit_swap): New function.
3210 (s390x_emit_stack_adjust): New function.
3211 (s390x_emit_int_call_1): New function.
3212 (s390x_emit_void_call_2): New function.
3213 (s390x_emit_eq_goto): New function.
3214 (s390x_emit_ne_goto): New function.
3215 (s390x_emit_lt_goto): New function.
3216 (s390x_emit_le_goto): New function.
3217 (s390x_emit_gt_goto): New function.
3218 (s390x_emit_ge_goto): New function.
3219 (s390_emit_ops): New function.
3220 (struct linux_target_ops): Fill in emit_ops hook.
3222 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3225 * Makefile.in: Add s390 IPA files.
3226 * configure.srv: Build IPA for s390.
3227 * linux-s390-ipa.c: New file.
3228 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3229 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3230 (tdesc_s390_linux32): Likewise.
3231 (init_registers_s390_linux32v1): Likewise.
3232 (tdesc_s390_linux32v1): Likewise.
3233 (init_registers_s390_linux32v2): Likewise.
3234 (tdesc_s390_linux32v2): Likewise.
3235 (init_registers_s390_linux64): Likewise.
3236 (tdesc_s390_linux64): Likewise.
3237 (init_registers_s390_linux64v1): Likewise.
3238 (tdesc_s390_linux64v1): Likewise.
3239 (init_registers_s390_linux64v2): Likewise.
3240 (tdesc_s390_linux64v2): Likewise.
3241 (init_registers_s390_te_linux64): Likewise.
3242 (tdesc_s390_te_linux64): Likewise.
3243 (init_registers_s390_vx_linux64): Likewise.
3244 (tdesc_s390_vx_linux64): Likewise.
3245 (init_registers_s390_tevx_linux64): Likewise.
3246 (tdesc_s390_tevx_linux64): Likewise.
3247 (init_registers_s390x_linux64): Likewise.
3248 (tdesc_s390x_linux64): Likewise.
3249 (init_registers_s390x_linux64v1): Likewise.
3250 (tdesc_s390x_linux64v1): Likewise.
3251 (init_registers_s390x_linux64v2): Likewise.
3252 (tdesc_s390x_linux64v2): Likewise.
3253 (init_registers_s390x_te_linux64): Likewise.
3254 (tdesc_s390x_te_linux64): Likewise.
3255 (init_registers_s390x_vx_linux64): Likewise.
3256 (tdesc_s390x_vx_linux64): Likewise.
3257 (init_registers_s390x_tevx_linux64): Likewise.
3258 (tdesc_s390x_tevx_linux64): Likewise.
3259 (have_hwcap_s390_vx): New static variable.
3260 (s390_arch_setup): Fill have_hwcap_s390_vx.
3261 (s390_get_thread_area): New function.
3262 (s390_ft_entry_gpr_esa): New const.
3263 (s390_ft_entry_gpr_zarch): New const.
3264 (s390_ft_entry_misc): New const.
3265 (s390_ft_entry_fr): New const.
3266 (s390_ft_entry_vr): New const.
3267 (s390_ft_main_31): New const.
3268 (s390_ft_main_64): New const.
3269 (s390_ft_exit_fr): New const.
3270 (s390_ft_exit_vr): New const.
3271 (s390_ft_exit_misc): New const.
3272 (s390_ft_exit_gpr_esa): New const.
3273 (s390_ft_exit_gpr_zarch): New const.
3274 (append_insns): New function.
3275 (s390_relocate_instruction): New function.
3276 (s390_install_fast_tracepoint_jump_pad): New function.
3277 (s390_get_min_fast_tracepoint_insn_len): New function.
3278 (s390_get_ipa_tdesc_idx): New function.
3279 (struct linux_target_ops): Wire in the above functions.
3280 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3281 * linux-s390-tdesc.h: New file.
3283 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3285 * linux-s390-low.c (s390_supports_tracepoints): New function.
3286 (struct linux_target_ops): Fill supports_tracepoints hook.
3288 2016-03-18 Yao Qi <yao.qi@linaro.org>
3290 * linux-low.c (lwp_signal_can_be_delivered): New function.
3291 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3293 2016-03-18 Yao Qi <yao.qi@linaro.org>
3295 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3296 0 if signal is enqueued. Remove 'signal' from one debugging
3297 message. Move one debugging message to some lines below.
3298 Remove code setting 'signal' to 0.
3300 2016-03-18 Yao Qi <yao.qi@linaro.org>
3302 * linux-low.c (linux_low_filter_event): Remove redundant
3303 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3305 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3307 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3308 (struct linux_target_ops): Wire in the above.
3310 2016-03-03 Yao Qi <yao.qi@linaro.org>
3312 * linux-low.c: Update comments to start_step_over.
3314 2016-03-03 Yao Qi <yao.qi@linaro.org>
3317 * linux-low.c (handle_extended_wait): Set child suspended
3318 if event_lwp->bp_reinsert isn't zero.
3320 2016-03-02 Yao Qi <yao.qi@linaro.org>
3322 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3323 enqueue_pending_signal.
3325 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3327 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3330 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3332 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3333 (s390_regmap_3264) [!__s390x__]: New global.
3334 (s390_collect_ptrace_register): Skip map entries containing -1.
3335 (s390_supply_ptrace_register): Ditto.
3336 (s390_fill_gprs_high): New function.
3337 (s390_store_gprs_high): New function.
3338 (s390_regsets): Add NT_S390_HIGH_GPRS.
3339 (s390_get_hwcap): Enable on 31-bit.
3340 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3341 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3342 Detect NT_S390_HIGH_GPRS.
3343 (s390_usrregs_info_3264): Enable on 31-bit.
3344 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3345 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3347 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3350 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3351 * configure.srv: Ditto.
3352 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3353 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3354 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3355 (init_registers_amd64_linux): Remove prototype.
3356 (tdesc_amd64_linux): Remove declaration.
3357 (get_ipa_tdesc): New function.
3358 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3359 initialize remaining tdescs.
3360 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3361 (init_registers_i386_linux): Remove prototype.
3362 (tdesc_i386_linux): Remove declaration.
3363 (get_ipa_tdesc): New function.
3364 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3365 initialize remaining tdescs.
3366 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3367 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3368 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3369 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3370 (x86_get_ipa_tdesc_idx): New function.
3371 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3372 * linux-x86-tdesc.h: New file.
3373 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3374 (target_get_ipa_tdesc_idx): New macro.
3375 * tracepoint.c (ipa_tdesc_idx): New macro.
3376 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3377 (symbol_list): Add ipa_tdesc_idx.
3378 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3379 (ipa_tdesc): Remove.
3380 (ipa_tdesc_idx): New variable.
3381 (get_context_regcache): Use get_ipa_tdesc.
3382 (gdb_collect): Ditto.
3384 * tracepoint.h (get_ipa_tdesc): New prototype.
3385 (ipa_tdesc): Remove.
3387 2016-02-24 Pedro Alves <palves@redhat.com>
3389 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3390 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3391 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3392 Factor out common code between the USE_SIGTRAP_SIGINFO and
3393 !USE_SIGTRAP_SIGINFO blocks.
3394 (linux_low_filter_event): Call save_stop_reason instead of
3395 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3397 (linux_wait_1): Update comments.
3399 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3401 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3402 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3403 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3404 ppc_insert_point, ppc_remove_point.
3406 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3408 * linux-s390-low.c (s390_supports_z_point_type): New function.
3409 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3411 2016-02-16 Yao Qi <yao.qi@linaro.org>
3413 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3414 PC. Get pc from regcache_read_pc.
3416 2016-02-12 Yao Qi <yao.qi@linaro.org>
3418 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3419 or linux_get_pc_32bit.
3420 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3422 2016-02-12 Yao Qi <yao.qi@linaro.org>
3424 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3425 arm_linux_get_next_pcs_fixup.
3427 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3429 * tracepoint.c (x_tracepoint_action_download): Change
3430 write_inferior_data_ptr to write_inferior_data_pointer.
3431 (cmd_qtstart): Likewise.
3432 (write_inferior_data_ptr): Remove.
3433 (download_agent_expr): Change write_inferior_data_ptr to
3434 write_inferior_data_pointer.
3435 (download_tracepoint_1): Likewise.
3436 (download_tracepoint): Likewise.
3437 (download_trace_state_variables): Likewise.
3439 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3440 Marcin Kościelnicki <koriakin@0x04.net>
3442 * tracepoint.c (struct tracepoint_action_ops): Remove.
3443 (struct tracepoint_action): Remove ops.
3444 (m_tracepoint_action_download, r_tracepoint_action_download)
3445 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3446 size and offset accordingly.
3447 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3448 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3449 (tracepoint_action_send, tracepoint_action_download): New functions.
3450 Helpers for trace action handlers.
3451 (add_tracepoint_action): Remove setup actions ops.
3452 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3454 2016-02-10 Yao Qi <yao.qi@linaro.org>
3456 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3458 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3460 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3462 * configure: Regenerate.
3464 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3466 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3467 void * to gdb_byte *.
3468 * linux-low.c (siginfo_fixup): Likewise.
3469 (linux_xfer_siginfo): Likewise.
3470 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3472 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3474 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3476 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3478 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3480 * linux-x86-low.c [__x86_64__]: Include
3481 "nat/amd64-linux-siginfo.h".
3482 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3483 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3484 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3485 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3486 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3487 (cpt_si_fd, si_timerid, si_overrun): Move from
3488 nat/amd64-linux-siginfo.c.
3489 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3491 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3493 * server.c (skip_to_semicolon): Remove.
3494 (process_point_options): Use strchrnul instead of
3497 2016-01-26 Yao Qi <yao.qi@linaro.org>
3499 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3500 * linux-low.c (install_software_single_step_breakpoints): Don't
3501 call regcache_read_pc.
3502 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3505 2016-01-26 Yao Qi <yao.qi@linaro.org>
3507 * linux-low.c (install_software_single_step_breakpoints): Call
3508 regcache_read_pc instead of get_pc.
3510 2016-01-26 Yao Qi <yao.qi@linaro.org>
3512 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3513 (unblock_async_io): Rename to ...
3514 (block_unblock_async_io): ... it. New function.
3515 (enable_async_io): Don't install SIGIO handler. Unblock it
3517 (disable_async_io): Don't ignore SIGIO. Block it instead.
3518 (initialize_async_io): Install SIGIO handler. Don't call
3521 2016-01-26 Yao Qi <yao.qi@linaro.org>
3523 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3524 first character is '\003', call *the_target->request_interrupt.
3526 2016-01-25 Yao Qi <yao.qi@linaro.org>
3528 * remote-utils.c (new_thread_notify): Remove.
3529 (dead_thread_notify): Likewise.
3530 * remote-utils.h (new_thread_notify): Remove declaration.
3531 (dead_thread_notify): Likewise.
3533 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3535 * gdb.trace/pending.exp: Fix expected message on continue.
3537 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3539 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3540 it works properly on big-endian machines where sizeof (CORE_ADDR)
3543 2016-01-21 Pedro Alves <palves@redhat.com>
3545 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3546 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3547 * configure: Regenerate.
3549 2016-01-21 Yao Qi <yao.qi@linaro.org>
3551 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3552 is_thumb and set it according to CPSR saved on the stack.
3553 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3554 arm_sigreturn_next_pc.
3556 2016-01-18 Yao Qi <yao.qi@linaro.org>
3558 * linux-low.c (linux_set_pc_64bit): New function.
3559 (linux_get_pc_64bit): New function.
3560 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3562 * linux-sparc-low.c (debug_threads): Remove declaration.
3563 (sparc_get_pc): Remove.
3564 (the_low_target): Use linux_get_pc_64bit instead of
3566 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3567 (the_low_target): Use linux_get_pc_64bit and
3570 2016-01-18 Yao Qi <yao.qi@linaro.org>
3572 * linux-arm-low.c (debug_threads): Remove declaration.
3573 (arm_get_pc, arm_set_pc): Remove.
3574 (the_low_target): Use linux_get_pc_32bit and
3576 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3577 (the_low_target): Use linux_get_pc_32bit and
3579 * linux-cris-low.c (debug_threads): Remove declaration.
3580 (cris_get_pc, cris_set_pc,): Remove.
3581 (the_low_target): Use linux_get_pc_32bit and
3583 * linux-crisv32-low.c (debug_threads): Remove declaration.
3584 (cris_get_pc, cris_set_pc): Remove.
3585 (the_low_target): Use linux_get_pc_32bit and
3587 * linux-low.c: Include inttypes.h.
3588 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3589 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3590 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3591 (the_low_target): Use linux_get_pc_32bit and
3593 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3594 (the_low_target): Use linux_get_pc_32bit and
3596 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3597 (the_low_target): Use linux_get_pc_32bit and
3599 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3600 (the_low_target): Use linux_get_pc_32bit and
3602 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3603 (the_low_target): Use linux_get_pc_32bit and
3606 2016-01-18 Gary Benson <gbenson@redhat.com>
3608 * configure.ac (AC_FUNC_FORK): New check.
3609 * config.in: Regenerate.
3610 * configure: Likewise.
3612 2016-01-14 Yao Qi <yao.qi@linaro.org>
3614 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3615 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3616 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3617 arm_get_next_pcs_ctor.
3619 2016-01-12 Josh Stone <jistone@redhat.com>
3620 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3622 * inferiors.h: Include "gdb_vecs.h".
3623 (struct process_info): Add syscalls_to_catch.
3624 * inferiors.c (remove_process): Free syscalls_to_catch.
3625 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3626 syscall_return stops.
3627 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3628 * server.c (handle_general_set): Handle QCatchSyscalls.
3629 (handle_query): Report support for QCatchSyscalls.
3630 * target.h (struct target_ops): Add supports_catch_syscall.
3631 (target_supports_catch_syscall): New macro.
3632 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3633 (struct lwp_info): Add syscall_state.
3634 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3635 Maintain syscall_state and syscalls_to_catch across exec.
3636 (get_syscall_trapinfo): New function, proxy to the_low_target.
3637 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3638 (linux_low_filter_event): Toggle syscall_state entry/return for
3639 syscall traps, and set it ignored for all others.
3640 (gdb_catching_syscalls_p): New function.
3641 (gdb_catch_this_syscall_p): New function.
3642 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3643 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3644 (linux_supports_catch_syscall): New function.
3645 (linux_target_ops): Install it.
3646 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3647 (the_low_target): Install it.
3649 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3651 * acinclude.m4: Include new ../warning.m4 file.
3652 * configure: Regenerated.
3653 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3655 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3657 * ax.c (is_goto_target): Mark static.
3658 * linux-low.c (register_addr): Likewise.
3659 (linux_fetch_registers, linux_store_registers): Likewise.
3660 * mem-break.c (any_persistent_commands): Fix old prototype.
3661 (add_commands_to_breakpoint): Mark static.
3662 * regcache.c (find_register_by_name): Delete unused func.
3663 * remote-utils.c (hex_or_minus_one): Mark static.
3664 * server.c (monitor_show_help): Mark static.
3665 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3666 handle_v_requests): Likewise.
3668 2016-01-12 Pedro Alves <palves@redhat.com>
3670 Remove use of the registered trademark symbol throughout.
3672 2016-01-08 Yao Qi <yao.qi@linaro.org>
3674 * remote-utils.c (getpkt): If c is '\003', call target hook
3677 2016-01-06 Yao Qi <yao.qi@linaro.org>
3679 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3680 linux-aarch32-low.c.
3681 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3682 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3683 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3684 (thumb2_breakpoint): Declare.
3685 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3686 linux-aarch32-low.h.
3687 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3688 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3689 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3691 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3693 * gdbreplay.c (gdbreplay_version): Change copyright year in
3695 * server.c (gdbserver_version): Likewise.
3697 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3699 * server.c (crc32_table): Delete.
3700 (crc32): Use libiberty's xcrc32 function.
3702 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3704 * lynx-low.c (lynx_delete_thread_callback): New function.
3705 (lynx_mourn): Properly delete our process and all of its
3706 threads. Remove call to clear_inferiors.
3708 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3710 * target.c (thread_search_callback): Add check that
3711 the thread_stopped target callback is not NULL before
3714 2015-12-21 Yao Qi <yao.qi@linaro.org>
3716 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3719 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3721 * server.c (handle_query): Call target_supports_software_single_step.
3723 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3725 * linux-low.c (single_step): New function.
3726 (linux_resume_one_lwp_throw): Call single_step.
3727 (start_step_over): Likewise.
3729 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3731 * Makefile.in (SFILES): Append arch/arm-linux.c,
3732 arch/arm-get-next-pcs.c.
3733 (arm-linux.o): New rule.
3734 (arm-get-next-pcs.o): New rule.
3735 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3737 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3738 to linux-aarch32-low.c.
3739 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3740 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3741 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3742 (thumb2_breakpoint_len): Likewise.
3743 (arm_is_thumb_mode): Make non-static.
3744 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3745 from linux-aarch32-low.c.
3746 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3747 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3748 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3749 (thumb2_breakpoint_len): Likewise.
3750 (arm_is_thumb_mode): New declaration.
3751 * linux-arm-low.c: Include arch/arm-linux.h
3752 aarch/arm-get-next-pcs.h, sys/syscall.h.
3753 (get_next_pcs_ops): New struct.
3754 (get_next_pcs_addr_bits_remove): New function.
3755 (get_next_pcs_is_thumb): New function.
3756 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3757 (arm_sigreturn_next_pc): Likewise.
3758 (get_next_pcs_syscall_next_pc): Likewise.
3759 (arm_gdbserver_get_next_pcs): Likewise.
3760 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3762 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3763 * server.h: Include gdb_vecs.h.
3765 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3767 * Makefile.in (SFILES): Append common/common-regcache.c.
3768 (OBS): Append common-regcache.o.
3769 (common-regcache.o): New rule.
3770 * regcache.c (init_register_cache): Initialize cache to
3772 (regcache_raw_read_unsigned): New function.
3773 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3774 register_status enum.
3776 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3778 * linux-aarch64-low.c (the_low_targets): Rename
3779 breakpoint_reinsert_addr to get_next_pcs.
3780 * linux-arm-low.c (the_low_targets): Likewise.
3781 * linux-bfin-low.c (the_low_targets): Likewise.
3782 * linux-cris-low.c (the_low_targets): Likewise.
3783 * linux-crisv32-low.c (the_low_targets): Likewise.
3784 * linux-low.c (can_software_single_step): Likewise.
3785 (install_software_single_step_breakpoints): New function.
3786 (start_step_over): Use install_software_single_step_breakpoints.
3787 * linux-low.h: New CORE_ADDR vector.
3788 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3790 * linux-mips-low.c (the_low_targets): Likewise.
3791 * linux-nios2-low.c (the_low_targets): Likewise.
3792 * linux-sparc-low.c (the_low_targets): Likewise.
3794 2015-12-17 Pedro Alves <palves@redhat.com>
3796 * linux-low.c (linux_kill_one_lwp): Remove references to
3798 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3800 (linux_init_signals): Delete.
3801 (initialize_low): Adjust.
3802 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3804 2015-12-16 Pedro Alves <palves@redhat.com>
3806 * configure.ac (compiler warning flags): When testing a
3807 -Wno-foo option, check whether -Wfoo works instead.
3808 * configure: Regenerate.
3810 2015-12-11 Don Breazeal <donb@codesourcery.com>
3812 * server.c (process_serial_event): Don't exit from gdbserver
3813 in remote mode if there are still active inferiors.
3815 2015-12-11 Yao Qi <yao.qi@linaro.org>
3817 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3818 arm_breakpoint_at if the process is 32-bit.
3820 2015-12-11 Yao Qi <yao.qi@linaro.org>
3822 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3825 2015-12-07 Yao Qi <yao.qi@linaro.org>
3827 * configure.srv: Append arm.o to srv_tgtobj for
3828 aarch64*-*-linux* target.
3829 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3830 from linux-arm-low.c.
3831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3832 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3833 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3834 (thumb2_breakpoint_len): Likewise.
3835 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3836 (arm_breakpoint_kinds): Likewise.
3837 (arm_breakpoint_kind_from_pc): Likewise.
3838 (arm_sw_breakpoint_from_kind): Likewise.
3839 (arm_breakpoint_kind_from_current_state): Likewise.
3840 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3841 (arm_sw_breakpoint_from_kind): Declare.
3842 (arm_breakpoint_kind_from_current_state): Declare.
3843 (arm_breakpoint_at): Declare.
3844 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3845 arm_sw_breakpoint_from_kind if process is 32-bit.
3846 (aarch64_breakpoint_kind_from_pc): New function.
3847 (aarch64_breakpoint_kind_from_current_state): New function.
3848 (the_low_target): Initialize fields breakpoint_kind_from_pc
3849 and breakpoint_kind_from_current_state.
3850 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3851 linux-aarch32-low.c.
3852 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3853 (arm_breakpoint, arm_breakpoint_len): Likewise.
3854 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3855 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3856 (arm_is_thumb_mode): Likewise.
3857 (arm_breakpoint_at): Likewise.
3858 (arm_breakpoint_kind_from_pc): Likewise.
3859 (arm_sw_breakpoint_from_kind): Likewise.
3860 (arm_breakpoint_kind_from_current_state): Likewise.
3863 2015-08-04 Yao Qi <yao.qi@linaro.org>
3865 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3866 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3867 * server.c (extended_protocol): Remove "static".
3868 * server.h (extended_protocol): Declare it.
3870 2015-12-04 Josh Stone <jistone@redhat.com>
3872 * target.h (struct target_ops) <arch_setup>: Rename to ...
3873 (struct target_ops) <post_create_inferior>: ... this.
3874 (target_arch_setup): Rename to ...
3875 (target_post_create_inferior): ... this, calling post_create_inferior.
3876 * server.c (start_inferior): Update target_arch_setup calls to
3877 target_post_create_inferior.
3878 * linux-low.c (linux_low_ptrace_options): Forward declare.
3879 (linux_arch_setup): Update its comment for general use.
3880 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3881 (struct linux_target_ops): Use linux_post_create_inferior.
3882 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3883 to post_create_inferior.
3884 * nto-low.c (struct nto_target_ops): Likewise.
3885 * spu-low.c (struct spu_target_ops): Likewise.
3886 * win32-low.c (struct win32_target_ops): Likewise.
3888 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3890 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3892 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3894 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3895 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3896 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3897 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3898 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3899 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3900 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3901 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3902 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3903 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3904 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3905 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3909 * linux-low.c (linux_look_up_symbols): Don't call
3910 linux_supports_traceclone.
3911 * linux-low.h (thread_db_init): Remove use_events argument.
3912 * thread-db.c (thread_db_use_event): Remove global variable.
3913 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3914 (struct thread_db) <td_create_bp>: Remove field.
3915 (thread_db_create_event): Remove function.
3916 (thread_db_enable_reporting): Likewise.
3917 (find_one_thread): Don't check for thread_db_use_events.
3918 (attach_thread): Likewise.
3919 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3920 (try_thread_db_load_1): Don't check for thread_db_use_events.
3921 (thread_db_init): Remove use_events argument and thread events
3923 (remove_thread_event_breakpoints): Remove function.
3924 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3926 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3928 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3930 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3931 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3932 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3933 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3934 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3936 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3939 * linux-low.c (can_hardware_single_step): Use
3940 supports_hardware_single_step.
3941 (can_software_single_step): New function.
3942 (start_step_over): Call can_software_single_step.
3943 (linux_supports_hardware_single_step): New function.
3944 (struct target_ops) <supports_software_single_step>: Initialize.
3945 * linux-low.h (struct linux_target_ops)
3946 <supports_hardware_single_step>: Initialize.
3947 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3948 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3949 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3950 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3951 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3952 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3953 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3954 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3955 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3956 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3958 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3959 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3961 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3962 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3963 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3965 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3966 * target.h (struct target_ops): <supports_software_single_step>:
3968 (target_supports_software_single_step): New macro.
3970 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3972 * linux-low.c (linux_wait_1): Fix pc advance condition.
3973 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3974 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3976 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3978 * linux-arm-low.c (arm_is_thumb_mode): New function.
3979 (arm_breakpoint_at): Use arm_is_thumb_mode.
3980 (arm_breakpoint_kind_from_current_state): New function.
3981 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3983 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3984 (linux_breakpoint_kind_from_current_state): New function.
3985 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3986 * linux-low.h (struct linux_target_ops)
3987 <breakpoint_kind_from_current_state>: New field.
3988 * target.h (struct target_ops): Likewise.
3989 (target_breakpoint_kind_from_current_state): New macro.
3991 2015-11-30 Pedro Alves <palves@redhat.com>
3993 * linux-low.c (linux_resume): Wake up the event loop before
3996 2015-11-30 Pedro Alves <palves@redhat.com>
3998 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4000 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4002 * target.c (struct thread_search): New structure.
4003 (thread_search_callback): New function.
4004 (prev_general_thread): New global.
4005 (prepare_to_access_memory, done_accessing_memory): New functions.
4006 * target.h (prepare_to_access_memory, done_accessing_memory):
4007 Replace macros with function declarations.
4009 2015-11-30 Pedro Alves <palves@redhat.com>
4012 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4013 report TARGET_WAITKIND_NO_RESUMED.
4014 * remote-utils.c (prepare_resume_reply): Handle
4015 TARGET_WAITKIND_NO_RESUMED.
4016 * server.c (report_no_resumed): New global.
4017 (handle_query) <qSupported>: Handle "no-resumed+". Report
4018 "no-resumed+" support.
4019 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4020 return error if the client doesn't support no-resumed events.
4021 (push_stop_notification): New function.
4022 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4023 events if the client supports them.
4025 2015-11-30 Pedro Alves <palves@redhat.com>
4027 * linux-low.c (thread_still_has_status_pending_p): Don't check
4029 (lwp_resumed): New function.
4030 (status_pending_p_callback): Return early if the LWP is not
4031 supposed to be resumed.
4033 2015-11-30 Pedro Alves <palves@redhat.com>
4035 * linux-low.c (handle_extended_wait): Assert that the LWP's
4036 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4037 thread create events, leave the new child's status pending.
4038 (linux_low_filter_event): If GDB wants to hear about thread exit
4039 events, leave the LWP marked dead and don't delete it.
4040 (linux_wait_for_event_filtered): Don't check for thread exit.
4041 (filter_exit_event): New function.
4042 (linux_wait_1): Use it, when returning an exit event.
4043 (linux_resume_one_lwp_throw): Assert that the LWP's
4044 waitstatus is TARGET_WAITKIND_IGNORE.
4045 * remote-utils.c (prepare_resume_reply): Handle
4046 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4047 * server.c (report_thread_events): New global.
4048 (handle_general_set): Handle QThreadEvents.
4049 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4050 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4051 TARGET_WAITKIND_THREAD_EXITED.
4052 * server.h (report_thread_events): Declare.
4054 2015-11-30 Pedro Alves <palves@redhat.com>
4056 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4057 the thread's last_resume_kind was resume_stop.
4059 2015-11-30 Pedro Alves <palves@redhat.com>
4061 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4064 2015-11-30 Pedro Alves <palves@redhat.com>
4066 * server.c (handle_v_requests): Handle vCtrlC.
4068 2015-11-30 Pedro Alves <palves@redhat.com>
4070 * gdbthread.h (find_any_thread_of_pid): Declare.
4071 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4073 * server.c (handle_query): If current_thread is NULL, look for
4074 another thread of the selected process.
4076 2015-11-26 Daniel Colascione <dancol@dancol.org>
4077 Simon Marchi <simon.marchi@ericsson.com>
4079 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4080 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4082 * target.h (struct target_ops) <thread_name>: New field.
4083 (target_thread_name): New macro.
4085 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4087 * regcache.h (regcache_invalidate_pid): Add declaration.
4088 * regcache.c (regcache_invalidate_pid): New function, extracted
4089 from regcache_invalidate.
4090 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4091 Add trivial documentation comment.
4092 * lynx-low.c: Use regcache_invalidate_pid instead of
4093 regcache_invalidate.
4095 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4097 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4098 and Elf64_auxv_t if the target is Android.
4100 2015-11-22 Doug Evans <xdje42@gmail.com>
4102 * target.h: #include <sys/types.h>.
4104 2015-11-19 Pedro Alves <palves@redhat.com>
4106 * linux-low.c (linux_process_qsupported): Change prototype.
4108 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4110 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4111 and adjust to loop over all features.
4112 * server.c (handle_query) <qSupported>: Adjust to call
4113 target_process_qsupported once, passing it a vector of unprocessed
4115 * target.h (struct target_ops) <process_qsupported>: Change
4117 (target_process_qsupported): Adjust.
4119 2015-11-19 Pedro Alves <palves@redhat.com>
4121 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4123 * configure: Regenerate.
4125 2015-11-19 Pedro Alves <palves@redhat.com>
4127 * configure: Regenerate.
4129 2015-11-19 Yao Qi <yao.qi@linaro.org>
4131 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4134 2015-11-19 Yao Qi <yao.qi@linaro.org>
4136 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4137 (struct aarch64_operand): Move enum out.
4139 2015-11-19 Yao Qi <yao.qi@linaro.org>
4141 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4142 struct user_fpsimd_state *.
4143 (aarch64_store_fpregset): Likewise.
4145 2015-11-19 Yao Qi <yao.qi@linaro.org>
4147 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4148 struct user_pt_regs *.
4149 (aarch64_store_gregset): Likewise.
4151 2015-11-18 Pedro Alves <palves@redhat.com>
4153 * Makefile.in (all_object_files): Add $IPA_OBJS.
4155 2015-11-17 Pedro Alves <palves@redhat.com>
4157 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4158 GDB_SIGNAL_0 and gdb_signal_to_string.
4160 2015-11-17 Pedro Alves <palves@redhat.com>
4162 * win32-low.c (handle_output_debug_string): Remove parameter.
4163 (win32_kill): Remove our_status local and adjust call to
4164 handle_output_debug_string.
4165 (get_child_debug_event): Adjust call to
4166 handle_output_debug_string.
4168 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4170 * linux-mips-low.c (mips_fill_gregset): Add cast.
4171 (mips_store_gregset): Likewise.
4172 (mips_fill_fpregset): Likewise.
4173 (mips_store_fpregset): Likewise.
4175 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4177 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4180 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4182 * linux-mips-low.c (mips_linux_new_thread): Change type of
4183 watch_type to enum target_hw_bp_type.
4185 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4187 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4188 Change return type to arm_hwbp_type.
4190 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4192 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4193 (arm_store_gregset): Likewise.
4194 * linux-arm-low.c (arm_get_hwcap): Likewise.
4195 (arm_read_description): Likewise.
4197 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4199 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4201 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4203 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4204 (ppc_fill_vsxregset): Likewise.
4205 (ppc_store_vsxregset): Likewise.
4206 (ppc_fill_vrregset): Likewise.
4207 (ppc_store_vrregset): Likewise.
4208 (ppc_fill_evrregset): Likewise.
4209 (ppc_store_evrregset): Likewise.
4211 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4213 * linux-ppc-low.c (ppc_usrregs_info): Remove
4214 forward-declaration.
4215 (ppc_arch_setup): Move lower in file.
4217 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4219 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4220 (ps_pdwrite): Likewise.
4222 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4224 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4225 to after assert checks.
4227 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4229 * proc-service.c (ps_pdread): Add/adjust casts.
4230 (ps_pdwrite): Add/adjust casts.
4232 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4234 * server.c (handle_search_memory_1): Cast return value of
4237 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4239 * server.c (write_qxfer_response): Change type of data to
4242 2015-10-29 Pedro Alves <palves@redhat.com>
4244 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4246 2015-10-29 Pedro Alves <palves@redhat.com>
4248 * tracepoint.c (clear_installed_tracepoints): Add casts.
4250 2015-10-29 Pedro Alves <palves@redhat.com>
4252 * server.c (handle_v_cont, process_serial_event): Add enum
4253 gdb_signal casts to signal parsing code.
4255 2015-10-29 Pedro Alves <palves@redhat.com>
4257 * linux-low.h (NULL_REGSET): Define.
4258 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4259 * linux-arm-low.c (arm_regsets): Likewise.
4260 * linux-crisv32-low.c (cris_regsets): Likewise.
4261 * linux-m68k-low.c (m68k_regsets): Likewise.
4262 * linux-mips-low.c (mips_regsets): Likewise.
4263 * linux-nios2-low.c (nios2_regsets): Likewise.
4264 * linux-ppc-low.c (ppc_regsets): Likewise.
4265 * linux-s390-low.c (s390_regsets): Likewise.
4266 * linux-sh-low.c (sh_regsets): Likewise.
4267 * linux-sparc-low.c (sparc_regsets): Likewise.
4268 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4269 * linux-tile-low.c (tile_regsets): Likewise.
4270 * linux-x86-low.c (x86_regsets): Likewise.
4271 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4273 2015-10-29 Pedro Alves <palves@redhat.com>
4275 * linux-low.h (NULL_REGSET): Define.
4276 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4277 * linux-arm-low.c (arm_regsets): Likewise.
4278 * linux-crisv32-low.c (cris_regsets): Likewise.
4279 * linux-m68k-low.c (m68k_regsets): Likewise.
4280 * linux-mips-low.c (mips_regsets): Likewise.
4281 * linux-nios2-low.c (nios2_regsets): Likewise.
4282 * linux-ppc-low.c (ppc_regsets): Likewise.
4283 * linux-s390-low.c (s390_regsets): Likewise.
4284 * linux-sh-low.c (sh_regsets): Likewise.
4285 * linux-sparc-low.c (sparc_regsets): Likewise.
4286 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4287 * linux-tile-low.c (tile_regsets): Likewise.
4288 * linux-x86-low.c (x86_regsets): Likewise.
4289 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4291 2015-10-26 Doug Evans <dje@google.com>
4293 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4295 2015-10-26 Doug Evans <dje@google.com>
4297 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4299 2015-10-26 Doug Evans <dje@google.com>
4301 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4303 (attach_thread, find_new_threads_callback): Ditto.
4305 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4307 * mem-break.h (set_breakpoint_data): Remove.
4309 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4311 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4312 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4313 (initialize_low): Remove set_breakpoint_data call.
4314 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4315 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4316 (initialize_low): Remove set_breakpoint_data call.
4317 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4318 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4319 (initialize_low): Remove set_breakpoint_data call.
4321 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4323 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4324 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4325 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4326 * target.h (target_breakpoint_kind_from_pc): New macro.
4328 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4331 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4332 the default breakpoint kind.
4334 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4336 * linux-arm-low.c (arm_supports_z_point_type): Add software
4339 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4341 * linux-arm-low.c: Refactor breakpoint definitions.
4342 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4343 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4345 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4347 * Makefile.in: Add arm.c/o.
4348 * configure.srv: Likewise.
4349 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4350 (arm_breakpoint_kind_from_pc): New function.
4351 (arm_sw_breakpoint_from_kind): Return proper kind.
4352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4354 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4356 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4358 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4359 (struct raw_breakpoint) <size>: Remove.
4360 (struct raw_breakpoint) <kind>: Add.
4361 (bp_size): New function.
4362 (bp_opcode): Likewise.
4363 (find_raw_breakpoint_at): Adjust for kind.
4364 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4365 (remove_memory_breakpoint): Adjust for kind call bp_size.
4366 (set_raw_breakpoint_at): Adjust for kind.
4367 (set_breakpoint): Likewise.
4368 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4369 (delete_raw_breakpoint): Adjust for kind.
4370 (delete_breakpoint): Likewise.
4371 (find_gdb_breakpoint): Likewise.
4372 (set_gdb_breakpoint_1): Likewise.
4373 (set_gdb_breakpoint): Likewise.
4374 (delete_gdb_breakpoint_1): Likewise.
4375 (delete_gdb_breakpoint): Likewise.
4376 (uninsert_raw_breakpoint): Likewise.
4377 (reinsert_raw_breakpoint): Likewise.
4378 (set_breakpoint_data): Remove.
4379 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4380 (check_mem_read): Adjust for kind call bp_size.
4381 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4382 (clone_one_breakpoint): Adjust for kind.
4383 * mem-break.h (set_gdb_breakpoint): Likewise.
4384 (delete_gdb_breakpoint): Likewise.
4385 * server.c (process_serial_event): Likewise.
4387 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4389 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4390 (struct linux_target_ops) <breakpoint>: Remove.
4391 (struct linux_target_ops) <breakpoint_len>: Remove.
4392 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4394 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4395 (arm_sw_breakpoint_from_kind): New function.
4396 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4397 (struct linux_target_ops) <breakpoint>: Remove.
4398 (struct linux_target_ops) <breakpoint_len>: Remove.
4399 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4400 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4401 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4402 (struct linux_target_ops) <breakpoint>: Remove.
4403 (struct linux_target_ops) <breakpoint_len>: Remove.
4404 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4405 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4406 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4407 (struct linux_target_ops) <breakpoint>: Remove.
4408 (struct linux_target_ops) <breakpoint_len>: Remove.
4409 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4410 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4411 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4412 and sw_breakpoint_from_kind to increment the pc.
4413 (linux_breakpoint_kind_from_pc): New function.
4414 (linux_sw_breakpoint_from_kind): New function.
4415 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4416 (initialize_low): Call breakpoint_kind_from_pc and
4417 sw_breakpoint_from_kind to replace breakpoint_data/len.
4418 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4420 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4421 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4422 (struct linux_target_ops) <breakpoint>: Remove.
4423 (struct linux_target_ops) <breakpoint_len>: Remove.
4424 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4425 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4426 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4427 (struct linux_target_ops) <breakpoint>: Remove.
4428 (struct linux_target_ops) <breakpoint_len>: Remove.
4429 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4430 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4431 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4432 (struct linux_target_ops) <breakpoint>: Remove.
4433 (struct linux_target_ops) <breakpoint_len>: Remove.
4434 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4435 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4436 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4437 (struct linux_target_ops) <breakpoint>: Remove.
4438 (struct linux_target_ops) <breakpoint_len>: Remove.
4439 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4440 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4441 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4442 (struct linux_target_ops) <breakpoint>: Remove.
4443 (struct linux_target_ops) <breakpoint_len>: Remove.
4444 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4445 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4446 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4447 (struct linux_target_ops) <breakpoint>: Remove.
4448 (struct linux_target_ops) <breakpoint_len>: Remove.
4449 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4450 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4451 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4452 (struct linux_target_ops) <breakpoint>: Remove.
4453 (struct linux_target_ops) <breakpoint_len>: Remove.
4454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4455 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4456 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4457 (struct linux_target_ops) <breakpoint>: Remove.
4458 (struct linux_target_ops) <breakpoint_len>: Remove.
4459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4461 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4462 (struct linux_target_ops) <breakpoint>: Remove.
4463 (struct linux_target_ops) <breakpoint_len>: Remove.
4464 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4465 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4466 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4467 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_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.
4478 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4480 * linux-cris-low.c (cris_get_pc): Remove void arg.
4482 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4484 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4487 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4489 * inferiors.c (thread_pid_matches_callback): New function.
4490 (find_thread_process): New function.
4491 (remove_thread): Reset current_thread.
4492 (remove_process): Assert threads have been removed first.
4494 2015-10-15 Yao Qi <yao.qi@linaro.org>
4496 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4498 (aarch64_remove_point): Likewise.
4499 * regcache.c (regcache_register_size): New function.
4501 2015-10-12 Yao Qi <yao.qi@linaro.org>
4503 * linux-aarch64-low.c: Update all callers as emit_load_store
4504 is renamed to aarch64_emit_load_store.
4506 2015-10-12 Yao Qi <yao.qi@linaro.org>
4508 * linux-aarch64-low.c: Update all callers of function renaming
4509 from emit_insn to aarch64_emit_insn.
4511 2015-10-12 Yao Qi <yao.qi@linaro.org>
4513 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4514 arch/aarch64-insn.h.
4515 (struct aarch64_memory_operand): Likewise.
4517 (emit_insn): Move to arch/aarch64-insn.c.
4518 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4519 (emit_load_store): Move to arch/aarch64-insn.c.
4520 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4521 (can_encode_int32): Remove.
4523 2015-10-12 Yao Qi <yao.qi@linaro.org>
4525 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4526 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4527 (aarch64_relocate_instruction): Likewise.
4528 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4529 (struct aarch64_insn_visitor): Likewise.
4531 2015-10-12 Yao Qi <yao.qi@linaro.org>
4533 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4534 (struct aarch64_insn_visitor): New.
4535 (struct aarch64_insn_relocation_data): New.
4536 (aarch64_ftrace_insn_reloc_b): New function.
4537 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4538 (aarch64_ftrace_insn_reloc_cb): Likewise.
4539 (aarch64_ftrace_insn_reloc_tb): Likewise.
4540 (aarch64_ftrace_insn_reloc_adr): Likewise.
4541 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4542 (aarch64_ftrace_insn_reloc_others): Likewise.
4544 (aarch64_relocate_instruction): Use visitor.
4546 2015-10-12 Yao Qi <yao.qi@linaro.org>
4548 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4549 int. Add argument buf.
4550 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4551 aarch64_relocate_instruction.
4553 2015-10-12 Yao Qi <yao.qi@linaro.org>
4555 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4556 argument insn. Remove local variable insn. Don't call
4558 (aarch64_install_fast_tracepoint_jump_pad): Call
4561 2015-09-30 Yao Qi <yao.qi@linaro.org>
4563 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4564 (emit_load_store_pair): Likewise.
4566 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4568 * dll.c (match_dll): Add cast(s).
4569 (unloaded_dll): Likewise.
4570 * linux-low.c (second_thread_of_pid_p): Likewise.
4571 (delete_lwp_callback): Likewise.
4572 (count_events_callback): Likewise.
4573 (select_event_lwp_callback): Likewise.
4574 (linux_set_resume_request): Likewise.
4575 * server.c (accumulate_file_name_length): Likewise.
4576 (emit_dll_description): Likewise.
4577 (handle_qxfer_threads_worker): Likewise.
4578 (visit_actioned_threads): Likewise.
4579 * thread-db.c (any_thread_of): Likewise.
4580 * tracepoint.c (same_process_p): Likewise.
4581 (match_blocktype): Likewise.
4582 (build_traceframe_info_xml): Likewise.
4584 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4586 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4588 (gdb_unparse_agent_expr): Likewise.
4589 * hostio.c (require_data): Likewise.
4590 (handle_pread): Likewise.
4591 * linux-low.c (disable_regset): Likewise.
4592 (fetch_register): Likewise.
4593 (store_register): Likewise.
4594 (get_dynamic): Likewise.
4595 (linux_qxfer_libraries_svr4): Likewise.
4596 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4597 (set_fast_tracepoint_jump): Likewise.
4598 (uninsert_fast_tracepoint_jumps_at): Likewise.
4599 (reinsert_fast_tracepoint_jumps_at): Likewise.
4600 (validate_inserted_breakpoint): Likewise.
4601 (clone_agent_expr): Likewise.
4602 * regcache.c (init_register_cache): Likewise.
4603 * remote-utils.c (putpkt_binary_1): Likewise.
4604 (decode_M_packet): Likewise.
4605 (decode_X_packet): Likewise.
4606 (look_up_one_symbol): Likewise.
4607 (relocate_instruction): Likewise.
4608 (monitor_output): Likewise.
4609 * server.c (handle_search_memory): Likewise.
4610 (handle_qxfer_exec_file): Likewise.
4611 (handle_qxfer_libraries): Likewise.
4612 (handle_qxfer): Likewise.
4613 (handle_query): Likewise.
4614 (handle_v_cont): Likewise.
4615 (handle_v_run): Likewise.
4616 (captured_main): Likewise.
4617 * target.c (write_inferior_memory): Likewise.
4618 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4619 * tracepoint.c (init_trace_buffer): Likewise.
4620 (add_tracepoint_action): Likewise.
4621 (add_traceframe): Likewise.
4622 (add_traceframe_block): Likewise.
4623 (cmd_qtdpsrc): Likewise.
4624 (cmd_qtdv): Likewise.
4625 (cmd_qtstatus): Likewise.
4626 (response_source): Likewise.
4627 (response_tsv): Likewise.
4628 (cmd_qtnotes): Likewise.
4629 (gdb_collect): Likewise.
4630 (initialize_tracepoint): Likewise.
4632 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4634 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4635 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4636 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4638 (enum aarch64_condition_codes): New enum.
4639 (w0): New static global.
4642 (struct aarch64_memory_operand) <type>: New
4643 MEMORY_OPERAND_POSTINDEX type.
4644 (postindex_memory_operand): New helper function.
4645 (emit_ret): New function.
4646 (emit_load_store_pair): New function, factored out of emit_stp
4647 with support for MEMORY_OPERAND_POSTINDEX.
4648 (emit_stp): Rewrite using emit_load_store_pair.
4649 (emit_ldp): New function.
4650 (emit_load_store): Likewise.
4651 (emit_ldr): Mention post-index instruction in comment.
4652 (emit_ldrh): New function.
4653 (emit_ldrb): New function.
4654 (emit_ldrsw): Mention post-index instruction in comment.
4655 (emit_str): Likewise.
4656 (emit_subs): New function.
4657 (emit_cmp): Likewise.
4658 (emit_and): Likewise.
4659 (emit_orr): Likewise.
4660 (emit_orn): Likewise.
4661 (emit_eor): Likewise.
4662 (emit_mvn): Likewise.
4663 (emit_lslv): Likewise.
4664 (emit_lsrv): Likewise.
4665 (emit_asrv): Likewise.
4666 (emit_mul): Likewise.
4667 (emit_sbfm): Likewise.
4668 (emit_sbfx): Likewise.
4669 (emit_ubfm): Likewise.
4670 (emit_ubfx): Likewise.
4671 (emit_csinc): Likewise.
4672 (emit_cset): Likewise.
4673 (emit_nop): Likewise.
4674 (emit_ops_insns): New helper function.
4675 (emit_pop): Likewise.
4676 (emit_push): Likewise.
4677 (aarch64_emit_prologue): New function.
4678 (aarch64_emit_epilogue): Likewise.
4679 (aarch64_emit_add): Likewise.
4680 (aarch64_emit_sub): Likewise.
4681 (aarch64_emit_mul): Likewise.
4682 (aarch64_emit_lsh): Likewise.
4683 (aarch64_emit_rsh_signed): Likewise.
4684 (aarch64_emit_rsh_unsigned): Likewise.
4685 (aarch64_emit_ext): Likewise.
4686 (aarch64_emit_log_not): Likewise.
4687 (aarch64_emit_bit_and): Likewise.
4688 (aarch64_emit_bit_or): Likewise.
4689 (aarch64_emit_bit_xor): Likewise.
4690 (aarch64_emit_bit_not): Likewise.
4691 (aarch64_emit_equal): Likewise.
4692 (aarch64_emit_less_signed): Likewise.
4693 (aarch64_emit_less_unsigned): Likewise.
4694 (aarch64_emit_ref): Likewise.
4695 (aarch64_emit_if_goto): Likewise.
4696 (aarch64_emit_goto): Likewise.
4697 (aarch64_write_goto_address): Likewise.
4698 (aarch64_emit_const): Likewise.
4699 (aarch64_emit_call): Likewise.
4700 (aarch64_emit_reg): Likewise.
4701 (aarch64_emit_pop): Likewise.
4702 (aarch64_emit_stack_flush): Likewise.
4703 (aarch64_emit_zero_ext): Likewise.
4704 (aarch64_emit_swap): Likewise.
4705 (aarch64_emit_stack_adjust): Likewise.
4706 (aarch64_emit_int_call_1): Likewise.
4707 (aarch64_emit_void_call_2): Likewise.
4708 (aarch64_emit_eq_goto): Likewise.
4709 (aarch64_emit_ne_goto): Likewise.
4710 (aarch64_emit_lt_goto): Likewise.
4711 (aarch64_emit_le_goto): Likewise.
4712 (aarch64_emit_gt_goto): Likewise.
4713 (aarch64_emit_ge_got): Likewise.
4714 (aarch64_emit_ops_impl): New static global variable.
4715 (aarch64_emit_ops): New target function, return
4716 &aarch64_emit_ops_impl.
4717 (struct linux_target_ops): Install it.
4719 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4721 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4722 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4724 * linux-aarch64-ipa.c: New file.
4725 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4727 (aarch64_get_thread_area): New target method.
4728 (extract_signed_bitfield): New helper function.
4729 (aarch64_decode_ldr_literal): New function.
4730 (enum aarch64_opcodes): New enum.
4731 (struct aarch64_register): New struct.
4732 (struct aarch64_operand): New struct.
4733 (x0): New static global.
4742 (aarch64_register): New helper function.
4743 (register_operand): Likewise.
4744 (immediate_operand): Likewise.
4745 (struct aarch64_memory_operand): New struct.
4746 (offset_memory_operand): New helper function.
4747 (preindex_memory_operand): Likewise.
4748 (enum aarch64_system_control_registers): New enum.
4749 (ENCODE): New macro.
4750 (emit_insn): New helper function.
4751 (emit_b): New function.
4752 (emit_bcond): Likewise.
4753 (emit_cb): Likewise.
4754 (emit_tb): Likewise.
4755 (emit_blr): Likewise.
4756 (emit_stp): Likewise.
4757 (emit_ldp_q_offset): Likewise.
4758 (emit_stp_q_offset): Likewise.
4759 (emit_load_store): Likewise.
4760 (emit_ldr): Likewise.
4761 (emit_ldrsw): Likewise.
4762 (emit_str): Likewise.
4763 (emit_ldaxr): Likewise.
4764 (emit_stxr): Likewise.
4765 (emit_stlr): Likewise.
4766 (emit_data_processing_reg): Likewise.
4767 (emit_data_processing): Likewise.
4768 (emit_add): Likewise.
4769 (emit_sub): Likewise.
4770 (emit_mov): Likewise.
4771 (emit_movk): Likewise.
4772 (emit_mov_addr): Likewise.
4773 (emit_mrs): Likewise.
4774 (emit_msr): Likewise.
4775 (emit_sevl): Likewise.
4776 (emit_wfe): Likewise.
4777 (append_insns): Likewise.
4778 (can_encode_int32_in): New helper function.
4779 (aarch64_relocate_instruction): New function.
4780 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4781 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4782 (struct linux_target_ops): Install aarch64_get_thread_area,
4783 aarch64_install_fast_tracepoint_jump_pad and
4784 aarch64_get_min_fast_tracepoint_insn_len.
4786 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4788 * Makefile.in (aarch64-insn.o): New rule.
4789 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4791 2015-09-21 Yao Qi <yao.qi@linaro.org>
4793 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4795 2015-09-21 Yao Qi <yao.qi@linaro.org>
4797 * tracepoint.c (max_jump_pad_size): Remove.
4799 2015-09-18 Yao Qi <yao.qi@linaro.org>
4801 * linux-aarch64-low.c: Don't include sys/uio.h.
4802 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4804 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4806 * tracepoint.c (eval_result_type): Change prototype.
4807 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4809 2015-09-15 Pedro Alves <palves@redhat.com>
4811 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4812 Check whether to report exec events instead of checking whether
4813 multiprocess is enabled.
4815 2015-09-15 Pedro Alves <palves@redhat.com>
4818 * remote-utils.c (prepare_resume_reply): Merge
4819 TARGET_WAITKIND_VFORK_DONE switch case with the
4820 TARGET_WAITKIND_FORKED case.
4822 2015-09-15 Yao Qi <yao.qi@linaro.org>
4824 * server.c (handle_query): Check string comparison using
4825 "else if" instead of "if".
4827 2015-09-15 Yao Qi <yao.qi@linaro.org>
4829 * server.c (vCont_supported): New global variable.
4830 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4831 matches. Append ";vContSupported+" to own_buf.
4832 (handle_v_requests): Append ";s;S" to own_buf if target supports
4833 hardware single step or vCont_supported is false.
4834 (capture_main): Set vCont_supported to zero.
4836 2015-09-15 Yao Qi <yao.qi@linaro.org>
4838 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4840 (linux_supports_hardware_single_step): ... New function.
4841 (linux_target_ops): Update.
4842 * lynx-low.c (lynx_target_ops): Set field
4843 supports_hardware_single_step to target_can_do_hardware_single_step.
4844 * nto-low.c (nto_target_ops): Likewise.
4845 * spu-low.c (spu_target_ops): Likewise.
4846 * win32-low.c (win32_target_ops): Likewise.
4847 * target.c (target_can_do_hardware_single_step): New function.
4848 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4849 Remove. <supports_hardware_single_step>: New field.
4850 (target_supports_conditional_breakpoints): Remove.
4851 (target_supports_hardware_single_step): New macro.
4852 (target_can_do_hardware_single_step): Declare.
4853 * server.c (handle_query): Use target_supports_hardware_single_step
4854 instead of target_supports_conditional_breakpoints.
4856 2015-09-15 Yao Qi <yao.qi@linaro.org>
4858 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4860 (struct linux_target_ops the_low_target): Install
4861 aarch64_linux_siginfo_fixup.
4863 2015-09-11 Don Breazeal <donb@codesourcery.com>
4864 Luis Machado <lgustavo@codesourcery.com>
4866 * linux-low.c (linux_mourn): Static declaration.
4867 (linux_arch_setup): Move in front of
4868 handle_extended_wait.
4869 (linux_arch_setup_thread): New function.
4870 (handle_extended_wait): Handle exec events. Call
4871 linux_arch_setup_thread. Make event_lwp argument a
4872 pointer-to-a-pointer.
4873 (check_zombie_leaders): Do not check stopped threads.
4874 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4875 (linux_low_filter_event): Add lwp and thread for exec'ing
4876 non-leader thread if leader thread has been deleted.
4877 Refactor code into linux_arch_setup_thread and call it.
4878 Pass child lwp pointer by reference to handle_extended_wait.
4879 (linux_wait_for_event_filtered): Update comment.
4880 (linux_wait_1): Prevent clobbering exec event status.
4881 (linux_supports_exec_events): New function.
4882 (linux_target_ops) <supports_exec_events>: Initialize new member.
4883 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4885 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4886 * server.c (report_exec_events): New global variable.
4887 (handle_query): Handle qSupported query for exec-events feature.
4888 (captured_main): Initialize report_exec_events.
4889 * server.h (report_exec_events): Declare new global variable.
4890 * target.h (struct target_ops) <supports_exec_events>: New
4892 (target_supports_exec_events): New macro.
4893 * win32-low.c (win32_target_ops) <supports_exec_events>:
4894 Initialize new member.
4896 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4898 * linux-low.c (linux_low_enable_btrace): Remove.
4899 (linux_target_ops): Replace linux_low_enable_btrace with
4900 linux_enable_btrace.
4902 2015-09-03 Yao Qi <yao.qi@linaro.org>
4904 * linux-aarch64-low.c (aarch64_insert_point): Call
4905 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4908 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4910 * linux-low.c (check_stopped_by_breakpoint): Use
4911 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4913 2015-08-27 Pedro Alves <palves@redhat.com>
4915 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4917 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4919 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4920 the XNEW-family equivalent.
4921 (compile_bytecodes): Likewise.
4922 * dll.c (loaded_dll): Likewise.
4923 * event-loop.c (append_callback_event): Likewise.
4924 (create_file_handler): Likewise.
4925 (create_file_event): Likewise.
4926 * hostio.c (handle_open): Likewise.
4927 * inferiors.c (add_thread): Likewise.
4928 (add_process): Likewise.
4929 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4930 * linux-arm-low.c (arm_new_process): Likewise.
4931 (arm_new_thread): Likewise.
4932 * linux-low.c (add_to_pid_list): Likewise.
4933 (linux_add_process): Likewise.
4934 (handle_extended_wait): Likewise.
4935 (add_lwp): Likewise.
4936 (enqueue_one_deferred_signal): Likewise.
4937 (enqueue_pending_signal): Likewise.
4938 (linux_resume_one_lwp_throw): Likewise.
4939 (linux_resume_one_thread): Likewise.
4940 (linux_read_memory): Likewise.
4941 (linux_write_memory): Likewise.
4942 * linux-mips-low.c (mips_linux_new_process): Likewise.
4943 (mips_linux_new_thread): Likewise.
4944 (mips_add_watchpoint): Likewise.
4945 * linux-x86-low.c (initialize_low_arch): Likewise.
4946 * lynx-low.c (lynx_add_process): Likewise.
4947 * mem-break.c (set_raw_breakpoint_at): Likewise.
4948 (set_breakpoint): Likewise.
4949 (add_condition_to_breakpoint): Likewise.
4950 (add_commands_to_breakpoint): Likewise.
4951 (clone_agent_expr): Likewise.
4952 (clone_one_breakpoint): Likewise.
4953 * regcache.c (new_register_cache): Likewise.
4954 * remote-utils.c (look_up_one_symbol): Likewise.
4955 * server.c (queue_stop_reply): Likewise.
4956 (start_inferior): Likewise.
4957 (queue_stop_reply_callback): Likewise.
4958 (handle_target_event): Likewise.
4959 * spu-low.c (fetch_ppc_memory): Likewise.
4960 (store_ppc_memory): Likewise.
4961 * target.c (set_target_ops): Likewise.
4962 * thread-db.c (thread_db_load_search): Likewise.
4963 (try_thread_db_load_1): Likewise.
4964 * tracepoint.c (add_tracepoint): Likewise.
4965 (add_tracepoint_action): Likewise.
4966 (create_trace_state_variable): Likewise.
4967 (cmd_qtdpsrc): Likewise.
4968 (cmd_qtro): Likewise.
4969 (add_while_stepping_state): Likewise.
4970 * win32-low.c (child_add_thread): Likewise.
4971 (get_image_name): Likewise.
4973 2015-08-25 Yao Qi <yao.qi@linaro.org>
4975 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4977 2015-08-25 Yao Qi <yao.qi@linaro.org>
4979 * Makefile.in (aarch64-linux.o): New rule.
4980 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4982 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4983 (aarch64_init_debug_reg_state): Make it extern.
4984 (aarch64_linux_prepare_to_resume): Remove.
4986 2015-08-25 Yao Qi <yao.qi@linaro.org>
4988 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4989 lwp_arch_private_info and ptid_of_lwp.
4991 2015-08-25 Yao Qi <yao.qi@linaro.org>
4993 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4994 Find proc_info by find_process_pid. All callers updated.
4996 2015-08-25 Yao Qi <yao.qi@linaro.org>
4998 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5000 (debug_reg_change_callback): Remove.
5001 (aarch64_notify_debug_reg_change): Remove.
5003 2015-08-25 Yao Qi <yao.qi@linaro.org>
5005 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5006 Call current_lwp_ptid.
5008 2015-08-25 Yao Qi <yao.qi@linaro.org>
5010 * linux-aarch64-low.c (debug_reg_change_callback): Use
5013 2015-08-25 Yao Qi <yao.qi@linaro.org>
5015 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5017 2015-08-25 Yao Qi <yao.qi@linaro.org>
5019 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5021 2015-08-25 Yao Qi <yao.qi@linaro.org>
5023 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5026 2015-08-25 Yao Qi <yao.qi@linaro.org>
5028 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5030 (debug_reg_change_callback): Remove argument entry and add argument
5031 lwp. Remove local variable thread. Don't print thread id in the
5032 debugging output. Don't check whether pid of thread equals to pid.
5033 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5034 iterate_over_lwps instead find_inferior.
5036 2015-08-24 Pedro Alves <palves@redhat.com>
5038 * inferiors.c (get_first_process): New function.
5039 * inferiors.h (get_first_process): New declaration.
5040 * remote-utils.c (read_ptid): Default to the first process in the
5041 list, instead of to the current thread's process.
5043 2015-08-24 Pedro Alves <palves@redhat.com>
5045 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5046 * event-loop.c: Likewise.
5047 * remote-utils.c: Likewise.
5048 * tracepoint.c: Likewise.
5050 2015-08-24 Pedro Alves <palves@redhat.com>
5052 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5055 2015-08-21 Pedro Alves <palves@redhat.com>
5057 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5058 instead of literal 1.
5060 2015-08-21 Pedro Alves <palves@redhat.com>
5062 * tdesc.c (default_description): Explicitly zero-initialize.
5064 2015-08-21 Pedro Alves <palves@redhat.com>
5067 * inferiors.c (remove_thread): Discard any pending stop reply for
5069 * server.c (remove_all_on_match_pid): Rename to ...
5070 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5072 (discard_queued_stop_replies): Change parameter to a ptid. Now
5074 (handle_v_kill, kill_inferior_callback, captured_main)
5075 (process_serial_event): Adjust.
5076 * server.h (discard_queued_stop_replies): Declare.
5078 2015-08-21 Pedro Alves <palves@redhat.com>
5080 * linux-low.c (wait_for_sigstop): Always switch to no thread
5081 selected if the previously current thread dies.
5082 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5083 process instead of the current thread's.
5084 * remote-utils.c (input_interrupt): Don't check if there's no
5086 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5087 current thread to the general thread fails, error out.
5088 (handle_qxfer_auxv, handle_qxfer_libraries)
5089 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5090 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5091 (handle_query): Check if there's a thread selected instead of
5092 checking whether there's any thread in the thread list.
5093 (handle_qxfer_threads, handle_qxfer_btrace)
5094 (handle_qxfer_btrace_conf): Don't error out early if there's no
5095 thread in the thread list.
5096 (handle_v_cont, myresume): Don't set the current thread to the
5098 (process_serial_event) <Hg handling>: Also set thread_id if the
5099 previous general thread is still alive.
5100 (process_serial_event) <g/G handling>: If setting the current
5101 thread to the general thread fails, error out.
5102 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5103 thread's lwp instead of the current thread's.
5104 * target.c (set_desired_thread): If the desired thread was not
5105 found, leave the current thread pointing to NULL. Return an int
5106 (boolean) indicating success.
5107 * target.h (set_desired_thread): Change return type to int.
5109 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5111 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5112 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5114 (ps_get_thread_area): New function.
5116 2015-08-19 Gary Benson <gbenson@redhat.com>
5118 * hostio.c (handle_pread): Do not attempt to read more data
5119 than hostio_reply_with_data can fit in a packet.
5121 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5123 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5125 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5127 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5129 2015-08-06 Pedro Alves <palves@redhat.com>
5131 * tracepoint.c (expr_eval_result): Now an int.
5133 2015-08-06 Pedro Alves <palves@redhat.com>
5135 * gdbthread.h (struct regcache): Forward declare.
5136 (struct thread_info) <regcache_data>: Now a struct regcache
5138 * inferiors.c (inferior_regcache_data)
5139 (set_inferior_regcache_data): Now work with struct regcache
5141 * inferiors.h (struct regcache): Forward declare.
5142 (inferior_regcache_data, set_inferior_regcache_data): Now work
5143 with struct regcache pointers.
5144 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5145 (free_register_cache_thread): Remove struct regcache pointer
5148 2015-08-06 Pedro Alves <palves@redhat.com>
5150 * server.c (captured_main): On error, print the exception message
5151 to stderr, and if run_once is set, throw a quit.
5153 2015-08-06 Pedro Alves <palves@redhat.com>
5155 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5158 2015-08-06 Pedro Alves <palves@redhat.com>
5160 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5161 reading beyond the passed in buffer length.
5163 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5165 * tracepoint.c (symbol_list) <required>: Remove.
5167 2015-08-06 Pedro Alves <palves@redhat.com>
5169 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5170 count if stopping and suspending threads.
5171 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5172 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5173 (linux_detach): Complete an ongoing step-over.
5174 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5176 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5177 (linux_wait_1): If passing a signal to the inferior after
5178 finishing a step-over, unsuspend and re-resume all lwps. If we
5179 see a single-step event but the thread should be continuing, don't
5180 pass the trap to gdb.
5181 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5182 internal_error instead of gdb_assert.
5183 (enqueue_pending_signal): New function.
5184 (check_ptrace_stopped_lwp_gone): Add debug output.
5185 (start_step_over): Use internal_error instead of gdb_assert.
5186 (complete_ongoing_step_over): New function.
5187 (linux_resume_one_thread): Don't resume a suspended thread.
5188 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5191 2015-08-06 Pedro Alves <palves@redhat.com>
5193 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5194 (linux_thread_alive): Use lwp_is_marked_dead.
5195 (extended_event_reported): Delete.
5196 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5197 instead of extended_event_reported.
5198 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5200 (lwp_is_marked_dead): New function.
5201 (lwp_running): Use lwp_is_marked_dead.
5202 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5205 2015-08-06 Pedro Alves <palves@redhat.com>
5207 * linux-low.c (linux_wait_1): Move fork event output out of the
5208 !report_to_gdb check. Pass event_child->waitstatus to
5209 target_waitstatus_to_string instead of ourstatus.
5211 2015-08-04 Yao Qi <yao.qi@linaro.org>
5213 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5214 if current_thread is 32 bit.
5216 2015-08-04 Yao Qi <yao.qi@linaro.org>
5218 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5219 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5220 * server.c (extended_protocol): Remove "static".
5221 * server.h (extended_protocol): Declare it.
5223 2015-08-04 Yao Qi <yao.qi@linaro.org>
5225 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5226 both aarch64 and aarch32.
5227 (aarch64_set_pc): Likewise.
5229 2015-08-04 Yao Qi <yao.qi@linaro.org>
5231 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5232 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5233 arm-with-neon.xml to srv_xmlfiles.
5234 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5235 (is_64bit_tdesc): New function.
5236 (aarch64_linux_read_description): New function.
5237 (aarch64_arch_setup): Call aarch64_linux_read_description.
5238 (regs_info): Rename to regs_info_aarch64.
5239 (aarch64_regs_info): Return right regs_info.
5240 (initialize_low_arch): Call initialize_low_arch_aarch32.
5242 2015-08-04 Yao Qi <yao.qi@linaro.org>
5244 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5245 * linux-aarch32-low.c: New file.
5246 * linux-aarch32-low.h: New file.
5247 * linux-arm-low.c (arm_fill_gregset): Move it to
5248 linux-aarch32-low.c.
5249 (arm_store_gregset): Likewise.
5250 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5251 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5252 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5253 (regs_info): Rename to regs_info_arm.
5254 (arm_regs_info): Return regs_info_aarch32 if
5255 have_ptrace_getregset is 1 and target description is
5256 arm_with_neon or arm_with_vfpv3.
5257 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5258 Call initialize_low_arch_aarch32 instead.
5260 2015-08-04 Yao Qi <yao.qi@linaro.org>
5262 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5263 * linux-low.c: ... here.
5264 * linux-low.h (have_ptrace_getregset): Declare it.
5266 2015-08-04 Pedro Alves <palves@redhat.com>
5268 * thread-db.c (struct thread_db): Use new typedefs.
5269 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5271 (disable_thread_event_reporting): Cast result of dlsym to
5272 destination function pointer type.
5273 (thread_db_mourn): Use td_ta_delete_ftype.
5275 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5277 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5279 (CDX_BREAKPOINT): Define for R2.
5280 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5281 (the_low_target): Add comments.
5283 2015-07-30 Yao Qi <yao.qi@linaro.org>
5285 * linux-arm-low.c (arm_hwcap): Remove it.
5286 (arm_read_description): New local variable arm_hwcap. Don't
5287 set arm_hwcap to zero.
5289 2015-07-30 Yao Qi <yao.qi@linaro.org>
5291 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5292 Use regcache->tdesc instead.
5293 (arm_store_wmmxregset): Likewise.
5294 (arm_fill_vfpregset): Likewise.
5295 (arm_store_vfpregset): Likewise.
5297 2015-07-30 Yao Qi <yao.qi@linaro.org>
5299 * linux-arm-low.c: Include arch/arm.h.
5300 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5301 (arm_store_gregset): Likewise.
5303 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5305 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5306 ptrace's 4th parameter.
5308 2015-07-27 Yao Qi <yao.qi@linaro.org>
5310 * configure.srv (case aarch64*-*-linux*): Don't set
5313 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5315 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5317 * linux-arm-low.c: Likewise.
5318 * linux-cris-low.c: Likewise.
5319 * linux-crisv32-low.c: Likewise.
5320 * linux-low.c: Likewise.
5321 * linux-m68k-low.c: Likewise.
5322 * linux-mips-low.c: Likewise.
5323 * linux-nios2-low.c: Likewise.
5324 * linux-s390-low.c: Likewise.
5325 * linux-sparc-low.c: Likewise.
5326 * linux-tic6x-low.c: Likewise.
5327 * linux-tile-low.c: Likewise.
5328 * linux-x86-low.c: Likewise.
5330 2015-07-24 Pedro Alves <palves@redhat.com>
5332 * config.in: Regenerate.
5333 * configure: Regenerate.
5335 2015-07-24 Pedro Alves <palves@redhat.com>
5337 * acinclude.m4: Include ../ptrace.m4.
5338 * configure.ac: Call GDB_AC_PTRACE.
5339 * config.in, configure: Regenerate.
5341 2015-07-24 Yao Qi <yao.qi@linaro.org>
5343 * linux-low.c (linux_create_inferior): Remove setting to
5344 proc->priv->new_inferior.
5345 (linux_attach): Likewise.
5346 (linux_low_filter_event): Likewise.
5347 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5349 2015-07-24 Yao Qi <yao.qi@linaro.org>
5351 * linux-low.c (linux_arch_setup): New function.
5352 (linux_low_filter_event): If proc->tdesc is NULL and
5353 proc->attached is true, call the_low_target.arch_setup.
5354 Otherwise, keep status pending, and return.
5355 (linux_resume_one_lwp_throw): Don't call get_pc if
5356 thread->while_stepping isn't NULL. Don't call
5357 get_thread_regcache if proc->tdesc is NULL.
5358 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5359 (linux_target_ops): Install arch_setup.
5360 * server.c (start_inferior): Call the_target->arch_setup.
5361 * target.h (struct target_ops) <arch_setup>: New field.
5362 (target_arch_setup): New marco.
5363 * lynx-low.c (lynx_target_ops): Update.
5364 * nto-low.c (nto_target_ops): Update.
5365 * spu-low.c (spu_target_ops): Update.
5366 * win32-low.c (win32_target_ops): Update.
5368 2015-07-24 Yao Qi <yao.qi@linaro.org>
5370 * linux-low.c (linux_add_process): Don't set
5371 proc->priv->new_inferior.
5372 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5373 (linux_attach): Likewise.
5375 2015-07-24 Yao Qi <yao.qi@linaro.org>
5377 * server.c (start_inferior): Code refactor.
5379 2015-07-24 Yao Qi <yao.qi@linaro.org>
5381 * server.c (process_serial_event): Set general_thread.
5383 2015-07-21 Yao Qi <yao.qi@linaro.org>
5385 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5386 aarch64_linux_get_debug_reg_capacity.
5388 2015-07-17 Yao Qi <yao.qi@linaro.org>
5390 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5391 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5392 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5393 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5394 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5395 (AARCH64_HWP_ALIGNMENT): Likewise.
5396 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5397 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5398 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5399 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5400 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5401 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5402 (struct aarch64_debug_reg_state): Likewise.
5403 (struct arch_lwp_info): Likewise.
5404 (aarch64_align_watchpoint): Likewise.
5405 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5406 (aarch64_watchpoint_length): Likewise.
5407 (aarch64_point_encode_ctrl_reg): Likewise
5408 (aarch64_point_is_aligned): Likewise.
5409 (aarch64_align_watchpoint): Likewise.
5410 (aarch64_linux_set_debug_regs):
5411 (aarch64_dr_state_insert_one_point): Likewise.
5412 (aarch64_dr_state_remove_one_point): Likewise.
5413 (aarch64_handle_breakpoint): Likewise.
5414 (aarch64_handle_aligned_watchpoint): Likewise.
5415 (aarch64_handle_unaligned_watchpoint): Likewise.
5416 (aarch64_handle_watchpoint): Likewise.
5418 2015-07-17 Yao Qi <yao.qi@linaro.org>
5420 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5421 and don't aarch64_get_debug_reg_state. All callers update.
5422 (aarch64_handle_aligned_watchpoint): Likewise.
5423 (aarch64_handle_unaligned_watchpoint): Likewise.
5424 (aarch64_handle_watchpoint): Likewise.
5425 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5426 (aarch64_remove_point): Likewise.
5428 2015-07-17 Yao Qi <yao.qi@linaro.org>
5430 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5432 (aarch64_handle_unaligned_watchpoint): Likewise.
5434 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5436 Revert the previous 3 commits:
5437 Move gdb_regex* to common/
5438 Move linux_find_memory_regions_full & co.
5439 gdbserver build-id attribute generator
5441 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5442 Jan Kratochvil <jan.kratochvil@redhat.com>
5444 gdbserver build-id attribute generator.
5445 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5446 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5447 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5449 (get_dynamic): Use find_pdhr to traverse program headers.
5450 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5451 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5452 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5453 (get_hex_build_id): New.
5454 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5455 to reply XML document.
5457 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5458 Jan Kratochvil <jan.kratochvil@redhat.com>
5460 * target.c: Include target/target-utils.h and fcntl.h.
5461 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5462 (target_fileio_read_stralloc): New functions.
5464 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5466 * Makefile.in (OBS): Add gdb_regex.o.
5468 * config.in: Rebuilt.
5469 * configure: Rebuilt.
5471 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5472 Jan Kratochvil <jan.kratochvil@redhat.com>
5474 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5475 * Makefile.in (OBS): Add target-utils.o.
5476 (linux-maps.o, target-utils.o): New.
5477 * configure.srv (srv_linux_obj): Add linux-maps.o.
5479 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5481 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5483 (the_low_target): Install it.
5485 2015-07-14 Pedro Alves <palves@redhat.com>
5487 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5488 Instead, ignore ECHILD, and throw an error for other errnos.
5490 2015-07-10 Pedro Alves <palves@redhat.com>
5492 * event-loop.c (struct callback_event) <data>: Change type to
5493 gdb_client_data instance instead of gdb_client_data pointer.
5494 (append_callback_event): Adjust.
5496 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5498 * linux-aarch64-low.c: Add comments for each linux_target_ops
5499 method. Remove comments already covered in target_ops and
5500 linux_target_ops definitions.
5501 (the_low_target): Add comments for each unimplemented method.
5503 2015-07-09 Yao Qi <yao.qi@linaro.org>
5505 * linux-aarch64-low.c (aarch64_regmap): Remove.
5506 (aarch64_usrregs_info): Remove.
5507 (regs_info): Set field usrregs to NULL.
5509 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5511 * linux-low.c: Include "rsp-low.h"
5512 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5513 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5514 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5515 (handle_btrace_enable_pt): New.
5516 (handle_btrace_general_set): Support "pt".
5517 (handle_btrace_conf_general_set): Support "pt:size".
5519 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5521 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5524 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5526 * linux-aarch64-low.c: Remove comment about endianness.
5527 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5528 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5531 2015-06-24 Gary Benson <gbenson@redhat.com>
5533 * linux-i386-ipa.c (stdint.h): Do not include.
5534 * lynx-i386-low.c (stdint.h): Likewise.
5535 * lynx-ppc-low.c (stdint.h): Likewise.
5536 * mem-break.c (stdint.h): Likewise.
5537 * thread-db.c (stdint.h): Likewise.
5538 * tracepoint.c (stdint.h): Likewise.
5539 * win32-low.c (stdint.h): Likewise.
5541 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5543 * server.c (write_qxfer_response): Update call to
5544 remote_escape_output.
5546 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5547 Jan Kratochvil <jan.kratochvil@redhat.com>
5549 Merge multiple hex conversions.
5550 * gdbreplay.c (tohex): Rename to 'fromhex'.
5551 (logchar): Use fromhex.
5553 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5555 * server.c (handle_qxfer_libraries): Set `version' attribute for
5558 2015-06-10 Gary Benson <gbenson@redhat.com>
5560 * target.h (struct target_ops) <multifs_open>: New field.
5561 <multifs_unlink>: Likewise.
5562 <multifs_readlink>: Likewise.
5563 * linux-low.c (nat/linux-namespaces.h): New include.
5564 (linux_target_ops): Initialize the_target->multifs_open,
5565 the_target->multifs_unlink and the_target->multifs_readlink.
5566 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5567 * hostio.c (hostio_fs_pid): New static variable.
5568 (hostio_handle_new_gdb_connection): New function.
5569 (handle_setfs): Likewise.
5570 (handle_open): Use the_target->multifs_open as appropriate.
5571 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5572 (handle_readlink): Use the_target->multifs_readlink as
5574 (handle_vFile): Handle vFile:setfs packets.
5575 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5576 after target_handle_new_gdb_connection.
5578 2015-06-10 Gary Benson <gbenson@redhat.com>
5580 * configure.ac (AC_CHECK_FUNCS): Add setns.
5581 * config.in: Regenerate.
5582 * configure: Likewise.
5583 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5584 (linux-namespaces.o): New rule.
5585 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5587 2015-06-09 Gary Benson <gbenson@redhat.com>
5589 * hostio.c (handle_open): Process mode argument with
5590 fileio_to_host_mode.
5592 2015-06-01 Yao Qi <yao.qi@linaro.org>
5594 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5595 * linux-x86-low.c: Likewise.
5597 2015-05-28 Don Breazeal <donb@codesourcery.com>
5599 * linux-low.c (handle_extended_wait): Initialize
5600 thread_info.last_resume_kind for new fork children.
5602 2015-05-15 Pedro Alves <palves@redhat.com>
5604 * target.h (target_handle_new_gdb_connection): Rewrite using if
5605 wrapped in do/while.
5607 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5609 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5610 * configure, config.in: Regenerate.
5611 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5614 2015-05-12 Don Breazeal <donb@codesourcery.com>
5616 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5617 PTRACE_EVENT_VFORK_DONE.
5618 (linux_low_ptrace_options, extended_event_reported): Add vfork
5620 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5621 and "vforkdone" for RSP 'T' Stop Reply Packet.
5622 * server.h (report_vfork_events): Declare
5625 2015-05-12 Don Breazeal <donb@codesourcery.com>
5627 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5628 (the_low_target) <new_fork>: Initialize new member.
5629 * linux-arm-low.c (arm_new_fork): New function.
5630 (the_low_target) <new_fork>: Initialize new member.
5631 * linux-low.c (handle_extended_wait): Call new target function
5633 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5634 * linux-mips-low.c (mips_add_watchpoint): New function
5635 extracted from mips_insert_point.
5636 (the_low_target) <new_fork>: Initialize new member.
5637 (mips_linux_new_fork): New function.
5638 (mips_insert_point): Call mips_add_watchpoint.
5639 * linux-x86-low.c (x86_linux_new_fork): New function.
5640 (the_low_target) <new_fork>: Initialize new member.
5642 2015-05-12 Don Breazeal <donb@codesourcery.com>
5644 * linux-low.c (handle_extended_wait): Implement return value,
5645 rename argument 'event_child' to 'event_lwp', handle
5646 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5647 (linux_low_ptrace_options): New function.
5648 (linux_low_filter_event): Call linux_low_ptrace_options,
5649 use different argument fo linux_enable_event_reporting,
5650 use return value from handle_extended_wait.
5651 (extended_event_reported): New function.
5652 (linux_wait_1): Call extended_event_reported and set
5653 status to report fork events.
5654 (linux_write_memory): Add pid to debug message.
5655 (reset_lwp_ptrace_options_callback): New function.
5656 (linux_handle_new_gdb_connection): New function.
5657 (linux_target_ops): Initialize new structure member.
5658 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5659 * lynx-low.c: Initialize new structure member.
5660 * remote-utils.c (prepare_resume_reply): Implement stop reason
5661 "fork" for "T" stop message.
5662 * server.c (handle_query): Call handle_new_gdb_connection.
5663 * server.h (report_fork_events): Declare global flag.
5664 * target.h (struct target_ops) <handle_new_gdb_connection>:
5666 (target_handle_new_gdb_connection): New macro.
5667 * win32-low.c: Initialize new structure member.
5669 2015-05-12 Don Breazeal <donb@codesourcery.com>
5671 * mem-break.c (APPEND_TO_LIST): Define macro.
5672 (clone_agent_expr): New function.
5673 (clone_one_breakpoint): New function.
5674 (clone_all_breakpoints): New function.
5675 * mem-break.h: Declare new functions.
5677 2015-05-12 Don Breazeal <donb@codesourcery.com>
5679 * linux-low.c (linux_supports_fork_events): New function.
5680 (linux_supports_vfork_events): New function.
5681 (linux_target_ops): Initialize new structure members.
5682 (initialize_low): Call linux_check_ptrace_features.
5683 * lynx-low.c (lynx_target_ops): Initialize new structure
5685 * server.c (report_fork_events, report_vfork_events):
5687 (handle_query): Add new features to qSupported packet and
5689 (captured_main): Initialize new global variables.
5690 * target.h (struct target_ops) <supports_fork_events>:
5692 <supports_vfork_events>: New member.
5693 (target_supports_fork_events): New macro.
5694 (target_supports_vfork_events): New macro.
5695 * win32-low.c (win32_target_ops): Initialize new structure
5698 2015-05-12 Gary Benson <gbenson@redhat.com>
5700 * server.c (handle_qxfer_exec_file): Use current process
5703 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5705 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5706 Remove HAVE_PTRACE_GETREGS conditionals.
5707 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5708 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5710 2015-05-08 Yao Qi <yao.qi@linaro.org>
5712 * linux-low.c (linux_supports_conditional_breakpoints): New
5714 (linux_target_ops): Install new target method.
5715 * lynx-low.c (lynx_target_ops): Install NULL hook for
5716 supports_conditional_breakpoints.
5717 * nto-low.c (nto_target_ops): Likewise.
5718 * spu-low.c (spu_target_ops): Likewise.
5719 * win32-low.c (win32_target_ops): Likewise.
5720 * server.c (handle_query): Check
5721 target_supports_conditional_breakpoints.
5722 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5724 (target_supports_conditional_breakpoints): New macro.
5726 2015-05-06 Pedro Alves <palves@redhat.com>
5729 * server.c (start_inferior): If the process exits, mourn it.
5731 2015-04-21 Gary Benson <gbenson@redhat.com>
5733 * hostio.c (fileio_open_flags_to_host): Factored out to
5734 fileio_to_host_openflags in common/fileio.c. Single use
5737 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5739 * linux-xtensa-low.c (xtensa_fill_gregset)
5740 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5743 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5745 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5746 (regs_info): Replace usrregs pointer with NULL.
5748 2015-04-17 Gary Benson <gbenson@redhat.com>
5750 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5751 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5752 * server.c (handle_qxfer_exec_file): New function.
5753 (qxfer_packets): Add exec-file entry.
5754 (handle_query): Report qXfer:exec-file:read as supported packet.
5756 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5758 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5760 2015-04-09 Gary Benson <gbenson@redhat.com>
5762 * hostio-errno.c (errno_to_fileio_error): Remove function.
5763 Update caller to use remote_fileio_to_fio_error.
5765 2015-04-09 Yao Qi <yao.qi@linaro.org>
5767 * linux-low.c (linux_insert_point): Call
5768 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5769 (linux_remove_point): Call remove_memory_breakpoint if type is
5771 * linux-x86-low.c (x86_insert_point): Don't call
5772 insert_memory_breakpoint.
5773 (x86_remove_point): Don't call remove_memory_breakpoint.
5775 2015-04-01 Pedro Alves <palves@redhat.com>
5776 Cleber Rosa <crosa@redhat.com>
5778 * server.c (gdbserver_usage): Reorganize and extend the usage
5781 2015-03-24 Pedro Alves <palves@redhat.com>
5783 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5784 output. Also dump TRAP_TRACE.
5785 (linux_low_filter_event): In debug output, distinguish a
5786 resume_stop SIGSTOP from a delayed SIGSTOP.
5788 2015-03-24 Gary Benson <gbenson@redhat.com>
5790 * linux-x86-low.c (x86_linux_new_thread): Moved to
5792 (x86_linux_prepare_to_resume): Likewise.
5794 2015-03-24 Gary Benson <gbenson@redhat.com>
5796 * Makefile.in (x86-linux-dregs.o): New rule.
5797 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5798 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5799 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5800 (x86_linux_dr_get): Likewise.
5801 (x86_linux_dr_set): Likewise.
5802 (update_debug_registers_callback): Likewise.
5803 (x86_linux_dr_set_addr): Likewise.
5804 (x86_linux_dr_get_addr): Likewise.
5805 (x86_linux_dr_set_control): Likewise.
5806 (x86_linux_dr_get_control): Likewise.
5807 (x86_linux_dr_get_status): Likewise.
5808 (x86_linux_update_debug_registers): Likewise.
5810 2015-03-24 Gary Benson <gbenson@redhat.com>
5812 * linux-x86-low.c (x86_linux_update_debug_registers):
5813 New function, factored out from...
5814 (x86_linux_prepare_to_resume): ...this.
5816 2015-03-24 Gary Benson <gbenson@redhat.com>
5818 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5819 (x86_linux_dr_set): Likewise.
5820 (update_debug_registers_callback): Likewise.
5821 (x86_linux_dr_set_addr): Likewise.
5822 (x86_linux_dr_get_addr): Likewise.
5823 (x86_linux_dr_set_control): Likewise.
5824 (x86_linux_dr_get_control): Likewise.
5825 (x86_linux_dr_get_status): Likewise.
5826 (x86_linux_prepare_to_resume): Likewise.
5828 2015-03-24 Gary Benson <gbenson@redhat.com>
5830 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5831 Use perror_with_name. Pass string through gettext.
5832 (x86_linux_dr_set): Likewise.
5834 2015-03-24 Gary Benson <gbenson@redhat.com>
5836 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5837 (x86_linux_dr_set_addr): ...this.
5838 (x86_dr_low_get_addr): Rename to...
5839 (x86_linux_dr_get_addr): ...this.
5840 (x86_dr_low_set_control): Rename to...
5841 (x86_linux_dr_set_control): ...this.
5842 (x86_dr_low_get_control): Rename to...
5843 (x86_linux_dr_get_control): ...this.
5844 (x86_dr_low_get_status): Rename to...
5845 (x86_linux_dr_get_status): ...this.
5846 (x86_dr_low): Update with new function names.
5848 2015-03-24 Gary Benson <gbenson@redhat.com>
5850 * Makefile.in (x86-linux.o): New rule.
5851 * configure.srv: Add x86-linux.o to relevant targets.
5852 * linux-low.c (lwp_set_arch_private_info): New function.
5853 (lwp_arch_private_info): Likewise.
5854 * linux-x86-low.c: Include nat/x86-linux.h.
5855 (arch_lwp_info): Removed structure.
5856 (update_debug_registers_callback):
5857 Use lwp_set_debug_registers_changed.
5858 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5859 and lwp_set_debug_registers_changed.
5860 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5862 2015-03-24 Gary Benson <gbenson@redhat.com>
5864 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5865 * linux-arm-low.c (arm_new_thread): Likewise.
5866 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5867 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5868 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5869 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5871 2015-03-24 Gary Benson <gbenson@redhat.com>
5873 * linux-low.c (ptid_of_lwp): New function.
5874 (lwp_is_stopped): Likewise.
5875 (lwp_stop_reason): Likewise.
5876 * linux-x86-low.c (update_debug_registers_callback):
5878 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5881 2015-03-24 Gary Benson <gbenson@redhat.com>
5883 * linux-low.h (linux_stop_lwp): Remove declaration.
5885 2015-03-24 Gary Benson <gbenson@redhat.com>
5887 * linux-low.h: Include nat/linux-nat.h.
5888 * linux-low.c (iterate_over_lwps_args): New structure.
5889 (iterate_over_lwps_filter): New function.
5890 (iterate_over_lwps): Likewise.
5891 * linux-x86-low.c (update_debug_registers_callback):
5892 Update signature to what iterate_over_lwps expects.
5893 Remove PID check that iterate_over_lwps now performs.
5894 (x86_dr_low_set_addr): Use iterate_over_lwps.
5895 (x86_dr_low_set_control): Likewise.
5897 2015-03-24 Gary Benson <gbenson@redhat.com>
5899 * linux-x86-low.c (x86_debug_reg_state): New function.
5900 (x86_linux_prepare_to_resume): Use the above.
5902 2015-03-24 Gary Benson <gbenson@redhat.com>
5904 * linux-low.c (current_lwp_ptid): New function.
5905 * linux-x86-low.c: Include nat/linux-nat.h.
5906 (x86_dr_low_get_addr): Use current_lwp_ptid.
5907 (x86_dr_low_get_control): Likewise.
5908 (x86_dr_low_get_status): Likewise.
5910 2015-03-20 Pedro Alves <palves@redhat.com>
5912 * tracepoint.c (cmd_qtstatus): Make "str" const.
5914 2015-03-20 Pedro Alves <palves@redhat.com>
5916 * server.c (handle_general_set): Make "req_str" const.
5918 2015-03-19 Pedro Alves <palves@redhat.com>
5920 * linux-low.c (linux_resume_one_lwp): Rename to ...
5921 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5922 instead call perror_with_name.
5923 (check_ptrace_stopped_lwp_gone): New function.
5924 (linux_resume_one_lwp): Reimplement as wrapper around
5925 linux_resume_one_lwp_throw that swallows errors if the LWP is
5928 2015-03-19 Pedro Alves <palves@redhat.com>
5930 * linux-low.c (count_events_callback, select_event_lwp_callback):
5931 No longer check whether the thread has resume_stop as last resume
5934 2015-03-19 Pedro Alves <palves@redhat.com>
5936 * linux-low.c (count_events_callback, select_event_lwp_callback):
5937 Use the lwp's status_pending_p field, not the thread's.
5939 2015-03-19 Pedro Alves <palves@redhat.com>
5941 * linux-low.c (select_event_lwp_callback): Update comments to
5942 no longer mention SIGTRAP.
5944 2015-03-18 Gary Benson <gbenson@redhat.com>
5946 * server.c (handle_query): Do not report vFile:fstat as supported.
5948 2015-03-11 Gary Benson <gbenson@redhat.com>
5950 * hostio.c (sys/types.h): New include.
5951 (sys/stat.h): Likewise.
5952 (common-remote-fileio.h): Likewise.
5953 (handle_fstat): New function.
5954 (handle_vFile): Handle vFile:fstat packets.
5956 2015-03-11 Gary Benson <gbenson@redhat.com>
5958 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5959 struct stat.st_blocks and struct stat.st_blksize.
5960 * configure: Regenerate.
5961 * config.in: Likewise.
5962 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5963 (OBS): Add common-remote-fileio.o.
5964 (common-remote-fileio.o): New rule.
5966 2015-03-09 Pedro Alves <palves@redhat.com>
5968 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5969 'struct sockaddr' pointer in 'accept' call.
5971 2015-03-09 Pedro Alves <palves@redhat.com>
5974 2015-03-07 Pedro Alves <palves@redhat.com>
5975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5976 or <winsock2.h> here. Instead include "gdb_socket.h".
5977 (remote_open): Use union gdb_sockaddr_u.
5978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5979 or <winsock2.h> here. Instead include "gdb_socket.h".
5980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5983 (init_named_socket, gdb_agent_helper_thread): Use union
5986 2015-03-07 Pedro Alves <palves@redhat.com>
5988 * configure.ac (build_warnings): Move
5989 -Wdeclaration-after-statement to the C-specific set.
5990 * configure: Regenerate.
5992 2015-03-07 Pedro Alves <palves@redhat.com>
5994 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5995 or <winsock2.h> here. Instead include "gdb_socket.h".
5996 (remote_open): Use union gdb_sockaddr_u.
5997 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5998 or <winsock2.h> here. Instead include "gdb_socket.h".
5999 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6000 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6002 (init_named_socket, gdb_agent_helper_thread): Use union
6005 2015-03-07 Pedro Alves <palves@redhat.com>
6007 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6010 2015-03-06 Yao Qi <yao.qi@linaro.org>
6012 * linux-aarch64-low.c (aarch64_insert_point): Use
6013 show_debug_regs as a boolean.
6014 (aarch64_remove_point): Likewise.
6016 2015-03-05 Pedro Alves <palves@redhat.com>
6018 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6019 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6020 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6021 * nto-low.c (nto_target_ops): Likewise.
6022 * spu-low.c (spu_target_ops): Likewise.
6023 * win32-low.c (win32_target_ops): Likewise.
6025 2015-03-04 Pedro Alves <palves@redhat.com>
6027 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6028 Decide whether a breakpoint triggered based on the SIGTRAP's
6030 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6031 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6032 (linux_low_filter_event): Check for breakpoints before checking
6034 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6036 (linux_stopped_by_sw_breakpoint)
6037 (linux_supports_stopped_by_sw_breakpoint)
6038 (linux_stopped_by_hw_breakpoint)
6039 (linux_supports_stopped_by_hw_breakpoint): New functions.
6040 (linux_target_ops): Install new target methods.
6042 2015-03-04 Pedro Alves <palves@redhat.com>
6044 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6045 * server.c (swbreak_feature, hwbreak_feature): New globals.
6046 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6047 (captured_main): Clear swbreak_feature and hwbreak_feature.
6048 * server.h (swbreak_feature, hwbreak_feature): Declare.
6049 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6050 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6051 supports_stopped_by_hw_breakpoint>: New fields.
6052 (target_supports_stopped_by_sw_breakpoint)
6053 (target_stopped_by_sw_breakpoint)
6054 (target_supports_stopped_by_hw_breakpoint)
6055 (target_stopped_by_hw_breakpoint): Declare.
6057 2015-03-04 Pedro Alves <palves@redhat.com>
6059 enum lwp_stop_reason -> enum target_stop_reason
6060 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6061 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6062 (linux_wait_1, stuck_in_jump_pad_callback)
6063 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6064 (linux_stopped_by_watchpoint):
6065 * linux-low.h (enum lwp_stop_reason): Delete.
6066 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6067 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6069 2015-03-04 Yao Qi <yao.qi@linaro.org>
6071 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6073 2015-03-03 Gary Benson <gbenson@redhat.com>
6075 * hostio.c (handle_vFile): Fix prefix lengths.
6077 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6079 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6082 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6084 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6085 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6086 (clean): Add "rm -f" for above C files.
6087 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6088 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6089 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6090 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6091 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6092 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6093 (init_registers_s390x_vx_linux64)
6094 (init_registers_s390x_tevx_linux64)
6095 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6096 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6098 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6099 (s390_store_vxrs_high): New functions.
6100 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6102 (s390_arch_setup): Add logic for selecting one of the new target
6103 descriptions. Activate the new vector regsets if applicable.
6104 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6105 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6106 and init_registers_s390x_tevx_linux64.
6108 2015-03-01 Pedro Alves <palves@redhat.com>
6110 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6113 2015-02-27 Pedro Alves <palves@redhat.com>
6115 * linux-x86-low.c (u_debugreg_offset): New function.
6116 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6118 2015-02-27 Pedro Alves <palves@redhat.com>
6120 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6121 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6122 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6123 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6124 (ps_lsetfpregs, ps_getpid)
6125 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6126 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6127 (ps_lsetxregs, ps_plog): Declare.
6129 2015-02-27 Pedro Alves <palves@redhat.com>
6131 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6132 IP_AGENT_EXPORT_FUNC.
6133 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6134 IP_AGENT_EXPORT_FUNC.
6135 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6136 (IP_AGENT_EXPORT): Delete.
6137 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6138 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6139 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6140 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6141 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6142 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6143 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6144 (traceframe_read_count, traceframe_write_count)
6145 (traceframes_created, trace_state_variables, get_raw_reg)
6146 (get_trace_state_variable_value, set_trace_state_variable_value)
6147 (ust_loaded, helper_thread_id, cmd_buf): Use
6148 IPA_SYM_EXPORTED_NAME.
6149 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6150 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6151 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6152 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6153 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6154 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6155 EXTERN_C_PUSH/EXTERN_C_POP.
6156 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6157 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6158 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6159 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6160 (traceframe_write_count, traceframe_read_count)
6161 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6162 (about_to_request_buffer_space, get_trace_state_variable_value)
6163 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6164 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6165 EXTERN_C_PUSH/EXTERN_C_POP.
6166 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6167 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6168 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6169 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6170 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6171 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6172 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6173 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6175 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6176 (IP_AGENT_EXPORT_VAR_DECL): Define.
6178 (gdb_agent_get_raw_reg): Declare.
6180 2015-02-27 Tom Tromey <tromey@redhat.com>
6181 Pedro Alves <palves@redhat.com>
6183 Rename symbols whose names are reserved C++ keywords throughout.
6185 2015-02-27 Pedro Alves <palves@redhat.com>
6187 * Makefile.in (COMPILER): New, get it from autoconf.
6188 (CXX): Get from autoconf instead.
6189 (COMPILE.pre): Use COMPILER.
6190 (CC-LD): Rename to ...
6191 (CC_LD): ... this. Use COMPILER.
6192 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6193 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6194 * acinclude.m4: Include build-with-cxx.m4.
6195 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6196 Disable -Werror by default if building in C++ mode.
6197 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6198 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6199 the C++ compiler. Save/restore CXXFLAGS too.
6200 * configure: Regenerate.
6202 2015-02-27 Pedro Alves <palves@redhat.com>
6204 * acinclude.m4: Include libiberty.m4.
6205 * configure.ac: Call libiberty_INIT.
6206 * config.in, configure: Regenerate.
6208 2015-02-26 Pedro Alves <palves@redhat.com>
6210 * linux-low.c (linux_wait_1): When incrementing the PC past a
6211 program breakpoint always use the_low_target.breakpoint_len as
6212 increment, rather than the maximum between that and
6213 the_low_target.decr_pc_after_break.
6215 2015-02-23 Pedro Alves <palves@redhat.com>
6217 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6218 thread was doing a step-over; always adjust the PC if
6219 we stepped over a permanent breakpoint.
6220 (linux_wait_1): If we stepped over breakpoint that was on top of a
6221 permanent breakpoint, manually advance the PC past it.
6223 2015-02-23 Pedro Alves <palves@redhat.com>
6225 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6227 (x86_fill_gregset, x86_store_gregset): Use it when handling
6230 2015-02-20 Pedro Alves <palves@redhat.com>
6232 * thread-db.c: Include "nat/linux-procfs.h".
6233 (thread_db_init): Skip listing new threads if the kernel supports
6234 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6236 2015-02-20 Pedro Alves <palves@redhat.com>
6238 * linux-low.c (status_pending_p_callback): Use ptid_match.
6240 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6242 PR breakpoints/16812
6243 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6244 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6245 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6247 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6249 PR breakpoints/15956
6250 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6252 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6254 * linux-low.c (linux_low_btrace_conf): Print size.
6255 * server.c (handle_btrace_conf_general_set): New.
6256 (hanle_general_set): Call handle_btrace_conf_general_set.
6257 (handle_query): Report Qbtrace-conf:bts:size as supported.
6259 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6261 * linux-low.c (linux_low_enable_btrace): Update parameters.
6262 (linux_low_btrace_conf): New.
6263 (linux_target_ops)<to_btrace_conf>: Initialize.
6264 * server.c (current_btrace_conf): New.
6265 (handle_btrace_enable): Rename to ...
6266 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6267 to target_enable_btrace. Update comment. Update users.
6268 (handle_qxfer_btrace_conf): New.
6269 (qxfer_packets): Add btrace-conf entry.
6270 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6271 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6272 (target_ops)<read_btrace_conf>: New.
6273 (target_enable_btrace): Update parameters.
6274 (target_read_btrace_conf): New.
6276 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6278 * server.c (handle_btrace_general_set): Remove call to
6279 target_supports_btrace.
6280 (supported_btrace_packets): New.
6281 (handle_query): Call supported_btrace_packets.
6282 * target.h: include btrace-common.h.
6283 (btrace_target_info): Removed.
6284 (supports_btrace, target_supports_btrace): Update parameters.
6286 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6288 * Makefile.in (SFILES): Add common/btrace-common.c.
6289 (OBS): Add common/btrace-common.o.
6290 (btrace-common.o): Add build rules.
6291 * linux-low: Include btrace-common.h.
6292 (linux_low_read_btrace): Use struct btrace_data. Call
6293 btrace_data_init and btrace_data_fini.
6295 2015-02-06 Pedro Alves <palves@redhat.com>
6297 * thread-db.c (find_new_threads_callback): Add debug output.
6299 2015-02-04 Pedro Alves <palves@redhat.com>
6301 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6302 (resume_stopped_resumed_lwps): New function.
6303 (linux_wait_for_event_filtered): Use it.
6305 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6307 * Makefile.in (SFILES): Add linux-personality.c.
6308 (linux-personality.o): New rule.
6309 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6310 list of objects to be built.
6311 * linux-low.c: Include nat/linux-personality.h.
6312 (linux_create_inferior): Remove code to disable address space
6313 randomization (moved to ../nat/linux-personality.c). Create
6314 cleanup to disable address space randomization.
6316 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6318 * Makefile.in (posix-strerror.o): New rule.
6319 (mingw-strerror.o): Likewise.
6320 * configure: Regenerated.
6321 * configure.ac: Source file ../common/common.host. Initialize new
6322 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6324 2015-01-14 Yao Qi <yao@codesourcery.com>
6326 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6327 (ppc-linux.o): New rule.
6328 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6329 * configure.ac: AC_CHECK_FUNCS(getauxval).
6330 * config.in: Re-generated.
6331 * configure: Re-generated.
6332 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6333 ppc64_64bit_inferior_p
6335 2015-01-14 Yao Qi <yao@codesourcery.com>
6337 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6338 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6339 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6340 (PT_ORIG_R3, PT_TRAP): Likewise.
6341 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6342 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6343 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6345 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6347 * i387-fp.c (i387_cache_to_xsave): In look over
6348 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6349 zmmh_low_space field by use of zmmh_high_space.
6351 2015-01-09 Pedro Alves <palves@redhat.com>
6353 * linux-low.c (step_over_bkpt): Move higher up in the file.
6354 (handle_extended_wait): Don't store the stop_pc here.
6355 (get_stop_pc): Adjust comments and rename to ...
6356 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6357 stopped for a software breakpoint or hardware breakpoint.
6358 (thread_still_has_status_pending_p): New function.
6359 (status_pending_p_callback): Use
6360 thread_still_has_status_pending_p. If the event is no longer
6361 interesting, resume the LWP.
6362 (handle_tracepoints): Add assert.
6363 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6364 (wstatus_maybe_breakpoint): New function.
6365 (cancel_breakpoint): Delete function.
6366 (check_stopped_by_watchpoint): New function, factored out from
6367 linux_low_filter_event.
6368 (lp_status_maybe_breakpoint): Delete function.
6369 (linux_low_filter_event): Remove filter_ptid argument.
6370 Leave thread group exits pending here. Store the LWP's stop PC.
6371 Always leave events pending.
6372 (linux_wait_for_event_filtered): Pull all events out of the
6373 kernel, and leave them all pending.
6374 (count_events_callback, select_event_lwp_callback): Consider all
6376 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6377 (select_event_lwp): Only give preference to the stepping LWP in
6378 all-stop mode. Adjust comments.
6379 (ignore_event): New function.
6380 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6381 references to cancel_breakpoints. Adjust to renames. Also give
6382 equal priority to all LWPs that have had events in non-stop mode.
6383 If reporting a software breakpoint event, unadjust the LWP's PC.
6384 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6385 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6387 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6388 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6389 (linux_stopped_by_watchpoint): Adjust.
6390 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6391 * linux-low.h (enum lwp_stop_reason): New.
6392 (struct lwp_info) <stop_pc>: Adjust comment.
6393 <stopped_by_watchpoint>: Delete field.
6394 <stop_reason>: New field.
6395 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6396 * mem-break.c (software_breakpoint_inserted_here)
6397 (hardware_breakpoint_inserted_here): New function.
6398 * mem-break.h (software_breakpoint_inserted_here)
6399 (hardware_breakpoint_inserted_here): Declare.
6400 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6401 (cancel_breakpoints): Delete.
6402 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6403 (upload_fast_traceframes): Remove references to
6406 2015-01-09 Pedro Alves <palves@redhat.com>
6408 * thread-db.c (find_new_threads_callback): Ignore thread if the
6409 kernel thread ID is -1.
6411 2015-01-09 Pedro Alves <palves@redhat.com>
6413 * linux-low.c (linux_attach_fail_reason_string): Move to
6414 nat/linux-ptrace.c, and rename.
6415 (linux_attach_lwp): Update comment.
6416 (attach_proc_task_lwp_callback): New function.
6417 (linux_attach): Adjust to rename and use
6418 linux_proc_attach_tgid_threads.
6419 (linux_attach_fail_reason_string): Delete declaration.
6421 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6423 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6424 * server.c (gdbserver_version): Likewise.
6426 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6428 * remote-utils.c: Include ctype.h.
6429 (input_interrupt): Explicitly handle the case when the char
6430 received is the NUL byte. Improve the printing of non-ASCII
6433 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6435 * linux-low.c (linux_low_filter_event): Update call to
6436 linux_enable_event_reporting following the addition of
6437 a new parameter to that function.
6439 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6442 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6443 (AARCH64_FPCR_REGNO): Likewise.
6444 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6445 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6446 (aarch64_store_fpregset): Likewise.
6448 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6450 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6451 Remove FIXME comment about assumption about N.
6453 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6455 * configure.ac: If large-file support is disabled in GDBserver,
6456 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6457 * configure: Regenerate.
6459 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6461 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6462 warning upon ENODATA from ptrace.
6463 * linux-s390-low.c (s390_store_tdb): New.
6464 (s390_regsets): Add regset for NT_S390_TDB.
6466 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6468 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6469 without a fill_function.
6470 * linux-s390-low.c (s390_fill_last_break): Remove.
6471 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6472 (s390_arch_setup): Use regset's size instead of fill_function for
6475 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6477 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6478 the regset's store function when ptrace returned an error.
6479 * regcache.c (get_thread_regcache): Invalidate register cache
6480 before fetching inferior's registers.
6482 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6484 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6485 while-loop as for-loop.
6486 (regsets_store_inferior_registers): Likewise.
6488 2014-11-28 Yao Qi <yao@codesourcery.com>
6490 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6491 * config.in, configure: Re-generate.
6492 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6495 2014-11-21 Yao Qi <yao@codesourcery.com>
6497 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6498 (AC_CHECK_HEADERS): Remove malloc.h.
6499 * configure: Re-generated.
6500 * config.in: Re-generated.
6501 * server.h: Don't include alloca.h and malloc.h.
6502 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6503 Don't include malloc.h.
6505 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6507 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6508 corresponding ERRNO check in same block.
6510 2014-11-12 Pedro Alves <palves@redhat.com>
6512 * server.c (cont_thread): Update comment.
6513 (start_inferior, attach_inferior): No longer clear cont_thread.
6514 (handle_v_cont): No longer set cont_thread.
6515 (captured_main): Clear cont_thread each time a GDB connects.
6517 2014-11-12 Pedro Alves <palves@redhat.com>
6519 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6520 thread, and don't resume all threads if the Hc thread has exited.
6522 2014-11-12 Pedro Alves <palves@redhat.com>
6524 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6525 the process group instead of to a specific LWP.
6527 2014-10-15 Pedro Alves <palves@redhat.com>
6530 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6532 (arm_set_thread_context): Delete.
6533 (the_low_target): Adjust.
6534 * win32-i386-low.c (debug_registers_changed)
6535 (debug_registers_used): Delete.
6536 (update_debug_registers_callback): New function.
6537 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6538 needing to update their debug registers.
6539 (win32_get_current_dr): New function.
6540 (x86_dr_low_get_addr, x86_dr_low_get_control)
6541 (x86_dr_low_get_status): Fetch the debug register from the thread
6543 (i386_initial_stuff): Adjust.
6544 (i386_get_thread_context): Remove current_event parameter. Don't
6545 clear debug_registers_changed nor copy DR values to
6547 (i386_set_thread_context): Delete.
6548 (i386_prepare_to_resume): New function.
6549 (i386_thread_added): Mark the thread as needing to update irs
6551 (the_low_target): Remove i386_set_thread_context and install
6552 i386_prepare_to_resume.
6553 * win32-low.c (win32_get_thread_context): Adjust.
6554 (win32_set_thread_context): Use SetThreadContext
6556 (win32_prepare_to_resume): New function.
6557 (win32_require_context): New function, factored out from ...
6558 (thread_rec): ... this.
6559 (continue_one_thread): Call win32_prepare_to_resume on each thread
6560 we're about to continue.
6561 (win32_resume): Call win32_prepare_to_resume on the event thread.
6562 * win32-low.h (struct win32_thread_info)
6563 <debug_registers_changed>: New field.
6564 (struct win32_target_ops): Change prototype of set_thread_context,
6565 delete set_thread_context and add prepare_to_resume.
6566 (win32_require_context): New declaration.
6568 2014-10-08 Gary Benson <gbenson@redhat.com>
6570 * server.h: Do not include common-exceptions.h.
6572 2014-10-08 Gary Benson <gbenson@redhat.com>
6574 * server.h: Do not include cleanups.h.
6576 2014-09-30 James Hogan <james.hogan@imgtec.com>
6578 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6581 2014-09-23 Yao Qi <yao@codesourcery.com>
6583 * linux-low.c (lp_status_maybe_breakpoint): New function.
6584 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6585 (count_events_callback): Likewise.
6586 (select_event_lwp_callback): Likewise.
6587 (cancel_breakpoints_callback): Likewise.
6589 2014-09-19 Don Breazeal <donb@codesourcery.com>
6591 * linux-low.c (handle_extended_wait): Call
6592 linux_ptrace_get_extended_event.
6593 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6594 linux_is_extended_waitstatus.
6596 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6598 * Makefile.in (CPPFLAGS): Define.
6599 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6600 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6602 2014-09-16 Gary Benson <gbenson@redhat.com>
6604 * inferiors.h (current_inferior): Renamed as...
6605 (current_thread): New variable. All uses updated.
6606 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6607 (maybe_move_out_of_jump_pad): Likewise.
6608 (cancel_breakpoint): Likewise.
6609 (linux_low_filter_event): Likewise.
6610 (wait_for_sigstop): Likewise.
6611 (linux_resume_one_lwp): Likewise.
6612 (need_step_over_p): Likewise.
6613 (start_step_over): Likewise.
6614 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6615 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6616 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6617 and save_inferior as saved_thread.
6618 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6620 (regcache_invalidate_thread): Likewise.
6621 * remote-utils.c (prepare_resume_reply): Likewise.
6622 * thread-db.c (thread_db_get_tls_address): Likewise.
6623 (disable_thread_event_reporting): Likewise.
6624 (remove_thread_event_breakpoints): Likewise.
6625 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6627 * target.h (set_desired_inferior): Renamed as...
6628 (set_desired_thread): New declaration. All uses updated.
6629 * server.c (myresume): Updated comment to reference thread instead
6631 (handle_serial_event): Likewise.
6632 (handle_target_event): Likewise.
6634 2014-09-12 Tom Tromey <tromey@redhat.com>
6635 Gary Benson <gbenson@redhat.com>
6637 * regcache.h: Include common-regcache.h.
6638 (regcache_read_pc): Don't declare.
6639 * regcache.c (get_thread_regcache_for_ptid): New function.
6641 2014-09-11 Tom Tromey <tromey@redhat.com>
6642 Gary Benson <gbenson@redhat.com>
6644 * symbol.c: New file.
6645 * Makefile.in (SFILES): Add symbol.c.
6646 (OBS): Add symbol.o.
6648 2014-09-11 Gary Benson <gbenson@redhat.com>
6650 * target.c (target_stop_ptid, target_continue_ptid): New
6653 2014-09-11 Tom Tromey <tromey@redhat.com>
6654 Gary Benson <gbenson@redhat.com>
6656 * target.h: Include target/target.h.
6657 * target.c (target_read_memory, target_read_uint32)
6658 (target_write_memory): New functions.
6660 2014-09-11 Gary Benson <gbenson@redhat.com>
6662 * server.h (debug_hw_points): Don't declare.
6663 * server.c (debug_hw_points): Don't define. Replace all uses
6664 with show_debug_regs.
6665 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6666 all uses with show_debug_regs.
6668 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6670 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6671 endianness into account.
6672 (ppc_supply_ptrace_register): Likewise.
6674 2014-09-03 James Hogan <james.hogan@imgtec.com>
6676 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6677 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6679 2014-09-03 Gary Benson <gbenson@redhat.com>
6681 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6682 ALL_DEBUG_ADDRESS_REGISTERS.
6684 2014-09-02 Gary Benson <gbenson@redhat.com>
6686 * i386-low.h: Renamed as...
6687 * x86-low.h: New file. All type, function and variable name
6688 prefixes changed from "i386_" to "x86_". All references updated.
6689 * i386-low.c: Renamed as...
6690 * x86-low.c: New file. All type, function and variable name
6691 prefixes changed from "i386_" to "x86_". All references updated.
6693 2014-09-02 Gary Benson <gbenson@redhat.com>
6695 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6696 (x86_linux_new_thread): Likewise.
6698 2014-08-29 Gary Benson <gbenson@redhat.com>
6700 * server.h (setjmp.h): Do not include.
6701 (toplevel): Do not declare.
6702 (common-exceptions.h): Include.
6703 (cleanups.h): Likewise.
6704 * server.c (toplevel): Do not define.
6705 (exit_code): New static global.
6706 (detach_or_kill_for_exit_cleanup): New function.
6707 (main): New function. Original main renamed to...
6708 (captured_main): New function.
6709 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6711 2014-08-29 Gary Benson <gbenson@redhat.com>
6713 * Makefile.in (SFILES): Add common/common-exceptions.c.
6714 (OBS): Add common-exceptions.o.
6715 (common-exceptions.o): New rule.
6716 * utils.c (prepare_to_throw_exception): New function.
6718 2014-08-29 Gary Benson <gbenson@redhat.com>
6720 * config.in: Regenerate.
6721 * configure: Likewise.
6723 2014-08-29 Gary Benson <gbenson@redhat.com>
6725 * Makefile.in (SFILES): Add common/cleanups.c.
6727 (cleanups.o): New rule.
6729 2014-08-29 Gary Benson <gbenson@redhat.com>
6731 * utils.c (internal_vwarning): New function.
6733 2014-08-28 Gary Benson <gbenson@redhat.com>
6735 * utils.h (fatal): Remove declaration.
6736 * utils.c (fatal): Remove function.
6738 2014-08-28 Gary Benson <gbenson@redhat.com>
6740 * tracepoint.c (gdb_agent_init): Replace fatal with
6742 (initialize_tracepoint): Likewise.
6744 2014-08-28 Gary Benson <gbenson@redhat.com>
6746 * remote-utils.c (remote_prepare): Replace fatal with error.
6748 2014-08-28 Gary Benson <gbenson@redhat.com>
6750 * linux-low.c (linux_async): Replace fatal with warning.
6752 (linux_start_non_stop): Return -1 if linux_async failed.
6754 2014-08-28 Gary Benson <gbenson@redhat.com>
6756 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6758 (i386_dr_low_get_addr): Remove vague comment.
6759 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6762 2014-08-28 Gary Benson <gbenson@redhat.com>
6764 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6765 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6767 (linux_resume_one_lwp): Likewise.
6768 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6770 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6771 with internal_error.
6772 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6773 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6774 (find_register_by_name): Replace fatal with internal_error.
6775 (find_regno): Likewise.
6776 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6777 * thread-db.c (thread_db_create_event): Likewise.
6778 (thread_db_load_search): Likewise.
6779 (try_thread_db_load_1): Likewise.
6780 * tracepoint.c (get_jump_space_head): Replace fatal with
6782 (claim_trampoline_space): Likewise.
6783 (have_fast_tracepoint_trampoline_buffer): Likewise.
6784 (cmd_qtstart): Likewise.
6785 (stop_tracing): Likewise.
6786 (fast_tracepoint_collecting): Likewise.
6787 (target_malloc): Likewise.
6788 (download_tracepoint): Likewise.
6789 (download_trace_state_variables): Replace check with gdb_assert.
6790 (upload_fast_traceframes): Replace fatal with internal_error.
6792 2014-08-19 Tom Tromey <tromey@redhat.com>
6793 Gary Benson <gbenson@redhat.com>
6795 * Makefile.in (SFILES): Add common/common-debug.c.
6796 (OBS): Add common-debug.o.
6797 (common-debug.o): New rule.
6798 * debug.h (debug_printf): Don't declare.
6799 * debug.c (debug_printf): Renamed and rewritten as...
6800 (debug_vprintf): New function.
6802 2014-08-19 Gary Benson <gbenson@redhat.com>
6804 * utils.h: Do not include print-utils.h.
6806 2014-08-19 Tom Tromey <tromey@redhat.com>
6807 Gary Benson <gbenson@redhat.com>
6809 * server.h: Add static assertion.
6810 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6812 2014-08-19 Tom Tromey <tromey@redhat.com>
6813 Gary Benson <gbenson@redhat.com>
6815 * Makefile.in (SFILES): Add common/errors.c.
6816 (OBS): Add errors.o.
6817 (IPA_OBS): Add errors-ipa.o.
6818 (errors.o): New rule.
6819 (errors-ipa.o): Likewise.
6820 * utils.h (perror_with_name, error, warning): Don't declare.
6821 * utils.c (warning): Renamed and rewritten as...
6822 (vwarning): New function.
6823 (error): Renamed and rewritten as...
6824 (verror): New function.
6825 (internal_error): Renamed and rewritten as...
6826 (internal_verror): New function.
6828 2014-08-07 Gary Benson <gbenson@redhat.com>
6830 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6831 * configure: Regenerate.
6832 * config.in: Likewise.
6833 * server.h: Do not include errno.h.
6834 * event-loop.c: Likewise.
6835 * hostio-errno.c: Likewise.
6836 * linux-low.c: Likewise.
6837 * remote-utils.c: Likewise.
6838 * spu-low.c: Likewise.
6839 * utils.c: Likewise.
6840 * gdbreplay.c: Unconditionally include errno.h.
6842 2014-08-07 Gary Benson <gbenson@redhat.com>
6844 * server.h: Do not include string.h.
6845 * event-loop.c: Likewise.
6846 * linux-low.c: Likewise.
6847 * regcache.c: Likewise.
6848 * remote-utils.c: Likewise.
6849 * spu-low.c: Likewise.
6850 * utils.c: Likewise.
6852 2014-08-07 Gary Benson <gbenson@redhat.com>
6854 * server.h: Do not include gdb_assert.h.
6856 2014-08-07 Gary Benson <gbenson@redhat.com>
6858 * server.h: Do not include common-utils.h.
6860 2014-08-07 Gary Benson <gbenson@redhat.com>
6862 * server.h: Do not include ptid.h.
6863 * notif.h: Likewise.
6865 2014-08-07 Gary Benson <gbenson@redhat.com>
6867 * server.h: Do not include gdb_locale.h.
6869 2014-08-07 Gary Benson <gbenson@redhat.com>
6871 * server.h: Do not include gdb/signals.h.
6872 * win32-low.c: Likewise.
6874 2014-08-07 Gary Benson <gbenson@redhat.com>
6876 * server.h: Do not include pathmax.h.
6878 2014-08-07 Gary Benson <gbenson@redhat.com>
6880 * server.h: Do not include libiberty.h.
6881 * linux-bfin-low.c: Likewise.
6883 2014-08-07 Gary Benson <gbenson@redhat.com>
6885 * server.h: Do not include ansidecl.h.
6887 2014-08-07 Gary Benson <gbenson@redhat.com>
6889 * linux-x86-low.c: Do not include stddef.h.
6890 * lynx-ppc-low.c: Likewise.
6891 * tracepoint.c: Likewise.
6893 2014-08-07 Gary Benson <gbenson@redhat.com>
6895 * server.h: Do not include stdarg.h.
6896 * nto-low.c: Likewise.
6898 2014-08-07 Gary Benson <gbenson@redhat.com>
6900 * server.h: Do not include stdlib.h.
6901 * inferiors.c: Likewise.
6902 * linux-low.c: Likewise.
6903 * regcache.c: Likewise.
6904 * spu-low.c: Likewise.
6905 * tracepoint.c: Likewise.
6906 * utils.c: Likewise.
6908 2014-08-07 Gary Benson <gbenson@redhat.com>
6910 * server.h: Do not include stdio.h.
6911 * linux-low.c: Likewise.
6912 * remote-utils.c: Likewise.
6913 * spu-low.c: Likewise.
6914 * utils.c: Likewise.
6915 * wincecompat.c: Likewise.
6917 2014-08-06 Gary Benson <gbenson@redhat.com>
6919 * regcache.c (init_register_cache): Move conditionals inside if.
6921 2014-08-06 Gary Benson <gbenson@redhat.com>
6923 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6925 2014-07-31 Gary Benson <gbenson@redhat.com>
6927 * ax.h: Do not include server.h.
6928 * gdbthread.h: Likewise.
6929 * lynx-low.h: Likewise.
6930 * notif.h: Likewise.
6932 2014-07-30 Gary Benson <gbenson@redhat.com>
6934 * server.h: Include common-defs.h.
6935 Do not include config.h or build-gnulib-gdbserver/config.h.
6937 2014-07-30 Gary Benson <gbenson@redhat.com>
6939 * hostio-errno.c: Move server.h to top of includes list.
6940 * inferiors.c: Likewise.
6941 * linux-x86-low.c: Likewise.
6942 * notif.c: Include server.h.
6944 2014-07-24 Tom Tromey <tromey@redhat.com>
6945 Gary Benson <gbenson@redhat.com>
6947 * server.h (CORE_ADDR): Now unsigned.
6949 2014-07-16 Pedro Alves <palves@redhat.com>
6951 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6953 2014-07-15 Pedro Alves <palves@redhat.com>
6955 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6958 2014-07-11 Pedro Alves <palves@redhat.com>
6960 * linux-low.c (kill_wait_lwp): New function, based on
6961 kill_one_lwp_callback, but use my_waitpid directly.
6962 (kill_one_lwp_callback, linux_kill): Use it.
6964 2014-06-23 Pedro Alves <palves@redhat.com>
6966 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6967 before setting DR0..DR3.
6969 2014-06-20 Gary Benson <gbenson@redhat.com>
6971 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6972 * configure: Regenerated.
6973 * config.in: Likewise.
6975 2014-06-20 Gary Benson <gbenson@redhat.com>
6977 * Makefile.in (SFILES): Update locations for files moved
6979 (object file files): Reordered.
6981 2014-06-20 Gary Benson <gbenson@redhat.com>
6983 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6984 (i386_dr_low_set_addr): Likewise.
6985 (i386_dr_low_get_addr): Likewise.
6986 (i386_dr_low_can_set_control): Likewise.
6987 (i386_dr_low_set_control): Likewise.
6988 (i386_dr_low_get_control): Likewise.
6989 (i386_dr_low_get_status): Likewise.
6990 (i386_get_debug_register_length): Likewise.
6991 * linux-x86-low.c (i386_dr_low_set_addr):
6992 Changed signature. Made static.
6993 (i386_dr_low_get_addr): Likewise.
6994 (i386_dr_low_set_control): Likewise.
6995 (i386_dr_low_get_control): Likewise.
6996 (i386_dr_low_get_status): Likewise.
6997 (i386_dr_low): New global variable.
6998 * win32-i386-low.c (i386_dr_low_set_addr):
6999 Changed signature. Made static.
7000 (i386_dr_low_get_addr): Likewise.
7001 (i386_dr_low_set_control): Likewise.
7002 (i386_dr_low_get_control): Likewise.
7003 (i386_dr_low_get_status): Likewise.
7004 (i386_dr_low): New global variable.
7006 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7008 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7009 * Makefile.in (AR, AR_FLAGS): Define.
7010 * configure: Regenerate.
7012 2014-06-19 Gary Benson <gbenson@redhat.com>
7014 * Makefile.in (i386-dregs.o): New rule.
7015 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7016 * i386-low.c (target.h): Remove include.
7017 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7018 (DR_CONTROL_SHIFT): Likewise.
7019 (DR_CONTROL_SIZE): Likewise.
7020 (DR_RW_EXECUTE): Likewise.
7021 (DR_RW_WRITE): Likewise.
7022 (DR_RW_READ): Likewise.
7023 (DR_RW_IORW): Likewise.
7024 (DR_LEN_1): Likewise.
7025 (DR_LEN_2): Likewise.
7026 (DR_LEN_4): Likewise.
7027 (DR_LEN_8): Likewise.
7028 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7029 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7030 (DR_ENABLE_SIZE): Likewise.
7031 (DR_LOCAL_SLOWDOWN): Likewise.
7032 (DR_GLOBAL_SLOWDOWN): Likewise.
7033 (DR_CONTROL_RESERVED): Likewise.
7034 (I386_DR_CONTROL_MASK): Likewise.
7035 (I386_DR_VACANT): Likewise.
7036 (I386_DR_LOCAL_ENABLE): Likewise.
7037 (I386_DR_GLOBAL_ENABLE): Likewise.
7038 (I386_DR_DISABLE): Likewise.
7039 (I386_DR_SET_RW_LEN): Likewise.
7040 (I386_DR_GET_RW_LEN): Likewise.
7041 (I386_DR_WATCH_HIT): Likewise.
7042 (i386_wp_op_t): Likewise.
7043 (i386_show_dr): Likewise.
7044 (i386_length_and_rw_bits): Likewise.
7045 (i386_insert_aligned_watchpoint): Likewise.
7046 (i386_remove_aligned_watchpoint): Likewise.
7047 (i386_handle_nonaligned_watchpoint): Likewise.
7048 i386_update_inferior_debug_regs(): Likewise.
7049 (i386_dr_insert_watchpoint): Likewise.
7050 (i386_dr_remove_watchpoint): Likewise.
7051 (i386_dr_region_ok_for_watchpoint): Likewise.
7052 (i386_dr_stopped_data_address): Likewise.
7053 (i386_dr_stopped_by_watchpoint): Likewise.
7055 2014-06-19 Gary Benson <gbenson@redhat.com>
7057 * i386-low.c (i386_dr_show): Renamed to
7058 i386_show_dr and made static. All uses updated.
7059 (i386_dr_length_and_rw_bits): Renamed to
7060 i386_length_and_rw_bits and made static.
7062 (i386_dr_insert_aligned_watchpoint): Renamed to
7063 i386_insert_aligned_watchpoint and made static.
7065 (i386_dr_remove_aligned_watchpoint): Renamed to
7066 i386_remove_aligned_watchpoint and made static.
7068 (i386_dr_update_inferior_debug_regs): Renamed to
7069 i386_update_inferior_debug_regs and made static.
7072 2014-06-18 Gary Benson <gbenson@redhat.com>
7074 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7075 (i386_dr_low_can_set_control): Likewise.
7076 (i386_get_debug_register_length): Likewise.
7077 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7078 (i386_dr_low_can_set_control): Likewise.
7079 (i386_get_debug_register_length): Likewise.
7081 2014-06-17 Gary Benson <gbenson@redhat.com>
7083 * i386-low.h (i386-dregs.h): New include.
7084 (DR_FIRSTADDR): Now in i386-dregs.h.
7085 (DR_LASTADDR): Likewise.
7086 (DR_NADDR): Likewise.
7087 (DR_STATUS): Likewise.
7088 (DR_CONTROL): Likewise.
7089 (i386_debug_reg_state): 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.
7095 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7097 2014-06-18 Gary Benson <gbenson@redhat.com>
7099 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7100 i386_dr_insert_watchpoint.
7101 (i386_low_remove_watchpoint): Renamed to
7102 i386_dr_remove_watchpoint.
7103 (i386_low_region_ok_for_watchpoint): Renamed to
7104 i386_dr_region_ok_for_watchpoint.
7105 (i386_low_stopped_data_address): Renamed to
7106 i386_dr_stopped_data_address.
7107 (i386_low_stopped_by_watchpoint): Renamed to
7108 i386_dr_stopped_by_watchpoint.
7109 * i386-low.c (i386_show_dr): Renamed to
7110 i386_dr_show and made nonstatic. All uses updated.
7111 (i386_length_and_rw_bits): Renamed to
7112 i386_dr_length_and_rw_bits and made nonstatic.
7114 (i386_insert_aligned_watchpoint): Renamed to
7115 i386_dr_insert_aligned_watchpoint and made nonstatic.
7117 (i386_remove_aligned_watchpoint): Renamed to
7118 i386_dr_remove_aligned_watchpoint and made nonstatic.
7120 (i386_update_inferior_debug_regs): Renamed to
7121 i386_dr_update_inferior_debug_regs and made nonstatic.
7123 (i386_low_insert_watchpoint): Renamed to
7124 i386_dr_insert_watchpoint. All uses updated.
7125 (i386_low_remove_watchpoint): Renamed to
7126 i386_dr_remove_watchpoint. All uses updated.
7127 (i386_low_region_ok_for_watchpoint): Renamed to
7128 i386_dr_region_ok_for_watchpoint. All uses updated.
7129 (i386_low_stopped_data_address): Renamed to
7130 i386_dr_stopped_data_address. All uses updated.
7131 (i386_low_stopped_by_watchpoint): Renamed to
7132 i386_dr_stopped_by_watchpoint. All uses updated.
7134 2014-06-18 Gary Benson <gbenson@redhat.com>
7136 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7137 (i386_dr_low_can_set_control): Likewise.
7138 (i386_insert_aligned_watchpoint): New check.
7140 2014-06-18 Gary Benson <gbenson@redhat.com>
7142 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7145 2014-06-18 Gary Benson <gbenson@redhat.com>
7147 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7148 instead of fatal and error.
7149 (i386_handle_nonaligned_watchpoint): Likewise.
7151 2014-06-18 Gary Benson <gbenson@redhat.com>
7153 * i386-low.c (i386_get_debug_register_length): New macro.
7154 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7155 (i386_show_dr): Use debug_printf instead of fprintf. Use
7156 phex to format values.
7158 2014-06-18 Gary Benson <gbenson@redhat.com>
7160 * i386-low.h: Comment changes.
7161 * i386-low.c: Likewise.
7163 2014-06-18 Gary Benson <gbenson@redhat.com>
7165 * i386-low.c: Whitespace changes.
7167 2014-06-12 Tom Tromey <tromey@redhat.com>
7169 * utils.c (freeargv): Remove.
7171 2014-06-12 Tom Tromey <tromey@redhat.com>
7173 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7174 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7175 (parse_debug_format_options): Likewise.
7176 (gdbserver_usage): Likewise.
7177 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7178 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7179 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7181 ($(LIBGNU)): Depend on libiberty.
7182 (all-lib): Recurse into all subdirs.
7183 (install-only): Invoke "install" target in subdirs.
7184 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7186 * configure: Rebuild.
7187 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7188 for vasprintf, vsnprintf, or gettimeofday.
7189 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7192 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7194 * development.sh: Delete.
7195 * Makefile.in (config.status): Adjust dependency on development.sh.
7196 * configure.ac: Adjust development.sh source call.
7197 * configure: Regenerate.
7199 2014-06-02 Pedro Alves <palves@redhat.com>
7201 * ax.c (gdb_free_agent_expr): New function.
7202 * ax.h (gdb_free_agent_expr): New declaration.
7203 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7205 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7207 (clear_breakpoint_conditions_and_commands): New function.
7208 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7209 (clear_breakpoint_conditions_and_commands): New declaration.
7211 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7213 * linux-aarch64-low.c (asm/ptrace.h): Include.
7215 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7217 Fix TLS access for -static -pthread.
7218 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7219 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7220 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7222 2014-05-20 Pedro Alves <palves@redhat.com>
7224 * linux-aarch64-low.c (aarch64_insert_point)
7225 (aarch64_remove_point): No longer check whether the type is
7226 supported here. Adjust to new interface.
7227 (the_low_target): Install aarch64_supports_z_point_type as
7228 supports_z_point_type method.
7229 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7230 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7231 instead of a Z packet char. Adjust.
7232 (arm_supports_z_point_type): New function.
7233 (arm_insert_point, arm_remove_point): Adjust to new interface.
7234 (the_low_target): Install arm_supports_z_point_type.
7235 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7236 (cris_insert_point, cris_remove_point): Adjust to new interface.
7237 Don't check whether the type is supported here.
7238 (the_low_target): Install cris_supports_z_point_type.
7239 * linux-low.c (linux_supports_z_point_type): New function.
7240 (linux_insert_point, linux_remove_point): Adjust to new interface.
7241 * linux-low.h (struct linux_target_ops) <insert_point,
7242 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7243 raw_breakpoint pointer parameter.
7244 <supports_z_point_type>: New method.
7245 * linux-mips-low.c (mips_supports_z_point_type): New function.
7246 (mips_insert_point, mips_remove_point): Adjust to new interface.
7247 Use mips_supports_z_point_type.
7248 (the_low_target): Install mips_supports_z_point_type.
7249 * linux-ppc-low.c (the_low_target): Install NULL as
7250 supports_z_point_type method.
7251 * linux-s390-low.c (the_low_target): Install NULL as
7252 supports_z_point_type method.
7253 * linux-sparc-low.c (the_low_target): Install NULL as
7254 supports_z_point_type method.
7255 * linux-x86-low.c (x86_supports_z_point_type): New function.
7256 (x86_insert_point): Adjust to new insert_point interface. Use
7257 insert_memory_breakpoint. Adjust to new
7258 i386_low_insert_watchpoint interface.
7259 (x86_remove_point): Adjust to remove_point interface. Use
7260 remove_memory_breakpoint. Adjust to new
7261 i386_low_remove_watchpoint interface.
7262 (the_low_target): Install x86_supports_z_point_type.
7263 * lynx-low.c (lynx_target_ops): Install NULL as
7264 supports_z_point_type callback.
7265 * nto-low.c (nto_supports_z_point_type): New.
7266 (nto_insert_point, nto_remove_point): Adjust to new interface.
7267 (nto_target_ops): Install nto_supports_z_point_type.
7268 * mem-break.c: Adjust intro comment.
7269 (struct raw_breakpoint) <raw_type, size>: New fields.
7270 <inserted>: Update comment.
7271 <shlib_disabled>: Delete field.
7272 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7273 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7274 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7275 (raw_bkpt_type_to_target_hw_bp_type): New function.
7276 (find_enabled_raw_code_breakpoint_at): New function.
7277 (find_raw_breakpoint_at): New type and size parameters. Use them.
7278 (insert_memory_breakpoint): New function, based off
7279 set_raw_breakpoint_at.
7280 (remove_memory_breakpoint): New function.
7281 (set_raw_breakpoint_at): Reimplement.
7282 (set_breakpoint): New, based on set_breakpoint_at.
7283 (set_breakpoint_at): Reimplement.
7284 (delete_raw_breakpoint): Go through the_target->remove_point
7285 instead of assuming memory breakpoints.
7286 (find_gdb_breakpoint_at): Delete.
7287 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7288 (find_gdb_breakpoint): New function.
7289 (set_gdb_breakpoint_at): Delete.
7290 (z_type_supported): New function.
7291 (set_gdb_breakpoint_1): New function, loosely based off
7292 set_gdb_breakpoint_at.
7293 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7294 (delete_gdb_breakpoint_at): Delete.
7295 (delete_gdb_breakpoint_1): New function, loosely based off
7296 delete_gdb_breakpoint_at.
7297 (delete_gdb_breakpoint): New function.
7298 (clear_gdb_breakpoint_conditions): Rename to ...
7299 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7301 (add_condition_to_breakpoint): Make static.
7302 (add_breakpoint_condition): Take a struct breakpoint pointer
7303 instead of an address. Adjust.
7304 (gdb_condition_true_at_breakpoint): Rename to ...
7305 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7307 (gdb_condition_true_at_breakpoint): Reimplement.
7308 (add_breakpoint_commands): Take a struct breakpoint pointer
7309 instead of an address. Adjust.
7310 (gdb_no_commands_at_breakpoint): Rename to ...
7311 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7312 parameter. Return true if no breakpoint was found. Change debug
7314 (gdb_no_commands_at_breakpoint): Reimplement.
7315 (run_breakpoint_commands): Rename to ...
7316 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7317 and change return type to boolean.
7318 (run_breakpoint_commands): New function.
7319 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7320 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7321 breakpoint. Go through the_target->remove_point instead of
7322 assuming memory breakpoint.
7323 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7324 software and hardware breakpoints.
7325 (reinsert_raw_breakpoint): Go through the_target->insert_point
7326 instead of assuming memory breakpoint.
7327 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7328 software and hardware breakpoints.
7329 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7330 Check both software and hardware breakpoints.
7331 (validate_inserted_breakpoint): Assert the breakpoint is a
7332 software breakpoint. Set the inserted flag to -1 instead of
7333 setting shlib_disabled.
7334 (delete_disabled_breakpoints): Adjust.
7335 (validate_breakpoints): Only validate software breakpoints.
7336 Adjust to inserted flag change.
7337 (check_mem_read, check_mem_write): Skip breakpoint types other
7338 than software breakpoints. Adjust to inserted flag change.
7339 * mem-break.h (enum raw_bkpt_type): New enum.
7340 (raw_breakpoint, struct process_info): Forward declare.
7341 (Z_packet_to_target_hw_bp_type): Delete declaration.
7342 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7343 (set_gdb_breakpoint, delete_gdb_breakpoint)
7344 (clear_breakpoint_conditions): New declarations.
7345 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7346 (breakpoint_inserted_here): Update comment.
7347 (add_breakpoint_condition, add_breakpoint_commands): Replace
7348 address parameter with a breakpoint pointer parameter.
7349 (gdb_breakpoint_here): Update comment.
7350 (delete_gdb_breakpoint_at): Delete.
7351 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7352 * server.c (process_point_options): Take a struct breakpoint
7353 pointer instead of an address. Adjust.
7354 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7355 delete_gdb_breakpoint.
7356 * spu-low.c (spu_target_ops): Install NULL as
7357 supports_z_point_type method.
7358 * target.h: Include mem-break.h.
7359 (struct target_ops) <prepare_to_access_memory>: Update comment.
7360 <supports_z_point_type>: New field.
7361 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7362 instead of a char. Also take a raw breakpoint pointer.
7363 * win32-arm-low.c (the_low_target): Install NULL as
7364 supports_z_point_type.
7365 * win32-i386-low.c (i386_supports_z_point_type): New function.
7366 (i386_insert_point, i386_remove_point): Adjust to new interface.
7367 (the_low_target): Install i386_supports_z_point_type.
7368 * win32-low.c (win32_supports_z_point_type): New function.
7369 (win32_insert_point, win32_remove_point): Adjust to new interface.
7370 (win32_target_ops): Install win32_supports_z_point_type.
7371 * win32-low.h (struct win32_target_ops):
7372 <supports_z_point_type>: New method.
7373 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7374 instead of a char. Also take a raw breakpoint pointer.
7376 2014-05-20 Pedro Alves <palves@redhat.com>
7378 * mem-break.h: Include break-common.h.
7379 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7380 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7381 (Z_packet_to_target_hw_bp_type): New declaration.
7382 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7383 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7384 (Z_PACKET_ACCESS_WP): Delete macros.
7385 (Z_packet_to_hw_type): Delete function.
7386 * i386-low.h: Don't include break-common.h here.
7387 (Z_packet_to_hw_type): Delete declaration.
7388 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7389 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7390 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7391 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7392 * linux-aarch64-low.c: Don't include break-common.h here.
7393 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7394 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7395 (Z_packet_to_target_hw_bp_type): Delete function.
7396 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7398 (mips_insert_point, mips_remove_point): Use
7399 Z_packet_to_target_hw_bp_type.
7401 2014-05-20 Pedro Alves <palves@redhat.com>
7403 * linux-aarch64-low.c: Include break-common.h.
7404 (enum target_point_type): Delete.
7405 (Z_packet_to_point_type): Rename to ...
7406 (Z_packet_to_target_hw_bp_type): ... this, and return a
7407 target_hw_bp_type instead.
7408 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7409 instead of an enum target_point_type.
7410 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7412 (aarch64_dr_state_insert_one_point)
7413 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7414 (aarch64_handle_aligned_watchpoint)
7415 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7416 Take an enum target_hw_bp_type instead of an enum
7418 (aarch64_supports_z_point_type): New function.
7419 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7420 use Z_packet_to_target_hw_bp_type.
7422 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7424 * configure.ac: Only use -Werror by default when DEVELOPMENT
7426 * configure: Regenerate.
7428 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7430 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7431 * linux-x86-low.c (X86_64_USER_REGS): New.
7432 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7434 2014-04-28 Yao Qi <yao@codesourcery.com>
7436 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7439 2014-04-25 Pedro Alves <palves@redhat.com>
7442 * linux-low.c (linux_attach_fail_reason_string): New function.
7443 (linux_attach_lwp): Delete.
7444 (linux_attach_lwp_1): Rename to ...
7445 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7446 argument. Remove "initial" parameter. Return int instead of
7447 void. Don't error or warn here.
7448 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7449 failure to attach to the tgid. Call warning when failing to
7451 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7452 argument. Remove "initial" parameter. Return int instead of
7453 void. Don't error or warn here.
7454 (linux_attach_fail_reason_string): New declaration.
7455 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7456 interface change. Use linux_attach_fail_reason_string.
7458 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7459 Walfred Tedeschi <walfred.tedeschi@intel.com>
7461 * Makefile.in: Added rules to handle new files
7462 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7463 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7464 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7465 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7466 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7467 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7469 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7470 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7471 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7472 i386/x32-avx512.xml.
7473 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7474 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7475 i386/x32-avx512-linux.xml.
7476 * i387-fp.c (num_avx512_k_registers): New constant for number
7478 (num_avx512_zmmh_low_registers): New constant for number of
7479 lower ZMM registers (0-15).
7480 (num_avx512_zmmh_high_registers): New constant for number of
7481 higher ZMM registers (16-31).
7482 (num_avx512_ymmh_registers): New contant for number of higher
7483 YMM registers (ymm16-31 added by avx521 on x86_64).
7484 (num_avx512_xmm_registers): New constant for number of higher
7485 XMM registers (xmm16-31 added by AVX512 on x86_64).
7486 (struct i387_xsave): Add space for AVX512 registers.
7487 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7488 Add code to handle AVX512 registers.
7489 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7490 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7491 prototypei from generated file.
7492 (tdesc_amd64_avx512_linux): Likewise.
7493 (init_registers_x32_avx512_linux): Likewise.
7494 (tdesc_x32_avx512_linux): Likewise.
7495 (init_registers_i386_avx512_linux): Likewise.
7496 (tdesc_i386_avx512_linux): Likewise.
7497 (x86_64_regmap): Add AVX512 registers.
7498 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7500 (initialize_low_arch): Add code to initialize AVX512 registers.
7502 2014-04-23 Pedro Alves <palves@redhat.com>
7504 * mem-break.c (find_gdb_breakpoint_at): Make static.
7505 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7507 2014-04-23 Pedro Alves <palves@redhat.com>
7509 * i386-low.c: Don't include break-common.h here.
7510 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7511 prototype to take target_hw_bp_type as argument instead of a Z
7513 * i386-low.h: Include break-common.h here.
7514 (Z_packet_to_hw_type): Declare.
7515 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7517 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7518 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7519 (x86_remove_point): Convert the packet number to a
7520 target_hw_bp_type before calling i386_low_remove_watchpoint.
7521 * win32-i386-low.c (i386_insert_point): Convert the packet number
7522 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7523 (i386_remove_point): Convert the packet number to a
7524 target_hw_bp_type before calling i386_low_remove_watchpoint.
7526 2014-04-23 Pedro Alves <palves@redhat.com>
7528 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7530 2014-04-10 Pedro Alves <palves@redhat.com>
7532 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7533 Check if the condition or command is NULL before checking if the
7534 breakpoint is known. On success, return true.
7535 * mem-break.h (add_breakpoint_condition): Document return.
7536 (add_breakpoint_commands): Add describing comment.
7537 * server.c (skip_to_semicolon): New function.
7538 (process_point_options): Use it.
7540 2014-04-09 Pedro Alves <palves@redhat.com>
7542 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7545 2014-02-27 Pedro Alves <palves@redhat.com>
7548 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7550 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7552 (last_thread_of_process_p): Take a PID argument instead of a
7554 (linux_wait_for_lwp): Delete.
7555 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7557 (linux_low_filter_event): New function, party factored out from
7558 linux_wait_for_event.
7559 (linux_wait_for_event): Rename to ...
7560 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7561 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7562 sigsuspend. Check for zombie leaders.
7563 (linux_wait_for_event): Reimplement as wrapper around
7564 linux_wait_for_event_filtered.
7565 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7566 a normal or signal exit is seen, it's the whole process exiting.
7567 (wait_for_sigstop): No longer a for_each_inferior callback.
7568 Rewrite on top of linux_wait_for_event_filtered.
7569 (stop_all_lwps): Call wait_for_sigstop directly.
7570 * server.c (resume, handle_target_event): Handle
7571 TARGET_WAITKIND_NO_RESUMED.
7573 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7575 * win32-low.c (psapi_get_dll_name,
7576 * win32_CreateToolhelp32Snapshot): Delete.
7577 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7578 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7580 (handle_load_dll): Add function description.
7581 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7583 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7585 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7587 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7588 base address when calling win32_add_one_solib.
7589 (handle_load_dll): Delete local variable load_addr.
7590 Remove 0x1000 offset applied to DLL base address when calling
7591 win32_add_one_solib.
7592 (handle_unload_dll): Add comment.
7594 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7596 * win32-low.c (win32_add_all_dlls): Renames
7597 win32_ensure_ntdll_loaded. Rewrite function documentation.
7598 Adjust implementation to always load all DLLs.
7599 Add 0x1000 offset to DLL base address when calling
7600 win32_add_one_solib.
7601 (child_initialization_done): New static global.
7602 (do_initial_child_stuff): Set child_initialization_done to
7603 zero during child initialization, and 1 after. Replace call
7604 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7606 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7607 (handle_unload_dll): Add function documentation.
7608 (get_child_debug_event): Ignore load and unload DLL events
7609 during child initialization.
7611 2014-02-20 Doug Evans <dje@google.com>
7613 Remove global all_lwps.
7614 * inferiors.h (ptid_of): Move here from linux-low.h.
7615 (pid_of, lwpid_of): Ditto.
7616 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7617 parameter is a struct thread_info * now.
7618 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7619 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7620 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7622 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7623 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7624 * linux-arm-low.c (update_registers_callback): Update, "entry"
7625 parameter is a struct thread_info * now.
7626 Fetch lwpid from current_inferior directly.
7627 (arm_insert_point): Pass &all_threads to find_inferior instead of
7629 (arm_remove_point): Ditto.
7630 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7631 (arm_prepare_to_resume): Fetch pid from thread.
7632 (arm_read_description): Fetch lwpid from current_inferior directly.
7633 * linux-low.c (all_lwps): Delete.
7634 (delete_lwp): Delete call to remove_inferior.
7635 (handle_extended_wait): Fetch lwpid from thread.
7636 (add_lwp): Don't set lwp->entry.id. Remove call to
7637 add_inferior_to_list.
7638 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7639 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7640 (kill_one_lwp_callback): Ditto.
7641 (linux_kill): Don't dereference NULL pointer.
7642 Fetch ptid,lwpid from thread.
7643 (get_detach_signal): Fetch ptid from thread.
7644 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7645 Simplify call to regcache_invalidate_thread.
7646 (delete_lwp_callback): Update, "entry" parameter is a
7647 struct thread_info * now. Fetch pid from thread.
7648 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7649 (status_pending_p_callback): Update, "entry" parameter is a
7650 struct thread_info * now. Fetch ptid from thread.
7651 (find_lwp_pid): Update, "entry" parameter is a
7652 struct thread_info * now.
7653 (linux_wait_for_lwp): Fetch pid from thread.
7654 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7655 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7656 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7657 (dequeue_one_deferred_signal): Ditto.
7658 (cancel_breakpoint): Fetch ptid from current_inferior.
7659 (linux_wait_for_event): Pass &all_threads to find_inferior,
7660 not &all_lwps. Fetch ptid, lwpid from thread.
7661 (count_events_callback): Update, "entry" parameter is a
7662 struct thread_info * now.
7663 (select_singlestep_lwp_callback): Ditto.
7664 (select_event_lwp_callback): Ditto.
7665 (cancel_breakpoints_callback): Ditto.
7666 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7668 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7669 (unsuspend_one_lwp): Update, "entry" parameter is a
7670 struct thread_info * now.
7671 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7673 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7674 Fetch lwpid from thread, not lwp.
7675 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7676 Pass &all_threads to find_inferior, not &all_lwps.
7677 (send_sigstop): Fetch lwpid from thread, not lwp.
7678 (send_sigstop_callback): Update, "entry" parameter is a
7679 struct thread_info * now.
7680 (suspend_and_send_sigstop_callback): Ditto.
7681 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7682 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7683 struct thread_info * now.
7684 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7686 (lwp_running): Update, "entry" parameter is a
7687 struct thread_info * now.
7688 (stop_all_lwps): Fetch ptid from thread.
7689 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7690 (linux_resume_one_lwp): Fetch lwpid from thread.
7691 (linux_set_resume_request): Update, "entry" parameter is a
7692 struct thread_info * now. Fetch pid, lwpid from thread.
7693 (resume_status_pending_p): Update, "entry" parameter is a
7694 struct thread_info * now.
7695 (need_step_over_p): Ditto. Fetch lwpid from thread.
7696 (start_step_over): Fetch lwpid from thread.
7697 (linux_resume_one_thread): Update, "entry" parameter is a
7698 struct thread_info * now. Fetch lwpid from thread.
7699 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7700 (proceed_one_lwp): Update, "entry" parameter is a
7701 struct thread_info * now. Fetch lwpid from thread.
7702 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7703 struct thread_info * now.
7704 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7705 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7706 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7708 (regsets_store_inferior_registers): Ditto.
7709 (fetch_register, store_register): Ditto.
7710 (linux_read_memory, linux_write_memory): Ditto.
7711 (linux_request_interrupt): Ditto.
7712 (linux_read_auxv): Ditto.
7713 (linux_xfer_siginfo): Ditto.
7714 (linux_qxfer_spu): Ditto.
7715 (linux_qxfer_libraries_svr4): Ditto.
7716 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7717 moved to inferiors.h.
7719 (get_thread_lwp): Update.
7720 (struct lwp_info): Delete member "entry". Simplify comment for
7723 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7724 current_inferior directly.
7725 (update_watch_registers_callback): Update, "entry" parameter is a
7726 struct thread_info * now. Fetch pid from thread.
7727 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7728 (mips_insert_point): Fetch lwpid from current_inferior.
7729 Pass &all_threads to find_inferior, not &all_lwps.
7730 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7731 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7733 (mips_stopped_data_address): Ditto.
7734 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7736 * linux-tile-low.c (tile_arch_setup): Ditto.
7737 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7738 (update_debug_registers_callback): Update, "entry" parameter is a
7739 struct thread_info * now. Fetch pid from thread.
7740 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7741 Pass &all_threads to find_inferior, not &all_lwps.
7742 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7743 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7744 Pass &all_threads to find_inferior, not &all_lwps.
7745 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7746 (i386_dr_low_get_status): Ditto.
7747 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7748 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7749 (x86_linux_read_description): Ditto.
7750 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7752 2014-02-20 Doug Evans <dje@google.com>
7754 * inferiors.c (get_first_inferior): Fix buglet.
7756 2014-02-19 Doug Evans <dje@google.com>
7758 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7759 * inferiors.c (add_thread): Change result type to struct thread_info *.
7760 All callers updated.
7761 (add_lwp): Call add_thread here instead of in callers.
7762 All callers updated.
7763 * linux-low.h (get_lwp_thread): Rewrite.
7764 (struct lwp_info): New member "thread".
7766 2014-02-19 Doug Evans <dje@google.com>
7768 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7769 All callers updated.
7771 2014-02-19 Doug Evans <dje@google.com>
7773 * inferiors.c (add_thread): Fix whitespace.
7775 2014-02-19 Doug Evans <dje@google.com>
7777 * dll.c (clear_dlls): Replace accessing list implemention details
7779 * gdbthread.h (get_first_thread): Declare.
7780 * inferiors.c (for_each_inferior_with_data): New function.
7781 (get_first_thread): New function.
7782 (find_thread_ptid): Simplify.
7783 (get_first_inferior): New function.
7784 (clear_list): Delete.
7785 (one_inferior_p): New function.
7786 (clear_inferior_list): New function.
7787 (clear_inferiors): Update.
7788 * inferiors.h (for_each_inferior_with_data): Declare.
7789 (clear_inferior_list): Declare.
7790 (one_inferior_p): Declare.
7791 (get_first_inferior): Declare.
7792 * linux-low.c (linux_wait_for_event): Replace accessing list
7793 implemention details with API function.
7794 * server.c (target_running): Ditto.
7795 (accumulate_file_name_length): New function.
7796 (emit_dll_description): New function.
7797 (handle_qxfer_libraries): Replace accessing list implemention
7798 details with API function.
7799 (handle_qxfer_threads_worker): New function.
7800 (handle_qxfer_threads_proper): Replace accessing list implemention
7801 details with API function.
7802 (handle_query): Ditto.
7803 (visit_actioned_threads_callback_ftype): New typedef.
7804 (visit_actioned_threads_data): New struct.
7805 (visit_actioned_threads): Rewrite to be find_inferior callback.
7806 (resume): Call find_inferior.
7807 (handle_status): Replace accessing list implemention
7808 details with API function.
7809 (process_serial_event): Replace accessing list implemention details
7811 * target.c (set_desired_inferior): Replace accessing list implemention
7812 details with API function.
7813 * tracepoint.c (same_process_p): New function.
7814 (gdb_agent_about_to_close): Replace accessing list implemention
7815 details with API function.
7816 * win32-low.c (child_delete_thread): Replace accessing list
7817 implemention details with API function.
7818 (match_dll_by_basename): New function.
7819 (dll_is_loaded_by_basename): New function.
7820 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7821 details call to dll_is_loaded_by_basename.
7823 2014-02-19 Doug Evans <dje@google.com>
7825 * dll.h (struct dll_info): Add comment.
7826 * gdbthread.h (struct thread_info): Add comment.
7827 (current_ptid): Simplify.
7828 * inferiors.c (add_process): Update.
7829 (remove_process): Update.
7830 * inferiors.h (struct process_info): Rename member "head" to "entry".
7831 * linux-low.c (delete_lwp): Update.
7833 (last_thread_of_process_p): Update.
7834 (kill_one_lwp_callback, linux_kill): Update.
7835 (status_pending_p_callback): Update.
7836 (wait_for_sigstop): Update. Simplify read of ptid.
7837 (start_step_over): Update.
7838 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7839 (get_lwp_thread): Update.
7840 (struct lwp_info): Rename member "head" to "entry".
7841 * regcache.h (inferior_list_entry): Delete.
7842 * server.c (kill_inferior_callback): Update.
7843 (detach_or_kill_inferior_callback): Update.
7844 (print_started_pid): Update.
7845 (print_attached_pid): Update.
7846 (process_serial_event): Simplify read of ptid.
7847 * thread-db.c (thread_db_create_event): Update.
7848 (thread_db_get_tls_address): Update.
7849 * win32-low.c (current_inferior_ptid): Simplify.
7851 2014-02-19 Tom Tromey <tromey@redhat.com>
7853 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7855 (target_supports_btrace): Update.
7857 2014-02-14 Yao Qi <yao@codesourcery.com>
7859 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7860 (rsp-low-ipa.o): New target.
7862 2014-02-12 Tom Tromey <tromey@redhat.com>
7864 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7865 convert_ascii_to_int.
7866 * regcache.c (registers_to_string): Likewise.
7867 * remote-utils.c (decode_M_packet): Likewise.
7868 * server.c (process_serial_event): Likewise.
7870 2014-02-12 Tom Tromey <tromey@redhat.com>
7872 * server.c (handle_query, handle_v_run): Use hex2bin, not
7874 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7876 2014-02-12 Tom Tromey <tromey@redhat.com>
7878 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7879 convert_int_to_ascii.
7880 * regcache.c (registers_to_string, collect_register_as_string):
7882 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7884 * server.c (process_serial_event): Likewise.
7885 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7886 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7888 2014-02-12 Tom Tromey <tromey@redhat.com>
7890 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7891 bin2hex, not hexify.
7892 * tracepoint.c (cmd_qtstatus): Likewise.
7894 2014-02-12 Tom Tromey <tromey@redhat.com>
7896 * remote-utils.c (monitor_output): Pass explicit length to
7899 2014-02-12 Tom Tromey <tromey@redhat.com>
7901 * tracepoint.c: Include rsp-low.h.
7902 * server.c: Include rsp-low.h.
7903 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7904 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7906 * remote-utils.c: Include rsp-low.h.
7907 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7908 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7909 (convert_int_to_ascii, convert_ascii_to_int): Move to
7911 * regcache.c: Include rsp-low.h.
7912 * ax.c: Include rsp-low.h.
7913 * Makefile.in (SFILES): Add common/rsp-low.c.
7914 (OBS): Add rsp-low.o.
7915 (rsp-low.o): New target.
7917 2014-02-12 Tom Tromey <tromey@redhat.com>
7919 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7920 Include print-utils.h.
7921 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7922 (plongest, thirty_two, phex_nz): Remove.
7923 * Makefile.in (SFILES): Add common/print-utils.c.
7924 (OBS): Add print-utils.o.
7925 (print-utils-ipa.o): New target.
7926 (print-utils.o): New target.
7927 (IPA_OBJS): Add print-utils-ipa.o.
7929 2014-02-06 Tom Tromey <tromey@redhat.com>
7931 * Makefile.in (SFILES): Fix indentation.
7933 2014-02-05 Doug Evans <dje@google.com>
7935 * linux-low.c (linux_wait_for_event): Improve comment.
7936 (linux_wait_1): Keep current_inferior in sync with event_child.
7938 2014-01-22 Doug Evans <dje@google.com>
7940 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7942 2014-01-22 Doug Evans <dje@google.com>
7944 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7945 * configure: Regenerate.
7946 * config.in: Regenerate.
7947 * Makefile.in (SFILES): Add debug.c.
7949 * debug.c: New file.
7950 * debug.h: New file.
7951 * linux-aarch64-low.c (*): Update all debugging printfs to use
7952 debug_printf instead of fprintf.
7953 * linux-arm-low.c (*): Ditto.
7954 * linux-cris-low.c (*): Ditto.
7955 * linux-crisv32-low.c (*): Ditto.
7956 * linux-m32r-low.c (*): Ditto.
7957 * linux-sparc-low.c (*): Ditto.
7958 * linux-x86.c (*): Ditto.
7959 * linux-low.c (*): Ditto.
7960 (linux_wait_1): Add calls to debug_enter, debug_exit.
7961 (linux_wait): Remove redundant debugging printf.
7962 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7963 (linux_resume, unstop_all_lwps): Ditto.
7964 * mem-break.c (*): Update all debugging printfs to use
7965 debug_printf instead of fprintf.
7966 * remote-utils.c (*): Ditto.
7967 * thread-db.c (*): Ditto.
7968 * server.c #include <ctype.h>, "gdb_vecs.h".
7969 (debug_threads): Moved to debug.c.
7970 (*): Update all debugging printfs to use debug_printf instead of
7972 (start_inferior): Replace call to fflush with call to debug_flush.
7973 (monitor_show_help): Mention set debug-format.
7974 (parse_debug_format_options): New function.
7975 (handle_monitor_command): Handle "monitor set debug-format".
7976 (gdbserver_usage): Mention --debug-format.
7977 (main): Parse --debug-format.
7978 * server.h (debug_threads): Declaration moved to debug.h.
7980 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7981 trace_debug_1 that uses debug_printf.
7982 (tracepoint_look_up_symbols): Update all debugging printfs to use
7983 debug_printf instead of fprintf.
7985 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7987 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7990 2014-01-17 Pedro Alves <palves@redhat.com>
7993 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7994 defined after including gdb_proc_service.h.
7996 2014-01-16 Doug Evans <dje@google.com>
7998 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7999 (match_dll): Use it.
8001 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8003 * target.h (target_ops) <read_btrace>: Change parameters and
8004 return type to allow error reporting.
8005 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8006 trace reading errors on.
8007 * linux-low.c (linux_low_read_btrace): Pass trace reading
8009 (linux_low_disable_btrace): New.
8011 2014-01-15 Doug Evans <dje@google.com>
8013 * inferiors.c (thread_id_to_gdb_id): Delete.
8014 * inferiors.h (thread_id_to_gdb_id): Delete.
8016 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8018 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8019 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8022 2014-01-08 Pedro Alves <palves@redhat.com>
8024 * server.c (handle_status): Don't discard previous queued stop
8025 replies or thread's pending status here.
8026 (main) <disconnection>: Do it here instead.
8028 2014-01-08 Pedro Alves <palves@redhat.com>
8030 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8031 * server.c (visit_actioned_threads, handle_pending_status): New
8033 (handle_v_cont): Factor out parts to ...
8034 (resume): ... this new function. If in all-stop, and a thread
8035 being resumed has a pending status, report it without actually
8037 (myresume): Adjust to use the new 'resume' function.
8038 (clear_pending_status_callback, set_pending_status_callback)
8039 (find_status_pending_thread_callback): New functions.
8040 (handle_status): Handle the case of multiple threads having
8041 interesting statuses to report. Report threads' real last signal
8042 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8043 with an interesting thread to report the status for, instead of
8044 always reporting the status of the first thread.
8046 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8048 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8049 * gdbreplay.c (gdbreplay_version): Likewise.
8051 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8053 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8054 iov.iov_len with the real length in use.
8056 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8058 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8059 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8060 for all targets that use win32-low.c.
8061 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8062 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8064 2013-12-13 Pedro Alves <palves@redhat.com>
8066 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8067 if equal to TARGET_WAITKIND_LOADED.
8068 * win32-low.c (cached_status): New static global.
8069 (win32_wait): Add declaration.
8070 (do_initial_child_stuff): Flush all initial pending debug events
8071 up to the initial breakpoint.
8072 (win32_wait): If CACHED_STATUS was set, return that instead
8073 of doing a real wait. Remove the code resuming the execution
8074 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8075 during the initial phase. Also remove the code changing
8076 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8077 TARGET_WAITKIND_STOPPED.
8079 2013-12-11 Yao Qi <yao@codesourcery.com>
8081 * notif.c (handle_notif_ack): Return 0 if no notification
8084 2013-11-20 Doug Evans <dje@google.com>
8086 * linux-low.c (linux_set_resume_request): Fix comment.
8088 2013-11-20 Doug Evans <dje@google.com>
8090 * linux-low.c (resume_status_pending_p): Tweak comment.
8092 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8094 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8095 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8096 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8097 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8098 (srv_amd64_regobj): Add amd64-mpx.o.
8099 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8100 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8101 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8102 * i387-fp.c (num_pl_bnd_register) Added constant.
8103 (num_pl_bnd_cfg_registers) Added constant.
8104 (struct i387_xsave) Added reserved area and MPX fields.
8105 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8106 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8108 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8109 (init_registers_amd64_mpx_linux): Declare new function.
8110 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8111 (x86_64_regmap): Add MPX registers.
8112 (x86_linux_read_description): Add MPX case.
8113 (initialize_low_arch): Initialize MPX targets.
8115 2013-11-18 Tom Tromey <tromey@redhat.com>
8117 * configure: Rebuild.
8118 * configure.ac: Don't check for stdlib.h.
8119 * gdbreplay.c: Unconditionally include stdlib.h.
8121 2013-11-18 Tom Tromey <tromey@redhat.com>
8123 * config.in: Rebuild.
8124 * configure: Rebuild.
8125 * configure.ac: Don't use AC_HEADER_DIRENT.
8127 2013-11-18 Tom Tromey <tromey@redhat.com>
8129 * server.h: Don't check HAVE_STRING_H.
8130 * gdbreplay.c: Don't check HAVE_STRING_H.
8131 * configure: Rebuild.
8133 2013-11-18 Tom Tromey <tromey@redhat.com>
8135 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8138 2013-11-08 Tom Tromey <tromey@redhat.com>
8140 * configure, config.in: Rebuild.
8141 * configure.ac: Remove unused configury.
8143 2013-11-08 Tom Tromey <tromey@redhat.com>
8145 * acinclude.m4: Include common.m4, codeset.m4.
8146 * configure, config.in: Rebuild.
8147 * configure.ac: Use GDB_AC_COMMON.
8149 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8151 * linux-s390-low.c (HWCAP_S390_TE): New define.
8152 (s390_arch_setup): Consider the TE field in the HWCAP for
8153 determining 'have_regset_tdb'.
8155 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8158 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8161 2013-10-02 Pedro Alves <palves@redhat.com>
8163 * server.c (process_serial_event): Don't output "GDBserver
8164 exiting" if GDB is connected through stdio.
8165 * target.c (mywait): Likewise, be silent if GDB is connected
8168 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8170 * lynx-low.c (lynx_add_threads_after_attach): New function.
8171 (lynx_attach): Remove call to add_thread. Add call to
8172 lynx_add_threads_after_attach instead.
8174 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8176 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8177 * config.in, configure: Regenerated.
8179 2013-09-18 Yao Qi <yao@codesourcery.com>
8182 * server.c (start_inferior): Clear 'resume_info'.
8184 2013-09-16 Jiong Wang <jiwang@tilera.com>
8186 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8189 2013-09-16 Jiong Wang <jiwang@tilera.com>
8191 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8192 linux-tile-low.o to srv_tgtobj.
8194 2013-09-16 Will Newton <will.newton@linaro.org>
8196 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8199 2013-09-06 Pedro Alves <palves@redhat.com>
8201 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8202 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8203 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8204 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8205 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8206 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8208 2013-09-06 Pedro Alves <palves@redhat.com>
8210 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8211 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8213 2013-09-06 Pedro Alves <palves@redhat.com>
8215 * linux-amd64-ipa.c: Include tracepoint.h.
8216 * linux-i386-ipa.c: Include tracepoint.h.
8218 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8220 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8221 (ps_get_thread_area): New function.
8223 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8225 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8226 (initialize_low_arch): Call init_registers_crisv32 rather than
8227 init_register_crisv32.
8229 2013-09-05 Pedro Alves <palves@redhat.com>
8231 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8233 * hostio.h: ... this new file.
8234 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8235 win32-low.c: Include hostio.h.
8237 2013-09-05 Pedro Alves <palves@redhat.com>
8239 * server.h (gdb_client_data, handler_func, callback_handler_func)
8240 (delete_file_handler, add_file_handler, append_callback_event)
8241 (delete_callback_event, start_event_loop, initialize_event_loop):
8242 Move to event-loop.h and include it.
8243 * event-loop.h: New file.
8245 2013-09-05 Pedro Alves <palves@redhat.com>
8247 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8248 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8249 (loaded_dll, unloaded_dll): Move to ...
8250 * dll.h: ... this new file.
8251 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8253 2013-09-05 Pedro Alves <palves@redhat.com>
8255 * server.h (current_process, get_thread_process, all_processes)
8256 (add_inferior_to_list, for_each_inferior, current_inferior)
8257 (remove_inferior, add_process, remove_process, find_process_pid)
8258 (have_started_inferiors_p, have_attached_inferiors_p)
8259 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8260 (clear_inferiors, find_inferior, find_inferior_id)
8261 (inferior_target_data, set_inferior_target_data)
8262 (inferior_regcache_data, set_inferior_regcache_data): Move to
8263 inferiors.h, and include it.
8264 * inferiors.h: New file.
8266 2013-09-05 Pedro Alves <palves@redhat.com>
8268 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8272 2013-09-05 Pedro Alves <palves@redhat.com>
8274 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8276 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8277 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8278 (handle_tracepoint_general_set, handle_tracepoint_query)
8279 (tracepoint_finished_step, tracepoint_was_hit)
8280 (release_while_stepping_state_list, current_traceframe)
8281 (in_readonly_region, traceframe_read_mem)
8282 (fetch_traceframe_registers, traceframe_read_sdata)
8283 (traceframe_read_info, struct fast_tpoint_collect_status)
8284 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8285 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8286 (supply_fast_tracepoint_registers)
8287 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8288 (ipa_tdesc, claim_trampoline_space)
8289 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8290 (agent_mem_read, agent_get_trace_state_variable_value)
8291 (agent_set_trace_state_variable_value, agent_tsv_read)
8292 (agent_mem_read_string, get_raw_reg_func_addr)
8293 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8294 * tracepoint.h: ... this new file.
8296 2013-09-05 Pedro Alves <palves@redhat.com>
8298 * server.h (perror_with_name, error, fatal, warning, paddress)
8299 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8301 * utils.h: New file.
8303 2013-09-05 Pedro Alves <palves@redhat.com>
8305 * server.h (remote_debug, noack_mode, transport_is_reliable)
8306 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8307 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8308 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8309 (write_enn, initialize_async_io, enable_async_io)
8310 (disable_async_io, check_remote_input_interrupt_request)
8311 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8312 (dead_thread_notify, prepare_resume_reply)
8313 (decode_address_to_semicolon, decode_address, decode_m_packet)
8314 (decode_M_packet, decode_X_packet, decode_xfer_write)
8315 (decode_search_memory_packet, unhexify, hexify)
8316 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8317 (look_up_one_symbol, relocate_instruction)
8318 (monitor_output): Move to remote-utils.h, and include it.
8319 * remote-utils.h: New file.
8321 2013-09-05 Pedro Alves <palves@redhat.com>
8323 * server.h (_): Delete.
8325 2013-09-02 Pedro Alves <palves@redhat.com>
8327 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8328 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8330 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8332 2013-09-02 Pierre Muller <muller@sourceware.org>
8334 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8335 or WriteProcessMemory complete successfully and handle
8336 ERROR_PARTIAL_COPY error.
8338 2013-09-02 Pedro Alves <palves@redhat.com>
8340 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8341 error instead of EIO.
8343 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8346 * linux-low.c: Include filestuff.h.
8347 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8348 * lynx-low.c: Include filestuff.h.
8349 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8350 * server.c: Include filestuff.h.
8351 (main): Call notice_open_fds.
8352 * spu-low.c: Include filestuff.h.
8353 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8355 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8357 * Makefile.in: Explain why ../target and ../nat are not
8358 listed as include file search paths.
8359 (linux-waitpid.o): New object file rule.
8360 * configure.srv (srv_native_linux_obj): New variable.
8361 Replace all occurrences of linux native object files with
8362 $srv_native_linux_obj.
8363 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8364 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8365 (linux_enable_event_reporting): Remove declaration.
8366 (my_waitpid): Moved to common/linux-waitpid.c.
8367 (linux_wait_for_event): Pass ptid when calling
8368 linux_enable_event_reporting.
8369 (linux_supports_tracefork_flag): Remove.
8370 (linux_enable_event_reporting): Likewise.
8371 (linux_tracefork_grandchild): Remove.
8372 (STACK_SIZE): Moved to common/linux-ptrace.c.
8373 (linux_tracefork_child): Remove.
8374 (linux_test_for_tracefork): Remove.
8375 (linux_look_up_symbols): Call linux_supports_traceclone.
8376 (initialize_low): Remove call to linux_test_for_tracefork.
8377 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8378 common/linux-ptrace.h.
8379 (PTRACE_TYPE_ARG4): Likewise.
8380 Include linux-ptrace.h.
8382 2013-08-21 Pedro Alves <palves@redhat.com>
8384 * config.in: Renegerate.
8386 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8388 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8389 (SFILES): Remove $(srcdir)/common/target-common.c and
8390 add $(srcdir)/target/waitstatus.c.
8391 (OBS): Remove target-common.o and add waitstatus.o.
8392 (server_h): Remove $(srcdir)/../common/target-common.h and
8393 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8394 and $(srcdir)/../target/waitstatus.h.
8395 (target-common.o): Remove.
8396 (waitstatus.o): New target object file.
8397 * target.h: Do not include target-common.h and
8398 include target/resume.h, target/wait.h and
8399 target/waitstatus.h.
8401 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8403 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8404 to PTRACE_TYPE_ARG3.
8405 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8406 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8408 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8409 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8411 2013-07-27 Jie Zhang <jie@codesourcery.com>
8412 Daniel Jacobowitz <dan@codesourcery.com>
8413 Yao Qi <yao@codesourcery.com>
8415 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8416 (mips-linux-watch.o): New rule.
8417 (mips_linux_watch_h): New variable.
8418 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8420 * linux-mips-low.c: Include mips-linux-watch.h.
8421 (struct arch_process_info, struct arch_lwp_info): New.
8422 (update_watch_registers_callback): New function.
8423 (mips_linux_new_process, mips_linux_new_thread) New functions.
8424 (mips_linux_prepare_to_resume, mips_insert_point): New
8426 (mips_remove_point, mips_stopped_by_watchpoint): New
8428 (rsp_bp_type_to_target_hw_bp_type): New function.
8429 (mips_stopped_data_address): New function.
8430 (the_low_target): Add watchpoint support functions.
8432 2013-07-27 Yao Qi <yao@codesourcery.com>
8434 * i386-low.c: Include break-common.h.
8435 (enum target_hw_bp_type): Remove.
8437 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8439 * Makefile.in (SFILES): /common/target-common.c.
8440 (OBS): Add target-common.o.
8441 (server_h): Add $(srcdir)/../common/target-common.h.
8442 (target-common.o): New target.
8443 * server.c (queue_stop_reply_callback): Free
8444 status string after use.
8445 * target.c (target_waitstatus_to_string): Remove.
8446 * target.h: Include target-common.h.
8447 (resume_kind): Likewise.
8448 (target_waitkind): Likewise.
8449 (target_waitstatus): Likewise.
8450 (TARGET_WNOHANG): Likewise.
8452 2013-07-04 Yao Qi <yao@codesourcery.com>
8454 * Makefile.in (host_alias): Use @host_noncanonical@.
8455 (target_alias): Use @target_noncanonical@.
8456 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8457 ACX_NONCANONICAL_HOST.
8458 * configure: Regenerated.
8461 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8463 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8464 * configure: Rebuild.
8465 * Makefile.in (version_host, version_target): Get from configure.
8466 (version.c): Use $(version_host) and $(version_target).
8468 2013-07-03 Pedro Alves <palves@redhat.com>
8470 * Makefile.in (config.status): Depend on development.sh.
8471 * acinclude.m4: Include libmcheck.m4.
8472 * configure: Regenerate.
8474 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8476 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8477 attribute inside the parentheses.
8478 (winapi_DebugSetProcessKillOnExit): Ditto.
8479 (winapi_DebugBreakProcess): Ditto.
8480 (winapi_GenerateConsoleCtrlEvent): Ditto.
8482 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8484 * notif.h (notif_event): Add a dummy member to avoid compiler
8487 2013-07-01 Pedro Alves <palves@redhat.com>
8489 * hostio.c (HOSTIO_PATH_MAX): Define.
8490 (require_filename, handle_open, handle_unlink, handle_readlink):
8493 2013-07-01 Pedro Alves <palves@redhat.com>
8495 * server.h: Include "pathmax.h".
8496 * linux-low.c: Don't include sys/param.h.
8497 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8499 * win32-low.c: Don't include sys/param.h.
8500 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8502 2013-07-01 Pedro Alves <palves@redhat.com>
8504 * event-loop.c: Don't check HAVE_UNISTD_H before including
8506 * gdbreplay.c: Likewise.
8507 * remote-utils.c: Likewise.
8508 * server.c: Likewise.
8509 * configure.ac: Don't check for unistd.h.
8510 * configure: Regenerate.
8512 2013-06-28 Tom Tromey <tromey@redhat.com>
8514 * Makefile.in (version.c): Use version.in, not
8517 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8519 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8520 * configure: Rebuild.
8521 * Makefile.in (version_host, version_target): Get from configure.
8522 (version.c): Use $(version_host) and $(version_target).
8524 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8526 Fix trace-status to output user name without trailing colon.
8527 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8529 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8531 Fix trace-status to output proper start-time and stop-time.
8532 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8533 output start time and stop time in hex as gdb expects.
8535 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8537 * tracepoint.c (build_traceframe_info_xml): Output trace state
8538 variables present in the trace buffer.
8540 2013-06-24 Tom Tromey <tromey@redhat.com>
8542 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8544 (version.o): Remove.
8545 * gdbreplay.c: Include version.h.
8546 (version, host_name): Don't declare.
8547 * server.h: Include version.h.
8548 (version, host_name): Don't declare.
8550 2013-06-12 Pedro Alves <palves@redhat.com>
8552 * linux-x86-low.c (linux_is_elf64): Delete global.
8553 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8554 with local linux_pid_exe_is_elf_64_file use.
8556 2013-06-11 Pedro Alves <palves@redhat.com>
8558 * linux-low.c (regset_disabled, disable_regset): New functions.
8559 (regsets_fetch_inferior_registers)
8560 (regsets_store_inferior_registers): Use them.
8561 (initialize_regsets_info); Don't allocate the disabled_regsets
8563 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8566 2013-06-11 Pedro Alves <palves@redhat.com>
8568 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8571 2013-06-11 Pedro Alves <palves@redhat.com>
8573 * linux-x86-low.c (initialize_low_arch): Call
8574 init_registers_x32_avx_linux.
8576 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8578 Fix compatibility with Android Bionic.
8579 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8582 2013-06-07 Pedro Alves <palves@redhat.com>
8585 * Makefile.in (OBS): Add tdesc.o.
8586 (IPA_OBJS): Add tdesc-ipa.o.
8587 (tdesc-ipa.o): New rule.
8588 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8590 * linux-low.c (new_inferior): Delete.
8591 (disabled_regsets, num_regsets): Delete.
8592 (linux_add_process): Adjust to set the new per-process
8594 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8595 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8596 was a stop. When calling arch_setup, switch the current inferior
8597 to the thread that got an event.
8598 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8599 (regsets_fetch_inferior_registers)
8600 (regsets_store_inferior_registers): New regsets_info parameter.
8602 (linux_register_in_regsets): New regs_info parameter. Adjust to
8604 (register_addr, fetch_register, store_register): New usrregs_info
8605 parameter. Adjust to use it.
8606 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8607 parameter regs_info. Adjust to use it.
8608 (linux_fetch_registers): Get the current inferior's regs_info, and
8610 (linux_store_registers): Ditto.
8611 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8612 (initialize_low): Don't initialize the target_regsets here. Call
8613 initialize_low_arch.
8614 * linux-low.h (target_regsets): Delete declaration.
8615 (struct regsets_info): New.
8616 (struct usrregs_info): New.
8617 (struct regs_info): New.
8618 (struct process_info_private) <new_inferior>: New field.
8619 (struct linux_target_ops): Delete the num_regs, regmap, and
8620 regset_bitmap fields. New field regs_info.
8621 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8622 * i387-fp.c (num_xmm_registers): Delete.
8623 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8624 calls to new interface.
8625 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8626 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8627 Infer the number of xmm registers from the regcache's target
8629 * i387-fp.h (num_xmm_registers): Delete.
8630 * inferiors.c (add_thread): Don't install the thread's regcache
8632 * proc-service.c (gregset_info): Fetch the current inferior's
8633 regs_info. Adjust to use it.
8634 * regcache.c: Include tdesc.h.
8635 (register_bytes, reg_defs, num_registers)
8636 (gdbserver_expedite_regs): Delete.
8637 (get_thread_regcache): If the thread doesn't have a regcache yet,
8638 create one, instead of aborting gdbserver.
8639 (regcache_invalidate_one): Rename to ...
8640 (regcache_invalidate_thread): ... this.
8641 (regcache_invalidate_one): New.
8642 (regcache_invalidate): Only invalidate registers of the current
8644 (init_register_cache): Add target_desc parameter, and use it.
8645 (new_register_cache): Ditto. Assert the target description has a
8646 non zero registers_size.
8647 (regcache_cpy): Add assertions. Adjust.
8648 (realloc_register_cache, set_register_cache): Delete.
8649 (registers_to_string, registers_from_string): Adjust.
8650 (find_register_by_name, find_regno, find_register_by_number)
8651 (register_cache_size): Add target_desc parameter, and use it.
8652 (free_register_cache_thread, free_register_cache_thread_one)
8653 (regcache_release, register_cache_size): New.
8654 (register_size): Add target_desc parameter, and use it.
8655 (register_data, supply_register, supply_register_zeroed)
8656 (supply_regblock, supply_register_by_name, collect_register)
8657 (collect_register_as_string, collect_register_by_name): Adjust.
8658 * regcache.h (struct target_desc): Forward declare.
8659 (struct regcache) <tdesc>: New field.
8660 (init_register_cache, new_register_cache): Add target_desc
8662 (regcache_invalidate_thread): Declare.
8663 (regcache_invalidate_one): Delete declaration.
8664 (regcache_release): Declare.
8665 (find_register_by_number, register_cache_size, register_size)
8666 (find_regno): Add target_desc parameter.
8667 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8669 * remote-utils.c: Include tdesc.h.
8670 (outreg, prepare_resume_reply): Adjust.
8671 * server.c: Include tdesc.h.
8672 (gdbserver_xmltarget): Delete declaration.
8673 (get_features_xml, process_serial_event): Adjust.
8674 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8676 (struct process_info) <tdesc>: New field.
8677 (ipa_tdesc): Declare.
8678 * tdesc.c: New file.
8679 * tdesc.h: New file.
8680 * tracepoint.c: Include tdesc.h.
8681 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8682 (get_context_regcache): Adjust to pass ipa_tdesc down.
8683 (do_action_at_tracepoint): Adjust to get the register cache size
8684 from the context regcache's description.
8685 (traceframe_walk_blocks): Adjust to get the register cache size
8686 from the current trace frame's description.
8687 (traceframe_get_pc): Adjust to get current trace frame's
8688 description and pass it down.
8689 (gdb_collect): Adjust to get the register cache size from the
8691 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8692 (gdbserver_xmltarget): Delete.
8693 (initialize_low_tracepoint): Set the ipa's target description.
8694 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8695 (initialize_low_tracepoint): Set the ipa's target description.
8696 * linux-x86-low.c: Include tdesc.h.
8697 [__x86_64__] (is_64bit_tdesc): New.
8698 (ps_get_thread_area, x86_get_thread_area): Use it.
8699 (i386_cannot_store_register): Rename to ...
8700 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8701 (i386_cannot_fetch_register): Rename to ...
8702 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8703 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8705 (target_regsets): Rename to ...
8706 (x86_regsets): ... this.
8707 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8709 (x86_siginfo_fixup): Use is_64bit_tdesc.
8710 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8711 (tdesc_x32_avx_linux, tdesc_x32_linux)
8712 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8714 (x86_linux_update_xmltarget): Delete.
8715 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8716 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8717 (AMD64_LINUX_USER64_CS): New.
8718 (x86_linux_read_description): New, based on
8719 x86_linux_update_xmltarget.
8720 (same_process_callback): New.
8721 (x86_arch_setup_process_callback): New.
8722 (x86_linux_update_xmltarget): New.
8723 (x86_regsets_info): New.
8724 (amd64_linux_regs_info): New.
8725 (i386_linux_usrregs_info): New.
8726 (i386_linux_regs_info): New.
8727 (x86_linux_regs_info): New.
8728 (x86_arch_setup): Reimplement.
8729 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8730 (x86_emit_ops): Ditto.
8731 (the_low_target): Adjust. Install x86_linux_regs_info,
8732 x86_cannot_fetch_register, and x86_cannot_store_register.
8733 (initialize_low_arch): New.
8734 * linux-ia64-low.c (tdesc_ia64): Declare.
8735 (ia64_fetch_register): Adjust.
8736 (ia64_usrregs_info, regs_info): New globals.
8737 (ia64_regs_info): New function.
8738 (the_low_target): Adjust.
8739 (initialize_low_arch): New function.
8740 * linux-sparc-low.c (tdesc_sparc64): Declare.
8741 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8743 (sparc_arch_setup): New function.
8744 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8745 (the_low_target): Adjust.
8746 (initialize_low_arch): New function.
8747 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8748 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8749 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8750 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8751 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8752 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8753 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8754 (tdesc_powerpc_isa205_vsx64l): Declare.
8755 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8756 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8757 (ppc_set_pc, ppc_get_hwcap): Adjust.
8758 (ppc_usrregs_info): Forward declare.
8759 (!__powerpc64__) ppc_regmap_adjusted: New global.
8760 (ppc_arch_setup): Adjust to the current process'es target
8762 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8763 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8764 (ppc_store_evrregset): Adjust.
8765 (target_regsets): Rename to ...
8766 (ppc_regsets): ... this, and make static.
8767 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8768 (ppc_regs_info): New function.
8769 (the_low_target): Adjust.
8770 (initialize_low_arch): New function.
8771 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8772 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8773 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8774 (tdesc_s390x_linux64v2): Declare.
8775 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8776 (s390_fill_gregset, s390_store_last_break): Adjust.
8777 (target_regsets): Rename to ...
8778 (s390_regsets): ... this, and make static.
8779 (s390_get_pc, s390_set_pc): Adjust.
8780 (s390_get_hwcap): New target_desc parameter, and use it.
8781 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8782 (s390_arch_setup): Adjust to set the current process'es target
8783 description. Don't adjust the regmap.
8784 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8785 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8786 (regs_info_3264): New globals.
8787 (s390_regs_info): New function.
8788 (the_low_target): Adjust.
8789 (initialize_low_arch): New function.
8790 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8791 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8792 [__mips64] (init_registers_mips_linux)
8793 (init_registers_mips_dsp_linux): Delete defines.
8794 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8795 (have_dsp): New global.
8796 (mips_read_description): New, based on mips_arch_setup.
8797 (mips_arch_setup): Reimplement.
8798 (get_usrregs_info): New function.
8799 (mips_cannot_fetch_register, mips_cannot_store_register)
8800 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8801 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8802 (target_regsets): Rename to ...
8803 (mips_regsets): ... this, and make static.
8804 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8805 (dsp_regs_info, regs_info): New globals.
8806 (mips_regs_info): New function.
8807 (the_low_target): Adjust.
8808 (initialize_low_arch): New function.
8809 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8810 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8812 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8813 (arm_read_description): New, with bits factored from
8815 (arm_arch_setup): Reimplement.
8816 (target_regsets): Rename to ...
8817 (arm_regsets): ... this, and make static.
8818 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8819 (arm_regs_info): New function.
8820 (the_low_target): Adjust.
8821 (initialize_low_arch): New function.
8822 * linux-m68k-low.c (tdesc_m68k): Declare.
8823 (target_regsets): Rename to ...
8824 (m68k_regsets): ... this, and make static.
8825 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8826 (m68k_regs_info): New function.
8827 (m68k_arch_setup): New function.
8828 (the_low_target): Adjust.
8829 (initialize_low_arch): New function.
8830 * linux-sh-low.c (tdesc_sharch): Declare.
8831 (target_regsets): Rename to ...
8832 (sh_regsets): ... this, and make static.
8833 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8834 (sh_regs_info, sh_arch_setup): New functions.
8835 (the_low_target): Adjust.
8836 (initialize_low_arch): New function.
8837 * linux-bfin-low.c (tdesc_bfin): Declare.
8838 (bfin_arch_setup): New function.
8839 (bfin_usrregs_info, regs_info): New globals.
8840 (bfin_regs_info): New function.
8841 (the_low_target): Adjust.
8842 (initialize_low_arch): New function.
8843 * linux-cris-low.c (tdesc_cris): Declare.
8844 (cris_arch_setup): New function.
8845 (cris_usrregs_info, regs_info): New globals.
8846 (cris_regs_info): New function.
8847 (the_low_target): Adjust.
8848 (initialize_low_arch): New function.
8849 * linux-cris-low.c (tdesc_crisv32): Declare.
8850 (cris_arch_setup): New function.
8851 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8852 (cris_regs_info): New function.
8853 (the_low_target): Adjust.
8854 (initialize_low_arch): New function.
8855 * linux-m32r-low.c (tdesc_m32r): Declare.
8856 (m32r_arch_setup): New function.
8857 (m32r_usrregs_info, regs_info): New globals.
8858 (m32r_regs_info): Adjust.
8859 (initialize_low_arch): New function.
8860 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8861 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8862 (tic6x_usrregs_info): Forward declare.
8863 (tic6x_read_description): New function, based on ...
8864 (tic6x_arch_setup): ... this. Reimplement.
8865 (target_regsets): Rename to ...
8866 (tic6x_regsets): ... this, and make static.
8867 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8868 (tic6x_regs_info): New function.
8869 (the_low_target): Adjust.
8870 (initialize_low_arch): New function.
8871 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8872 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8873 (target_regsets): Rename to ...
8874 (xtensa_regsets): ... this, and make static.
8875 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8877 (xtensa_arch_setup, xtensa_regs_info): New functions.
8878 (the_low_target): Adjust.
8879 (initialize_low_arch): New function.
8880 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8881 (nios2_arch_setup): Set the current process'es tdesc.
8882 (target_regsets): Rename to ...
8883 (nios2_regsets): ... this.
8884 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8885 (nios2_regs_info): New function.
8886 (the_low_target): Adjust.
8887 (initialize_low_arch): New function.
8888 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8889 (aarch64_arch_setup): Set the current process'es tdesc.
8890 (target_regsets): Rename to ...
8891 (aarch64_regsets): ... this.
8892 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8893 (aarch64_regs_info): New function.
8894 (the_low_target): Adjust.
8895 (initialize_low_arch): New function.
8896 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8898 (target_regsets): Rename to ...
8899 (tile_regsets): ... this.
8900 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8901 (tile_regs_info): New function.
8902 (tile_arch_setup): Set the current process'es tdesc.
8903 (the_low_target): Adjust.
8904 (initialize_low_arch): New function.
8905 * spu-low.c (tdesc_spu): Declare.
8906 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8907 * win32-arm-low.c (tdesc_arm): Declare.
8908 (arm_arch_setup): New function.
8909 (the_low_target): Install arm_arch_setup instead of
8911 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8912 (init_windows_x86): Rename to ...
8913 (i386_arch_setup): ... this. Set `win32_tdesc'.
8914 (the_low_target): Adjust.
8915 * win32-low.c (win32_tdesc): New global.
8916 (child_add_thread): Don't create the thread cache here.
8917 (do_initial_child_stuff): Set the new process'es tdesc.
8918 * win32-low.h (struct target_desc): Forward declare.
8919 (win32_tdesc): Declare.
8920 * lynx-i386-low.c (tdesc_i386): Declare global.
8921 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8922 * lynx-low.c (lynx_tdesc): New global.
8923 (lynx_add_process): Set the new process'es tdesc.
8924 * lynx-low.h (struct target_desc): Forward declare.
8925 (lynx_tdesc): Declare global.
8926 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8927 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8928 * nto-low.c (nto_tdesc): New global.
8929 (do_attach): Set the new process'es tdesc.
8930 * nto-low.h (struct target_desc): Forward declare.
8931 (nto_tdesc): Declare.
8932 * nto-x86-low.c (tdesc_i386): Declare.
8933 (nto_x86_arch_setup): Set `nto_tdesc'.
8935 2013-06-04 Gary Benson <gbenson@redhat.com>
8937 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8938 to qSupported response when appropriate.
8939 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8940 with nonzero-length annex.
8941 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8942 arguments supplied in annex.
8944 2013-05-31 Doug Evans <dje@google.com>
8947 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8948 64 bits in 64-cross-32 environment.
8950 2013-05-28 Pedro Alves <palves@redhat.com>
8952 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8953 (aarch64-without-fpu.c): Delete rule.
8954 * configure.srv (aarch64*-*-linux*): Remove references to
8955 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8956 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8959 2013-05-24 Pedro Alves <palves@redhat.com>
8961 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8962 instead of strchr/decode_address. Error if the range isn't split
8963 with a ','. Don't assume there's be a ':' in the action.
8965 2013-05-23 Yao Qi <yao@codesourcery.com>
8966 Pedro Alves <palves@redhat.com>
8968 * linux-low.c (lwp_in_step_range): New function.
8969 (linux_wait_1): If the thread was range stepping and stopped
8970 outside the stepping range, report the stop to GDB. Otherwise,
8971 continue stepping. Add range stepping debug output.
8972 (linux_set_resume_request): Copy the step range from the resume
8974 (linux_supports_range_stepping): New.
8975 (linux_target_ops) <supports_range_stepping>: Set to
8976 linux_supports_range_stepping.
8977 * linux-low.h (struct linux_target_ops)
8978 <supports_range_stepping>: New field.
8979 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8980 * linux-x86-low.c (x86_supports_range_stepping): New.
8981 (the_low_target) <supports_range_stepping>: Set to
8982 x86_supports_range_stepping.
8983 * server.c (handle_v_cont): Handle 'r' action.
8984 (handle_v_requests): Append ";r" if the target supports range
8986 * target.h (struct thread_resume) <step_range_start,
8987 step_range_end>: New fields.
8988 (struct target_ops) <supports_range_stepping>:
8990 (target_supports_range_stepping): New macro.
8992 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8994 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8995 confusion in comment.
8997 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8999 * lynx-low.c (struct process_info_private): New type.
9000 (lynx_add_process): New function.
9001 (lynx_create_inferior, lynx_attach): Replace calls to
9002 add_process by calls to lynx_add_process.
9003 (lynx_resume): If PTID is null, then try using
9004 current_process()->private->last_wait_event_ptid.
9006 (lynx_clear_inferiors): Delete. The contents of that function
9007 has been inlined in lynx_mourn;
9008 (lynx_wait_1): Save the ptid in the process's private data.
9009 (lynx_mourn): Free the process' private data. Replace call
9010 to lynx_clear_inferiors by call to clear_inferiors.
9012 2013-05-17 Yao Qi <yao@codesourcery.com>
9014 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9017 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9019 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9020 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9021 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9022 PT_TEXT_END_ADDR guards. Update comments.
9023 (linux_target_op) <read_offsets>: Conditionally define to
9024 linux_read_offsets if the target is UCLIBC and if it defines
9025 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9027 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9028 Andrew Jenner <andrew@codesourcery.com>
9030 * Makefile.in (SFILES): Add linux-nios2-low.c.
9031 (clean): Add action to delete nios2-linux.c.
9032 (nios2-linux.c): New rule.
9033 * configure.srv: Add nios2*-*-linux*.
9034 * linux-nios2-low.c: New.
9036 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9038 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9040 2013-04-25 Hui Zhu <hui@codesourcery.com>
9043 * ax.c (ax_printf): Add fflush.
9045 2013-04-22 Tom Tromey <tromey@redhat.com>
9047 * Makefile.in (SFILES): Add filestuff.c.
9048 (OBS): Add filestuff.o.
9049 (filestuff.o): New target.
9050 * config.in, configure: Rebuild.
9051 * configure.ac: Check for fdwalk, pipe2.
9053 2013-04-17 Pedro Alves <palves@redhat.com>
9055 * configure.ac (USE_THREAD_DB): Delete variable.
9056 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9057 Don't AC_SUBST USE_THREAD_DB.
9058 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9059 * config.in, configure: Regenerate.
9061 2013-04-16 Pedro Alves <palves@redhat.com>
9063 * linux-low.h (struct lwp_info) <thread_known>: Move under
9064 the USE_THREAD_DB #ifdef.
9066 2013-04-16 Pedro Alves <palves@redhat.com>
9068 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9069 (linux-low.o): Delete rule.
9070 * linux-low.h: Always include "gdb_thread_db.h" instead of
9071 conditionally including thread_db.h.
9072 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9075 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9077 * Makefile.in (install-only): Fix make install regression.
9079 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9081 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9082 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9084 * gdbserver.1: Remove.
9086 2013-03-22 Pedro Alves <palves@redhat.com>
9088 * linux-low.c (handle_extended_wait): Don't call
9089 linux_enable_event_reporting.
9091 2013-03-15 Tony Theodore <tonyt@logyst.com>
9094 * Makefile.in (SHELL): Use @SHELL@.
9096 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9098 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9101 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9103 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9104 Remove extraneous NULL element.
9106 2013-03-13 Yao Qi <yao@codesourcery.com>
9108 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9109 'V' block in trace frame.
9111 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9113 * target.h (struct target_ops): Add btrace ops.
9114 (target_supports_btrace): New macro.
9115 (target_enable_btrace): New macro.
9116 (target_disable_btrace): New macro.
9117 (target_read_btrace): New macro.
9118 * gdbthread.h (struct thread_info): Add btrace field.
9119 * server.c: Include btrace-common.h.
9120 (handle_btrace_general_set): New function.
9121 (handle_btrace_enable): New function.
9122 (handle_btrace_disable): New function.
9123 (handle_general_set): Call handle_btrace_general_set.
9124 (handle_qxfer_btrace): New function.
9125 (struct qxfer qxfer_packets[]): Add btrace entry.
9126 * inferiors.c (remove_thread): Disable btrace.
9127 * linux-low: Include linux-btrace.h.
9128 (linux_low_enable_btrace): New function.
9129 (linux_low_read_btrace): New function.
9130 (linux_target_ops): Add btrace ops.
9131 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9132 Add srv_linux_btrace=yes.
9133 (x86_64-*-linux*): Add linux-btrace.o.
9134 Add srv_linux_btrace=yes.
9135 * configure.ac: Define HAVE_LINUX_BTRACE.
9136 * config.in: Regenerated.
9137 * configure: Regenerated.
9139 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9141 * server.c (handle_qxfer): Preserve error message if -3 is
9143 (qxfer): Document the -3 return value.
9145 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9147 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9148 (linux_btrace_h): New variable.
9149 (linux-btrace.o): New rule.
9151 2013-03-08 Stan Shebs <stan@codesourcery.com>
9152 Hafiz Abid Qadeer <abidh@codesourcery.com>
9154 * tracepoint.c (trace_buffer_size): New global.
9155 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9156 (init_trace_buffer): Change to one-argument function. Allocate
9157 trace buffer memory.
9158 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9159 handle QTBuffer:size packet.
9160 (cmd_bigqtbuffer_size): New function.
9161 (initialize_tracepoint): Call init_trace_buffer with
9162 DEFAULT_TRACE_BUFFER_SIZE.
9163 * server.c (handle_query): Add QTBuffer:size in the
9166 2013-03-07 Yao Qi <yao@codesourcery.com>
9168 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9169 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9171 (cmd_qtsp): Adjust condition. Do post increment.
9172 Set cur_action and cur_step_action back to 0.
9174 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9177 * linux-low.c (linux_write_memory): Return early success if LEN is
9180 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9182 * configure.srv: Add x86_64-*-cygwin* as target.
9184 2013-02-28 Tom Tromey <tromey@redhat.com>
9186 * configure.ac: Invoke AC_SYS_LARGEFILE.
9187 * configure, config.in: Rebuild.
9189 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9191 * win32-low.c: Throughout, fix format strings and casts of
9192 printf-like functions to avoid type related warnings on all
9194 (get_child_debug_event): Print dwDebugEventCode as hex since
9195 that's how it's usually documented.
9197 2013-02-28 Yao Qi <yao@codesourcery.com>
9199 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9202 2013-02-27 Jiong Wang <jiwang@tilera.com>
9204 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9205 (reg-tilegx32.c): New rule.
9206 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9207 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9208 different register info initializer according to elf class.
9209 (init_registers_tilgx32): New function. The tilegx32 register info
9211 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9212 (tile_store_gregset): Likewise.
9214 2013-02-27 Yao Qi <yao@codesourcery.com>
9216 * server.c (process_point_options): Print debug message when
9217 debug_threads is true.
9219 2013-02-26 Yao Qi <yao@codesourcery.com>
9221 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9223 2013-02-19 Pedro Alves <palves@redhat.com>
9224 Kai Tietz <ktietz@redhat.com>
9228 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9229 instead of strtoul to extract address from packet.
9230 (process_serial_event) <'z'>: Likewise.
9232 2013-02-18 Yao Qi <yao@codesourcery.com>
9234 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9236 2013-02-14 Pedro Alves <palves@redhat.com>
9240 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9241 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9243 2013-02-14 Pedro Alves <palves@redhat.com>
9245 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9247 2013-02-14 Pedro Alves <palves@redhat.com>
9249 * tracepoint.c (save_string): Delete.
9250 (add_tracepoint_action): Use savestring instead of save_string.
9252 2013-02-12 Pedro Alves <palves@redhat.com>
9254 * linux-xtensa-low.c: Ditto.
9255 * xtensa-xtregs.c: Ditto.
9257 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9259 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9262 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9264 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9265 aarch64_num_wp_regs and aarch64_num_bp_regs to
9266 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9268 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9270 * linux-aarch64-low.c (ps_get_thread_area): Replace
9271 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9273 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9274 Marcus Shawcroft <marcus.shawcroft@arm.com>
9275 Nigel Stephens <nigel.stephens@arm.com>
9276 Yufeng Zhang <yufeng.zhang@arm.com>
9278 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9279 (aarch64.c, aarch64-without-fpu.c): New targets.
9280 * configure.srv (aarch64*-*-linux*): New.
9281 * linux-aarch64-low.c: New file.
9283 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9285 * linux-low.c (handle_extended_wait, linux_create_inferior)
9286 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9287 (dequeue_one_deferred_signal, linux_resume_one_thread)
9288 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9289 (linux_tracefork_grandchild, linux_test_for_tracefork)
9290 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9291 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9292 where the argument is 0.
9294 2013-01-25 Yao Qi <yao@codesourcery.com>
9296 * event-loop.c: Include "queue.h".
9297 (gdb_event_p): New typedef.
9298 (struct gdb_event) <next_event>: Remove.
9299 (event_queue): Change to QUEUE(gdb_event_p).
9300 (async_queue_event): Remove.
9301 (gdb_event_xfree): New.
9302 (initialize_event_loop): New.
9303 (process_event): Use API from QUEUE.
9304 (wait_for_event): Likewise.
9305 * server.c (main): Call initialize_event_loop.
9306 * server.h (initialize_event_loop): Declare.
9308 2013-01-18 Yao Qi <yao@codesourcery.com>
9310 * ax.h (struct eval_agent_expr_context): New.
9311 (gdb_eval_agent_expr): Update declaration.
9312 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9313 TFRAME. Add new argument CTX.
9314 * server.h (struct eval_agent_expr_context): Declare.
9315 (agent_mem_read, agent_tsv_read): Update declaration.
9316 (agent_mem_read_string): Likewise.
9317 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9318 (add_traceframe_block): Add new argument TPOINT.
9319 Increase TPOINT->traceframe_usage.
9320 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9321 eval_tracepoint_agent_expr.
9322 (condition_true_at_tracepoint): Likewise.
9323 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9324 (agent_mem_read_string, agent_tsv_read): Likewise.
9326 2013-01-16 Yao Qi <yao@codesourcery.com>
9328 * linux-low.c (linux_resume_one_lwp): Don't check
9329 'lwp->bp_reinsert != 0'.
9331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9332 Pedro Alves <palves@redhat.com>
9334 * lynx-low.c (ptrace_request_to_str): Define a temporary
9335 macro and use it to simplify this function's implementation.
9337 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9339 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9342 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9344 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9346 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9348 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9350 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9352 * lynx-low.c (lynx_resume): Use the resume_info parameter
9353 to determine the ptid for the lynx_ptrace call, unless
9354 it is equal to minus_one_ptid, in which case we use the
9355 ptid of the current_inferior.
9356 (lynx_wait_1): After having received a thread create/exit
9357 event, resume the inferior's execution using the signaling
9358 thread's ptid, rather than the old ptid.
9360 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9362 * lynx-low.c (lynx_resume): Delete variable ret.
9364 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9366 * gdbreplay.c (gdbreplay_version): Update copyright year.
9367 * server.c (gdbserver_version): Likewise.
9369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9371 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9374 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9376 * lynx-low.c (ptrace_request_to_str): Add handling for
9379 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9381 * lynx-low.c (lynx_attach): Delete variable new_process.
9383 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9385 * lynx-low.c (lynx_create_inferior): Delete variable
9388 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9390 * lynx-low.c (ptrace_request_to_str): Do not handle
9391 PTRACE_GETTHREADLIST if this macro does not exist.
9393 2012-12-15 Yao Qi <yao@codesourcery.com>
9395 * Makefile.in (OBS): Add notif.o.
9396 * notif.c, notif.h: New.
9397 * server.c: Include "notif.h".
9398 (struct vstop_notif) <next>: Remove.
9400 (queue_stop_reply): Update.
9401 (push_event, send_next_stop_reply): Remove.
9402 (discard_queued_stop_replies): Update.
9403 (notif_stop): New variable.
9404 (handle_v_stopped): Remove.
9405 (handle_v_requests): Don't call handle_v_stopped. Call
9406 handle_ack_notif instead.
9407 (queue_stop_reply_callback): Call notif_event_enque instead
9408 of queue_stop_reply.
9409 (handle_status): Don't call send_next_stop_reply, call
9410 notif_write_event instead.
9411 (kill_inferior_callback): Likewise.
9412 (detach_or_kill_inferior_callback): Likewise.
9413 (main): Call initialize_notif.
9414 (process_serial_event): Call QUEUE_is_empty.
9415 (handle_target_event): Call notif_push instead of push event.
9416 * server.h (push_event): Remove declaration.
9418 2012-12-10 Tom Tromey <tromey@redhat.com>
9420 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9421 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9424 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9425 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9426 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9427 (amd64-linux-ipa.o, ax.o): Rewrite.
9428 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9429 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9430 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9431 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9432 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9433 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9434 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9435 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9436 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9437 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9438 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9439 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9440 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9441 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9442 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9443 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9444 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9445 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9446 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9447 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9448 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9449 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9450 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9451 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9452 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9453 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9454 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9455 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9456 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9457 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9458 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9459 (reg-tilegx.o): Remove.
9460 (all_object_files): New macro.
9461 Include .deps files.
9462 * aclocal.m4, configure: Rebuild.
9463 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9464 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9465 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9467 2012-12-05 Tom Tromey <tromey@redhat.com>
9470 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9472 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9474 * configure.ac: Check for linux/perf_event.h.
9475 * config.in: Regenerated.
9476 * configure: Regenerated.
9478 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9480 * hostio.c (handle_readlink): Decrease buffer size
9481 parameter passed to readlink by one byte.
9483 2012-11-26 Yao Qi <yao@codesourcery.com>
9485 * configure.ac (build_warnings): Append '-Wempty-body'.
9486 * configure: Regenerated.
9487 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9490 2012-11-15 Pierre Muller <muller@sourceware.org>
9492 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9493 * config.in: Regenerate.
9494 * configure: Regenerate.
9495 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9496 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9497 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9498 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9500 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9501 instead of <sys/wait.h> header.
9502 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9504 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9506 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9507 (various make rules): Remove -DGDBSERVER
9509 2012-11-09 Yao Qi <yao@codesourcery.com>
9511 * spu-low.c (current_ptid): Move it to ..
9512 * gdbthread.h: ... here. New.
9513 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9514 * server.c (myresume, process_serial_event): Likewise.
9515 * thread-db.c (thread_db_find_new_threads): Likewise.
9516 * tracepoint.c (run_inferior_command): Likewise.
9518 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9520 * server.c (handle_search_memory_1): Include access length in
9523 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9525 * linux-crisv32-low.c: Fix compile errors.
9527 2012-09-04 Yao Qi <yao@codesourcery.com>
9529 * tracepoint.c (cmd_qtsv): Adjust debug message.
9530 Don't check CUR_TPOINT.
9532 2012-08-28 Yao Qi <yao@codesourcery.com>
9534 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9535 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9536 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9537 Remove declarations of xmalloc, xreallloc, xstrdup and
9539 * Makefile.in (libiberty_h): New.
9540 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9541 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9543 2012-08-23 Yao Qi <yao@codesourcery.com>
9545 * server.h: Remove declaration of 'xsnprintf'.
9547 2012-08-22 Keith Seitz <keiths@redhat.com>
9549 * server.h: Include build-gnulib-gbserver/config.h.
9550 * gdbreplay.c: Likewise.
9552 2012-08-08 Doug Evans <dje@google.com>
9554 * Makefile.in (SFILES): Add gdb_vecs.c.
9555 (OBS): Add gdb_vecs.o.
9556 (gdb_vecs_h, host_defs_h): New variables.
9557 (thread-db.o): Add $(gdb_vecs_h) dependency.
9558 (gdb_vecs.o): New rule.
9559 * thread-db.c: #include "gdb_vecs.h".
9560 (thread_db_load_search): Use a vector to iterate over path elements.
9561 Handle text appearing after "$pdir".
9563 * configure.ac: Add check for strstr.
9564 * config.in: Regenerate.
9565 * configure: Regenerate.
9567 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9569 * hostio.c (handle_pread): If pread fails, fall back to attempting
9571 (handle_pwrite): Likewise for pwrite.
9573 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9575 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9576 between unsupported TYPE and unimplementable ADDR/LEN combination.
9577 (arm_insert_point): Act on new return value.
9579 2012-07-31 Pedro Alves <palves@redhat.com>
9581 * server.c (process_point_options): Only skip tokens if we find
9582 one that is unrecognized. Don't treat 'X' specially while
9583 skipping unrecognized tokens.
9585 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9587 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9588 to 4-byte-align HW breakpoint addresses for Thumb.
9590 2012-07-27 Yao Qi <yao@codesourcery.com>
9594 * server.h: Declare gdb_agent_about_to_close.
9595 * target.c (kill_inferior): Include "agent.h".
9596 New. Send command 'kill'.
9597 * target.h (kill_inferior): Removed macro.
9598 * tracepoint.c (gdb_agent_about_to_close): New.
9599 (gdb_agent_helper_thread): Handle command 'close'.
9600 Wait endlessly until the inferior stops.
9601 Install gdb_agent_remove_socket to atexit hook.
9602 (agent_socket_name): New static variable.
9603 (gdb_agent_socket_init): Replace local variable 'name' with
9604 'agent_socket_name'.
9605 (gdb_agent_remove_socket): New.
9607 2012-07-27 Yao Qi <yao@codesourcery.com>
9609 * server.c (process_point_options): Stop at 'X' when parsing.
9611 2012-07-19 Michael Eager <eager@eagercon.com>
9613 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9615 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9616 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9617 hardware breakpoint.
9619 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9621 * gdbserver/linux-low.c (initialize_low): Call
9622 linux_ptrace_init_warnings.
9624 2012-07-02 Doug Evans <dje@google.com>
9626 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9629 2012-07-02 Stan Shebs <stan@codesourcery.com>
9631 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9632 (ax.o): Add it to build rule.
9634 (OBS): Add format.o.
9635 (IPA_OBS): Add format.o.
9636 * server.c (handle_query): Claim support for breakpoint commands.
9637 (process_point_options): Add command case.
9638 (process_serial_event): Leave running if there are printfs in
9640 * mem-break.h (any_persistent_commands): Declare.
9641 (add_breakpoint_commands): Declare.
9642 (gdb_no_commands_at_breakpoint): Declare.
9643 (run_breakpoint_commands): Declare.
9644 * mem-break.c (struct point_command_list): New struct.
9645 (struct breakpoint): New field command_list.
9646 (any_persistent_commands): New function.
9647 (add_commands_to_breakpoint): New function.
9648 (add_breakpoint_commands): New function.
9649 (gdb_no_commands_at_breakpoint): New function.
9650 (run_breakpoint_commands): New function.
9651 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9653 * ax.c: Include format.h.
9654 (ax_printf): New function.
9655 (gdb_eval_agent_expr): Add printf opcode.
9657 2012-06-13 Yao Qi <yao@codesourcery.com>
9659 * server.c (start_inferior): Remove duplicated writes to fields
9660 'last_resume_kind' and 'last_status' of 'current_inferior'.
9662 2012-06-12 Yao Qi <yao@codesourcery.com>
9663 Pedro Alves <palves@redhat.com>
9665 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9667 * server.c (handle_v_cont): Extend comment.
9669 2012-06-11 Yao Qi <yao@codesourcery.com>
9671 * linux-low.c (linux_attach): Add 'static'.
9673 2012-06-06 Yao Qi <yao@codesourcery.com>
9675 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9677 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9679 Fix gcc -flto compilation warning.
9680 * server.c (main): Make variable multi_mode and attach volatile.
9682 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9684 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9685 if the platform doesn't know about it.
9687 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9689 * Makefile.in (SFILES): Add linux-tile-low.c.
9690 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9691 * configure.srv: Handle tilegx-*-linux*.
9692 * linux-tile-low.c: New file.
9694 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9696 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9698 2012-05-24 Pedro Alves <palves@redhat.com>
9702 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9704 2012-05-24 Pedro Alves <palves@redhat.com>
9708 Replace target_signal with gdb_signal throughout.
9710 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9712 * linux-low.c (linux_store_registers): Avoid the copying sequence
9713 when no data has been retrieved by ptrace.
9715 2012-05-22 Will Deacon <will.deacon@arm.com>
9717 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9718 Include asm/ptrace.h.
9719 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9722 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9724 * linux-low.c (linux_store_registers): Don't re-retrieve data
9725 with ptrace that has already been obtained from /proc. Always
9726 copy any data retrieved with ptrace to the buffer supplied.
9728 2012-05-11 Yao Qi <yao@codesourcery.com>
9729 Pedro Alves <palves@redhat.com>
9731 * linux-low.c (enum stopping_threads_kind): New.
9732 (stopping_threads): Change type to `enum stopping_threads_kind'.
9733 (handle_extended_wait): If stopping and suspending threads, leave
9734 the new_lwp suspended too.
9735 (linux_wait_for_event): Adjust.
9736 (stop_all_lwps): Set `stopping_threads' to
9737 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9738 whether we're suspending threads or just stopping them. Assert no
9741 2012-04-29 Yao Qi <yao@codesourcery.com>
9743 * server.h: Move some code to ...
9744 * gdbthread.h: ... here. New.
9745 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9746 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9747 (nto-low.o, win32-low.o): Likewise.
9748 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9749 * regcache.c, remote-utils.c, server.c: Likewise.
9750 * target.c, tracepoint.c, win32-low.c: Likewise.
9752 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9754 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9755 (PTRACE_ARG4_TYPE): Likewise.
9756 (PTRACE_XFER_TYPE): Likewise.
9757 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9758 ptrace to PTRACE_ARG3_TYPE.
9759 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9760 (PTRACE_ARG4_TYPE): Likewise.
9761 (PTRACE_XFER_TYPE): Likewise.
9762 (linux_detach_one_lwp): Cast fourth argument of
9763 ptrace to long then PTRACE_ARG4_TYPE.
9764 (regsets_fetch_inferior_registers): Cast third argument of
9765 ptrace to long then PTRACE_ARG3_TYPE.
9766 (regsets_store_inferior_registers): Likewise.
9768 2012-04-20 Pedro Alves <palves@redhat.com>
9770 * configure: Regenerate.
9772 2012-04-19 Pedro Alves <palves@redhat.com>
9774 * Makefile.in (GNULIB_BUILDDIR): New.
9775 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9776 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9777 (all, install-only, uninstall, clean-info, all-lib, clean): No
9778 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9779 (maintainer-clean realclean distclean): Use subdir_do.
9781 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9782 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9783 * acinclude.m4: Include acx_configure_dir.m4.
9784 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9785 calls. Call AC_PROG_RANLIB. Configure gnulib using
9788 (GNULIB_STDINT_H): Adjust.
9789 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9790 * gdbreplay.c: Include build-gnulib/config.h.
9791 * server.h: Likewise.
9792 * aclocal.m4: Regenerate.
9793 * config.in: Regenerate.
9794 * configure: Regenerate.
9796 2012-04-19 Pedro Alves <palves@redhat.com>
9798 * Makefile.in (LIBGNU, INCGNU): Adjust.
9799 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9800 (all, install-only, uninstall, clean-info, all-lib, clean)
9801 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9802 * configure.ac: Adjust AC_OUTPUT output.
9803 * aclocal.m4: Regenerate.
9804 * configure: Regenerate.
9806 2012-04-19 Pedro Alves <palves@redhat.com>
9808 * Makefile.in (generated_files): New.
9809 (server_h): Remove the explicit dependency on config.h, and depend
9810 on $generated_files.
9812 2012-04-19 Pedro Alves <palves@redhat.com>
9814 * Makefile.in (INCGNU): Add -Ignulib.
9816 2012-04-19 Pedro Alves <palves@redhat.com>
9818 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9819 (INCGNU): ... this, and spell out -I here.
9820 (GNULIB_LIB): Rename to ...
9822 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9824 2012-04-19 Pedro Alves <palves@redhat.com>
9826 * config.in: Regenerate.
9828 2012-04-19 Pedro Alves <palves@redhat.com>
9830 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9831 * server.h (memmem): Remove declaration.
9832 * config.in: Regenerate.
9833 * configure: Regenerate.
9835 2012-04-19 Yao Qi <yao@codesourcery.com>
9837 * Makefile.in (SFILES): Add common/vec.c.
9841 2012-04-19 Yao Qi <yao@codesourcery.com>
9843 * remote-utils.c (prepare_resume_reply): Replace with macro
9844 target_core_of_thread.
9845 * server.c (handle_qxfer_threads_proper): Likewise.
9846 * target.h (traget_core_of_thread): New macro.
9848 2012-04-18 Pedro Alves <palves@redhat.com>
9850 * aclocal.m4: Regenerate.
9851 * configure: Regenerate.
9853 2012-04-16 Yao Qi <yao@codesourcery.com>
9855 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9856 duplicated on address.
9858 2012-04-16 Yao Qi <yao@codesourcery.com>
9860 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9861 (struct tracepoint_action_ops) <send>: New field.
9862 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9863 (agent_expr_send, x_tracepoint_action_send): New.
9864 (l_tracepoint_action_send): New.
9865 (cmd_qtdp): Download and install tracepoint
9866 according to `use_agent'.
9867 (run_inferior_command): Add one more parameter `len'.
9869 (tracepoint_send_agent): New.
9870 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9872 2012-04-16 Yao Qi <yao@codesourcery.com>
9874 * tracepoint.c (download_tracepoints): Moved to ...
9875 (cmd_qtstart): ... here.
9877 2012-04-14 Yao Qi <yao@codesourcery.com>
9879 * tracepoint.c: Include inttypes.h.
9880 (struct collect_memory_action): Use sized types.
9881 (struct tracepoint): Likewise.
9882 (cmd_qtdp, stop_tracing): Update print specifiers.
9883 (cmd_qtp, response_tracepoint): Likewise.
9884 (collect_data_at_tracepoint): Likewise.
9885 (collect_data_at_step): Likewise.
9887 2012-04-14 Yao Qi <yao@codesourcery.com>
9889 Import gnulib module inttypes.
9890 * aclocal.m4, config.in, configure: Regenerated.
9892 2012-04-14 Yao Qi <yao@codesourcery.com>
9894 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9895 Makefile and config.status at last.
9897 2012-04-13 Yao Qi <yao@codesourcery.com>
9899 * tracepoint.c: Include stdint.h unconditionally.
9901 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9903 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9904 on BFD_HAVE_SYS_PROCFS_TYPE.
9905 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9906 * configure: Regenerate.
9907 * config.in: Likewise.
9909 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9911 * Makefile.in (clean): Also remove x32.c x32-linux.c
9912 x32-avx.c x32-avx-linux.c.
9913 (x32.o): New target.
9915 (x32-linux.o): Likewise.
9916 (x32-linux.c): Likewise.
9917 (x32-avx.o): Likewise.
9918 (x32-avx.c): Likewise.
9919 (x32-avx-linux.o): Likewise.
9920 (x32-avx-linux.c): Likewise.
9922 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9923 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9924 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9925 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9926 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9927 i386/x32-avx-linux.xml.
9929 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9930 (init_registers_x32_avx_linux): Likwise.
9931 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9932 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9934 2012-04-13 Pedro Alves <palves@redhat.com>
9936 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9937 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9938 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9939 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9942 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9944 * linux-x86-low.c (compat_x32_clock_t): New.
9945 (compat_x32_siginfo_t): Likewise.
9946 (compat_x32_siginfo_from_siginfo): Likewise.
9947 (siginfo_from_compat_x32_siginfo): Likewise.
9948 (linux_is_elf64): Likewise.
9949 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9950 and siginfo_from_compat_x32_siginfo for x32.
9951 (x86_arch_setup): Set linux_is_elf64.
9953 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9956 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9958 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9959 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9960 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9961 compatible with process.
9963 2012-04-12 Yao Qi <yao@codesourcery.com>
9965 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9966 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9967 (install-only, install-info, clean): Handle sub dir gnulib.
9968 (all-lib, am--refresh): New targets.
9969 (memmem.o): Remove target.
9970 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9971 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9972 (AC_REPLACE_FUNCS): Remove memmem.
9973 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9974 (AC_OUTPUT): Generate Makefile in gnulib/.
9975 * aclocal.m4, config.in, configure: Regenerated.
9977 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9979 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9981 2012-04-05 Pedro Alves <palves@redhat.com>
9983 -Werror=strict-aliasing
9985 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9988 2012-04-04 Pedro Alves <palves@redhat.com>
9990 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9991 (sparc_store_gregset_from_stack, sparc_store_gregset)
9992 (sparc_breakpoint_at): Fix formatting.
9994 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9996 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9998 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9999 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10000 * config.in: Regenerate.
10001 * configure: Likewise.
10003 2012-03-29 Pedro Alves <palves@redhat.com>
10005 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10006 Correct ptrace arguments.
10008 2012-03-28 Pedro Alves <palves@redhat.com>
10010 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10011 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10012 (IA64_FR1_REGNUM): New defines.
10013 (ia64_fetch_register): New.
10014 (the_low_target): Install it.
10015 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10017 * linux-low.c (linux_fetch_registers): Try the
10018 the_low_target.fetch_register hook first.
10020 * linux-arm-low.c (the_low_target): Adjust.
10021 * linux-bfin-low.c (the_low_target): Adjust.
10022 * linux-cris-low.c (the_low_target): Adjust.
10023 * linux-crisv32-low.c (the_low_target): Adjust.
10024 * linux-m32r-low.c (the_low_target): Adjust.
10025 * linux-m68k-low.c (the_low_target): Adjust.
10026 * linux-mips-low.c (the_low_target): Adjust.
10027 * linux-ppc-low.c (the_low_target): Adjust.
10028 * linux-s390-low.c (the_low_target): Adjust.
10029 * linux-sh-low.c (the_low_target): Adjust.
10030 * linux-sparc-low.c (the_low_target): Adjust.
10031 * linux-tic6x-low.c (the_low_target): Adjust.
10032 * linux-x86-low.c (the_low_target): Adjust.
10033 * linux-xtensa-low.c (the_low_target): Adjust.
10035 2012-03-26 Pedro Alves <palves@redhat.com>
10037 * server.c (handle_qxfer_libraries): Don't bail early if
10038 the_target->qxfer_libraries_svr4 is not NULL.
10040 2012-03-26 Pedro Alves <palves@redhat.com>
10042 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10044 2012-03-23 Pedro Alves <palves@redhat.com>
10046 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10047 "library-list-svr4" element's start tag when the the DSO list is
10050 2012-03-23 Pedro Alves <palves@redhat.com>
10052 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10053 a variable whose type size is the same as the inferior's pointer
10056 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10058 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10060 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10061 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10062 * linux-low.h: Include <signal.h>.
10063 (struct siginfo): Remove forward declaration.
10064 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10067 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10069 * .gitignore: Ignore more files.
10071 2012-03-19 Pedro Alves <palves@redhat.com>
10072 Jan Kratochvil <jan.kratochvil@redhat.com>
10074 * server.c (cont_thread, general_thread): Add describing comments.
10075 (start_inferior): Clear `cont_thread'.
10076 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10079 2012-03-15 Yao Qi <yao@codesourcery.com>
10081 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10083 (cmd_qtdp): ... here.
10085 2012-03-15 Yao Qi <yao@codesourcery.com>
10087 * tracepoint.c (struct tracepoint_action_ops): New.
10088 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10089 (m_tracepoint_action_download): New.
10090 (r_tracepoint_action_download): New.
10091 (x_tracepoint_action_download): New.
10092 (l_tracepoint_action_download): New.
10093 (add_tracepoint_action): Install `action->ops' according type.
10094 (download_tracepoint_1): Move code `download' function pointer
10095 of various tracepoint_action_ops.
10097 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10099 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10100 linux_ptrace_attach_warnings.
10102 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10104 * Makefile.in (linux-ptrace.o): New.
10105 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10106 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10107 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10108 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10109 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10111 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10113 2012-03-08 Yao Qi <yao@codesourcery.com>
10114 Pedro Alves <palves@redhat.com>
10116 Fix PR server/13392.
10117 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10118 offset of JMP insn.
10119 * tracepoint.c (remove_tracepoint): New.
10120 (cmd_qtdp): Call remove_tracepoint when failed to install.
10122 2012-03-07 Pedro Alves <palves@redhat.com>
10124 * linux-low.c (get_detach_signal): New.
10125 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10126 Pass on pending signals to PTRACE_DETACH. Check the result of the
10128 * server.c (program_signals, program_signals_p): New.
10129 (handle_general_set): Handle QProgramSignals.
10130 * server.h (program_signals, program_signals_p): Declare.
10132 2012-03-05 Pedro Alves <palves@redhat.com>
10133 Jan Kratochvil <jan.kratochvil@redhat.com>
10135 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10138 2012-03-03 Yao Qi <yao@codesourcery.com>
10140 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10141 agent_look_up_symbols.
10143 2012-03-03 Yao Qi <yao@codesourcery.com>
10145 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10146 (linux-x86-low.o): Likewise.
10147 * server.h: Remove in_process_agent_loaded.
10148 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10152 2012-03-03 Yao Qi <yao@codesourcery.com>
10154 * tracepoint.c (gdb_agent_capability): New global.
10155 (in_process_agent_loaded_ust): Renamed to
10156 `in_process_agent_supports_ust'.
10158 (in_process_agent_supports_ust): Call agent_capability_check.
10159 (clear_installed_tracepoints): Assert that agent supports
10162 2012-03-03 Yao Qi <yao@codesourcery.com>
10164 * linux-low.c (linux_supports_agent): New.
10165 (linux_target_ops): Initialize field `supports_agent' with
10166 linux_supports_agent.
10167 * target.h (struct target_ops) <supports_agent>: New.
10168 (target_supports_agent): New macro.
10169 * server.c (handle_general_set): Handle packet 'QAgent'.
10170 (handle_query): Send `QAgent+'.
10171 * Makefile.in (server.o): Depends on agent.h.
10173 2012-03-03 Yao Qi <yao@codesourcery.com>
10175 * Makefile.in (OBS): Add agent.o.
10176 Add new rule for agent.o.
10177 Track dependence of tracepoint.c on agent.h.
10178 * tracepoint.c (run_inferior_command_1):
10179 (run_inferior_command): Call agent_run_command.
10180 (gdb_ust_connect_sync_socket): Deleted. Move it to
10182 (resume_thread, stop_thread): Likewise.
10183 (gdb_ust_socket_init): Renamed to ...
10184 (gdb_agent_socket_init): ... New.
10185 (gdb_ust_thread): Renamed to ...
10186 (gdb_agent_helper_thread): ... New.
10187 (gdb_ust_init): Move some code to ...
10188 (gdb_agent_init): ... here. New.
10189 [HAVE_UST]: Call gdb_ust_init.
10190 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10191 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10192 * config.in, configure: Regenerated.
10194 2012-03-02 Pedro Alves <palves@redhat.com>
10196 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10197 * linux-low.c (struct simple_pid_list): New.
10198 (stopped_pids): New a struct simple_pid_list pointer.
10199 (add_to_pid_list, pull_pid_from_list): New.
10200 (handle_extended_wait): Don't assume the first signal new children
10201 report is SIGSTOP. Adjust call to pull_pid_from_list.
10202 (linux_wait_for_lwp): Adjust.
10204 2012-03-02 Yao Qi <yao@codesourcery.com>
10206 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10209 2012-03-02 Yao Qi <yao@codesourcery.com>
10211 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10212 `stop_pc' and `tpoint'. Update caller.
10214 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10216 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10217 * linux-low.c (use_linux_regsets): New macro.
10218 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10219 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10220 (linux_register_in_regsets): New function.
10221 (usr_fetch_inferior_registers): Skip registers covered by
10223 (usr_store_inferior_registers): Likewise.
10224 (usr_fetch_inferior_registers): New macro.
10225 (usr_store_inferior_registers): Likewise.
10226 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10227 (linux_store_registers): Likewise.
10228 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10230 (init_registers_mips64_dsp_linux): Likewise.
10231 (init_registers_mips_linux): New macro.
10232 (init_registers_mips_dsp_linux): Likewise.
10233 (mips_dsp_num_regs): Likewise.
10234 (DSP_BASE, DSP_CONTROL): New fallback macros.
10235 (mips_base_regs): New macro.
10236 (mips_regmap): Use it. Fix the size.
10237 (mips_dsp_regmap): New variable.
10238 (mips_dsp_regset_bitmap): Likewise.
10239 (mips_arch_setup): New function.
10240 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10242 (mips_cannot_store_register): Likewise.
10243 (the_low_target): Update .arch_setup, .num_regs and .regmap
10244 initializers. Add .regset_bitmap initializer.
10245 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10247 * linux-bfin-low.c (the_low_target): Likewise.
10248 * linux-cris-low.c (the_low_target): Likewise.
10249 * linux-crisv32-low.c (the_low_target): Likewise.
10250 * linux-ia64-low.c (the_low_target): Likewise.
10251 * linux-m32r-low.c (the_low_target): Likewise.
10252 * linux-m68k-low.c (the_low_target): Likewise.
10253 * linux-ppc-low.c (the_low_target): Likewise.
10254 * linux-s390-low.c (the_low_target): Likewise.
10255 * linux-sh-low.c (the_low_target): Likewise.
10256 * linux-sparc-low.c (the_low_target): Likewise.
10257 * linux-tic6x-low.c (the_low_target): Likewise.
10258 * linux-x86-low.c (the_low_target): Likewise.
10259 * linux-xtensa-low.c (the_low_target): Likewise.
10260 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10261 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10262 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10264 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10265 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10267 2012-02-29 Yao Qi <yao@codesourcery.com>
10268 Pedro Alves <palves@redhat.com>
10270 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10271 `step_over_finished' is true.
10273 2012-02-27 Pedro Alves <palves@redhat.com>
10275 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10276 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10278 2012-02-27 Pedro Alves <palves@redhat.com>
10281 * linux-low.c (pid_is_stopped): New.
10282 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10284 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10286 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10289 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10291 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10293 2012-02-24 Luis Machado <lgustavo@codesourcery>
10295 * server.c (handle_query): Advertise support for target-side
10296 breakpoint condition evaluation.
10297 (process_point_options): New function.
10298 (process_serial_event): When inserting a breakpoint, check for
10299 a target-side condition that should be evaluated.
10301 * mem-break.c: Include regcache.h and ax.h.
10302 (point_cond_list_t): New data structure.
10303 (breakpoint) <cond_list>: New field.
10304 (find_gdb_breakpoint_at): Make non-static.
10305 (delete_gdb_breakpoint_at): Clear any target-side
10307 (clear_gdb_breakpoint_conditions): New function.
10308 (add_condition_to_breakpoint): Likewise.
10309 (add_breakpoint_condition): Likewise.
10310 (gdb_condition_true_at_breakpoint): Likewise.
10311 (gdb_breakpoint_here): Return result directly instead
10312 of going through a local variable.
10314 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10315 (clear_gdb_breakpoint_conditions): Likewise.
10316 (add_breakpoint_condition): Likewise.
10317 (gdb_condition_true_at_breakpoint): Likewise.
10319 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10320 (need_step_over_p): Take target-side breakpoint condition into
10323 2012-02-24 Luis Machado <lgustavo@codesourcery>
10325 * server.h: Include tracepoint.h.
10326 (agent_mem_read, agent_get_trace_state_variable_value,
10327 agent_set_trace_state_variable_value,
10328 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10329 get_set_tsv_func_addr): New prototypes.
10331 * ax.h: New include file.
10332 * ax.c: New source file.
10334 * tracepoint.c: Include ax.h.
10335 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10336 agent_expr, eval_result_type): Move to ax.h.
10337 (parse_agent_expr): Rename to ...
10338 (gdb_parse_agent_expr): ... this, make it non-static and move
10340 (unparse_agent_expr) Rename to ...
10341 (gdb_unparse_agent_expr): ... this, make it non-static and move
10343 (eval_agent_expr): Rename to ...
10344 (eval_tracepoint_agent_expr): ... this.
10345 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10346 forward declarations.
10347 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10348 (agent_get_trace_state_variable_value): New function.
10349 (agent_set_trace_state_variable_value): New function.
10350 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10351 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10352 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10353 (condition_true_at_tracepoint): Likewise.
10354 (parse_agent_expr): Rename to ...
10355 (gdb_parse_agent_expr): ... this and move to ax.c.
10356 (unparse_agent_expr): Rename to ...
10357 (gdb_unparse_agent_expr): ... this and move to ax.c.
10358 (gdb_agent_op_name): Move to ax.c.
10359 (eval_agent_expr): Rename to ...
10360 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10362 (eval_tracepoint_agent_expr): New function.
10363 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10365 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10367 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10368 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10369 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10370 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10371 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10372 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10373 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10374 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10375 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10376 (compile_bytecodes): Remove forward declaration.
10377 (is_goto_target): Move to ax.c.
10378 (compile_bytecodes): Move to ax.c and call
10379 agent_get_trace_state_variable_value (...) and
10380 agent_set_trace_state_variable_value (...).
10382 * Makefile.in: Update ax.c and IPA dependencies.
10384 2012-02-24 Pedro Alves <palves@redhat.com>
10386 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10387 (cmd_bigqtbuffer_circular): ... this. Only handle
10388 'QTBuffer:circular:'.
10389 (handle_tracepoint_general_set): Adjust.
10391 2012-02-16 Yao Qi <yao@codesourcery.com>
10393 * inferiors.c: Move code to ...
10394 * dll.c: .... here. New.
10395 * server.h: Declare clear_dlls.
10396 * Makefile.in (SFILES): Add dll.c.
10400 2012-02-11 Yao Qi <yao@codesourcery.com>
10402 * server.c: (handle_monitor_command): Add a new parameter
10404 (handle_query): Update caller.
10406 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10408 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10409 * configure, config.in: Regenerate.
10410 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10413 2012-02-02 Pedro Alves <palves@redhat.com>
10415 Try SIGKILL first, then PTRACE_KILL.
10416 * linux-low.c (linux_kill_one_lwp): New.
10417 (linux_kill_one_lwp): Rename to ...
10418 (kill_one_lwp_callback): ... this. Use the new
10419 linux_kill_one_lwp.
10421 2012-02-02 Pedro Alves <palves@redhat.com>
10423 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10426 2012-01-27 Pedro Alves <palves@redhat.com>
10428 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10429 (elf_64_file_p): Make static.
10430 (linux_pid_exe_is_elf_64_file): New.
10431 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10432 Delete declarations.
10433 (linux_pid_exe_is_elf_64_file): Declare.
10434 * linux-x86-low.c (x86_arch_setup): Use
10435 linux_pid_exe_is_elf_64_file.
10437 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10439 * linux-low.c (linux_wait_for_event_1): Rename to ...
10440 (linux_wait_for_event): ... here and merge it with former
10441 linux_wait_for_event - new variable wait_ptid, use it.
10442 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10444 2012-01-23 Pedro Alves <palves@redhat.com>
10446 * server.c (main): Avoid yet another case of infinite loop while
10447 detaching/killing after a longjmp.
10449 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10452 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10454 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10456 * hostio.c (handle_readlink): New function.
10457 (handle_vFile): Call it to handle "vFile:readlink" packets.
10459 2012-01-20 Pedro Alves <palves@redhat.com>
10460 Ulrich Weigand <ulrich.weigand@linaro.org>
10462 * server.c (handle_v_requests): Only support vAttach and vRun to
10463 start multiple processes when in extended protocol mode.
10465 2012-01-17 Pedro Alves <palves@redhat.com>
10467 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10468 memalign plus mprotect to allocate the scratch buffer.
10470 2012-01-13 Pedro Alves <palves@redhat.com>
10472 * server.c (attach_inferior): Clear `cont_thread'.
10474 2012-01-13 Pedro Alves <palves@redhat.com>
10476 * server.c (main): Avoid infinite loop while detaching/killing
10479 2012-01-09 Doug Evans <dje@google.com>
10481 * server.c (start_inferior): Set last_ptid in --wrapper case.
10483 2012-01-06 Yao Qi <yao@codesourcery.com>
10485 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10487 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10489 2012-01-04 Yao Qi <yao@codesourcery.com>
10491 * tracepoint.c (cmd_qtdp): Print debug message
10492 for static tracepoint.
10494 2012-01-04 Yao Qi <yao@codesourcery.com>
10496 * tracepoint.c (trace_vdebug): Differentiate debug message
10497 between gdbserver and IPA.
10499 2012-01-03 Yao Qi <yao@codesourcery.com>
10501 * tracepoint.c (tracepoint_was_hit): Don't collect for
10504 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10506 * terminal.h: Reformat copyright header.
10508 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10510 * server.c (gdbserver_version): Update copyright year.
10511 * gdbreplay.c (gdbreplay_version): Likewise.
10513 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10515 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10518 2011-12-18 Hui Zhu <teawater@gmail.com>
10519 * linux-low.c (linux_create_inferior): Save return value to ret.
10521 2011-12-18 Hui Zhu <teawater@gmail.com>
10523 * linux-low.c (linux_create_inferior): Save return value to ret.
10525 2011-12-16 Doug Evans <dje@google.com>
10527 * linux-low.c (linux_create_inferior): If stdio connection,
10528 redirect stdin from /dev/null, stdout to stderr.
10529 * remote-utils.c (remote_is_stdio): New static global.
10530 (remote_connection_is_stdio): New function.
10531 (remote_prepare): Handle stdio connection.
10532 (remote_open): Ditto.
10533 (remote_close): Don't close stdin for stdio connections.
10534 (read_prim,write_prim): New functions. Replace all calls to
10535 read/write to these.
10536 * server.c (main): Watch for "-" argument. Move call to
10537 remote_prepare before start_inferior.
10538 * server.h (STDIO_CONNECTION_NAME): New macro.
10539 (remote_connection_is_stdio): Declare.
10541 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10542 in debugging output.
10544 2011-12-15 Yao Qi <yao@codesourcery.com>
10546 * tracepoint.c: Include sys/syscall.h.
10547 (gdb_ust_thread): Remove preprocessor conditional.
10549 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10551 * linux-low.c (linux_detach_one_lwp): Call
10552 the_low_target.prepare_to_resume before detaching.
10554 2011-12-14 Yao Qi <yao@codesourcery.com>
10556 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10559 2011-12-14 Yao Qi <yao@codesourcery.com>
10561 * i386-low.c (i386_low_stopped_data_address): Initialize local
10562 variable `control'.
10564 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10568 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10569 DR_CONTROL unless necessary. Extend comments.
10570 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10571 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10573 2011-12-13 Yao Qi <yao@codesourcery.com>
10575 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10577 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10579 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10581 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10582 Print new debug message for such case.
10584 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10586 Fix overlapping memcpy.
10587 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10588 the read_inferior_memory transfer.
10589 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10590 write_inferior_memory transfer.
10591 (set_fast_tracepoint_jump): New variable buf. Use it for the
10592 read_inferior_memory and write_inferior_memory transfers.
10593 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10594 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10595 Use it for the write_inferior_memory transfer.
10596 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10599 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10601 * linux-low.c (fetch_register, store_register): Make code
10602 consistent, fix formatting.
10604 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10606 * linux-low.c (usr_store_inferior_registers): Factor out code
10607 to handle individual registers into...
10608 (store_register): ... this new function.
10610 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10612 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10613 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10614 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10615 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10616 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10617 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10618 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10619 (srv_xmlfiles): Add new XML files.
10621 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10623 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10624 (init_registers_s390_linux32v1): Add prototype.
10625 (init_registers_s390_linux32v2): Likewise.
10626 (init_registers_s390_linux64v1): Likewise.
10627 (init_registers_s390_linux64v2): Likewise.
10628 (init_registers_s390x_linux64v1): Likewise.
10629 (init_registers_s390x_linux64v2): Likewise.
10630 (s390_num_regs): Increment to 52.
10631 (s390_regmap): Add orig_r2 register.
10632 (s390_num_regs_3264): Increment to 68.
10633 (s390_regmap_3264): Add orig_r2 register.
10634 (s390_collect_ptrace_register): Handle orig_r2 register.
10635 (s390_supply_ptrace_register): Likewise.
10636 (s390_fill_last_break): New function.
10637 (s390_store_last_break): Likewise.
10638 (s390_fill_system_call): New function.
10639 (s390_store_system_call): Likewise.
10640 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10642 (s390_check_regset): New function.
10643 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10644 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10645 Update target_regsets for available register sets.
10647 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10648 Jan Kratochvil <jan.kratochvil@redhat.com>
10650 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10651 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10653 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10654 * linux-low.h (struct process_info_private): New member r_debug.
10655 * server.c (handle_qxfer_libraries): Call
10656 the_target->qxfer_libraries_svr4.
10657 (handle_qxfer_libraries_svr4): New function.
10658 (qxfer_packets): New entry "libraries-svr4".
10659 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10660 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10661 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10662 PACKET_qXfer_libraries_svr4.
10664 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10666 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10667 PSW address/mask between 8-byte and 16-byte formats.
10668 (s390_supply_ptrace_register): Likewise.
10669 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10670 basic addressing mode bit.
10672 2011-11-24 Stan Shebs <stan@codesourcery.com>
10674 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10676 2011-11-17 Stan Shebs <stan@codesourcery.com>
10678 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10679 (tracing_start_time): New global.
10680 (tracing_stop_time): New global.
10681 (tracing_user_name): New global.
10682 (tracing_notes): New global.
10683 (tracing_stop_note): New global.
10684 (cmd_qtstart): Set traceframe_usage, start_time.
10685 (stop_tracing): Set stop_time.
10686 (cmd_qtstatus): Report additional status.
10687 (cmd_qtp): New function.
10688 (handle_tracepoint_query): Call it.
10689 (cmd_qtnotes): New function.
10690 (handle_tracepoint_general_set): Call it.
10691 (get_timestamp): Rename from tsv_get_timestamp.
10693 2011-11-14 Stan Shebs <stan@codesourcery.com>
10694 Kwok Cheung Yeung <kcy@codesourcery.com>
10696 * linux-x86-low.c (small_jump_insn): New.
10697 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10698 trampoline and error message, build a trampoline and issue a small
10699 jump instruction to it.
10700 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10701 trampoline and error message.
10702 (x86_get_min_fast_tracepoint_insn_len): New.
10703 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10704 * linux-low.h (struct linux_target_ops): Add arguments to
10705 install_fast_tracepoint_jump_pad operation, add new operation.
10706 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10708 (linux_get_min_fast_tracepoint_insn_len): New function.
10709 (linux_target_op): Add new operation.
10710 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10711 (gdb_trampoline_buffer_end): Ditto.
10712 (gdb_trampoline_buffer_error): Ditto.
10713 (struct ipa_sym_addresses): Add fields for new IPA variables.
10714 (symbol_list): Add entries for new IPA variables.
10715 (struct tracepoint): Add fields to hold the address range of the
10716 trampoline used by the tracepoint.
10717 (trampoline_buffer_head): New static variable.
10718 (trampoline_buffer_tail): Ditto.
10719 (claim_trampoline_space): New function.
10720 (have_fast_tracepoint_trampoline_buffer): New function.
10721 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10723 (install_fast_tracepoint): Ditto, also add error buffer argument.
10724 (cmd_qtminftpilen): New function.
10725 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10726 (fast_tracepoint_from_trampoline_address): New function.
10727 (fast_tracepoint_collecting): Handle trampoline as part of jump
10729 (set_trampoline_buffer_space): New function.
10730 (initialize_tracepoint): Initialize new IPA variables.
10731 * target.h (struct target_ops): Add arguments to
10732 install_fast_tracepoint_jump_pad operation, add new
10733 get_min_fast_tracepoint_insn_len operation.
10734 (target_get_min_fast_tracepoint_insn_len): New.
10735 (install_fast_tracepoint_jump_pad): Add arguments.
10736 * server.h (IPA_BUFSIZ): Define.
10737 * linux-i386-ipa.c: Include extra header files.
10738 (initialize_fast_tracepoint_trampoline_buffer): New function.
10739 (initialize_low_tracepoint): Call it.
10740 * server.h (set_trampoline_buffer_space): Declare.
10741 (claim_trampoline_space): Ditto.
10742 (have_fast_tracepoint_trampoline_buffer): Ditto.
10744 2011-11-14 Yao Qi <yao@codesourcery.com>
10746 * server.c (handle_query): Handle InstallInTrace for qSupported.
10747 * tracepoint.c (add_tracepoint): Sort list.
10748 (install_tracepoint, download_tracepoint): New.
10749 (cmd_qtdp): Call them to install and download tracepoints.
10750 (sort_tracepoints): Removed.
10751 (cmd_qtstart): Update.
10753 2011-11-14 Yao Qi <yao@codesourcery.com>
10755 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10756 * mem-break.h: Declare.
10757 * tracepoint.c (cmd_qtstart): Move some code to ...
10758 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10760 (download_tracepoints): Move some code to ...
10761 (download_tracepoint_1): ... here. New.
10763 2011-11-08 Yao Qi <yao@codesourcery.com>
10765 * remote-utils.c (relocate_instruction): A comment fix.
10767 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10769 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10770 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10771 dr_status_mirror and dr_control_mirror from debug_reg_state.
10772 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10773 (i386_initial_stuff): Remove use of deleted globals.
10774 (i386_get_thread_context, i386_set_thread_context,
10775 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10776 from debug_reg_state.
10778 2011-11-05 Yao Qi <yao@codesourcery.com>
10780 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10781 address as TPOINT's.
10783 2011-11-02 Stan Shebs <stan@codesourcery.com>
10785 * tracepoint.c (agent_mem_read_string): New function.
10786 (eval_agent_expr): Call it for tracenz.
10787 * server.c (handle_query): Report support for tracenz.
10789 2011-11-02 Yao Qi <yao@codesourcery.com>
10791 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10793 2011-11-02 Yao Qi <yao@codesourcery.com>
10795 * target.h: Fix a typo in comment.
10797 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10799 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10800 clobber the breakpoints' shadows with fast tracepoint jumps.
10801 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10802 * target.c (write_inferior_memory): Also pass MYADDR down to
10805 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10807 * configure.ac: Check support for personality routine.
10808 * configure: Regenerate.
10809 * config.in: Likewise.
10810 * linux-low.c: Include <sys/personality.h>.
10811 Define ADDR_NO_RANDOMIZE if necessary.
10812 (linux_create_inferior): Disable address space randomization when
10813 forking inferior, if requested.
10814 (linux_supports_disable_randomization): New function.
10815 (linux_target_ops): Install it.
10816 * server.h (disable_randomization): Declare.
10817 * server.c (disable_randomization): New global variable.
10818 (handle_general_set): Handle QDisableRandomization.
10819 (handle_query): Likewise for qSupported.
10820 (main): Support --disable-randomization and --no-disable-randomization
10821 command line arguments.
10822 * target.h (struct target_ops): Add supports_disable_randomization.
10823 (target_supports_disable_randomization): New macro.
10825 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10827 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10829 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10830 [!PT_GETDSBT] (target_loadmap): New definition.
10831 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10832 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10833 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10834 and PT_GETDSBT to LINUX_LOADMAP.
10835 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10836 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10838 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10840 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10841 (arm_linux_hwbp_cap): New static variable.
10842 (arm_linux_get_hwbp_cap): Replace by ...
10843 (arm_linux_init_hwbp_cap): ... this new function.
10844 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10845 (arm_linux_get_hw_watchpoint_count): Likewise.
10846 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10847 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10848 (arm_prepare_to_resume): Use perror_with_name instead of error.
10850 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10852 * linux-arm-low.c: Include <signal.h>.
10853 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10854 (struct arm_linux_hwbp_cap): New data type.
10855 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10856 (struct arm_linux_hw_breakpoint): New data type.
10857 (MAX_BPTS, MAX_WPTS): Define.
10858 (struct arch_process_info, struct arch_lwp_info): New data types.
10859 (arm_linux_get_hwbp_cap): New function.
10860 (arm_linux_get_hw_breakpoint_count): Likewise.
10861 (arm_linux_get_hw_watchpoint_count): Likewise.
10862 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10863 (arm_hwbp_control_initialize): Likewise.
10864 (arm_hwbp_control_is_enabled): Likewise.
10865 (arm_hwbp_control_is_initialized): Likewise.
10866 (arm_hwbp_control_disable): Likewise.
10867 (arm_linux_hw_breakpoint_equal): Likewise.
10868 (arm_linux_hw_point_initialize): Likewise.
10869 (struct update_registers_data): New data structure.
10870 (update_registers_callback: New function.
10871 (arm_insert_point): Likewise.
10872 (arm_remove_point): Likewise.
10873 (arm_stopped_by_watchpoint): Likewise.
10874 (arm_stopped_data_address): Likewise.
10875 (arm_new_process): Likewise.
10876 (arm_new_thread): Likewise.
10877 (arm_prepare_to_resume): Likewise.
10878 (the_low_target): Register arm_insert_point, arm_remove_point,
10879 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10880 arm_new_thread, and arm_prepare_to_resume.
10882 2011-09-15 Stan Shebs <stan@codesourcery.com>
10884 * server.h (struct emit_ops): Add compare-goto fields.
10885 * tracepoint.c (gdb_agent_op_sizes): New table.
10886 (emit_eq_goto): New function.
10887 (emit_ne_goto): New function.
10888 (emit_lt_goto): New function.
10889 (emit_le_goto): New function.
10890 (emit_gt_goto): New function.
10891 (emit_ge_goto): New function.
10892 (is_goto_target): New function.
10893 (compile_bytecodes): Recognize special cases of compare-goto
10894 combinations and call specialized emitters for them.
10895 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10896 (amd64_emit_ne_goto): New function.
10897 (amd64_emit_lt_goto): New function.
10898 (amd64_emit_le_goto): New function.
10899 (amd64_emit_gt_goto): New function.
10900 (amd64_emit_ge_goto): New function.
10901 (amd64_emit_ops): Add the new functions.
10902 (i386_emit_eq_goto): New function.
10903 (i386_emit_ne_goto): New function.
10904 (i386_emit_lt_goto): New function.
10905 (i386_emit_le_goto): New function.
10906 (i386_emit_gt_goto): New function.
10907 (i386_emit_ge_goto): New function.
10908 (i386_emit_ops): Add the new functions.
10910 2011-09-08 Stan Shebs <stan@codesourcery.com>
10912 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10913 (i386_emit_epilogue): Restore %ebx.
10915 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10917 * server.c (step_thread): Remove definition.
10918 (process_serial_event): Don't handle Hs.
10919 * server.h (step_thread): Remove declaration.
10920 * target.c (set_desired_inferior): Remove use of step_thread.
10922 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10924 * linux-low.c: Include linux-procfs.h.
10925 (linux_attach_lwp_1): Update comments.
10926 (linux_attach): Scan for existing threads when attaching to a
10927 process that is the tgid.
10928 * Makefile.in: Update dependencies.
10930 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10932 * configure.srv: Add linux-procfs.o dependencies.
10934 2011-08-14 Yao Qi <yao@codesourcery.com>
10936 * target.h (struct target_ops): Fix indent.
10937 * win32-low.c (win32_target_ops): Fix comment.
10939 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10940 Yao Qi <yao@codesourcery.com>
10942 * Makefile.in (clean): Remove tic6x-*.c files.
10943 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10944 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10945 (tic6x-c64xp-linux.c): Likewise.
10946 * configure.srv: Add support for tic6x-*-uclinux.
10947 * linux-tic6x-low.c: New.
10948 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10950 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10951 Yao Qi <yao@codesourcery.com>
10953 * target.h (struct target_ops): Add read_loadmap.
10954 * linux-low.c (struct target_loadseg): New type.
10955 (struct target_loadmap): New type.
10956 (linux_read_loadmap): New function.
10957 (linux_target_ops): Add linux_read_loadmap.
10958 * server.c (handle_query): Support qXfer:fdpic:read packet.
10959 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10962 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10964 * win32-low.c: Include <stdint.h>.
10966 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10968 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10969 to the inferior here.
10970 (i386_remove_aligned_watchpoint): Ditto.
10971 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10972 fit part of the watchpoint in the debug registers.
10973 (i386_update_inferior_debug_regs): New.
10974 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10975 registers, and only update the inferior on success.
10976 (i386_low_remove_watchpoint): Ditto.
10978 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10980 * linux-low.c (compare_ints, unique, list_threads, show_process,
10981 linux_core_of_thread): Delete.
10982 (linux_target_ops): Change linux_core_of_thread to
10983 linux_common_core_of_thread.
10984 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10985 * utils.c (malloc_failure): Change type of argument.
10986 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10987 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10988 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10989 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10990 (IPA_OBJS): Add common-utils-ipa.o.
10991 (ptid_h, linux_osdata_h): New macros.
10992 (server_h): Add common/common-utils.h, common/xml-utils.h,
10993 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10995 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10996 ptid.o, buffer.o): New rules.
10997 (linux-low.o): Add common/linux-osdata.h as a dependency.
10998 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10999 * configure.ac: Add AC_HEADER_DIRENT check.
11000 * config.in: Regenerate.
11001 * configure: Regenerate.
11002 * remote-utils.c (xml_escape_text): Delete.
11003 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11004 buffer_xml_printf): Move to common/buffer.c.
11005 * server.c (main): Remove call to initialize_inferiors.
11006 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11007 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11008 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11009 internal_error, gdb_assert, gdb_assert_fail): Delete.
11010 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11011 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11013 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11014 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11015 initialize_inferiors): Delete.
11017 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11019 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11022 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11024 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11026 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11028 2011-05-26 Yao Qi <yao@codesourcery.com>
11030 * Makefile.in (thread-db.o): Track dependence to
11031 common/gdb_thread_db.h.
11032 * thread-db.c: include gdb_thread_db.h from right place.
11034 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11036 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11037 __FILE__ and __LINE__ to internal_error.
11039 2011-05-13 Doug Evans <dje@google.com>
11041 * thread-db.c (try_thread_db_load_from_sdir): New function.
11042 (try_thread_db_load_from_dir): New function.
11043 (thread_db_load_search): Handle $sdir, ignore $pdir.
11044 Remove trying of system directories if search of
11045 libthread-db-search-path fails, that is now done via $sdir.
11047 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11049 * server.c (handle_query): Add EnableDisableTracepoints to the list
11050 of supported features.
11051 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11053 (cmd_qtenable_disable): New.
11054 (cmd_qtstart): Install tracepoints even if disabled.
11055 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11056 receiving a QTEnable or QTDisable packet.
11057 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11058 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11060 (gdb_probe): Skip data collection if static tracepoint is disabled.
11062 2011-05-10 Doug Evans <dje@google.com>
11064 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11066 2011-05-04 Doug Evans <dje@google.com>
11068 * linux-low.c (linux_join): Skip process lookup.
11069 * spu-low.c (spu_join): Ditto.
11070 * server.c (join_inferiors_callback): Delete.
11071 (process_serial_event): For 'D' packet (detach) call join_inferior
11074 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11076 * README: Don't mention xscale*-*-linux*.
11077 * configure.srv (xscale*-*-linux*): Don't handle target.
11079 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11081 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11083 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11084 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11085 (i386_emit_void_call_2): Likewise.
11087 2011-04-26 Yao Qi <yao@codesourcery.com>
11089 * linux-low.c: Move common macros to linux-ptrace.h.
11090 Include linux-ptrace.h.
11091 * Makefile.in (linux_ptrace_h): New.
11092 (linux-low.o): Depends on linux-ptrace.h.
11094 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11096 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11097 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11098 (remote_prepare): New function with most of the TCP code from ...
11099 (remote_open): ... here. Detect PORT here unconditionally. Move also
11100 setting transport_is_reliable.
11101 * server.c (run_once): New variable.
11102 (gdbserver_usage): Document it.
11103 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11104 the first run if RUN_ONCE.
11105 * server.h (run_once, remote_prepare): New declarations.
11107 2011-04-19 Tom Tromey <tromey@redhat.com>
11109 * win32-low.c (handle_load_dll): Remove duplicate "the".
11111 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11113 Remove support for old Cygwin 1.5 versions.
11114 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11115 function to avoid warning.
11116 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11119 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11121 * gdbserver/server.h (Macro _): Define it if not available.
11123 2011-03-14 Michael Snyder <msnyder@vmware.com>
11125 * hostio.c (handle_close): Remove unnecessary null test.
11127 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11129 * Makefile.in (maintainer-clean realclean distclean): Remove
11130 "make ... subdir_do" command.
11132 2011-03-10 Michael Snyder <msnyder@vmware.com>
11134 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11136 * server.c (handle_v_run): Free alloced buffer on early return.
11138 2011-03-09 Yao Qi <yao@codesourcery.com>
11141 2011-03-04 Yao Qi <yao@codesourcery.com>
11143 * Makefile.in: Remove GNU make feature --directory.
11145 2011-03-05 Yao Qi <yao@codesourcery.com>
11147 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11148 (subdir_do): New make target. Copied from gdb/Makefile.
11149 (maintainer-clean, realclean, distclean, clean): Call corresponding
11150 make targets in common/Makefile.
11152 2011-02-11 Yao Qi <yao@codesourcery.com>
11154 * configure.ac: Call AC_PROG_RANLIB.
11155 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11156 * configure: Regenerate.
11158 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11160 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11162 2011-03-06 Yao Qi <yao@codesourcery.com>
11164 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11166 2011-03-05 Yao Qi <yao@codesourcery.com>
11168 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11169 (subdir_do): New make target. Copied from gdb/Makefile.
11170 (maintainer-clean, realclean, distclean, clean): Call corresponding
11171 make targets in common/Makefile.
11173 2011-03-04 Yao Qi <yao@codesourcery.com>
11175 * Makefile.in: Remove GNU make feature --directory.
11177 2011-03-04 Michael Snyder <msnyder@vmware.com>
11179 * server.c (queue_stop_reply): Call xmalloc not malloc.
11181 2011-03-02 Michael Snyder <msnyder@vmware.com>
11183 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11185 2011-02-28 Michael Snyder <msnyder@vmware.com>
11187 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11188 (cmd_qtframe): Ditto.
11189 (cmd_qtbuffer): Ditto.
11190 (cmd_bigqtbuffer): Ditto.
11192 * utils.c (decimal2str): Initialize 'width' to nine, then
11193 don't mess with it.
11195 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11197 * hostio.c (require_data): Free *data, not data.
11199 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11201 * hostio.c (require_data): Use free, not xfree.
11203 2011-02-27 Michael Snyder <msnyder@vmware.com>
11205 * server.c (handle_query): Discard unused value.
11207 * hostio.c (require_data): Free malloc memory before returning
11210 2011-02-26 Michael Snyder <msnyder@vmware.com>
11212 * linux-low.c (list_threads): Call closedir for dirent.
11214 2011-02-27 Michael Snyder <msnyder@vmware.com>
11216 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11217 a case statement falls through.
11219 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11221 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11224 2011-02-26 Michael Snyder <msnyder@vmware.com>
11226 * utils.c (decimal2str): Eliminate dead code and dead param.
11227 (pulongest): Drop dead param from call to decimal2str.
11230 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11232 Revert the following patch (not approved yet):
11233 2011-02-21 Hui Zhu <teawater@gmail.com>
11234 * tracepoint.c (tp_printf): New function.
11235 (eval_agent_expr): Handle gdb_agent_op_printf.
11237 2011-02-21 Hui Zhu <teawater@gmail.com>
11239 * tracepoint.c (tp_printf): New function.
11240 (eval_agent_expr): Handle gdb_agent_op_printf.
11242 2011-02-18 Tom Tromey <tromey@redhat.com>
11244 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11245 (tracepoint.o): Likewise.
11246 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11247 (gdb_agent_op_names): Likewise.
11249 2011-02-18 Tom Tromey <tromey@redhat.com>
11251 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11252 gdb_agent_op_rot>: New constants.
11253 (gdb_agent_op_names): Add pick and roll.
11254 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11257 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11259 * aclocal.m4: Regenerated with aclocal-1.11.1.
11261 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11263 * server.c (handle_qxfer_traceframe_info): New.
11264 (qxfer_packets): Register "traceframe-info".
11265 (handle_query): Report support for qXfer:traceframe-info:read+.
11266 * tracepoint.c (match_blocktype): New.
11267 (traceframe_find_block_type): Rename to ...
11268 (traceframe_walk_blocks): ... this. Add callback filter argument,
11270 (traceframe_find_block_type): New, reimplemented on top of
11271 traceframe_walk_blocks.
11272 (build_traceframe_info_xml): New.
11273 (traceframe_read_info): New.
11274 * server.h (traceframe_read_info): Declare.
11276 2011-02-11 Yao Qi <yao@codesourcery.com>
11278 * configure.ac: Call AC_PROG_RANLIB.
11279 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11280 * configure: Regenerate.
11282 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11284 * server.c (gdb_read_memory): Change return semantics to allow
11286 (handle_search_memory_1): Adjust.
11287 (process_serial_event) <'m' packet>: Handle partial transfers.
11288 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11290 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11292 * regcache.c (init_register_cache): Initialize
11293 regcache->register_status.
11294 (free_register_cache): Release regcache->register_status.
11295 (regcache_cpy): Copy register_status.
11296 (registers_to_string): Print 'x's for unavailable registers.
11297 (supply_register): Mark the register's status valid or
11298 unavailable, depending on whether a buffer was passed in or not.
11299 (supply_register_zeroed): New.
11300 (supply_regblock): Mark the registers' status valid or
11301 unavailable, depending on whether a buffer was passed in or not.
11302 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11303 (struct regcache): New `register_status' field.
11304 (supply_register_zeroed): Declare.
11305 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11306 supply_register_zeroed, rather than passing a NULL buffer to
11308 * tracepoint.c (fetch_traceframe_registers): Update comment.
11310 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11312 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11315 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11317 * server.h (decode_xfer_write): Change prototype.
11318 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11319 and don't extract the annex here.
11320 * server.c (decode_xfer_read): Remove `annex' parameter,
11321 and don't extract the annex here.
11322 (decode_xfer): New.
11323 (struct qxfer): New.
11324 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11325 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11326 (handle_qxfer_statictrace): New functions, abstracted out from
11327 handle_query, and made to use the struct qxfer interface.
11328 (handle_threads_qxfer_proper): Rename to ...
11329 (handle_qxfer_threads_proper): ... this.
11330 (handle_threads_qxfer): Rename to ...
11331 (handle_qxfer_threads): ... this. Adjust.
11332 (qxfer_packets): New array.
11333 (handle_qxfer): New function.
11334 (handle_query): Use handle_qxfer.
11336 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11338 * gdbreplay.c: Shorten lines of >= 80 columns.
11339 * linux-low.c: Ditto.
11340 * linux-ppc-low.c: Ditto.
11341 * linux-s390-low.c: Ditto.
11342 * linux-sparc-low.c: Ditto.
11343 * linux-x86-low.c: Ditto.
11344 * linux-xtensa-low.c: Ditto.
11345 * mem-break.c: Ditto.
11346 * nto-low.c: Ditto.
11347 * regcache.h: Ditto.
11348 * remote-utils.c: Ditto.
11351 * thread-db.c: Ditto.
11352 * tracepoint.c: Ditto.
11354 * win32-low.h: Ditto.
11356 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11358 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11361 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11363 * server.c (gdbserver_version): Update copyright year in version
11365 * gdbreplay.c (gdbreplay_version): Ditto.
11367 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11369 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11370 * linux-bfin-low.c: New file.
11371 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11372 PT_DATA_ADDR for BFIN targets.
11373 * Makefile.in (SFILES): Add linux-bfin-low.c.
11374 (clean): Remove reg-bfin.c.
11375 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11376 * README: Mention supported Blackfin targets.
11378 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11380 * .gitignore: New file.
11382 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11384 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11386 2010-10-22 Jie Zhang <jie@codesourcery.com>
11388 * Makefile.in: Add FLAGS_TO_PASS variable.
11389 (install): Remove dependency of install-only and recursively
11390 invoke make for install-only.
11392 2010-10-04 Doug Evans <dje@google.com>
11394 * Makefile.in (uninstall): Use $(DESTDIR).
11396 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11400 * linux-x86-low.c (compat_siginfo_from_siginfo)
11401 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11402 si_code is < 0. Check for si_code == SI_TIMER before checking for
11405 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11407 * lynx-i386-low.c: New file.
11408 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11410 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11412 * lynx-low.c (ptrace_request_to_str): Remove handling for
11413 request values that have been removed in LynxOS 5.x.
11415 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11417 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11420 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11422 * configure.ac: Add --enable-inprocess-agent option.
11423 * configure: Rebuilt.
11425 2010-09-06 Yao Qi <yao@codesourcery.com>
11427 * linux-low.c (linux_kill): Remove unused variable.
11428 (linux_stabilize_threads): Likewise.
11429 * server.c (start_inferior): Likewise.
11430 (queue_stop_reply_callback): Likewise.
11431 * tracepoint.c (do_action_at_tracepoint): Likewise.
11433 2010-09-06 Yao Qi <yao@codesourcery.com>
11435 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11438 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11440 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11442 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11444 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11447 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11449 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11450 gdbserver/lynx-ppc-low.c: New files.
11451 * Makefile.in (lynx_low_h): New variable.
11452 (lynx-low.o, lynx-ppc-low.o): New rules.
11453 * configure.ac: On LynxOS, link with -lnetinet.
11454 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11455 * configure: regenerate.
11457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11459 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11460 * configure.ac: Add check for vasprintf and vsnprintf.
11461 * configure, config.in: Regenerate.
11462 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11466 * gdbreplay.c: Move include of alloca.h up, next to include of
11468 * server.h: Add include of malloc.h.
11469 * mem-break.c: Remove include of malloc.h.
11470 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11472 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11474 * Makefile.in (memmem.o): Build with -Wno-error.
11476 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11478 * utils.c (xsnprintf): Make non-static.
11479 * server.h: Add xsnprintf declaration.
11480 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11481 replace calls to snprintf by calls to xsnprintf throughout.
11483 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11485 * configure.ac: Add configure check for alloca.
11486 * configure, config.in: Regenerate.
11487 * server.h: Include alloca.h if it exists.
11488 * gdbreplay.c: Include alloca.h if it exists.
11490 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11492 * linux-low.c (__SIGRTMIN): Define if not already defined.
11493 (linux_create_inferior): Check for __ANDROID__ rather than
11495 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11496 are already deferred.
11497 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11498 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11499 stopped and already has a pending signal to report.
11500 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11501 a pending signal to report or is moving out of a jump pad.
11502 (linux_init_signals): Check for __ANDROID__ rather than
11505 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11507 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11508 debug_threads check. Avoid a linear search when not doing debug
11511 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11513 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11514 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11515 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11516 (process_event): Change local fd's type to gdb_fildes_t.
11517 (create_file_handler): Adjust prototype.
11518 (delete_file_handler): Adjust prototype.
11519 (handle_file_event): Adjust prototype. Use pfildes.
11520 (create_file_event): Adjsut prototype.
11521 * remote-utils.c (remote_desc, listen_desc): Change type to
11523 * server.h: New gdb_fildes_t typedef.
11524 [USE_WIN32API]: Include winsock2.h.
11525 (delete_file_handler, add_file_handler): Adjust prototypes.
11526 (pfildes): Declare.
11527 * utils.c (pfildes): New.
11529 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11531 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11532 * configure: Regenerate.
11534 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11536 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11537 (linux_done_accessing_memory): ... this.
11538 (linux_target_ops): Adjust.
11539 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11540 * nto-low.c (nto_target_ops): Adjust comment.
11541 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11542 * spu-low.c (spu_target_ops): Adjust comment.
11543 * target.h (target_ops): Rename unprepare_to_access_memory field
11544 to done_accessing_memory.
11545 (unprepare_to_access_memory): Rename to ...
11546 (done_accessing_memory): ... this.
11548 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11550 * linux-low.c (linux_prepare_to_access_memory): New.
11551 (linux_unprepare_to_access_memory): New.
11552 (linux_target_ops): Install them.
11553 * server.c (read_memory): Rename to ...
11554 (gdb_read_memory): ... this. Use
11555 prepare_to_access_memory/prepare_to_access_memory.
11556 (write_memory): Rename to ...
11557 (gdb_write_memory): ... this. Use
11558 prepare_to_access_memory/prepare_to_access_memory.
11559 (handle_search_memory_1): Adjust.
11560 (process_serial_event): Adjust.
11561 * target.h (struct target_ops): New fields
11562 prepare_to_access_memory and unprepare_to_access_memory.
11563 (prepare_to_access_memory, unprepare_to_access_memory): New.
11564 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11565 prepare_to_access_memory/prepare_to_access_memory.
11566 * nto-low.c (nto_target_ops): Adjust.
11567 * spu-low.c (spu_target_ops): Adjust.
11568 * win32-low.c (win32_target_ops): Adjust.
11570 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11572 * Makefile.in (WARN_CFLAGS): Get it from configure.
11573 (WERROR_CFLAGS): New.
11574 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11575 * configure.ac: Introduce --enable-werror, which adds -Werror to
11576 the compiler command line. Enabled by default. Disable with
11577 --disable-werror. Add -Wdeclaration-after-statement
11578 Wpointer-arith and -Wformat-nonliteral to warning flags.
11579 * configure: Regenerate.
11581 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11583 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11585 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11587 * gdbreplay.c (remote_error): New.
11589 (expect): Use gdbchar. Check for error reading from GDB.
11590 Clarify sync error output.
11591 (play): Check for errors writing to GDB.
11592 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11593 * remote-utils.c (getpkt): Check for errors writing to the remote
11596 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11598 * linux-low.c (linux_wait_1): Move non-debugging code out of
11599 `debug_threads' control.
11601 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11603 * linux-low.c (linux_wait_1): Don't set last_status here.
11604 * server.c (push_event, queue_stop_reply_callback): Assert we're
11605 not pushing a TARGET_WAITKIND_IGNORE event.
11606 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11607 (myresume, handle_target_event): Set the thread's last_resume_kind
11608 and last_status from the target returned status.
11610 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11614 * linux-x86-low.c (update_debug_registers_callback): New.
11615 (i386_dr_low_set_addr): Use it.
11616 (i386_dr_low_get_addr): New.
11617 (i386_dr_low_set_control): Use update_debug_registers_callback.
11618 (i386_dr_low_get_control): New.
11619 (i386_dr_low_get_status): Adjust.
11620 * linux-low.c (linux_stop_lwp): New.
11621 * linux-low.h (linux_stop_lwp): Declare.
11623 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11624 argument instead of a i386_debug_reg_state.
11625 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11626 a i386_debug_reg_state.
11627 (i386_insert_aligned_watchpoint): Adjust.
11628 (i386_remove_aligned_watchpoint): Adjust.
11629 (i386_low_stopped_data_address): Read the debug registers from the
11630 inferior instead of from the mirrors.
11631 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11632 (i386_dr_low_get_addr): Declare.
11633 (i386_dr_low_get_control): Declare.
11634 (i386_dr_low_get_status): Change prototype.
11636 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11637 (i386_dr_low_get_addr): New.
11638 (i386_dr_low_get_control): New.
11639 (i386_dr_low_get_status): Adjust prototype. Return
11641 (i386_initial_stuff): Clear dr_status_mirror and
11643 (i386_get_thread_context): Adjust.
11644 (i386_set_thread_context): Adjust.
11645 (i386_thread_added): Adjust.
11647 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11649 * linux-low.h (linux_thread_area): Delete declaration.
11651 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11653 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11654 after its termination.
11656 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11658 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11659 (gdb_wants_all_stopped): Delete.
11660 (linux_wait_1): Don't call them.
11661 * server.c (handle_v_cont): Tag all threads as want-stopped.
11662 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11663 stopped as "client-wants-stopped".
11665 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11667 * Makefile.in (signals_h): New.
11668 (server_h): Depend on it.
11669 (server.o): Don't depend on $(signals_def).
11670 (signals.o): Depend on $(signals_def).
11672 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11674 * Makefile.in (signals_def): New.
11675 (server_h): Append include/gdb/signals.h and signals_def.
11676 (server.o): Append signals_def.
11678 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11680 * server.c (handle_target_event): Use target_signal_to_host for
11681 resume_info.sig initialization.
11682 * target.h (struct thread_resume) <sig>: New comment.
11684 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11686 * server.c (handle_query): strcpy() the returned string from paddress()
11687 instead of sprintf().
11688 * utils.c (paddress): Return phex_nz().
11690 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11692 * server.c (handle_v_cont): Call mourn_inferior if process
11694 (myresume): Likewise.
11696 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11698 Static tracepoints, and integration with UST.
11700 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11701 * mem-break.c (uninsert_all_breakpoints)
11702 (reinsert_all_breakpoints): New.
11703 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11704 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11705 (gdb_agent_ust_loaded, helper_thread_id)
11706 (gdb_agent_helper_thread_id): New macros.
11707 (struct ipa_sym_addresses): Add addr_ust_loaded,
11708 addr_helper_thread_id, addr_cmd_buf.
11709 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11710 (in_process_agent_loaded_ust): New.
11711 (write_e_ust_not_loaded): New.
11712 (maybe_write_ipa_ust_not_loaded): New.
11713 (struct collect_static_trace_data_action): New.
11714 (enum tracepoint_type) <static_tracepoint>: New.
11715 (struct tracepoint) <handle>: Mention static tracepoints.
11716 (struct static_tracepoint_ctx): New.
11717 (CMD_BUF_SIZE): New.
11718 (add_tracepoint_action): Handle static tracepoint actions.
11719 (unprobe_marker_at): New.
11720 (clear_installed_tracepoints): Handle static tracepoints.
11721 (cmd_qtdp): Handle static tracepoints.
11722 (probe_marker_at): New.
11723 (cmd_qtstart): Handle static tracepoints.
11724 (response_tracepoint): Handle static tracepoints.
11725 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11726 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11727 (get_context_regcache): Handle static tracepoints.
11728 (do_action_at_tracepoint): Handle static tracepoint actions.
11729 (traceframe_find_block_type): Handle static trace data blocks.
11730 (traceframe_read_sdata): New.
11731 (download_tracepoints): Download static tracepoint actions.
11732 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11733 (GDB_PROBE_NAME): New.
11735 (GET_UST_SYM): New.
11738 (ust_marker_to_static_tracepoint): New.
11740 (collect_ust_data_at_tracepoint): New.
11741 (gdb_ust_probe): New.
11742 (UNIX_PATH_MAX, SOCK_DIR): New.
11743 (gdb_ust_connect_sync_socket): New.
11744 (resume_thread, stop_thread): New.
11745 (run_inferior_command): New.
11746 (init_named_socket): New.
11747 (gdb_ust_socket_init): New.
11748 (cstr_to_hexstr): New.
11750 (first_marker, next_marker): New.
11751 (response_ust_marker): New.
11752 (cmd_qtfstm, cmd_qtsstm): New.
11753 (unprobe_marker_at, probe_marker_at): New.
11754 (cmd_qtstmat, gdb_ust_thread): New.
11755 (gdb_ust_init): New.
11756 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11757 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11758 (ST_REGENTRY): New.
11759 (x86_64_st_collect_regmap): New.
11760 (X86_64_NUM_ST_COLLECT_GREGS): New.
11761 (AMD64_RIP_REGNUM): New.
11762 (supply_static_tracepoint_registers): New.
11763 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11764 (ST_REGENTRY): New.
11765 (i386_st_collect_regmap): New.
11766 (i386_NUM_ST_COLLECT_GREGS): New.
11767 (supply_static_tracepoint_registers): New.
11768 * server.c (handle_query): Handle qXfer:statictrace:read.
11769 <qSupported>: Report support for StaticTracepoints, and
11770 qXfer:statictrace:read features.
11771 * server.h (traceframe_read_sdata)
11772 (supply_static_tracepoint_registers): Declare.
11773 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11774 (unpack_varlen_hex): Include in IPA build.
11775 * Makefile.in (ustlibs, ustinc): New.
11776 (IPA_OBJS): Add remote-utils-ipa.o.
11777 ($(IPA_LIB)): Link -ldl and -lpthread.
11779 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11780 * config.in, configure: Regenerate.
11782 2010-06-20 Ian Lance Taylor <iant@google.com>
11783 Pedro Alves <pedro@codesourcery.com>
11785 * linux-x86-low.c (always_true): Delete.
11786 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11787 trying to fool the compiler with always_true.
11789 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11791 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11792 conditions in gdbserver.
11794 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11796 * spu-low.c (spu_read_memory): Wrap around local store limit.
11797 (spu_write_memory): Likewise.
11799 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11801 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11802 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11804 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11806 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11807 uses with LONGEST uses.
11809 2010-06-14 Stan Shebs <stan@codesourcery.com>
11810 Pedro Alves <pedro@codesourcery.com>
11814 * linux-x86-low.c: Include limits.h.
11816 (always_true): New.
11819 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11820 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11821 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11822 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11823 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11824 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11825 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11826 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11827 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11828 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11829 (amd64_emit_void_call_2): New.
11830 (amd64_emit_ops): New.
11831 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11832 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11833 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11834 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11835 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11836 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11837 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11838 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11839 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11840 (i386_emit_stack_adjust, i386_emit_int_call_1)
11841 (i386_emit_void_call_2): New.
11842 (i386_emit_ops): New.
11843 (x86_emit_ops): New.
11844 (the_low_target): Install x86_emit_ops.
11845 * server.h (struct emit_ops): New.
11846 (get_raw_reg_func_addr): Declare.
11847 (current_insn_ptr, emit_error): Declare.
11848 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11849 (set_trace_state_variable_value): New defines.
11850 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11851 addr_get_trace_state_variable_value and
11852 addr_set_trace_state_variable_value.
11853 (symbol_list): New fields for get_raw_reg,
11854 get_trace_state_variable_value and set_trace_state_variable_value.
11855 (condfn): New typedef.
11856 (struct tracepoint): New field `compiled_cond'.
11857 (do_action_at_tracepoint): Clear compiled_cond.
11858 (get_trace_state_variable_value, set_trace_state_variable_value):
11860 (condition_true_at_tracepoint): If there's a compiled condition,
11862 (current_insn_ptr, emit_error): New globals.
11863 (struct bytecode_address): New.
11864 (get_raw_reg_func_addr): New.
11865 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11866 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11867 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11868 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11869 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11870 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11871 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11872 (compile_tracepoint_condition, compile_bytecodes): New.
11873 * target.h (emit_ops): Forward declare.
11874 (struct target_ops): New field emit_ops.
11875 (target_emit_ops): New.
11876 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11877 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11878 * linux-low.c (linux_emit_ops): New.
11879 (linux_target_ops): Install it.
11880 * linux-low.h (struct linux_target_ops): New field emit_ops.
11882 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11884 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11885 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11887 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11888 Stan Shebs <stan@codesourcery.com>
11890 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11891 (all): Depend on $(extra_libraries).
11892 (install-only): Install the IPA.
11893 (IPA_OBJS, IPA_LIB): New.
11894 (clean): Remove the IPA lib.
11895 (IPAGENT_CFLAGS): New.
11896 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11897 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11898 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11899 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11900 * configure.ac: Check for atomic builtins support in the compiler.
11901 (IPA_DEPFILES, extra_libraries): Define.
11902 * configure.srv (ipa_obj): Add description.
11903 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11904 (i[34567]86-*-linux*): Set ipa_obj.
11905 (x86_64-*-linux*): Set ipa_obj.
11906 * linux-low.c (stabilizing_threads): New.
11907 (supports_fast_tracepoints): New.
11908 (linux_detach): Stabilize threads before detaching.
11909 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11910 the lwp is either not stabilizing, or is moving out of a jump pad.
11911 (linux_fast_tracepoint_collecting): New.
11912 (maybe_move_out_of_jump_pad): New.
11913 (enqueue_one_deferred_signal): New.
11914 (dequeue_one_deferred_signal): New.
11915 (linux_wait_for_event_1): If moving out of a jump pad, defer
11916 pending signals to later.
11917 (linux_stabilize_threads): New.
11918 (linux_wait_1): Check if threads need moving out of jump pads, and
11920 (stuck_in_jump_pad_callback): New.
11921 (move_out_of_jump_pad_callback): New.
11922 (lwp_running): New.
11923 (linux_resume_one_lwp): Handle moving out of jump pads.
11924 (linux_set_resume_request): Dequeue deferred signals.
11925 (need_step_over_p): Also step over fast tracepoint jumps.
11926 (start_step_over): Also uninsert fast tracepoint jumps.
11927 (finish_step_over): Also reinsert fast tracepoint jumps.
11928 (linux_install_fast_tracepoint_jump): New.
11929 (linux_target_ops): Install linux_stabilize_threads and
11930 linux_install_fast_tracepoint_jump_pad.
11931 * linux-low.h (linux_target_ops) <get_thread_area,
11932 install_fast_tracepoint_jump_pad>: New fields.
11933 (struct lwp_info) <collecting_fast_tracepoint,
11934 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11935 (linux_get_thread_area): Declare.
11936 * linux-x86-low.c (jump_insn): New.
11937 (x86_get_thread_area): New.
11938 (append_insns): New.
11939 (push_opcode): New.
11940 (amd64_install_fast_tracepoint_jump_pad): New.
11941 (i386_install_fast_tracepoint_jump_pad): New.
11942 (x86_install_fast_tracepoint_jump_pad): New.
11943 (the_low_target): Install x86_get_thread_area and
11944 x86_install_fast_tracepoint_jump_pad.
11945 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11946 (struct fast_tracepoint_jump): New.
11947 (fast_tracepoint_jump_insn): New.
11948 (fast_tracepoint_jump_shadow): New.
11949 (find_fast_tracepoint_jump_at): New.
11950 (fast_tracepoint_jump_here): New.
11951 (delete_fast_tracepoint_jump): New.
11952 (set_fast_tracepoint_jump): New.
11953 (uninsert_fast_tracepoint_jumps_at): New.
11954 (reinsert_fast_tracepoint_jumps_at): New.
11955 (set_breakpoint_at): Use write_inferior_memory.
11956 (uninsert_raw_breakpoint): Use write_inferior_memory.
11957 (check_mem_read): Mask out fast tracepoint jumps.
11958 (check_mem_write): Mask out fast tracepoint jumps.
11959 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11960 (set_fast_tracepoint_jump): Declare.
11961 (delete_fast_tracepoint_jump)
11962 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11963 (reinsert_fast_tracepoint_jumps_at): Declare.
11964 * regcache.c: Don't compile many functions when building the
11965 in-process agent library.
11966 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11967 the register buffer in the heap.
11968 (free_register_cache): If the register buffer isn't owned by the
11969 regcache, don't free it.
11970 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11971 pre-existing register caches.
11972 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11974 (convert_ascii_to_int): : Constify `from' parameter type.
11975 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11976 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11977 the needed buffer in-place.
11978 (relocate_instruction): New.
11979 * server.c (handle_query) <qSymbols>: If the target supports
11980 tracepoints, give it a chance of looking up symbols. Report
11981 support for fast tracepoints.
11982 (handle_status): Stabilize threads.
11983 (process_serial_event): Adjust.
11984 * server.h (struct fast_tracepoint_jump): Forward declare.
11985 (struct process_info) <fast_tracepoint_jumps>: New field.
11986 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11987 (decode_X_packet, decode_M_packet): Adjust.
11988 (relocate_instruction): Declare.
11989 (in_process_agent_loaded): Declare.
11990 (tracepoint_look_up_symbols): Declare.
11991 (struct fast_tpoint_collect_status): Declare.
11992 (fast_tracepoint_collecting): Declare.
11993 (force_unlock_trace_buffer): Declare.
11994 (handle_tracepoint_bkpts): Declare.
11995 (initialize_low_tracepoint)
11996 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11997 * target.h (struct target_ops) <stabilize_threads,
11998 install_fast_tracepoint_jump_pad>: New fields.
11999 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12000 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12001 [HAVE_STDINT_H]: Include stdint.h.
12002 (trace_debug_1): Rename to ...
12003 (trace_vdebug): ... this.
12004 (trace_debug): Rename to ...
12005 (trace_debug_1): ... this. Add `level' parameter.
12006 (trace_debug): New.
12007 (ATTR_USED, ATTR_NOINLINE): New.
12008 (IP_AGENT_EXPORT): New.
12009 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12010 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12011 (about_to_request_buffer_space, trace_buffer_is_full)
12012 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12013 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12014 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12015 (traceframe_write_count, traceframes_created)
12016 (trace_state_variables)
12017 New renaming defines.
12018 (struct ipa_sym_addresses): New.
12019 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12020 (symbol_list): New.
12021 (ipa_sym_addrs): New.
12022 (all_tracepoint_symbols_looked_up): New.
12023 (in_process_agent_loaded): New.
12024 (write_e_ipa_not_loaded): New.
12025 (maybe_write_ipa_not_loaded): New.
12026 (tracepoint_look_up_symbols): New.
12027 (debug_threads) [IN_PROCESS_AGENT]: New.
12028 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12029 (UNKNOWN_SIDE_EFFECTS): New.
12030 (stop_tracing): New.
12031 (flush_trace_buffer): New.
12032 (stop_tracing_bkpt): New.
12033 (flush_trace_buffer_bkpt): New.
12034 (read_inferior_integer): New.
12035 (read_inferior_uinteger): New.
12036 (read_inferior_data_pointer): New.
12037 (write_inferior_data_pointer): New.
12038 (write_inferior_integer): New.
12039 (write_inferior_uinteger): New.
12040 (struct collect_static_trace_data_action): Delete.
12041 (enum tracepoint_type): New.
12042 (struct tracepoint) <type>: New field `type'.
12043 <actions_str, step_actions, step_actions_str>: Only include in
12045 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12046 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12047 (tracepoints): Use IP_AGENT_EXPORT.
12048 (last_tracepoint): Don't include in the IPA.
12049 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12050 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12051 (alloced_trace_state_variables): New.
12052 (trace_state_variables): Use IP_AGENT_EXPORT.
12053 (traceframe_t): Delete unused variable.
12054 (circular_trace_buffer): Don't include in the IPA.
12055 (trace_buffer_start): Delete.
12056 (struct trace_buffer_control): New.
12057 (trace_buffer_free): Delete.
12058 (struct ipa_trace_buffer_control): New.
12059 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12060 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12062 (trace_buffer_ctrl): New.
12063 (TRACE_BUFFER_CTRL_CURR): New.
12064 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12065 Reimplement as macros.
12066 (trace_buffer_wrap): Delete.
12067 (traceframe_write_count, traceframe_read_count)
12068 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12069 (struct tracepoint_hit_ctx) <type>: New field.
12070 (struct fast_tracepoint_ctx): New.
12071 (memory_barrier): New.
12073 (record_tracepoint_error): Update atomically in the IPA.
12074 (clear_inferior_trace_buffer): New.
12075 (about_to_request_buffer_space): New.
12076 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12077 updating the same buffer.
12078 (add_tracepoint): Default the tracepoint's type to trap
12079 tracepoint, and orig_size to -1.
12080 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12081 internal variables.
12082 (create_trace_state_variable): New parameter `gdb'. Handle it.
12083 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12084 (cmd_qtdp): Handle fast tracepoints.
12085 (cmd_qtdv): Adjust.
12086 (max_jump_pad_size): New.
12087 (gdb_jump_pad_head): New.
12088 (get_jump_space_head): New.
12089 (claim_jump_space): New.
12090 (sort_tracepoints): New.
12091 (MAX_JUMP_SIZE): New.
12092 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12094 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12095 support. Upload fast traceframes, and delete internal IPA
12097 (stop_tracing_handler): New.
12098 (flush_trace_buffer_handler): New.
12099 (cmd_qtstop): Upload fast tracepoints.
12100 (response_tracepoint): Handle fast tracepoints.
12101 (tracepoint_finished_step): Upload fast traceframes. Set the
12102 tracepoint hit context's tracepoint type.
12103 (handle_tracepoint_bkpts): New.
12104 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12105 type. Add comment about fast tracepoints.
12106 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12107 non-existing action_str field.
12108 (get_context_regcache): Handle fast tracepoints.
12109 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12111 (fast_tracepoint_from_jump_pad_address): New.
12112 (fast_tracepoint_from_ipa_tpoint_address): New.
12113 (collecting_t): New.
12114 (force_unlock_trace_buffer): New.
12115 (fast_tracepoint_collecting): New.
12117 (gdb_collect): New.
12118 (write_inferior_data_ptr): New.
12119 (target_tp_heap): New.
12120 (target_malloc): New.
12121 (download_agent_expr): New.
12123 (download_tracepoints): New.
12124 (download_trace_state_variables): New.
12125 (upload_fast_traceframes): New.
12126 (IPA_FIRST_TRACEFRAME): New.
12127 (IPA_NEXT_TRACEFRAME_1): New.
12128 (IPA_NEXT_TRACEFRAME): New.
12129 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12130 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12131 (gdb_jump_pad_buffer_end): New.
12132 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12133 (initialize_tracepoint): Adjust.
12134 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12135 buffer. Initialize the low module.
12136 * utils.c (PREFIX, TOOLNAME): New.
12137 (malloc_failure): Use PREFIX.
12138 (error): In the IPA, an error causes an exit.
12139 (fatal, warning): Use PREFIX.
12140 (internal_error): Use TOOLNAME.
12141 (NUMCELLS): Increase to 10.
12142 * configure, config.in: Regenerate.
12144 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12146 * server.c (handle_query) <qSupported>: Do two passes over the
12147 qSupported string to avoid nesting strtok.
12149 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12151 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12153 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12154 -Wl,--dynamic-list.
12155 * configure: Regenerate.
12156 * proc-service.list: New.
12158 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12160 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12163 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12165 * gdbreplay.c (remote_open): Check error return from socket() call by
12166 its equality to -1 not by it being negative.
12167 * remote-utils.c (remote_open): Likewise.
12169 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12171 * config.h: Regenerate.
12173 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12175 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12176 doesn't provide PTRACE_GET_THREAD_AREA.
12178 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12180 * linux-m68k-low.c: Include <asm/ptrace.h>
12181 (ps_get_thread_area): Implement.
12183 2010-05-03 Doug Evans <dje@google.com>
12185 * event-loop.c (struct callback_event): New struct.
12186 (callback_list): New global.
12187 (append_callback_event, delete_callback_event): New functions.
12188 (process_callback): New function.
12189 (start_event_loop): Call it.
12190 * remote-utils.c (NOT_SCHEDULED): Define.
12191 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12192 moved out of readchar.
12193 (readchar): Rewrite. Call reschedule before returning.
12194 (reset_readchar): New function.
12195 (remote_close): Call it.
12196 (process_remaining, reschedule): New functions.
12197 * server.h (callback_handler_func): New typedef.
12198 (append_callback_event, delete_callback_event): Declare.
12200 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12202 * proc-service.c (ps_pglobal_lookup): Use
12203 thread_db_look_up_one_symbol.
12204 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12205 parameter. Use it instead of all_symbols_looked_up.
12206 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12208 (all_symbols_looked_up): Don't declare.
12209 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12210 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12212 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12213 Set all_symbols_looked_up here.
12214 (thread_db_look_up_one_symbol): New.
12215 (thread_db_get_tls_address): Adjust.
12216 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12217 thread_db object on the heap, and tentatively set it in the
12219 (thread_db_init): Don't set all_symbols_looked_up here.
12220 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12222 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12224 * linux-low.c (linux_kill, linux_detach): Adjust.
12225 (status_pending_p_callback): Remove redundant statement. Check
12226 for !TARGET_WAITIKIND_IGNORE, instead of
12227 TARGET_WAITKIND_STOPPED.
12228 (handle_tracepoints): Make sure LWP is locked. Adjust.
12229 (linux_wait_for_event_1): Adjust.
12230 (linux_cancel_breakpoints): New.
12231 (unsuspend_one_lwp): New.
12232 (unsuspend_all_lwps): New.
12233 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12234 (send_sigstop_callback): Change return type to int, add new
12235 `except' parameter and handle it.
12236 (suspend_and_send_sigstop_callback): New.
12237 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12238 pass them down. If SUSPEND, also increment the lwp's suspend
12240 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12241 (need_step_over_p): Don't consider suspended LWPs.
12242 (start_step_over): Adjust.
12243 (proceed_one_lwp): Change return type to int, add new `except'
12244 parameter and handle it.
12245 (unsuspend_and_proceed_one_lwp): New.
12246 (proceed_all_lwps): Use find_inferior instead of
12248 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12249 also decrement the suspend count of LWPs. Pass `except' down,
12250 instead of hacking its suspend count.
12251 (linux_pause_all): Add `freeze' parameter. Adjust.
12252 (linux_unpause_all): New.
12253 (linux_target_ops): Install linux_unpause_all.
12254 * server.c (handle_status): Adjust.
12255 * target.h (struct target_ops): New fields `unpause_all' and
12256 `cancel_breakpoints'. Add new parameter to `pause_all'.
12257 (pause_all): Add new `freeze' parameter.
12258 (unpause_all): New.
12259 (cancel_breakpoints): New.
12260 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12261 cancel breakpoints.
12262 (cmd_qtstart): Pause threads.
12263 (stop_tracing): Pause threads, and cancel breakpoints.
12264 * win32-low.c (win32_target_ops): Adjust.
12266 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12268 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12269 the inferior right away from here...
12270 (linux_wait_1): ... to here, and adjust to check the thread's
12271 last_resume_kind instead of the lwp's step or stop_expected flags.
12273 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12275 * README: Use consistent `GDB' and `GDBserver' spellings.
12277 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12279 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12280 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12281 (linux_detach_one_lwp): Assume the lwp is stopped.
12282 (any_thread_of): Delete.
12283 (linux_detach): Stop all lwps here. Don't blindly delete all
12285 (delete_lwp_callback): New.
12286 (linux_mourn): Delete all lwps of the process that is gone.
12287 (linux_wait_1): Don't delete the last lwp of the process here.
12288 * mem-break.h (mark_breakpoints_out): Declare.
12289 * mem-break.c (mark_breakpoints_out): New.
12290 (free_all_breakpoints): Use it.
12291 * server.c (handle_target_event): If the process is gone, mark
12293 * thread-db.c (struct thread_db) <create_bp>: New field.
12294 (thread_db_enable_reporting): Fix prototype. Store a thread event
12295 breakpoint reference in the thread_db struct.
12296 (thread_db_load_search): Clear the thread_db object.
12297 (try_thread_db_load_1): Ditto.
12298 (switch_to_process): New.
12299 (disable_thread_event_reporting): Use it.
12300 (remove_thread_event_breakpoints): New.
12301 (thread_db_detach, thread_db_mourn): Use it.
12303 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12305 * linux-low.c (linux_enable_event_reporting): New.
12306 (linux_wait_for_event_1, handle_extended_wait): Use it.
12308 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12310 * linux-low.c (linux_kill_one_lwp, linux_kill)
12311 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12312 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12313 SIGSTOP even if the LWP is stopped.
12314 (send_sigstop_callback): New.
12315 (stop_all_lwps): Use send_sigstop_callback instead.
12316 (linux_resume_one_thread): Adjust.
12317 (proceed_one_lwp): Still proceed an LWP that the client has
12318 requested to stop, if we haven't reported it as stopped yet. Make
12319 sure that LWPs the client want stopped, have a pending SIGSTOP.
12321 2010-04-26 Doug Evans <dje@google.com>
12323 * server.c (handle_general_set): Make static.
12325 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12326 Print received char after testing for error/eof instead of before.
12327 (input_interrupt): Tweak comment.
12329 2010-04-23 Doug Evans <dje@google.com>
12331 * server.c (start_inferior): Print inferior argv if --debug.
12333 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12335 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12336 * nto-x86-low.c: Include server.h
12338 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12340 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12341 be consistent with other sources of this directory.
12342 (init_registers_amd64): Correct name of source file of this function
12345 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12347 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12348 64-bit executables.
12350 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12352 * win32-i386-low.c: Add 64-bit support.
12353 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12354 (init_registers_amd64): Declare.
12355 (mappings): Add 64-bit version of array.
12356 (init_windows_x86): New function.
12357 (the_low_target): Change init_arch field to init_windows_x86.
12359 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12361 * win32-low.c: Adapt to support also 64-bit architecture.
12362 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12363 (get_image_name): Use SIZE_T type for local variable `done'.
12364 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12365 (toolhelp_get_dll_name): Idem.
12366 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12367 Use uintptr_t typecast to avoid warning.
12368 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12369 (handle_exception): Use phex_nz to avoid warning.
12370 (win32_wait): Remove unused local variable `process'.
12372 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12374 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12377 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12379 * configure.ac: Use `ws2_32' library for srv_mingw.
12380 * configure: Regenerate.
12381 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12382 * remote-utils.c: Likewise.
12384 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12386 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12387 if __x86_64__ is defined.
12389 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12391 * configure: Regenerate.
12393 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12395 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12396 * target.h (target_ops): New get_tib_address field.
12397 * win32-low.h (win32_thread_info): Add thread_local_base field.
12398 * win32-low.c (child_add_thread): Add tlb argument.
12399 Set thread_local_base field to TLB.
12400 (get_child_debug_event): Adapt to child_add_thread change.
12401 (win32_get_tib_address): New function.
12402 (win32_target_ops): Set get_tib_address field to
12403 win32_get_tib_address.
12404 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12406 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12408 * linux-low.c (linux_mourn): Also remove the process.
12409 * server.c (handle_target_event): Don't remove the process here.
12410 * nto-low.c (nto_mourn): New.
12411 (nto_target_ops): Install it.
12412 * spu-low.c (spu_mourn): New.
12413 (spu_target_ops): Install it.
12414 * win32-low.c (win32_mourn): New.
12415 (win32_target_ops): Install it.
12417 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12419 * server.h (buffer_xml_printf): Remove redundant `;'.
12421 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12423 * regcache.c (set_register_cache): Invalidate regcaches before
12424 changing the register cache layout.
12425 (regcache_invalidate_one): Allow a NULL regcache.
12426 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12427 regcaches before changing the register cache layout or the target
12430 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12432 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12433 variable warning on Linux/x86-64.
12435 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12437 GDBserver disconnected tracing support.
12439 * linux-low.c (linux_remove_process): Delete.
12440 (add_lwp): Don't set last_resume_kind here.
12441 (linux_kill): Use `mourn'.
12442 (linux_detach): Use `thread_db_detach', and `mourn'.
12443 (linux_mourn): New.
12444 (linux_attach_lwp_1): Adjust comment.
12445 (linux_attach): last_resume_kind moved the thread_info; adjust.
12446 (status_pending_p_callback): Adjust.
12447 (linux_wait_for_event_1): Adjust.
12448 (count_events_callback, select_singlestep_lwp_callback)
12449 (select_event_lwp_callback, cancel_breakpoints_callback)
12450 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12451 (proceed_one_lwp): Adjust.
12452 (linux_async): Add debug output.
12453 (linux_thread_stopped): New.
12454 (linux_pause_all): New.
12455 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12457 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12458 (thread_db_free): Delete declaration.
12459 (thread_db_detach, thread_db_mourn): Declare.
12460 * thread-db.c (thread_db_init): Use thread_db_mourn.
12461 (thread_db_free): Delete, split in two.
12462 (disable_thread_event_reporting): New.
12463 (thread_db_detach): New.
12464 (thread_db_mourn): New.
12466 * server.h (struct thread_info) <last_resume_kind>: New field.
12467 <attached>: Add comment.
12468 <gdb_detached>: New field.
12469 (handler_func): Change return type to int.
12470 (handle_serial_event, handle_target_event): Ditto.
12471 (gdb_connected): Declare.
12473 (disconnected_tracing): Declare.
12474 (stop_tracing): Declare.
12476 * server.c (handle_query) <qSupported>: Report support for
12477 disconnected tracing.
12478 (queue_stop_reply_callback): Account for running threads.
12479 (gdb_wants_thread_stopped): New.
12480 (gdb_wants_all_threads_stopped): New.
12481 (gdb_reattached_process): New.
12482 (handle_status): Clear the `gdb_detached' flag of all processes.
12483 In all-stop, stop all threads.
12484 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12485 (process_serial_event): If the remote connection breaks, or if an
12486 exit was forced with "monitor exit", force an event loop exit.
12487 Handle disconnected tracing on detach.
12488 (handle_serial_event): Adjust.
12489 (handle_target_event): If GDB isn't connected, forward events back
12490 to the inferior, unless the last process exited, in which case,
12491 exit gdbserver. Adjust interface.
12493 * remote-utils.c (remote_open): Don't block in accept. Instead
12494 register an event loop source on the listen socket file
12495 descriptor. Refactor bits into ...
12496 (listen_desc): ... this new global.
12497 (gdb_connected): ... this new function.
12498 (enable_async_notification): ... this new function.
12499 (handle_accept_event): ... this new function.
12500 (remote_close): Clear remote_desc.
12502 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12504 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12506 (mourn_inferior): Define.
12507 (target_process_qsupported): Avoid the dangling else problem.
12508 (thread_stopped): Define.
12509 (pause_all): Define.
12510 (target_waitstatus_to_string): Declare.
12511 * target.c (target_waitstatus_to_string): New.
12513 * tracepoint.c (tracing): Make extern.
12514 (disconnected_tracing): New.
12515 (stop_tracing): Make extern. Handle tracing stops due to GDB
12517 (cmd_qtdisconnected): New.
12518 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12519 (handle_tracepoint_general_set): Handle QTDisconnected.
12521 * event-loop.c (event_handler_func): Change return type to int.
12522 (process_event): Bail out if the event handler wants the event
12524 (handle_file_event): Ditto.
12525 (start_event_loop): Bail out if the event handler wants the event
12528 * nto-low.c (nto_target_ops): Adjust.
12529 * spu-low.c (spu_wait): Don't remove the process here.
12530 (spu_target_ops): Adjust.
12531 * win32-low.c (win32_wait): Don't remove the process here.
12532 (win32_target_ops): Adjust.
12534 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12536 * regcache.c (realloc_register_cache): Invalidate inferior's
12537 regcache before recreating it.
12539 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12541 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12543 2010-04-09 Stan Shebs <stan@codesourcery.com>
12544 Pedro Alves <pedro@codesourcery.com>
12546 * server.h (LONGEST): New.
12547 (struct thread_info) <while_stepping>: New field.
12548 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12550 (initialize_tracepoint, handle_tracepoint_general_set)
12551 (handle_tracepoint_query, tracepoint_finished_step)
12552 (tracepoint_was_hit, release_while_stepping_state_list):
12553 (current_traceframe): Declare.
12554 * server.c (handle_general_set): Handle tracepoint packets.
12555 (read_memory): New.
12556 (write_memory): New.
12557 (handle_search_memory_1): Use read_memory.
12558 (handle_query): Report support for conditional tracepoints, trace
12559 state variables, and tracepoint sources. Handle tracepoint
12561 (main): Initialize the tracepoints module.
12562 (process_serial_event): Handle traceframe reads/writes.
12564 * linux-low.c (handle_tracepoints): New.
12565 (linux_wait_1): Call it.
12566 (linux_resume_one_lwp): Handle while-stepping.
12567 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12568 (linux_target_ops): Install them.
12569 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12571 * linux-x86-low.c (x86_supports_tracepoints): New.
12572 (the_low_target). Install it.
12574 * mem-break.h (delete_breakpoint): Declare.
12575 * mem-break.c (delete_breakpoint): Make external.
12577 * target.h (struct target_ops): Add `supports_tracepoints',
12578 `read_pc', and `write_pc' fields.
12579 (target_supports_tracepoints): Define.
12580 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12583 * regcache.h (struct regcache) <registers_owned>: New field.
12584 (init_register_cache, regcache_cpy): Declare.
12585 (regcache_read_pc, regcache_write_pc): Declare.
12586 (register_cache_size): Declare.
12587 (supply_regblock): Declare.
12588 * regcache.c (init_register_cache): New.
12589 (new_register_cache): Use it.
12590 (regcache_cpy): New.
12591 (register_cache_size): New.
12592 (supply_regblock): New.
12593 (regcache_read_pc, regcache_write_pc): New.
12595 * tracepoint.c: New.
12597 * Makefile.in (OBS): Add tracepoint.o.
12598 (tracepoint.o): New rule.
12600 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12602 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12604 (i386-mmx.c): Likewise.
12605 (i386-mmx-linux.o): Likewise.
12606 (i386-mmx-linux.c): Likewise.
12608 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12609 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12610 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12611 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12613 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12614 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12615 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12617 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12619 * Makefile.in (clean): Updated.
12621 (i386-avx.c): Likewise.
12622 (i386-avx-linux.o): Likewise.
12623 (i386-avx-linux.c): Likewise.
12624 (amd64-avx.o): Likewise.
12625 (amd64-avx.c): Likewise.
12626 (amd64-avx-linux.o): Likewise.
12627 (amd64-avx-linux.c): Likewise.
12629 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12630 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12631 (srv_amd64_regobj): Add amd64-avx.o.
12632 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12633 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12634 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12635 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12636 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12637 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12638 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12640 * i387-fp.c: Include "i386-xstate.h".
12642 (i387_cache_to_xsave): Likewise.
12643 (i387_xsave_to_cache): Likewise.
12644 (x86_xcr0): Likewise.
12646 * i387-fp.h (i387_cache_to_xsave): Likewise.
12647 (i387_xsave_to_cache): Likewise.
12648 (x86_xcr0): Likewise.
12650 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12651 * linux-crisv32-low.c (target_regsets): Likewise.
12652 * linux-m68k-low.c (target_regsets): Likewise.
12653 * linux-mips-low.c (target_regsets): Likewise.
12654 * linux-ppc-low.c (target_regsets): Likewise.
12655 * linux-s390-low.c (target_regsets): Likewise.
12656 * linux-sh-low.c (target_regsets): Likewise.
12657 * linux-sparc-low.c (target_regsets): Likewise.
12658 * linux-xtensa-low.c (target_regsets): Likewise.
12660 * linux-low.c: Include <sys/uio.h>.
12661 (regsets_fetch_inferior_registers): Support nt_type.
12662 (regsets_store_inferior_registers): Likewise.
12663 (linux_process_qsupported): New.
12664 (linux_target_ops): Add linux_process_qsupported.
12666 * linux-low.h (regset_info): Add nt_type.
12667 (linux_target_ops): Add process_qsupported.
12669 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12671 (init_registers_i386_avx_linux): New.
12672 (init_registers_amd64_avx_linux): Likewise.
12673 (xmltarget_i386_linux_no_xml): Likewise.
12674 (xmltarget_amd64_linux_no_xml): Likewise.
12675 (PTRACE_GETREGSET): Likewise.
12676 (PTRACE_SETREGSET): Likewise.
12677 (x86_fill_xstateregset): Likewise.
12678 (x86_store_xstateregset): Likewise.
12679 (use_xml): Likewise.
12680 (x86_linux_update_xmltarget): Likewise.
12681 (x86_linux_process_qsupported): Likewise.
12682 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12683 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12684 init_registers_i386_linux here. Call
12685 x86_linux_update_xmltarget.
12686 (the_low_target): Add x86_linux_process_qsupported.
12688 * server.c (handle_query): Call target_process_qsupported.
12690 * target.h (target_ops): Add process_qsupported.
12691 (target_process_qsupported): New.
12693 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12695 * inferiors.c (add_thread): Set last_status kind to
12696 TARGET_WAITKIND_IGNORE.
12697 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12698 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12699 (linux_wait_1): Move `thread' local definition to block that uses
12700 it. Don't NULL initialize `event_child'.
12701 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12702 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12703 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12705 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12707 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12708 an extended waitstatus, or by a watchpoint.
12709 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12710 thread was stepping or has been stopped by a watchpoint.
12712 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12714 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12715 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12716 of another, then delete the previous, and validate all
12718 (validate_inserted_breakpoint): New.
12719 (delete_disabled_breakpoints): New.
12720 (validate_breakpoints): New.
12721 (check_mem_read): Validate breakpoints before trusting their
12722 shadow. Delete disabled breakpoints.
12723 (check_mem_write): Validate breakpoints before trusting they
12724 should be inserted. Delete disabled breakpoints.
12725 * mem-break.h (validate_breakpoints):
12726 * server.c (handle_query): Validate breakpoints when we see a
12729 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12731 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12732 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12733 if we could tell there's a GDB breakpoint at stop_pc.
12734 (need_step_over_p): Don't do a step over if we find a GDB
12735 breakpoint at the resume PC.
12737 * mem-break.c (struct raw_breakpoint): New.
12738 (enum bkpt_type): New type `gdb_breakpoint'.
12739 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12740 fields. New field `raw'.
12741 (find_raw_breakpoint_at): New.
12742 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12743 breakpoint instead.
12744 (set_breakpoint_at): Adjust.
12745 (delete_raw_breakpoint): New.
12746 (release_breakpoint): New.
12747 (delete_breakpoint): Rename to...
12748 (delete_breakpoint_1): ... this. Add proc parameter. Use
12749 release_breakpoint. Return ENOENT.
12750 (delete_breakpoint): Reimplement.
12751 (find_breakpoint_at): Delete.
12752 (find_gdb_breakpoint_at): New.
12753 (delete_breakpoint_at): Delete.
12754 (set_gdb_breakpoint_at): New.
12755 (delete_gdb_breakpoint_at): New.
12756 (gdb_breakpoint_here): New.
12757 (set_reinsert_breakpoint): Use release_breakpoint.
12758 (uninsert_breakpoint): Rename to ...
12759 (uninsert_raw_breakpoint): ... this.
12760 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12761 (reinsert_raw_breakpoint): Change parameter type to
12763 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12765 (check_breakpoints): Adjust. Use release_breakpoint.
12766 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12767 (breakpoint_inserted_here): Ditto.
12768 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12769 Don't trust the breakpoint's shadow if it is not inserted.
12770 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12771 (delete_all_breakpoints): Adjust.
12772 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12773 use delete_breakpoint_1.
12775 * mem-break.h (breakpoints_supported): Delete declaration.
12776 (set_gdb_breakpoint_at): Declare.
12777 (gdb_breakpoint_here): Declare.
12778 (delete_breakpoint_at): Delete.
12779 (delete_gdb_breakpoint_at): Declare.
12781 * server.h (struct raw_breakpoint): Forward declare.
12782 (struct process_info): New field `raw_breakpoints'.
12784 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12787 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12789 * linux-low.c (status_pending_p_callback): Fix comment.
12790 (linux_wait_for_event_1): Move most of the internal breakpoint
12791 handling from here...
12792 (linux_wait_1): ... to here.
12793 (count_events_callback): New.
12794 (select_singlestep_lwp_callback): New.
12795 (select_event_lwp_callback): New.
12796 (cancel_breakpoints_callback): New.
12797 (select_event_lwp): New.
12798 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12799 priority to all LWPs that have had events that should be reported
12800 to the client. Cancel breakpoints when about to reporting the
12801 event to the client, not while stopping lwps. No longer cancel
12802 finished single-steps here.
12803 (cancel_finished_single_step): Delete.
12804 (cancel_finished_single_steps): Delete.
12806 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12808 * mem-break.c (enum bkpt_type): New.
12809 (struct breakpoint): New field `type'.
12810 (set_breakpoint_at): Change return type to struct breakpoint
12811 pointer. Set type to `other_breakpoint' by default.
12812 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12813 in the breakpoint list.
12814 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12815 (reinsert_breakpoint): Rename to ...
12816 (reinsert_raw_breakpoint): ... this.
12817 (reinsert_breakpoints_at): Adjust.
12818 * mem-break.h (struct breakpoint): Declare.
12819 (set_breakpoint_at): Change return type to struct breakpoint
12822 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12824 * server.c (handle_query): Assign, not compare.
12826 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12828 Teach linux gdbserver to step-over-breakpoints.
12830 * linux-low.c (can_hardware_single_step): New.
12831 (supports_breakpoints): New.
12832 (handle_extended_wait): If stopping threads, read the stop pc of
12833 the new cloned LWP.
12835 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12836 low target doesn't support retrieving the PC.
12837 (add_lwp): Set last_resume_kind to resume_continue.
12838 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12839 (linux_attach): Don't clear stop_expected. Set the lwp's
12840 last_resume_kind to resume_stop.
12841 (linux_detach_one_lwp): Don't check for removed breakpoints.
12842 (check_removed_breakpoint): Delete.
12843 (status_pending_p): Rename to ...
12844 (status_pending_p_callback): ... this. Don't check for removed
12845 breakpoints. Don't consider threads that are stopped from GDB's
12847 (linux_wait_for_lwp): Always read the stop_pc here.
12848 (cancel_breakpoint): New.
12849 (step_over_bkpt): New global.
12850 (linux_wait_for_event_1): Implement stepping over breakpoints.
12851 (gdb_wants_lwp_stopped): New.
12852 (gdb_wants_all_stopped): New.
12853 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12854 single-step traps here. Store the thread's last reported target
12856 (send_sigstop): Don't clear stop_expected. Always set it,
12858 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12859 (cancel_finished_single_step): New.
12860 (cancel_finished_single_steps): New.
12861 (wait_for_sigstop): Don't cancel finished single-step traps here.
12862 (linux_resume_one_lwp): Don't check for removed breakpoints.
12863 Don't set `step' on non-hardware step archs.
12864 (linux_set_resume_request): Ignore resume_stop requests if already
12865 stopping or stopped. Set the lwp's last_resume_kind.
12866 (resume_status_pending_p): Don't check for removed breakpoints.
12867 (need_step_over_p): New.
12868 (start_step_over): New.
12869 (finish_step_over): New.
12870 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12871 requests. Clear the thread's last reported target waitstatus.
12872 Don't use the `suspended' flag. Don't consider pending breakpoints.
12873 (linux_resume): Start a step-over if necessary.
12874 (proceed_one_lwp): New.
12875 (proceed_all_lwps): New.
12876 (unstop_all_lwps): New.
12877 * linux-low.h (struct lwp_info): Rewrite comment for the
12878 `suspended' flag. Add the `stop_pc' field. Delete the
12879 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12880 Add `'last_resume_kind' and `need_step_over' fields.
12881 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12882 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12883 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12884 (set_raw_breakpoint_at): New.
12885 (set_breakpoint_at): Rewrite to use it.
12886 (reinsert_breakpoint_handler): Delete.
12887 (set_reinsert_breakpoint): New.
12888 (reinsert_breakpoint_by_bp): Delete.
12889 (delete_reinsert_breakpoints): New.
12890 (uninsert_breakpoint): Rewrite.
12891 (uninsert_breakpoints_at): New.
12892 (reinsert_breakpoint): Rewrite.
12893 (reinsert_breakpoints_at): New.
12894 (check_breakpoints): Rewrite.
12895 (breakpoint_here): New.
12896 (breakpoint_inserted_here): New.
12897 (check_mem_read): Adjust.
12898 * mem-break.h (breakpoints_supported, breakpoint_here)
12899 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12900 (reinsert_breakpoint_by_bp): Delete declaration.
12901 (delete_reinsert_breakpoints): Declare.
12902 (reinsert_breakpoint): Delete declaration.
12903 (reinsert_breakpoints_at): Declare.
12904 (uninsert_breakpoint): Delete declaration.
12905 (uninsert_breakpoints_at): Declare.
12906 (check_breakpoints): Adjust prototype.
12907 * server.h: Adjust include order.
12908 (struct thread_info): Declare here. Add a `last_status' field.
12910 2010-03-23 Michael Snyder <msnyder@vmware.com>
12912 * server.c (crc32): New function.
12913 (handle_query): Add handling for 'qCRC:' request.
12915 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12917 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12918 lwp had been stopped by a watchpoint.
12920 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12922 * server.h (internal_error): Declare.
12923 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12924 * utils.c (internal_error): New function.
12926 2010-03-15 Andreas Schwab <schwab@redhat.com>
12928 * configure.srv: Fix typo setting srv_regobj.
12930 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12932 * linux-low.c (fetch_register): Avoid passing a non string literal
12934 (usr_store_inferior_registers): Ditto.
12936 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12938 * linux-low.c (linux_write_memory): Bail out early if peeking
12941 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12943 * linux-low.h (struct lwp_info): New fields
12944 `stopped_by_watchpoint' and `stopped_data_address'.
12945 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12946 here, and cache them in the lwp object.
12947 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12949 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12951 (linux_stopped_by_watchpoint): Rewrite.
12952 (linux_stopped_data_address): Rewrite.
12954 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12956 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12957 switching the current inferior, not before.
12959 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12961 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12962 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12963 i386-linux.c and amd64-linux.c.
12964 (reg-i386.o): Removed.
12965 (reg-i386.c): Likewise.
12966 (reg-i386-linux.o): Likewise.
12967 (reg-i386-linux.c): Likewise.
12968 (reg-x86-64.o): Likewise.
12969 (reg-x86-64.c): Likewise.
12970 (reg-x86-64-linux.o): Likewise.
12971 (reg-x86-64-linux.c): Likewise.
12973 (i386.c): Likewise.
12974 (i386-linux.o): Likewise.
12975 (i386-linux.c): Likewise.
12976 (amd64.o): Likewise.
12977 (amd64.c): Likewise.
12978 (amd64-linux.o): Likewise.
12979 (amd64-linux.c): Likewise.
12981 * configure.srv (srv_i386_regobj): New.
12982 (srv_i386_linux_regobj): Likewise.
12983 (srv_amd64_regobj): Likewise.
12984 (srv_amd64_linux_regobj): Likewise.
12985 (srv_i386_32bit_xmlfiles): Likewise.
12986 (srv_i386_64bit_xmlfiles): Likewise.
12987 (srv_i386_xmlfiles): Likewise.
12988 (srv_amd64_xmlfiles): Likewise.
12989 (srv_i386_linux_xmlfiles): Likewise.
12990 (srv_amd64_linux_xmlfiles): Likewise.
12991 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12992 srv_xmlfiles to $srv_i386_xmlfiles.
12993 (i[34567]86-*-mingw32ce*): Likewise.
12994 (i[34567]86-*-mingw*): Likewise.
12995 (i[34567]86-*-nto*): Likewise.
12996 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12997 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12998 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12999 (x86_64-*-linux*): Likewise.
13001 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13002 (init_registers_amd64_linux): New.
13003 (x86_arch_setup): Replace init_registers_x86_64_linux with
13004 init_registers_amd64_linux.
13006 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13008 * configure.ac: Check for libdl. If it is not available link against
13009 static libthread_db.
13010 * configure: Regenerate.
13012 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13016 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13017 handing a read watchpoint.
13018 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13020 2010-02-12 Doug Evans <dje@google.com>
13022 * linux-low.c (linux_supports_tracefork_flag): Document.
13023 (linux_look_up_symbols): Add comment.
13025 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13027 * regcache.c (supply_register): Clear regcache if buf is NULL.
13029 2010-02-02 Nicolas Roche <roche@sourceware.org>
13030 Joel Brobecker <brobecker@adacore.com>
13032 * inferiors.c (find_inferior): Add function documentation.
13033 (unloaded_dll): Handle the case where the unloaded dll has not
13034 been previously registered in the dll list.
13036 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13038 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13039 (thumb2_breakpoint): New.
13040 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13042 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13044 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13045 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13048 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13050 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13052 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13054 * linux-s390-low.c (s390_collect_ptrace_register)
13055 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13057 2010-01-21 Doug Evans <dje@google.com>
13059 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13060 (PTRACE_ARG4_TYPE): New macro.
13061 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13062 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13063 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13064 (usr_store_inferior_registers): Ditto.
13065 (linux_read_memory, linux_write_memory): Ditto.
13066 (linux_test_for_tracefork): Ditto.
13068 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13069 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13071 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13073 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13076 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13078 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13079 prototype to take a regcache. Adjust.
13081 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13083 * regcache.h (struct thread_info): Forward declare.
13084 (struct regcache): New.
13085 (new_register_cache): Adjust prototype.
13086 (get_thread_regcache): Declare.
13087 (free_register_cache): Adjust prototype.
13088 (registers_to_string, registers_from_string): Ditto.
13089 (supply_register, supply_register_by_name, collect_register)
13090 (collect_register_as_string, collect_register_by_name): Ditto.
13091 * regcache.c (struct inferior_regcache_data): Delete.
13092 (get_regcache): Rename to ...
13093 (get_thread_regcache): ... this. Adjust. Switch inferior before
13094 fetching registers.
13095 (regcache_invalidate_one): Adjust.
13096 (regcache_invalidate): Fix prototype.
13097 (new_register_cache): Return the new register cache.
13098 (free_register_cache): Change prototype.
13099 (realloc_register_cache): Adjust.
13100 (registers_to_string): Change prototype to take a regcache. Adjust.
13101 (registers_from_string): Ditto.
13102 (register_data): Ditto.
13103 (supply_register): Ditto.
13104 (supply_register_by_name): Ditto.
13105 (collect_register): Ditto.
13106 (collect_register_as_string): Ditto.
13107 (collect_register_by_name): Ditto.
13108 * server.c (process_serial_event): Adjust.
13109 * linux-low.h (regset_fill_func, regset_store_func): Change
13111 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13113 * linux-low.c (get_stop_pc): Adjust.
13114 (check_removed_breakpoint): Adjust.
13115 (linux_wait_for_event): Adjust.
13116 (linux_resume_one_lwp): Adjust.
13117 (fetch_register): Add regcache parameter. Adjust.
13118 (usr_store_inferior_registers): Ditto.
13119 (regsets_fetch_inferior_registers): Ditto.
13120 (regsets_store_inferior_registers): Ditto.
13121 (linux_fetch_registers, linux_store_registers): Ditto.
13122 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13124 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13126 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13127 prototype to take a regcache.
13128 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13129 * remote-utils.c (convert_ascii_to_int, outreg)
13130 (prepare_resume_reply): Change prototype to take a regcache.
13132 * target.h (struct target_ops) <fetch_registers, store_registers>:
13133 Change prototype to take a regcache.
13134 (fetch_inferior_registers, store_inferior_registers): Change
13135 prototype to take a regcache. Adjust.
13136 * proc-service.c (ps_lgetregs): Adjust.
13137 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13138 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13139 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13140 take a regcache. Adjust.
13141 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13142 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13143 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13144 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13145 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13146 (cris_cannot_fetch_register):
13147 (cris_breakpoint_at): Change prototype to take a regcache.
13149 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13150 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13151 to take a regcache. Adjust.
13152 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13154 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13155 take a regcache. Adjust.
13156 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13157 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13158 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13159 * linux-mips-low.c (mips_get_pc):
13160 (mips_set_pc): Change prototype to take a regcache. Adjust.
13161 (mips_reinsert_addr): Adjust.
13162 (mips_collect_register): Change prototype to take a regcache.
13164 (mips_supply_register):
13165 (mips_collect_register_32bit, mips_supply_register_32bit)
13166 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13167 (mips_store_fpregset): Ditto.
13168 * linux-ppc-low.c (ppc_supply_ptrace_register)
13169 (ppc_supply_ptrace_register): Ditto.
13170 (parse_spufs_run): Adjust.
13171 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13172 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13173 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13174 take a regcache. Adjust.
13175 * linux-s390-low.c (s390_collect_ptrace_register)
13176 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13177 (s390_set_pc): Change prototype to take a regcache. Adjust.
13178 (s390_arch_setup): Adjust.
13179 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13180 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13181 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13182 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13183 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13185 (sparc_breakpoint_at): Adjust.
13186 * linux-xtensa-low.c (xtensa_fill_gregset):
13187 (xtensa_store_gregset):
13188 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13189 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13190 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13191 prototype to take a regcache. Adjust.
13192 * win32-arm-low.c (arm_fetch_inferior_register)
13193 (arm_store_inferior_register): Change prototype to take a
13195 * win32-i386-low.c (i386_fetch_inferior_register)
13196 (i386_store_inferior_register): Change prototype to take a
13198 * win32-low.c (child_fetch_inferior_registers)
13199 (child_store_inferior_registers): Change prototype to take a
13201 (win32_wait): Adjust.
13202 (win32_fetch_inferior_registers): Change prototype to take a
13204 (win32_store_inferior_registers): Adjust.
13205 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13206 store_inferior_register>: Change prototype to take a regcache.
13208 2010-01-20 Doug Evans <dje@google.com>
13210 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13212 (linux_wait_for_event1, linux_init_signals): Ditto.
13213 (W_STOPCODE): Provide definition if missing.
13215 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13217 * linux-low.c (linux_core_of_thread): New.
13218 (compare_ints, show_process, list_threads): New.
13219 (linux_qxfer_osdata): Report threads and cores.
13220 (linux_target_op): Register linux_core_of_thread.
13221 * remote-utils.c (prepare_resume_reply): Report the core.
13222 (buffer_xml_printf): Support %d specifier.
13223 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13225 (handle_query): Handle qXfer:threads. Announce availability
13227 * target.h (struct target_ops): New field core_of_thread.
13229 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13231 * Makefile.in (clean): Remove new generated files.
13232 (reg-s390.o, reg-s390.c): Remove rules.
13233 (reg-s390x.o, reg-s390x.c): Likewise.
13234 (s390-linux32.o, s390-linux32.c): Add rules.
13235 (s390-linux64.o, s390-linux64.c): Likewise.
13236 (s390x-linux64.o, s390x-linux64.c): Likewise.
13237 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13238 * linux-s390-low.c: Include <elf.h>.
13239 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13240 (init_registers_s390): Remove prototype.
13241 (init_registers_s390x): Likewise.
13242 (init_registers_s390_linux32): Add prototype.
13243 (init_registers_s390_linux64): Likewise.
13244 (init_registers_s390x_linux64): Likewise.
13245 (s390_num_regs_3264): New define.
13246 (s390_regmap_3264): New global variable.
13247 (s390_cannot_fetch_register): Remove obsolete check.
13248 (s390_cannot_store_register): Likewise.
13249 (s390_collect_ptrace_register): Handle upper/lower register halves.
13250 (s390_supply_ptrace_register): Likewise.
13251 (s390_fill_gregset): Update to register number changes.
13252 (s390_get_hwcap): New routine.
13253 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13254 Install appropriate regmap and register set.
13256 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13258 * server.c (gdbserver_version): Update copyright year to 2010.
13259 * gdbreplay.c (gdbreplay_version): Likewise.
13261 2009-12-28 Doug Evans <dje@google.com>
13263 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13264 elf/external.h. Include <elf.h> instead but only if necessary.
13266 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13268 * linux-low.c (linux_remove_process): Remove `detaching'
13269 parameter. Don't release/detach from thread_db here.
13270 (linux_kill): Release/detach from thread_db here, ...
13271 (linux_detach): ... and here, before actually detaching.
13272 (linux_wait_1): ... and here, when a process exits.
13273 * thread-db.c (any_thread_of): New.
13274 (thread_db_free): Switch the current inferior to a thread of the
13277 2009-12-21 Doug Evans <dje@google.com>
13279 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13281 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13282 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13283 warning ifndef __NR_tkill. Move setting of errno there too.
13284 Delete unnecessary resetting of errno after syscall.
13285 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13287 * configure.ac: Check for dladdr.
13288 * config.in: Regenerate.
13289 * configure: Regenerate.
13290 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13291 (try_thread_db_load): Update.
13293 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13295 2009-12-18 Doug Evans <dje@google.com>
13297 * event-loop.c: Include unistd.h if it exists.
13299 * linux-low.c (my_waitpid): Move definition away from being in
13300 between linux_tracefork_child/linux_test_for_tracefork.
13302 * gdb_proc_service.h (psaddr_t): Fix type.
13303 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13304 signature to match glibc.
13306 2009-12-16 Doug Evans <dje@google.com>
13308 * linux-low.c (linux_read_memory): Fix argument to read.
13310 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13312 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13313 events, don't leave current_inferior pointing at null.
13315 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13317 * win32-low.c (LOG): Delete.
13318 (OUTMSG): Output to stderr.
13319 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13320 on compile time LOG macro.
13321 (win32_wait): Fix debug output.
13323 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13325 * win32-low.c (win32_add_one_solib): If the dll name is
13326 "ntdll.dll", prepend the system directory to the dll path.
13328 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13330 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13332 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13333 Vladimir Prus <vladimir@codesourcery.com>
13335 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13336 * configure.ac: Check for __mcoldfire__ and set
13337 gdb_cv_m68k_is_coldfire.
13338 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13339 reg-cf.o and reg-m68k.o.
13340 * configure: Regenerated.
13342 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13344 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13345 Pass it to thread_db_free.
13346 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13347 proper `detaching' argument to linux_remove_process.
13348 * linux-low.h (thread_db_free): Add `detaching' parameter.
13349 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13351 (thread_db_free): Add `detaching' parameter. Only
13352 call td_ta_clear_event if detaching from process.
13354 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13356 * thread-db.c (thread_db_free): Fix typo.
13358 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13361 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13363 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13365 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13366 with an i686 compiler.
13367 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13369 * configure: Rebuilt.
13371 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13375 * server.c (handle_search_memory_1): Correct read_addr initialization
13376 in loop for searching subsequent chunks.
13378 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13380 * configure.ac: New --with-libthread-db option.
13381 * thread-db.c: Allow direct dependence on libthread_db.
13382 (thread_db_free): Adjust.
13383 * config.in: Regenerate.
13384 * configure: Likewise.
13386 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13389 * thread-db.c (attach_thread): New function.
13390 (maybe_attach_thread): Return success/failure.
13391 (find_new_threads_callback): Adjust.
13392 (thread_db_find_new_threads): Loop until no new threads.
13394 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13396 * proc-service.c (ps_lgetregs): Formatting.
13398 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13400 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13401 * configure.ac: Adjust.
13402 * linux-low.h (struct process_info_private): Move members to struct
13404 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13405 * linux-low.c (linux_remove_process): Adjust.
13406 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13407 * server.c (handle_query): Move code ...
13408 (handle_monitor_command): ... here. New function.
13409 * target.h (struct target_ops): New member.
13410 * thread-db.c (struct thread_db): New.
13411 (libthread_db_search_path): New variable.
13412 (thread_db_create_event, thread_db_enable_reporting)
13413 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13414 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13415 (try_thread_db_load_1, dladdr_to_soname): New functions.
13416 (try_thread_db_load, thread_db_load_search): New functions.
13417 (thread_db_init): Search for libthread_db.
13418 (thread_db_free): New function.
13419 (thread_db_handle_monitor_command): Likewise.
13420 * config.in: Regenerate.
13421 * configure: Regenerate.
13423 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13425 * spu-low.c (spu_kill): Wait for inferior to terminate.
13426 Call clear_inferiors.
13427 (spu_detach): Call clear_inferiors.
13429 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13431 * aclocal.m4: Regenerate.
13432 * config.in: Likewise.
13433 * configure: Likewise.
13435 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13437 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13438 (parse_spufs_run): New function.
13439 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13440 (ppc_breakpoint_at): Handle SPU breakpoints.
13442 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13444 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13445 (SPUFS_MAGIC): Define.
13446 (spu_enumerate_spu_ids): New function.
13447 (linux_qxfer_spu): New function.
13448 (linux_target_ops): Install linux_qxfer_spu.
13450 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13452 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13453 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13454 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13455 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13456 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13457 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13458 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13459 (init_registers_powerpc_cell32l): Add prototype.
13460 (init_registers_powerpc_cell64l): Likewise.
13461 (ppc_arch_setup): Detect Cell/B.E. architecture.
13463 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13465 * Makefile.in (datarootdir): New variable.
13467 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13469 * linux-low.c (linux_write_memory): Update debugging output.
13470 * Makefile.in (clean): Add new descriptions.
13471 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13472 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13473 * configure.srv: Add new files for arm*-*-linux*.
13474 * linux-arm-low.c: Add new declarations.
13475 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13476 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13477 (HWCAP_VFPv3D16): New.
13478 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13479 instead of __IWMMXT__.
13480 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13481 (arm_arch_setup): New.
13482 (target_regsets): Remove #ifdef. Add VFP regset.
13483 (the_low_target): Use arm_arch_setup.
13485 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13487 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13488 the main thread again.
13490 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13492 Adding Neutrino gdbserver.
13493 * configure: Regenerated.
13494 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13495 * configure.srv (i[34567]86-*-nto*): New target.
13496 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13497 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13498 (nto_comctrl) [__QNX__]: New function.
13499 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13501 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13503 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13506 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13507 Pedro Alves <pedro@codesourcery.com>
13509 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13510 don't support CONTEXT_EXTENDED_REGISTERS.
13511 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13512 (the_low_target): Install them.
13513 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13514 failing with ERROR_PIPE_NOT_CONNECTED.
13516 2009-06-30 Doug Evans <dje@google.com>
13517 Pierre Muller <muller@ics.u-strasbg.fr>
13519 Add h/w watchpoint support to x86-linux, win32-i386.
13520 * Makefile.in (SFILES): Add i386-low.c
13521 (i386_low_h): Define.
13522 (i386-low.o): Add dependencies.
13523 (linux-x86-low.o): Add i386-low.h dependency.
13524 (win32-i386-low.o): Ditto.
13525 * i386-low.c: New file.
13526 * i386-low.h: New file.
13527 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13528 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13529 * linux-low.c (linux_add_process): Initialize arch_private.
13530 (linux_remove_process): Free arch_private.
13531 (add_lwp): Initialize arch_private.
13532 (delete_lwp): Free arch_private.
13533 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13535 * linux-low.h (process_info_private): New member arch_private.
13536 (lwp_info): New member arch_private.
13537 (linux_target_ops): New members new_process, new_thread,
13539 (ptid_of): New macro.
13540 * linux-x86-low.c: Include stddef.h, i386-low.h.
13541 (arch_process_info): New struct.
13542 (arch_lwp_info): New struct.
13543 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13544 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13545 (i386_dr_low_get_status): New function.
13546 (x86_insert_point, x86_remove_point): New functions.
13547 (x86_stopped_by_watchpoint): New function.
13548 (x86_stopped_data_address): New function.
13549 (x86_linux_new_process, x86_linux_new_thread): New functions.
13550 (x86_linux_prepare_to_resume): New function.
13551 (the_low_target): Add entries for insert_point, remove_point,
13552 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13554 * server.c (debug_hw_points): New global.
13555 (monitor_show_help): Document set debug-hw-points.
13556 (handle_query): Process "set debug-hw-points".
13557 * server.h (debug_hw_points): Declare.
13558 (paddress): Declare.
13559 * utils.c (NUMCELLS, CELLSIZE): New macros.
13560 (get_sell, xsnprintf, paddress): New functions.
13561 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13562 remove_point, stopped_by_watchpoint, stopped_data_address.
13563 * win32-i386-low.c: Include i386-low.h.
13564 (debug_reg_state): Replaces dr.
13565 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13566 (i386_dr_low_get_status): New function.
13567 (i386_insert_point, i386_remove_point): New functions.
13568 (i386_stopped_by_watchpoint): New function.
13569 (i386_stopped_data_address): New function.
13570 (i386_initial_stuff): Update.
13571 (get_thread_context,set_thread_context,i386_thread_added): Update.
13572 (the_low_target): Add entries for insert_point,
13573 remove_point, stopped_by_watchpoint, stopped_data_address.
13574 * win32-low.c (win32_insert_watchpoint): New function.
13575 (win32_remove_watchpoint): New function.
13576 (win32_stopped_by_watchpoint): New function.
13577 (win32_stopped_data_address): New function.
13578 (win32_target_ops): Add entries for insert_watchpoint,
13579 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13580 * win32-low.h (win32_target_ops): New members insert_point,
13581 remove_point, stopped_by_watchpoint, stopped_data_address.
13583 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13585 * server.c (process_serial_event): Re-return unsupported, not
13586 error, if the type isn't recognized. Re-allow supporting only
13587 insert or remove packets. Also call require_running for
13588 breakpoints. Add missing break statement to default case. Tidy.
13589 * target.h (struct target_ops): Rename insert_watchpoint to
13590 insert_point, and remove_watchpoint to remove_point.
13592 * linux-low.h (struct linux_target_ops): Likewise.
13593 * linux-low.c (linux_insert_watchpoint): Rename to ...
13594 (linux_insert_point): ... this. Adjust.
13595 (linux_remove_watchpoint): Rename to ...
13596 (linux_remove_point): ... this. Adjust.
13597 (linux_target_ops): Adjust.
13598 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13599 (cris_insert_point): ... this.
13600 (cris_remove_watchpoint): Rename to ...
13601 (cris_remove_point): ... this.
13602 (the_low_target): Adjust.
13604 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13606 * server.c (handle_v_kill): Pass signal_pid to
13607 kill_inferior if multi_process is zero.
13609 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13611 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13612 * target.h (target_ops): Comment for *_watchpoint to make it clear
13613 the functions can get types '0' and '1'.
13615 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13617 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13618 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13619 * regcache.c (get_regcache): Likewise.
13620 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13621 * win32-low.c (child_fetch_inferior_registers): Remove check for
13624 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13625 Pedro Alves <pedro@codesourcery.com>
13627 * target.h (struct target_ops) <supports_multi_process>: New
13629 (target_supports_multi_process): New.
13630 * server.c (handle_query): Even if GDB reports support, only
13631 enable multi-process if the target also supports it. Report
13632 multi-process support only if the target backend supports it.
13633 * linux-low.c (linux_supports_multi_process): New function.
13634 (linux_target_ops): Install it as target_supports_multi_process
13637 2009-05-24 Doug Evans <dje@google.com>
13639 Global renaming of find_thread_pid to find_thread_ptid.
13640 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13641 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13642 All callers updated.
13644 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13645 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13648 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13649 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13650 (linux_resume_one_lwp): Ditto.
13652 2009-05-23 Doug Evans <dje@google.com>
13654 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13655 from struct inferior_list_entry * to struct lwp_info *.
13656 All callers updated.
13658 2009-05-13 Doug Evans <dje@google.com>
13660 * linux-x86-low.c: Don't include assert.h.
13661 (x86_siginfo_fixup): Use fatal, not assert.
13662 (x86_arch_setup): Fix comment.
13664 2009-05-12 Doug Evans <dje@google.com>
13666 Biarch support for i386/amd64 gdbserver.
13667 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13668 Add linux-x86-low.c.
13669 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13670 (linux-x86-low.o): Add.
13671 * linux-x86-64-low.c: Delete.
13672 * linux-i386-low.c: Delete.
13673 * linux-x86-low.c: New file.
13674 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13676 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13678 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13679 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13680 (linux_child_pid_to_exec_file): New function.
13681 (elf_64_header_p, elf_64_file_p): New functions.
13682 (siginfo_fixup): New function.
13683 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13684 give target a chance to convert layout.
13685 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13686 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13688 2009-05-07 Doug Evans <dje@google.com>
13690 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13691 (regsets_store_inferior_registers): Ditto.
13693 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13697 * linux-low.c (must_set_ptrace_flags): Delete.
13698 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13700 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13701 `lwp->must_set_ptrace_flags' instead.
13702 (linux_wait_for_event_1): Set ptrace options here.
13703 (linux_wait_1): ... not here.
13705 2009-04-30 Doug Evans <dje@google.com>
13707 * inferiors.c (started_inferior_callback): New function.
13708 (attached_inferior_callback): New function.
13709 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13710 * server.c (print_started_pid, print_attached_pid): New functions.
13711 (detach_or_kill_for_exit): New function.
13712 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13713 * server.h (have_started_inferiors_p): Declare.
13714 (have_attached_inferiors_p): Declare.
13716 * inferiors.c (remove_process): Fix memory leak, free process.
13717 * linux-low.c (linux_remove_process): New function.
13718 (linux_kill): Call it instead of remove_process.
13719 (linux_detach, linux_wait_1): Ditto.
13721 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13723 * configure.srv: Add x86 Windows CE target.
13725 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13727 * inferiors.c (get_thread_process): Make global.
13728 * server.h (get_thread_process): Add prototype.
13729 * thread-db.c (find_one_thread): Use get_thread_process
13730 instead of current_process.
13731 (thread_db_get_tls_address): Do not crash if called when
13732 thread layer is not yet initialized.
13734 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13736 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13737 * spu-low.c (current_tid): Rename to ...
13738 (current_ptid): ... this.
13739 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13740 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13741 ptid_get_lwp (current_ptid) instead of current_tid.
13742 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13743 instead of current_tid. Use find_process_pid to verify pid
13744 argument is valid. Pass proper argument to remove_process.
13745 (spu_thread_alive): Compare current_ptid instead of current_tid.
13746 (spu_resume): Likewise.
13748 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13750 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13753 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13755 Implement the multiprocess extensions, and add linux multiprocess
13758 * server.h (ULONGEST): Declare.
13759 (struct ptid, ptid_t): New.
13760 (minus_one_ptid, null_ptid): Declare.
13761 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13762 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13763 (struct inferior_list_entry): Change `id' type from unsigned from
13765 (struct sym_cache, struct breakpoint, struct
13766 process_info_private): Forward declare.
13767 (struct process_info): Declare.
13768 (current_process): Declare.
13769 (all_processes): Declare.
13770 (initialize_inferiors): Declare.
13771 (add_thread): Adjust to use ptid_t.
13772 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13773 (add_process, remove_process, find_thread_pid): Declare.
13774 (find_inferior_id): Adjust to use ptid_t.
13775 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13776 (multi_process): Declare.
13777 (push_event): Adjust to use ptid_t.
13778 (read_ptid, write_ptid): Declare.
13779 (prepare_resume_reply): Adjust to use ptid_t.
13780 (clear_symbol_cache): Declare.
13781 * inferiors.c (all_processes): New.
13782 (null_ptid, minus_one_ptid): New.
13783 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13784 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13785 (add_thread): Change unsigned long to ptid. Remove gdb_id
13787 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13788 (gdb_id_to_thread): Rename to ...
13789 (find_thread_pid): ... this. Change unsigned long to ptid.
13790 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13791 (loaded_dll, pull_pid_from_list): Adjust.
13792 (add_process, remove_process, find_process_pid)
13793 (get_thread_process, current_process, initialize_inferiors): New.
13794 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13795 (struct target_waitstatus) <related_pid>: Ditto.
13796 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13797 return type to int.
13798 (struct target_ops) <join>: Add `pid' argument.
13799 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13800 (struct target_ops) <wait>: Add `ptid' field. Change return type
13802 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13803 (mywait): Add `ptid' argument. Change return type to ptid_t.
13804 (target_pid_to_str): Declare.
13805 * target.c (set_desired_inferior): Adjust to use ptids.
13806 (mywait): Add new `ptid' argument. Adjust.
13807 (target_pid_to_str): New.
13808 * mem-break.h (free_all_breakpoints): Declare.
13809 * mem-break.c (breakpoints): Delelete.
13810 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13811 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13812 to use per-process breakpoint list.
13813 (free_all_breakpoints): New.
13814 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13815 (symbol_cache, all_symbols_looked_up): Delete.
13817 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13819 (prepare_resume_reply): Change ptid argument's type from unsigned
13820 long to ptid_t. Adjust. Implement W;process and X;process.
13821 (free_sym_cache, clear_symbol_cache): New.
13822 (look_up_one_symbol): Adjust to per-process symbol cache. *
13823 * server.c (cont_thread, general_thread, step_thread): Change type
13825 (attached): Delete.
13826 (multi_process): New.
13827 (last_ptid): Change type to ptid_t.
13828 (struct vstop_notif) <ptid>: Change type to ptid_t.
13829 (queue_stop_reply, push_event): Change `ptid' argument's type to
13831 (discard_queued_stop_replies): Add `pid' argument.
13832 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13833 changes. Don't reference the `attached' global.
13834 (attach_inferior): Adjust to mywait interface changes.
13835 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13836 features. Handle and report "multiprocess+". Handle
13838 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13840 (handle_v_kill): New.
13841 (handle_v_stopped): Adjust to use target_pid_to_str.
13842 (handle_v_requests): Allow multiple attaches and runs when
13843 multiprocess extensions are in effect. Handle "vKill".
13844 (myresume): Adjust to use ptids.
13845 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13846 (handle_status): Adjust to discard_queued_stop_replies interface
13848 (first_thread_of, kill_inferior_callback)
13849 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13850 (main): Call initialize_inferiors. Adjust to use ptids, killing
13851 and detaching from all inferiors. Handle multiprocess packet
13853 * linux-low.h: Include gdb_proc_service.h.
13854 (struct process_info_private): New.
13855 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13856 <lwpid_of>: Use ptid_get_lwp.
13857 (get_lwp_thread): Adjust.
13858 (struct lwp_info): Add `dead' member.
13859 (find_lwp_pid): Declare.
13860 * linux-low.c (thread_db_active): Delete.
13861 (new_inferior): Adjust comment.
13862 (inferior_pid): Delete.
13863 (linux_add_process): New.
13864 (handle_extended_wait): Adjust.
13865 (add_lwp): Change unsigned long to ptid.
13866 (linux_create_inferior): Add process to processes table. Adjust
13867 to use ptids. Don't set new_inferior here.
13868 (linux_attach_lwp): Rename to ...
13869 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13870 it. Adjust to use ptids.
13871 (linux_attach_lwp): New.
13872 (linux_attach): Add process to processes table. Don't set
13874 (struct counter): New.
13875 (second_thread_of_pid_p, last_thread_of_process_p): New.
13876 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13877 multiple processes.
13878 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13879 processes. Remove process from process table.
13880 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13881 to multiple processes.
13882 (any_thread_of): New.
13883 (linux_detach): Add `pid' argument, and handle it. Remove process
13884 from processes table.
13885 (linux_join): Add `pid' argument. Handle it.
13886 (linux_thread_alive): Change unsighed long argument to ptid_t.
13887 Consider dead lwps as not being alive.
13888 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13889 threads we're not interested in.
13890 (same_lwp, find_lwp_pid): New.
13891 (linux_wait_for_lwp): Change `pid' argument's type from int to
13893 (linux_wait_for_event): Rename to ...
13894 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13895 from int to ptid_t. Adjust.
13896 (linux_wait_for_event): New.
13897 (linux_wait_1): Add `ptid' argument. Change return type to
13898 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13899 that exit from the process table.
13900 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13902 (mark_lwp_dead): New.
13903 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13904 stopping all threads, mark its main lwp as dead.
13905 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13907 (fetch_register, usr_store_inferior_registers)
13908 (regsets_fetch_inferior_registers)
13909 (regsets_store_inferior_registers, linux_read_memory)
13910 (linux_write_memory): Inline `inferior_pid'.
13911 (linux_look_up_symbols): Adjust to use per-process
13912 `thread_db_active'.
13913 (linux_request_interrupt): Adjust to use ptids.
13914 (linux_read_auxv): Inline `inferior_pid'.
13915 (initialize_low): Don't reference thread_db_active.
13916 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13917 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13918 (ps_getpid): Return the pid of the current inferior.
13919 * thread-db.c (proc_handle, thread_agent): Delete.
13920 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13922 (find_one_thread): Change argument type to ptid_t. Adjust to
13924 (maybe_attach_thread): Adjust to per-process data and ptids.
13925 (thread_db_find_new_threads): Ditto.
13926 (thread_db_init): Ditto.
13927 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13928 processes table. Adjust to use ptids.
13929 (spu_kill, spu_detach): Adjust interface. Remove process from
13931 (spu_join, spu_thread_alive): Adjust interface.
13932 (spu_wait): Adjust interface. Remove process from processes
13933 table. Adjust to use ptids.
13934 * win32-low.c (current_inferior_tid): Delete.
13935 (current_inferior_ptid): New.
13936 (debug_event_ptid): New.
13937 (thread_rec): Take a ptid. Adjust.
13938 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13939 (child_delete_thread): Ditto.
13940 (do_initial_child_stuff): Add `attached' argument. Add process to
13942 (child_fetch_inferior_registers, child_store_inferior_registers):
13944 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13945 (win32_attach): Pass 1 to do_initial_child_stuff.
13946 (win32_kill): Adjust interface. Remove process from processes
13948 (win32_detach): Ditto.
13949 (win32_join): Adjust interface.
13950 (win32_thread_alive): Take a ptid.
13951 (win32_resume): Adjust to use ptids.
13952 (get_child_debug_event): Ditto.
13953 (win32_wait): Adjust interface. Remove exiting process from
13956 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13958 Non-stop mode support.
13960 * server.h (non_stop): Declare.
13961 (gdb_client_data, handler_func): Declare.
13962 (delete_file_handler, add_file_handler, start_event_loop):
13964 (handle_serial_event, handle_target_event, push_event)
13965 (putpkt_notif): Declare.
13966 * target.h (enum resume_kind): New.
13967 (struct thread_resume): Replace `step' field by `kind' field.
13968 (TARGET_WNOHANG): Define.
13969 (struct target_ops) <wait>: Add `options' argument.
13970 <supports_non_stop, async, start_non_stop>: New fields.
13971 (target_supports_non_stop, target_async): New.
13972 (start_non_stop): Declare.
13973 (mywait): Add `options' argument.
13974 * target.c (mywait): Add `options' argument. Print child exit
13975 notifications here.
13976 (start_non_stop): New.
13977 * server.c (non_stop, own_buf, mem_buf): New globals.
13978 (struct vstop_notif): New.
13979 (notif_queue): New global.
13980 (queue_stop_reply, push_event, discard_queued_stop_replies)
13981 (send_next_stop_reply): New.
13982 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13984 (attach_inferior): In non-stop mode, don't wait for the target
13986 (handle_general_set): Handle QNonStop.
13987 (handle_query): When handling qC, return the current general
13988 thread, instead of the first thread of the list.
13989 (handle_query): If the backend supports non-stop mode, include
13990 QNonStop+ in the qSupported query response.
13991 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13993 (handle_v_attach, handle_v_run): Handle non-stop mode.
13994 (handle_v_stopped): New.
13995 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13996 (myresume): Adjust to use resume_kind. Handle non-stop.
13997 (queue_stop_reply_callback): New.
13998 (handle_status): Handle non-stop mode.
13999 (main): Clear non_stop flag on reconnection. Use the event-loop.
14000 Refactor serial protocol handling from here ...
14001 (process_serial_event): ... to this new function. When GDB
14002 selects any thread, select one here. In non-stop mode, wait until
14003 GDB acks all pending events before exiting.
14004 (handle_serial_event, handle_target_event): New.
14005 * remote-utils.c (remote_open): Install remote_desc in the event
14007 (remote_close): Remove remote_desc from the event loop.
14008 (putpkt_binary): Rename to...
14009 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14010 (putpkt_binary): New as wrapper around putpkt_binary_1.
14011 (putpkt_notif): New.
14012 (prepare_resume_reply): In non-stop mode, don't change the
14014 * event-loop.c: New.
14015 * Makefile.in (OBJ): Add event-loop.o.
14016 (event-loop.o): New rule.
14018 * linux-low.h (pid_of): Moved here.
14020 (get_lwp_thread): Use lwpid_of.
14021 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14022 * linux-low.c (pid_of): Delete.
14023 (inferior_pid): Use lwpid_of.
14024 (linux_event_pipe): New.
14025 (target_is_async_p): New.
14027 (handle_extended_wait): Use lwpid_of.
14028 (add_lwp): Don't set lwpid field.
14029 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14030 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14031 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14032 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14033 first. Adjust to linux_wait_for_event interface changes. Use
14035 (linux_detach): Don't delete the main lwp here.
14036 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14037 (status_pending_p): Don't consider explicitly suspended lwps.
14038 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14039 pointer. Add OPTIONS argument. Change return type to int. Use
14040 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14041 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14042 pointer. Add status pointer argument. Return a pid instead of a
14043 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14044 changes. In non-stop mode, don't switch to a random thread.
14045 (linux_wait): Rename to...
14046 (linux_wait_1): ... this. Add target_options argument, and handle
14047 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14048 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14049 clean exit and signal exit code. Don't stop all threads in
14050 non-stop mode. In all-stop mode, only stop all threads when
14051 reporting a stop to GDB. Handle explicit thread stop requests.
14052 (async_file_flush, async_file_mark): New.
14054 (send_sigstop): Use lwpid_of.
14055 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14056 interface changes. In non-stop mode, don't switch to a random
14058 (linux_resume_one_lwp): Use lwpid_of.
14059 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14060 (linux_resume_one_thread): ... this. Handle resume_stop. In
14061 non-stop mode, don't look for pending flag in all threads.
14062 (resume_status_pending_p): Don't consider explicitly suspended
14064 (my_waitpid): Reimplement. Emulate __WALL.
14065 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14067 (sigchld_handler, linux_supports_non_stop, linux_async)
14068 (linux_start_non_stop): New.
14069 (linux_target_ops): Register linux_supports_non_stop, linux_async
14070 and linux_start_non_stop.
14071 (initialize_low): Install SIGCHLD handler.
14072 * thread-db.c (thread_db_create_event, find_one_thread)
14073 (thread_db_get_tls_address): Use lwpid_of.
14074 * win32-low.c (win32_detach): Adjust to use resume_kind.
14075 (win32_wait): Add `options' argument.
14076 * spu-low.c (spu_resume): Adjust to use resume_kind.
14077 (spu_wait): Add `options' argument.
14079 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14081 Decouple target code from remote protocol.
14083 * target.h (enum target_waitkind): New.
14084 (struct target_waitstatus): New.
14085 (struct target_ops) <wait>: Return an unsigned long. Take a
14086 target_waitstatus pointer instead of a char pointer.
14087 (mywait): Likewise.
14088 * target.c (mywait): Change prototype to return an unsigned long.
14089 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14090 * server.h (thread_from_wait, old_thread_from_wait): Delete
14092 (prepare_resume_reply): Change prototype to take a
14094 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14095 (last_status, last_ptid): New.
14096 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14097 pid instead of a signal.
14098 (attach_inferior): Remove "status" and "signal" parameters.
14100 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14102 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14103 (handle_v_requests, myresume): Remove "status" and "signal"
14104 parameters. Adjust.
14105 (handle_status): New.
14106 (main): Delete local `status'. Adjust.
14107 * remote-utils.c: Include target.h.
14108 (prepare_resume_reply): Change prototype to take a
14109 target_waitstatus. Adjust.
14111 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14113 * spu-low.c (spu_wait): Adjust.
14114 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14116 (win32_wait): Adjust.
14118 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14120 * target.h (struct thread_resume): Delete leave_stopped member.
14121 (struct target_ops): Add a `n' argument to the `resume' callback.
14122 * server.c (start_inferior): Adjust.
14123 (handle_v_cont, myresume): Adjust.
14124 * linux-low.c (check_removed_breakpoint): Adjust to resume
14125 interface change, and to removed leave_stopped field.
14126 (resume_ptr): Delete.
14127 (struct thread_resume_array): New.
14128 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14129 resume interface change.
14130 (linux_continue_one_thread, linux_queue_one_thread)
14131 (resume_status_pending_p): Check if the resume field is NULL
14132 instead of checking the leave_stopped member.
14133 (linux_resume): Adjust to the target resume interface change.
14134 * spu-low.c (spu_resume): Adjust to the target resume interface
14136 * win32-low.c (win32_detach, win32_resume): Ditto.
14138 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14140 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14142 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14144 (linux_continue_one_thread): Only preserve the stepping flag if
14145 there's a pending breakpoint.
14147 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14149 * server.c (main): After the inferior having exited, call
14150 remote_close before exiting gdbserver.
14152 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14154 Fix size of FPSCR in Power 7 processors.
14155 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14156 (PPC_FEATURE_HAS_DFP): New #define.
14157 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14160 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14162 * server.c (handle_query) Whitespace and formatting.
14164 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14166 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14167 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14168 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14169 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14170 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14171 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14172 Makefile.in, configure.ac: Fix whitespace throughout.
14173 * configure: Regenerate.
14175 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14177 * inferiors.c (find_inferior): Make it safe for the callback
14178 function to delete the currently iterated inferior.
14180 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14182 * Makefile.in (linuw_low_h): Move higher.
14183 (thread-db.o): Depend on $(linux_low_h).
14185 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14187 Rename "process" to "lwp" throughout.
14189 * linux-low.c (all_processes): Rename to...
14190 (all_lwps): ... this.
14191 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14192 (add_process): Rename to ...
14193 (add_lwp): ... this. Adjust.
14194 (linux_create_inferior): Adjust.
14195 (linux_attach_lwp): Adjust.
14196 (linux_attach): Adjust.
14197 (linux_kill_one_process): Rename to ...
14198 (linux_kill_one_lwp): ... this. Adjust.
14199 (linux_kill): Adjust.
14200 (linux_detach_one_process): Rename to ...
14201 (linux_detach_one_lwp): ... this. Adjust.
14202 (linux_detach): Adjust.
14203 (check_removed_breakpoint): Adjust.
14204 (status_pending_p): Adjust.
14205 (linux_wait_for_process): Rename to ...
14206 (linux_wait_for_lwp): ... this. Adjust.
14207 (linux_wait_for_event): Adjust.
14208 (send_sigstop): Adjust.
14209 (wait_for_sigstop): Adjust.
14210 (stop_all_processes): Rename to ...
14211 (stop_all_lwps): ... this.
14212 (linux_resume_one_process): Rename to ...
14213 (linux_resume_one_lwp): ... this. Adjust.
14214 (linux_set_resume_request, linux_continue_one_thread)
14215 (linux_queue_one_thread, resume_status_pending_p)
14216 (usr_store_inferior_registers, regsets_store_inferior_registers)
14217 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14219 * linux-low.h (get_process): Rename to ...
14220 (get_lwp): ... this. Adjust.
14221 (get_thread_process): Rename to ...
14222 (get_thread_lwp): ... this. Adjust.
14223 (get_process_thread): Rename to ...
14224 (get_lwp_thread): ... this. Adjust.
14225 (struct process_info): Rename to ...
14226 (struct lwp_info): ... this.
14227 (all_processes): Rename to ...
14228 (all_lwps): ... this.
14229 * proc-service.c (ps_lgetregs): Adjust.
14230 * thread-db.c (thread_db_create_event, find_one_thread)
14231 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14233 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14235 * server.c (handle_query): Handle "qAttached".
14237 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14239 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14240 GPLv3, update license URL.
14242 2009-03-01 Doug Evans <dje@google.com>
14244 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14245 (server_h): Add gdb_signals.h.
14246 (signals.o): Update.
14247 * server.h (target_signal_from_host,target_signal_to_host_p)
14248 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14250 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14252 * remote-utils.c (getpkt): Also generate remote-debug
14253 information if noack_mode is set.
14255 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14257 * server.c (handle_query): Report qXfer:siginfo:read and
14258 qXfer:siginfo:write as supported and handle them.
14259 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14260 * linux-low.c (linux_xfer_siginfo): New.
14261 (linux_target_ops): Set it.
14263 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14265 * server.c (gdbserver_usage): Mention --remote-debug.
14266 (main): Accept '--remote-debug' switch.
14268 2009-01-18 Doug Evans <dje@google.com>
14270 * regcache.c (new_register_cache): No need to check result of xcalloc.
14271 * server.c (handle_search_memory): Back out calls to xmalloc,
14272 result is checked and error is returned to user upon failure.
14273 (handle_query): Ditto. Add more checks for result of malloc.
14274 (handle_v_cont): Check result of malloc, report error back to
14276 (handle_v_run): Ditto. Call freeargv.
14277 * server.h (freeargv): Declare.
14278 * utils.c (freeargv): New fn.
14280 2009-01-15 Doug Evans <dje@google.com>
14282 * gdbreplay.c (perror_with_name): Make arg const char *.
14283 * server.h (target_signal_to_name): Make return type const char *.
14284 * thread-db.c (thread_db_err_str): Make return type const char *.
14285 * utils.c (perror_with_name): Make arg const char *.
14287 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14289 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14290 when handling a EXIT_PROCESS_DEBUG_EVENT.
14292 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14294 * gdbreplay.c (gdbreplay_version): Update copyright year.
14295 * server.c (gdbserver_version): Likewise.
14297 2009-01-05 Doug Evans <dje@google.com>
14299 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14300 (handle_extended_wait): Improve comment.
14302 2008-12-13 Doug Evans <dje@google.com>
14304 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14305 * server.h (ATTR_MALLOC): New macro.
14306 (xmalloc,xcalloc,xstrdup): Declare.
14307 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14308 * inferiors.c: Ditto.
14309 * linux-low.c: Ditto.
14310 * mem-break.c: Ditto.
14311 * regcache.c: Ditto.
14312 * remote-utils.c: Ditto.
14315 * win32-low.c: Ditto.
14317 2008-12-12 Doug Evans <dje@google.com>
14319 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14320 in debugging printf.
14322 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14324 2008-12-09 Doug Evans <dje@google.com>
14326 * linux-low.h (struct process_info): Delete member tid, unused.
14327 * thread-db.c (find_one_thread): Update.
14328 (maybe_attach_thread): Update.
14330 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14332 * target.h (struct target_ops): Add qxfer_osdata member.
14333 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14335 (linux_qxfer_osdata): New functions.
14336 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14338 * server.c (handle_query): Handle "qXfer:osdata:read:".
14339 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14340 (buffer_xml_printf): New functions.
14341 * server.h (struct buffer): New.
14342 (buffer_grow_str, buffer_grow_str0): New macros.
14343 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14344 (buffer_xml_printf): Declare.
14346 2008-11-24 Doug Evans <dje@google.com>
14348 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14350 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14352 * server.c (handle_v_run): Always use the supplied argument list.
14354 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14356 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14357 (xtensa_regmap_table): Add entry for scompare1.
14359 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14361 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14362 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14363 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14364 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14365 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14366 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14367 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14368 XML target descriptions.
14369 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14370 when inferior is running on an ISA 2.05 or later processor. Add
14371 special case to return offset for full 64-bit slot of FPSCR when
14374 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14376 * Makefile.in (SFILES, clean): Added sparc64 files.
14377 (reg-sparc64.o, reg-sparc64.c): New.
14378 * configure.srv (sparc*-*-linux*): New configuration.
14379 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14380 syscall arguments for SPARC.
14381 (regsets_store_inferior_registers): Likewise.
14382 * linux-sparc-low.c: New file.
14384 2008-10-21 Doug Evans <dje@google.com>
14386 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14387 (READLINE_DIR,READLINE_DEP): Delete.
14388 (INTERNAL_CFLAGS): Update.
14389 (LINTFLAGS): Update.
14391 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14393 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14394 whole argv from the last run, not just argv[0].
14396 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14398 * regcache.c (new_register_cache): Return NULL if the register
14399 cache size isn't known yet.
14400 (free_register_cache): Avoid dereferencing a NULL regcache.
14402 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14404 * configure.srv: Merge MIPS and MIPS64.
14406 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14408 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14410 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14412 * Makefile.in: Add required vsx dependencies.
14414 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14415 Declare init_registers_powerpc_vsx32l.
14416 Declare init_registers_powerpc_vsx64l.
14417 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14418 (ppc_arch_setup): Check for VSX in hwcap.
14419 (ppc_fill_vsxregset): New function.
14420 (ppc_store_vsxregset): New function.
14421 Add new VSX entry in regset_info target_regsets.
14423 * configure.srv: Add new VSX dependencies.
14425 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14427 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14428 (remote_open): Set or clear transport_is_reliable.
14429 (putpkt_binary): Don't expect acks in noack mode.
14430 (getpkt): Don't send ack/nac in noack mode.
14431 * server.c (handle_general_set): Handle QStartNoAckMode.
14432 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14434 (main): Reset noack_mode on every connection.
14435 * server.h (noack_mode): Declare.
14437 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14439 * Makefile.in (GDBREPLAY_OBS): New variable.
14440 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14442 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14443 Daniel Jacobowitz <dan@codesourcery.com>
14445 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14446 (usr_store_inferior_registers): Likewise.
14447 (regsets_store_inferior_registers): Likewise.
14449 2008-07-31 Rolf Jansen <rj@surtec.com>
14450 Pedro Alves <pedro@codesourcery.com>
14452 * configure.ac: Check for memmem declaration.
14453 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14454 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14455 (disable_packet_qfThreadInfo): Unconditionally compile.
14456 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14457 * configure, config.in: Regenerate.
14459 2008-07-28 Doug Kwan <dougkwan@google.com>
14461 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14462 (linux_write_memory): Remove declaration of errno.
14464 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14466 * linux-low.c (handle_extended_wait): Do not use "status"
14467 variable uninitialized.
14469 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14471 * server.c (handle_v_attach): Inhibit reporting dll changes.
14473 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14475 * remote-utils.c (prepare_resume_reply): If requested, don't
14476 output "thread:TID" in the T stop reply.
14478 * server.c (disable_packet_vCont, disable_packet_Tthread)
14479 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14480 (handle_query): If requested, disable support for qC, qfThreadInfo
14482 (handle_v_requests): If requested, disable support for vCont.
14483 (gdbserver_show_disableable): New.
14484 (main): Handle --disable-packet and --disable-packet=LIST.
14486 * server.h (disable_packet_vCont, disable_packet_Tthread)
14487 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14489 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14491 * server.c (gdbserver_usage): Mention --version.
14493 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14495 * Makefile.in (gdbreplay.o): New rule.
14497 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14499 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14500 message, not gdbserver.
14502 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14503 Nathan Sidwell <nathan@codesourcery.com>
14504 Joseph Myers <joseph@codesourcery.com>
14506 * acinclude.m4: Include ../../config/acx.m4.
14507 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14508 * configure, config.in: Regenerate.
14509 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14510 * server.c (gdbserver_version): Print PKGVERSION.
14511 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14512 (main): Adjust gdbserver_usage calls.
14513 * gdbreplay.c (version, host_name): Add declarations.
14514 (gdbreplay_version, gdbreplay_usage): New.
14515 (main): Accept --version and --help options.
14517 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14519 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14520 (arm_breakpoint_at): Handle Thumb.
14521 (the_low_target): Add comment.
14523 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14525 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14527 2008-05-09 Doug Evans <dje@google.com>
14529 * server.h (decode_search_memory_packet): Declare.
14530 * remote-utils.c (decode_search_memory_packet): New fn.
14531 * server.c (handle_search_memory_1): New fn.
14532 (handle_search_memory): New fn.
14533 (handle_query): Process qSearch:memory packets.
14535 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14537 * regcache.c (registers_length): Remove.
14538 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14539 full register packet.
14540 * regcache.h (registers_length): Remove prototype.
14541 * server.h (PBUFSIZ): Define to 16384.
14543 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14545 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14546 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14547 powerpc-64l.o, and powerpc-altivec64l.o.
14548 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14549 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14550 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14551 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14552 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14555 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14556 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14557 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14558 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14559 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14560 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14561 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14562 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14563 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14564 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14567 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14568 (init_registers_powerpc_32l): ... this new prototype.
14569 (init_registers_powerpc_32): Remove, replace by ...
14570 (init_registers_powerpc_altivec32l): ... this new prototype.
14571 (init_registers_powerpc_e500): Remove, replace by ...
14572 (init_registers_powerpc_e500l): ... this new prototype.
14573 (init_registers_ppc64): Remove, replace by ...
14574 (init_registers_powerpc_64l): ... this new prototype.
14575 (init_registers_powerpc_64): Remove, replace by ...
14576 (init_registers_powerpc_altivec64l): ... this new prototype.
14577 (ppc_num_regs): Set to 73.
14578 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14579 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14580 (ppc_cannot_store_register): Handle orig_r3 and trap.
14581 (ppc_arch_setup): Update init_registers_... calls.
14582 (ppc_fill_gregset): Handle orig_r3 and trap.
14584 * inferiors.c (clear_inferiors): Reset current_inferior.
14586 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14588 * acinclude.m4: Add override.m4.
14589 * configure: Regenerate.
14591 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14593 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14594 initial call to init_register_ppc64.
14596 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14598 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14599 single powerpc*-*-linux* case.
14600 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14602 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14604 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14605 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14607 * linux-ppc-low.c: Include <elf.h>.
14608 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14609 (ppc_hwcap): New global variable.
14610 (ppc_regmap): Remove __SPE__ #ifdef sections.
14611 (ppc_regmap_e500): New global variable.
14612 (ppc_cannot_store_register): Update __SPE__ special case.
14613 (ppc_get_hwcap): New function.
14614 (ppc_arch_setup): Use it to determine whether inferior supports
14615 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14616 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14617 Do not access registers if target does not support AltiVec.
14618 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14619 Do not access registers if target does not support SPE.
14620 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14622 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14624 * linux-low.c (disabled_regsets, num_regsets): New.
14625 (use_regsets_p): Delete.
14626 (linux_wait_for_process): Clear disabled_regsets.
14627 (regsets_fetch_inferior_registers): Check and set it.
14628 (regsets_store_inferior_registers): Likewise.
14629 (linux_fetch_registers, linux_store_registers): Do not use
14631 (initialize_low): Allocate disabled_regsets.
14633 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14635 * Makefile.in (LIBOBJS): New.
14636 (OBS): Use LIBOBJS.
14637 (memmem.o): New rule.
14638 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14639 * configure: Regenerated.
14641 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14643 * server.c (handle_query): Never return "unsupported" for
14644 qXfer:features:read queries.
14646 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14648 * server.c (get_features_xml): Fix inverted condition.
14649 (handle_query): Always support qXfer:feature:read.
14651 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14653 * server.c (wrapper_argv): New.
14654 (start_inferior): Handle wrapper_argv. If set, expect an extra
14656 (gdbserver_usage): Document --wrapper.
14657 (main): Parse --wrapper.
14659 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14661 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14662 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14663 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14664 (ppc_set_pc): Likewise.
14665 (ppc_arch_setup): New function.
14666 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14667 of collect_register.
14668 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14670 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14672 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14673 instead of linux-ppc64-low.o.
14674 * linux-ppc64-low.c: Remove file.
14675 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14676 (linux-ppc64-low.o): Remove rule.
14678 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14679 (init_registers_powerpc_64): Likewise.
14680 (ppc_regmap): Conditionally define depending on __powerpc64__.
14681 (ppc_cannot_store_register): Do not special-case "fpscr" when
14682 compiled on __powerpc64__.
14683 (ppc_collect_ptrace_register): New function.
14684 (ppc_supply_ptrace_register): New function.
14685 (ppc_breakpoint): Change type to "unsigned int".
14686 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14687 (the_low_target): Conditionally provide initializers for the
14688 arch_setup member depending on __powerpc64__. Install
14689 collect_ptrace_register and supply_ptrace_register members.
14691 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14693 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14694 * server.c (gdbserver_xmltarget): Define.
14695 (get_features_xml): Use it to replace "target.xml" and arch_string.
14697 * configure.srv: Remove srv_xmltarget. Add XML files that were
14698 mentioned there to srv_xmlfiles instead. Remove conditional tests
14699 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14700 srv_xmlfiles and srv_regobj to include all possible choices.
14701 * configure.ac (srv_xmltarget): Remove.
14702 (srv_xmlfiles): Do not add "target.xml".
14703 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14704 checks for supplementary target information.
14705 * configure: Regenerate.
14706 * Makefile.in (XML_TARGET): Remove.
14707 (target.xml): Remove rule.
14708 (clean): Do not clean up target.xml.
14709 (.PRECIOUS): Do not mention target.xml.
14711 * target.h (struct target_ops): Remove arch_string member.
14712 * linux-low.c (linux_arch_string): Remove.
14713 (linux_target_ops): Remove arch_string initializer.
14714 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14715 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14716 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14717 * spu-low.c (spu_arch_string): Remove.
14718 (spu_target_ops): Remove arch_string initializer.
14719 * win32-low.c (win32_arch_string): Remove.
14720 (win32_target_ops): Remove arch_string initializer.
14721 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14722 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14723 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14725 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14727 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14728 by collect_ptrace_register and supply_ptrace_register hooks.
14729 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14730 instead of checking for the_low_target.left_pad_xfer.
14731 (usr_store_inferior_registers): Use collect_ptrace_register callback
14732 instead of checking for the_low_target.left_pad_xfer.
14734 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14735 (s390_supply_ptrace_register): Likewise.
14736 (s390_fill_gregset): Call s390_collect_ptrace_register.
14737 (the_low_target): Update.
14739 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14740 (ppc_supply_ptrace_register): Likewise.
14741 (the_low_target): Update.
14743 * linux-i386-low.c (the_low_target): Update.
14744 * linux-x86-64-low.c (the_low_target): Update.
14746 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14748 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14749 reg-s390.o and reg-s390x.o.
14751 * linux-low.c (new_inferior): New global variable.
14752 (linux_create_inferior, linux_attach): Set it.
14753 (linux_wait_for_process): Call the_low_target.arch_setup after the
14754 target has stopped for the first time.
14755 (initialize_low): Do not call the_low_target.arch_setup.
14757 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14758 (s390_set_pc): Likewise.
14759 (s390_arch_setup): New function.
14760 (the_low_target): Use s390_arch_setup as arch_setup routine.
14762 * regcache.c (realloc_register_cache): New function.
14763 (set_register_cache): Call it for each existing regcache.
14765 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14767 * server.h (init_registers): Remove prototype.
14769 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14770 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14771 instead of init_registers ().
14772 * linux-arm-low.c (init_registers_arm): Add prototype.
14773 (init_registers_arm_with_iwmmxt): Likewise.
14774 (the_low_target): Add initializer for arch_setup field.
14775 * linux-cris-low.c (init_registers_cris): Add prototype.
14776 (the_low_target): Add initializer for arch_setup field.
14777 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14778 (the_low_target): Add initializer for arch_setup field.
14779 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14780 (the_low_target): Add initializer for arch_setup field.
14781 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14782 (the_low_target): Add initializer for arch_setup field.
14783 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14784 (the_low_target): Add initializer for arch_setup field.
14785 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14786 (the_low_target): Add initializer for arch_setup field.
14787 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14788 (init_registers_mips64_linux): Likewise.
14789 (the_low_target): Add initializer for arch_setup field.
14790 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14791 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14792 (the_low_target): Add initializer for arch_setup field.
14793 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14794 (init_registers_powerpc_64): Likewise.
14795 (the_low_target): Add initializer for arch_setup field.
14796 * linux-s390-low.c (init_registers_s390): Add prototype.
14797 (init_registers_s390x): Likewise.
14798 (the_low_target): Add initializer for arch_setup field.
14799 * linux-sh-low.c (init_registers_sh): Add prototype.
14800 (the_low_target): Add initializer for arch_setup field.
14801 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14802 (the_low_target): Add initializer for arch_setup field.
14803 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14804 (the_low_target): Add initializer for arch_setup field.
14806 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14807 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14808 instead of init_registers ().
14809 * win32-arm-low.c (init_registers_arm): Add prototype.
14810 (the_low_target): Add initializer for arch_setup field.
14811 * win32-i386-low.c (init_registers_i386): Add prototype.
14812 (the_low_target): Add initializer for arch_setup field.
14814 * spu-low.c (init_registers_spu): Add prototype.
14815 (initialize_low): Call initialie_registers_spu () instead of
14816 initialize_registers ().
14818 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14820 * server.c (handle_v_requests): When handling the vRun and vAttach
14821 packets, if already debugging a process, don't kill it. Return an
14824 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14826 * server.c (handle_query): Correct length check.
14828 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14830 * win32-low.c (do_initial_child_stuff): Add process handle
14831 parameter. Set current_process_handle and current_process_id from the
14832 parameters. Clear globals.
14833 (win32_create_inferior): Don't set current_process_handle and
14834 current_process_id here. Instead pass them on the call to
14835 do_initial_child_stuff.
14836 (win32_attach): Likewise.
14837 (win32_clear_inferiors): New.
14838 (win32_kill): Don't close the current process handle or the
14839 current thread handle here. Instead call win32_clear_inferiors.
14840 (win32_detach): Don't open a new handle to the process. Call
14841 win32_clear_inferiors.
14842 (win32_join): Don't rely on current_process_handle; open a new
14843 handle using the process id.
14844 (win32_wait): Call win32_clear_inferiors when the inferior process
14847 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14849 * server.c (monitor_show_help): Add "exit".
14851 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14853 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14854 (clean): Add reg-xtensa.c.
14855 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14856 * configure.srv (xtensa*-*-linux*) New target.
14857 * linux-xtensa-low.c: New.
14858 * xtensa-xtregs.c: New.
14860 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14862 * hostio.c: Don't include errno.h.
14863 (errno_to_fileio_errno): Move to hostio-errno.
14864 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14865 error number outputting to the target->hostio_last_error callback.
14866 (hostio_packet_error): Use FILEIO_EINVAL directly.
14867 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14868 calls to hostio_error.
14869 * hostio-errno.c: New.
14870 * server.h (hostio_last_error_from_errno): Declare.
14871 * target.h (target_ops): Add hostio_last_error member.
14872 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14873 as hostio_last_error handler.
14874 * spu-low.c (spu_target_ops): Likewise.
14875 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14876 (wince_hostio_last_error): New functions.
14877 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14878 as hostio_last_error handler.
14879 (win32_target_ops) [!_WIN32_WCE]: Register
14880 hostio_last_error_from_errno as hostio_last_error handler.
14881 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14882 (hostio-errno.o): New rule.
14883 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14884 * configure.srv (srv_hostio_err_objs): New variable. Default to
14886 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14887 * configure: Regenerate.
14889 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14891 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14892 (linux_kill, linux_detach): Clean up the process list.
14893 * remote-utils.c (remote_open): Improve port number parsing.
14894 (putpkt_binary, input_interrupt): Only send interrupts if the target
14896 * server.c (extended_protocol): Make static.
14897 (attached): Define earlier.
14898 (exit_requested, response_needed, program_argv): New variables.
14899 (target_running): New.
14900 (start_inferior): Clear attached here.
14901 (attach_inferior): Set attached here.
14902 (require_running): Define.
14903 (handle_query): Use require_running and target_running. Implement
14905 (handle_v_attach, handle_v_run): New.
14906 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14907 (gdbserver_usage): Update.
14908 (main): Redo argument parsing. Handle --debug and --multi. Handle
14909 --attach along with other options or after the port. Save
14910 program_argv. Support no initial program. Resynchronize
14911 communication with GDB after an error. Handle "monitor exit".
14912 Use require_running and target_running. Always allow the extended
14913 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14914 restart in extended mode.
14915 * README: Refer to the GDB manual. Update --attach usage.
14917 2007-12-20 Andreas Schwab <schwab@suse.de>
14919 * linux-low.c (STACK_SIZE): Define.
14920 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14921 (linux_test_for_tracefork): Likewise.
14923 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14925 * linux-low.c (linux_wait_for_event): Update messages. Do not
14926 reinsert auto-delete breakpoints.
14927 * mem-break.c (struct breakpoint): Change return type of handler to
14929 (set_breakpoint_at): Update handler type.
14930 (reinsert_breakpoint_handler): Return 1 instead of calling
14932 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14934 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14935 * mem-break.h (set_breakpoint_at): Update handler type.
14936 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14937 * win32-low.c (auto_delete_breakpoint): New.
14938 (get_child_debug_event): Use it.
14940 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14942 * configure.ac: Check for pread and pwrite.
14943 * hostio.c (handle_pread): Fall back to lseek and read.
14944 (handle_pwrite): Fall back to lseek and write.
14945 * config.in, configure: Regenerated.
14947 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14949 * server.c (myresume): Add own_buf argument.
14950 (main): Update calls.
14952 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14954 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14955 * remote-utils.c (remote_open): Do not call disable_async_io.
14956 (block_async_io): Delete.
14957 (unblock_async_io): Make static.
14958 (initialize_async_io): New.
14959 * server.c (handle_v_cont): Handle async I/O here.
14960 (myresume): Likewise. Move other common resume tasks here...
14961 (main): ... from here. Call initialize_async_io. Disable async
14962 I/O before the main loop.
14963 * server.h (initialize_async_io): Declare.
14964 (block_async_io, unblock_async_io): Delete prototypes.
14965 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14967 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14969 * remote-utils.c (readchar): Allow binary data in received messages.
14971 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14973 * win32-low.c (attaching): New global.
14974 (win32_create_inferior): Clear the `attaching' global.
14975 (win32_attach): Set the `attaching' global.
14976 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14977 attaching. Only set a breakpoint at the entry point if not
14980 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14982 * server.c (main): Don't report dll events on the initial
14983 connection on attaches.
14985 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14987 * server.c (main): Relax numerical bases supported for the pid of
14988 the --attach command line argument.
14990 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14992 * win32-low.c (win32_attach): Call OpenProcess before
14993 DebugActiveProcess, not after. Add last error output to error
14996 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14998 * win32-low.c (win32_get_thread_context)
14999 (win32_set_thread_context): New functions.
15000 (thread_rec): Use win32_get_thread_context.
15001 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15002 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15005 2007-12-03 Leo Zayas
15006 Pedro Alves <pedro_alves@portugalmail.pt>
15008 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15010 (child_add_thread): Minor cleanup.
15011 (child_continue): Resume artificially suspended threads before
15012 calling ContinueDebugEvent.
15013 (suspend_one_thread): New.
15014 (fake_breakpoint_event): New.
15015 (get_child_debug_event): Change return type to int. Check here if
15016 gdb sent an interrupt request. If a soft interrupt was requested,
15017 fake a breakpoint event. Return 0 if there is no event to handle,
15019 (win32_wait): Don't check here if gdb sent an interrupt request.
15020 Ensure there is a valid event to handle.
15021 (win32_request_interrupt): Add soft interruption method as last
15024 2007-12-03 Leo Zayas
15025 Pedro Alves <pedro_alves@portugalmail.pt>
15027 * win32-low.h (win32_thread_info): Add descriptions to the
15028 structure members. Replace `suspend_count' counter by a
15030 * win32-low.c (thread_rec): Update condition of when to get the
15031 context from the inferior. Rely on ContextFlags being set if it
15032 has already been retrieved. Only suspend the inferior thread if
15033 we haven't already. Warn if that fails.
15034 (continue_one_thread): s/suspend_count/suspended/. Only call
15035 ResumeThread once. Warn if that fails.
15037 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15039 * win32-low.c (win32_wait): Don't read from the inferior when it
15040 has already exited.
15042 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15044 * Makefile.in (win32_low_h): New variable.
15045 (win32-low.o): Add dependency on $(win32_low_h).
15046 (win32-arm-low.o, win32-i386-low.o): New rules.
15048 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15050 * hostio.c: Correct copyright year.
15052 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15054 * Makefile.in (OBS): Add hostio.o.
15055 (hostio.o): New rule.
15056 * server.h (handle_vFile): Declare.
15057 * hostio.c: New file.
15058 * server.c (handle_v_requests): Take packet_len and new_packet_len
15059 for binary packets. Call handle_vFile.
15060 (main): Update call to handle_v_requests.
15062 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15064 * linux-low.c: Include <sched.h>.
15066 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15068 * linux-low.c (linux_tracefork_grandchild): New.
15069 (linux_tracefork_child): Use clone.
15070 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15072 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15074 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15076 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15078 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15080 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15082 * inferiors.c (change_inferior_id): Delete.
15083 (add_pid_to_list, pull_pid_from_list): New.
15084 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15085 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15086 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15087 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15088 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15089 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15090 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15091 (using_threads): Always set to 1.
15092 (handle_extended_wait): New.
15093 (add_process): Do not set TID.
15094 (linux_create_inferior): Set must_set_ptrace_flags.
15095 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15096 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15097 (linux_thread_alive): Rename TID argument to LWPID.
15098 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15099 (linux_wait_for_event): Do not use TID or check using_threads. Update
15100 call to dead_thread_notify. Call handle_extended_wait.
15101 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15102 (send_sigstop): Delete sigstop_sent.
15103 (wait_for_sigstop): Avoid TID.
15104 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15105 (linux_test_for_tracefork): New.
15106 (linux_lookup_signals): Use thread_db_active and
15107 linux_supports_tracefork_flag.
15108 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15109 * linux-low.h (get_process_thread): Avoid TID.
15110 (struct process_ifo): Move thread_known and tid to the end. Remove
15112 (linux_attach_lwp, thread_db_init): Update prototypes.
15113 * server.h (change_inferior_id): Delete prototype.
15114 (add_pid_to_list, pull_pid_from_list): New prototypes.
15115 * thread-db.c (thread_db_use_events): New.
15116 (find_first_thread): Rename to...
15117 (find_one_thread): ...this. Update callers and messages. Do not
15118 call fatal. Check thread_db_use_events. Do not call
15119 change_inferior_id or new_thread_notify.
15120 (maybe_attach_thread): Update. Do not call new_thread_notify.
15121 (thread_db_init): Set thread_db_use_events. Check use_events.
15122 * utils.c (fatal, warning): Correct message prefix.
15124 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15126 * Makefile.in (clean): Remove new files.
15127 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15128 (powerpc-64.o, powerpc-64.c): New rules.
15129 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15130 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15132 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15134 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15135 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15136 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15137 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15138 (target_regsets): Add AltiVec and SPE register sets.
15139 * configure.ac: Check for AltiVec and SPE.
15140 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15141 (ppc_fill_vrregset, ppc_store_vrregset): New.
15142 (target_regsets): Add AltiVec register set.
15143 * configure: Regenerated.
15145 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15147 * linux-low.c (O_LARGEFILE): Define.
15148 (linux_read_memory): Use /proc/PID/mem.
15149 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15150 * configure, config.in: Regenerated.
15152 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15154 * linux-low.c (linux_wait_for_event): Do not pass signals while
15157 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15159 * win32-low.c (create_process): New.
15160 (win32_create_inferior): Use create_process instead of
15161 CreateProcess. If create_process failed retry appending an ".exe"
15162 suffix. Store the GetLastError result immediatelly after
15163 create_process calls and use it on the call to error.
15165 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15167 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15169 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15171 * configure.ac: Switch license to GPLv3.
15173 2007-08-01 Michael Snyder <msnyder@access-company.com>
15175 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15177 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15179 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15181 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15182 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15183 CloseToolhelp32Snapshot.
15184 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15185 CloseToolhelp32Snapshot.
15187 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15189 * server.c (main): Check for inferior exit before main loop.
15191 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15193 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15194 instead of on tmp_desc.
15196 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15197 Daniel Jacobowitz <dan@codesourcery.com>
15199 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15200 (add_thread): Minor cleanups.
15201 (clear_inferiors): Move lower in the file. Clear the DLL
15203 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15204 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15205 (xml_escape_text): New.
15206 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15208 (handle_v_cont): Report errors.
15209 (gdbserver_version): Update.
15210 (main): Correct size of own_buf. Do not report initial DLL events.
15211 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15212 (unloaded_dll, xml_escape_text): New.
15213 * win32-low.c (enum target_waitkind): Update comments.
15214 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15215 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15216 (win32_EnumProcessModules, win32_GetModuleInformation)
15217 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15218 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15219 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15220 (win32_Module32First, win32_Module32Next, load_toolhelp)
15221 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15222 (get_child_debug_event): Handle DLL events.
15223 (win32_wait): Likewise.
15225 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15227 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15228 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15230 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15232 * win32-low.c (handle_output_debug_string): Ignore event if not
15235 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15237 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15239 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15241 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15243 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15245 * inferiors.c (change_inferior_id): Add comment.
15246 * linux-low.c (check_removed_breakpoint): Add an early
15247 prototype. Improve debug output.
15248 (linux_attach): Doc update.
15249 (linux_detach_one_process, linux_detach): Clean up before releasing
15251 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15252 * linux-low.h (struct process_info): Doc improvement.
15253 * mem-break.c (delete_all_breakpoints): New.
15254 * mem-break.h (delete_all_breakpoints): New prototype.
15255 * thread-db.c (find_first_thread): New.
15256 (thread_db_create_event): Call it instead of
15257 thread_db_find_new_threads. Clean up unused variables.
15258 (maybe_attach_thread): Remove first thread handling.
15259 (thread_db_find_new_threads): Use find_first_thread.
15260 (thread_db_get_tls_address): Likewise.
15262 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15264 * thread-db.c (thread_db_find_new_threads): Add prototype.
15265 (thread_db_create_event): Check for the main thread before adding
15267 (maybe_attach_thread): Only enable event reporting if TID == 0.
15268 (thread_db_get_tls_address): Check for new threads.
15270 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15272 * linux-low.c (linux_create_inferior): Try execv before execvp.
15273 * spu-low.c (spu_create_inferior): Likewise.
15275 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15277 * linux-low.c (linux_create_inferior): Change execv to execvp.
15278 * spu-low.c (spu_create_inferior): Likewies.
15280 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15282 * Makefile.in (clean): Clean new files instead of deleted ones.
15283 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15284 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15286 * configure.srv: Specify XML files and new regformats for MIPS and
15288 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15289 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15290 an entry for the restart register.
15291 (mips_cannot_fetch_register, mips_cannot_store_register)
15292 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15293 register names to match the XML descriptions.
15294 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15295 restart register instead of $0.
15297 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15298 Markus Deuling <deuling@de.ibm.com>
15300 * remote-utils.c (decode_xfer_write): New function.
15301 * server.h (decode_xfer_write): Add prototype.
15302 * server.c (handle_query): Add PACKET_LEN argument. Support
15303 qXfer:spu:read and qXfer:spu:write packets.
15304 (main): Pass packet_len to handle_query.
15305 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15306 * target.h (target_ops): Add qxfer_spu.
15308 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15310 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15311 accessing non-seekable spufs files.
15313 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15315 * server.c (handle_query): Add reply for qC packet.
15317 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15318 Leo Zayas <lerele@champenstudios@com>
15320 * server.h (check_remote_input_interrupt_request): New function.
15321 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15322 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15323 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15324 (check_remote_input_interrupt_request): New function.
15325 * server.h (check_remote_input_interrupt_request): Declare.
15326 * win32-low.c (winapi_DebugBreakProcess,
15327 winapi_GenerateConsoleCtrlEvent): New typedefs.
15328 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15330 (win32_wait): Check for remote interrupt request
15331 with check_remote_input_interrupt_request.
15332 (win32_request_interrupt): New function.
15333 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15335 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15337 * win32-low.c (debug_registers_changed,
15338 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15339 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15340 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15341 (thread_rec): Get context using the low target.
15342 (child_add_thread): Call thread_added on the low target,
15343 which does the same thing.
15345 (do_initial_child_stuff): Remove debug registers references.
15346 Set context using the low target. Resume threads after
15347 setting the contexts.
15348 (child_continue): Remove dead variable. Remove debug
15349 registers references.
15350 (child_fetch_inferior_registers): Go through the low target.
15351 (do_child_store_inferior_registers): Remove.
15352 (child_store_inferior_registers): Go through the low target.
15353 (win32_resume): Remove debug registers references.
15354 Set context using the low target.
15355 (handle_exception): Change return type to void. Don't record
15356 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15357 first chance exception.
15358 (get_child_debug_event): Change return type to void. Remove
15359 goto loop. Always return after waiting for debug event.
15360 (win32_wait): Convert to switch statement. Handle spurious
15363 * win32-i386-low.c (debug_registers_changed,
15364 debug_registers_used): New.
15365 (initial_stuff): Rename to ...
15366 (i386_initial_stuff): ... this. Clear debug registers
15368 (store_debug_registers): Delete.
15369 (i386_get_thread_context): New.
15370 (load_debug_registers): Delete.
15371 (i386_set_thread_context): New.
15372 (i386_thread_added): New.
15373 (single_step): Rename to ...
15374 (i386_single_step): ... this.
15375 (do_fetch_inferior_registers): Rename to ...
15376 (i386_fetch_inferior_register): ... this.
15377 (i386_store_inferior_register): New.
15378 (the_low_target): Adapt to new interface.
15380 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15381 (arm_get_thread_context): New.
15382 (arm_set_thread_context): New.
15384 (do_fetch_inferior_registers): Rename to ...
15385 (arm_fetch_inferior_register): ... this.
15386 (arm_store_inferior_register): New.
15387 (arm_wince_breakpoint): Reimplement as unsigned long.
15388 (arm_wince_breakpoint_len): Define.
15389 (the_low_target): Adapt to new interface.
15391 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15392 load_debug_registers. Add get_thread_context, set_thread_context,
15393 thread_added and store_inferior_register. Rename
15394 fetch_inferior_registers to fetch_inferior_register.
15395 (regptr): Remove declaration.
15397 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15399 * linux-low.c (linux_detach): Change return type to int. Return 0.
15400 * spu-low.c (spu_detach): Likewise.
15402 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15404 * target.h (target_ops): Change return type of detach to int.
15406 (join_inferior): New.
15407 * server.c (main): Don't skip detach support on mingw32.
15408 If the inferior doesn't support detaching return error.
15409 Call join_inferior instead of using waitpid.
15410 * linux-low.c (linux_join): New.
15411 (linux_target_op): Add linux_join.
15412 * spu-low.c (spu_join): New.
15413 (spu_target_ops): Add spu_join.
15414 * win32-low.c (win32_detach): Adapt to new interface.
15415 Reopen current_process_handle before detaching. Issue a child
15416 resume before detaching.
15418 (win32_target_op): Add win32_join.
15420 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15422 * win32-low.c (win32-attach): Fix return value.
15423 * target.h (target_ops): Describe ATTACH return values.
15425 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15427 * win32-low.c (GETPROCADDRESS): Define.
15428 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15429 (winapi_DebugSetProcessKillOnExit): Likewise.
15430 (win32_create_inferior): Force usage of ansi CreateProcessA.
15431 (win32_attach): Use GETPROCADDRESS.
15432 (win32_detach): Likewise.
15434 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15436 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15438 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15440 * win32-low.c: Commit leftover changes from 2007-03-29.
15442 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15444 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15445 fields short instead of int. Add explicit padding.
15446 (i387_cache_to_fsave): Remove unnecessary casts.
15447 (i387_fsave_to_cache): Doc fix.
15448 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15450 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15452 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15453 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15455 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15457 * configure.srv (arm*-*-mingw32ce*): Move near the other
15460 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15462 * configure.ac: Add errno checking.
15463 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15464 sys/file.h and malloc.h.
15465 (AC_CHECK_DECLS): Add perror.
15466 (srv_mingwce): Handle.
15467 * configure.srv (i[34567]86-*-cygwin*): Add
15468 win32-i386-low.o to srv_tgtobj.
15469 (i[34567]86-*-mingw*): Likewise.
15470 (arm*-*-mingw32ce*): Add case.
15471 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15472 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15473 [__MINGW32CE__] (strerror): New function.
15474 [__MINGW32CE__] (errno): Define to GetLastError.
15475 [__MINGW32CE__] (COUNTOF): New macro.
15476 (remote_open): Remove extra close call.
15477 * mem-break.c (delete_breakpoint_at): New function.
15478 * mem-break.h (delete_breakpoint_at): Declare.
15479 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15480 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15481 [USE_WIN32API] (read, write): Add char* casts.
15482 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15483 * server.h: Include wincecompat.h on Windows CE.
15484 [HAVE_ERRNO_H]: Check.
15485 (perror): Declare if not declared.
15486 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15487 (perror_with_name): Remove errno declaration.
15488 * wincecompat.h: New.
15489 * wincecompat.c: New.
15490 * win32-low.h: New.
15491 * win32-arm-low.c: New.
15492 * win32-i386-low.c: New.
15493 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15494 (OUTMSG2): Make it safe.
15496 (COUNTOF): New macro.
15497 (NUM_REGS): Get it from the low target.
15498 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15499 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15500 (thread_rec): Let low target handle debug registers.
15501 (child_add_thread): Likewise.
15502 (child_init_thread_list): Likewise.
15503 (continue_one_thread): Likewise.
15505 (do_child_fetch_inferior_registers): Move to ...
15506 * win32-i386-low.c: ... here, and rename to ...
15507 (do_fetch_inferior_registers): ... this.
15508 * win32-low.c (child_fetch_inferior_registers):
15509 Go through the low target.
15510 (do_child_store_inferior_registers): Use regptr.
15511 (strwinerror): New function.
15512 (win32_create_inferior): Handle Windows CE.
15513 Use strwinerror instead of strerror on Windows error
15514 codes. Add program to the error output.
15515 Don't close the main thread handle on Windows CE.
15516 (win32_attach): Use coredll.dll on Windows CE.
15517 (win32_kill): Close current process and current
15519 (win32_detach): Use coredll.dll on Windows CE.
15520 (win32_resume): Let low target handle debug registers, and
15522 (handle_exception): Add/Remove initial breakpoint. Avoid
15523 non-existant WSTOPSIG on Windows CE.
15524 (win32_read_inferior_memory): Cast to remove warning.
15525 (win32_arch_string): Go through the low target.
15526 (initialize_low): Call set_breakpoint_data with the low
15527 target's breakpoint.
15528 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15529 FOP_REGNUM, mappings): Move to ...
15530 * win32-i386-low.c: ... here.
15531 * win32-low.c (win32_thread_info): Move to ...
15532 * win32-low.h: ... here.
15533 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15534 win32-arm-low.c and wincecompat.c.
15535 (all:): Add $EXEEXT.
15536 (install-only:): Likewise.
15537 (gdbserver:): Likewise.
15538 (gdbreplay:): Likewise.
15539 * config.in: Regenerate.
15540 * configure: Regenerate.
15542 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15544 * win32-low.c: Rename typedef thread_info to
15545 win32_thread_info throughout.
15547 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15549 * win32-i386-low.c: Rename to ...
15550 * win32-low.c: ... this.
15551 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15552 * Makefile.in: Likewise.
15554 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15556 * remote-utils.c (monitor_output): Constify msg parameter.
15557 * server.h (monitor_output): Likewise.
15558 * win32-i386-low.c (handle_output_debug_string): New.
15559 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15560 handle_output_debug_string.
15561 (get_child_debug_event): Likewise.
15563 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15565 * server.c (main): Correct strtoul check.
15567 2007-03-27 Jon Ringle <jon@ringle.org>
15569 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15571 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15573 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15575 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15577 * terminal.h: Check HAVE_SGTTY_H.
15579 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15581 * remote-utils.c (remote_open): Print out the assigned port number.
15583 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15585 * remote-utils.c (monitor_output): New function.
15586 * server.c (debug_threads): Define here.
15587 (monitor_show_help): New function.
15588 (handle_query): Handle qRcmd.
15589 (main): Do not handle 'd' packet.
15590 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15591 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15594 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15596 * Makefile.in (EXEEXT): New.
15597 (clean): Use $(EXEEXT).
15599 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15601 * target.h (target_ops): Rename send_signal to request_interrupt,
15602 and remove enum target_signal parameter.
15603 * linux-low.c (linux_request_interrupt): Rename from
15604 linux_send_signal, and always send SIGINT.
15605 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15606 and always send SIGINT.
15607 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15609 (input_interrupt): Likewise.
15611 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15613 * server.c (get_features_xml): Check if target implemented
15615 * win32-i386-low.c (win32_arch_string): New.
15616 (win32_target_ops): Add win32_arch_string as arch_string member.
15618 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15620 * spu-low.c (spu_arch_string): New.
15621 (spu_target_ops): Add spu_arch_string.
15623 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15625 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15626 * configure.ac: Do not check for terminal.h.
15627 * configure, config.in: Regenerated.
15629 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15631 * Makefile.in (OBS): Add $(XML_BUILTIN).
15632 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15634 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15635 (arm-with-iwmmxt.c): New.
15636 * config.in, configure: Regenerate.
15637 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15638 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15639 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15640 (arm*-*-linux*): Add iWMMXt and regset support.
15641 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15642 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15643 (arm_store_wmmxregset, target_regsets): New.
15644 * server.c (get_features_xml): Take annex argument. Check builtin
15646 (handle_query): Handle multiple annexes.
15648 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15650 * remote-utils.c [USE_WIN32API] (read, write): Define.
15651 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15654 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15656 * linux-i386-low.c (the_low_target): Set arch_string.
15657 * linux-x86-64-low.c (the_low_target): Likewise.
15658 * linux-low.c (linux_arch_string): New.
15659 (linux_target_ops): Add it.
15660 * linux-low.h (struct linux_target_ops): Add arch_string.
15661 * server.c (write_qxfer_response): Use const void * for DATA.
15662 (get_features_xml): New.
15663 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15664 * target.h (struct target_ops): Add arch_string method.
15666 2007-01-03 Denis Pilat <denis.pilat@st.com>
15667 Daniel Jacobowitz <dan@codesourcery.com>
15669 * linux-low.c (linux_kill): Handle being called with no threads.
15670 * win32-i386-low.c (win32_kill): Likewise.
15671 (get_child_debug_event): Clear current_process_handle.
15673 2006-12-30 Denis PILAT <denis.pilat@st.com>
15674 Daniel Jacobowitz <dan@codesourcery.com>
15676 * remote-utils.c (remote_open): Check the type of specified
15677 serial port devices before opening them.
15678 * server.c (main): Kill the inferior if an error occurs during
15679 the first remote_open.
15681 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15683 * README: Update supported targets.
15685 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15687 * Makefile.in (clean): Remove reg-mips64.c.
15688 (reg-mips64.c, reg-mips64.o): New rules.
15689 * configure.srv: Handle mips64. Include regset support for mips.
15690 * linux-mips-low.c (union mips_register): New.
15691 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15692 (mips_breakpoint, mips_breakpoint_at): Use int.
15693 (mips_collect_register, mips_supply_register)
15694 (mips_collect_register_32bit, mips_supply_register_32bit)
15695 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15696 (mips_store_fpregset, target_regsets): New.
15697 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15699 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15701 * configure.srv: Add target "spu*-*-*".
15702 * Makefile.in (clean): Remove reg-spu.c.
15703 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15704 * spu-low.c: New file.
15706 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15708 * configure.ac: Correct td_thr_tls_get_addr test.
15709 * configure: Regenerated.
15711 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15713 * linux-low.c (linux_wait_for_event): Reformat. Use the
15714 pass_signals array.
15715 * remote-utils.c (decode_address_to_semicolon): New.
15716 * server.c (pass_signals, handle_general_set): New.
15717 (handle_query): Mention QPassSignals for qSupported.
15718 (main): Call handle_general_set.
15719 * server.h (pass_signals, decode_address_to_semicolon): New.
15721 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15723 * server.c (handle_query): Correct error handling for read_auxv.
15725 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15727 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15728 and srv_linux_thread_db to yes.
15729 * linux-s390-low.c (s390_fill_gregset): New function.
15730 (target_regsets): Define data structure.
15732 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15734 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15735 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15736 * config.in, configure: Regenerated.
15737 * inferiors.c (gdb_id_to_thread): New function.
15738 (gdb_id_to_thread_id): Use it.
15739 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15740 * linux-low.h (struct process_info): Add th member.
15741 (thread_db_get_tls_address): New prototype.
15742 * remote-utils.c (decode_address): Make non-static.
15743 * server.c (handle_query): Handle qGetTLSAddr.
15744 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15745 * target.h (struct target_ops): Add get_tls_address.
15746 * thread-db.c (maybe_attach_thread): Save the thread handle.
15747 (thread_db_get_tls_address): New.
15749 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15751 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15752 (linux_resume_one_process): Take a siginfo_t *. Update all
15753 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15754 (struct pending_signals): Add a siginfo_t.
15755 (linux_wait_for_process): Always set last_status.
15756 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15757 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15758 * linux-low.h (struct process_info): Add last_status.
15760 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15762 * remote-utils.c (try_rle): New function.
15763 (putpkt_binary): Use it.
15765 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15767 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15768 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15769 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15770 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15771 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15774 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15776 * server.c (terminal_fd): New variable.
15777 (old_foreground_pgrp): Likewise.
15778 (restore_old_foreground_pgrp): New function.
15779 (start_inferior): Record the terminal file descriptor in terminal_fd
15780 and its original foreground group in old_foreground_pgrp. Register
15781 restore_old_foreground_pgrp with atexit().
15783 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15785 * server.c (handle_query): Correct qPart to qXfer.
15787 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15789 * configure.ac: Check for more headers which are missing on
15790 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15791 * configure.srv: Add Cygwin and mingw32.
15792 * remote-utils.c: Don't include headers unconditionally which
15793 are missing on mingw32. Include <winsock.h> for mingw32.
15794 (remote_open): Adjust for mingw32 support. Flush
15795 standard error after writing to it.
15796 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15797 (unblock_async_io, enable_async_io, disable_async_io)
15798 (readchar, getpkt): Update for Winsock support.
15799 (prepare_resume_reply): Expect a protocol signal number.
15800 * server.c: Disable <sys/wait.h> on mingw32.
15801 (start_inferior): Adjust for mingw32 support. Flush
15802 standard error after writing to it.
15803 (attach_inferior): Likewise. Use protocol signal
15805 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15807 * win32-i386-low.c: New file.
15808 * Makefile.in (XM_CLIBS): Set.
15809 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15810 (win32-i386-low.o): New dependency rule.
15811 * linux-low.c (linux_wait): Use target signal numbers.
15812 * target.h (struct target_ops): Doc fix.
15813 * server.h (target_signal_to_name): New prototype.
15814 * gdbreplay.c: Don't include headers unconditionally which
15815 are missing on mingw32. Include <winsock.h> for mingw32.
15816 (remote_close, remote_open): Adjust for Winsock support.
15817 * configure, config.in: Regenerated.
15819 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15821 * server.c (decode_xfer_read, write_qxfer_response): New.
15822 (handle_query): Take a packet length argument. Handle
15823 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15824 the qSupported response.
15825 (main): Update call to handle_query.
15827 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15829 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15830 (putpkt_binary): Renamed from putpkt and adjusted for binary
15832 (putpkt): New wrapper for putpkt_binary.
15833 (readchar): Don't mask off the high bit.
15834 (decode_X_packet): New function.
15835 * server.c (main): Call putpkt_binary if a handler sets the packet
15836 length. Save the length of the incoming packet. Handle 'X'.
15837 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15839 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15841 * server.c (handle_query): Handle qSupported.
15843 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15845 * remote-utils.c (all_symbols_looked_up): New variable.
15846 (look_up_one_symbol): Check it.
15847 * server.h (look_up_one_symbol): New declaration.
15848 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15850 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15852 * Makefile.in (linux-arm-low.o): Update dependencies.
15853 * linux-arm-low.c: Include "gdb_proc_service.h".
15854 (PTRACE_GET_THREAD_AREA): Define.
15855 (ps_get_thread_area): New function.
15857 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15859 * configure.srv (m68k*-*-uclinux*): New target.
15860 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15861 (linux_resume_one_process): Remove extraneous cast.
15862 (linux_read_offsets): New.
15863 (linux_target_op): Add linux_read_offsets on mmuless systems.
15864 * server.c (handle_query): Add qOffsets logic.
15865 * target.h (struct target_ops): Add read_offsets.
15867 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15869 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15870 (PTRACE_GET_THREAD_AREA): Define.
15871 (ps_get_thread_area): New function.
15872 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15873 (linux-x86-64-low.o): Update.
15875 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15877 * configure.ac: Remove checks for prfpregset_t.
15878 * gdb_proc_service.h: New file.
15879 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15880 new "gdb_proc_service.h".
15881 * proc-service.c: Likewise.
15882 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15883 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15884 * Makefile.in (gdb_proc_service_h): Updated.
15885 * configure, config.in: Regenerated.
15887 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15889 * remote-utils.c (prepare_resume_reply): Move declaration
15890 of gdb_id_from_wait to the top of the block.
15892 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15894 * linux-low.c (regsets_store_inferior_registers): Read the regset
15895 from the target before filling it.
15897 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15899 * server.c (attach_inferior): Return SIGTRAP for a successful
15902 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15904 * Makefile.in (OBS): Add version.o.
15905 (STAGESTUFF): Delete.
15906 (version.o): Add dependencies.
15907 (version.c): Replace rule.
15908 (clean): Remove version.c.
15909 * server.c (gdbserver_version): New.
15910 (gdbserver_usage): Use printf.
15911 (main): Handle --version and --help.
15912 * server.h (version, host_name): Add declarations.
15914 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15926 * linux-x86-64-low.c:
15928 * linux-s390-low.c:
15929 * linux-ppc64-low.c:
15931 * linux-mips-low.c:
15932 * linux-m68k-low.c:
15933 * linux-m32r-low.c:
15936 * linux-ia64-low.c:
15937 * linux-i386-low.c:
15938 * linux-crisv32-low.c:
15950 * gdbserver.1: Add (C) after Copyright. Update the FSF
15953 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15955 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15956 (arm_breakpoint_at): Recognize both breakpoints.
15957 (the_low_target): Use the correct breakpoint instruction.
15959 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15961 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15962 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15963 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15964 (the_low_target): Update.
15966 2005-10-25 Andreas Schwab <schwab@suse.de>
15968 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15970 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15971 (ia64_num_regs): Reduce to 462.
15973 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15975 * acinclude.m4: Correct quoting.
15976 * aclocal.m4: Regenerated.
15978 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15979 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15980 (thread_db_init): Call thread_db_err_str.
15981 * configure.ac: Check for TD_VERSION.
15982 * config.in, configure: Regenerated.
15984 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15986 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15988 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15990 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15991 is not available. Define HAVE_PTRACE_GETREGS if it is.
15992 * config.in, configure: Regenerated.
15993 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15994 * linux-i386-low.c, linux-m68k-low.c: Update to use
15995 HAVE_PTRACE_GETREGS.
15996 * linux-low.c (regsets_fetch_inferior_registers)
15997 (regsets_store_inferior_registers): Only return 0 if we processed
15999 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16000 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16002 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16004 * inferiors.c (struct thread_info): Add gdb_id.
16005 (add_thread): Add gdb_id argument.
16006 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16007 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16008 calls to add_thread.
16009 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16010 * server.c (handle_query): Use thread_to_gdb_id.
16011 (handle_v_cont, main): Use gdb_id_to_thread_id.
16012 * server.h (add_thread): Update prototype.
16013 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16016 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16018 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16019 left-padded registers.
16020 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16021 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16023 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16025 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16026 * configure: Regenerate.
16027 * config.in: Regenerate.
16028 * server.h (NEED_DECLARATION_STRERROR):
16029 Replace with !HAVE_DECL_STRERROR.
16031 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16033 * linux-low.c (linux_wait, linux_send_signal): Don't test
16034 an unsigned long variable for > 0 if it could be MAX_ULONG.
16035 * server.c (myresume): Likewise.
16036 * target.c (set_desired_inferior): Likewise.
16038 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16040 * configure.ac: Simplify and improve check for socklen_t.
16041 * configure, config.in: Regenerate.
16043 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16045 * acconfig.h: Remove.
16046 * configure.ac: Add a test for socklen_t. Use three-argument
16047 AC_DEFINE throughout.
16048 * config.in: Regenerated using autoheader 2.59.
16049 * configure: Regenerated.
16051 * gdbreplay.c (socklen_t): Provide a default.
16052 (remote_open): Use socklen_t.
16053 * remote-utils.c (socklen_t): Provide a default.
16054 (remote_open): Use socklen_t.
16055 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16058 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16060 * linux-low.c (linux_read_memory, linux_write_memory)
16061 (linux_read_auxv): Likewise.
16062 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16063 (check_mem_write): Likewise.
16064 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16066 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16067 (registers_from_string, register_data): Likewise.
16068 * server.c (handle_query, main): Likewise.
16069 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16070 (decode_M_packet): Likewise.
16071 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16072 * target.h (struct target_ops): Update read_memory, write_memory,
16074 (read_inferior_memory, write_inferior_memory): Update.
16075 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16076 to unsigned char *.
16077 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16078 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16079 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16080 linux-s390-low.c, linux-sh-low.c: Update for changes in
16081 read_inferior_memory and the_low_target->breakpoint.
16083 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16085 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16086 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16087 * configure.srv: Add powerpc64-*-linux*.
16088 * linux-ppc64-low.c: New file.
16090 2005-05-23 Orjan Friberg <orjanf@axis.com>
16092 * linux-cris-low.c: New file with support for CRIS.
16093 * linux-crisv32-low.c: Ditto for CRISv32.
16094 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16095 (clean): Add reg-cris.c and reg-crisv32.c.
16096 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16097 reg-crisv32.o, and reg-crisv32.c to make rules.
16098 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16099 recognized targets.
16101 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16103 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16104 of sizeof (PTRACE_XFER_TYPE).
16105 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16107 2005-05-12 Orjan Friberg <orjanf@axis.com>
16109 * target.h (struct target_ops): Add insert_watchpoint,
16110 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16111 pointers for hardware watchpoint support.
16112 * linux-low.h (struct linux_target_ops): Ditto.
16113 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16114 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16115 to linux_target_ops.
16116 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16118 * server.c (main): Recognize 'Z' and 'z' packets.
16120 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16122 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16123 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16124 (the_low_target): Add new members.
16126 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16128 * proc-service.c (ps_lgetregs): Search all_processes instead of
16131 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16133 * server.c (start_inferior): Change return type to int.
16134 (attach_inferior): Change sigptr to int *.
16135 (handle_v_cont, handle_v_requests): Change signal to int *.
16136 (main): Change signal to int.
16138 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16140 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16141 * configure.srv: Add m32r*-*-linux*.
16142 * linux-m32r-low.c: New file.
16144 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16146 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16148 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16150 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16151 Take unsigned long arguments for PIDs.
16152 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16153 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16154 (wait_for_sigstop, linux_resume_one_process)
16155 (regsets_fetch_inferior_registers, linux_send_signal)
16156 (linux_read_auxv): Likewise. Update the types of variables holding
16157 PIDs. Update format string specifiers.
16158 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16159 * remote-utils.c (prepare_resume_reply): Likewise.
16160 * server.c (cont_thread, general_thread, step_thread)
16161 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16163 (handle_query): Update format specifiers.
16164 (handle_v_cont, main): Use strtoul for thread IDs.
16165 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16166 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16167 (general_thread, step_thread, thread_from_wait)
16168 (old_thread_from_wait): Update.
16169 * target.h (struct thread_resume): Use unsigned long for THREAD.
16170 (struct target_ops): Use unsigned long for arguments to attach and
16173 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16175 * acinclude.m4: Include bfd/bfd.m4 directly.
16176 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16177 <agriffis@toolchain.org>.
16178 * aclocal.m4, configure: Regenerated.
16180 2005-01-07 Andrew Cagney <cagney@gnu.org>
16182 * configure.ac: Rename configure.in, require autoconf 2.59.
16183 * configure: Re-generate.
16185 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16187 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16188 LIBS when finished.
16189 * aclocal.m4: Regenerated.
16190 * configure: Regenerated.
16192 2004-11-21 Andreas Schwab <schwab@suse.de>
16194 * linux-m68k-low.c (m68k_num_gregs): Define.
16195 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16196 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16197 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16198 (m68k_breakpoint_at): New. Add to the_low_target.
16200 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16201 srv_linux_thread_db to yes.
16203 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16205 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16206 (ARCH_SET_FS): Likewise.
16207 (ARCH_GET_FS): Likewise.
16208 (ARCH_GET_GS): Likewise.
16210 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16212 * linux-i386-low.c (ps_get_thread_area): New.
16213 * linux-x86-64-low.c (ps_get_thread_area): New.
16214 * linux-low.c: Include <sys/syscall.h>.
16215 (linux_kill_one_process): Don't kill the first thread here.
16216 (linux_kill): Kill the first thread here.
16217 (kill_lwp): New function.
16218 (send_sigstop, linux_send_signal): Use it.
16219 * proc-service.c: Clean up #ifdefs.
16220 (fpregset_info): Delete.
16221 (ps_lgetregs): Update and enable implementation.
16222 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16224 * remote-utils.c (struct sym_cache, symbol_cache): New.
16225 (input_interrupt): Print a clearer message.
16226 (async_io_enabled): New variable.
16227 (enable_async_io, disable_async_io): Use it. Update comments.
16228 (look_up_one_symbol): Use the symbol cache.
16229 * thread-db.c (thread_db_look_up_symbols): New function.
16230 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16232 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16234 * configure.in: Test for -rdynamic.
16235 * configure: Regenerated.
16236 * Makefile (INTERNAL_LDFLAGS): New.
16237 (gdbserver, gdbreplay): Use it.
16239 2004-09-02 Andrew Cagney <cagney@gnu.org>
16241 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16243 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16245 * linux-low.c (linux_wait): Clear all_processes list also.
16247 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16249 * linux-low.c: Include <errno.h>. Remove extern declaration of
16252 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16254 * gdbreplay.c, server.h, utils.c: Update copyright years.
16256 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16258 * server.c (main): Print child status or termination signal from
16259 variable 'signal', not 'sig'.
16261 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16263 * linux-low.c (linux_read_memory): Change return type to
16264 int. Check for and return error from ptrace().
16265 * target.c (read_inferior_memory): Change return type to int. Pass
16266 back return status from the_target->read_memory().
16267 * target.h (struct target_ops): Adapt *read_memory() prototype.
16269 (read_inferior_memory): Adapt prototype.
16270 * server.c (main): Return an error packet if
16271 read_inferior_memory() returns an error.
16273 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16275 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16276 Unify with other clean targets.
16278 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16280 * server.c (handle_v_cont): Call set_desired_inferior.
16282 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16284 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16286 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16288 * linux-low.c (linux_wait): Unblock async I/O.
16289 (linux_resume): Block and enable async I/O.
16290 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16291 * server.h (block_async_io, unblock_async_io): Add prototypes.
16293 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16295 * remote-utils.c (remote_open): Print a status notice after
16296 opening a TCP port.
16297 * server.c (attach_inferior): Print a status notice after
16300 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16302 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16304 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16306 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16308 * server.c, target.h: Update copyright years.
16310 2004-02-25 Roland McGrath <roland@redhat.com>
16312 * target.h (struct target_ops): New member `read_auxv'.
16313 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16314 * linux-low.c (linux_read_auxv): New function.
16315 (linux_target_ops): Initialize `read_auxv' member to that.
16317 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16319 Committed by Jim Blandy <jimb@redhat.com>.
16321 * linux-s390-low.c (s390_num_regs): Update.
16322 (s390_regmap): Remove control registers. Use __s390x__ predefine
16323 instead of GPR_SIZE to distiguish s390 and s390x targets.
16325 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16327 * linux-low.c: Update copyright year.
16328 (check_removed_breakpoint): Clear pending_is_breakpoint.
16329 (linux_set_resume_request, linux_queue_one_thread)
16330 (resume_status_pending_p): New functions.
16331 (linux_continue_one_thread): Use process->resume.
16332 (linux_resume): Only resume threads if there are no pending events.
16333 * linux-low.h (struct process_info): Add resume request
16336 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16338 * regcache.c (new_register_cache): Clear the allocated register
16339 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16341 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16343 * linux-low.c (linux_resume): Take a struct thread_resume *
16345 (linux_wait): Update call.
16346 (resume_ptr): New static variable.
16347 (linux_continue_one_thread): Renamed from
16348 linux_continue_one_process. Use resume_ptr.
16349 (linux_resume): Use linux_continue_one_thread.
16350 * server.c (handle_v_cont, handle_v_requests): New functions.
16351 (myresume): New function.
16352 (main): Handle 'v' case.
16353 * target.h (struct thread_resume): New type.
16354 (struct target_ops): Change argument of "resume" to struct
16356 (myresume): Delete macro.
16358 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16360 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16361 (uninstall): Support DESTDIR.
16363 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16365 * configure.srv: Add xscale*linux copy of arm*linux entry.
16367 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16369 * linux-arm-low.c (arm_reinsert_addr): New function.
16370 (the_low_target): Add arm_reinsert_addr.
16372 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16374 * mem-break.c: Remove whitespace at end of file.
16376 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16378 * configure.in: Check whether we need to prototype strerror.
16379 * server.h: Optionally prototype strerror.
16380 * gdbreplay.c (perror_with_name): Use strerror.
16381 * linux-low.c (linux_attach_lwp): Use strerror.
16382 * utils.c (perror_with_name): Use strerror.
16383 * config.in, configure: Regenerated.
16385 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16387 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16388 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16390 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16392 * Makefile.in (SFILES): Update.
16393 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16394 low-sun3.c: Remove files.
16396 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16398 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16399 (linux_detach_one_process, linux_detach): New functions.
16400 (linux_target_ops): Add linux_detach.
16401 * server.c (main): Handle 'D' packet.
16402 * target.h (struct target_ops): Add "detach" member.
16403 (detach_inferior): Define.
16405 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16407 From Kelley Cook <kelleycook@wideopenwest.com>:
16408 * configure.srv: Accept i[34567]86 variants.
16410 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16412 * linux-low.c (linux_wait_for_event): Correct comment typos.
16413 (linux_resume_one_process): Call check_removed_breakpoint.
16414 (linux_send_signal): New function.
16415 (linux_target_ops): Add linux_send_signal.
16416 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16418 * target.h (struct target_ops): Add send_signal.
16420 2003-05-29 Jim Blandy <jimb@redhat.com>
16422 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16423 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16424 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16425 away part of the register's value.
16427 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16429 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16430 (linux_wait_for_event, linux_init_signals): Likewise.
16432 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16434 * configure.in: Check for stdlib.h.
16435 * configure: Regenerated.
16436 * config.in: Regenerated.
16438 2003-01-04 Andreas Schwab <schwab@suse.de>
16440 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16442 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16444 * Makefile.in: Remove obsolete code.
16446 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16448 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16449 defined(PT_FPR0_HI).
16451 2002-11-17 Stuart Hughes <seh@zee2.com>
16453 * linux-arm-low.c (arm_num_regs): Increase.
16454 (arm_regmap): Include status register.
16456 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16458 * linux-low.c (register_addr): Remove incorrect -1 check.
16460 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16462 * linux-low.c (linux_create_inferior): Call setpgid. Return
16464 (unstopped_p, linux_signal_pid): Remove.
16465 (linux_target_ops): Remove linux_signal_pid.
16466 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16467 global instead of target method.
16468 * target.h (struct target_ops): Remove signal_pid. Update comment
16469 for create_inferior.
16470 * server.c (signal_pid): New variable.
16471 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16472 gdbserver. Set the child to be the foreground process group.
16473 (attach_inferior): Set signal_pid.
16475 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16477 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16479 2002-08-20 Jim Blandy <jimb@redhat.com>
16481 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16484 2002-08-01 Andrew Cagney <cagney@redhat.com>
16486 * Makefile.in: Make chill references obsolete.
16488 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16490 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16491 * configure: Regenerate.
16492 * config.in: Regenerate.
16494 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16496 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16497 (perror_with_name, remote_close, remote_open, expect, play): Static.
16499 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16501 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16502 byte offsets instead of an array of indexes.
16503 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16505 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16507 * regcache.c: Add comment.
16509 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16511 * thread-db.c: New file.
16512 * proc-service.c: New file.
16513 * acinclude.m4: New file.
16514 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16515 proc-service.o, and thread-db.o.
16516 (linux-low.o): Add USE_THREAD_DB.
16517 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16518 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16519 * aclocal.m4: Regenerated.
16520 * config.in: Regenerated.
16521 * configure: Regenerated.
16522 * configure.in: Check for proc_service.h, sys/procfs.h,
16523 thread_db.h, and linux/elf.h headrs.
16524 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16525 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16526 Check for -lthread_db and thread support.
16527 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16528 PowerPC, and SuperH.
16529 * i387-fp.c: Constify arguments.
16530 * i387-fp.h: Likewise.
16531 * inferiors.c: (struct thread_info): Renamed from
16532 `struct inferior_info'. Remove PID member. Use generic inferior
16533 list header. All uses updated.
16534 (inferiors, signal_pid): Removed.
16535 (all_threads): New variable.
16536 (get_thread): Define.
16537 (add_inferior_to_list): New function.
16538 (for_each_inferior): New function.
16539 (change_inferior_id): New function.
16540 (add_inferior): Removed.
16541 (remove_inferior): New function.
16542 (add_thread): New function.
16543 (free_one_thread): New function.
16544 (remove_thread): New function.
16545 (clear_inferiors): Use for_each_inferior and free_one_thread.
16546 (find_inferior): New function.
16547 (find_inferior_id): New function.
16548 (inferior_target_data): Update argument type.
16549 (set_inferior_target_data): Likewise.
16550 (inferior_regcache_data): Likewise.
16551 (set_inferior_regcache_data): Likewise.
16552 * linux-low.c (linux_bp_reinsert): Remove.
16553 (all_processes, stopping_threads, using_thrads)
16554 (struct pending_signals, debug_threads, pid_of): New.
16555 (inferior_pid): Replace with macro.
16556 (struct inferior_linux_data): Remove.
16557 (get_stop_pc, add_process): New functions.
16558 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16559 Use add_process and add_thread.
16560 (linux_attach_lwp): New function, based on old linux_attach. Use
16561 add_process and add_thread. Set stop_expected for new threads.
16562 (linux_attach): New function.
16563 (linux_kill_one_process): New function.
16564 (linux_kill): Kill all LWPs.
16565 (linux_thread_alive): Use find_inferior_id.
16566 (check_removed_breakpoints, status_pending_p): New functions.
16567 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16568 Update. Use WNOHANG. Wait for cloned processes also. Update process
16569 struct for the found process.
16570 (linux_wait_for_event): New function.
16571 (linux_wait): Use it. Support LWPs.
16572 (send_sigstop, wait_for_sigstop, stop_all_processes)
16573 (linux_resume_one_process, linux_continue_one_process): New functions.
16574 (linux_resume): Support LWPs.
16575 (REGISTER_RAW_SIZE): Remove.
16576 (fetch_register): Use register_size instead. Call supply_register.
16577 (usr_store_inferior_registers): Likewise. Call collect_register.
16578 Fix recursive case.
16579 (regsets_fetch_inferior_registers): Improve error message.
16580 (regsets_store_inferior_registers): Add debugging.
16581 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16582 (unstopped_p, linux_signal_pid): New functions.
16583 (linux_target_ops): Add linux_signal_pid.
16584 (linux_init_signals): New function.
16585 (initialize_low): Call it. Initialize using_threads.
16586 * regcache.c (inferior_regcache_data): Add valid
16588 (get_regcache): Fetch registers lazily. Add fetch argument
16589 and update all callers.
16590 (regcache_invalidate_one, regcache_invalidate): New
16592 (new_register_cache): Renamed from create_register_cache.
16593 Return the new regcache.
16594 (free_register_cache): Change argument to a void *.
16595 (registers_to_string, registers_from_string): Call get_regcache
16596 with fetch flag set.
16597 (register_data): Make static. Pass fetch flag to get_regcache.
16598 (supply_register): Call get_regcache with fetch flag clear.
16599 (collect_register): Call get_regcache with fetch flag set.
16600 (collect_register_as_string): New function.
16601 * regcache.h: Update.
16602 * remote-utils.c (putpkt): Flush after debug output and use
16604 Handle input interrupts while waiting for an ACK.
16605 (input_interrupt): Use signal_pid method.
16606 (getpkt): Flush after debug output and use stderr.
16607 (outreg): Use collect_register_as_string.
16608 (new_thread_notify, dead_thread_notify): New functions.
16609 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16610 and general_thread.
16611 (look_up_one_symbol): Flush after debug output.
16612 * server.c (step_thread, server_waiting): New variables.
16613 (start_inferior): Don't use signal_pid. Update call to mywait.
16614 (attach_inferior): Update call to mywait.
16615 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16616 (main): Don't fetch/store registers explicitly. Use
16617 set_desired_inferior. Support proposed ``Hs'' packet. Update
16619 * server.h: Update.
16620 (struct inferior_list, struct_inferior_list_entry): New.
16621 * target.c (set_desired_inferior): New.
16622 (write_inferior_memory): Constify.
16623 (mywait): New function.
16624 * target.h: Update.
16625 (struct target_ops): New signal_pid method.
16626 (mywait): Removed macro, added prototype.
16628 * linux-low.h (regset_func): Removed.
16629 (regset_fill_func, regset_store_func): New.
16630 (enum regset_type): New.
16631 (struct regset_info): Add type field. Use new operation types.
16632 (struct linux_target_ops): stop_pc renamed to get_pc.
16633 Add decr_pc_after_break and breakpoint_at.
16634 (get_process, get_thread_proess, get_process_thread)
16635 (strut process_info, all_processes, linux_attach_lwp)
16636 (thread_db_init): New.
16638 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16639 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16640 (the_low_target): Add new members.
16641 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16642 (i386_store_fpxregset): Constify.
16643 (target_regsets): Add new kind identifier.
16644 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16645 (i386_set_pc): Add debugging.
16646 (i386_breakpoint_at): New function.
16647 (the_low_target): Add new members.
16648 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16649 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16650 (mips_breakpoint_at): New.
16651 (the_low_target): Add new members.
16652 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16653 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16654 (the_low_target): Add new members.
16655 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16656 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16657 (the_low_target): Add new members.
16658 * linux-x86-64-low.c (target_regsets): Add new kind
16661 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16663 From Martin Pool <mbp@samba.org>:
16664 * server.c (gdbserver_usage): New function.
16667 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16669 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16670 stop_at -> stop_pc.
16672 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16674 * Makefile.in: Remove obsolete code.
16676 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16678 * linux-low.c (regsets_fetch_inferior_registers),
16679 (regsets_store_inferior_registers): Removed cast to int from
16681 * regcache.h: Added declaration of struct inferior_info.
16683 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16685 * inferiors.c (struct inferior_info): Add regcache_data.
16686 (add_inferior): Call create_register_cache.
16687 (clear_inferiors): Call free_register_cache.
16688 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16689 * regcache.c (struct inferior_regcache_data): New.
16690 (registers): Remove.
16691 (get_regcache): New function.
16692 (create_register_cache, free_register_cache): New functions.
16693 (set_register_cache): Don't initialize the register cache here.
16694 (registers_to_string, registers_from_string, register_data): Call
16696 * regcache.h: Add prototypes.
16697 * server.h: Likewise.
16699 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16701 * mem-break.c: New file.
16702 * mem-break.h: New file.
16703 * Makefile.in: Add mem-break.o rule; update server.h
16705 * inferiors.c (struct inferior_info): Add target_data
16707 (clear_inferiors): Free target_data member if set.
16708 (inferior_target_data, set_inferior_target_data): New functions.
16709 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16710 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16711 * linux-low.c (linux_bp_reinsert): New variable.
16712 (struct inferior_linux_data): New.
16713 (linux_create_inferior): Use set_inferior_target_data.
16714 (linux_attach): Likewise. Call add_inferior.
16715 (linux_wait_for_one_inferior): New function.
16716 (linux_wait): Call it.
16717 (linux_write_memory): Add const.
16718 (initialize_low): Call set_breakpoint_data.
16719 * linux-low.h (struct linux_target_ops): Add breakpoint
16721 * server.c (attach_inferior): Remove extra add_inferior
16723 * server.h: Include mem-break.h. Update inferior.c
16725 * target.c (read_inferior_memory)
16726 (write_inferior_memory): New functions.
16727 * target.h (read_inferior_memory)
16728 (write_inferior_memory): Change macros to prototypes.
16729 (struct target_ops): Update comments. Add const to write_memory
16732 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16734 * linux-low.c (usr_store_inferior_registers): Support
16735 registers which are allowed to fail to store.
16736 * linux-low.h (linux_target_ops): Likewise.
16737 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16738 (ppc_cannot_store_register): FPSCR may not be storable.
16740 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16742 * server.h: Include <string.h> if HAVE_STRING_H.
16743 * ChangeLog: Correct paths in last ChangeLog entry.
16745 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16747 * linux-low.h: Remove obsolete prototypes.
16748 (struct linux_target_ops): New.
16749 (extern the_low_target): New.
16750 * linux-low.c (num_regs, regmap): Remove declarations.
16751 (register_addr): Use the_low_target explicitly.
16752 (fetch_register): Likewise.
16753 (usr_fetch_inferior_registers): Likewise.
16754 (usr_store_inferior_registers): Likewise.
16755 * linux-arm-low.c (num_regs): Remove.
16756 (arm_num_regs): Define.
16757 (arm_regmap): Renamed from regmap, made static.
16758 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16760 (arm_cannot_store_register): Renamed from cannot_store_register,
16762 (the_low_target): New.
16763 * linux-i386-low.c (num_regs): Remove.
16764 (i386_num_regs): Define.
16765 (i386_regmap): Renamed from regmap, made static.
16766 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16768 (i386_cannot_store_register): Renamed from cannot_store_register,
16770 (the_low_target): New.
16771 * linux-ia64-low.c (num_regs): Remove.
16772 (ia64_num_regs): Define.
16773 (ia64_regmap): Renamed from regmap, made static.
16774 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16776 (ia64_cannot_store_register): Renamed from cannot_store_register,
16778 (the_low_target): New.
16779 * linux-m68k-low.c (num_regs): Remove.
16780 (m68k_num_regs): Define.
16781 (m68k_regmap): Renamed from regmap, made static.
16782 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16784 (m68k_cannot_store_register): Renamed from cannot_store_register,
16786 (the_low_target): New.
16787 * linux-mips-low.c (num_regs): Remove.
16788 (mips_num_regs): Define.
16789 (mips_regmap): Renamed from regmap, made static.
16790 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16792 (mips_cannot_store_register): Renamed from cannot_store_register,
16794 (the_low_target): New.
16795 * linux-ppc-low.c (num_regs): Remove.
16796 (ppc_num_regs): Define.
16797 (ppc_regmap): Renamed from regmap, made static.
16798 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16800 (ppc_cannot_store_register): Renamed from cannot_store_register,
16802 (the_low_target): New.
16803 * linux-s390-low.c (num_regs): Remove.
16804 (s390_num_regs): Define.
16805 (s390_regmap): Renamed from regmap, made static.
16806 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16808 (s390_cannot_store_register): Renamed from cannot_store_register,
16810 (the_low_target): New.
16811 * linux-sh-low.c (num_regs): Remove.
16812 (sh_num_regs): Define.
16813 (sh_regmap): Renamed from regmap, made static.
16814 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16816 (sh_cannot_store_register): Renamed from cannot_store_register,
16818 (the_low_target): New.
16819 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16820 (the_low_target): New.
16822 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16824 * Makefile.in: Add stamp-h target.
16825 * configure.in: Create stamp-h.
16826 * configure: Regenerated.
16828 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16830 * inferiors.c: New file.
16831 * target.c: New file.
16832 * target.h: New file.
16833 * Makefile.in: Add target.o and inferiors.o. Update
16835 * linux-low.c (inferior_pid): New static variable,
16836 moved from server.c.
16837 (linux_create_inferior): Renamed from create_inferior.
16838 Call add_inferior. Return 0 on success instead of a PID.
16839 (linux_attach): Renamed from myattach.
16840 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16841 (linux_thread_alive): Renamed from mythread_alive.
16842 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16844 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16845 (regsets_store_inferior_registers): Correct error message.
16846 Add missing ``return 0''.
16847 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16848 (linux_store_registers): Renamed from store_inferior_registers.
16849 (linux_read_memory): Renamed from read_inferior_memory.
16850 (linux_write_memory): Renamed from write_inferior_memory.
16851 (linux_target_ops): New structure.
16852 (initialize_low): Call set_target_ops ().
16853 * remote-utils.c (unhexify): New function.
16854 (hexify): New function.
16855 (input_interrupt): Send signals to ``signal_pid''.
16856 * server.c (inferior_pid): Remove.
16857 (start_inferior): Update create_inferior call.
16858 (attach_inferior): Call add_inferior.
16859 (handle_query): New function.
16860 (main): Call handle_query for `q' packets.
16861 * server.h: Include "target.h". Remove obsolete prototypes.
16862 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16864 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16866 * Makefile.in: Add WARN_CFLAGS. Update configury
16868 * configure.in: Check for <string.h>
16869 * configure: Regenerate.
16870 * config.in: Regenerate.
16871 * gdbreplay.c: Include needed system headers.
16872 (remote_open): Remove strchr prototype.
16873 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16874 * regcache.c (supply_register): Change buf argument to const void *.
16875 (supply_register_by_name): Likewise.
16876 (collect_register): Change buf argument to void *.
16877 (collect_register_by_name): Likewise.
16878 * regcache.h: Add missing prototypes.
16879 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16880 * server.c (handle_query): New function.
16881 (attached): New static variable, moved out of main.
16882 (main): Quiet longjmp clobber warnings.
16883 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16884 * utils.c (error): Remove NORETURN.