1 2018-07-03 Tom Tromey <tom@tromey.com>
4 * linux-mips-low.c: Update.
7 * remote-utils.c: Update.
11 * thread-db.c: Update.
13 2018-07-03 Tom Tromey <tom@tromey.com>
15 * linux-low.c: Update.
16 * linux-mips-low.c: Update.
18 * mem-break.c: Update.
20 * remote-utils.c: Update.
24 * tracepoint.c: Update.
26 2018-07-03 Tom Tromey <tom@tromey.com>
28 * linux-low.c: Update.
29 * linux-ppc-low.c: Update.
30 * linux-x86-low.c: Update.
31 * proc-service.c: Update.
34 * thread-db.c: Update.
35 * win32-low.c: Update.
37 2018-07-03 Tom Tromey <tom@tromey.com>
39 * linux-low.c: Update.
42 * remote-utils.c: Update.
44 * thread-db.c: Update.
45 * win32-low.c: Update.
47 2018-06-29 Joel Brobecker <brobecker@adacore.com>
49 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
50 parameter in call to 'amd64_create_target_description'.
52 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
54 * x86-tdesc.h: Remove executable permission flag.
56 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
58 * configure.ac: Remove AC_PREREQ, add missing quoting.
59 * configure: Re-generate.
60 * config.in: Re-generate.
61 * aclocal.m4: Re-generate.
63 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
65 * tracepoint.h (current_traceframe): Remove declaration.
67 2018-06-18 Alan Hayward <alan.hayward@arm.com>
69 * linux-aarch64-low.c (is_sve_tdesc): New function.
70 (aarch64_sve_regs_copy_to_regcache): Likewise.
71 (aarch64_sve_regs_copy_from_regcache): Likewise.
72 (aarch64_regs_info): Add SVE checks.
73 (initialize_low_arch): Initialize SVE.
75 2018-06-18 Alan Hayward <alan.hayward@arm.com>
77 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
79 2018-06-11 Alan Hayward <alan.hayward@arm.com>
81 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
82 (initialize_low_tracepoint): Likewise
83 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
84 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
86 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
88 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
90 2018-06-11 Alan Hayward <alan.hayward@arm.com>
92 * server.h (PBUFSIZ): Increase size
94 2018-06-11 Alan Hayward <alan.hayward@arm.com>
96 * regcache.c (regcache::raw_compare): New function.
97 * regcache.h (regcache::raw_compare): New declaration.
99 2018-06-11 Alan Hayward <alan.hayward@arm.com>
101 * regcache.c (new_register_cache): Use new.
102 (free_register_cache): Use delete.
103 (register_data): Use const.
104 (supply_register): Move body inside regcache.
105 (regcache::raw_supply): New override function.
106 (collect_register): Move body inside regcache.
107 (regcache::raw_collect): New override function.
108 (regcache::get_register_status): New override function.
109 * regcache.h (struct regcache): Inherit from reg_buffer_common.
111 2018-06-09 Tom Tromey <tom@tromey.com>
113 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
115 (event_queue): Use std::queue.
116 (gdb_event_xfree): Remove.
117 (initialize_event_loop, process_event, wait_for_event): Update.
119 2018-06-08 Stan Cox <scox@redhat.com>
121 * win32-low.c (win32_create_inferior): last_ptid and last_status
122 moved to client_state.
124 2018-06-08 Pedro Alves <palves@redhat.com>
126 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
127 common/common-exceptions.o, common/common-utils.o,
128 common/errors.o, common/print-utils.o and utils.o.
129 * gdbreplay.c: Include "common-defs.h" instead of the two
130 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
131 string.h or alloca.h.
132 (perror_with_name): Delete.
133 (remote_open): Use xstrdup instead of strdup.
134 (main): Rename to ...
135 (captured_main): ... this.
138 2018-06-08 Tom Tromey <tom@tromey.com>
140 * linux-low.c (linux_low_read_btrace): Update.
142 2018-06-04 Stan Cox <scox@redhat.com>
144 * server.h (struct client_state): New.
145 * server.c (cont_thread, general_thread, multi_process)
146 (report_fork_events, report_vfork_events, report_exec_events)
147 (report_thread_events, swbreak_feature, hwbreak_feature)
148 (vCont_supported, disable_randomization, pass_signals)
149 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
150 Moved to client_state.
151 * remote-utils.c (remote_debug, noack_mode)
152 (transport_is_reliable): Moved to client_state.
153 * tracepoint.c (current_traceframe): Moved to client_state.
156 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
157 linux-low.c, remote-utils.h, target.c: Use client_state.
159 2018-05-31 Alan Hayward <alan.hayward@arm.com>
161 * configure.srv: Add new c/h file.
163 2018-05-31 Alan Hayward <alan.hayward@arm.com>
165 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
168 2018-05-25 Maciej W. Rozycki <macro@mips.com>
170 * gdb.arch/mips-fpregset-core.exp: New test.
171 * gdb.arch/mips-fpregset-core.c: New test source.
173 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
176 * hostio.c (require_int): Do not report overflow for integers
177 between 0xfffffff and 0x7fffffff.
179 2018-05-22 Maciej W. Rozycki <macro@mips.com>
181 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
182 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
183 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
185 (the_low_target): Wire them.
187 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
189 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
190 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
191 mode. Call collect_register_by_name with vscr using
192 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
193 (ppc_store_vrregset): Add and set vscr_offset variable as in
194 ppc_fill_vrregset. Call supply_register_by_name with vscr using
197 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
199 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
200 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
201 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
203 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
205 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
206 (ppc_store_vsxregset): Likewise.
207 (ppc_fill_vrregset): Likewise.
208 (ppc_store_vrregset): Likewise.
209 (ppc_fill_evrregset): Likewise.
210 (ppc_store_evrregset): Likewise.
211 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
212 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
215 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
217 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
218 wordsize of the inferior. Call ppc_linux_target_wordsize.
220 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
222 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
223 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
224 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
225 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
226 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
227 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
228 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
229 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
230 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
231 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
232 (tdesc_powerpc_e500l): Remove.
233 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
234 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
235 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
236 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
238 (ppc_arch_setup): Remove target description matching code. Fill a
239 ppc_linux_features struct and call ppc_linux_match_description
242 2018-05-22 Maciej W. Rozycki <macro@mips.com>
244 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
245 width of the requested register exceeds the width of the
247 (mips_cannot_store_register): Likewise.
249 2018-05-21 Maciej W. Rozycki <macro@mips.com>
251 * linux-mips-low.c (mips_fetch_register): New function. Update
253 (mips_store_gregset): Supply 0 rather than $restart for $zero.
254 (the_low_target): Wire `mips_fetch_register'.
256 2018-05-10 Joel Brobecker <brobecker@adacore.com>
258 * lynx-i386-low.c (LYNXOS_178): New macro.
259 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
260 the layout on LynxOS-178.
261 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
262 handle floating point registers that are not supported by
265 2018-05-10 Tom Tromey <tom@tromey.com>
267 * configure: Rebuild.
269 2018-05-10 Joel Brobecker <brobecker@adacore.com>
272 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
273 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
274 Use it to set the expedite_regs field in the given tdesc.
275 * x86-tdesc.h: New file.
276 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
277 Adjust following the addition of the new expedite_regs parameter
279 * linux-tic6x-low.c (tic6x_read_description): Likewise.
280 * linux-x86-tdesc.c: #include "x86-tdesc.h".
281 (i386_linux_read_description, amd64_linux_read_description):
282 Adjust following the addition of the new expedite_regs parameter
284 * lynx-i386-low.c: #include "x86-tdesc.h".
285 (lynx_i386_arch_setup): Adjust following the addition of the new
286 expedite_regs parameter to init_target_desc.
287 * nto-x86-low.c: #include "x86-tdesc.h".
288 (nto_x86_arch_setup): Adjust following the addition of the new
289 expedite_regs parameter to init_target_desc.
290 * win32-i386-low.c: #include "x86-tdesc.h".
291 (i386_arch_setup): Adjust following the addition of the new
292 expedite_regs parameter to init_target_desc.
294 2018-05-10 Joel Brobecker <brobecker@adacore.com>
297 * win32-low.c (win32_create_inferior): Add call to my_wait
298 setting last_status global.
300 2018-05-10 Joel Brobecker <brobecker@adacore.com>
303 * win32-low.c (create_process): Only call gdb_tilde_expand if
304 inferior_cwd is not NULL.
306 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
308 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
309 registers to the cache if their values have changed.
310 (i387_xsave_to_cache): Provide default values for x87 control
311 registers when these features are available, but disabled.
312 * regcache.c (supply_register_by_name_zeroed): New function.
313 * regcache.h (supply_register_by_name_zeroed): Declare new
316 2018-05-07 Tom Tromey <tom@tromey.com>
318 * configure: Rebuild.
320 2018-05-04 Tom Tromey <tom@tromey.com>
322 * configure: Rebuild.
324 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
325 Pedro Alves <palves@redhat.com>
327 * linux-aarch64-low.c (aarch64_stopped_data_address):
330 2018-04-27 Tom Tromey <tom@tromey.com>
332 * configure: Rebuild.
334 2018-04-23 Tom Tromey <tom@tromey.com>
336 * configure: Rebuild.
338 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
340 * Makefile.in (depcomp): Add "..".
341 (all_deps_files): New and use it.
343 2018-04-18 Alan Hayward <alan.hayward@arm.com>
345 * configure.srv (aarch64*-*-linux*): Don't include xml.
346 (i[34567]86-*-cygwin*): Likewise.
347 (i[34567]86-*-linux*): Likewise.
348 (i[34567]86-*-lynxos*): Likewise.
349 (i[34567]86-*-mingw32ce*): Likewise.
350 (i[34567]86-*-mingw*): Likewise.
351 (i[34567]86-*-nto*): Likewise.
352 (tic6x-*-uclinux): Likewise.
353 (x86_64-*-linux*): Likewise.
354 (x86_64-*-mingw*): Likewise.
355 (x86_64-*-cygwin*): Likewise.
357 2018-04-18 Alan Hayward <alan.hayward@arm.com>
359 * tdesc.c: Remove xml parameter.
361 2018-04-18 Alan Hayward <alan.hayward@arm.com>
363 * server.c (get_features_xml): Remove cast.
364 * tdesc.c (void target_desc::accept): Fill in function.
365 (tdesc_get_features_xml): Remove old xml creation.
366 (print_xml_feature::visit_pre): Add xml vistor.
367 * tdesc.h (struct target_desc): Make xmltarget mutable.
368 (tdesc_get_features_xml): Remove declaration.
370 2018-04-18 Alan Hayward <alan.hayward@arm.com>
372 * tdesc.c (tdesc_architecture_name): Add new function.
373 (tdesc_osabi_name): Likewise.
374 (tdesc_get_features_xml): Use new functions.
376 2018-04-18 Alan Hayward <alan.hayward@arm.com>
378 * tdesc.c (tdesc_create_flags): Remove.
379 (tdesc_add_flag): Likewise.
380 (tdesc_named_type): Likewise.
381 (tdesc_create_union): Likewise.
382 (tdesc_create_struct): Likewise.
383 (tdesc_create_vector): Likewise.
384 (tdesc_add_bitfield): Likewise.
385 (tdesc_add_field): Likewise.
386 (tdesc_set_struct_size): Likewise.
388 2018-04-18 Alan Hayward <alan.hayward@arm.com>
390 * tdesc.c (~target_desc): Remove implictly deleted items.
391 (init_target_desc): Iterate all features.
392 (tdesc_get_features_xml): Use vector.
393 (tdesc_create_feature): Create feature.
394 * tdesc.h (tdesc_feature) Remove
395 (target_desc): Add features.
397 2018-04-18 Alan Hayward <alan.hayward@arm.com>
399 * Makefile.in: Add common/tdesc.c
400 * tdesc.c (init_target_desc): init all reg_defs from register
402 (tdesc_create_reg): Create tdesc_reg.
403 * tdesc.h (tdesc_feature): Add register vector.
405 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
407 * tdesc.h (struct target_desc) <features>: Change type to
408 std::vector<std::string>.
409 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
411 (tdesc_get_features_xml): Likewise.
412 (tdesc_create_feature): Likewise.
414 2018-03-26 Alan Hayward <alan.hayward@arm.com>
416 * regcache.c (find_register_by_number): Return a ref.
417 (find_regno): Use references.
418 (register_size): Likewise.
419 (register_data): Likewise.
420 * tdesc.c (target_desc::~target_desc): Remove free calls.
421 (target_desc::operator==): Use std::vector compare.
422 (init_target_desc): Use reference.
423 (tdesc_create_reg): Use reg constructors.
424 * tdesc.h (struct target_desc): Replace pointer with object.
426 2018-03-23 Alan Hayward <alan.hayward@arm.com>
428 * regcache.c (find_register_by_number): Make static.
429 (find_regno): Use find_register_by_number
430 * regcache.h (struct reg): Remove declaration.
432 2018-03-23 Alan Hayward <alan.hayward@arm.com>
434 * tdesc.c (target_desc::~target_desc): Move to here.
435 (target_desc::operator==): Likewise.
436 * tdesc.h (target_desc::~target_desc): Move from here.
437 (target_desc::operator==): Likewise.
439 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
441 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
443 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
445 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
447 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
448 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
449 and init_registers_s390_gs_linux64.
451 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
453 * linux-s390-low.c (s390_fill_gs): Remove function.
454 (s390_fill_gsbc): Remove function.
455 (s390_regsets): Set fill functions for the guarded storage regsets
458 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
460 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
461 the word size. Add comment.
462 (s390_get_wordsize): New function.
463 (s390_arch_setup): No longer select a temporary tdesc to fetch the
464 pswm with it. Instead, use s390_get_wordsize to determine the
465 word size first and derive the correct tdesc from that directly.
467 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
469 * Makefile.in: Include silent-rules.mk.
470 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
471 (COMPILE): Add ECHO_CXX.
472 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
473 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
474 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
475 (version-generated.c): Add ECHO_GEN.
476 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
477 (IPAGENT_COMPILE): Add ECHO_CXX.
478 (%-generated.c): Add ECHO_REGDAT.
480 2018-03-14 Tom Tromey <tom@tromey.com>
483 * ax.c (ax_printf): Special case for NULL.
485 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
487 * linux-low.c (linux_qxfer_libraries_svr4): Use
488 xml_escape_text_append.
490 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
492 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
494 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
496 * server.c (handle_general_set): Remove unnecessary xstrdup.
498 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
500 * server.c (parse_debug_format_options): Adjust to
501 delim_string_to_char_ptr_vec changes.
502 * thread-db.c (thread_db_load_search): Adjust to
503 dirnames_to_char_ptr_vec changes.
505 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
507 * target.h (target_enable_btrace, target_disable_btrace)
508 (target_read_btrace, target_read_btrace_conf): Turn macro into
509 inline function. Throw error if target method is not defined.
510 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
511 check for btrace target method. Be prepared to handle exceptions
512 from btrace target methods.
514 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
516 * server.c (captured_main): Change order of error message printed
517 when the current working directory cannot be found.
519 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
521 * server.c: Include "filenames.h" and "pathstuff.h".
522 (program_name): Delete variable.
523 (program_path): New anonymous class.
524 (get_exec_wrapper): Use "program_path" instead of
526 (handle_v_run): Likewise.
527 (captured_main): Likewise.
528 (process_serial_event): Likewise.
530 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
532 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
533 (OBJS): Add "pathstuff.o".
534 * server.c (current_directory): New global variable.
535 (captured_main): Initialize "current_directory".
537 2018-02-26 Alan Hayward <alan.hayward@arm.com>
539 * tdesc.c: Use common/tdesc.h.
542 2018-02-20 Alan Hayward <alan.hayward@arm.com>
543 Simon Marchi <simon.marchi@ericsson.com>
545 * Makefile.in: Switch order of make rules.
547 2018-02-19 Alan Hayward <alan.hayward@arm.com>
549 * Makefile.in: Add common directory in build.
550 * configure.ac: Add common reference.
551 * configure: Regenerate.
553 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
555 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
556 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
557 * spu-low.c (spu_target_ops): Likewise.
558 * win32-low.c (win32_target_ops): Likewise.
559 * server.c (supported_btrace_packets): Report packets unconditionally.
560 * target.h (target_ops) <supports_btrace>: Remove.
561 (target_supports_btrace): Remove.
563 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
565 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
566 (handle_btrace_disable): Change return type to void. Use exceptions
568 (handle_btrace_general_set): Catch exception and copy message to
571 2018-02-08 Tom Tromey <tom@tromey.com>
573 * linux-low.c (install_software_single_step_breakpoints): Use
575 * inferiors.c (make_cleanup_restore_current_thread): Remove.
576 (do_restore_current_thread_cleanup): Remove.
577 * gdbthread.h (make_cleanup_restore_current_thread): Don't
580 2018-02-08 Tom Tromey <tom@tromey.com>
582 * mem-break.c (set_raw_breakpoint_at): Use
583 gdb::unique_xmalloc_ptr.
585 2018-01-30 Pedro Alves <palves@redhat.com>
588 * target.c (target_terminal::terminal_state): Rename to ...
589 (target_terminal::m_terminal_state): ... this.
591 2018-01-19 James Clarke <jrtc27@jrtc27.com>
593 * linux-low.c (handle_extended_wait): Surround call to
594 thread_db_notice_clone with #ifdef USE_THREAD_DB.
596 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
598 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
599 linux_ptrace_attach_fail_reason_string now returning an
601 (linux_attach): Likewise.
602 * thread-db.c (attach_thread): Likewise.
604 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
607 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
608 checking for fs_base/gs_base fields in struct user_regs_struct.
609 * configure: Regenerate.
611 2018-01-16 Yao Qi <yao.qi@linaro.org>
614 * linux-low.c (fetch_register): Call supply_register instead of
617 2018-01-08 Yao Qi <yao.qi@linaro.org>
618 Simon Marchi <simon.marchi@ericsson.com>
620 * Makefile.in (OBS): Remove selftest.o.
621 * configure.ac: Set srv_selftest_objs if $development is true.
622 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
623 * configure: Re-generated.
624 * server.c (captured_main): Wrap variable selftest_filter with
627 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
629 * server.c (parse_debug_format_options): Return std::string.
630 (handle_monitor_command, captured_main): Adjust.
632 2018-01-05 Pedro Alves <palves@redhat.com>
635 * server.c (captured_main): Pass quiet=false to
636 save_original_signals_state.
638 2018-01-01 Joel Brobecker <brobecker@adacore.com>
640 * gdbreplay.c (gdbreplay_version): Update copyright year in
642 * server.c (gdbserver_version): Likewise.
644 2017-12-08 Tom Tromey <tom@tromey.com>
646 * ax.c (ax_printf): Update.
648 2017-12-07 Yao Qi <yao.qi@linaro.org>
650 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
651 aarch64_linux_read_description.
652 * linux-amd64-ipa.c (idx2mask): New array.
653 (get_ipa_tdesc): Move idx2mask out.
654 (initialize_low_tracepoint): Initialize target descriptions.
655 * linux-i386-ipa.c (idx2mask): New array.
656 (get_ipa_tdesc): Move idx2mask out.
657 (initialize_low_tracepoint): Initialize target descriptions.
659 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
661 * tdesc.c (struct tdesc_type): Change return type.
662 (tdesc_add_flag): Change parameter type.
663 (tdesc_add_bitfield): Likewise.
664 (tdesc_add_field): Likewise.
665 (tdesc_set_struct_size): Likewise.
667 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
669 * regcache.c (registers_to_string): Remove unused variable.
671 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
673 * inferiors.c (for_each_inferior_with_data): Remove.
674 * inferiors.h (for_each_inferior_with_data): Remove.
675 * server.c (handle_qxfer_threads_worker): Change parameter type.
676 (handle_qxfer_threads_proper): Use for_each_thread.
678 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
680 * inferiors.c (for_each_inferior): Remove.
681 (clear_inferiors): Use for_each_thread.
682 * inferiors.h (for_each_inferior): Remove.
683 * linux-low.c (linux_wait_for_event_filtered): Use
685 (linux_stabilize_threads): Likewise.
686 * regcache.c (regcache_release): Likewise.
687 * server.c (gdb_wants_all_threads_stopped): Likewise.
688 (clear_pending_status_callback): Remove.
689 (handle_status): Use for_each_thread.
690 (captured_main): Likewise.
691 * win32-low.c (child_init_thread_list): Likewise.
692 (win32_clear_inferiors): Likewise.
693 (fake_breakpoint_event): Likewise.
695 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
697 * inferiors.h (find_inferior): Remove.
698 * inferiors.c (find_inferior): Remove.
700 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
702 * linux-low.c (resume_status_pending_p): Update comment.
703 (need_step_over_p): Update comment.
705 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
707 * linux-low.c (proceed_one_lwp): Return void, change parameter
709 (unsuspend_and_proceed_one_lwp): Likewise.
710 (proceed_all_lwps): Use for_each_thread.
711 (unstop_all_lwps): Likewise.
713 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
715 * linux-low.c (linux_resume_one_thread): Return void, take
717 (linux_resume): Use for_each_thread.
719 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
721 * linux-low.c (send_sigstop_callback): Return void, change
722 parameter type. Rename to...
723 (send_sigstop): ... this.
724 (suspend_and_send_sigstop_callback): Return void, change parameter
726 (suspend_and_send_sigstop): ... this.
727 (stop_all_lwps): Use for_each_thread.
729 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
731 * linux-low.c (lwp_running): Return bool, remove unused
733 (linux_stabilize_threads): Use find_thread.
735 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
737 * linux-low.c (select_singlestep_lwp_callback): Remove.
738 (count_events_callback): Remove.
739 (select_event_lwp_callback): Remove.
740 (select_event_lwp): Use find_thread/for_each_thread.
742 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
744 * linux-low.c (not_stopped_callback): Return bool, take filter
746 (linux_wait_for_event_filtered): Use find_thread.
747 (linux_wait_1): Likewise.
749 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
751 * linux-low.c (same_lwp): Remove.
752 (find_lwp_pid): Use find_thread.
754 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
756 * linux-low.c (delete_lwp_callback): Remove.
757 (linux_mourn): Use for_each_thread.
759 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
761 * linux-low.c (linux_detach_lwp_callback): Return void, remove
762 args parameter, don't check for pid.
763 (linux_detach): Use for_each_thread.
765 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
767 * linux-low.c (struct counter): Remove.
768 (second_thread_of_pid_p): Remove.
769 (last_thread_of_process_p): Use find_thread.
771 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
773 * inferiors.c (find_inferior_in_random): Remove.
774 * inferiors.h (find_inferior_in_random): Remove.
775 * linux-low.c (status_pending_p_callback): Return bool, accept
776 parameter ptid directly.
777 (linux_wait_for_event_filtered): Use find_thread_in_random.
778 (linux_wait_1): Likewise.
780 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
782 * inferiors.c (find_inferior_id): Remove.
783 (find_thread_ptid): Move implemention from find_inferior_id to
785 * inferiors.h (find_inferior_id): Remove.
786 * server.c (handle_status): Use find_thread_ptid.
787 (process_serial_event): Likewise.
788 * thread-db.c (find_one_thread): Likewise.
789 (thread_db_thread_handle): Likewise.
790 * win32-low.c (thread_rec): Likewise.
791 (child_delete_thread): Likewise.
792 (win32_thread_alive): Likewise.
793 (get_child_debug_event): Likewise.
795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
797 * linux-mips-low.c (update_watch_registers_callback): Return
798 void, remove pid_p parameter, don't check for pid.
799 (mips_insert_point, mips_remove_point): Use for_each_thread.
801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
803 * lynx.low (lynx_delete_thread_callback): Remove.
804 (lynx_mourn): Use for_each_thread.
806 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
808 * regcache.c (regcache_invalidate_one): Remove.
809 (regcache_invalidate_pid): use for_each_thread.
811 2017-11-26 Tom Tromey <tom@tromey.com>
813 * linux-low.c (linux_create_inferior): Update.
815 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
817 * spu-low.c (spu_create_inferior): Fix typo in argument name.
819 2017-11-24 Alan Hayward <alan.hayward@arm.com>
821 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
822 * linux-aarch64-low.c (initialize_low_arch): Call init func.
823 * linux-aarch64-tdesc-selftest.c: New file.
824 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
826 2017-11-24 Alan Hayward <alan.hayward@arm.com>
828 * configure.srv: Add new file.
829 * linux-aarch64-low.c (initialize_low_arch): Call init func.
830 * linux-aarch64-tdesc-selftest.c: New file.
831 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
833 2017-11-24 Alan Hayward <alan.hayward@arm.com>
835 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
836 * linux-aarch64-low.c (initialize_low_arch): Remove init.
837 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
839 2017-11-24 Alan Hayward <alan.hayward@arm.com>
841 * configure.srv: Add new files.
842 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
843 aarch64_linux_read_description.
844 * linux-aarch64-low.c (aarch64_linux_read_description):
845 Merge with aarch64_arch_setup.
846 (aarch64_arch_setup): Call aarch64_linux_read_description.
847 * linux-aarch64-tdesc.c: New file.
848 * linux-aarch64-tdesc.h: New file.
850 2017-11-24 Yao Qi <yao.qi@linaro.org>
852 * configure.srv: Set $srv_regobj for tic6x-linux.
853 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
854 (tic6x_read_description): Move some code to tic6x_arch_setup.
855 (tic6x_tdesc_test): New function.
856 (initialize_low_arch): Call selftests::register_test.
858 2017-11-22 Yao Qi <yao.qi@linaro.org>
860 * remote-utils.c (prepare_resume_reply): Use memcpy.
862 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
864 * linux-low.c (kill_one_lwp_callback): Return void, take
865 argument directly, don't filter on pid.
866 (linux_kill): Use for_each_thread.
868 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
870 * linux-low.c (need_step_over_p): Return bool, remove dummy
872 (linux_resume, proceed_all_lwps): Use find_thread.
874 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
876 * linux-low.c (resume_status_pending_p): Return bool, remove
878 (linux_resume): Use find_thread.
880 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
882 * linux-low.c (struct thread_resume_array): Remove.
883 (linux_set_resume_request): Return void, take arguments
885 (linux_resume): Use for_each_thread.
887 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
889 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
890 return bool, remove data argument.
891 (linux_stabilize_threads): Use find_thread.
893 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
895 * linux-low.c (unsuspend_one_lwp): Remove.
896 (unsuspend_all_lwps): Use for_each_thread, inline code from
899 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
901 * gdbthread.h (find_thread): Add overload with ptid_t filter.
902 * linux-low.c (struct iterate_over_lwps_args): Remove.
903 (iterate_over_lwps_filter): Remove.
904 (iterate_over_lwps): Use find_thread.
906 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
908 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
909 (linux_handle_new_gdb_connection): Use for_each_thread, inline
910 code from reset_lwp_ptrace_options_callback.
912 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
914 * linux-arm-low.c (struct update_registers_data): Remove.
915 (update_registers_callback): Return void, take arguments
916 directly, don't check thread's pid.
917 (arm_insert_point, arm_remove_point): Use for_each_thread.
919 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
921 * win32-low.c (continue_one_thread): Return void, take argument
923 (child_continue): Use for_each_thread.
925 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
927 * win32-i386-low.c (update_debug_registers_callback): Rename
929 (update_debug_registers): ... this, return void, remove pid_p arg.
930 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
932 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
934 * inferiors.h (struct process_info): Add constructor, initialize
936 <syscalls_to_catch>: Change type to std::vector<int>.
937 * inferiors.c (add_process): Allocate process_info with new.
938 (remove_process): Free process_info with delete.
939 * linux-low.c (handle_extended_wait): Adjust.
940 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
941 * server.c (handle_general_set): Adjust.
943 2017-11-16 Pedro Alves <palves@redhat.com>
945 * remote-utils.c (remote_close): Block SIGIO signals instead of
946 uninstalling the SIGIO handler.
948 2017-11-16 Alan Hayward <alan.hayward@arm.com>
950 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
952 2017-11-16 Yao Qi <yao.qi@linaro.org>
954 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
955 (tic6x_store_gregset): Likewise.
956 (tic6x_usrregs_info): Move it up.
958 2017-11-15 Alan Hayward <alan.hayward@arm.com>
960 * Makefile.in: Update arch rules.
961 * configure.srv: Explicitly mark arch/ files.
963 2017-11-13 Andreas Schwab <schwab@suse.de>
965 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
969 2017-11-06 Pedro Alves <palves@redhat.com>
971 * config.in, configure: Regenerate.
973 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
975 * target.c (struct thread_search): Remove.
976 (thread_search_callback): Remove.
977 (prepare_to_access_memory): Use for_each_thread instead of
978 find_inferior. Inline code from thread_search_callback.
980 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
982 * server.c (struct visit_actioned_threads_data): Remove.
983 (visit_actioned_threads): Change prototype to take arguments
985 (resume): Use find_thread instead of find_inferior.
987 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
989 * server.c (queue_stop_reply_callback): Change prototype, return
991 (find_status_pending_thread_callback): Remove.
992 (handle_status): Replace find_inferior with find_thread and
995 2017-10-25 Alan Hayward <alan.hayward@arm.com>
997 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
999 (aarch64_store_gregset): Likewise.
1000 (aarch64_fill_fpregset): Likewise.
1001 (aarch64_store_fpregset): Likewise.
1003 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1005 * gdbthread.h (find_thread, for_each_thread): New functions.
1006 * inferiors.c (thread_of_pid): Remove.
1007 (find_any_thread_of_pid): Use find_thread.
1008 * linux-low.c (num_lwps): Use for_each_thread.
1010 2017-10-17 Yao Qi <yao.qi@linaro.org>
1012 * Makefile.in: Remove one rule.
1013 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1015 2017-10-17 Yao Qi <yao.qi@linaro.org>
1017 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1018 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1020 2017-10-17 Yao Qi <yao.qi@linaro.org>
1022 * configure.srv: Rename arm.o with arch/arm.o.
1024 2017-10-17 Yao Qi <yao.qi@linaro.org>
1026 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1027 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1028 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1029 (arch-i386.o, arch-amd64.o): Remove rules.
1030 (arch/%.o): New rule.
1031 Update POSTCOMPILE and COMPILE.pre.
1032 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1033 * configure: Re-generated.
1034 * configure.srv: Replace arch-i386.o with arch/i386.o.
1035 Replace arch-amd64.o with arch/amd64.o.
1037 2017-10-16 Yao Qi <yao.qi@linaro.org>
1039 * configure: Regenerated.
1041 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1043 * inferiors.h: (struct inferior_list): Remove.
1044 (struct inferior_list_entry); Remove.
1045 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1046 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1047 get_first_inferior): Remove.
1048 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1049 find_inferior_id, find_inferior_in_random): Change signature.
1050 * inferiors.c (all_threads): Change type to
1051 std::list<thread_info *>.
1052 (get_thread): Remove macro.
1053 (find_inferior, find_inferior_id): Change signature, implement
1055 (find_inferior_in_random): Change signature, implement using
1056 find_thread_in_random.
1057 (for_each_inferior, for_each_inferior_with_data): Change
1058 signature, implement using for_each_thread.
1059 (add_inferior_to_list, remove_inferior): Remove.
1060 (add_thread, get_first_thread, thread_of_pid,
1061 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1062 (get_first_inferior, one_inferior_p, clear_inferior_list):
1064 (clear_inferiors, get_thread_process): Update.
1065 * gdbthread.h: Include <list>.
1066 (struct thread_info) <entry>: Remove field.
1068 (all_threads): Change type to std::list<thread_info *>.
1069 (get_first_inferior): Add doc.
1070 (find_thread, for_each_thread, find_thread_in_random): New
1072 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1073 * linux-arm-low.c (update_registers_callback): Update.
1074 * linux-low.c (second_thread_of_pid_p): Update.
1075 (kill_one_lwp_callback, linux_detach_lwp_callback,
1076 delete_lwp_callback, status_pending_p_callback, same_lwp,
1077 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1078 iterate_over_lwps, not_stopped_callback,
1079 resume_stopped_resumed_lwps, count_events_callback,
1080 select_singlestep_lwp_callback, select_event_lwp_callback,
1081 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1082 suspend_and_send_sigstop_callback, wait_for_sigstop,
1083 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1084 lwp_running, linux_set_resume_request, resume_status_pending_p,
1085 need_step_over_p, start_step_over, linux_resume_one_thread,
1086 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1087 reset_lwp_ptrace_options_callback): Update.
1088 * linux-mips-low.c (update_watch_registers_callback): Update.
1089 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1091 (free_register_cache_thread_one): Remove.
1092 (regcache_release): Update.
1093 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1094 handle_qxfer_threads_worker): Update.
1095 (handle_query): Update, use list iterator.
1096 (visit_actioned_threads, handle_pending_status,
1097 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1098 clear_pending_status_callback, set_pending_status_callback,
1099 find_status_pending_thread_callback, handle_status,
1100 process_serial_event): Update.
1101 * target.c (thread_search_callback): Update.
1102 * thread-db.c (thread_db_get_tls_address): Update.
1103 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1105 * win32-i386-low.c (update_debug_registers_callback): Update.
1106 * win32-low.c (delete_thread_info, child_delete_thread,
1107 continue_one_thread, suspend_one_thread,
1108 get_child_debug_event): Adjust.
1110 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1112 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1113 * inferiors.h: Include <list>.
1114 (struct process_info) <entry>: Remove field.
1116 (pid_of): Change macro to function.
1117 (ptid_of, lwpid_of): Remove macro.
1118 (all_processes): Change type to std::list<process_info *>.
1119 (ALL_PROCESSES): Remove macro.
1120 (for_each_process, find_process): New function.
1121 * inferiors.c (all_processes): Change type to
1122 std::list<process_info *>.
1123 (find_thread_process): Adjust.
1124 (add_process): Likewise.
1125 (remove_process): Likewise.
1126 (find_process_pid): Likewise.
1127 (get_first_process): Likewise.
1128 (started_inferior_callback): Remove.
1129 (have_started_inferiors_p): Adjust.
1130 (attached_inferior_callback): Remove.
1131 (have_attached_inferiors_p): Adjust.
1132 * linux-low.c (check_zombie_leaders): Likewise.
1133 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1134 (x86_linux_update_xmltarget): Adjust.
1135 * server.c (handle_query): Likewise.
1136 (gdb_reattached_process): Remove.
1137 (handle_status): Adjust.
1138 (kill_inferior_callback): Likewise.
1139 (detach_or_kill_inferior): Remove.
1140 (print_started_pid): Likewise.
1141 (print_attached_pid): Likewise.
1142 (detach_or_kill_for_exit): Update.
1143 (process_serial_event): Likewise.
1144 * linux-arm-low.c (arm_new_fork): Likewise.
1146 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1148 * dll.h: Include <list>.
1149 (struct dll_info): Add constructor.
1150 <entry>: Remove field.
1151 (all_dlls): Change type to std::list<dll_info>.
1152 * dll.c: Include <algorithm>.
1153 (get_dll): Remove macro.
1154 (all_dlls): Change type to std::list<dll_info *>.
1155 (free_one_dll): Remove.
1156 (match_dll): Likewise.
1157 (loaded_dll): Adjust.
1158 (unloaded_dll): Adjust to all_dlls type change, use
1159 std::find_if. Inline code from match_dll.
1160 (clear_dlls): Adjust to all_dlls type change.
1161 * server.c (emit_dll_description): Remove.
1162 (handle_qxfer_libraries): Adjust to all_dlls type change,
1163 integrate emit_dll_description's functionality.
1165 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1167 * linux-low.h (struct linux_target_ops) <delete_process>: New
1169 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1170 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1171 (struct linux_target_ops): Add delete_process callback.
1172 * linux-arm-low.c (arm_delete_process): New.
1173 (struct linux_target_ops): Add delete_process callback.
1174 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1175 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1176 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1177 * linux-mips-low.c (mips_linux_delete_process): New.
1178 (struct linux_target_ops): Add delete_process callback.
1179 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1180 * linux-s390-low.c (struct linux_target_ops): Likewise.
1181 * linux-sh-low.c (struct linux_target_ops): Likewise.
1182 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1183 * linux-tile-low.c (struct linux_target_ops): Likewise.
1184 * linux-x86-low.c (x86_linux_delete_process): New.
1185 (struct linux_target_ops): Add delete_process callback.
1186 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1188 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1190 * linux-aarch64-low.c (the_low_target): Add thread delete
1192 * linux-arm-low.c (arm_delete_thread): New function.
1193 (the_low_target): Add thread delete callback.
1194 * linux-bfin-low.c (the_low_target): Likewise.
1195 * linux-crisv32-low.c (the_low_target): Likewise.
1196 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1198 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1200 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1201 * linux-mips-low.c (mips_linux_delete_thread): New function.
1202 (the_low_target): Add thread delete callback.
1203 * linux-ppc-low.c (the_low_target): Likewise.
1204 * linux-s390-low.c (the_low_target): Likewise.
1205 * linux-sh-low.c (the_low_target): Likewise.
1206 * linux-tic6x-low.c (the_low_target): Likewise.
1207 * linux-tile-low.c (the_low_target): Likewise.
1208 * linux-x86-low.c (the_low_target): Likewise.
1209 * linux-xtensa-low.c (the_low_target): Likewise.
1211 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1213 * win32-low.c: Include "common-inferior.h".
1215 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1217 * inferiors.c (set_inferior_cwd): New function.
1218 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1219 (handle_query): Inform that QSetWorkingDir is supported.
1220 * win32-low.c (create_process): Pass the inferior's cwd to
1223 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1225 * inferiors.c (current_inferior_cwd): New global variable.
1226 (get_inferior_cwd): New function.
1227 * inferiors.h (struct process_info) <cwd>: New field.
1229 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1231 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1232 (OBS): Add gdb_tilde_expand.o.
1234 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1236 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1237 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1239 2017-09-29 Pedro Alves <palves@redhat.com>
1241 * ax.c (gdb_parse_agent_expr): Constify.
1242 * ax.h (gdb_parse_agent_expr): Constify.
1243 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1245 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1246 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1247 * remote-utils.h (read_ptid): Constify.
1248 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1249 (process_point_options, process_serial_event): Constify.
1250 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1251 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1252 (cmd_qtbuffer): Constify.
1254 2017-09-29 Pedro Alves <palves@redhat.com>
1256 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1259 2017-09-29 Pedro Alves <palves@redhat.com>
1261 * linux-low.c (handle_extended_wait): Pass parent thread instead
1262 of process to thread_db_notice_clone.
1263 * linux-low.h (thread_db_notice_clone): Replace parent process
1264 parameter with parent thread parameter.
1265 * thread-db.c (find_one_thread): Add comment.
1266 (thread_db_notice_clone): Replace parent process parameter with
1267 parent thread parameter. Temporarily switch to the parent thread.
1269 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1271 * gdbthread.h: Include "common-gdbthread.h".
1272 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1273 "if" when validating the ptid.
1274 * remote-utils.c: Include "gdbthread.h".
1275 (prepare_resume_reply): Use "switch_to_thread".
1276 * target.c (done_accessing_memory): Likewise.
1278 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1280 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1281 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1282 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1283 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1284 s390x-gs-linux64-ipa.o to ipa_obj.
1285 * linux-s390-low.c (HWCAP_S390_GS): New define.
1286 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1288 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1289 (s390_arch_setup): Check for guarded-storage support and choose
1291 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1292 init_registers_s390x_gs_linux64.
1293 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1295 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1296 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1298 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1300 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1302 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1304 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1305 (thread_db_thread_handle): Declare.
1306 * linux-low.c (linux_target_ops): Initialize thread_handle.
1307 * server.c (handle_qxfer_threads_worker): Add support for
1309 * target.h (struct target_ops): Add new function pointer,
1311 (target_thread_handle): Define.
1312 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1314 (thread_db_thread_handle): New function.
1316 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1318 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1319 * linux-low.h (thread_db_notice_clone): Declare.
1320 * thread-db.c (thread_db_notice_clone): New function.
1322 2017-09-21 Pedro Alves <palves@redhat.com>
1324 * server.c (gdb_read_memory, handle_status, process_serial_event)
1325 (handle_serial_event, handle_target_event): Adjust to
1326 set_desired_thread prototype change.
1327 * target.c (set_desired_thread): Remove 'use_general' parameter
1329 * target.h (set_desired_thread): Remove 'use_general' parameter.
1331 2017-09-20 Tom Tromey <tom@tromey.com>
1333 * target.c (target_terminal::terminal_state): Define.
1334 (target_terminal::init): Rename from target_terminal_init.
1335 (target_terminal::inferior): Rename from
1336 target_terminal_inferior.
1337 (target_terminal::ours): Rename from target_terminal_ours.
1338 (target_terminal::ours_for_output, target_terminal::info): New.
1340 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1342 * server.c (accumulate_file_name_length): Remove.
1343 (emit_dll_description): Adjust to std::string change.
1344 (handle_qxfer_libraries): Use std::string to hold document.
1346 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1348 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1349 return type of xml_escape_text.
1350 * server.c (emit_dll_description): Likewise.
1352 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1354 * server.c (captured_main): Accept argument for --selftest.
1355 Update run_tests call.
1356 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1357 when registering selftests.
1359 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1361 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1362 instead of "VEC" for "target_desc.reg_defs".
1363 (regcache_cpy): Likewise.
1364 (registers_to_string): Likewise.
1365 (registers_from_string): Likewise.
1366 (find_regno): Likewise.
1367 (supply_regblock): Likewise.
1368 (regcache_raw_read_unsigned): Likewise.
1369 * tdesc.c (init_target_desc): Likewise.
1370 (tdesc_create_reg): Likewise.
1371 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1372 (struct target_desc) <reg_defs>: Convert to "std::vector".
1373 (target_desc): Do not initialize "reg_defs".
1374 (~target_desc): Update code to use "std::vector" instead of "VEC"
1375 for "target_desc.reg_defs".
1376 (operator==): Likewise.
1378 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1380 * inferiors.h (thread_to_gdb_id): Remove.
1381 * inferiors.c (thread_to_gdb_id): Remove.
1382 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1383 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1384 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1386 * nto-low.c (nto_fetch_registers, nto_store_registers,
1387 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1389 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1391 * inferiors.h (gdb_id_to_thread_id): Remove.
1392 * inferiors.c (gdb_id_to_thread_id): Remove.
1393 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1394 removal. Move pid declaration closer to where it's used.
1396 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1398 * server.c (handle_detach): New function.
1399 (process_serial_event): Move code out, call handle_detach.
1401 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1403 * server.c (require_running): Rename to ...
1404 (require_running_or_return): ... this ...
1405 (require_running_or_break): ... and this.
1406 (handle_query, process_serial_event): Adjust.
1408 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1410 * linux-low.c (linux_set_resume_request): Remove unused
1413 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1415 * server.c (first_thread_of): Remove.
1416 (process_serial_event): Replace usage of first_thread_of with
1417 find_any_thread_of_pid.
1418 * tracepoint.c (same_process_p): Remove.
1419 (gdb_agent_about_to_close): Replace usage of same_process_p with
1420 find_any_thread_of_pid.
1421 * linux-x86-low.c (same_process_callback): Remove.
1422 (x86_arch_setup_process_callback): Replace usage of
1423 same_process_callback with find_any_thread_of_pid.
1424 * thread-db.c (any_thread_of): Remove.
1425 (switch_to_process): Replace usage of any_thread_of with
1426 find_any_thread_of_pid.
1427 * inferiors.c (thread_pid_matches_callback): Remove.
1428 (find_thread_process): Adjust to use find_any_thread_of_pid.
1430 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1432 * regcache.c (get_thread_regcache): Guard calls to "memset"
1435 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1437 * linux-low.c (handle_extended_wait): Use
1438 "allocate_target_description" instead of "XNEW".
1439 * linux-x86-low.c (initialize_low_arch): Likewise.
1441 2017-09-05 Yao Qi <yao.qi@linaro.org>
1443 * configure.srv (srv_i386_regobj): Remove.
1444 (srv_amd64_regobj): Remove.
1445 (srv_regobj): Set it to "" for x86 non-linux targets.
1446 * linux-x86-tdesc.c (i386_linux_read_description):
1447 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1448 (init_registers_i386): Remove the declaration.
1449 (tdesc_i386): Remove the declaration.
1450 (lynx_i386_arch_setup): Call i386_create_target_description.
1451 * nto-x86-low.c: Likewise.
1452 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1453 [!__x86_64__]: include arch/i386.h.
1454 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1456 2017-09-05 Yao Qi <yao.qi@linaro.org>
1458 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1459 i386/amd64-XXX-linux from it.
1461 2017-09-05 Yao Qi <yao.qi@linaro.org>
1463 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1465 (ipa_amd64_linux_regobj): Remove.
1466 (ipa_x32_linux_regobj): Remove.
1468 2017-09-05 Yao Qi <yao.qi@linaro.org>
1470 * Makefile.in (arch-amd64.o): New rule.
1471 * configure.srv: Append arch-amd64.o.
1472 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1473 (get_ipa_tdesc): Call amd64_linux_read_description.
1474 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1475 and init_registers_amd64_XXX.
1476 * linux-x86-low.c (x86_linux_read_description): Call
1477 amd64_linux_read_description.
1478 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1479 (initialize_low_arch): Don't call init_registers_x32_XXX and
1480 init_registers_amd64_XXX.
1481 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1482 and tdesc_amd64_XXX.
1483 [__x86_64__] (amd64_tdesc_test): New function.
1484 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1485 and init_registers_amd64_XXX.
1486 * linux-x86-tdesc.c: Include arch/amd64.h.
1487 (xcr0_to_tdesc_idx): New function.
1488 (i386_linux_read_description): New function.
1489 (amd64_get_ipa_tdesc_idx): New function.
1490 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1491 (amd64_get_ipa_tdesc): Declare.
1493 2017-09-05 Yao Qi <yao.qi@linaro.org>
1495 * configure.srv (srv_i386_linux_xmlfiles): Remove
1496 i386/i386-XXX-linux.xml from it.
1498 2017-09-05 Yao Qi <yao.qi@linaro.org>
1500 * configure.srv: Set srv_i386_linux_regobj empty if $development
1502 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1503 initialize_low_tdesc.
1504 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1505 with #if initialize_low_tdesc.
1506 * linux-x86-tdesc-selftest.c: New file.
1507 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1509 2017-09-05 Yao Qi <yao.qi@linaro.org>
1511 * Makefile.in (arch-i386.o): New rule.
1512 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1513 (x86_64-*-linux*): Likewise.
1514 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1515 include arch/i386.h.
1516 (i386_linux_read_description): Remove code and call
1517 i386_create_target_description.
1518 * tdesc.c (allocate_target_description): New function.
1519 * tdesc.h (set_tdesc_architecture): Remove declaration.
1520 (set_tdesc_osabi): Likewise.
1522 2017-09-05 Yao Qi <yao.qi@linaro.org>
1524 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1525 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1526 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1528 * server.c (get_features_xml): Call tdesc_get_features_xml.
1529 * tdesc.c (set_tdesc_architecture): New function.
1530 (set_tdesc_osabi): New function.
1531 (tdesc_get_features_xml): New function.
1532 (tdesc_create_feature): Add an argument.
1533 * tdesc.h (struct target_desc) <features>: New field.
1534 <arch, osabi>: New field.
1535 (~target_desc): xfree features, arch, and osabi.
1536 (target_desc::oerator==): Don't compare .xmltarget.
1537 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1538 (set_tdesc_osabi): Likewise.
1539 (tdesc_get_features_xml): Likewise.
1541 2017-09-05 Yao Qi <yao.qi@linaro.org>
1543 * linux-x86-tdesc.c: Include selftest.h.
1544 (i386_tdesc_test): New function.
1545 (initialize_low_tdesc): Call selftests::register_test.
1546 * tdesc.h: Include regdef.h.
1547 (target_desc): Override operator == and !=.
1549 2017-09-05 Yao Qi <yao.qi@linaro.org>
1551 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1552 (ipa_obj): Likewise.
1553 * linux-i386-ipa.c: Include common/x86-xstate.h
1554 (get_ipa_tdesc): Call i386_linux_read_description.
1555 (initialize_low_tracepoint): Don't call init_registers_XXX
1556 functions, call initialize_low_tdesc instead.
1557 * linux-x86-low.c (x86_linux_read_description): Call
1558 i386_linux_read_description.
1559 (initialize_low_arch): Don't call init_registers_i386_XXX
1560 functions, call initialize_low_tdesc.
1561 * linux-x86-tdesc.c: New file.
1562 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1563 (i386_get_ipa_tdesc_idx): Declare.
1564 (i386_get_ipa_tdesc): Declare.
1565 (initialize_low_tdesc): Declare.
1567 2017-09-05 Yao Qi <yao.qi@linaro.org>
1569 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1572 2017-09-05 Yao Qi <yao.qi@linaro.org>
1574 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1575 * regcache.c (get_thread_regcache): Use VEC_length.
1576 (init_register_cache): Likewise.
1577 (regcache_cpy): Likewise.
1578 (registers_to_string): Iterate reg_defs via VEC_iterate.
1579 (find_regno): Likewise.
1580 (find_register_by_number): Use VEC_index.
1581 (register_size): Call find_register_by_number.
1582 (register_data): Call find_register_by_number.
1583 (supply_regblock): Use VEC_length.
1584 (regcache_raw_read_unsigned): Likewise.
1585 * tdesc.c (init_target_desc): Iterate reg_defs via
1587 (default_description): Update initializer.
1588 (copy_target_description): Don't update field num_registers.
1589 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1590 <num_registers>: Remove.
1592 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1594 * Makefile.in (.SECONDARY): Define target.
1596 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1598 * linux-low.c (linux_wait_1): Adjust.
1599 * server.c (queue_stop_reply_callback): Adjust.
1601 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1603 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1604 QEnvironmentUnset and QEnvironmentReset packets.
1605 (handle_query): Inform remote that QEnvironmentHexEncoded,
1606 QEnvironmentUnset and QEnvironmentReset are supported.
1608 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1610 * inferiors.h (inferior_target_data): Rename to ...
1611 (thread_target_data): ... this.
1612 (inferior_regcache_data): Rename to ...
1613 (thread_regcache_data): ... this.
1614 (set_inferior_regcache_data): Rename to ...
1615 (set_thread_regcache_data): ... this.
1616 * inferiors.c (inferior_target_data): Rename to ...
1617 (thread_target_data): ... this.
1618 (inferior_regcache_data): Rename to ...
1619 (thread_regcache_data): ... this.
1620 (set_inferior_regcache_data): Rename to ...
1621 (set_thread_regcache_data): ... this.
1622 (free_one_thread): Update.
1623 * linux-low.h (get_thread_lwp): Update.
1624 * regcache.c (get_thread_regcache): Update.
1625 (regcache_invalidate_thread): Update.
1626 (free_register_cache_thread): Update.
1627 * win32-i386-low.c (update_debug_registers_callback): Update.
1628 (win32_get_current_dr): Update.
1629 * win32-low.c (thread_rec): Update.
1630 (delete_thread_info): Update.
1631 (continue_one_thread): Update.
1632 (suspend_one_thread): Update.
1634 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1636 * inferiors.c (set_inferior_target_data): Remove.
1637 * inferiors.h (set_inferior_target_data): Remove.
1639 2017-08-18 Yao Qi <yao.qi@linaro.org>
1641 * Makefile.in (OBS): Add selftest.o.
1642 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1643 * configure, config.in: Re-generated.
1644 * server.c: Include common/sefltest.h.
1645 (captured_main): Handle option --selftest.
1647 2017-08-09 Yao Qi <yao.qi@linaro.org>
1649 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1650 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1651 i386-avx-mpx.o and i386-mmx.o.
1652 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1653 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1654 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1655 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1656 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1657 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1658 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1659 i386/amd64-avx-mpx.xml.
1661 2017-08-09 Yao Qi <yao.qi@linaro.org>
1663 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1664 and x32-avx-avx512.o.
1665 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1666 i386/x32-avx-avx512.xml.
1668 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1670 * tracepoint.h (enum class fast_tpoint_collect_result): New
1672 (fast_tracepoint_collecting): Change return type to
1673 fast_tpoint_collect_result.
1674 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1675 * linux-low.h: Include tracepoint.h.
1676 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1677 fast_tpoint_collect_result.
1678 * linux-low.c (handle_tracepoints): Adjust.
1679 (linux_fast_tracepoint_collecting): Change return type to
1680 fast_tpoint_collect_result.
1681 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1682 linux_wait_1, stuck_in_jump_pad_callback,
1683 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1684 proceed_one_lwp): Adjust to type change.
1686 2017-07-10 Yao Qi <yao.qi@linaro.org>
1688 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1690 2017-06-29 Yao Qi <yao.qi@linaro.org>
1692 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1694 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1696 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1698 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1700 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1702 * linux-low.c (linux_create_inferior): Adjust code to access the
1703 environment information via 'gdb_environ' class.
1704 * lynx-low.c (lynx_create_inferior): Likewise.
1705 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1706 (get_environ): Return a pointer to 'our_environ'.
1707 (captured_main): Initialize 'our_environ'.
1708 * server.h (get_environ): Adjust prototype.
1709 * spu-low.c (spu_create_inferior): Adjust code to access the
1710 environment information via 'gdb_environ' class.
1712 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1714 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1715 usage of "register" keyword.
1717 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1719 * configure: Re-generate.
1721 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1723 * configure: Re-generate.
1725 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1727 * Makefile.in (COMPILE.pre): Add "-x c++".
1729 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1731 * fork-child.c: Conditionally include <signal.h>.
1733 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1735 * server.c (handle_general_set): Handle new packet
1736 "QStartupWithShell".
1737 (handle_query): Add "QStartupWithShell" to the list of supported
1739 (gdbserver_usage): Add help text explaining the
1740 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1742 (captured_main): Recognize and act upon the presence of the new
1745 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1746 Pedro Alves <palves@redhat.com>
1748 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1749 * configure: Regenerate.
1750 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1752 (i[34567]86-*-lynxos*): Likewise.
1753 (spu*-*-*): Likewise.
1754 * fork-child.c: New file.
1755 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1757 (linux_ptrace_fun): New function.
1758 (linux_create_inferior): Adjust function prototype to reflect
1759 change on "target.h". Adjust function code to use
1761 (linux_request_interrupt): Delete "signal_pid".
1762 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1763 (lynx_ptrace_fun): New function.
1764 (lynx_create_inferior): Adjust function prototype to reflect
1765 change on "target.h". Adjust function code to use
1767 * nto-low.c (nto_create_inferior): Adjust function prototype and
1768 code to reflect change on "target.h". Update comments.
1769 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1770 "common-terminal.h" and "environ.h".
1771 (terminal_fd): Moved to fork-child.c.
1772 (old_foreground_pgrp): Likewise.
1773 (restore_old_foreground_pgrp): Likewise.
1774 (last_status): Make it global.
1775 (last_ptid): Likewise.
1776 (our_environ): New variable.
1777 (startup_with_shell): Likewise.
1778 (program_name): Likewise.
1779 (program_argv): Rename to...
1780 (program_args): ...this.
1781 (wrapper_argv): New variable.
1782 (start_inferior): Delete function.
1783 (get_exec_wrapper): New function.
1784 (get_exec_file): Likewise.
1785 (get_environ): Likewise.
1786 (prefork_hook): Likewise.
1787 (post_fork_inferior): Likewise.
1788 (postfork_hook): Likewise.
1789 (postfork_child_hook): Likewise.
1790 (handle_v_run): Update code to deal with arguments coming from the
1791 remote host. Update calls from "start_inferior" to
1793 (captured_main): Likewise. Initialize environment variable. Call
1795 * server.h (post_fork_inferior): New prototype.
1796 (get_environ): Likewise.
1797 (last_status): Declare.
1798 (last_ptid): Likewise.
1799 (signal_pid): Likewise.
1800 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1801 (spu_ptrace_fun): New function.
1802 (spu_create_inferior): Adjust function prototype to reflect change
1803 on "target.h". Adjust function code to use "fork_inferior".
1804 * target.c (target_terminal_init): New function.
1805 (target_terminal_inferior): Likewise.
1806 (target_terminal_ours): Likewise.
1807 * target.h: Include <vector>.
1808 (struct target_ops) <create_inferior>: Update prototype.
1809 (create_inferior): Update macro.
1810 * utils.c (gdb_flush_out_err): New function.
1811 * win32-low.c (win32_create_inferior): Adjust function prototype
1812 and code to reflect change on "target.h".
1814 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1816 * inferiors.c (switch_to_thread): New function.
1818 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1820 * Makefile.in (SFILE): Add "common/job-control.c".
1821 (OBS): Add "job-control.o".
1823 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1825 * Makefile: Remove "@host_makefile_frag@".
1827 2017-05-05 Pedro Alves <palves@redhat.com>
1829 * configure: Regenerate.
1831 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1833 * configure: Regenerate.
1835 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1837 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1838 software_single_step change of return type to
1839 std::vector<CORE_ADDR>.
1840 * linux-low.c (install_software_single_step_breakpoints):
1842 * linux-low.h (install_software_single_step_breakpoints):
1845 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1847 * remote-utils.c: Include "gdb_termios.h" instead of
1849 * terminal.h: Delete file.
1851 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1853 * server.c: Include <vector>.
1854 <program_argv, wrapper_argv>: Convert to std::vector.
1855 (start_inferior): Rewrite function to use C++.
1856 (handle_v_run): Likewise. Update code that calculates the argv
1857 based on the vRun packet; use C++.
1858 (captured_main): Likewise.
1860 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1862 * server.c (handle_v_cont): Initialize thread_resume::thread
1865 2017-04-05 Pedro Alves <palves@redhat.com>
1867 * configure: Regenerate.
1869 2017-04-05 Pedro Alves <palves@redhat.com>
1871 * gdbreplay.c (sync_error): Constify.
1872 * linux-x86-low.c (push_opcode): Constify.
1874 2017-04-05 Pedro Alves <palves@redhat.com>
1876 * win32-low.c (get_child_debug_event)
1877 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1878 Report TARGET_WAITKIND_SPURIOUS instead.
1880 2017-04-05 Pedro Alves <palves@redhat.com>
1882 * remote-utils.c (remote_prepare, remote_open): Constify.
1883 * remote-utils.h (remote_prepare, remote_open): Constify.
1884 * server.c (captured_main): Constify 'port' handling.
1886 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1888 * Makefile.in (clean): Clear .deps.
1890 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1892 * .gitignore: Remove generated files, replace with wildcard.
1893 * (clean): Replace removal of generated files with wildcard.
1894 (version.c): Replace with...
1895 (version-generated.c): ...this.
1896 (xml-builtin.c): Replace with...
1897 (xml-builtin-generated.c): ...this.
1898 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1899 (%.c: *regformats*): Replace with...
1900 (%-generated.c: *regformats*): ...this.
1902 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1904 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1905 (xtensa_fill_gregset): Call collect_register_by_name for
1907 (xtensa_store_gregset): Call supply_register_by_name for
1910 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1912 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1913 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1914 (xtensa_store_gregset): Call supply_register for all registers in
1915 a0_regnum..a0_regnum + C0_NREGS range.
1917 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1919 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1920 (ax-ipa.o: ax.c): Remove.
1921 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1922 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1923 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1924 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1925 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1927 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1929 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1930 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1931 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1932 (errors-ipa.o: ../common/errors.c): Remove.
1933 (format-ipa.o: ../common/format.c): Remove.
1934 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1936 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1938 * Makefile.in (%-ipa.o: %.c): New rule.
1939 (tracepoint-ipa.o: tracepoint.c): Remove.
1940 (utils-ipa.o: utils.c): Remove.
1941 (remote-utils-ipa.o: remote-utils.c): Remove.
1942 (regcache-ipa.o: regcache.c): Remove.
1943 (i386-linux-ipa.o: i386-linux.c): Remove.
1944 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1945 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1946 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1947 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1948 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1949 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1950 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1951 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1952 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1953 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1954 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1955 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1956 (aarch64-ipa.o: aarch64.c): Remove.
1957 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1958 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1959 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1960 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1961 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1962 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1963 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1964 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1965 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1966 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1967 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1968 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1969 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1970 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1971 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1972 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1973 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1974 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1975 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1976 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1977 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1978 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1979 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1980 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1981 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1982 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1983 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1984 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1985 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1986 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1987 (tdesc-ipa.o: tdesc.c): Remove.
1988 (x32-linux-ipa.o: x32-linux.c): Remove.
1989 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1990 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1992 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1994 * Makefile.in (%.o: ../arch/%.c): New rule.
1995 (arm.o: ../arch/arm.c): Remove.
1996 (arm-linux.o: ../arch/arm-linux.c): Remove.
1997 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1998 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2000 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2002 * Makefile.in (%.o: ../nat/%.c): New rule.
2003 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2004 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2005 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2006 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2007 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2008 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2009 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2010 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2011 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2012 (linux-personality.o: ../nat/linux-personality.c): Remove.
2013 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2014 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2015 (x86-linux.o: ../nat/x86-linux.c): Remove.
2016 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2017 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2019 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2021 * Makefile.in (%.o: ../common/%.c): New rule.
2022 (signals.o: ../common/signals.c): Remove.
2023 (print-utils.o: ../common/print-utils.c): Remove.
2024 (rsp-low.o: ../common/rsp-low.c): Remove.
2025 (common-utils.o: ../common/common-utils.c): Remove.
2026 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2027 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2028 (vec.o: ../common/vec.c): Remove.
2029 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2030 (xml-utils.o: ../common/xml-utils.c): Remove.
2031 (ptid.o: ../common/ptid.c): Remove.
2032 (buffer.o: ../common/buffer.c): Remove.
2033 (format.o: ../common/format.c): Remove.
2034 (filestuff.o: ../common/filestuff.c): Remove.
2035 (agent.o: ../common/agent.c): Remove.
2036 (errors.o: ../common/errors.c): Remove.
2037 (environ.o: ../common/environ.c): Remove.
2038 (common-debug.o: ../common/common-debug.c): Remove.
2039 (cleanups.o: ../common/cleanups.c): Remove.
2040 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2041 (fileio.o: ../common/fileio.c): Remove.
2042 (common-regcache.o: ../common/common-regcache.c): Remove.
2043 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2044 (new-op.o: ../common/new-op.c): Remove.
2045 (btrace-common.o: ../common/btrace-common.c): Remove.
2047 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2049 * Makefile.in (%.o: ../target/%.c): New rule.
2050 (waitstatus.o: ../target/waitstatus.c): Remove.
2052 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2055 (%.c: ../regformats/%.dat,
2056 (%.c: ../regformats/arm/%.dat,
2057 (%.c: ../regformats/i386/%.dat,
2058 (%.c: ../regformats/rs6000/%.dat): New rules.
2059 (aarch64.c): Remove.
2060 (reg-arm.c): Remove.
2061 (arm-with-iwmmxt.c): Remove.
2062 (arm-with-vfpv2.c): Remove.
2063 (arm-with-vfpv3.c): Remove.
2064 (arm-with-neon.c): Remove.
2065 (reg-bfin.c): Remove.
2066 (reg-cris.c): Remove.
2067 (reg-crisv32.c): Remove.
2069 (i386-linux.c): Remove.
2070 (i386-avx.c): Remove.
2071 (i386-avx-linux.c): Remove.
2072 (i386-avx-avx512.c): Remove.
2073 (i386-avx-avx512-linux.c): Remove.
2074 (i386-mpx.c): Remove.
2075 (i386-mpx-linux.c): Remove.
2076 (i386-avx-mpx-avx512-pku.c): Remove.
2077 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2078 (i386-avx-mpx.c): Remove.
2079 (i386-avx-mpx-linux.c): Remove.
2080 (i386-mmx.c): Remove.
2081 (i386-mmx-linux.c): Remove.
2082 (reg-ia64.c): Remove.
2083 (reg-m32r.c): Remove.
2084 (reg-m68k.c): Remove.
2086 (mips-linux.c): Remove.
2087 (mips-dsp-linux.c): Remove.
2088 (mips64-linux.c): Remove.
2089 (mips64-dsp-linux.c): Remove.
2090 (nios2-linux.c): Remove.
2091 (powerpc-32.c): Remove.
2092 (powerpc-32l.c): Remove.
2093 (powerpc-altivec32l.c): Remove.
2094 (powerpc-cell32l.c): Remove.
2095 (powerpc-vsx32l.c): Remove.
2096 (powerpc-isa205-32l.c): Remove.
2097 (powerpc-isa205-altivec32l.c): Remove.
2098 (powerpc-isa205-vsx32l.c): Remove.
2099 (powerpc-e500l.c): Remove.
2100 (powerpc-64l.c): Remove.
2101 (powerpc-altivec64l.c): Remove.
2102 (powerpc-cell64l.c): Remove.
2103 (powerpc-vsx64l.c): Remove.
2104 (powerpc-isa205-64l.c): Remove.
2105 (powerpc-isa205-altivec64l.c): Remove.
2106 (powerpc-isa205-vsx64l.c): Remove.
2107 (s390-linux32.c): Remove.
2108 (s390-linux32v1.c): Remove.
2109 (s390-linux32v2.c): Remove.
2110 (s390-linux64.c): Remove.
2111 (s390-linux64v1.c): Remove.
2112 (s390-linux64v2.c): Remove.
2113 (s390-te-linux64.c): Remove.
2114 (s390-vx-linux64.c): Remove.
2115 (s390-tevx-linux64.c): Remove.
2116 (s390x-linux64.c): Remove.
2117 (s390x-linux64v1.c): Remove.
2118 (s390x-linux64v2.c): Remove.
2119 (s390x-te-linux64.c): Remove.
2120 (s390x-vx-linux64.c): Remove.
2121 (s390x-tevx-linux64.c): Remove.
2122 (tic6x-c64xp-linux.c): Remove.
2123 (tic6x-c64x-linux.c): Remove.
2124 (tic6x-c62x-linux.c): Remove.
2126 (reg-sparc64.c): Remove.
2127 (reg-spu.c): Remove.
2129 (amd64-linux.c): Remove.
2130 (amd64-avx.c): Remove.
2131 (amd64-avx-linux.c): Remove.
2132 (amd64-avx-avx512.c): Remove.
2133 (amd64-avx-avx512-linux.c): Remove.
2134 (amd64-mpx.c): Remove.
2135 (amd64-mpx-linux.c): Remove.
2136 (amd64-avx-mpx-avx512-pku.c): Remove.
2137 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2138 (amd64-avx-mpx.c): Remove.
2139 (amd64-avx-mpx-linux.c): Remove.
2141 (x32-linux.c): Remove.
2142 (x32-avx.c): Remove.
2143 (x32-avx-linux.c): Remove.
2144 (x32-avx-avx512.c): Remove.
2145 (x32-avx-avx512-linux.c): Remove.
2146 (reg-xtensa.c): Remove.
2147 (reg-tilegx.c): Remove.
2148 (reg-tilegx32.c): Remove.
2150 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2152 * Makefile.in (SFILES): Add "common/environ.c".
2153 (OBJS): Add "common/environ.h".
2155 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2157 * configure.ac: Check if the fs_base and gs_base members of
2158 `struct user_regs_struct' exist.
2159 * config.in: Regenerated.
2160 * configure: Likewise.
2162 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2164 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2166 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2167 (get_next_pcs_syscall_next_pc): Likewise.
2169 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2171 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2172 * nto-x86-low.c: Likewise.
2174 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2176 * Makefile.in: Include disable-implicit-rules.mk.
2178 2016-11-23 Pedro Alves <palves@redhat.com>
2180 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2181 (debug_vprintf): Use std::chrono::steady_clock instead of
2182 gettimeofday. Use '.' instead of ':'.
2183 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2184 (get_timestamp): Use std::chrono::steady_clock instead of
2187 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2189 * Makefile.in: Fix whitespace formatting.
2191 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2193 * Makefile.in (SFILES, OBS): Flatten list and order
2196 2016-11-23 Pedro Alves <palves@redhat.com>
2198 * event-loop.c (handle_file_event): Use warning.
2199 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2200 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2203 2016-11-23 Pedro Alves <palves@redhat.com>
2205 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2207 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2208 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2209 debug_printf and debug_flush for debug output.
2210 * server.c (handle_general_set): Likewise.
2211 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2214 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2216 * Makefile.in (.c.o): Replace rule with ...
2217 (%.o: %.c): ... this one.
2219 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2221 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2222 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2224 * configure.ac: Remove checks for the make program.
2225 * configure: Re-generate.
2227 2016-10-28 Pedro Alves <palves@redhat.com>
2229 * Makefile.in (CXX_DIALECT): Get from configure.
2230 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2231 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2232 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2233 * config.in: Regenerate.
2234 * configure: Regenerate.
2236 2016-10-27 Yao Qi <yao.qi@linaro.org>
2238 * linux-low.c (linux_supports_range_stepping): Return true if
2239 can_software_single_step return true.
2241 2016-10-27 Yao Qi <yao.qi@linaro.org>
2243 * inferiors.c (find_inferior_in_random): New function.
2244 * inferiors.h (find_inferior_in_random): Declare.
2245 * linux-low.c (linux_wait_for_event_filtered): Call
2246 find_inferior_in_random instead of find_inferior.
2248 2016-10-27 Yao Qi <yao.qi@linaro.org>
2250 * linux-low.c (linux_wait_1): If single-step breakpoints are
2251 inserted, remove them.
2253 2016-10-26 Pedro Alves <palves@redhat.com>
2255 * linux-low.c (handle_extended_wait): Link parent/child fork
2257 (linux_wait_1): Unlink them.
2258 (linux_set_resume_request): Ignore resume requests for
2259 already-resumed and unhandled fork child threads.
2260 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2261 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2263 (handle_v_requests) <vCont>: Don't call require_running.
2264 * server.h (in_queued_stop_replies): New declaration.
2266 2016-10-24 Yao Qi <yao.qi@linaro.org>
2269 * linux-aarch64-low.c (append_insns): Cast the return value to
2272 2016-10-10 Yao Qi <yao.qi@linaro.org>
2274 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2276 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2278 * target.c (target_supports_multi_process): New function, moved
2280 * target.h (target_supports_multi_process): ... here. Remove
2283 2016-10-05 Tom Tromey <tom@tromey.com>
2286 * tracepoint.c (handle_tracepoint_bkpts): Check
2287 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2289 2016-10-05 Yao Qi <yao.qi@linaro.org>
2291 * configure.srv: Update the path of arm-*.xml files.
2293 2016-10-05 Terry Guo <terry.guo@arm.com>
2294 Yao Qi <yao.qi@linaro.org>
2296 * Makefile.in: Adjust the path of rules.
2297 * configure.srv: Update the path of xml files.
2298 * regformats/arm-with-iwmmxt.dat: Regenerated.
2299 * regformats/arm-with-neon.dat: Likewise.
2300 * regformats/arm-with-vfpv2.dat: Likewise.
2301 * regformats/arm-with-vfpv3.dat Likewise.
2303 2016-09-30 Yao Qi <yao.qi@linaro.org>
2306 * target.c (target_stop_and_wait): Don't call
2307 target_continue_no_signal, use resume_stop instead.
2309 2016-09-26 Yao Qi <yao.qi@linaro.org>
2311 * linux-low.c (linux_wait_1): Call debug_exit.
2313 2016-09-23 Pedro Alves <palves@redhat.com>
2315 * Makefile.in (SFILES): Add common/new-op.c.
2316 (OBS): Add common/new-op.o.
2317 (new-op.o): New rule.
2319 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2321 * .gitinore: Ignore more files.
2323 2016-09-21 Yao Qi <yao.qi@linaro.org>
2325 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2328 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2330 * server.c (start_inferior): Call target_mourn_inferior instead of
2331 mourn_inferior; pass ptid_t argument to it.
2333 (handle_target_event): Likewise.
2334 * target.c (target_mourn_inferior): New function.
2335 * target.h (mourn_inferior): Delete macro.
2337 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2339 * linux-low.c (lwp_is_stepping): New function.
2341 2016-09-06 Carl Love <cel@us.ibm.com>
2343 * server.c (start_inferior): Fixed comment, requested comment change
2344 didn't get updated correctly. Removed reference to ptrace () call as
2345 it is only true on Linux systems.
2347 2016-09-06 Carl Love <cel@us.ibm.com>
2349 * server.c (start_inferior): Do not call
2350 function target_post_create_inferior () if the
2351 inferior process has already exited.
2353 2016-09-05 Pedro Alves <palves@redhat.com>
2355 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2356 (COMPILE.pre, CC_LD): Use CXX directly.
2357 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2358 * acinclude.m4: Don't include build-with-cxx.m4.
2359 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2360 * configure: Regenerate.
2362 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2365 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2366 call writing data to own_buf.
2368 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2370 * target.c (mywait): Call target_wait instead of
2372 (target_wait): New function.
2374 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2376 * server.c (start_inferior): New variable 'ptid'. Replace calls
2377 to the_target->resume by target_continue{,_no_signal}, depending
2379 * target.c (target_stop_and_wait): Call target_continue_no_signal
2380 instead of the_target->resume.
2381 (target_continue): New function.
2383 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2385 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2387 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2390 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2392 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2393 * linux-arm-low.c (ps_get_thread_area): Likewise.
2394 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2395 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2396 * linux-mips-low.c (ps_get_thread_area): Likewise.
2397 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2398 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2399 * linux-x86-low.c (ps_get_thread_area): Likewise.
2400 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2402 2016-08-19 Pedro Alves <palves@redhat.com>
2404 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2406 2016-08-19 Pedro Alves <palves@redhat.com>
2408 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2409 comment. Use memcpy instead of casting through unsigned long.
2411 2016-08-19 Pedro Alves <palves@redhat.com>
2413 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2414 allocating around 0x80000000.
2416 2016-08-19 Pedro Alves <palves@redhat.com>
2419 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2420 (x32-avx512-linux-ipa.o): New rules.
2421 * configure.ac (x86_64-*-linux*): New x32 check.
2422 * configure.srv (ipa_x32_linux_regobj): New.
2423 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2424 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2426 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2428 * configure: Regenerate.
2430 2016-08-09 Pedro Alves <palves@redhat.com>
2433 * Makefile.in (OBS): Add signals-state-save-restore.o.
2434 (signals-state-save-restore.o): New rule.
2435 * config.in: Regenerate.
2436 * configure: Regenerate.
2437 * linux-low.c: Include "signals-state-save-restore.h".
2438 (linux_create_inferior): Call
2439 restore_original_signals_state.
2440 * server.c: Include "dispositions-save-restore.h".
2441 (captured_main): Call save_original_signals_state.
2443 2016-08-05 Pedro Alves <palves@redhat.com>
2445 * configure: Regenerate.
2447 2016-08-04 Yao Qi <yao.qi@linaro.org>
2449 * linux-low.c (regsets_fetch_inferior_registers): Check
2450 errno is ESRCH or not.
2452 2016-08-02 Yao Qi <yao.qi@linaro.org>
2454 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2455 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2456 (thread_db_load_search): Update.
2457 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2458 td_ta_set_event and td_ta_event_getmsg.
2460 2016-07-26 Pedro Alves <palves@redhat.com>
2463 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2464 of unsigned long for 64-bit registers and use uint32_t instead of
2465 unsigned int for 32-bit registers.
2467 2016-07-26 Pedro Alves <palves@redhat.com>
2469 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2472 2016-07-21 Tom Tromey <tom@tromey.com>
2474 * configure: Rebuild.
2476 2016-07-21 Yao Qi <yao.qi@linaro.org>
2478 * mem-break.c (find_gdb_breakpoint): Cast bp to
2479 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2481 2016-07-21 Yao Qi <yao.qi@linaro.org>
2483 * server.c (handle_v_requests): Support s and S actions
2484 if target_supports_software_single_step return true.
2486 2016-07-21 Yao Qi <yao.qi@linaro.org>
2488 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2489 is resume_step, call maybe_hw_step.
2490 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2492 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2494 (proceed_one_lwp): If resume request is resume_step, install
2495 reinsert breakpoints and call maybe_hw_step.
2497 2016-07-21 Yao Qi <yao.qi@linaro.org>
2499 * linux-low.c (proceed_one_lwp): Declare.
2500 (linux_resume_one_thread): Remove local variable 'step'.
2501 Lift code enqueue signal. Call proceed_one_lwp instead of
2502 linux_resume_one_lwp.
2504 2016-07-21 Yao Qi <yao.qi@linaro.org>
2506 * linux-low.c (linux_resume_one_thread): Call
2507 enqueue_pending_signal.
2509 2016-07-21 Yao Qi <yao.qi@linaro.org>
2511 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2512 * inferiors.c (do_restore_current_thread_cleanup): New function.
2513 (make_cleanup_restore_current_thread): Likewise.
2514 * linux-low.c (install_software_single_step_breakpoints): Call
2515 make_cleanup_restore_current_thread. Switch current_thread to
2518 2016-07-21 Yao Qi <yao.qi@linaro.org>
2520 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2521 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2522 (clone_one_breakpoint): Likewise.
2523 (delete_reinsert_breakpoints): Change parameter to thread.
2525 (has_reinsert_breakpoints): Likewise.
2526 (uninsert_reinsert_breakpoints): Likewise.
2527 (reinsert_reinsert_breakpoints): Likewise.
2528 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2529 (delete_reinsert_breakpoints): Likewise.
2530 (reinsert_reinsert_breakpoints): Likewise.
2531 (uninsert_reinsert_breakpoints): Likewise.
2532 (has_reinsert_breakpoints): Likewise.
2534 2016-07-21 Yao Qi <yao.qi@linaro.org>
2536 * inferiors.c (get_thread_process): Make parameter const.
2537 * inferiors.h (get_thread_process): Update declaration.
2538 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2539 Add new parameters child_thread and parent_thread. Callers
2541 * mem-break.h (clone_all_breakpoints): Update declaration.
2543 2016-07-21 Yao Qi <yao.qi@linaro.org>
2545 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2546 <command_list, handler>: Remove.
2547 (struct gdb_breakpoint): New.
2548 (struct other_breakpoint): New.
2549 (struct reinsert_breakpoint): New.
2550 (is_gdb_breakpoint): New function.
2551 (any_persistent_commands): Update command_list if
2552 is_gdb_breakpoint returns true.
2553 (set_breakpoint): Create breakpoints according to their types.
2554 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2555 (set_gdb_breakpoint_1): Likewise.
2556 (set_gdb_breakpoint): Likewise.
2557 (clear_breakpoint_conditions): Change parameter type to
2558 'struct gdb_breakpoint *'.
2559 (clear_breakpoint_commands): Likewise.
2560 (clear_breakpoint_conditions_and_commands): Likewise.
2561 (add_condition_to_breakpoint): Likewise.
2562 (add_breakpoint_condition): Likewise.
2563 (add_commands_to_breakpoint): Likewise.
2564 (check_breakpoints): Check other_breakpoint.
2565 (clone_one_breakpoint): Clone breakpopint according to its type.
2566 * mem-break.h (struct gdb_breakpoint): Declare.
2567 (set_gdb_breakpoint): Update declaration.
2568 (clear_breakpoint_conditions_and_commands): Likewise.
2569 (add_breakpoint_condition): Likewise.
2570 (add_breakpoint_commands): Likewise.
2571 * server.c (process_point_options): Change parameter type to
2572 'struct gdb_breakpoint *'.
2574 2016-07-21 Yao Qi <yao.qi@linaro.org>
2576 * mem-break.c (set_breakpoint_at): Rename it to ...
2577 (set_breakpoint_type_at): ... it.
2578 (set_breakpoint_at): Call set_breakpoint_type_at.
2579 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2580 * mem-break.h (set_breakpoint_at): Update comments.
2582 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2584 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2586 (nios2_store_gregset): Likewise.
2588 2016-07-01 Pedro Alves <palves@redhat.com>
2589 Antoine Tremblay <antoine.tremblay@ericsson.com>
2591 * linux-low.c: Change interface to take the target lwp_info
2592 pointer directly and return void. Handle detaching from a zombie
2594 (linux_detach_lwp_callback): New function.
2595 (linux_detach): Detach from the leader thread after detaching from
2598 2016-06-28 Yao Qi <yao.qi@linaro.org>
2600 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2601 for variable new_offset.
2602 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2603 (aarch64_ftrace_insn_reloc_cb): Likewise.
2604 (aarch64_ftrace_insn_reloc_tb): Likewise.
2605 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2606 PRIx64 instead of PRIx32.
2608 2016-06-28 Yao Qi <yao.qi@linaro.org>
2610 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2611 (the_low_target): Install arm_get_syscall_trapinfo.
2613 2016-06-28 Yao Qi <yao.qi@linaro.org>
2615 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2617 (the_low_target): Install aarch64_get_syscall_trapinfo.
2619 2016-06-28 Yao Qi <yao.qi@linaro.org>
2621 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2623 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2624 Remove parameter sysno.
2625 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2628 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2630 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2631 (s390_emit_ne_goto): Likewise.
2632 (s390_emit_lt_goto): Likewise.
2633 (s390_emit_le_goto): Likewise.
2634 (s390_emit_gt_goto): Likewise.
2635 (s390_emit_ge_goto): Likewise.
2636 (s390x_emit_eq_goto): Likewise.
2637 (s390x_emit_ne_goto): Likewise.
2638 (s390x_emit_lt_goto): Likewise.
2639 (s390x_emit_le_goto): Likewise.
2640 (s390x_emit_gt_goto): Likewise.
2641 (s390x_emit_ge_goto): Likewise.
2642 (s390_emit_ops_impl): Mark variable static.
2643 (s390x_emit_ops): Likewise.
2645 2016-06-17 Yao Qi <yao.qi@linaro.org>
2647 * linux-low.c (handle_extended_wait): Call
2648 uninsert_reinsert_breakpoints for the parent process. Remove
2649 reinsert breakpoints from the child process. Reinsert them to
2650 the parent process when vfork is done.
2651 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2652 (reinsert_reinsert_breakpoints): New function.
2653 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2654 (reinsert_reinsert_breakpoints): Declare.
2656 2016-06-17 Yao Qi <yao.qi@linaro.org>
2658 * linux-low.c (handle_extended_wait): If the parent is doing
2659 step-over, remove the reinsert breakpoints from the forked child.
2661 2016-06-17 Yao Qi <yao.qi@linaro.org>
2663 * linux-low.c (unsuspend_all_lwps): Declare.
2664 (linux_low_filter_event): If thread exited, call finish_step_over.
2665 If step-over is finished, unsuspend other threads.
2667 2016-06-17 Yao Qi <yao.qi@linaro.org>
2669 * linux-low.c (linux_resume_one_lwp_throw): Assert
2670 has_reinsert_breakpoints returns false.
2671 * mem-break.c (delete_disabled_breakpoints): Assert
2672 bp type isn't reinsert_breakpoint.
2674 2016-06-17 Yao Qi <yao.qi@linaro.org>
2676 * linux-low.c (maybe_hw_step): New function.
2677 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2678 (finish_step_over): Switch current_thread to lwp temporarily,
2679 and assert has_reinsert_breakpoints returns true.
2680 (proceed_one_lwp): Call maybe_hw_step.
2681 * mem-break.c (has_reinsert_breakpoints): New function.
2682 * mem-break.h (has_reinsert_breakpoints): Declare.
2684 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2686 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2688 2016-05-17 Yao Qi <yao.qi@linaro.org>
2690 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2691 instead of find_inferior.
2693 2016-05-05 Yao Qi <yao.qi@linaro.org>
2695 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2696 Initialize res to zero.
2698 2016-05-05 Yao Qi <yao.qi@linaro.org>
2700 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2703 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2705 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2706 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2707 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2709 2016-04-28 Par Olsson <par.olsson@windriver.com>
2710 Simon Marchi <simon.marchi@ericsson.com>
2712 * tracepoint.c (write_inferior_int8): New function.
2713 (cmd_qtenable_disable): Write enable flag using
2714 write_inferior_int8.
2716 2016-04-25 Yao Qi <yao.qi@linaro.org>
2718 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2719 (need_step_over_p): Return zero if the LWP has pending signals
2720 can be delivered on software single step target.
2722 2016-04-25 Yao Qi <yao.qi@linaro.org>
2724 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2725 return instead of error.
2727 2016-04-22 Yao Qi <yao.qi@linaro.org>
2729 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2732 2016-04-22 Yao Qi <yao.qi@linaro.org>
2734 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2735 signal when stepping over breakpoint with software single
2738 2016-04-21 Pedro Alves <palves@redhat.com>
2740 * linux-s390-low.c (s390_collect_ptrace_register)
2741 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2743 (s390_check_regset): Use void * instead of gdb_byte *.
2745 2016-04-20 Pedro Alves <palves@redhat.com>
2747 * configure: Renegerate.
2749 2016-04-20 Yao Qi <yao.qi@linaro.org>
2751 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2752 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2754 (arm_store_gregset): Likewise.
2756 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2758 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2759 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2760 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2761 (amd64-avx-mpx-linux.c): New rules.
2762 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2763 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2764 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2765 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2766 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2767 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2768 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2769 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2770 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2771 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2772 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2773 * linux-x86-low.c (x86_linux_read_description): Add case for
2774 X86_XSTATE_AVX_MPX_MASK.
2775 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2776 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2777 init_registers_i386_avx_mpx_linux.
2778 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2779 (initialize_low_tracepoint): Call
2780 init_registers_i386_avx_mpx_linux.
2781 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2782 (initialize_low_tracepoint): Call
2783 init_registers_amd64_avx_mpx_linux.
2784 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2785 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2786 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2789 2016-04-18 Pedro Alves <palves@redhat.com>
2791 * configure: Regenerate.
2793 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2795 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2796 (aarch64_emit_sub): Likewise.
2798 2016-04-12 Pedro Alves <palves@redhat.com>
2800 * utils.c (prepare_to_throw_exception): Delete.
2802 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2804 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2806 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2808 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2810 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2812 * linux-aarch64-ipa.c: Add <elf.h> include.
2813 * linux-ppc-ipa.c: Add <elf.h> include.
2814 * linux-s390-ipa.c: Add <elf.h> include.
2816 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2818 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2819 (get_raw_reg_ptr): Likewise.
2820 (get_trace_state_variable_value_ptr): Likewise.
2821 (set_trace_state_variable_value_ptr): Likewise.
2822 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2825 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2826 Marcin Kościelnicki <koriakin@0x04.net>
2829 * linux-ppc-low.c (emit_insns): New function.
2830 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2831 (ppc_emit_prologue): New function.
2832 (ppc_emit_epilogue): New function.
2833 (ppc_emit_add): New function.
2834 (ppc_emit_sub): New function.
2835 (ppc_emit_mul): New function.
2836 (ppc_emit_lsh): New function.
2837 (ppc_emit_rsh_signed): New function.
2838 (ppc_emit_rsh_unsigned): New function.
2839 (ppc_emit_ext): New function.
2840 (ppc_emit_zero_ext): New function.
2841 (ppc_emit_log_not): New function.
2842 (ppc_emit_bit_and): New function.
2843 (ppc_emit_bit_or): New function.
2844 (ppc_emit_bit_xor): New function.
2845 (ppc_emit_bit_not): New function.
2846 (ppc_emit_equal): New function.
2847 (ppc_emit_less_signed): New function.
2848 (ppc_emit_less_unsigned): New function.
2849 (ppc_emit_ref): New function.
2850 (ppc_emit_const): New function.
2851 (ppc_emit_reg): New function.
2852 (ppc_emit_pop): New function.
2853 (ppc_emit_stack_flush): New function.
2854 (ppc_emit_swap): New function.
2855 (ppc_emit_stack_adjust): New function.
2856 (ppc_emit_call): New function.
2857 (ppc_emit_int_call_1): New function.
2858 (ppc_emit_void_call_2): New function.
2859 (ppc_emit_if_goto): New function.
2860 (ppc_emit_goto): New function.
2861 (ppc_emit_eq_goto): New function.
2862 (ppc_emit_ne_goto): New function.
2863 (ppc_emit_lt_goto): New function.
2864 (ppc_emit_le_goto): New function.
2865 (ppc_emit_gt_goto): New function.
2866 (ppc_emit_ge_goto): New function.
2867 (ppc_write_goto_address): New function.
2868 (ppc_emit_ops_impl): New static variable.
2869 (ppc64v1_emit_prologue): New function.
2870 (ppc64v2_emit_prologue): New function.
2871 (ppc64_emit_epilogue): New function.
2872 (ppc64_emit_add): New function.
2873 (ppc64_emit_sub): New function.
2874 (ppc64_emit_mul): New function.
2875 (ppc64_emit_lsh): New function.
2876 (ppc64_emit_rsh_signed): New function.
2877 (ppc64_emit_rsh_unsigned): New function.
2878 (ppc64_emit_ext): New function.
2879 (ppc64_emit_zero_ext): New function.
2880 (ppc64_emit_log_not): New function.
2881 (ppc64_emit_bit_and): New function.
2882 (ppc64_emit_bit_or): New function.
2883 (ppc64_emit_bit_xor): New function.
2884 (ppc64_emit_bit_not): New function.
2885 (ppc64_emit_equal): New function.
2886 (ppc64_emit_less_signed): New function.
2887 (ppc64_emit_less_unsigned): New function.
2888 (ppc64_emit_ref): New function.
2889 (ppc64_emit_const): New function.
2890 (ppc64v1_emit_reg): New function.
2891 (ppc64v2_emit_reg): New function.
2892 (ppc64_emit_pop): New function.
2893 (ppc64_emit_stack_flush): New function.
2894 (ppc64_emit_swap): New function.
2895 (ppc64v1_emit_call): New function.
2896 (ppc64v2_emit_call): New function.
2897 (ppc64v1_emit_int_call_1): New function.
2898 (ppc64v2_emit_int_call_1): New function.
2899 (ppc64v1_emit_void_call_2): New function.
2900 (ppc64v2_emit_void_call_2): New function.
2901 (ppc64_emit_if_goto): New function.
2902 (ppc64_emit_eq_goto): New function.
2903 (ppc64_emit_ne_goto): New function.
2904 (ppc64_emit_lt_goto): New function.
2905 (ppc64_emit_le_goto): New function.
2906 (ppc64_emit_gt_goto): New function.
2907 (ppc64_emit_ge_goto): New function.
2908 (ppc64v1_emit_ops_impl): New static variable.
2909 (ppc64v2_emit_ops_impl): New static variable.
2910 (ppc_emit_ops): New function.
2911 (linux_low_target): Wire in ppc_emit_ops.
2913 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2914 Marcin Kościelnicki <koriakin@0x04.net>
2917 * Makefile.in: Add powerpc-*-ipa.o
2918 * configure.srv: Add ipa_obj for powerpc*-linux.
2919 * linux-ppc-ipa.c: New file.
2920 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2922 (PPC_FIELD): New macro.
2923 (PPC_SEXT): New macro.
2924 (PPC_OP6): New macro.
2925 (PPC_BO): New macro.
2926 (PPC_LI): New macro.
2927 (PPC_BD): New macro.
2928 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2929 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2930 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2931 (ppc_get_thread_area): New function.
2932 (is_elfv2_inferior): New function.
2933 (gen_ds_form): New function.
2934 (GEN_STD): New macro.
2935 (GEN_STDU): New macro.
2936 (GEN_LD): New macro.
2937 (GEN_LDU): New macro.
2938 (gen_d_form): New function.
2939 (GEN_ADDI): New macro.
2940 (GEN_ADDIS): New macro.
2941 (GEN_LI): New macro.
2942 (GEN_LIS): New macro.
2943 (GEN_ORI): New macro.
2944 (GEN_ORIS): New macro.
2945 (GEN_LWZ): New macro.
2946 (GEN_STW): New macro.
2947 (GEN_STWU): New macro.
2948 (gen_xfx_form): New function.
2949 (GEN_MFSPR): New macro.
2950 (GEN_MTSPR): New macro.
2951 (GEN_MFCR): New macro.
2952 (GEN_MTCR): New macro.
2953 (GEN_SYNC): New macro.
2954 (GEN_LWSYNC): New macro.
2955 (gen_x_form): New function.
2956 (GEN_OR): New macro.
2957 (GEN_MR): New macro.
2958 (GEN_LWARX): New macro.
2959 (GEN_STWCX): New macro.
2960 (GEN_CMPW): New macro.
2961 (gen_md_form): New function.
2962 (GEN_RLDICL): New macro.
2963 (GEN_RLDICR): New macro.
2964 (gen_i_form): New function.
2966 (GEN_BL): New macro.
2967 (gen_b_form): New function.
2968 (GEN_BNE): New macro.
2969 (GEN_LOAD): New macro.
2970 (GEN_STORE): New macro.
2971 (gen_limm): New function.
2972 (gen_atomic_xchg): New function.
2973 (gen_call): New function.
2974 (ppc_relocate_instruction): New function.
2975 (ppc_install_fast_tracepoint_jump_pad): New function.
2976 (ppc_get_min_fast_tracepoint_insn_len): New function.
2977 (ppc_get_ipa_tdesc_idx): New function.
2978 (the_low_target): Wire in the new functions.
2979 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2981 * linux-ppc-tdesc.h: New file.
2983 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2985 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2986 (alloc_jump_pad_buffer): New function.
2987 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2988 (alloc_jump_pad_buffer): New function.
2989 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2990 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2991 (alloc_jump_pad_buffer): New function.
2992 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2993 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2994 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2995 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2997 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2999 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3000 * linux-amd64-ipa.c: Likewise.
3001 * linux-i386-ipa.c: Likewise.
3002 * linux-s390-ipa.c: Likewise.
3003 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3004 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3005 set_trace_state_variable_value_ptr.
3006 (struct ipa_sym_addresses): Likewise.
3007 (symbol_list): Likewise.
3008 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3009 accessing gdb_collect directly.
3010 (gdb_collect_ptr_type): New typedef.
3011 (get_raw_reg_ptr_type): New typedef.
3012 (get_trace_state_variable_value_ptr_type): New typedef.
3013 (set_trace_state_variable_value_ptr_type): New typedef.
3014 (gdb_collect_ptr): New global.
3015 (get_raw_reg_ptr): New global.
3016 (get_trace_state_variable_value_ptr): New global.
3017 (set_trace_state_variable_value_ptr): New global.
3018 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3019 accessing get_raw_reg directly.
3020 (get_get_tsv_func_addr): Likewise for
3021 get_trace_state_variable_value_ptr.
3022 (get_set_tsv_func_addr): Likewise for
3023 set_trace_state_variable_value_ptr.
3024 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3026 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3028 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3030 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3032 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3034 (relocate_instruction): Remove own_buf.
3035 * server.c (own_buf): Make global.
3036 (handle_v_requests): Make global.
3037 * server.h (own_buf): New declaration.
3038 (handle_v_requests): New prototype.
3040 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3043 * linux-s390-low.c (add_insns): New function.
3044 (s390_emit_prologue): New function.
3045 (s390_emit_epilogue): New function.
3046 (s390_emit_add): New function.
3047 (s390_emit_sub): New function.
3048 (s390_emit_mul): New function.
3049 (s390_emit_lsh): New function.
3050 (s390_emit_rsh_signed): New function.
3051 (s390_emit_rsh_unsigned): New function.
3052 (s390_emit_ext): New function.
3053 (s390_emit_log_not): New function.
3054 (s390_emit_bit_and): New function.
3055 (s390_emit_bit_or): New function.
3056 (s390_emit_bit_xor): New function.
3057 (s390_emit_bit_not): New function.
3058 (s390_emit_equal): New function.
3059 (s390_emit_less_signed): New function.
3060 (s390_emit_less_unsigned): New function.
3061 (s390_emit_ref): New function.
3062 (s390_emit_if_goto): New function.
3063 (s390_emit_goto): New function.
3064 (s390_write_goto_address): New function.
3065 (s390_emit_litpool): New function.
3066 (s390_emit_const): New function.
3067 (s390_emit_call): New function.
3068 (s390_emit_reg): New function.
3069 (s390_emit_pop): New function.
3070 (s390_emit_stack_flush): New function.
3071 (s390_emit_zero_ext): New function.
3072 (s390_emit_swap): New function.
3073 (s390_emit_stack_adjust): New function.
3074 (s390_emit_set_r2): New function.
3075 (s390_emit_int_call_1): New function.
3076 (s390_emit_void_call_2): New function.
3077 (s390_emit_eq_goto): New function.
3078 (s390_emit_ne_goto): New function.
3079 (s390_emit_lt_goto): New function.
3080 (s390_emit_le_goto): New function.
3081 (s390_emit_gt_goto): New function.
3082 (s390_emit_ge_goto): New function.
3083 (s390x_emit_prologue): New function.
3084 (s390x_emit_epilogue): New function.
3085 (s390x_emit_add): New function.
3086 (s390x_emit_sub): New function.
3087 (s390x_emit_mul): New function.
3088 (s390x_emit_lsh): New function.
3089 (s390x_emit_rsh_signed): New function.
3090 (s390x_emit_rsh_unsigned): New function.
3091 (s390x_emit_ext): New function.
3092 (s390x_emit_log_not): New function.
3093 (s390x_emit_bit_and): New function.
3094 (s390x_emit_bit_or): New function.
3095 (s390x_emit_bit_xor): New function.
3096 (s390x_emit_bit_not): New function.
3097 (s390x_emit_equal): New function.
3098 (s390x_emit_less_signed): New function.
3099 (s390x_emit_less_unsigned): New function.
3100 (s390x_emit_ref): New function.
3101 (s390x_emit_if_goto): New function.
3102 (s390x_emit_const): New function.
3103 (s390x_emit_call): New function.
3104 (s390x_emit_reg): New function.
3105 (s390x_emit_pop): New function.
3106 (s390x_emit_stack_flush): New function.
3107 (s390x_emit_zero_ext): New function.
3108 (s390x_emit_swap): New function.
3109 (s390x_emit_stack_adjust): New function.
3110 (s390x_emit_int_call_1): New function.
3111 (s390x_emit_void_call_2): New function.
3112 (s390x_emit_eq_goto): New function.
3113 (s390x_emit_ne_goto): New function.
3114 (s390x_emit_lt_goto): New function.
3115 (s390x_emit_le_goto): New function.
3116 (s390x_emit_gt_goto): New function.
3117 (s390x_emit_ge_goto): New function.
3118 (s390_emit_ops): New function.
3119 (struct linux_target_ops): Fill in emit_ops hook.
3121 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3124 * Makefile.in: Add s390 IPA files.
3125 * configure.srv: Build IPA for s390.
3126 * linux-s390-ipa.c: New file.
3127 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3128 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3129 (tdesc_s390_linux32): Likewise.
3130 (init_registers_s390_linux32v1): Likewise.
3131 (tdesc_s390_linux32v1): Likewise.
3132 (init_registers_s390_linux32v2): Likewise.
3133 (tdesc_s390_linux32v2): Likewise.
3134 (init_registers_s390_linux64): Likewise.
3135 (tdesc_s390_linux64): Likewise.
3136 (init_registers_s390_linux64v1): Likewise.
3137 (tdesc_s390_linux64v1): Likewise.
3138 (init_registers_s390_linux64v2): Likewise.
3139 (tdesc_s390_linux64v2): Likewise.
3140 (init_registers_s390_te_linux64): Likewise.
3141 (tdesc_s390_te_linux64): Likewise.
3142 (init_registers_s390_vx_linux64): Likewise.
3143 (tdesc_s390_vx_linux64): Likewise.
3144 (init_registers_s390_tevx_linux64): Likewise.
3145 (tdesc_s390_tevx_linux64): Likewise.
3146 (init_registers_s390x_linux64): Likewise.
3147 (tdesc_s390x_linux64): Likewise.
3148 (init_registers_s390x_linux64v1): Likewise.
3149 (tdesc_s390x_linux64v1): Likewise.
3150 (init_registers_s390x_linux64v2): Likewise.
3151 (tdesc_s390x_linux64v2): Likewise.
3152 (init_registers_s390x_te_linux64): Likewise.
3153 (tdesc_s390x_te_linux64): Likewise.
3154 (init_registers_s390x_vx_linux64): Likewise.
3155 (tdesc_s390x_vx_linux64): Likewise.
3156 (init_registers_s390x_tevx_linux64): Likewise.
3157 (tdesc_s390x_tevx_linux64): Likewise.
3158 (have_hwcap_s390_vx): New static variable.
3159 (s390_arch_setup): Fill have_hwcap_s390_vx.
3160 (s390_get_thread_area): New function.
3161 (s390_ft_entry_gpr_esa): New const.
3162 (s390_ft_entry_gpr_zarch): New const.
3163 (s390_ft_entry_misc): New const.
3164 (s390_ft_entry_fr): New const.
3165 (s390_ft_entry_vr): New const.
3166 (s390_ft_main_31): New const.
3167 (s390_ft_main_64): New const.
3168 (s390_ft_exit_fr): New const.
3169 (s390_ft_exit_vr): New const.
3170 (s390_ft_exit_misc): New const.
3171 (s390_ft_exit_gpr_esa): New const.
3172 (s390_ft_exit_gpr_zarch): New const.
3173 (append_insns): New function.
3174 (s390_relocate_instruction): New function.
3175 (s390_install_fast_tracepoint_jump_pad): New function.
3176 (s390_get_min_fast_tracepoint_insn_len): New function.
3177 (s390_get_ipa_tdesc_idx): New function.
3178 (struct linux_target_ops): Wire in the above functions.
3179 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3180 * linux-s390-tdesc.h: New file.
3182 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3184 * linux-s390-low.c (s390_supports_tracepoints): New function.
3185 (struct linux_target_ops): Fill supports_tracepoints hook.
3187 2016-03-18 Yao Qi <yao.qi@linaro.org>
3189 * linux-low.c (lwp_signal_can_be_delivered): New function.
3190 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3192 2016-03-18 Yao Qi <yao.qi@linaro.org>
3194 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3195 0 if signal is enqueued. Remove 'signal' from one debugging
3196 message. Move one debugging message to some lines below.
3197 Remove code setting 'signal' to 0.
3199 2016-03-18 Yao Qi <yao.qi@linaro.org>
3201 * linux-low.c (linux_low_filter_event): Remove redundant
3202 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3204 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3206 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3207 (struct linux_target_ops): Wire in the above.
3209 2016-03-03 Yao Qi <yao.qi@linaro.org>
3211 * linux-low.c: Update comments to start_step_over.
3213 2016-03-03 Yao Qi <yao.qi@linaro.org>
3216 * linux-low.c (handle_extended_wait): Set child suspended
3217 if event_lwp->bp_reinsert isn't zero.
3219 2016-03-02 Yao Qi <yao.qi@linaro.org>
3221 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3222 enqueue_pending_signal.
3224 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3226 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3229 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3231 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3232 (s390_regmap_3264) [!__s390x__]: New global.
3233 (s390_collect_ptrace_register): Skip map entries containing -1.
3234 (s390_supply_ptrace_register): Ditto.
3235 (s390_fill_gprs_high): New function.
3236 (s390_store_gprs_high): New function.
3237 (s390_regsets): Add NT_S390_HIGH_GPRS.
3238 (s390_get_hwcap): Enable on 31-bit.
3239 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3240 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3241 Detect NT_S390_HIGH_GPRS.
3242 (s390_usrregs_info_3264): Enable on 31-bit.
3243 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3244 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3246 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3249 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3250 * configure.srv: Ditto.
3251 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3252 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3253 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3254 (init_registers_amd64_linux): Remove prototype.
3255 (tdesc_amd64_linux): Remove declaration.
3256 (get_ipa_tdesc): New function.
3257 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3258 initialize remaining tdescs.
3259 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3260 (init_registers_i386_linux): Remove prototype.
3261 (tdesc_i386_linux): Remove declaration.
3262 (get_ipa_tdesc): New function.
3263 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3264 initialize remaining tdescs.
3265 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3266 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3267 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3268 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3269 (x86_get_ipa_tdesc_idx): New function.
3270 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3271 * linux-x86-tdesc.h: New file.
3272 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3273 (target_get_ipa_tdesc_idx): New macro.
3274 * tracepoint.c (ipa_tdesc_idx): New macro.
3275 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3276 (symbol_list): Add ipa_tdesc_idx.
3277 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3278 (ipa_tdesc): Remove.
3279 (ipa_tdesc_idx): New variable.
3280 (get_context_regcache): Use get_ipa_tdesc.
3281 (gdb_collect): Ditto.
3283 * tracepoint.h (get_ipa_tdesc): New prototype.
3284 (ipa_tdesc): Remove.
3286 2016-02-24 Pedro Alves <palves@redhat.com>
3288 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3289 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3290 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3291 Factor out common code between the USE_SIGTRAP_SIGINFO and
3292 !USE_SIGTRAP_SIGINFO blocks.
3293 (linux_low_filter_event): Call save_stop_reason instead of
3294 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3296 (linux_wait_1): Update comments.
3298 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3300 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3301 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3302 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3303 ppc_insert_point, ppc_remove_point.
3305 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3307 * linux-s390-low.c (s390_supports_z_point_type): New function.
3308 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3310 2016-02-16 Yao Qi <yao.qi@linaro.org>
3312 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3313 PC. Get pc from regcache_read_pc.
3315 2016-02-12 Yao Qi <yao.qi@linaro.org>
3317 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3318 or linux_get_pc_32bit.
3319 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3321 2016-02-12 Yao Qi <yao.qi@linaro.org>
3323 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3324 arm_linux_get_next_pcs_fixup.
3326 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3328 * tracepoint.c (x_tracepoint_action_download): Change
3329 write_inferior_data_ptr to write_inferior_data_pointer.
3330 (cmd_qtstart): Likewise.
3331 (write_inferior_data_ptr): Remove.
3332 (download_agent_expr): Change write_inferior_data_ptr to
3333 write_inferior_data_pointer.
3334 (download_tracepoint_1): Likewise.
3335 (download_tracepoint): Likewise.
3336 (download_trace_state_variables): Likewise.
3338 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3339 Marcin Kościelnicki <koriakin@0x04.net>
3341 * tracepoint.c (struct tracepoint_action_ops): Remove.
3342 (struct tracepoint_action): Remove ops.
3343 (m_tracepoint_action_download, r_tracepoint_action_download)
3344 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3345 size and offset accordingly.
3346 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3347 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3348 (tracepoint_action_send, tracepoint_action_download): New functions.
3349 Helpers for trace action handlers.
3350 (add_tracepoint_action): Remove setup actions ops.
3351 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3353 2016-02-10 Yao Qi <yao.qi@linaro.org>
3355 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3357 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3359 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3361 * configure: Regenerate.
3363 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3365 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3366 void * to gdb_byte *.
3367 * linux-low.c (siginfo_fixup): Likewise.
3368 (linux_xfer_siginfo): Likewise.
3369 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3371 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3373 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3375 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3377 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3379 * linux-x86-low.c [__x86_64__]: Include
3380 "nat/amd64-linux-siginfo.h".
3381 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3382 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3383 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3384 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3385 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3386 (cpt_si_fd, si_timerid, si_overrun): Move from
3387 nat/amd64-linux-siginfo.c.
3388 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3390 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3392 * server.c (skip_to_semicolon): Remove.
3393 (process_point_options): Use strchrnul instead of
3396 2016-01-26 Yao Qi <yao.qi@linaro.org>
3398 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3399 * linux-low.c (install_software_single_step_breakpoints): Don't
3400 call regcache_read_pc.
3401 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3404 2016-01-26 Yao Qi <yao.qi@linaro.org>
3406 * linux-low.c (install_software_single_step_breakpoints): Call
3407 regcache_read_pc instead of get_pc.
3409 2016-01-26 Yao Qi <yao.qi@linaro.org>
3411 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3412 (unblock_async_io): Rename to ...
3413 (block_unblock_async_io): ... it. New function.
3414 (enable_async_io): Don't install SIGIO handler. Unblock it
3416 (disable_async_io): Don't ignore SIGIO. Block it instead.
3417 (initialize_async_io): Install SIGIO handler. Don't call
3420 2016-01-26 Yao Qi <yao.qi@linaro.org>
3422 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3423 first character is '\003', call *the_target->request_interrupt.
3425 2016-01-25 Yao Qi <yao.qi@linaro.org>
3427 * remote-utils.c (new_thread_notify): Remove.
3428 (dead_thread_notify): Likewise.
3429 * remote-utils.h (new_thread_notify): Remove declaration.
3430 (dead_thread_notify): Likewise.
3432 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3434 * gdb.trace/pending.exp: Fix expected message on continue.
3436 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3438 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3439 it works properly on big-endian machines where sizeof (CORE_ADDR)
3442 2016-01-21 Pedro Alves <palves@redhat.com>
3444 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3445 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3446 * configure: Regenerate.
3448 2016-01-21 Yao Qi <yao.qi@linaro.org>
3450 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3451 is_thumb and set it according to CPSR saved on the stack.
3452 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3453 arm_sigreturn_next_pc.
3455 2016-01-18 Yao Qi <yao.qi@linaro.org>
3457 * linux-low.c (linux_set_pc_64bit): New function.
3458 (linux_get_pc_64bit): New function.
3459 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3461 * linux-sparc-low.c (debug_threads): Remove declaration.
3462 (sparc_get_pc): Remove.
3463 (the_low_target): Use linux_get_pc_64bit instead of
3465 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3466 (the_low_target): Use linux_get_pc_64bit and
3469 2016-01-18 Yao Qi <yao.qi@linaro.org>
3471 * linux-arm-low.c (debug_threads): Remove declaration.
3472 (arm_get_pc, arm_set_pc): Remove.
3473 (the_low_target): Use linux_get_pc_32bit and
3475 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3476 (the_low_target): Use linux_get_pc_32bit and
3478 * linux-cris-low.c (debug_threads): Remove declaration.
3479 (cris_get_pc, cris_set_pc,): Remove.
3480 (the_low_target): Use linux_get_pc_32bit and
3482 * linux-crisv32-low.c (debug_threads): Remove declaration.
3483 (cris_get_pc, cris_set_pc): Remove.
3484 (the_low_target): Use linux_get_pc_32bit and
3486 * linux-low.c: Include inttypes.h.
3487 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3488 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3489 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3490 (the_low_target): Use linux_get_pc_32bit and
3492 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3493 (the_low_target): Use linux_get_pc_32bit and
3495 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3496 (the_low_target): Use linux_get_pc_32bit and
3498 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3499 (the_low_target): Use linux_get_pc_32bit and
3501 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3502 (the_low_target): Use linux_get_pc_32bit and
3505 2016-01-18 Gary Benson <gbenson@redhat.com>
3507 * configure.ac (AC_FUNC_FORK): New check.
3508 * config.in: Regenerate.
3509 * configure: Likewise.
3511 2016-01-14 Yao Qi <yao.qi@linaro.org>
3513 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3514 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3515 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3516 arm_get_next_pcs_ctor.
3518 2016-01-12 Josh Stone <jistone@redhat.com>
3519 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3521 * inferiors.h: Include "gdb_vecs.h".
3522 (struct process_info): Add syscalls_to_catch.
3523 * inferiors.c (remove_process): Free syscalls_to_catch.
3524 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3525 syscall_return stops.
3526 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3527 * server.c (handle_general_set): Handle QCatchSyscalls.
3528 (handle_query): Report support for QCatchSyscalls.
3529 * target.h (struct target_ops): Add supports_catch_syscall.
3530 (target_supports_catch_syscall): New macro.
3531 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3532 (struct lwp_info): Add syscall_state.
3533 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3534 Maintain syscall_state and syscalls_to_catch across exec.
3535 (get_syscall_trapinfo): New function, proxy to the_low_target.
3536 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3537 (linux_low_filter_event): Toggle syscall_state entry/return for
3538 syscall traps, and set it ignored for all others.
3539 (gdb_catching_syscalls_p): New function.
3540 (gdb_catch_this_syscall_p): New function.
3541 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3542 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3543 (linux_supports_catch_syscall): New function.
3544 (linux_target_ops): Install it.
3545 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3546 (the_low_target): Install it.
3548 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3550 * acinclude.m4: Include new ../warning.m4 file.
3551 * configure: Regenerated.
3552 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3554 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3556 * ax.c (is_goto_target): Mark static.
3557 * linux-low.c (register_addr): Likewise.
3558 (linux_fetch_registers, linux_store_registers): Likewise.
3559 * mem-break.c (any_persistent_commands): Fix old prototype.
3560 (add_commands_to_breakpoint): Mark static.
3561 * regcache.c (find_register_by_name): Delete unused func.
3562 * remote-utils.c (hex_or_minus_one): Mark static.
3563 * server.c (monitor_show_help): Mark static.
3564 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3565 handle_v_requests): Likewise.
3567 2016-01-12 Pedro Alves <palves@redhat.com>
3569 Remove use of the registered trademark symbol throughout.
3571 2016-01-08 Yao Qi <yao.qi@linaro.org>
3573 * remote-utils.c (getpkt): If c is '\003', call target hook
3576 2016-01-06 Yao Qi <yao.qi@linaro.org>
3578 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3579 linux-aarch32-low.c.
3580 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3581 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3582 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3583 (thumb2_breakpoint): Declare.
3584 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3585 linux-aarch32-low.h.
3586 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3587 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3588 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3590 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3592 * gdbreplay.c (gdbreplay_version): Change copyright year in
3594 * server.c (gdbserver_version): Likewise.
3596 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3598 * server.c (crc32_table): Delete.
3599 (crc32): Use libiberty's xcrc32 function.
3601 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3603 * lynx-low.c (lynx_delete_thread_callback): New function.
3604 (lynx_mourn): Properly delete our process and all of its
3605 threads. Remove call to clear_inferiors.
3607 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3609 * target.c (thread_search_callback): Add check that
3610 the thread_stopped target callback is not NULL before
3613 2015-12-21 Yao Qi <yao.qi@linaro.org>
3615 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3618 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3620 * server.c (handle_query): Call target_supports_software_single_step.
3622 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3624 * linux-low.c (single_step): New function.
3625 (linux_resume_one_lwp_throw): Call single_step.
3626 (start_step_over): Likewise.
3628 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3630 * Makefile.in (SFILES): Append arch/arm-linux.c,
3631 arch/arm-get-next-pcs.c.
3632 (arm-linux.o): New rule.
3633 (arm-get-next-pcs.o): New rule.
3634 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3636 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3637 to linux-aarch32-low.c.
3638 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3639 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3640 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3641 (thumb2_breakpoint_len): Likewise.
3642 (arm_is_thumb_mode): Make non-static.
3643 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3644 from linux-aarch32-low.c.
3645 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3646 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3647 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3648 (thumb2_breakpoint_len): Likewise.
3649 (arm_is_thumb_mode): New declaration.
3650 * linux-arm-low.c: Include arch/arm-linux.h
3651 aarch/arm-get-next-pcs.h, sys/syscall.h.
3652 (get_next_pcs_ops): New struct.
3653 (get_next_pcs_addr_bits_remove): New function.
3654 (get_next_pcs_is_thumb): New function.
3655 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3656 (arm_sigreturn_next_pc): Likewise.
3657 (get_next_pcs_syscall_next_pc): Likewise.
3658 (arm_gdbserver_get_next_pcs): Likewise.
3659 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3661 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3662 * server.h: Include gdb_vecs.h.
3664 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3666 * Makefile.in (SFILES): Append common/common-regcache.c.
3667 (OBS): Append common-regcache.o.
3668 (common-regcache.o): New rule.
3669 * regcache.c (init_register_cache): Initialize cache to
3671 (regcache_raw_read_unsigned): New function.
3672 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3673 register_status enum.
3675 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3677 * linux-aarch64-low.c (the_low_targets): Rename
3678 breakpoint_reinsert_addr to get_next_pcs.
3679 * linux-arm-low.c (the_low_targets): Likewise.
3680 * linux-bfin-low.c (the_low_targets): Likewise.
3681 * linux-cris-low.c (the_low_targets): Likewise.
3682 * linux-crisv32-low.c (the_low_targets): Likewise.
3683 * linux-low.c (can_software_single_step): Likewise.
3684 (install_software_single_step_breakpoints): New function.
3685 (start_step_over): Use install_software_single_step_breakpoints.
3686 * linux-low.h: New CORE_ADDR vector.
3687 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3689 * linux-mips-low.c (the_low_targets): Likewise.
3690 * linux-nios2-low.c (the_low_targets): Likewise.
3691 * linux-sparc-low.c (the_low_targets): Likewise.
3693 2015-12-17 Pedro Alves <palves@redhat.com>
3695 * linux-low.c (linux_kill_one_lwp): Remove references to
3697 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3699 (linux_init_signals): Delete.
3700 (initialize_low): Adjust.
3701 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3703 2015-12-16 Pedro Alves <palves@redhat.com>
3705 * configure.ac (compiler warning flags): When testing a
3706 -Wno-foo option, check whether -Wfoo works instead.
3707 * configure: Regenerate.
3709 2015-12-11 Don Breazeal <donb@codesourcery.com>
3711 * server.c (process_serial_event): Don't exit from gdbserver
3712 in remote mode if there are still active inferiors.
3714 2015-12-11 Yao Qi <yao.qi@linaro.org>
3716 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3717 arm_breakpoint_at if the process is 32-bit.
3719 2015-12-11 Yao Qi <yao.qi@linaro.org>
3721 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3724 2015-12-07 Yao Qi <yao.qi@linaro.org>
3726 * configure.srv: Append arm.o to srv_tgtobj for
3727 aarch64*-*-linux* target.
3728 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3729 from linux-arm-low.c.
3730 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3731 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3732 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3733 (thumb2_breakpoint_len): Likewise.
3734 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3735 (arm_breakpoint_kinds): Likewise.
3736 (arm_breakpoint_kind_from_pc): Likewise.
3737 (arm_sw_breakpoint_from_kind): Likewise.
3738 (arm_breakpoint_kind_from_current_state): Likewise.
3739 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3740 (arm_sw_breakpoint_from_kind): Declare.
3741 (arm_breakpoint_kind_from_current_state): Declare.
3742 (arm_breakpoint_at): Declare.
3743 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3744 arm_sw_breakpoint_from_kind if process is 32-bit.
3745 (aarch64_breakpoint_kind_from_pc): New function.
3746 (aarch64_breakpoint_kind_from_current_state): New function.
3747 (the_low_target): Initialize fields breakpoint_kind_from_pc
3748 and breakpoint_kind_from_current_state.
3749 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3750 linux-aarch32-low.c.
3751 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3752 (arm_breakpoint, arm_breakpoint_len): Likewise.
3753 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3754 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3755 (arm_is_thumb_mode): Likewise.
3756 (arm_breakpoint_at): Likewise.
3757 (arm_breakpoint_kind_from_pc): Likewise.
3758 (arm_sw_breakpoint_from_kind): Likewise.
3759 (arm_breakpoint_kind_from_current_state): Likewise.
3762 2015-08-04 Yao Qi <yao.qi@linaro.org>
3764 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3765 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3766 * server.c (extended_protocol): Remove "static".
3767 * server.h (extended_protocol): Declare it.
3769 2015-12-04 Josh Stone <jistone@redhat.com>
3771 * target.h (struct target_ops) <arch_setup>: Rename to ...
3772 (struct target_ops) <post_create_inferior>: ... this.
3773 (target_arch_setup): Rename to ...
3774 (target_post_create_inferior): ... this, calling post_create_inferior.
3775 * server.c (start_inferior): Update target_arch_setup calls to
3776 target_post_create_inferior.
3777 * linux-low.c (linux_low_ptrace_options): Forward declare.
3778 (linux_arch_setup): Update its comment for general use.
3779 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3780 (struct linux_target_ops): Use linux_post_create_inferior.
3781 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3782 to post_create_inferior.
3783 * nto-low.c (struct nto_target_ops): Likewise.
3784 * spu-low.c (struct spu_target_ops): Likewise.
3785 * win32-low.c (struct win32_target_ops): Likewise.
3787 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3789 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3791 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3793 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3794 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3795 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3796 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3797 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3798 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3799 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3800 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3801 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3802 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3803 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3804 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3806 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3808 * linux-low.c (linux_look_up_symbols): Don't call
3809 linux_supports_traceclone.
3810 * linux-low.h (thread_db_init): Remove use_events argument.
3811 * thread-db.c (thread_db_use_event): Remove global variable.
3812 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3813 (struct thread_db) <td_create_bp>: Remove field.
3814 (thread_db_create_event): Remove function.
3815 (thread_db_enable_reporting): Likewise.
3816 (find_one_thread): Don't check for thread_db_use_events.
3817 (attach_thread): Likewise.
3818 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3819 (try_thread_db_load_1): Don't check for thread_db_use_events.
3820 (thread_db_init): Remove use_events argument and thread events
3822 (remove_thread_event_breakpoints): Remove function.
3823 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3825 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3827 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3829 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3830 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3831 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3832 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3833 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3835 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3837 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3838 * linux-low.c (can_hardware_single_step): Use
3839 supports_hardware_single_step.
3840 (can_software_single_step): New function.
3841 (start_step_over): Call can_software_single_step.
3842 (linux_supports_hardware_single_step): New function.
3843 (struct target_ops) <supports_software_single_step>: Initialize.
3844 * linux-low.h (struct linux_target_ops)
3845 <supports_hardware_single_step>: Initialize.
3846 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3847 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3848 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3849 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3850 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3851 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3852 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3853 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3854 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3855 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3857 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3858 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3860 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3861 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3862 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3864 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3865 * target.h (struct target_ops): <supports_software_single_step>:
3867 (target_supports_software_single_step): New macro.
3869 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3871 * linux-low.c (linux_wait_1): Fix pc advance condition.
3872 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3873 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3875 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3877 * linux-arm-low.c (arm_is_thumb_mode): New function.
3878 (arm_breakpoint_at): Use arm_is_thumb_mode.
3879 (arm_breakpoint_kind_from_current_state): New function.
3880 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3882 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3883 (linux_breakpoint_kind_from_current_state): New function.
3884 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3885 * linux-low.h (struct linux_target_ops)
3886 <breakpoint_kind_from_current_state>: New field.
3887 * target.h (struct target_ops): Likewise.
3888 (target_breakpoint_kind_from_current_state): New macro.
3890 2015-11-30 Pedro Alves <palves@redhat.com>
3892 * linux-low.c (linux_resume): Wake up the event loop before
3895 2015-11-30 Pedro Alves <palves@redhat.com>
3897 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3899 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3901 * target.c (struct thread_search): New structure.
3902 (thread_search_callback): New function.
3903 (prev_general_thread): New global.
3904 (prepare_to_access_memory, done_accessing_memory): New functions.
3905 * target.h (prepare_to_access_memory, done_accessing_memory):
3906 Replace macros with function declarations.
3908 2015-11-30 Pedro Alves <palves@redhat.com>
3911 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3912 report TARGET_WAITKIND_NO_RESUMED.
3913 * remote-utils.c (prepare_resume_reply): Handle
3914 TARGET_WAITKIND_NO_RESUMED.
3915 * server.c (report_no_resumed): New global.
3916 (handle_query) <qSupported>: Handle "no-resumed+". Report
3917 "no-resumed+" support.
3918 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3919 return error if the client doesn't support no-resumed events.
3920 (push_stop_notification): New function.
3921 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3922 events if the client supports them.
3924 2015-11-30 Pedro Alves <palves@redhat.com>
3926 * linux-low.c (thread_still_has_status_pending_p): Don't check
3928 (lwp_resumed): New function.
3929 (status_pending_p_callback): Return early if the LWP is not
3930 supposed to be resumed.
3932 2015-11-30 Pedro Alves <palves@redhat.com>
3934 * linux-low.c (handle_extended_wait): Assert that the LWP's
3935 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3936 thread create events, leave the new child's status pending.
3937 (linux_low_filter_event): If GDB wants to hear about thread exit
3938 events, leave the LWP marked dead and don't delete it.
3939 (linux_wait_for_event_filtered): Don't check for thread exit.
3940 (filter_exit_event): New function.
3941 (linux_wait_1): Use it, when returning an exit event.
3942 (linux_resume_one_lwp_throw): Assert that the LWP's
3943 waitstatus is TARGET_WAITKIND_IGNORE.
3944 * remote-utils.c (prepare_resume_reply): Handle
3945 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3946 * server.c (report_thread_events): New global.
3947 (handle_general_set): Handle QThreadEvents.
3948 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3949 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3950 TARGET_WAITKIND_THREAD_EXITED.
3951 * server.h (report_thread_events): Declare.
3953 2015-11-30 Pedro Alves <palves@redhat.com>
3955 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3956 the thread's last_resume_kind was resume_stop.
3958 2015-11-30 Pedro Alves <palves@redhat.com>
3960 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3963 2015-11-30 Pedro Alves <palves@redhat.com>
3965 * server.c (handle_v_requests): Handle vCtrlC.
3967 2015-11-30 Pedro Alves <palves@redhat.com>
3969 * gdbthread.h (find_any_thread_of_pid): Declare.
3970 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3972 * server.c (handle_query): If current_thread is NULL, look for
3973 another thread of the selected process.
3975 2015-11-26 Daniel Colascione <dancol@dancol.org>
3976 Simon Marchi <simon.marchi@ericsson.com>
3978 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3979 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3981 * target.h (struct target_ops) <thread_name>: New field.
3982 (target_thread_name): New macro.
3984 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3986 * regcache.h (regcache_invalidate_pid): Add declaration.
3987 * regcache.c (regcache_invalidate_pid): New function, extracted
3988 from regcache_invalidate.
3989 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3990 Add trivial documentation comment.
3991 * lynx-low.c: Use regcache_invalidate_pid instead of
3992 regcache_invalidate.
3994 2015-11-23 Joel Brobecker <brobecker@adacore.com>
3996 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3997 and Elf64_auxv_t if the target is Android.
3999 2015-11-22 Doug Evans <xdje42@gmail.com>
4001 * target.h: #include <sys/types.h>.
4003 2015-11-19 Pedro Alves <palves@redhat.com>
4005 * linux-low.c (linux_process_qsupported): Change prototype.
4007 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4009 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4010 and adjust to loop over all features.
4011 * server.c (handle_query) <qSupported>: Adjust to call
4012 target_process_qsupported once, passing it a vector of unprocessed
4014 * target.h (struct target_ops) <process_qsupported>: Change
4016 (target_process_qsupported): Adjust.
4018 2015-11-19 Pedro Alves <palves@redhat.com>
4020 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4022 * configure: Regenerate.
4024 2015-11-19 Pedro Alves <palves@redhat.com>
4026 * configure: Regenerate.
4028 2015-11-19 Yao Qi <yao.qi@linaro.org>
4030 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4033 2015-11-19 Yao Qi <yao.qi@linaro.org>
4035 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4036 (struct aarch64_operand): Move enum out.
4038 2015-11-19 Yao Qi <yao.qi@linaro.org>
4040 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4041 struct user_fpsimd_state *.
4042 (aarch64_store_fpregset): Likewise.
4044 2015-11-19 Yao Qi <yao.qi@linaro.org>
4046 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4047 struct user_pt_regs *.
4048 (aarch64_store_gregset): Likewise.
4050 2015-11-18 Pedro Alves <palves@redhat.com>
4052 * Makefile.in (all_object_files): Add $IPA_OBJS.
4054 2015-11-17 Pedro Alves <palves@redhat.com>
4056 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4057 GDB_SIGNAL_0 and gdb_signal_to_string.
4059 2015-11-17 Pedro Alves <palves@redhat.com>
4061 * win32-low.c (handle_output_debug_string): Remove parameter.
4062 (win32_kill): Remove our_status local and adjust call to
4063 handle_output_debug_string.
4064 (get_child_debug_event): Adjust call to
4065 handle_output_debug_string.
4067 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4069 * linux-mips-low.c (mips_fill_gregset): Add cast.
4070 (mips_store_gregset): Likewise.
4071 (mips_fill_fpregset): Likewise.
4072 (mips_store_fpregset): Likewise.
4074 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4076 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4079 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4081 * linux-mips-low.c (mips_linux_new_thread): Change type of
4082 watch_type to enum target_hw_bp_type.
4084 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4086 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4087 Change return type to arm_hwbp_type.
4089 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4091 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4092 (arm_store_gregset): Likewise.
4093 * linux-arm-low.c (arm_get_hwcap): Likewise.
4094 (arm_read_description): Likewise.
4096 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4098 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4100 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4102 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4103 (ppc_fill_vsxregset): Likewise.
4104 (ppc_store_vsxregset): Likewise.
4105 (ppc_fill_vrregset): Likewise.
4106 (ppc_store_vrregset): Likewise.
4107 (ppc_fill_evrregset): Likewise.
4108 (ppc_store_evrregset): Likewise.
4110 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4112 * linux-ppc-low.c (ppc_usrregs_info): Remove
4113 forward-declaration.
4114 (ppc_arch_setup): Move lower in file.
4116 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4118 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4119 (ps_pdwrite): Likewise.
4121 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4123 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4124 to after assert checks.
4126 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4128 * proc-service.c (ps_pdread): Add/adjust casts.
4129 (ps_pdwrite): Add/adjust casts.
4131 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4133 * server.c (handle_search_memory_1): Cast return value of
4136 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4138 * server.c (write_qxfer_response): Change type of data to
4141 2015-10-29 Pedro Alves <palves@redhat.com>
4143 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4145 2015-10-29 Pedro Alves <palves@redhat.com>
4147 * tracepoint.c (clear_installed_tracepoints): Add casts.
4149 2015-10-29 Pedro Alves <palves@redhat.com>
4151 * server.c (handle_v_cont, process_serial_event): Add enum
4152 gdb_signal casts to signal parsing code.
4154 2015-10-29 Pedro Alves <palves@redhat.com>
4156 * linux-low.h (NULL_REGSET): Define.
4157 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4158 * linux-arm-low.c (arm_regsets): Likewise.
4159 * linux-crisv32-low.c (cris_regsets): Likewise.
4160 * linux-m68k-low.c (m68k_regsets): Likewise.
4161 * linux-mips-low.c (mips_regsets): Likewise.
4162 * linux-nios2-low.c (nios2_regsets): Likewise.
4163 * linux-ppc-low.c (ppc_regsets): Likewise.
4164 * linux-s390-low.c (s390_regsets): Likewise.
4165 * linux-sh-low.c (sh_regsets): Likewise.
4166 * linux-sparc-low.c (sparc_regsets): Likewise.
4167 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4168 * linux-tile-low.c (tile_regsets): Likewise.
4169 * linux-x86-low.c (x86_regsets): Likewise.
4170 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4172 2015-10-29 Pedro Alves <palves@redhat.com>
4174 * linux-low.h (NULL_REGSET): Define.
4175 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4176 * linux-arm-low.c (arm_regsets): Likewise.
4177 * linux-crisv32-low.c (cris_regsets): Likewise.
4178 * linux-m68k-low.c (m68k_regsets): Likewise.
4179 * linux-mips-low.c (mips_regsets): Likewise.
4180 * linux-nios2-low.c (nios2_regsets): Likewise.
4181 * linux-ppc-low.c (ppc_regsets): Likewise.
4182 * linux-s390-low.c (s390_regsets): Likewise.
4183 * linux-sh-low.c (sh_regsets): Likewise.
4184 * linux-sparc-low.c (sparc_regsets): Likewise.
4185 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4186 * linux-tile-low.c (tile_regsets): Likewise.
4187 * linux-x86-low.c (x86_regsets): Likewise.
4188 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4190 2015-10-26 Doug Evans <dje@google.com>
4192 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4194 2015-10-26 Doug Evans <dje@google.com>
4196 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4198 2015-10-26 Doug Evans <dje@google.com>
4200 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4202 (attach_thread, find_new_threads_callback): Ditto.
4204 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4206 * mem-break.h (set_breakpoint_data): Remove.
4208 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4210 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4211 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4212 (initialize_low): Remove set_breakpoint_data call.
4213 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4214 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4215 (initialize_low): Remove set_breakpoint_data call.
4216 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4217 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4218 (initialize_low): Remove set_breakpoint_data call.
4220 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4222 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4223 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4224 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4225 * target.h (target_breakpoint_kind_from_pc): New macro.
4227 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4229 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4230 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4231 the default breakpoint kind.
4233 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4235 * linux-arm-low.c (arm_supports_z_point_type): Add software
4238 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4240 * linux-arm-low.c: Refactor breakpoint definitions.
4241 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4242 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4244 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4246 * Makefile.in: Add arm.c/o.
4247 * configure.srv: Likewise.
4248 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4249 (arm_breakpoint_kind_from_pc): New function.
4250 (arm_sw_breakpoint_from_kind): Return proper kind.
4251 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4253 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4255 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4257 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4258 (struct raw_breakpoint) <size>: Remove.
4259 (struct raw_breakpoint) <kind>: Add.
4260 (bp_size): New function.
4261 (bp_opcode): Likewise.
4262 (find_raw_breakpoint_at): Adjust for kind.
4263 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4264 (remove_memory_breakpoint): Adjust for kind call bp_size.
4265 (set_raw_breakpoint_at): Adjust for kind.
4266 (set_breakpoint): Likewise.
4267 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4268 (delete_raw_breakpoint): Adjust for kind.
4269 (delete_breakpoint): Likewise.
4270 (find_gdb_breakpoint): Likewise.
4271 (set_gdb_breakpoint_1): Likewise.
4272 (set_gdb_breakpoint): Likewise.
4273 (delete_gdb_breakpoint_1): Likewise.
4274 (delete_gdb_breakpoint): Likewise.
4275 (uninsert_raw_breakpoint): Likewise.
4276 (reinsert_raw_breakpoint): Likewise.
4277 (set_breakpoint_data): Remove.
4278 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4279 (check_mem_read): Adjust for kind call bp_size.
4280 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4281 (clone_one_breakpoint): Adjust for kind.
4282 * mem-break.h (set_gdb_breakpoint): Likewise.
4283 (delete_gdb_breakpoint): Likewise.
4284 * server.c (process_serial_event): Likewise.
4286 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4288 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4289 (struct linux_target_ops) <breakpoint>: Remove.
4290 (struct linux_target_ops) <breakpoint_len>: Remove.
4291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4293 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4294 (arm_sw_breakpoint_from_kind): New function.
4295 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4296 (struct linux_target_ops) <breakpoint>: Remove.
4297 (struct linux_target_ops) <breakpoint_len>: Remove.
4298 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4299 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4300 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4301 (struct linux_target_ops) <breakpoint>: Remove.
4302 (struct linux_target_ops) <breakpoint_len>: Remove.
4303 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4304 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4305 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4306 (struct linux_target_ops) <breakpoint>: Remove.
4307 (struct linux_target_ops) <breakpoint_len>: Remove.
4308 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4309 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4310 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4311 and sw_breakpoint_from_kind to increment the pc.
4312 (linux_breakpoint_kind_from_pc): New function.
4313 (linux_sw_breakpoint_from_kind): New function.
4314 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4315 (initialize_low): Call breakpoint_kind_from_pc and
4316 sw_breakpoint_from_kind to replace breakpoint_data/len.
4317 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4319 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4320 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4321 (struct linux_target_ops) <breakpoint>: Remove.
4322 (struct linux_target_ops) <breakpoint_len>: Remove.
4323 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4324 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4325 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4326 (struct linux_target_ops) <breakpoint>: Remove.
4327 (struct linux_target_ops) <breakpoint_len>: Remove.
4328 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4329 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4330 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4331 (struct linux_target_ops) <breakpoint>: Remove.
4332 (struct linux_target_ops) <breakpoint_len>: Remove.
4333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4334 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4335 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4336 (struct linux_target_ops) <breakpoint>: Remove.
4337 (struct linux_target_ops) <breakpoint_len>: Remove.
4338 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4339 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4340 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4341 (struct linux_target_ops) <breakpoint>: Remove.
4342 (struct linux_target_ops) <breakpoint_len>: Remove.
4343 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4344 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4345 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4346 (struct linux_target_ops) <breakpoint>: Remove.
4347 (struct linux_target_ops) <breakpoint_len>: Remove.
4348 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4349 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4350 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4351 (struct linux_target_ops) <breakpoint>: Remove.
4352 (struct linux_target_ops) <breakpoint_len>: Remove.
4353 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4354 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4355 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4356 (struct linux_target_ops) <breakpoint>: Remove.
4357 (struct linux_target_ops) <breakpoint_len>: Remove.
4358 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4359 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4360 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4361 (struct linux_target_ops) <breakpoint>: Remove.
4362 (struct linux_target_ops) <breakpoint_len>: Remove.
4363 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4364 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4365 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4366 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4367 (struct linux_target_ops) <breakpoint>: Remove.
4368 (struct linux_target_ops) <breakpoint_len>: Remove.
4369 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4370 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4371 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4372 (struct linux_target_ops) <breakpoint>: Remove.
4373 (struct linux_target_ops) <breakpoint_len>: Remove.
4374 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4375 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4377 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4379 * linux-cris-low.c (cris_get_pc): Remove void arg.
4381 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4383 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4386 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4388 * inferiors.c (thread_pid_matches_callback): New function.
4389 (find_thread_process): New function.
4390 (remove_thread): Reset current_thread.
4391 (remove_process): Assert threads have been removed first.
4393 2015-10-15 Yao Qi <yao.qi@linaro.org>
4395 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4397 (aarch64_remove_point): Likewise.
4398 * regcache.c (regcache_register_size): New function.
4400 2015-10-12 Yao Qi <yao.qi@linaro.org>
4402 * linux-aarch64-low.c: Update all callers as emit_load_store
4403 is renamed to aarch64_emit_load_store.
4405 2015-10-12 Yao Qi <yao.qi@linaro.org>
4407 * linux-aarch64-low.c: Update all callers of function renaming
4408 from emit_insn to aarch64_emit_insn.
4410 2015-10-12 Yao Qi <yao.qi@linaro.org>
4412 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4413 arch/aarch64-insn.h.
4414 (struct aarch64_memory_operand): Likewise.
4416 (emit_insn): Move to arch/aarch64-insn.c.
4417 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4418 (emit_load_store): Move to arch/aarch64-insn.c.
4419 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4420 (can_encode_int32): Remove.
4422 2015-10-12 Yao Qi <yao.qi@linaro.org>
4424 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4425 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4426 (aarch64_relocate_instruction): Likewise.
4427 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4428 (struct aarch64_insn_visitor): Likewise.
4430 2015-10-12 Yao Qi <yao.qi@linaro.org>
4432 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4433 (struct aarch64_insn_visitor): New.
4434 (struct aarch64_insn_relocation_data): New.
4435 (aarch64_ftrace_insn_reloc_b): New function.
4436 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4437 (aarch64_ftrace_insn_reloc_cb): Likewise.
4438 (aarch64_ftrace_insn_reloc_tb): Likewise.
4439 (aarch64_ftrace_insn_reloc_adr): Likewise.
4440 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4441 (aarch64_ftrace_insn_reloc_others): Likewise.
4443 (aarch64_relocate_instruction): Use visitor.
4445 2015-10-12 Yao Qi <yao.qi@linaro.org>
4447 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4448 int. Add argument buf.
4449 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4450 aarch64_relocate_instruction.
4452 2015-10-12 Yao Qi <yao.qi@linaro.org>
4454 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4455 argument insn. Remove local variable insn. Don't call
4457 (aarch64_install_fast_tracepoint_jump_pad): Call
4460 2015-09-30 Yao Qi <yao.qi@linaro.org>
4462 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4463 (emit_load_store_pair): Likewise.
4465 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4467 * dll.c (match_dll): Add cast(s).
4468 (unloaded_dll): Likewise.
4469 * linux-low.c (second_thread_of_pid_p): Likewise.
4470 (delete_lwp_callback): Likewise.
4471 (count_events_callback): Likewise.
4472 (select_event_lwp_callback): Likewise.
4473 (linux_set_resume_request): Likewise.
4474 * server.c (accumulate_file_name_length): Likewise.
4475 (emit_dll_description): Likewise.
4476 (handle_qxfer_threads_worker): Likewise.
4477 (visit_actioned_threads): Likewise.
4478 * thread-db.c (any_thread_of): Likewise.
4479 * tracepoint.c (same_process_p): Likewise.
4480 (match_blocktype): Likewise.
4481 (build_traceframe_info_xml): Likewise.
4483 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4485 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4487 (gdb_unparse_agent_expr): Likewise.
4488 * hostio.c (require_data): Likewise.
4489 (handle_pread): Likewise.
4490 * linux-low.c (disable_regset): Likewise.
4491 (fetch_register): Likewise.
4492 (store_register): Likewise.
4493 (get_dynamic): Likewise.
4494 (linux_qxfer_libraries_svr4): Likewise.
4495 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4496 (set_fast_tracepoint_jump): Likewise.
4497 (uninsert_fast_tracepoint_jumps_at): Likewise.
4498 (reinsert_fast_tracepoint_jumps_at): Likewise.
4499 (validate_inserted_breakpoint): Likewise.
4500 (clone_agent_expr): Likewise.
4501 * regcache.c (init_register_cache): Likewise.
4502 * remote-utils.c (putpkt_binary_1): Likewise.
4503 (decode_M_packet): Likewise.
4504 (decode_X_packet): Likewise.
4505 (look_up_one_symbol): Likewise.
4506 (relocate_instruction): Likewise.
4507 (monitor_output): Likewise.
4508 * server.c (handle_search_memory): Likewise.
4509 (handle_qxfer_exec_file): Likewise.
4510 (handle_qxfer_libraries): Likewise.
4511 (handle_qxfer): Likewise.
4512 (handle_query): Likewise.
4513 (handle_v_cont): Likewise.
4514 (handle_v_run): Likewise.
4515 (captured_main): Likewise.
4516 * target.c (write_inferior_memory): Likewise.
4517 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4518 * tracepoint.c (init_trace_buffer): Likewise.
4519 (add_tracepoint_action): Likewise.
4520 (add_traceframe): Likewise.
4521 (add_traceframe_block): Likewise.
4522 (cmd_qtdpsrc): Likewise.
4523 (cmd_qtdv): Likewise.
4524 (cmd_qtstatus): Likewise.
4525 (response_source): Likewise.
4526 (response_tsv): Likewise.
4527 (cmd_qtnotes): Likewise.
4528 (gdb_collect): Likewise.
4529 (initialize_tracepoint): Likewise.
4531 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4533 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4534 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4535 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4537 (enum aarch64_condition_codes): New enum.
4538 (w0): New static global.
4541 (struct aarch64_memory_operand) <type>: New
4542 MEMORY_OPERAND_POSTINDEX type.
4543 (postindex_memory_operand): New helper function.
4544 (emit_ret): New function.
4545 (emit_load_store_pair): New function, factored out of emit_stp
4546 with support for MEMORY_OPERAND_POSTINDEX.
4547 (emit_stp): Rewrite using emit_load_store_pair.
4548 (emit_ldp): New function.
4549 (emit_load_store): Likewise.
4550 (emit_ldr): Mention post-index instruction in comment.
4551 (emit_ldrh): New function.
4552 (emit_ldrb): New function.
4553 (emit_ldrsw): Mention post-index instruction in comment.
4554 (emit_str): Likewise.
4555 (emit_subs): New function.
4556 (emit_cmp): Likewise.
4557 (emit_and): Likewise.
4558 (emit_orr): Likewise.
4559 (emit_orn): Likewise.
4560 (emit_eor): Likewise.
4561 (emit_mvn): Likewise.
4562 (emit_lslv): Likewise.
4563 (emit_lsrv): Likewise.
4564 (emit_asrv): Likewise.
4565 (emit_mul): Likewise.
4566 (emit_sbfm): Likewise.
4567 (emit_sbfx): Likewise.
4568 (emit_ubfm): Likewise.
4569 (emit_ubfx): Likewise.
4570 (emit_csinc): Likewise.
4571 (emit_cset): Likewise.
4572 (emit_nop): Likewise.
4573 (emit_ops_insns): New helper function.
4574 (emit_pop): Likewise.
4575 (emit_push): Likewise.
4576 (aarch64_emit_prologue): New function.
4577 (aarch64_emit_epilogue): Likewise.
4578 (aarch64_emit_add): Likewise.
4579 (aarch64_emit_sub): Likewise.
4580 (aarch64_emit_mul): Likewise.
4581 (aarch64_emit_lsh): Likewise.
4582 (aarch64_emit_rsh_signed): Likewise.
4583 (aarch64_emit_rsh_unsigned): Likewise.
4584 (aarch64_emit_ext): Likewise.
4585 (aarch64_emit_log_not): Likewise.
4586 (aarch64_emit_bit_and): Likewise.
4587 (aarch64_emit_bit_or): Likewise.
4588 (aarch64_emit_bit_xor): Likewise.
4589 (aarch64_emit_bit_not): Likewise.
4590 (aarch64_emit_equal): Likewise.
4591 (aarch64_emit_less_signed): Likewise.
4592 (aarch64_emit_less_unsigned): Likewise.
4593 (aarch64_emit_ref): Likewise.
4594 (aarch64_emit_if_goto): Likewise.
4595 (aarch64_emit_goto): Likewise.
4596 (aarch64_write_goto_address): Likewise.
4597 (aarch64_emit_const): Likewise.
4598 (aarch64_emit_call): Likewise.
4599 (aarch64_emit_reg): Likewise.
4600 (aarch64_emit_pop): Likewise.
4601 (aarch64_emit_stack_flush): Likewise.
4602 (aarch64_emit_zero_ext): Likewise.
4603 (aarch64_emit_swap): Likewise.
4604 (aarch64_emit_stack_adjust): Likewise.
4605 (aarch64_emit_int_call_1): Likewise.
4606 (aarch64_emit_void_call_2): Likewise.
4607 (aarch64_emit_eq_goto): Likewise.
4608 (aarch64_emit_ne_goto): Likewise.
4609 (aarch64_emit_lt_goto): Likewise.
4610 (aarch64_emit_le_goto): Likewise.
4611 (aarch64_emit_gt_goto): Likewise.
4612 (aarch64_emit_ge_got): Likewise.
4613 (aarch64_emit_ops_impl): New static global variable.
4614 (aarch64_emit_ops): New target function, return
4615 &aarch64_emit_ops_impl.
4616 (struct linux_target_ops): Install it.
4618 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4620 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4621 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4623 * linux-aarch64-ipa.c: New file.
4624 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4626 (aarch64_get_thread_area): New target method.
4627 (extract_signed_bitfield): New helper function.
4628 (aarch64_decode_ldr_literal): New function.
4629 (enum aarch64_opcodes): New enum.
4630 (struct aarch64_register): New struct.
4631 (struct aarch64_operand): New struct.
4632 (x0): New static global.
4641 (aarch64_register): New helper function.
4642 (register_operand): Likewise.
4643 (immediate_operand): Likewise.
4644 (struct aarch64_memory_operand): New struct.
4645 (offset_memory_operand): New helper function.
4646 (preindex_memory_operand): Likewise.
4647 (enum aarch64_system_control_registers): New enum.
4648 (ENCODE): New macro.
4649 (emit_insn): New helper function.
4650 (emit_b): New function.
4651 (emit_bcond): Likewise.
4652 (emit_cb): Likewise.
4653 (emit_tb): Likewise.
4654 (emit_blr): Likewise.
4655 (emit_stp): Likewise.
4656 (emit_ldp_q_offset): Likewise.
4657 (emit_stp_q_offset): Likewise.
4658 (emit_load_store): Likewise.
4659 (emit_ldr): Likewise.
4660 (emit_ldrsw): Likewise.
4661 (emit_str): Likewise.
4662 (emit_ldaxr): Likewise.
4663 (emit_stxr): Likewise.
4664 (emit_stlr): Likewise.
4665 (emit_data_processing_reg): Likewise.
4666 (emit_data_processing): Likewise.
4667 (emit_add): Likewise.
4668 (emit_sub): Likewise.
4669 (emit_mov): Likewise.
4670 (emit_movk): Likewise.
4671 (emit_mov_addr): Likewise.
4672 (emit_mrs): Likewise.
4673 (emit_msr): Likewise.
4674 (emit_sevl): Likewise.
4675 (emit_wfe): Likewise.
4676 (append_insns): Likewise.
4677 (can_encode_int32_in): New helper function.
4678 (aarch64_relocate_instruction): New function.
4679 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4680 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4681 (struct linux_target_ops): Install aarch64_get_thread_area,
4682 aarch64_install_fast_tracepoint_jump_pad and
4683 aarch64_get_min_fast_tracepoint_insn_len.
4685 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4687 * Makefile.in (aarch64-insn.o): New rule.
4688 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4690 2015-09-21 Yao Qi <yao.qi@linaro.org>
4692 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4694 2015-09-21 Yao Qi <yao.qi@linaro.org>
4696 * tracepoint.c (max_jump_pad_size): Remove.
4698 2015-09-18 Yao Qi <yao.qi@linaro.org>
4700 * linux-aarch64-low.c: Don't include sys/uio.h.
4701 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4703 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4705 * tracepoint.c (eval_result_type): Change prototype.
4706 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4708 2015-09-15 Pedro Alves <palves@redhat.com>
4710 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4711 Check whether to report exec events instead of checking whether
4712 multiprocess is enabled.
4714 2015-09-15 Pedro Alves <palves@redhat.com>
4717 * remote-utils.c (prepare_resume_reply): Merge
4718 TARGET_WAITKIND_VFORK_DONE switch case with the
4719 TARGET_WAITKIND_FORKED case.
4721 2015-09-15 Yao Qi <yao.qi@linaro.org>
4723 * server.c (handle_query): Check string comparison using
4724 "else if" instead of "if".
4726 2015-09-15 Yao Qi <yao.qi@linaro.org>
4728 * server.c (vCont_supported): New global variable.
4729 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4730 matches. Append ";vContSupported+" to own_buf.
4731 (handle_v_requests): Append ";s;S" to own_buf if target supports
4732 hardware single step or vCont_supported is false.
4733 (capture_main): Set vCont_supported to zero.
4735 2015-09-15 Yao Qi <yao.qi@linaro.org>
4737 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4739 (linux_supports_hardware_single_step): ... New function.
4740 (linux_target_ops): Update.
4741 * lynx-low.c (lynx_target_ops): Set field
4742 supports_hardware_single_step to target_can_do_hardware_single_step.
4743 * nto-low.c (nto_target_ops): Likewise.
4744 * spu-low.c (spu_target_ops): Likewise.
4745 * win32-low.c (win32_target_ops): Likewise.
4746 * target.c (target_can_do_hardware_single_step): New function.
4747 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4748 Remove. <supports_hardware_single_step>: New field.
4749 (target_supports_conditional_breakpoints): Remove.
4750 (target_supports_hardware_single_step): New macro.
4751 (target_can_do_hardware_single_step): Declare.
4752 * server.c (handle_query): Use target_supports_hardware_single_step
4753 instead of target_supports_conditional_breakpoints.
4755 2015-09-15 Yao Qi <yao.qi@linaro.org>
4757 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4759 (struct linux_target_ops the_low_target): Install
4760 aarch64_linux_siginfo_fixup.
4762 2015-09-11 Don Breazeal <donb@codesourcery.com>
4763 Luis Machado <lgustavo@codesourcery.com>
4765 * linux-low.c (linux_mourn): Static declaration.
4766 (linux_arch_setup): Move in front of
4767 handle_extended_wait.
4768 (linux_arch_setup_thread): New function.
4769 (handle_extended_wait): Handle exec events. Call
4770 linux_arch_setup_thread. Make event_lwp argument a
4771 pointer-to-a-pointer.
4772 (check_zombie_leaders): Do not check stopped threads.
4773 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4774 (linux_low_filter_event): Add lwp and thread for exec'ing
4775 non-leader thread if leader thread has been deleted.
4776 Refactor code into linux_arch_setup_thread and call it.
4777 Pass child lwp pointer by reference to handle_extended_wait.
4778 (linux_wait_for_event_filtered): Update comment.
4779 (linux_wait_1): Prevent clobbering exec event status.
4780 (linux_supports_exec_events): New function.
4781 (linux_target_ops) <supports_exec_events>: Initialize new member.
4782 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4784 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4785 * server.c (report_exec_events): New global variable.
4786 (handle_query): Handle qSupported query for exec-events feature.
4787 (captured_main): Initialize report_exec_events.
4788 * server.h (report_exec_events): Declare new global variable.
4789 * target.h (struct target_ops) <supports_exec_events>: New
4791 (target_supports_exec_events): New macro.
4792 * win32-low.c (win32_target_ops) <supports_exec_events>:
4793 Initialize new member.
4795 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4797 * linux-low.c (linux_low_enable_btrace): Remove.
4798 (linux_target_ops): Replace linux_low_enable_btrace with
4799 linux_enable_btrace.
4801 2015-09-03 Yao Qi <yao.qi@linaro.org>
4803 * linux-aarch64-low.c (aarch64_insert_point): Call
4804 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4807 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4809 * linux-low.c (check_stopped_by_breakpoint): Use
4810 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4812 2015-08-27 Pedro Alves <palves@redhat.com>
4814 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4816 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4818 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4819 the XNEW-family equivalent.
4820 (compile_bytecodes): Likewise.
4821 * dll.c (loaded_dll): Likewise.
4822 * event-loop.c (append_callback_event): Likewise.
4823 (create_file_handler): Likewise.
4824 (create_file_event): Likewise.
4825 * hostio.c (handle_open): Likewise.
4826 * inferiors.c (add_thread): Likewise.
4827 (add_process): Likewise.
4828 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4829 * linux-arm-low.c (arm_new_process): Likewise.
4830 (arm_new_thread): Likewise.
4831 * linux-low.c (add_to_pid_list): Likewise.
4832 (linux_add_process): Likewise.
4833 (handle_extended_wait): Likewise.
4834 (add_lwp): Likewise.
4835 (enqueue_one_deferred_signal): Likewise.
4836 (enqueue_pending_signal): Likewise.
4837 (linux_resume_one_lwp_throw): Likewise.
4838 (linux_resume_one_thread): Likewise.
4839 (linux_read_memory): Likewise.
4840 (linux_write_memory): Likewise.
4841 * linux-mips-low.c (mips_linux_new_process): Likewise.
4842 (mips_linux_new_thread): Likewise.
4843 (mips_add_watchpoint): Likewise.
4844 * linux-x86-low.c (initialize_low_arch): Likewise.
4845 * lynx-low.c (lynx_add_process): Likewise.
4846 * mem-break.c (set_raw_breakpoint_at): Likewise.
4847 (set_breakpoint): Likewise.
4848 (add_condition_to_breakpoint): Likewise.
4849 (add_commands_to_breakpoint): Likewise.
4850 (clone_agent_expr): Likewise.
4851 (clone_one_breakpoint): Likewise.
4852 * regcache.c (new_register_cache): Likewise.
4853 * remote-utils.c (look_up_one_symbol): Likewise.
4854 * server.c (queue_stop_reply): Likewise.
4855 (start_inferior): Likewise.
4856 (queue_stop_reply_callback): Likewise.
4857 (handle_target_event): Likewise.
4858 * spu-low.c (fetch_ppc_memory): Likewise.
4859 (store_ppc_memory): Likewise.
4860 * target.c (set_target_ops): Likewise.
4861 * thread-db.c (thread_db_load_search): Likewise.
4862 (try_thread_db_load_1): Likewise.
4863 * tracepoint.c (add_tracepoint): Likewise.
4864 (add_tracepoint_action): Likewise.
4865 (create_trace_state_variable): Likewise.
4866 (cmd_qtdpsrc): Likewise.
4867 (cmd_qtro): Likewise.
4868 (add_while_stepping_state): Likewise.
4869 * win32-low.c (child_add_thread): Likewise.
4870 (get_image_name): Likewise.
4872 2015-08-25 Yao Qi <yao.qi@linaro.org>
4874 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4876 2015-08-25 Yao Qi <yao.qi@linaro.org>
4878 * Makefile.in (aarch64-linux.o): New rule.
4879 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4881 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4882 (aarch64_init_debug_reg_state): Make it extern.
4883 (aarch64_linux_prepare_to_resume): Remove.
4885 2015-08-25 Yao Qi <yao.qi@linaro.org>
4887 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4888 lwp_arch_private_info and ptid_of_lwp.
4890 2015-08-25 Yao Qi <yao.qi@linaro.org>
4892 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4893 Find proc_info by find_process_pid. All callers updated.
4895 2015-08-25 Yao Qi <yao.qi@linaro.org>
4897 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4899 (debug_reg_change_callback): Remove.
4900 (aarch64_notify_debug_reg_change): Remove.
4902 2015-08-25 Yao Qi <yao.qi@linaro.org>
4904 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4905 Call current_lwp_ptid.
4907 2015-08-25 Yao Qi <yao.qi@linaro.org>
4909 * linux-aarch64-low.c (debug_reg_change_callback): Use
4912 2015-08-25 Yao Qi <yao.qi@linaro.org>
4914 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4916 2015-08-25 Yao Qi <yao.qi@linaro.org>
4918 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4920 2015-08-25 Yao Qi <yao.qi@linaro.org>
4922 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4925 2015-08-25 Yao Qi <yao.qi@linaro.org>
4927 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4929 (debug_reg_change_callback): Remove argument entry and add argument
4930 lwp. Remove local variable thread. Don't print thread id in the
4931 debugging output. Don't check whether pid of thread equals to pid.
4932 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4933 iterate_over_lwps instead find_inferior.
4935 2015-08-24 Pedro Alves <palves@redhat.com>
4937 * inferiors.c (get_first_process): New function.
4938 * inferiors.h (get_first_process): New declaration.
4939 * remote-utils.c (read_ptid): Default to the first process in the
4940 list, instead of to the current thread's process.
4942 2015-08-24 Pedro Alves <palves@redhat.com>
4944 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4945 * event-loop.c: Likewise.
4946 * remote-utils.c: Likewise.
4947 * tracepoint.c: Likewise.
4949 2015-08-24 Pedro Alves <palves@redhat.com>
4951 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4954 2015-08-21 Pedro Alves <palves@redhat.com>
4956 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4957 instead of literal 1.
4959 2015-08-21 Pedro Alves <palves@redhat.com>
4961 * tdesc.c (default_description): Explicitly zero-initialize.
4963 2015-08-21 Pedro Alves <palves@redhat.com>
4966 * inferiors.c (remove_thread): Discard any pending stop reply for
4968 * server.c (remove_all_on_match_pid): Rename to ...
4969 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4971 (discard_queued_stop_replies): Change parameter to a ptid. Now
4973 (handle_v_kill, kill_inferior_callback, captured_main)
4974 (process_serial_event): Adjust.
4975 * server.h (discard_queued_stop_replies): Declare.
4977 2015-08-21 Pedro Alves <palves@redhat.com>
4979 * linux-low.c (wait_for_sigstop): Always switch to no thread
4980 selected if the previously current thread dies.
4981 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4982 process instead of the current thread's.
4983 * remote-utils.c (input_interrupt): Don't check if there's no
4985 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4986 current thread to the general thread fails, error out.
4987 (handle_qxfer_auxv, handle_qxfer_libraries)
4988 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4989 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4990 (handle_query): Check if there's a thread selected instead of
4991 checking whether there's any thread in the thread list.
4992 (handle_qxfer_threads, handle_qxfer_btrace)
4993 (handle_qxfer_btrace_conf): Don't error out early if there's no
4994 thread in the thread list.
4995 (handle_v_cont, myresume): Don't set the current thread to the
4997 (process_serial_event) <Hg handling>: Also set thread_id if the
4998 previous general thread is still alive.
4999 (process_serial_event) <g/G handling>: If setting the current
5000 thread to the general thread fails, error out.
5001 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5002 thread's lwp instead of the current thread's.
5003 * target.c (set_desired_thread): If the desired thread was not
5004 found, leave the current thread pointing to NULL. Return an int
5005 (boolean) indicating success.
5006 * target.h (set_desired_thread): Change return type to int.
5008 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5010 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5011 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5013 (ps_get_thread_area): New function.
5015 2015-08-19 Gary Benson <gbenson@redhat.com>
5017 * hostio.c (handle_pread): Do not attempt to read more data
5018 than hostio_reply_with_data can fit in a packet.
5020 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5022 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5024 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5026 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5028 2015-08-06 Pedro Alves <palves@redhat.com>
5030 * tracepoint.c (expr_eval_result): Now an int.
5032 2015-08-06 Pedro Alves <palves@redhat.com>
5034 * gdbthread.h (struct regcache): Forward declare.
5035 (struct thread_info) <regcache_data>: Now a struct regcache
5037 * inferiors.c (inferior_regcache_data)
5038 (set_inferior_regcache_data): Now work with struct regcache
5040 * inferiors.h (struct regcache): Forward declare.
5041 (inferior_regcache_data, set_inferior_regcache_data): Now work
5042 with struct regcache pointers.
5043 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5044 (free_register_cache_thread): Remove struct regcache pointer
5047 2015-08-06 Pedro Alves <palves@redhat.com>
5049 * server.c (captured_main): On error, print the exception message
5050 to stderr, and if run_once is set, throw a quit.
5052 2015-08-06 Pedro Alves <palves@redhat.com>
5054 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5057 2015-08-06 Pedro Alves <palves@redhat.com>
5059 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5060 reading beyond the passed in buffer length.
5062 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5064 * tracepoint.c (symbol_list) <required>: Remove.
5066 2015-08-06 Pedro Alves <palves@redhat.com>
5068 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5069 count if stopping and suspending threads.
5070 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5071 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5072 (linux_detach): Complete an ongoing step-over.
5073 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5075 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5076 (linux_wait_1): If passing a signal to the inferior after
5077 finishing a step-over, unsuspend and re-resume all lwps. If we
5078 see a single-step event but the thread should be continuing, don't
5079 pass the trap to gdb.
5080 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5081 internal_error instead of gdb_assert.
5082 (enqueue_pending_signal): New function.
5083 (check_ptrace_stopped_lwp_gone): Add debug output.
5084 (start_step_over): Use internal_error instead of gdb_assert.
5085 (complete_ongoing_step_over): New function.
5086 (linux_resume_one_thread): Don't resume a suspended thread.
5087 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5090 2015-08-06 Pedro Alves <palves@redhat.com>
5092 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5093 (linux_thread_alive): Use lwp_is_marked_dead.
5094 (extended_event_reported): Delete.
5095 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5096 instead of extended_event_reported.
5097 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5099 (lwp_is_marked_dead): New function.
5100 (lwp_running): Use lwp_is_marked_dead.
5101 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5104 2015-08-06 Pedro Alves <palves@redhat.com>
5106 * linux-low.c (linux_wait_1): Move fork event output out of the
5107 !report_to_gdb check. Pass event_child->waitstatus to
5108 target_waitstatus_to_string instead of ourstatus.
5110 2015-08-04 Yao Qi <yao.qi@linaro.org>
5112 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5113 if current_thread is 32 bit.
5115 2015-08-04 Yao Qi <yao.qi@linaro.org>
5117 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5118 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5119 * server.c (extended_protocol): Remove "static".
5120 * server.h (extended_protocol): Declare it.
5122 2015-08-04 Yao Qi <yao.qi@linaro.org>
5124 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5125 both aarch64 and aarch32.
5126 (aarch64_set_pc): Likewise.
5128 2015-08-04 Yao Qi <yao.qi@linaro.org>
5130 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5131 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5132 arm-with-neon.xml to srv_xmlfiles.
5133 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5134 (is_64bit_tdesc): New function.
5135 (aarch64_linux_read_description): New function.
5136 (aarch64_arch_setup): Call aarch64_linux_read_description.
5137 (regs_info): Rename to regs_info_aarch64.
5138 (aarch64_regs_info): Return right regs_info.
5139 (initialize_low_arch): Call initialize_low_arch_aarch32.
5141 2015-08-04 Yao Qi <yao.qi@linaro.org>
5143 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5144 * linux-aarch32-low.c: New file.
5145 * linux-aarch32-low.h: New file.
5146 * linux-arm-low.c (arm_fill_gregset): Move it to
5147 linux-aarch32-low.c.
5148 (arm_store_gregset): Likewise.
5149 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5150 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5151 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5152 (regs_info): Rename to regs_info_arm.
5153 (arm_regs_info): Return regs_info_aarch32 if
5154 have_ptrace_getregset is 1 and target description is
5155 arm_with_neon or arm_with_vfpv3.
5156 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5157 Call initialize_low_arch_aarch32 instead.
5159 2015-08-04 Yao Qi <yao.qi@linaro.org>
5161 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5162 * linux-low.c: ... here.
5163 * linux-low.h (have_ptrace_getregset): Declare it.
5165 2015-08-04 Pedro Alves <palves@redhat.com>
5167 * thread-db.c (struct thread_db): Use new typedefs.
5168 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5170 (disable_thread_event_reporting): Cast result of dlsym to
5171 destination function pointer type.
5172 (thread_db_mourn): Use td_ta_delete_ftype.
5174 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5176 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5178 (CDX_BREAKPOINT): Define for R2.
5179 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5180 (the_low_target): Add comments.
5182 2015-07-30 Yao Qi <yao.qi@linaro.org>
5184 * linux-arm-low.c (arm_hwcap): Remove it.
5185 (arm_read_description): New local variable arm_hwcap. Don't
5186 set arm_hwcap to zero.
5188 2015-07-30 Yao Qi <yao.qi@linaro.org>
5190 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5191 Use regcache->tdesc instead.
5192 (arm_store_wmmxregset): Likewise.
5193 (arm_fill_vfpregset): Likewise.
5194 (arm_store_vfpregset): Likewise.
5196 2015-07-30 Yao Qi <yao.qi@linaro.org>
5198 * linux-arm-low.c: Include arch/arm.h.
5199 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5200 (arm_store_gregset): Likewise.
5202 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5204 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5205 ptrace's 4th parameter.
5207 2015-07-27 Yao Qi <yao.qi@linaro.org>
5209 * configure.srv (case aarch64*-*-linux*): Don't set
5212 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5214 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5216 * linux-arm-low.c: Likewise.
5217 * linux-cris-low.c: Likewise.
5218 * linux-crisv32-low.c: Likewise.
5219 * linux-low.c: Likewise.
5220 * linux-m68k-low.c: Likewise.
5221 * linux-mips-low.c: Likewise.
5222 * linux-nios2-low.c: Likewise.
5223 * linux-s390-low.c: Likewise.
5224 * linux-sparc-low.c: Likewise.
5225 * linux-tic6x-low.c: Likewise.
5226 * linux-tile-low.c: Likewise.
5227 * linux-x86-low.c: Likewise.
5229 2015-07-24 Pedro Alves <palves@redhat.com>
5231 * config.in: Regenerate.
5232 * configure: Regenerate.
5234 2015-07-24 Pedro Alves <palves@redhat.com>
5236 * acinclude.m4: Include ../ptrace.m4.
5237 * configure.ac: Call GDB_AC_PTRACE.
5238 * config.in, configure: Regenerate.
5240 2015-07-24 Yao Qi <yao.qi@linaro.org>
5242 * linux-low.c (linux_create_inferior): Remove setting to
5243 proc->priv->new_inferior.
5244 (linux_attach): Likewise.
5245 (linux_low_filter_event): Likewise.
5246 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5248 2015-07-24 Yao Qi <yao.qi@linaro.org>
5250 * linux-low.c (linux_arch_setup): New function.
5251 (linux_low_filter_event): If proc->tdesc is NULL and
5252 proc->attached is true, call the_low_target.arch_setup.
5253 Otherwise, keep status pending, and return.
5254 (linux_resume_one_lwp_throw): Don't call get_pc if
5255 thread->while_stepping isn't NULL. Don't call
5256 get_thread_regcache if proc->tdesc is NULL.
5257 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5258 (linux_target_ops): Install arch_setup.
5259 * server.c (start_inferior): Call the_target->arch_setup.
5260 * target.h (struct target_ops) <arch_setup>: New field.
5261 (target_arch_setup): New marco.
5262 * lynx-low.c (lynx_target_ops): Update.
5263 * nto-low.c (nto_target_ops): Update.
5264 * spu-low.c (spu_target_ops): Update.
5265 * win32-low.c (win32_target_ops): Update.
5267 2015-07-24 Yao Qi <yao.qi@linaro.org>
5269 * linux-low.c (linux_add_process): Don't set
5270 proc->priv->new_inferior.
5271 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5272 (linux_attach): Likewise.
5274 2015-07-24 Yao Qi <yao.qi@linaro.org>
5276 * server.c (start_inferior): Code refactor.
5278 2015-07-24 Yao Qi <yao.qi@linaro.org>
5280 * server.c (process_serial_event): Set general_thread.
5282 2015-07-21 Yao Qi <yao.qi@linaro.org>
5284 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5285 aarch64_linux_get_debug_reg_capacity.
5287 2015-07-17 Yao Qi <yao.qi@linaro.org>
5289 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5290 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5291 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5292 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5293 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5294 (AARCH64_HWP_ALIGNMENT): Likewise.
5295 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5296 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5297 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5298 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5299 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5300 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5301 (struct aarch64_debug_reg_state): Likewise.
5302 (struct arch_lwp_info): Likewise.
5303 (aarch64_align_watchpoint): Likewise.
5304 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5305 (aarch64_watchpoint_length): Likewise.
5306 (aarch64_point_encode_ctrl_reg): Likewise
5307 (aarch64_point_is_aligned): Likewise.
5308 (aarch64_align_watchpoint): Likewise.
5309 (aarch64_linux_set_debug_regs):
5310 (aarch64_dr_state_insert_one_point): Likewise.
5311 (aarch64_dr_state_remove_one_point): Likewise.
5312 (aarch64_handle_breakpoint): Likewise.
5313 (aarch64_handle_aligned_watchpoint): Likewise.
5314 (aarch64_handle_unaligned_watchpoint): Likewise.
5315 (aarch64_handle_watchpoint): Likewise.
5317 2015-07-17 Yao Qi <yao.qi@linaro.org>
5319 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5320 and don't aarch64_get_debug_reg_state. All callers update.
5321 (aarch64_handle_aligned_watchpoint): Likewise.
5322 (aarch64_handle_unaligned_watchpoint): Likewise.
5323 (aarch64_handle_watchpoint): Likewise.
5324 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5325 (aarch64_remove_point): Likewise.
5327 2015-07-17 Yao Qi <yao.qi@linaro.org>
5329 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5331 (aarch64_handle_unaligned_watchpoint): Likewise.
5333 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5335 Revert the previous 3 commits:
5336 Move gdb_regex* to common/
5337 Move linux_find_memory_regions_full & co.
5338 gdbserver build-id attribute generator
5340 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5341 Jan Kratochvil <jan.kratochvil@redhat.com>
5343 gdbserver build-id attribute generator.
5344 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5345 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5346 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5348 (get_dynamic): Use find_pdhr to traverse program headers.
5349 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5350 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5351 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5352 (get_hex_build_id): New.
5353 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5354 to reply XML document.
5356 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5357 Jan Kratochvil <jan.kratochvil@redhat.com>
5359 * target.c: Include target/target-utils.h and fcntl.h.
5360 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5361 (target_fileio_read_stralloc): New functions.
5363 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5365 * Makefile.in (OBS): Add gdb_regex.o.
5367 * config.in: Rebuilt.
5368 * configure: Rebuilt.
5370 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5371 Jan Kratochvil <jan.kratochvil@redhat.com>
5373 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5374 * Makefile.in (OBS): Add target-utils.o.
5375 (linux-maps.o, target-utils.o): New.
5376 * configure.srv (srv_linux_obj): Add linux-maps.o.
5378 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5380 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5382 (the_low_target): Install it.
5384 2015-07-14 Pedro Alves <palves@redhat.com>
5386 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5387 Instead, ignore ECHILD, and throw an error for other errnos.
5389 2015-07-10 Pedro Alves <palves@redhat.com>
5391 * event-loop.c (struct callback_event) <data>: Change type to
5392 gdb_client_data instance instead of gdb_client_data pointer.
5393 (append_callback_event): Adjust.
5395 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5397 * linux-aarch64-low.c: Add comments for each linux_target_ops
5398 method. Remove comments already covered in target_ops and
5399 linux_target_ops definitions.
5400 (the_low_target): Add comments for each unimplemented method.
5402 2015-07-09 Yao Qi <yao.qi@linaro.org>
5404 * linux-aarch64-low.c (aarch64_regmap): Remove.
5405 (aarch64_usrregs_info): Remove.
5406 (regs_info): Set field usrregs to NULL.
5408 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5410 * linux-low.c: Include "rsp-low.h"
5411 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5412 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5413 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5414 (handle_btrace_enable_pt): New.
5415 (handle_btrace_general_set): Support "pt".
5416 (handle_btrace_conf_general_set): Support "pt:size".
5418 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5420 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5423 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5425 * linux-aarch64-low.c: Remove comment about endianness.
5426 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5427 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5430 2015-06-24 Gary Benson <gbenson@redhat.com>
5432 * linux-i386-ipa.c (stdint.h): Do not include.
5433 * lynx-i386-low.c (stdint.h): Likewise.
5434 * lynx-ppc-low.c (stdint.h): Likewise.
5435 * mem-break.c (stdint.h): Likewise.
5436 * thread-db.c (stdint.h): Likewise.
5437 * tracepoint.c (stdint.h): Likewise.
5438 * win32-low.c (stdint.h): Likewise.
5440 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5442 * server.c (write_qxfer_response): Update call to
5443 remote_escape_output.
5445 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5446 Jan Kratochvil <jan.kratochvil@redhat.com>
5448 Merge multiple hex conversions.
5449 * gdbreplay.c (tohex): Rename to 'fromhex'.
5450 (logchar): Use fromhex.
5452 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5454 * server.c (handle_qxfer_libraries): Set `version' attribute for
5457 2015-06-10 Gary Benson <gbenson@redhat.com>
5459 * target.h (struct target_ops) <multifs_open>: New field.
5460 <multifs_unlink>: Likewise.
5461 <multifs_readlink>: Likewise.
5462 * linux-low.c (nat/linux-namespaces.h): New include.
5463 (linux_target_ops): Initialize the_target->multifs_open,
5464 the_target->multifs_unlink and the_target->multifs_readlink.
5465 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5466 * hostio.c (hostio_fs_pid): New static variable.
5467 (hostio_handle_new_gdb_connection): New function.
5468 (handle_setfs): Likewise.
5469 (handle_open): Use the_target->multifs_open as appropriate.
5470 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5471 (handle_readlink): Use the_target->multifs_readlink as
5473 (handle_vFile): Handle vFile:setfs packets.
5474 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5475 after target_handle_new_gdb_connection.
5477 2015-06-10 Gary Benson <gbenson@redhat.com>
5479 * configure.ac (AC_CHECK_FUNCS): Add setns.
5480 * config.in: Regenerate.
5481 * configure: Likewise.
5482 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5483 (linux-namespaces.o): New rule.
5484 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5486 2015-06-09 Gary Benson <gbenson@redhat.com>
5488 * hostio.c (handle_open): Process mode argument with
5489 fileio_to_host_mode.
5491 2015-06-01 Yao Qi <yao.qi@linaro.org>
5493 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5494 * linux-x86-low.c: Likewise.
5496 2015-05-28 Don Breazeal <donb@codesourcery.com>
5498 * linux-low.c (handle_extended_wait): Initialize
5499 thread_info.last_resume_kind for new fork children.
5501 2015-05-15 Pedro Alves <palves@redhat.com>
5503 * target.h (target_handle_new_gdb_connection): Rewrite using if
5504 wrapped in do/while.
5506 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5508 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5509 * configure, config.in: Regenerate.
5510 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5513 2015-05-12 Don Breazeal <donb@codesourcery.com>
5515 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5516 PTRACE_EVENT_VFORK_DONE.
5517 (linux_low_ptrace_options, extended_event_reported): Add vfork
5519 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5520 and "vforkdone" for RSP 'T' Stop Reply Packet.
5521 * server.h (report_vfork_events): Declare
5524 2015-05-12 Don Breazeal <donb@codesourcery.com>
5526 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5527 (the_low_target) <new_fork>: Initialize new member.
5528 * linux-arm-low.c (arm_new_fork): New function.
5529 (the_low_target) <new_fork>: Initialize new member.
5530 * linux-low.c (handle_extended_wait): Call new target function
5532 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5533 * linux-mips-low.c (mips_add_watchpoint): New function
5534 extracted from mips_insert_point.
5535 (the_low_target) <new_fork>: Initialize new member.
5536 (mips_linux_new_fork): New function.
5537 (mips_insert_point): Call mips_add_watchpoint.
5538 * linux-x86-low.c (x86_linux_new_fork): New function.
5539 (the_low_target) <new_fork>: Initialize new member.
5541 2015-05-12 Don Breazeal <donb@codesourcery.com>
5543 * linux-low.c (handle_extended_wait): Implement return value,
5544 rename argument 'event_child' to 'event_lwp', handle
5545 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5546 (linux_low_ptrace_options): New function.
5547 (linux_low_filter_event): Call linux_low_ptrace_options,
5548 use different argument fo linux_enable_event_reporting,
5549 use return value from handle_extended_wait.
5550 (extended_event_reported): New function.
5551 (linux_wait_1): Call extended_event_reported and set
5552 status to report fork events.
5553 (linux_write_memory): Add pid to debug message.
5554 (reset_lwp_ptrace_options_callback): New function.
5555 (linux_handle_new_gdb_connection): New function.
5556 (linux_target_ops): Initialize new structure member.
5557 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5558 * lynx-low.c: Initialize new structure member.
5559 * remote-utils.c (prepare_resume_reply): Implement stop reason
5560 "fork" for "T" stop message.
5561 * server.c (handle_query): Call handle_new_gdb_connection.
5562 * server.h (report_fork_events): Declare global flag.
5563 * target.h (struct target_ops) <handle_new_gdb_connection>:
5565 (target_handle_new_gdb_connection): New macro.
5566 * win32-low.c: Initialize new structure member.
5568 2015-05-12 Don Breazeal <donb@codesourcery.com>
5570 * mem-break.c (APPEND_TO_LIST): Define macro.
5571 (clone_agent_expr): New function.
5572 (clone_one_breakpoint): New function.
5573 (clone_all_breakpoints): New function.
5574 * mem-break.h: Declare new functions.
5576 2015-05-12 Don Breazeal <donb@codesourcery.com>
5578 * linux-low.c (linux_supports_fork_events): New function.
5579 (linux_supports_vfork_events): New function.
5580 (linux_target_ops): Initialize new structure members.
5581 (initialize_low): Call linux_check_ptrace_features.
5582 * lynx-low.c (lynx_target_ops): Initialize new structure
5584 * server.c (report_fork_events, report_vfork_events):
5586 (handle_query): Add new features to qSupported packet and
5588 (captured_main): Initialize new global variables.
5589 * target.h (struct target_ops) <supports_fork_events>:
5591 <supports_vfork_events>: New member.
5592 (target_supports_fork_events): New macro.
5593 (target_supports_vfork_events): New macro.
5594 * win32-low.c (win32_target_ops): Initialize new structure
5597 2015-05-12 Gary Benson <gbenson@redhat.com>
5599 * server.c (handle_qxfer_exec_file): Use current process
5602 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5604 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5605 Remove HAVE_PTRACE_GETREGS conditionals.
5606 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5607 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5609 2015-05-08 Yao Qi <yao.qi@linaro.org>
5611 * linux-low.c (linux_supports_conditional_breakpoints): New
5613 (linux_target_ops): Install new target method.
5614 * lynx-low.c (lynx_target_ops): Install NULL hook for
5615 supports_conditional_breakpoints.
5616 * nto-low.c (nto_target_ops): Likewise.
5617 * spu-low.c (spu_target_ops): Likewise.
5618 * win32-low.c (win32_target_ops): Likewise.
5619 * server.c (handle_query): Check
5620 target_supports_conditional_breakpoints.
5621 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5623 (target_supports_conditional_breakpoints): New macro.
5625 2015-05-06 Pedro Alves <palves@redhat.com>
5628 * server.c (start_inferior): If the process exits, mourn it.
5630 2015-04-21 Gary Benson <gbenson@redhat.com>
5632 * hostio.c (fileio_open_flags_to_host): Factored out to
5633 fileio_to_host_openflags in common/fileio.c. Single use
5636 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5638 * linux-xtensa-low.c (xtensa_fill_gregset)
5639 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5642 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5644 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5645 (regs_info): Replace usrregs pointer with NULL.
5647 2015-04-17 Gary Benson <gbenson@redhat.com>
5649 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5650 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5651 * server.c (handle_qxfer_exec_file): New function.
5652 (qxfer_packets): Add exec-file entry.
5653 (handle_query): Report qXfer:exec-file:read as supported packet.
5655 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5657 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5659 2015-04-09 Gary Benson <gbenson@redhat.com>
5661 * hostio-errno.c (errno_to_fileio_error): Remove function.
5662 Update caller to use remote_fileio_to_fio_error.
5664 2015-04-09 Yao Qi <yao.qi@linaro.org>
5666 * linux-low.c (linux_insert_point): Call
5667 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5668 (linux_remove_point): Call remove_memory_breakpoint if type is
5670 * linux-x86-low.c (x86_insert_point): Don't call
5671 insert_memory_breakpoint.
5672 (x86_remove_point): Don't call remove_memory_breakpoint.
5674 2015-04-01 Pedro Alves <palves@redhat.com>
5675 Cleber Rosa <crosa@redhat.com>
5677 * server.c (gdbserver_usage): Reorganize and extend the usage
5680 2015-03-24 Pedro Alves <palves@redhat.com>
5682 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5683 output. Also dump TRAP_TRACE.
5684 (linux_low_filter_event): In debug output, distinguish a
5685 resume_stop SIGSTOP from a delayed SIGSTOP.
5687 2015-03-24 Gary Benson <gbenson@redhat.com>
5689 * linux-x86-low.c (x86_linux_new_thread): Moved to
5691 (x86_linux_prepare_to_resume): Likewise.
5693 2015-03-24 Gary Benson <gbenson@redhat.com>
5695 * Makefile.in (x86-linux-dregs.o): New rule.
5696 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5697 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5698 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5699 (x86_linux_dr_get): Likewise.
5700 (x86_linux_dr_set): Likewise.
5701 (update_debug_registers_callback): Likewise.
5702 (x86_linux_dr_set_addr): Likewise.
5703 (x86_linux_dr_get_addr): Likewise.
5704 (x86_linux_dr_set_control): Likewise.
5705 (x86_linux_dr_get_control): Likewise.
5706 (x86_linux_dr_get_status): Likewise.
5707 (x86_linux_update_debug_registers): Likewise.
5709 2015-03-24 Gary Benson <gbenson@redhat.com>
5711 * linux-x86-low.c (x86_linux_update_debug_registers):
5712 New function, factored out from...
5713 (x86_linux_prepare_to_resume): ...this.
5715 2015-03-24 Gary Benson <gbenson@redhat.com>
5717 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5718 (x86_linux_dr_set): Likewise.
5719 (update_debug_registers_callback): Likewise.
5720 (x86_linux_dr_set_addr): Likewise.
5721 (x86_linux_dr_get_addr): Likewise.
5722 (x86_linux_dr_set_control): Likewise.
5723 (x86_linux_dr_get_control): Likewise.
5724 (x86_linux_dr_get_status): Likewise.
5725 (x86_linux_prepare_to_resume): Likewise.
5727 2015-03-24 Gary Benson <gbenson@redhat.com>
5729 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5730 Use perror_with_name. Pass string through gettext.
5731 (x86_linux_dr_set): Likewise.
5733 2015-03-24 Gary Benson <gbenson@redhat.com>
5735 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5736 (x86_linux_dr_set_addr): ...this.
5737 (x86_dr_low_get_addr): Rename to...
5738 (x86_linux_dr_get_addr): ...this.
5739 (x86_dr_low_set_control): Rename to...
5740 (x86_linux_dr_set_control): ...this.
5741 (x86_dr_low_get_control): Rename to...
5742 (x86_linux_dr_get_control): ...this.
5743 (x86_dr_low_get_status): Rename to...
5744 (x86_linux_dr_get_status): ...this.
5745 (x86_dr_low): Update with new function names.
5747 2015-03-24 Gary Benson <gbenson@redhat.com>
5749 * Makefile.in (x86-linux.o): New rule.
5750 * configure.srv: Add x86-linux.o to relevant targets.
5751 * linux-low.c (lwp_set_arch_private_info): New function.
5752 (lwp_arch_private_info): Likewise.
5753 * linux-x86-low.c: Include nat/x86-linux.h.
5754 (arch_lwp_info): Removed structure.
5755 (update_debug_registers_callback):
5756 Use lwp_set_debug_registers_changed.
5757 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5758 and lwp_set_debug_registers_changed.
5759 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5761 2015-03-24 Gary Benson <gbenson@redhat.com>
5763 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5764 * linux-arm-low.c (arm_new_thread): Likewise.
5765 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5766 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5767 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5768 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5770 2015-03-24 Gary Benson <gbenson@redhat.com>
5772 * linux-low.c (ptid_of_lwp): New function.
5773 (lwp_is_stopped): Likewise.
5774 (lwp_stop_reason): Likewise.
5775 * linux-x86-low.c (update_debug_registers_callback):
5777 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5780 2015-03-24 Gary Benson <gbenson@redhat.com>
5782 * linux-low.h (linux_stop_lwp): Remove declaration.
5784 2015-03-24 Gary Benson <gbenson@redhat.com>
5786 * linux-low.h: Include nat/linux-nat.h.
5787 * linux-low.c (iterate_over_lwps_args): New structure.
5788 (iterate_over_lwps_filter): New function.
5789 (iterate_over_lwps): Likewise.
5790 * linux-x86-low.c (update_debug_registers_callback):
5791 Update signature to what iterate_over_lwps expects.
5792 Remove PID check that iterate_over_lwps now performs.
5793 (x86_dr_low_set_addr): Use iterate_over_lwps.
5794 (x86_dr_low_set_control): Likewise.
5796 2015-03-24 Gary Benson <gbenson@redhat.com>
5798 * linux-x86-low.c (x86_debug_reg_state): New function.
5799 (x86_linux_prepare_to_resume): Use the above.
5801 2015-03-24 Gary Benson <gbenson@redhat.com>
5803 * linux-low.c (current_lwp_ptid): New function.
5804 * linux-x86-low.c: Include nat/linux-nat.h.
5805 (x86_dr_low_get_addr): Use current_lwp_ptid.
5806 (x86_dr_low_get_control): Likewise.
5807 (x86_dr_low_get_status): Likewise.
5809 2015-03-20 Pedro Alves <palves@redhat.com>
5811 * tracepoint.c (cmd_qtstatus): Make "str" const.
5813 2015-03-20 Pedro Alves <palves@redhat.com>
5815 * server.c (handle_general_set): Make "req_str" const.
5817 2015-03-19 Pedro Alves <palves@redhat.com>
5819 * linux-low.c (linux_resume_one_lwp): Rename to ...
5820 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5821 instead call perror_with_name.
5822 (check_ptrace_stopped_lwp_gone): New function.
5823 (linux_resume_one_lwp): Reimplement as wrapper around
5824 linux_resume_one_lwp_throw that swallows errors if the LWP is
5827 2015-03-19 Pedro Alves <palves@redhat.com>
5829 * linux-low.c (count_events_callback, select_event_lwp_callback):
5830 No longer check whether the thread has resume_stop as last resume
5833 2015-03-19 Pedro Alves <palves@redhat.com>
5835 * linux-low.c (count_events_callback, select_event_lwp_callback):
5836 Use the lwp's status_pending_p field, not the thread's.
5838 2015-03-19 Pedro Alves <palves@redhat.com>
5840 * linux-low.c (select_event_lwp_callback): Update comments to
5841 no longer mention SIGTRAP.
5843 2015-03-18 Gary Benson <gbenson@redhat.com>
5845 * server.c (handle_query): Do not report vFile:fstat as supported.
5847 2015-03-11 Gary Benson <gbenson@redhat.com>
5849 * hostio.c (sys/types.h): New include.
5850 (sys/stat.h): Likewise.
5851 (common-remote-fileio.h): Likewise.
5852 (handle_fstat): New function.
5853 (handle_vFile): Handle vFile:fstat packets.
5855 2015-03-11 Gary Benson <gbenson@redhat.com>
5857 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5858 struct stat.st_blocks and struct stat.st_blksize.
5859 * configure: Regenerate.
5860 * config.in: Likewise.
5861 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5862 (OBS): Add common-remote-fileio.o.
5863 (common-remote-fileio.o): New rule.
5865 2015-03-09 Pedro Alves <palves@redhat.com>
5867 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5868 'struct sockaddr' pointer in 'accept' call.
5870 2015-03-09 Pedro Alves <palves@redhat.com>
5873 2015-03-07 Pedro Alves <palves@redhat.com>
5874 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5875 or <winsock2.h> here. Instead include "gdb_socket.h".
5876 (remote_open): Use union gdb_sockaddr_u.
5877 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5878 or <winsock2.h> here. Instead include "gdb_socket.h".
5879 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5880 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5882 (init_named_socket, gdb_agent_helper_thread): Use union
5885 2015-03-07 Pedro Alves <palves@redhat.com>
5887 * configure.ac (build_warnings): Move
5888 -Wdeclaration-after-statement to the C-specific set.
5889 * configure: Regenerate.
5891 2015-03-07 Pedro Alves <palves@redhat.com>
5893 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5894 or <winsock2.h> here. Instead include "gdb_socket.h".
5895 (remote_open): Use union gdb_sockaddr_u.
5896 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5897 or <winsock2.h> here. Instead include "gdb_socket.h".
5898 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5899 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5901 (init_named_socket, gdb_agent_helper_thread): Use union
5904 2015-03-07 Pedro Alves <palves@redhat.com>
5906 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5909 2015-03-06 Yao Qi <yao.qi@linaro.org>
5911 * linux-aarch64-low.c (aarch64_insert_point): Use
5912 show_debug_regs as a boolean.
5913 (aarch64_remove_point): Likewise.
5915 2015-03-05 Pedro Alves <palves@redhat.com>
5917 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5918 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5919 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5920 * nto-low.c (nto_target_ops): Likewise.
5921 * spu-low.c (spu_target_ops): Likewise.
5922 * win32-low.c (win32_target_ops): Likewise.
5924 2015-03-04 Pedro Alves <palves@redhat.com>
5926 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
5927 Decide whether a breakpoint triggered based on the SIGTRAP's
5929 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5930 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
5931 (linux_low_filter_event): Check for breakpoints before checking
5933 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5935 (linux_stopped_by_sw_breakpoint)
5936 (linux_supports_stopped_by_sw_breakpoint)
5937 (linux_stopped_by_hw_breakpoint)
5938 (linux_supports_stopped_by_hw_breakpoint): New functions.
5939 (linux_target_ops): Install new target methods.
5941 2015-03-04 Pedro Alves <palves@redhat.com>
5943 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5944 * server.c (swbreak_feature, hwbreak_feature): New globals.
5945 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5946 (captured_main): Clear swbreak_feature and hwbreak_feature.
5947 * server.h (swbreak_feature, hwbreak_feature): Declare.
5948 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5949 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5950 supports_stopped_by_hw_breakpoint>: New fields.
5951 (target_supports_stopped_by_sw_breakpoint)
5952 (target_stopped_by_sw_breakpoint)
5953 (target_supports_stopped_by_hw_breakpoint)
5954 (target_stopped_by_hw_breakpoint): Declare.
5956 2015-03-04 Pedro Alves <palves@redhat.com>
5958 enum lwp_stop_reason -> enum target_stop_reason
5959 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5960 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5961 (linux_wait_1, stuck_in_jump_pad_callback)
5962 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5963 (linux_stopped_by_watchpoint):
5964 * linux-low.h (enum lwp_stop_reason): Delete.
5965 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5966 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5968 2015-03-04 Yao Qi <yao.qi@linaro.org>
5970 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5972 2015-03-03 Gary Benson <gbenson@redhat.com>
5974 * hostio.c (handle_vFile): Fix prefix lengths.
5976 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5978 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5981 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5983 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5984 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5985 (clean): Add "rm -f" for above C files.
5986 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5987 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5988 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5989 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5990 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5991 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5992 (init_registers_s390x_vx_linux64)
5993 (init_registers_s390x_tevx_linux64)
5994 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5995 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5997 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5998 (s390_store_vxrs_high): New functions.
5999 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6001 (s390_arch_setup): Add logic for selecting one of the new target
6002 descriptions. Activate the new vector regsets if applicable.
6003 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6004 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6005 and init_registers_s390x_tevx_linux64.
6007 2015-03-01 Pedro Alves <palves@redhat.com>
6009 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6012 2015-02-27 Pedro Alves <palves@redhat.com>
6014 * linux-x86-low.c (u_debugreg_offset): New function.
6015 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6017 2015-02-27 Pedro Alves <palves@redhat.com>
6019 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6020 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6021 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6022 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6023 (ps_lsetfpregs, ps_getpid)
6024 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6025 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6026 (ps_lsetxregs, ps_plog): Declare.
6028 2015-02-27 Pedro Alves <palves@redhat.com>
6030 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6031 IP_AGENT_EXPORT_FUNC.
6032 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6033 IP_AGENT_EXPORT_FUNC.
6034 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6035 (IP_AGENT_EXPORT): Delete.
6036 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6037 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6038 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6039 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6040 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6041 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6042 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6043 (traceframe_read_count, traceframe_write_count)
6044 (traceframes_created, trace_state_variables, get_raw_reg)
6045 (get_trace_state_variable_value, set_trace_state_variable_value)
6046 (ust_loaded, helper_thread_id, cmd_buf): Use
6047 IPA_SYM_EXPORTED_NAME.
6048 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6049 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6050 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6051 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6052 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6053 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6054 EXTERN_C_PUSH/EXTERN_C_POP.
6055 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6056 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6057 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6058 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6059 (traceframe_write_count, traceframe_read_count)
6060 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6061 (about_to_request_buffer_space, get_trace_state_variable_value)
6062 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6063 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6064 EXTERN_C_PUSH/EXTERN_C_POP.
6065 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6066 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6067 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6068 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6069 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6070 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6071 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6072 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6074 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6075 (IP_AGENT_EXPORT_VAR_DECL): Define.
6077 (gdb_agent_get_raw_reg): Declare.
6079 2015-02-27 Tom Tromey <tromey@redhat.com>
6080 Pedro Alves <palves@redhat.com>
6082 Rename symbols whose names are reserved C++ keywords throughout.
6084 2015-02-27 Pedro Alves <palves@redhat.com>
6086 * Makefile.in (COMPILER): New, get it from autoconf.
6087 (CXX): Get from autoconf instead.
6088 (COMPILE.pre): Use COMPILER.
6089 (CC-LD): Rename to ...
6090 (CC_LD): ... this. Use COMPILER.
6091 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6092 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6093 * acinclude.m4: Include build-with-cxx.m4.
6094 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6095 Disable -Werror by default if building in C++ mode.
6096 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6097 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6098 the C++ compiler. Save/restore CXXFLAGS too.
6099 * configure: Regenerate.
6101 2015-02-27 Pedro Alves <palves@redhat.com>
6103 * acinclude.m4: Include libiberty.m4.
6104 * configure.ac: Call libiberty_INIT.
6105 * config.in, configure: Regenerate.
6107 2015-02-26 Pedro Alves <palves@redhat.com>
6109 * linux-low.c (linux_wait_1): When incrementing the PC past a
6110 program breakpoint always use the_low_target.breakpoint_len as
6111 increment, rather than the maximum between that and
6112 the_low_target.decr_pc_after_break.
6114 2015-02-23 Pedro Alves <palves@redhat.com>
6116 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6117 thread was doing a step-over; always adjust the PC if
6118 we stepped over a permanent breakpoint.
6119 (linux_wait_1): If we stepped over breakpoint that was on top of a
6120 permanent breakpoint, manually advance the PC past it.
6122 2015-02-23 Pedro Alves <palves@redhat.com>
6124 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6126 (x86_fill_gregset, x86_store_gregset): Use it when handling
6129 2015-02-20 Pedro Alves <palves@redhat.com>
6131 * thread-db.c: Include "nat/linux-procfs.h".
6132 (thread_db_init): Skip listing new threads if the kernel supports
6133 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6135 2015-02-20 Pedro Alves <palves@redhat.com>
6137 * linux-low.c (status_pending_p_callback): Use ptid_match.
6139 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6141 PR breakpoints/16812
6142 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6143 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6144 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6146 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6148 PR breakpoints/15956
6149 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6151 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6153 * linux-low.c (linux_low_btrace_conf): Print size.
6154 * server.c (handle_btrace_conf_general_set): New.
6155 (hanle_general_set): Call handle_btrace_conf_general_set.
6156 (handle_query): Report Qbtrace-conf:bts:size as supported.
6158 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6160 * linux-low.c (linux_low_enable_btrace): Update parameters.
6161 (linux_low_btrace_conf): New.
6162 (linux_target_ops)<to_btrace_conf>: Initialize.
6163 * server.c (current_btrace_conf): New.
6164 (handle_btrace_enable): Rename to ...
6165 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6166 to target_enable_btrace. Update comment. Update users.
6167 (handle_qxfer_btrace_conf): New.
6168 (qxfer_packets): Add btrace-conf entry.
6169 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6170 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6171 (target_ops)<read_btrace_conf>: New.
6172 (target_enable_btrace): Update parameters.
6173 (target_read_btrace_conf): New.
6175 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6177 * server.c (handle_btrace_general_set): Remove call to
6178 target_supports_btrace.
6179 (supported_btrace_packets): New.
6180 (handle_query): Call supported_btrace_packets.
6181 * target.h: include btrace-common.h.
6182 (btrace_target_info): Removed.
6183 (supports_btrace, target_supports_btrace): Update parameters.
6185 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6187 * Makefile.in (SFILES): Add common/btrace-common.c.
6188 (OBS): Add common/btrace-common.o.
6189 (btrace-common.o): Add build rules.
6190 * linux-low: Include btrace-common.h.
6191 (linux_low_read_btrace): Use struct btrace_data. Call
6192 btrace_data_init and btrace_data_fini.
6194 2015-02-06 Pedro Alves <palves@redhat.com>
6196 * thread-db.c (find_new_threads_callback): Add debug output.
6198 2015-02-04 Pedro Alves <palves@redhat.com>
6200 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6201 (resume_stopped_resumed_lwps): New function.
6202 (linux_wait_for_event_filtered): Use it.
6204 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6206 * Makefile.in (SFILES): Add linux-personality.c.
6207 (linux-personality.o): New rule.
6208 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6209 list of objects to be built.
6210 * linux-low.c: Include nat/linux-personality.h.
6211 (linux_create_inferior): Remove code to disable address space
6212 randomization (moved to ../nat/linux-personality.c). Create
6213 cleanup to disable address space randomization.
6215 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6217 * Makefile.in (posix-strerror.o): New rule.
6218 (mingw-strerror.o): Likewise.
6219 * configure: Regenerated.
6220 * configure.ac: Source file ../common/common.host. Initialize new
6221 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6223 2015-01-14 Yao Qi <yao@codesourcery.com>
6225 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6226 (ppc-linux.o): New rule.
6227 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6228 * configure.ac: AC_CHECK_FUNCS(getauxval).
6229 * config.in: Re-generated.
6230 * configure: Re-generated.
6231 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6232 ppc64_64bit_inferior_p
6234 2015-01-14 Yao Qi <yao@codesourcery.com>
6236 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6237 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6238 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6239 (PT_ORIG_R3, PT_TRAP): Likewise.
6240 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6241 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6242 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6244 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6246 * i387-fp.c (i387_cache_to_xsave): In look over
6247 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6248 zmmh_low_space field by use of zmmh_high_space.
6250 2015-01-09 Pedro Alves <palves@redhat.com>
6252 * linux-low.c (step_over_bkpt): Move higher up in the file.
6253 (handle_extended_wait): Don't store the stop_pc here.
6254 (get_stop_pc): Adjust comments and rename to ...
6255 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6256 stopped for a software breakpoint or hardware breakpoint.
6257 (thread_still_has_status_pending_p): New function.
6258 (status_pending_p_callback): Use
6259 thread_still_has_status_pending_p. If the event is no longer
6260 interesting, resume the LWP.
6261 (handle_tracepoints): Add assert.
6262 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6263 (wstatus_maybe_breakpoint): New function.
6264 (cancel_breakpoint): Delete function.
6265 (check_stopped_by_watchpoint): New function, factored out from
6266 linux_low_filter_event.
6267 (lp_status_maybe_breakpoint): Delete function.
6268 (linux_low_filter_event): Remove filter_ptid argument.
6269 Leave thread group exits pending here. Store the LWP's stop PC.
6270 Always leave events pending.
6271 (linux_wait_for_event_filtered): Pull all events out of the
6272 kernel, and leave them all pending.
6273 (count_events_callback, select_event_lwp_callback): Consider all
6275 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6276 (select_event_lwp): Only give preference to the stepping LWP in
6277 all-stop mode. Adjust comments.
6278 (ignore_event): New function.
6279 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6280 references to cancel_breakpoints. Adjust to renames. Also give
6281 equal priority to all LWPs that have had events in non-stop mode.
6282 If reporting a software breakpoint event, unadjust the LWP's PC.
6283 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6284 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6286 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6287 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6288 (linux_stopped_by_watchpoint): Adjust.
6289 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6290 * linux-low.h (enum lwp_stop_reason): New.
6291 (struct lwp_info) <stop_pc>: Adjust comment.
6292 <stopped_by_watchpoint>: Delete field.
6293 <stop_reason>: New field.
6294 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6295 * mem-break.c (software_breakpoint_inserted_here)
6296 (hardware_breakpoint_inserted_here): New function.
6297 * mem-break.h (software_breakpoint_inserted_here)
6298 (hardware_breakpoint_inserted_here): Declare.
6299 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6300 (cancel_breakpoints): Delete.
6301 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6302 (upload_fast_traceframes): Remove references to
6305 2015-01-09 Pedro Alves <palves@redhat.com>
6307 * thread-db.c (find_new_threads_callback): Ignore thread if the
6308 kernel thread ID is -1.
6310 2015-01-09 Pedro Alves <palves@redhat.com>
6312 * linux-low.c (linux_attach_fail_reason_string): Move to
6313 nat/linux-ptrace.c, and rename.
6314 (linux_attach_lwp): Update comment.
6315 (attach_proc_task_lwp_callback): New function.
6316 (linux_attach): Adjust to rename and use
6317 linux_proc_attach_tgid_threads.
6318 (linux_attach_fail_reason_string): Delete declaration.
6320 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6322 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6323 * server.c (gdbserver_version): Likewise.
6325 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6327 * remote-utils.c: Include ctype.h.
6328 (input_interrupt): Explicitly handle the case when the char
6329 received is the NUL byte. Improve the printing of non-ASCII
6332 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6334 * linux-low.c (linux_low_filter_event): Update call to
6335 linux_enable_event_reporting following the addition of
6336 a new parameter to that function.
6338 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6341 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6342 (AARCH64_FPCR_REGNO): Likewise.
6343 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6344 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6345 (aarch64_store_fpregset): Likewise.
6347 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6349 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6350 Remove FIXME comment about assumption about N.
6352 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6354 * configure.ac: If large-file support is disabled in GDBserver,
6355 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6356 * configure: Regenerate.
6358 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6360 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6361 warning upon ENODATA from ptrace.
6362 * linux-s390-low.c (s390_store_tdb): New.
6363 (s390_regsets): Add regset for NT_S390_TDB.
6365 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6367 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6368 without a fill_function.
6369 * linux-s390-low.c (s390_fill_last_break): Remove.
6370 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6371 (s390_arch_setup): Use regset's size instead of fill_function for
6374 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6376 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6377 the regset's store function when ptrace returned an error.
6378 * regcache.c (get_thread_regcache): Invalidate register cache
6379 before fetching inferior's registers.
6381 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6383 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6384 while-loop as for-loop.
6385 (regsets_store_inferior_registers): Likewise.
6387 2014-11-28 Yao Qi <yao@codesourcery.com>
6389 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6390 * config.in, configure: Re-generate.
6391 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6394 2014-11-21 Yao Qi <yao@codesourcery.com>
6396 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6397 (AC_CHECK_HEADERS): Remove malloc.h.
6398 * configure: Re-generated.
6399 * config.in: Re-generated.
6400 * server.h: Don't include alloca.h and malloc.h.
6401 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6402 Don't include malloc.h.
6404 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6406 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6407 corresponding ERRNO check in same block.
6409 2014-11-12 Pedro Alves <palves@redhat.com>
6411 * server.c (cont_thread): Update comment.
6412 (start_inferior, attach_inferior): No longer clear cont_thread.
6413 (handle_v_cont): No longer set cont_thread.
6414 (captured_main): Clear cont_thread each time a GDB connects.
6416 2014-11-12 Pedro Alves <palves@redhat.com>
6418 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6419 thread, and don't resume all threads if the Hc thread has exited.
6421 2014-11-12 Pedro Alves <palves@redhat.com>
6423 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6424 the process group instead of to a specific LWP.
6426 2014-10-15 Pedro Alves <palves@redhat.com>
6429 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6431 (arm_set_thread_context): Delete.
6432 (the_low_target): Adjust.
6433 * win32-i386-low.c (debug_registers_changed)
6434 (debug_registers_used): Delete.
6435 (update_debug_registers_callback): New function.
6436 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6437 needing to update their debug registers.
6438 (win32_get_current_dr): New function.
6439 (x86_dr_low_get_addr, x86_dr_low_get_control)
6440 (x86_dr_low_get_status): Fetch the debug register from the thread
6442 (i386_initial_stuff): Adjust.
6443 (i386_get_thread_context): Remove current_event parameter. Don't
6444 clear debug_registers_changed nor copy DR values to
6446 (i386_set_thread_context): Delete.
6447 (i386_prepare_to_resume): New function.
6448 (i386_thread_added): Mark the thread as needing to update irs
6450 (the_low_target): Remove i386_set_thread_context and install
6451 i386_prepare_to_resume.
6452 * win32-low.c (win32_get_thread_context): Adjust.
6453 (win32_set_thread_context): Use SetThreadContext
6455 (win32_prepare_to_resume): New function.
6456 (win32_require_context): New function, factored out from ...
6457 (thread_rec): ... this.
6458 (continue_one_thread): Call win32_prepare_to_resume on each thread
6459 we're about to continue.
6460 (win32_resume): Call win32_prepare_to_resume on the event thread.
6461 * win32-low.h (struct win32_thread_info)
6462 <debug_registers_changed>: New field.
6463 (struct win32_target_ops): Change prototype of set_thread_context,
6464 delete set_thread_context and add prepare_to_resume.
6465 (win32_require_context): New declaration.
6467 2014-10-08 Gary Benson <gbenson@redhat.com>
6469 * server.h: Do not include common-exceptions.h.
6471 2014-10-08 Gary Benson <gbenson@redhat.com>
6473 * server.h: Do not include cleanups.h.
6475 2014-09-30 James Hogan <james.hogan@imgtec.com>
6477 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6480 2014-09-23 Yao Qi <yao@codesourcery.com>
6482 * linux-low.c (lp_status_maybe_breakpoint): New function.
6483 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6484 (count_events_callback): Likewise.
6485 (select_event_lwp_callback): Likewise.
6486 (cancel_breakpoints_callback): Likewise.
6488 2014-09-19 Don Breazeal <donb@codesourcery.com>
6490 * linux-low.c (handle_extended_wait): Call
6491 linux_ptrace_get_extended_event.
6492 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6493 linux_is_extended_waitstatus.
6495 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6497 * Makefile.in (CPPFLAGS): Define.
6498 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6499 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6501 2014-09-16 Gary Benson <gbenson@redhat.com>
6503 * inferiors.h (current_inferior): Renamed as...
6504 (current_thread): New variable. All uses updated.
6505 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6506 (maybe_move_out_of_jump_pad): Likewise.
6507 (cancel_breakpoint): Likewise.
6508 (linux_low_filter_event): Likewise.
6509 (wait_for_sigstop): Likewise.
6510 (linux_resume_one_lwp): Likewise.
6511 (need_step_over_p): Likewise.
6512 (start_step_over): Likewise.
6513 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6514 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6515 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6516 and save_inferior as saved_thread.
6517 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6519 (regcache_invalidate_thread): Likewise.
6520 * remote-utils.c (prepare_resume_reply): Likewise.
6521 * thread-db.c (thread_db_get_tls_address): Likewise.
6522 (disable_thread_event_reporting): Likewise.
6523 (remove_thread_event_breakpoints): Likewise.
6524 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6526 * target.h (set_desired_inferior): Renamed as...
6527 (set_desired_thread): New declaration. All uses updated.
6528 * server.c (myresume): Updated comment to reference thread instead
6530 (handle_serial_event): Likewise.
6531 (handle_target_event): Likewise.
6533 2014-09-12 Tom Tromey <tromey@redhat.com>
6534 Gary Benson <gbenson@redhat.com>
6536 * regcache.h: Include common-regcache.h.
6537 (regcache_read_pc): Don't declare.
6538 * regcache.c (get_thread_regcache_for_ptid): New function.
6540 2014-09-11 Tom Tromey <tromey@redhat.com>
6541 Gary Benson <gbenson@redhat.com>
6543 * symbol.c: New file.
6544 * Makefile.in (SFILES): Add symbol.c.
6545 (OBS): Add symbol.o.
6547 2014-09-11 Gary Benson <gbenson@redhat.com>
6549 * target.c (target_stop_ptid, target_continue_ptid): New
6552 2014-09-11 Tom Tromey <tromey@redhat.com>
6553 Gary Benson <gbenson@redhat.com>
6555 * target.h: Include target/target.h.
6556 * target.c (target_read_memory, target_read_uint32)
6557 (target_write_memory): New functions.
6559 2014-09-11 Gary Benson <gbenson@redhat.com>
6561 * server.h (debug_hw_points): Don't declare.
6562 * server.c (debug_hw_points): Don't define. Replace all uses
6563 with show_debug_regs.
6564 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6565 all uses with show_debug_regs.
6567 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6569 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6570 endianness into account.
6571 (ppc_supply_ptrace_register): Likewise.
6573 2014-09-03 James Hogan <james.hogan@imgtec.com>
6575 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6576 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6578 2014-09-03 Gary Benson <gbenson@redhat.com>
6580 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6581 ALL_DEBUG_ADDRESS_REGISTERS.
6583 2014-09-02 Gary Benson <gbenson@redhat.com>
6585 * i386-low.h: Renamed as...
6586 * x86-low.h: New file. All type, function and variable name
6587 prefixes changed from "i386_" to "x86_". All references updated.
6588 * i386-low.c: Renamed as...
6589 * x86-low.c: New file. All type, function and variable name
6590 prefixes changed from "i386_" to "x86_". All references updated.
6592 2014-09-02 Gary Benson <gbenson@redhat.com>
6594 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6595 (x86_linux_new_thread): Likewise.
6597 2014-08-29 Gary Benson <gbenson@redhat.com>
6599 * server.h (setjmp.h): Do not include.
6600 (toplevel): Do not declare.
6601 (common-exceptions.h): Include.
6602 (cleanups.h): Likewise.
6603 * server.c (toplevel): Do not define.
6604 (exit_code): New static global.
6605 (detach_or_kill_for_exit_cleanup): New function.
6606 (main): New function. Original main renamed to...
6607 (captured_main): New function.
6608 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6610 2014-08-29 Gary Benson <gbenson@redhat.com>
6612 * Makefile.in (SFILES): Add common/common-exceptions.c.
6613 (OBS): Add common-exceptions.o.
6614 (common-exceptions.o): New rule.
6615 * utils.c (prepare_to_throw_exception): New function.
6617 2014-08-29 Gary Benson <gbenson@redhat.com>
6619 * config.in: Regenerate.
6620 * configure: Likewise.
6622 2014-08-29 Gary Benson <gbenson@redhat.com>
6624 * Makefile.in (SFILES): Add common/cleanups.c.
6626 (cleanups.o): New rule.
6628 2014-08-29 Gary Benson <gbenson@redhat.com>
6630 * utils.c (internal_vwarning): New function.
6632 2014-08-28 Gary Benson <gbenson@redhat.com>
6634 * utils.h (fatal): Remove declaration.
6635 * utils.c (fatal): Remove function.
6637 2014-08-28 Gary Benson <gbenson@redhat.com>
6639 * tracepoint.c (gdb_agent_init): Replace fatal with
6641 (initialize_tracepoint): Likewise.
6643 2014-08-28 Gary Benson <gbenson@redhat.com>
6645 * remote-utils.c (remote_prepare): Replace fatal with error.
6647 2014-08-28 Gary Benson <gbenson@redhat.com>
6649 * linux-low.c (linux_async): Replace fatal with warning.
6651 (linux_start_non_stop): Return -1 if linux_async failed.
6653 2014-08-28 Gary Benson <gbenson@redhat.com>
6655 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6657 (i386_dr_low_get_addr): Remove vague comment.
6658 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6661 2014-08-28 Gary Benson <gbenson@redhat.com>
6663 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6664 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6666 (linux_resume_one_lwp): Likewise.
6667 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6669 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6670 with internal_error.
6671 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6672 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6673 (find_register_by_name): Replace fatal with internal_error.
6674 (find_regno): Likewise.
6675 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6676 * thread-db.c (thread_db_create_event): Likewise.
6677 (thread_db_load_search): Likewise.
6678 (try_thread_db_load_1): Likewise.
6679 * tracepoint.c (get_jump_space_head): Replace fatal with
6681 (claim_trampoline_space): Likewise.
6682 (have_fast_tracepoint_trampoline_buffer): Likewise.
6683 (cmd_qtstart): Likewise.
6684 (stop_tracing): Likewise.
6685 (fast_tracepoint_collecting): Likewise.
6686 (target_malloc): Likewise.
6687 (download_tracepoint): Likewise.
6688 (download_trace_state_variables): Replace check with gdb_assert.
6689 (upload_fast_traceframes): Replace fatal with internal_error.
6691 2014-08-19 Tom Tromey <tromey@redhat.com>
6692 Gary Benson <gbenson@redhat.com>
6694 * Makefile.in (SFILES): Add common/common-debug.c.
6695 (OBS): Add common-debug.o.
6696 (common-debug.o): New rule.
6697 * debug.h (debug_printf): Don't declare.
6698 * debug.c (debug_printf): Renamed and rewritten as...
6699 (debug_vprintf): New function.
6701 2014-08-19 Gary Benson <gbenson@redhat.com>
6703 * utils.h: Do not include print-utils.h.
6705 2014-08-19 Tom Tromey <tromey@redhat.com>
6706 Gary Benson <gbenson@redhat.com>
6708 * server.h: Add static assertion.
6709 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6711 2014-08-19 Tom Tromey <tromey@redhat.com>
6712 Gary Benson <gbenson@redhat.com>
6714 * Makefile.in (SFILES): Add common/errors.c.
6715 (OBS): Add errors.o.
6716 (IPA_OBS): Add errors-ipa.o.
6717 (errors.o): New rule.
6718 (errors-ipa.o): Likewise.
6719 * utils.h (perror_with_name, error, warning): Don't declare.
6720 * utils.c (warning): Renamed and rewritten as...
6721 (vwarning): New function.
6722 (error): Renamed and rewritten as...
6723 (verror): New function.
6724 (internal_error): Renamed and rewritten as...
6725 (internal_verror): New function.
6727 2014-08-07 Gary Benson <gbenson@redhat.com>
6729 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6730 * configure: Regenerate.
6731 * config.in: Likewise.
6732 * server.h: Do not include errno.h.
6733 * event-loop.c: Likewise.
6734 * hostio-errno.c: Likewise.
6735 * linux-low.c: Likewise.
6736 * remote-utils.c: Likewise.
6737 * spu-low.c: Likewise.
6738 * utils.c: Likewise.
6739 * gdbreplay.c: Unconditionally include errno.h.
6741 2014-08-07 Gary Benson <gbenson@redhat.com>
6743 * server.h: Do not include string.h.
6744 * event-loop.c: Likewise.
6745 * linux-low.c: Likewise.
6746 * regcache.c: Likewise.
6747 * remote-utils.c: Likewise.
6748 * spu-low.c: Likewise.
6749 * utils.c: Likewise.
6751 2014-08-07 Gary Benson <gbenson@redhat.com>
6753 * server.h: Do not include gdb_assert.h.
6755 2014-08-07 Gary Benson <gbenson@redhat.com>
6757 * server.h: Do not include common-utils.h.
6759 2014-08-07 Gary Benson <gbenson@redhat.com>
6761 * server.h: Do not include ptid.h.
6762 * notif.h: Likewise.
6764 2014-08-07 Gary Benson <gbenson@redhat.com>
6766 * server.h: Do not include gdb_locale.h.
6768 2014-08-07 Gary Benson <gbenson@redhat.com>
6770 * server.h: Do not include gdb/signals.h.
6771 * win32-low.c: Likewise.
6773 2014-08-07 Gary Benson <gbenson@redhat.com>
6775 * server.h: Do not include pathmax.h.
6777 2014-08-07 Gary Benson <gbenson@redhat.com>
6779 * server.h: Do not include libiberty.h.
6780 * linux-bfin-low.c: Likewise.
6782 2014-08-07 Gary Benson <gbenson@redhat.com>
6784 * server.h: Do not include ansidecl.h.
6786 2014-08-07 Gary Benson <gbenson@redhat.com>
6788 * linux-x86-low.c: Do not include stddef.h.
6789 * lynx-ppc-low.c: Likewise.
6790 * tracepoint.c: Likewise.
6792 2014-08-07 Gary Benson <gbenson@redhat.com>
6794 * server.h: Do not include stdarg.h.
6795 * nto-low.c: Likewise.
6797 2014-08-07 Gary Benson <gbenson@redhat.com>
6799 * server.h: Do not include stdlib.h.
6800 * inferiors.c: Likewise.
6801 * linux-low.c: Likewise.
6802 * regcache.c: Likewise.
6803 * spu-low.c: Likewise.
6804 * tracepoint.c: Likewise.
6805 * utils.c: Likewise.
6807 2014-08-07 Gary Benson <gbenson@redhat.com>
6809 * server.h: Do not include stdio.h.
6810 * linux-low.c: Likewise.
6811 * remote-utils.c: Likewise.
6812 * spu-low.c: Likewise.
6813 * utils.c: Likewise.
6814 * wincecompat.c: Likewise.
6816 2014-08-06 Gary Benson <gbenson@redhat.com>
6818 * regcache.c (init_register_cache): Move conditionals inside if.
6820 2014-08-06 Gary Benson <gbenson@redhat.com>
6822 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6824 2014-07-31 Gary Benson <gbenson@redhat.com>
6826 * ax.h: Do not include server.h.
6827 * gdbthread.h: Likewise.
6828 * lynx-low.h: Likewise.
6829 * notif.h: Likewise.
6831 2014-07-30 Gary Benson <gbenson@redhat.com>
6833 * server.h: Include common-defs.h.
6834 Do not include config.h or build-gnulib-gdbserver/config.h.
6836 2014-07-30 Gary Benson <gbenson@redhat.com>
6838 * hostio-errno.c: Move server.h to top of includes list.
6839 * inferiors.c: Likewise.
6840 * linux-x86-low.c: Likewise.
6841 * notif.c: Include server.h.
6843 2014-07-24 Tom Tromey <tromey@redhat.com>
6844 Gary Benson <gbenson@redhat.com>
6846 * server.h (CORE_ADDR): Now unsigned.
6848 2014-07-16 Pedro Alves <palves@redhat.com>
6850 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6852 2014-07-15 Pedro Alves <palves@redhat.com>
6854 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6857 2014-07-11 Pedro Alves <palves@redhat.com>
6859 * linux-low.c (kill_wait_lwp): New function, based on
6860 kill_one_lwp_callback, but use my_waitpid directly.
6861 (kill_one_lwp_callback, linux_kill): Use it.
6863 2014-06-23 Pedro Alves <palves@redhat.com>
6865 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6866 before setting DR0..DR3.
6868 2014-06-20 Gary Benson <gbenson@redhat.com>
6870 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6871 * configure: Regenerated.
6872 * config.in: Likewise.
6874 2014-06-20 Gary Benson <gbenson@redhat.com>
6876 * Makefile.in (SFILES): Update locations for files moved
6878 (object file files): Reordered.
6880 2014-06-20 Gary Benson <gbenson@redhat.com>
6882 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6883 (i386_dr_low_set_addr): Likewise.
6884 (i386_dr_low_get_addr): Likewise.
6885 (i386_dr_low_can_set_control): Likewise.
6886 (i386_dr_low_set_control): Likewise.
6887 (i386_dr_low_get_control): Likewise.
6888 (i386_dr_low_get_status): Likewise.
6889 (i386_get_debug_register_length): Likewise.
6890 * linux-x86-low.c (i386_dr_low_set_addr):
6891 Changed signature. Made static.
6892 (i386_dr_low_get_addr): Likewise.
6893 (i386_dr_low_set_control): Likewise.
6894 (i386_dr_low_get_control): Likewise.
6895 (i386_dr_low_get_status): Likewise.
6896 (i386_dr_low): New global variable.
6897 * win32-i386-low.c (i386_dr_low_set_addr):
6898 Changed signature. Made static.
6899 (i386_dr_low_get_addr): Likewise.
6900 (i386_dr_low_set_control): Likewise.
6901 (i386_dr_low_get_control): Likewise.
6902 (i386_dr_low_get_status): Likewise.
6903 (i386_dr_low): New global variable.
6905 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6907 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6908 * Makefile.in (AR, AR_FLAGS): Define.
6909 * configure: Regenerate.
6911 2014-06-19 Gary Benson <gbenson@redhat.com>
6913 * Makefile.in (i386-dregs.o): New rule.
6914 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6915 * i386-low.c (target.h): Remove include.
6916 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6917 (DR_CONTROL_SHIFT): Likewise.
6918 (DR_CONTROL_SIZE): Likewise.
6919 (DR_RW_EXECUTE): Likewise.
6920 (DR_RW_WRITE): Likewise.
6921 (DR_RW_READ): Likewise.
6922 (DR_RW_IORW): Likewise.
6923 (DR_LEN_1): Likewise.
6924 (DR_LEN_2): Likewise.
6925 (DR_LEN_4): Likewise.
6926 (DR_LEN_8): Likewise.
6927 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6928 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6929 (DR_ENABLE_SIZE): Likewise.
6930 (DR_LOCAL_SLOWDOWN): Likewise.
6931 (DR_GLOBAL_SLOWDOWN): Likewise.
6932 (DR_CONTROL_RESERVED): Likewise.
6933 (I386_DR_CONTROL_MASK): Likewise.
6934 (I386_DR_VACANT): Likewise.
6935 (I386_DR_LOCAL_ENABLE): Likewise.
6936 (I386_DR_GLOBAL_ENABLE): Likewise.
6937 (I386_DR_DISABLE): Likewise.
6938 (I386_DR_SET_RW_LEN): Likewise.
6939 (I386_DR_GET_RW_LEN): Likewise.
6940 (I386_DR_WATCH_HIT): Likewise.
6941 (i386_wp_op_t): Likewise.
6942 (i386_show_dr): Likewise.
6943 (i386_length_and_rw_bits): Likewise.
6944 (i386_insert_aligned_watchpoint): Likewise.
6945 (i386_remove_aligned_watchpoint): Likewise.
6946 (i386_handle_nonaligned_watchpoint): Likewise.
6947 i386_update_inferior_debug_regs(): Likewise.
6948 (i386_dr_insert_watchpoint): Likewise.
6949 (i386_dr_remove_watchpoint): Likewise.
6950 (i386_dr_region_ok_for_watchpoint): Likewise.
6951 (i386_dr_stopped_data_address): Likewise.
6952 (i386_dr_stopped_by_watchpoint): Likewise.
6954 2014-06-19 Gary Benson <gbenson@redhat.com>
6956 * i386-low.c (i386_dr_show): Renamed to
6957 i386_show_dr and made static. All uses updated.
6958 (i386_dr_length_and_rw_bits): Renamed to
6959 i386_length_and_rw_bits and made static.
6961 (i386_dr_insert_aligned_watchpoint): Renamed to
6962 i386_insert_aligned_watchpoint and made static.
6964 (i386_dr_remove_aligned_watchpoint): Renamed to
6965 i386_remove_aligned_watchpoint and made static.
6967 (i386_dr_update_inferior_debug_regs): Renamed to
6968 i386_update_inferior_debug_regs and made static.
6971 2014-06-18 Gary Benson <gbenson@redhat.com>
6973 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6974 (i386_dr_low_can_set_control): Likewise.
6975 (i386_get_debug_register_length): Likewise.
6976 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6977 (i386_dr_low_can_set_control): Likewise.
6978 (i386_get_debug_register_length): Likewise.
6980 2014-06-17 Gary Benson <gbenson@redhat.com>
6982 * i386-low.h (i386-dregs.h): New include.
6983 (DR_FIRSTADDR): Now in i386-dregs.h.
6984 (DR_LASTADDR): Likewise.
6985 (DR_NADDR): Likewise.
6986 (DR_STATUS): Likewise.
6987 (DR_CONTROL): Likewise.
6988 (i386_debug_reg_state): Likewise.
6989 (i386_dr_insert_watchpoint): Likewise.
6990 (i386_dr_remove_watchpoint): Likewise.
6991 (i386_dr_region_ok_for_watchpoint): Likewise.
6992 (i386_dr_stopped_data_address): Likewise.
6993 (i386_dr_stopped_by_watchpoint): Likewise.
6994 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6996 2014-06-18 Gary Benson <gbenson@redhat.com>
6998 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6999 i386_dr_insert_watchpoint.
7000 (i386_low_remove_watchpoint): Renamed to
7001 i386_dr_remove_watchpoint.
7002 (i386_low_region_ok_for_watchpoint): Renamed to
7003 i386_dr_region_ok_for_watchpoint.
7004 (i386_low_stopped_data_address): Renamed to
7005 i386_dr_stopped_data_address.
7006 (i386_low_stopped_by_watchpoint): Renamed to
7007 i386_dr_stopped_by_watchpoint.
7008 * i386-low.c (i386_show_dr): Renamed to
7009 i386_dr_show and made nonstatic. All uses updated.
7010 (i386_length_and_rw_bits): Renamed to
7011 i386_dr_length_and_rw_bits and made nonstatic.
7013 (i386_insert_aligned_watchpoint): Renamed to
7014 i386_dr_insert_aligned_watchpoint and made nonstatic.
7016 (i386_remove_aligned_watchpoint): Renamed to
7017 i386_dr_remove_aligned_watchpoint and made nonstatic.
7019 (i386_update_inferior_debug_regs): Renamed to
7020 i386_dr_update_inferior_debug_regs and made nonstatic.
7022 (i386_low_insert_watchpoint): Renamed to
7023 i386_dr_insert_watchpoint. All uses updated.
7024 (i386_low_remove_watchpoint): Renamed to
7025 i386_dr_remove_watchpoint. All uses updated.
7026 (i386_low_region_ok_for_watchpoint): Renamed to
7027 i386_dr_region_ok_for_watchpoint. All uses updated.
7028 (i386_low_stopped_data_address): Renamed to
7029 i386_dr_stopped_data_address. All uses updated.
7030 (i386_low_stopped_by_watchpoint): Renamed to
7031 i386_dr_stopped_by_watchpoint. All uses updated.
7033 2014-06-18 Gary Benson <gbenson@redhat.com>
7035 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7036 (i386_dr_low_can_set_control): Likewise.
7037 (i386_insert_aligned_watchpoint): New check.
7039 2014-06-18 Gary Benson <gbenson@redhat.com>
7041 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7044 2014-06-18 Gary Benson <gbenson@redhat.com>
7046 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7047 instead of fatal and error.
7048 (i386_handle_nonaligned_watchpoint): Likewise.
7050 2014-06-18 Gary Benson <gbenson@redhat.com>
7052 * i386-low.c (i386_get_debug_register_length): New macro.
7053 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7054 (i386_show_dr): Use debug_printf instead of fprintf. Use
7055 phex to format values.
7057 2014-06-18 Gary Benson <gbenson@redhat.com>
7059 * i386-low.h: Comment changes.
7060 * i386-low.c: Likewise.
7062 2014-06-18 Gary Benson <gbenson@redhat.com>
7064 * i386-low.c: Whitespace changes.
7066 2014-06-12 Tom Tromey <tromey@redhat.com>
7068 * utils.c (freeargv): Remove.
7070 2014-06-12 Tom Tromey <tromey@redhat.com>
7072 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7073 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7074 (parse_debug_format_options): Likewise.
7075 (gdbserver_usage): Likewise.
7076 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7077 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7078 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7080 ($(LIBGNU)): Depend on libiberty.
7081 (all-lib): Recurse into all subdirs.
7082 (install-only): Invoke "install" target in subdirs.
7083 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7085 * configure: Rebuild.
7086 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7087 for vasprintf, vsnprintf, or gettimeofday.
7088 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7091 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7093 * development.sh: Delete.
7094 * Makefile.in (config.status): Adjust dependency on development.sh.
7095 * configure.ac: Adjust development.sh source call.
7096 * configure: Regenerate.
7098 2014-06-02 Pedro Alves <palves@redhat.com>
7100 * ax.c (gdb_free_agent_expr): New function.
7101 * ax.h (gdb_free_agent_expr): New declaration.
7102 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7104 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7106 (clear_breakpoint_conditions_and_commands): New function.
7107 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7108 (clear_breakpoint_conditions_and_commands): New declaration.
7110 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7112 * linux-aarch64-low.c (asm/ptrace.h): Include.
7114 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7116 Fix TLS access for -static -pthread.
7117 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7118 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7119 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7121 2014-05-20 Pedro Alves <palves@redhat.com>
7123 * linux-aarch64-low.c (aarch64_insert_point)
7124 (aarch64_remove_point): No longer check whether the type is
7125 supported here. Adjust to new interface.
7126 (the_low_target): Install aarch64_supports_z_point_type as
7127 supports_z_point_type method.
7128 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7129 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7130 instead of a Z packet char. Adjust.
7131 (arm_supports_z_point_type): New function.
7132 (arm_insert_point, arm_remove_point): Adjust to new interface.
7133 (the_low_target): Install arm_supports_z_point_type.
7134 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7135 (cris_insert_point, cris_remove_point): Adjust to new interface.
7136 Don't check whether the type is supported here.
7137 (the_low_target): Install cris_supports_z_point_type.
7138 * linux-low.c (linux_supports_z_point_type): New function.
7139 (linux_insert_point, linux_remove_point): Adjust to new interface.
7140 * linux-low.h (struct linux_target_ops) <insert_point,
7141 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7142 raw_breakpoint pointer parameter.
7143 <supports_z_point_type>: New method.
7144 * linux-mips-low.c (mips_supports_z_point_type): New function.
7145 (mips_insert_point, mips_remove_point): Adjust to new interface.
7146 Use mips_supports_z_point_type.
7147 (the_low_target): Install mips_supports_z_point_type.
7148 * linux-ppc-low.c (the_low_target): Install NULL as
7149 supports_z_point_type method.
7150 * linux-s390-low.c (the_low_target): Install NULL as
7151 supports_z_point_type method.
7152 * linux-sparc-low.c (the_low_target): Install NULL as
7153 supports_z_point_type method.
7154 * linux-x86-low.c (x86_supports_z_point_type): New function.
7155 (x86_insert_point): Adjust to new insert_point interface. Use
7156 insert_memory_breakpoint. Adjust to new
7157 i386_low_insert_watchpoint interface.
7158 (x86_remove_point): Adjust to remove_point interface. Use
7159 remove_memory_breakpoint. Adjust to new
7160 i386_low_remove_watchpoint interface.
7161 (the_low_target): Install x86_supports_z_point_type.
7162 * lynx-low.c (lynx_target_ops): Install NULL as
7163 supports_z_point_type callback.
7164 * nto-low.c (nto_supports_z_point_type): New.
7165 (nto_insert_point, nto_remove_point): Adjust to new interface.
7166 (nto_target_ops): Install nto_supports_z_point_type.
7167 * mem-break.c: Adjust intro comment.
7168 (struct raw_breakpoint) <raw_type, size>: New fields.
7169 <inserted>: Update comment.
7170 <shlib_disabled>: Delete field.
7171 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7172 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7173 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7174 (raw_bkpt_type_to_target_hw_bp_type): New function.
7175 (find_enabled_raw_code_breakpoint_at): New function.
7176 (find_raw_breakpoint_at): New type and size parameters. Use them.
7177 (insert_memory_breakpoint): New function, based off
7178 set_raw_breakpoint_at.
7179 (remove_memory_breakpoint): New function.
7180 (set_raw_breakpoint_at): Reimplement.
7181 (set_breakpoint): New, based on set_breakpoint_at.
7182 (set_breakpoint_at): Reimplement.
7183 (delete_raw_breakpoint): Go through the_target->remove_point
7184 instead of assuming memory breakpoints.
7185 (find_gdb_breakpoint_at): Delete.
7186 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7187 (find_gdb_breakpoint): New function.
7188 (set_gdb_breakpoint_at): Delete.
7189 (z_type_supported): New function.
7190 (set_gdb_breakpoint_1): New function, loosely based off
7191 set_gdb_breakpoint_at.
7192 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7193 (delete_gdb_breakpoint_at): Delete.
7194 (delete_gdb_breakpoint_1): New function, loosely based off
7195 delete_gdb_breakpoint_at.
7196 (delete_gdb_breakpoint): New function.
7197 (clear_gdb_breakpoint_conditions): Rename to ...
7198 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7200 (add_condition_to_breakpoint): Make static.
7201 (add_breakpoint_condition): Take a struct breakpoint pointer
7202 instead of an address. Adjust.
7203 (gdb_condition_true_at_breakpoint): Rename to ...
7204 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7206 (gdb_condition_true_at_breakpoint): Reimplement.
7207 (add_breakpoint_commands): Take a struct breakpoint pointer
7208 instead of an address. Adjust.
7209 (gdb_no_commands_at_breakpoint): Rename to ...
7210 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7211 parameter. Return true if no breakpoint was found. Change debug
7213 (gdb_no_commands_at_breakpoint): Reimplement.
7214 (run_breakpoint_commands): Rename to ...
7215 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7216 and change return type to boolean.
7217 (run_breakpoint_commands): New function.
7218 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7219 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7220 breakpoint. Go through the_target->remove_point instead of
7221 assuming memory breakpoint.
7222 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7223 software and hardware breakpoints.
7224 (reinsert_raw_breakpoint): Go through the_target->insert_point
7225 instead of assuming memory breakpoint.
7226 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7227 software and hardware breakpoints.
7228 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7229 Check both software and hardware breakpoints.
7230 (validate_inserted_breakpoint): Assert the breakpoint is a
7231 software breakpoint. Set the inserted flag to -1 instead of
7232 setting shlib_disabled.
7233 (delete_disabled_breakpoints): Adjust.
7234 (validate_breakpoints): Only validate software breakpoints.
7235 Adjust to inserted flag change.
7236 (check_mem_read, check_mem_write): Skip breakpoint types other
7237 than software breakpoints. Adjust to inserted flag change.
7238 * mem-break.h (enum raw_bkpt_type): New enum.
7239 (raw_breakpoint, struct process_info): Forward declare.
7240 (Z_packet_to_target_hw_bp_type): Delete declaration.
7241 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7242 (set_gdb_breakpoint, delete_gdb_breakpoint)
7243 (clear_breakpoint_conditions): New declarations.
7244 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7245 (breakpoint_inserted_here): Update comment.
7246 (add_breakpoint_condition, add_breakpoint_commands): Replace
7247 address parameter with a breakpoint pointer parameter.
7248 (gdb_breakpoint_here): Update comment.
7249 (delete_gdb_breakpoint_at): Delete.
7250 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7251 * server.c (process_point_options): Take a struct breakpoint
7252 pointer instead of an address. Adjust.
7253 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7254 delete_gdb_breakpoint.
7255 * spu-low.c (spu_target_ops): Install NULL as
7256 supports_z_point_type method.
7257 * target.h: Include mem-break.h.
7258 (struct target_ops) <prepare_to_access_memory>: Update comment.
7259 <supports_z_point_type>: New field.
7260 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7261 instead of a char. Also take a raw breakpoint pointer.
7262 * win32-arm-low.c (the_low_target): Install NULL as
7263 supports_z_point_type.
7264 * win32-i386-low.c (i386_supports_z_point_type): New function.
7265 (i386_insert_point, i386_remove_point): Adjust to new interface.
7266 (the_low_target): Install i386_supports_z_point_type.
7267 * win32-low.c (win32_supports_z_point_type): New function.
7268 (win32_insert_point, win32_remove_point): Adjust to new interface.
7269 (win32_target_ops): Install win32_supports_z_point_type.
7270 * win32-low.h (struct win32_target_ops):
7271 <supports_z_point_type>: New method.
7272 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7273 instead of a char. Also take a raw breakpoint pointer.
7275 2014-05-20 Pedro Alves <palves@redhat.com>
7277 * mem-break.h: Include break-common.h.
7278 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7279 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7280 (Z_packet_to_target_hw_bp_type): New declaration.
7281 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7282 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7283 (Z_PACKET_ACCESS_WP): Delete macros.
7284 (Z_packet_to_hw_type): Delete function.
7285 * i386-low.h: Don't include break-common.h here.
7286 (Z_packet_to_hw_type): Delete declaration.
7287 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7288 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7289 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7290 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7291 * linux-aarch64-low.c: Don't include break-common.h here.
7292 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7293 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7294 (Z_packet_to_target_hw_bp_type): Delete function.
7295 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7297 (mips_insert_point, mips_remove_point): Use
7298 Z_packet_to_target_hw_bp_type.
7300 2014-05-20 Pedro Alves <palves@redhat.com>
7302 * linux-aarch64-low.c: Include break-common.h.
7303 (enum target_point_type): Delete.
7304 (Z_packet_to_point_type): Rename to ...
7305 (Z_packet_to_target_hw_bp_type): ... this, and return a
7306 target_hw_bp_type instead.
7307 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7308 instead of an enum target_point_type.
7309 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7311 (aarch64_dr_state_insert_one_point)
7312 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7313 (aarch64_handle_aligned_watchpoint)
7314 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7315 Take an enum target_hw_bp_type instead of an enum
7317 (aarch64_supports_z_point_type): New function.
7318 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7319 use Z_packet_to_target_hw_bp_type.
7321 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7323 * configure.ac: Only use -Werror by default when DEVELOPMENT
7325 * configure: Regenerate.
7327 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7329 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7330 * linux-x86-low.c (X86_64_USER_REGS): New.
7331 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7333 2014-04-28 Yao Qi <yao@codesourcery.com>
7335 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7338 2014-04-25 Pedro Alves <palves@redhat.com>
7341 * linux-low.c (linux_attach_fail_reason_string): New function.
7342 (linux_attach_lwp): Delete.
7343 (linux_attach_lwp_1): Rename to ...
7344 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7345 argument. Remove "initial" parameter. Return int instead of
7346 void. Don't error or warn here.
7347 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7348 failure to attach to the tgid. Call warning when failing to
7350 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7351 argument. Remove "initial" parameter. Return int instead of
7352 void. Don't error or warn here.
7353 (linux_attach_fail_reason_string): New declaration.
7354 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7355 interface change. Use linux_attach_fail_reason_string.
7357 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7358 Walfred Tedeschi <walfred.tedeschi@intel.com>
7360 * Makefile.in: Added rules to handle new files
7361 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7362 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7363 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7364 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7365 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7366 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7368 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7369 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7370 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7371 i386/x32-avx512.xml.
7372 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7373 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7374 i386/x32-avx512-linux.xml.
7375 * i387-fp.c (num_avx512_k_registers): New constant for number
7377 (num_avx512_zmmh_low_registers): New constant for number of
7378 lower ZMM registers (0-15).
7379 (num_avx512_zmmh_high_registers): New constant for number of
7380 higher ZMM registers (16-31).
7381 (num_avx512_ymmh_registers): New contant for number of higher
7382 YMM registers (ymm16-31 added by avx521 on x86_64).
7383 (num_avx512_xmm_registers): New constant for number of higher
7384 XMM registers (xmm16-31 added by AVX512 on x86_64).
7385 (struct i387_xsave): Add space for AVX512 registers.
7386 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7387 Add code to handle AVX512 registers.
7388 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7389 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7390 prototypei from generated file.
7391 (tdesc_amd64_avx512_linux): Likewise.
7392 (init_registers_x32_avx512_linux): Likewise.
7393 (tdesc_x32_avx512_linux): Likewise.
7394 (init_registers_i386_avx512_linux): Likewise.
7395 (tdesc_i386_avx512_linux): Likewise.
7396 (x86_64_regmap): Add AVX512 registers.
7397 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7399 (initialize_low_arch): Add code to initialize AVX512 registers.
7401 2014-04-23 Pedro Alves <palves@redhat.com>
7403 * mem-break.c (find_gdb_breakpoint_at): Make static.
7404 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7406 2014-04-23 Pedro Alves <palves@redhat.com>
7408 * i386-low.c: Don't include break-common.h here.
7409 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7410 prototype to take target_hw_bp_type as argument instead of a Z
7412 * i386-low.h: Include break-common.h here.
7413 (Z_packet_to_hw_type): Declare.
7414 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7416 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7417 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7418 (x86_remove_point): Convert the packet number to a
7419 target_hw_bp_type before calling i386_low_remove_watchpoint.
7420 * win32-i386-low.c (i386_insert_point): Convert the packet number
7421 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7422 (i386_remove_point): Convert the packet number to a
7423 target_hw_bp_type before calling i386_low_remove_watchpoint.
7425 2014-04-23 Pedro Alves <palves@redhat.com>
7427 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7429 2014-04-10 Pedro Alves <palves@redhat.com>
7431 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7432 Check if the condition or command is NULL before checking if the
7433 breakpoint is known. On success, return true.
7434 * mem-break.h (add_breakpoint_condition): Document return.
7435 (add_breakpoint_commands): Add describing comment.
7436 * server.c (skip_to_semicolon): New function.
7437 (process_point_options): Use it.
7439 2014-04-09 Pedro Alves <palves@redhat.com>
7441 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7444 2014-02-27 Pedro Alves <palves@redhat.com>
7447 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7449 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7451 (last_thread_of_process_p): Take a PID argument instead of a
7453 (linux_wait_for_lwp): Delete.
7454 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7456 (linux_low_filter_event): New function, party factored out from
7457 linux_wait_for_event.
7458 (linux_wait_for_event): Rename to ...
7459 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7460 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7461 sigsuspend. Check for zombie leaders.
7462 (linux_wait_for_event): Reimplement as wrapper around
7463 linux_wait_for_event_filtered.
7464 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7465 a normal or signal exit is seen, it's the whole process exiting.
7466 (wait_for_sigstop): No longer a for_each_inferior callback.
7467 Rewrite on top of linux_wait_for_event_filtered.
7468 (stop_all_lwps): Call wait_for_sigstop directly.
7469 * server.c (resume, handle_target_event): Handle
7470 TARGET_WAITKIND_NO_RESUMED.
7472 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7474 * win32-low.c (psapi_get_dll_name,
7475 * win32_CreateToolhelp32Snapshot): Delete.
7476 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7477 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7479 (handle_load_dll): Add function description.
7480 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7482 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7484 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7486 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7487 base address when calling win32_add_one_solib.
7488 (handle_load_dll): Delete local variable load_addr.
7489 Remove 0x1000 offset applied to DLL base address when calling
7490 win32_add_one_solib.
7491 (handle_unload_dll): Add comment.
7493 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7495 * win32-low.c (win32_add_all_dlls): Renames
7496 win32_ensure_ntdll_loaded. Rewrite function documentation.
7497 Adjust implementation to always load all DLLs.
7498 Add 0x1000 offset to DLL base address when calling
7499 win32_add_one_solib.
7500 (child_initialization_done): New static global.
7501 (do_initial_child_stuff): Set child_initialization_done to
7502 zero during child initialization, and 1 after. Replace call
7503 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7505 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7506 (handle_unload_dll): Add function documentation.
7507 (get_child_debug_event): Ignore load and unload DLL events
7508 during child initialization.
7510 2014-02-20 Doug Evans <dje@google.com>
7512 Remove global all_lwps.
7513 * inferiors.h (ptid_of): Move here from linux-low.h.
7514 (pid_of, lwpid_of): Ditto.
7515 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7516 parameter is a struct thread_info * now.
7517 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7518 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7519 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7521 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7522 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7523 * linux-arm-low.c (update_registers_callback): Update, "entry"
7524 parameter is a struct thread_info * now.
7525 Fetch lwpid from current_inferior directly.
7526 (arm_insert_point): Pass &all_threads to find_inferior instead of
7528 (arm_remove_point): Ditto.
7529 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7530 (arm_prepare_to_resume): Fetch pid from thread.
7531 (arm_read_description): Fetch lwpid from current_inferior directly.
7532 * linux-low.c (all_lwps): Delete.
7533 (delete_lwp): Delete call to remove_inferior.
7534 (handle_extended_wait): Fetch lwpid from thread.
7535 (add_lwp): Don't set lwp->entry.id. Remove call to
7536 add_inferior_to_list.
7537 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7538 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7539 (kill_one_lwp_callback): Ditto.
7540 (linux_kill): Don't dereference NULL pointer.
7541 Fetch ptid,lwpid from thread.
7542 (get_detach_signal): Fetch ptid from thread.
7543 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7544 Simplify call to regcache_invalidate_thread.
7545 (delete_lwp_callback): Update, "entry" parameter is a
7546 struct thread_info * now. Fetch pid from thread.
7547 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7548 (status_pending_p_callback): Update, "entry" parameter is a
7549 struct thread_info * now. Fetch ptid from thread.
7550 (find_lwp_pid): Update, "entry" parameter is a
7551 struct thread_info * now.
7552 (linux_wait_for_lwp): Fetch pid from thread.
7553 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7554 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7555 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7556 (dequeue_one_deferred_signal): Ditto.
7557 (cancel_breakpoint): Fetch ptid from current_inferior.
7558 (linux_wait_for_event): Pass &all_threads to find_inferior,
7559 not &all_lwps. Fetch ptid, lwpid from thread.
7560 (count_events_callback): Update, "entry" parameter is a
7561 struct thread_info * now.
7562 (select_singlestep_lwp_callback): Ditto.
7563 (select_event_lwp_callback): Ditto.
7564 (cancel_breakpoints_callback): Ditto.
7565 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7567 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7568 (unsuspend_one_lwp): Update, "entry" parameter is a
7569 struct thread_info * now.
7570 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7572 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7573 Fetch lwpid from thread, not lwp.
7574 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7575 Pass &all_threads to find_inferior, not &all_lwps.
7576 (send_sigstop): Fetch lwpid from thread, not lwp.
7577 (send_sigstop_callback): Update, "entry" parameter is a
7578 struct thread_info * now.
7579 (suspend_and_send_sigstop_callback): Ditto.
7580 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7581 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7582 struct thread_info * now.
7583 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7585 (lwp_running): Update, "entry" parameter is a
7586 struct thread_info * now.
7587 (stop_all_lwps): Fetch ptid from thread.
7588 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7589 (linux_resume_one_lwp): Fetch lwpid from thread.
7590 (linux_set_resume_request): Update, "entry" parameter is a
7591 struct thread_info * now. Fetch pid, lwpid from thread.
7592 (resume_status_pending_p): Update, "entry" parameter is a
7593 struct thread_info * now.
7594 (need_step_over_p): Ditto. Fetch lwpid from thread.
7595 (start_step_over): Fetch lwpid from thread.
7596 (linux_resume_one_thread): Update, "entry" parameter is a
7597 struct thread_info * now. Fetch lwpid from thread.
7598 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7599 (proceed_one_lwp): Update, "entry" parameter is a
7600 struct thread_info * now. Fetch lwpid from thread.
7601 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7602 struct thread_info * now.
7603 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7604 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7605 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7607 (regsets_store_inferior_registers): Ditto.
7608 (fetch_register, store_register): Ditto.
7609 (linux_read_memory, linux_write_memory): Ditto.
7610 (linux_request_interrupt): Ditto.
7611 (linux_read_auxv): Ditto.
7612 (linux_xfer_siginfo): Ditto.
7613 (linux_qxfer_spu): Ditto.
7614 (linux_qxfer_libraries_svr4): Ditto.
7615 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7616 moved to inferiors.h.
7618 (get_thread_lwp): Update.
7619 (struct lwp_info): Delete member "entry". Simplify comment for
7622 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7623 current_inferior directly.
7624 (update_watch_registers_callback): Update, "entry" parameter is a
7625 struct thread_info * now. Fetch pid from thread.
7626 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7627 (mips_insert_point): Fetch lwpid from current_inferior.
7628 Pass &all_threads to find_inferior, not &all_lwps.
7629 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7630 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7632 (mips_stopped_data_address): Ditto.
7633 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7635 * linux-tile-low.c (tile_arch_setup): Ditto.
7636 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7637 (update_debug_registers_callback): Update, "entry" parameter is a
7638 struct thread_info * now. Fetch pid from thread.
7639 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7640 Pass &all_threads to find_inferior, not &all_lwps.
7641 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7642 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7643 Pass &all_threads to find_inferior, not &all_lwps.
7644 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7645 (i386_dr_low_get_status): Ditto.
7646 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7647 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7648 (x86_linux_read_description): Ditto.
7649 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7651 2014-02-20 Doug Evans <dje@google.com>
7653 * inferiors.c (get_first_inferior): Fix buglet.
7655 2014-02-19 Doug Evans <dje@google.com>
7657 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7658 * inferiors.c (add_thread): Change result type to struct thread_info *.
7659 All callers updated.
7660 (add_lwp): Call add_thread here instead of in callers.
7661 All callers updated.
7662 * linux-low.h (get_lwp_thread): Rewrite.
7663 (struct lwp_info): New member "thread".
7665 2014-02-19 Doug Evans <dje@google.com>
7667 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7668 All callers updated.
7670 2014-02-19 Doug Evans <dje@google.com>
7672 * inferiors.c (add_thread): Fix whitespace.
7674 2014-02-19 Doug Evans <dje@google.com>
7676 * dll.c (clear_dlls): Replace accessing list implemention details
7678 * gdbthread.h (get_first_thread): Declare.
7679 * inferiors.c (for_each_inferior_with_data): New function.
7680 (get_first_thread): New function.
7681 (find_thread_ptid): Simplify.
7682 (get_first_inferior): New function.
7683 (clear_list): Delete.
7684 (one_inferior_p): New function.
7685 (clear_inferior_list): New function.
7686 (clear_inferiors): Update.
7687 * inferiors.h (for_each_inferior_with_data): Declare.
7688 (clear_inferior_list): Declare.
7689 (one_inferior_p): Declare.
7690 (get_first_inferior): Declare.
7691 * linux-low.c (linux_wait_for_event): Replace accessing list
7692 implemention details with API function.
7693 * server.c (target_running): Ditto.
7694 (accumulate_file_name_length): New function.
7695 (emit_dll_description): New function.
7696 (handle_qxfer_libraries): Replace accessing list implemention
7697 details with API function.
7698 (handle_qxfer_threads_worker): New function.
7699 (handle_qxfer_threads_proper): Replace accessing list implemention
7700 details with API function.
7701 (handle_query): Ditto.
7702 (visit_actioned_threads_callback_ftype): New typedef.
7703 (visit_actioned_threads_data): New struct.
7704 (visit_actioned_threads): Rewrite to be find_inferior callback.
7705 (resume): Call find_inferior.
7706 (handle_status): Replace accessing list implemention
7707 details with API function.
7708 (process_serial_event): Replace accessing list implemention details
7710 * target.c (set_desired_inferior): Replace accessing list implemention
7711 details with API function.
7712 * tracepoint.c (same_process_p): New function.
7713 (gdb_agent_about_to_close): Replace accessing list implemention
7714 details with API function.
7715 * win32-low.c (child_delete_thread): Replace accessing list
7716 implemention details with API function.
7717 (match_dll_by_basename): New function.
7718 (dll_is_loaded_by_basename): New function.
7719 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7720 details call to dll_is_loaded_by_basename.
7722 2014-02-19 Doug Evans <dje@google.com>
7724 * dll.h (struct dll_info): Add comment.
7725 * gdbthread.h (struct thread_info): Add comment.
7726 (current_ptid): Simplify.
7727 * inferiors.c (add_process): Update.
7728 (remove_process): Update.
7729 * inferiors.h (struct process_info): Rename member "head" to "entry".
7730 * linux-low.c (delete_lwp): Update.
7732 (last_thread_of_process_p): Update.
7733 (kill_one_lwp_callback, linux_kill): Update.
7734 (status_pending_p_callback): Update.
7735 (wait_for_sigstop): Update. Simplify read of ptid.
7736 (start_step_over): Update.
7737 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7738 (get_lwp_thread): Update.
7739 (struct lwp_info): Rename member "head" to "entry".
7740 * regcache.h (inferior_list_entry): Delete.
7741 * server.c (kill_inferior_callback): Update.
7742 (detach_or_kill_inferior_callback): Update.
7743 (print_started_pid): Update.
7744 (print_attached_pid): Update.
7745 (process_serial_event): Simplify read of ptid.
7746 * thread-db.c (thread_db_create_event): Update.
7747 (thread_db_get_tls_address): Update.
7748 * win32-low.c (current_inferior_ptid): Simplify.
7750 2014-02-19 Tom Tromey <tromey@redhat.com>
7752 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7754 (target_supports_btrace): Update.
7756 2014-02-14 Yao Qi <yao@codesourcery.com>
7758 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7759 (rsp-low-ipa.o): New target.
7761 2014-02-12 Tom Tromey <tromey@redhat.com>
7763 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7764 convert_ascii_to_int.
7765 * regcache.c (registers_to_string): Likewise.
7766 * remote-utils.c (decode_M_packet): Likewise.
7767 * server.c (process_serial_event): Likewise.
7769 2014-02-12 Tom Tromey <tromey@redhat.com>
7771 * server.c (handle_query, handle_v_run): Use hex2bin, not
7773 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7775 2014-02-12 Tom Tromey <tromey@redhat.com>
7777 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7778 convert_int_to_ascii.
7779 * regcache.c (registers_to_string, collect_register_as_string):
7781 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7783 * server.c (process_serial_event): Likewise.
7784 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7785 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7787 2014-02-12 Tom Tromey <tromey@redhat.com>
7789 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7790 bin2hex, not hexify.
7791 * tracepoint.c (cmd_qtstatus): Likewise.
7793 2014-02-12 Tom Tromey <tromey@redhat.com>
7795 * remote-utils.c (monitor_output): Pass explicit length to
7798 2014-02-12 Tom Tromey <tromey@redhat.com>
7800 * tracepoint.c: Include rsp-low.h.
7801 * server.c: Include rsp-low.h.
7802 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7803 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7805 * remote-utils.c: Include rsp-low.h.
7806 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7807 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7808 (convert_int_to_ascii, convert_ascii_to_int): Move to
7810 * regcache.c: Include rsp-low.h.
7811 * ax.c: Include rsp-low.h.
7812 * Makefile.in (SFILES): Add common/rsp-low.c.
7813 (OBS): Add rsp-low.o.
7814 (rsp-low.o): New target.
7816 2014-02-12 Tom Tromey <tromey@redhat.com>
7818 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7819 Include print-utils.h.
7820 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7821 (plongest, thirty_two, phex_nz): Remove.
7822 * Makefile.in (SFILES): Add common/print-utils.c.
7823 (OBS): Add print-utils.o.
7824 (print-utils-ipa.o): New target.
7825 (print-utils.o): New target.
7826 (IPA_OBJS): Add print-utils-ipa.o.
7828 2014-02-06 Tom Tromey <tromey@redhat.com>
7830 * Makefile.in (SFILES): Fix indentation.
7832 2014-02-05 Doug Evans <dje@google.com>
7834 * linux-low.c (linux_wait_for_event): Improve comment.
7835 (linux_wait_1): Keep current_inferior in sync with event_child.
7837 2014-01-22 Doug Evans <dje@google.com>
7839 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7841 2014-01-22 Doug Evans <dje@google.com>
7843 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7844 * configure: Regenerate.
7845 * config.in: Regenerate.
7846 * Makefile.in (SFILES): Add debug.c.
7848 * debug.c: New file.
7849 * debug.h: New file.
7850 * linux-aarch64-low.c (*): Update all debugging printfs to use
7851 debug_printf instead of fprintf.
7852 * linux-arm-low.c (*): Ditto.
7853 * linux-cris-low.c (*): Ditto.
7854 * linux-crisv32-low.c (*): Ditto.
7855 * linux-m32r-low.c (*): Ditto.
7856 * linux-sparc-low.c (*): Ditto.
7857 * linux-x86.c (*): Ditto.
7858 * linux-low.c (*): Ditto.
7859 (linux_wait_1): Add calls to debug_enter, debug_exit.
7860 (linux_wait): Remove redundant debugging printf.
7861 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7862 (linux_resume, unstop_all_lwps): Ditto.
7863 * mem-break.c (*): Update all debugging printfs to use
7864 debug_printf instead of fprintf.
7865 * remote-utils.c (*): Ditto.
7866 * thread-db.c (*): Ditto.
7867 * server.c #include <ctype.h>, "gdb_vecs.h".
7868 (debug_threads): Moved to debug.c.
7869 (*): Update all debugging printfs to use debug_printf instead of
7871 (start_inferior): Replace call to fflush with call to debug_flush.
7872 (monitor_show_help): Mention set debug-format.
7873 (parse_debug_format_options): New function.
7874 (handle_monitor_command): Handle "monitor set debug-format".
7875 (gdbserver_usage): Mention --debug-format.
7876 (main): Parse --debug-format.
7877 * server.h (debug_threads): Declaration moved to debug.h.
7879 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7880 trace_debug_1 that uses debug_printf.
7881 (tracepoint_look_up_symbols): Update all debugging printfs to use
7882 debug_printf instead of fprintf.
7884 2014-01-20 Baruch Siach <baruch@tkos.co.il>
7886 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7889 2014-01-17 Pedro Alves <palves@redhat.com>
7892 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7893 defined after including gdb_proc_service.h.
7895 2014-01-16 Doug Evans <dje@google.com>
7897 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7898 (match_dll): Use it.
7900 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7902 * target.h (target_ops) <read_btrace>: Change parameters and
7903 return type to allow error reporting.
7904 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7905 trace reading errors on.
7906 * linux-low.c (linux_low_read_btrace): Pass trace reading
7908 (linux_low_disable_btrace): New.
7910 2014-01-15 Doug Evans <dje@google.com>
7912 * inferiors.c (thread_id_to_gdb_id): Delete.
7913 * inferiors.h (thread_id_to_gdb_id): Delete.
7915 2014-01-13 Eli Zaretskii <eliz@gnu.org>
7917 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7918 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7921 2014-01-08 Pedro Alves <palves@redhat.com>
7923 * server.c (handle_status): Don't discard previous queued stop
7924 replies or thread's pending status here.
7925 (main) <disconnection>: Do it here instead.
7927 2014-01-08 Pedro Alves <palves@redhat.com>
7929 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7930 * server.c (visit_actioned_threads, handle_pending_status): New
7932 (handle_v_cont): Factor out parts to ...
7933 (resume): ... this new function. If in all-stop, and a thread
7934 being resumed has a pending status, report it without actually
7936 (myresume): Adjust to use the new 'resume' function.
7937 (clear_pending_status_callback, set_pending_status_callback)
7938 (find_status_pending_thread_callback): New functions.
7939 (handle_status): Handle the case of multiple threads having
7940 interesting statuses to report. Report threads' real last signal
7941 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7942 with an interesting thread to report the status for, instead of
7943 always reporting the status of the first thread.
7945 2014-01-01 Joel Brobecker <brobecker@adacore.com>
7947 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7948 * gdbreplay.c (gdbreplay_version): Likewise.
7950 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7952 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7953 iov.iov_len with the real length in use.
7955 2013-12-13 Joel Brobecker <brobecker@adacore.com>
7957 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7958 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7959 for all targets that use win32-low.c.
7960 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7961 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7963 2013-12-13 Pedro Alves <palves@redhat.com>
7965 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7966 if equal to TARGET_WAITKIND_LOADED.
7967 * win32-low.c (cached_status): New static global.
7968 (win32_wait): Add declaration.
7969 (do_initial_child_stuff): Flush all initial pending debug events
7970 up to the initial breakpoint.
7971 (win32_wait): If CACHED_STATUS was set, return that instead
7972 of doing a real wait. Remove the code resuming the execution
7973 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7974 during the initial phase. Also remove the code changing
7975 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7976 TARGET_WAITKIND_STOPPED.
7978 2013-12-11 Yao Qi <yao@codesourcery.com>
7980 * notif.c (handle_notif_ack): Return 0 if no notification
7983 2013-11-20 Doug Evans <dje@google.com>
7985 * linux-low.c (linux_set_resume_request): Fix comment.
7987 2013-11-20 Doug Evans <dje@google.com>
7989 * linux-low.c (resume_status_pending_p): Tweak comment.
7991 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7993 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7994 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7995 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7996 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7997 (srv_amd64_regobj): Add amd64-mpx.o.
7998 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7999 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8000 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8001 * i387-fp.c (num_pl_bnd_register) Added constant.
8002 (num_pl_bnd_cfg_registers) Added constant.
8003 (struct i387_xsave) Added reserved area and MPX fields.
8004 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8005 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8007 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8008 (init_registers_amd64_mpx_linux): Declare new function.
8009 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8010 (x86_64_regmap): Add MPX registers.
8011 (x86_linux_read_description): Add MPX case.
8012 (initialize_low_arch): Initialize MPX targets.
8014 2013-11-18 Tom Tromey <tromey@redhat.com>
8016 * configure: Rebuild.
8017 * configure.ac: Don't check for stdlib.h.
8018 * gdbreplay.c: Unconditionally include stdlib.h.
8020 2013-11-18 Tom Tromey <tromey@redhat.com>
8022 * config.in: Rebuild.
8023 * configure: Rebuild.
8024 * configure.ac: Don't use AC_HEADER_DIRENT.
8026 2013-11-18 Tom Tromey <tromey@redhat.com>
8028 * server.h: Don't check HAVE_STRING_H.
8029 * gdbreplay.c: Don't check HAVE_STRING_H.
8030 * configure: Rebuild.
8032 2013-11-18 Tom Tromey <tromey@redhat.com>
8034 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8037 2013-11-08 Tom Tromey <tromey@redhat.com>
8039 * configure, config.in: Rebuild.
8040 * configure.ac: Remove unused configury.
8042 2013-11-08 Tom Tromey <tromey@redhat.com>
8044 * acinclude.m4: Include common.m4, codeset.m4.
8045 * configure, config.in: Rebuild.
8046 * configure.ac: Use GDB_AC_COMMON.
8048 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8050 * linux-s390-low.c (HWCAP_S390_TE): New define.
8051 (s390_arch_setup): Consider the TE field in the HWCAP for
8052 determining 'have_regset_tdb'.
8054 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8057 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8060 2013-10-02 Pedro Alves <palves@redhat.com>
8062 * server.c (process_serial_event): Don't output "GDBserver
8063 exiting" if GDB is connected through stdio.
8064 * target.c (mywait): Likewise, be silent if GDB is connected
8067 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8069 * lynx-low.c (lynx_add_threads_after_attach): New function.
8070 (lynx_attach): Remove call to add_thread. Add call to
8071 lynx_add_threads_after_attach instead.
8073 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8075 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8076 * config.in, configure: Regenerated.
8078 2013-09-18 Yao Qi <yao@codesourcery.com>
8081 * server.c (start_inferior): Clear 'resume_info'.
8083 2013-09-16 Jiong Wang <jiwang@tilera.com>
8085 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8088 2013-09-16 Jiong Wang <jiwang@tilera.com>
8090 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8091 linux-tile-low.o to srv_tgtobj.
8093 2013-09-16 Will Newton <will.newton@linaro.org>
8095 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8098 2013-09-06 Pedro Alves <palves@redhat.com>
8100 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8101 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8102 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8103 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8104 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8105 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8107 2013-09-06 Pedro Alves <palves@redhat.com>
8109 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8110 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8112 2013-09-06 Pedro Alves <palves@redhat.com>
8114 * linux-amd64-ipa.c: Include tracepoint.h.
8115 * linux-i386-ipa.c: Include tracepoint.h.
8117 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8119 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8120 (ps_get_thread_area): New function.
8122 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8124 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8125 (initialize_low_arch): Call init_registers_crisv32 rather than
8126 init_register_crisv32.
8128 2013-09-05 Pedro Alves <palves@redhat.com>
8130 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8132 * hostio.h: ... this new file.
8133 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8134 win32-low.c: Include hostio.h.
8136 2013-09-05 Pedro Alves <palves@redhat.com>
8138 * server.h (gdb_client_data, handler_func, callback_handler_func)
8139 (delete_file_handler, add_file_handler, append_callback_event)
8140 (delete_callback_event, start_event_loop, initialize_event_loop):
8141 Move to event-loop.h and include it.
8142 * event-loop.h: New file.
8144 2013-09-05 Pedro Alves <palves@redhat.com>
8146 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8147 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8148 (loaded_dll, unloaded_dll): Move to ...
8149 * dll.h: ... this new file.
8150 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8152 2013-09-05 Pedro Alves <palves@redhat.com>
8154 * server.h (current_process, get_thread_process, all_processes)
8155 (add_inferior_to_list, for_each_inferior, current_inferior)
8156 (remove_inferior, add_process, remove_process, find_process_pid)
8157 (have_started_inferiors_p, have_attached_inferiors_p)
8158 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8159 (clear_inferiors, find_inferior, find_inferior_id)
8160 (inferior_target_data, set_inferior_target_data)
8161 (inferior_regcache_data, set_inferior_regcache_data): Move to
8162 inferiors.h, and include it.
8163 * inferiors.h: New file.
8165 2013-09-05 Pedro Alves <palves@redhat.com>
8167 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8171 2013-09-05 Pedro Alves <palves@redhat.com>
8173 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8175 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8176 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8177 (handle_tracepoint_general_set, handle_tracepoint_query)
8178 (tracepoint_finished_step, tracepoint_was_hit)
8179 (release_while_stepping_state_list, current_traceframe)
8180 (in_readonly_region, traceframe_read_mem)
8181 (fetch_traceframe_registers, traceframe_read_sdata)
8182 (traceframe_read_info, struct fast_tpoint_collect_status)
8183 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8184 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8185 (supply_fast_tracepoint_registers)
8186 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8187 (ipa_tdesc, claim_trampoline_space)
8188 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8189 (agent_mem_read, agent_get_trace_state_variable_value)
8190 (agent_set_trace_state_variable_value, agent_tsv_read)
8191 (agent_mem_read_string, get_raw_reg_func_addr)
8192 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8193 * tracepoint.h: ... this new file.
8195 2013-09-05 Pedro Alves <palves@redhat.com>
8197 * server.h (perror_with_name, error, fatal, warning, paddress)
8198 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8200 * utils.h: New file.
8202 2013-09-05 Pedro Alves <palves@redhat.com>
8204 * server.h (remote_debug, noack_mode, transport_is_reliable)
8205 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8206 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8207 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8208 (write_enn, initialize_async_io, enable_async_io)
8209 (disable_async_io, check_remote_input_interrupt_request)
8210 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8211 (dead_thread_notify, prepare_resume_reply)
8212 (decode_address_to_semicolon, decode_address, decode_m_packet)
8213 (decode_M_packet, decode_X_packet, decode_xfer_write)
8214 (decode_search_memory_packet, unhexify, hexify)
8215 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8216 (look_up_one_symbol, relocate_instruction)
8217 (monitor_output): Move to remote-utils.h, and include it.
8218 * remote-utils.h: New file.
8220 2013-09-05 Pedro Alves <palves@redhat.com>
8222 * server.h (_): Delete.
8224 2013-09-02 Pedro Alves <palves@redhat.com>
8226 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8227 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8229 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8231 2013-09-02 Pierre Muller <muller@sourceware.org>
8233 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8234 or WriteProcessMemory complete successfully and handle
8235 ERROR_PARTIAL_COPY error.
8237 2013-09-02 Pedro Alves <palves@redhat.com>
8239 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8240 error instead of EIO.
8242 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8245 * linux-low.c: Include filestuff.h.
8246 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8247 * lynx-low.c: Include filestuff.h.
8248 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8249 * server.c: Include filestuff.h.
8250 (main): Call notice_open_fds.
8251 * spu-low.c: Include filestuff.h.
8252 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8254 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8256 * Makefile.in: Explain why ../target and ../nat are not
8257 listed as include file search paths.
8258 (linux-waitpid.o): New object file rule.
8259 * configure.srv (srv_native_linux_obj): New variable.
8260 Replace all occurrences of linux native object files with
8261 $srv_native_linux_obj.
8262 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8263 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8264 (linux_enable_event_reporting): Remove declaration.
8265 (my_waitpid): Moved to common/linux-waitpid.c.
8266 (linux_wait_for_event): Pass ptid when calling
8267 linux_enable_event_reporting.
8268 (linux_supports_tracefork_flag): Remove.
8269 (linux_enable_event_reporting): Likewise.
8270 (linux_tracefork_grandchild): Remove.
8271 (STACK_SIZE): Moved to common/linux-ptrace.c.
8272 (linux_tracefork_child): Remove.
8273 (linux_test_for_tracefork): Remove.
8274 (linux_look_up_symbols): Call linux_supports_traceclone.
8275 (initialize_low): Remove call to linux_test_for_tracefork.
8276 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8277 common/linux-ptrace.h.
8278 (PTRACE_TYPE_ARG4): Likewise.
8279 Include linux-ptrace.h.
8281 2013-08-21 Pedro Alves <palves@redhat.com>
8283 * config.in: Renegerate.
8285 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8287 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8288 (SFILES): Remove $(srcdir)/common/target-common.c and
8289 add $(srcdir)/target/waitstatus.c.
8290 (OBS): Remove target-common.o and add waitstatus.o.
8291 (server_h): Remove $(srcdir)/../common/target-common.h and
8292 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8293 and $(srcdir)/../target/waitstatus.h.
8294 (target-common.o): Remove.
8295 (waitstatus.o): New target object file.
8296 * target.h: Do not include target-common.h and
8297 include target/resume.h, target/wait.h and
8298 target/waitstatus.h.
8300 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8302 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8303 to PTRACE_TYPE_ARG3.
8304 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8305 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8307 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8308 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8310 2013-07-27 Jie Zhang <jie@codesourcery.com>
8311 Daniel Jacobowitz <dan@codesourcery.com>
8312 Yao Qi <yao@codesourcery.com>
8314 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8315 (mips-linux-watch.o): New rule.
8316 (mips_linux_watch_h): New variable.
8317 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8319 * linux-mips-low.c: Include mips-linux-watch.h.
8320 (struct arch_process_info, struct arch_lwp_info): New.
8321 (update_watch_registers_callback): New function.
8322 (mips_linux_new_process, mips_linux_new_thread) New functions.
8323 (mips_linux_prepare_to_resume, mips_insert_point): New
8325 (mips_remove_point, mips_stopped_by_watchpoint): New
8327 (rsp_bp_type_to_target_hw_bp_type): New function.
8328 (mips_stopped_data_address): New function.
8329 (the_low_target): Add watchpoint support functions.
8331 2013-07-27 Yao Qi <yao@codesourcery.com>
8333 * i386-low.c: Include break-common.h.
8334 (enum target_hw_bp_type): Remove.
8336 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8338 * Makefile.in (SFILES): /common/target-common.c.
8339 (OBS): Add target-common.o.
8340 (server_h): Add $(srcdir)/../common/target-common.h.
8341 (target-common.o): New target.
8342 * server.c (queue_stop_reply_callback): Free
8343 status string after use.
8344 * target.c (target_waitstatus_to_string): Remove.
8345 * target.h: Include target-common.h.
8346 (resume_kind): Likewise.
8347 (target_waitkind): Likewise.
8348 (target_waitstatus): Likewise.
8349 (TARGET_WNOHANG): Likewise.
8351 2013-07-04 Yao Qi <yao@codesourcery.com>
8353 * Makefile.in (host_alias): Use @host_noncanonical@.
8354 (target_alias): Use @target_noncanonical@.
8355 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8356 ACX_NONCANONICAL_HOST.
8357 * configure: Regenerated.
8360 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8362 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8363 * configure: Rebuild.
8364 * Makefile.in (version_host, version_target): Get from configure.
8365 (version.c): Use $(version_host) and $(version_target).
8367 2013-07-03 Pedro Alves <palves@redhat.com>
8369 * Makefile.in (config.status): Depend on development.sh.
8370 * acinclude.m4: Include libmcheck.m4.
8371 * configure: Regenerate.
8373 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8375 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8376 attribute inside the parentheses.
8377 (winapi_DebugSetProcessKillOnExit): Ditto.
8378 (winapi_DebugBreakProcess): Ditto.
8379 (winapi_GenerateConsoleCtrlEvent): Ditto.
8381 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8383 * notif.h (notif_event): Add a dummy member to avoid compiler
8386 2013-07-01 Pedro Alves <palves@redhat.com>
8388 * hostio.c (HOSTIO_PATH_MAX): Define.
8389 (require_filename, handle_open, handle_unlink, handle_readlink):
8392 2013-07-01 Pedro Alves <palves@redhat.com>
8394 * server.h: Include "pathmax.h".
8395 * linux-low.c: Don't include sys/param.h.
8396 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8398 * win32-low.c: Don't include sys/param.h.
8399 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8401 2013-07-01 Pedro Alves <palves@redhat.com>
8403 * event-loop.c: Don't check HAVE_UNISTD_H before including
8405 * gdbreplay.c: Likewise.
8406 * remote-utils.c: Likewise.
8407 * server.c: Likewise.
8408 * configure.ac: Don't check for unistd.h.
8409 * configure: Regenerate.
8411 2013-06-28 Tom Tromey <tromey@redhat.com>
8413 * Makefile.in (version.c): Use version.in, not
8416 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8418 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8419 * configure: Rebuild.
8420 * Makefile.in (version_host, version_target): Get from configure.
8421 (version.c): Use $(version_host) and $(version_target).
8423 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8425 Fix trace-status to output user name without trailing colon.
8426 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8428 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8430 Fix trace-status to output proper start-time and stop-time.
8431 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8432 output start time and stop time in hex as gdb expects.
8434 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8436 * tracepoint.c (build_traceframe_info_xml): Output trace state
8437 variables present in the trace buffer.
8439 2013-06-24 Tom Tromey <tromey@redhat.com>
8441 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8443 (version.o): Remove.
8444 * gdbreplay.c: Include version.h.
8445 (version, host_name): Don't declare.
8446 * server.h: Include version.h.
8447 (version, host_name): Don't declare.
8449 2013-06-12 Pedro Alves <palves@redhat.com>
8451 * linux-x86-low.c (linux_is_elf64): Delete global.
8452 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8453 with local linux_pid_exe_is_elf_64_file use.
8455 2013-06-11 Pedro Alves <palves@redhat.com>
8457 * linux-low.c (regset_disabled, disable_regset): New functions.
8458 (regsets_fetch_inferior_registers)
8459 (regsets_store_inferior_registers): Use them.
8460 (initialize_regsets_info); Don't allocate the disabled_regsets
8462 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8465 2013-06-11 Pedro Alves <palves@redhat.com>
8467 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8470 2013-06-11 Pedro Alves <palves@redhat.com>
8472 * linux-x86-low.c (initialize_low_arch): Call
8473 init_registers_x32_avx_linux.
8475 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8477 Fix compatibility with Android Bionic.
8478 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8481 2013-06-07 Pedro Alves <palves@redhat.com>
8484 * Makefile.in (OBS): Add tdesc.o.
8485 (IPA_OBJS): Add tdesc-ipa.o.
8486 (tdesc-ipa.o): New rule.
8487 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8489 * linux-low.c (new_inferior): Delete.
8490 (disabled_regsets, num_regsets): Delete.
8491 (linux_add_process): Adjust to set the new per-process
8493 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8494 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8495 was a stop. When calling arch_setup, switch the current inferior
8496 to the thread that got an event.
8497 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8498 (regsets_fetch_inferior_registers)
8499 (regsets_store_inferior_registers): New regsets_info parameter.
8501 (linux_register_in_regsets): New regs_info parameter. Adjust to
8503 (register_addr, fetch_register, store_register): New usrregs_info
8504 parameter. Adjust to use it.
8505 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8506 parameter regs_info. Adjust to use it.
8507 (linux_fetch_registers): Get the current inferior's regs_info, and
8509 (linux_store_registers): Ditto.
8510 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8511 (initialize_low): Don't initialize the target_regsets here. Call
8512 initialize_low_arch.
8513 * linux-low.h (target_regsets): Delete declaration.
8514 (struct regsets_info): New.
8515 (struct usrregs_info): New.
8516 (struct regs_info): New.
8517 (struct process_info_private) <new_inferior>: New field.
8518 (struct linux_target_ops): Delete the num_regs, regmap, and
8519 regset_bitmap fields. New field regs_info.
8520 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8521 * i387-fp.c (num_xmm_registers): Delete.
8522 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8523 calls to new interface.
8524 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8525 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8526 Infer the number of xmm registers from the regcache's target
8528 * i387-fp.h (num_xmm_registers): Delete.
8529 * inferiors.c (add_thread): Don't install the thread's regcache
8531 * proc-service.c (gregset_info): Fetch the current inferior's
8532 regs_info. Adjust to use it.
8533 * regcache.c: Include tdesc.h.
8534 (register_bytes, reg_defs, num_registers)
8535 (gdbserver_expedite_regs): Delete.
8536 (get_thread_regcache): If the thread doesn't have a regcache yet,
8537 create one, instead of aborting gdbserver.
8538 (regcache_invalidate_one): Rename to ...
8539 (regcache_invalidate_thread): ... this.
8540 (regcache_invalidate_one): New.
8541 (regcache_invalidate): Only invalidate registers of the current
8543 (init_register_cache): Add target_desc parameter, and use it.
8544 (new_register_cache): Ditto. Assert the target description has a
8545 non zero registers_size.
8546 (regcache_cpy): Add assertions. Adjust.
8547 (realloc_register_cache, set_register_cache): Delete.
8548 (registers_to_string, registers_from_string): Adjust.
8549 (find_register_by_name, find_regno, find_register_by_number)
8550 (register_cache_size): Add target_desc parameter, and use it.
8551 (free_register_cache_thread, free_register_cache_thread_one)
8552 (regcache_release, register_cache_size): New.
8553 (register_size): Add target_desc parameter, and use it.
8554 (register_data, supply_register, supply_register_zeroed)
8555 (supply_regblock, supply_register_by_name, collect_register)
8556 (collect_register_as_string, collect_register_by_name): Adjust.
8557 * regcache.h (struct target_desc): Forward declare.
8558 (struct regcache) <tdesc>: New field.
8559 (init_register_cache, new_register_cache): Add target_desc
8561 (regcache_invalidate_thread): Declare.
8562 (regcache_invalidate_one): Delete declaration.
8563 (regcache_release): Declare.
8564 (find_register_by_number, register_cache_size, register_size)
8565 (find_regno): Add target_desc parameter.
8566 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8568 * remote-utils.c: Include tdesc.h.
8569 (outreg, prepare_resume_reply): Adjust.
8570 * server.c: Include tdesc.h.
8571 (gdbserver_xmltarget): Delete declaration.
8572 (get_features_xml, process_serial_event): Adjust.
8573 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8575 (struct process_info) <tdesc>: New field.
8576 (ipa_tdesc): Declare.
8577 * tdesc.c: New file.
8578 * tdesc.h: New file.
8579 * tracepoint.c: Include tdesc.h.
8580 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8581 (get_context_regcache): Adjust to pass ipa_tdesc down.
8582 (do_action_at_tracepoint): Adjust to get the register cache size
8583 from the context regcache's description.
8584 (traceframe_walk_blocks): Adjust to get the register cache size
8585 from the current trace frame's description.
8586 (traceframe_get_pc): Adjust to get current trace frame's
8587 description and pass it down.
8588 (gdb_collect): Adjust to get the register cache size from the
8590 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8591 (gdbserver_xmltarget): Delete.
8592 (initialize_low_tracepoint): Set the ipa's target description.
8593 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8594 (initialize_low_tracepoint): Set the ipa's target description.
8595 * linux-x86-low.c: Include tdesc.h.
8596 [__x86_64__] (is_64bit_tdesc): New.
8597 (ps_get_thread_area, x86_get_thread_area): Use it.
8598 (i386_cannot_store_register): Rename to ...
8599 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8600 (i386_cannot_fetch_register): Rename to ...
8601 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8602 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8604 (target_regsets): Rename to ...
8605 (x86_regsets): ... this.
8606 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8608 (x86_siginfo_fixup): Use is_64bit_tdesc.
8609 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8610 (tdesc_x32_avx_linux, tdesc_x32_linux)
8611 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8613 (x86_linux_update_xmltarget): Delete.
8614 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8615 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8616 (AMD64_LINUX_USER64_CS): New.
8617 (x86_linux_read_description): New, based on
8618 x86_linux_update_xmltarget.
8619 (same_process_callback): New.
8620 (x86_arch_setup_process_callback): New.
8621 (x86_linux_update_xmltarget): New.
8622 (x86_regsets_info): New.
8623 (amd64_linux_regs_info): New.
8624 (i386_linux_usrregs_info): New.
8625 (i386_linux_regs_info): New.
8626 (x86_linux_regs_info): New.
8627 (x86_arch_setup): Reimplement.
8628 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8629 (x86_emit_ops): Ditto.
8630 (the_low_target): Adjust. Install x86_linux_regs_info,
8631 x86_cannot_fetch_register, and x86_cannot_store_register.
8632 (initialize_low_arch): New.
8633 * linux-ia64-low.c (tdesc_ia64): Declare.
8634 (ia64_fetch_register): Adjust.
8635 (ia64_usrregs_info, regs_info): New globals.
8636 (ia64_regs_info): New function.
8637 (the_low_target): Adjust.
8638 (initialize_low_arch): New function.
8639 * linux-sparc-low.c (tdesc_sparc64): Declare.
8640 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8642 (sparc_arch_setup): New function.
8643 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8644 (the_low_target): Adjust.
8645 (initialize_low_arch): New function.
8646 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8647 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8648 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8649 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8650 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8651 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8652 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8653 (tdesc_powerpc_isa205_vsx64l): Declare.
8654 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8655 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8656 (ppc_set_pc, ppc_get_hwcap): Adjust.
8657 (ppc_usrregs_info): Forward declare.
8658 (!__powerpc64__) ppc_regmap_adjusted: New global.
8659 (ppc_arch_setup): Adjust to the current process'es target
8661 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8662 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8663 (ppc_store_evrregset): Adjust.
8664 (target_regsets): Rename to ...
8665 (ppc_regsets): ... this, and make static.
8666 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8667 (ppc_regs_info): New function.
8668 (the_low_target): Adjust.
8669 (initialize_low_arch): New function.
8670 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8671 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8672 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8673 (tdesc_s390x_linux64v2): Declare.
8674 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8675 (s390_fill_gregset, s390_store_last_break): Adjust.
8676 (target_regsets): Rename to ...
8677 (s390_regsets): ... this, and make static.
8678 (s390_get_pc, s390_set_pc): Adjust.
8679 (s390_get_hwcap): New target_desc parameter, and use it.
8680 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8681 (s390_arch_setup): Adjust to set the current process'es target
8682 description. Don't adjust the regmap.
8683 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8684 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8685 (regs_info_3264): New globals.
8686 (s390_regs_info): New function.
8687 (the_low_target): Adjust.
8688 (initialize_low_arch): New function.
8689 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8690 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8691 [__mips64] (init_registers_mips_linux)
8692 (init_registers_mips_dsp_linux): Delete defines.
8693 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8694 (have_dsp): New global.
8695 (mips_read_description): New, based on mips_arch_setup.
8696 (mips_arch_setup): Reimplement.
8697 (get_usrregs_info): New function.
8698 (mips_cannot_fetch_register, mips_cannot_store_register)
8699 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8700 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8701 (target_regsets): Rename to ...
8702 (mips_regsets): ... this, and make static.
8703 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8704 (dsp_regs_info, regs_info): New globals.
8705 (mips_regs_info): New function.
8706 (the_low_target): Adjust.
8707 (initialize_low_arch): New function.
8708 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8709 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8711 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8712 (arm_read_description): New, with bits factored from
8714 (arm_arch_setup): Reimplement.
8715 (target_regsets): Rename to ...
8716 (arm_regsets): ... this, and make static.
8717 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8718 (arm_regs_info): New function.
8719 (the_low_target): Adjust.
8720 (initialize_low_arch): New function.
8721 * linux-m68k-low.c (tdesc_m68k): Declare.
8722 (target_regsets): Rename to ...
8723 (m68k_regsets): ... this, and make static.
8724 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8725 (m68k_regs_info): New function.
8726 (m68k_arch_setup): New function.
8727 (the_low_target): Adjust.
8728 (initialize_low_arch): New function.
8729 * linux-sh-low.c (tdesc_sharch): Declare.
8730 (target_regsets): Rename to ...
8731 (sh_regsets): ... this, and make static.
8732 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8733 (sh_regs_info, sh_arch_setup): New functions.
8734 (the_low_target): Adjust.
8735 (initialize_low_arch): New function.
8736 * linux-bfin-low.c (tdesc_bfin): Declare.
8737 (bfin_arch_setup): New function.
8738 (bfin_usrregs_info, regs_info): New globals.
8739 (bfin_regs_info): New function.
8740 (the_low_target): Adjust.
8741 (initialize_low_arch): New function.
8742 * linux-cris-low.c (tdesc_cris): Declare.
8743 (cris_arch_setup): New function.
8744 (cris_usrregs_info, regs_info): New globals.
8745 (cris_regs_info): New function.
8746 (the_low_target): Adjust.
8747 (initialize_low_arch): New function.
8748 * linux-cris-low.c (tdesc_crisv32): Declare.
8749 (cris_arch_setup): New function.
8750 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8751 (cris_regs_info): New function.
8752 (the_low_target): Adjust.
8753 (initialize_low_arch): New function.
8754 * linux-m32r-low.c (tdesc_m32r): Declare.
8755 (m32r_arch_setup): New function.
8756 (m32r_usrregs_info, regs_info): New globals.
8757 (m32r_regs_info): Adjust.
8758 (initialize_low_arch): New function.
8759 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8760 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8761 (tic6x_usrregs_info): Forward declare.
8762 (tic6x_read_description): New function, based on ...
8763 (tic6x_arch_setup): ... this. Reimplement.
8764 (target_regsets): Rename to ...
8765 (tic6x_regsets): ... this, and make static.
8766 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8767 (tic6x_regs_info): New function.
8768 (the_low_target): Adjust.
8769 (initialize_low_arch): New function.
8770 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8771 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8772 (target_regsets): Rename to ...
8773 (xtensa_regsets): ... this, and make static.
8774 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8776 (xtensa_arch_setup, xtensa_regs_info): New functions.
8777 (the_low_target): Adjust.
8778 (initialize_low_arch): New function.
8779 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8780 (nios2_arch_setup): Set the current process'es tdesc.
8781 (target_regsets): Rename to ...
8782 (nios2_regsets): ... this.
8783 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8784 (nios2_regs_info): New function.
8785 (the_low_target): Adjust.
8786 (initialize_low_arch): New function.
8787 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8788 (aarch64_arch_setup): Set the current process'es tdesc.
8789 (target_regsets): Rename to ...
8790 (aarch64_regsets): ... this.
8791 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8792 (aarch64_regs_info): New function.
8793 (the_low_target): Adjust.
8794 (initialize_low_arch): New function.
8795 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8797 (target_regsets): Rename to ...
8798 (tile_regsets): ... this.
8799 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8800 (tile_regs_info): New function.
8801 (tile_arch_setup): Set the current process'es tdesc.
8802 (the_low_target): Adjust.
8803 (initialize_low_arch): New function.
8804 * spu-low.c (tdesc_spu): Declare.
8805 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8806 * win32-arm-low.c (tdesc_arm): Declare.
8807 (arm_arch_setup): New function.
8808 (the_low_target): Install arm_arch_setup instead of
8810 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8811 (init_windows_x86): Rename to ...
8812 (i386_arch_setup): ... this. Set `win32_tdesc'.
8813 (the_low_target): Adjust.
8814 * win32-low.c (win32_tdesc): New global.
8815 (child_add_thread): Don't create the thread cache here.
8816 (do_initial_child_stuff): Set the new process'es tdesc.
8817 * win32-low.h (struct target_desc): Forward declare.
8818 (win32_tdesc): Declare.
8819 * lynx-i386-low.c (tdesc_i386): Declare global.
8820 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8821 * lynx-low.c (lynx_tdesc): New global.
8822 (lynx_add_process): Set the new process'es tdesc.
8823 * lynx-low.h (struct target_desc): Forward declare.
8824 (lynx_tdesc): Declare global.
8825 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8826 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8827 * nto-low.c (nto_tdesc): New global.
8828 (do_attach): Set the new process'es tdesc.
8829 * nto-low.h (struct target_desc): Forward declare.
8830 (nto_tdesc): Declare.
8831 * nto-x86-low.c (tdesc_i386): Declare.
8832 (nto_x86_arch_setup): Set `nto_tdesc'.
8834 2013-06-04 Gary Benson <gbenson@redhat.com>
8836 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8837 to qSupported response when appropriate.
8838 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8839 with nonzero-length annex.
8840 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8841 arguments supplied in annex.
8843 2013-05-31 Doug Evans <dje@google.com>
8846 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8847 64 bits in 64-cross-32 environment.
8849 2013-05-28 Pedro Alves <palves@redhat.com>
8851 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8852 (aarch64-without-fpu.c): Delete rule.
8853 * configure.srv (aarch64*-*-linux*): Remove references to
8854 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8855 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8858 2013-05-24 Pedro Alves <palves@redhat.com>
8860 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8861 instead of strchr/decode_address. Error if the range isn't split
8862 with a ','. Don't assume there's be a ':' in the action.
8864 2013-05-23 Yao Qi <yao@codesourcery.com>
8865 Pedro Alves <palves@redhat.com>
8867 * linux-low.c (lwp_in_step_range): New function.
8868 (linux_wait_1): If the thread was range stepping and stopped
8869 outside the stepping range, report the stop to GDB. Otherwise,
8870 continue stepping. Add range stepping debug output.
8871 (linux_set_resume_request): Copy the step range from the resume
8873 (linux_supports_range_stepping): New.
8874 (linux_target_ops) <supports_range_stepping>: Set to
8875 linux_supports_range_stepping.
8876 * linux-low.h (struct linux_target_ops)
8877 <supports_range_stepping>: New field.
8878 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8879 * linux-x86-low.c (x86_supports_range_stepping): New.
8880 (the_low_target) <supports_range_stepping>: Set to
8881 x86_supports_range_stepping.
8882 * server.c (handle_v_cont): Handle 'r' action.
8883 (handle_v_requests): Append ";r" if the target supports range
8885 * target.h (struct thread_resume) <step_range_start,
8886 step_range_end>: New fields.
8887 (struct target_ops) <supports_range_stepping>:
8889 (target_supports_range_stepping): New macro.
8891 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8893 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8894 confusion in comment.
8896 2013-05-17 Joel Brobecker <brobecker@adacore.com>
8898 * lynx-low.c (struct process_info_private): New type.
8899 (lynx_add_process): New function.
8900 (lynx_create_inferior, lynx_attach): Replace calls to
8901 add_process by calls to lynx_add_process.
8902 (lynx_resume): If PTID is null, then try using
8903 current_process()->private->last_wait_event_ptid.
8905 (lynx_clear_inferiors): Delete. The contents of that function
8906 has been inlined in lynx_mourn;
8907 (lynx_wait_1): Save the ptid in the process's private data.
8908 (lynx_mourn): Free the process' private data. Replace call
8909 to lynx_clear_inferiors by call to clear_inferiors.
8911 2013-05-17 Yao Qi <yao@codesourcery.com>
8913 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8916 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
8918 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8919 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8920 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8921 PT_TEXT_END_ADDR guards. Update comments.
8922 (linux_target_op) <read_offsets>: Conditionally define to
8923 linux_read_offsets if the target is UCLIBC and if it defines
8924 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8926 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8927 Andrew Jenner <andrew@codesourcery.com>
8929 * Makefile.in (SFILES): Add linux-nios2-low.c.
8930 (clean): Add action to delete nios2-linux.c.
8931 (nios2-linux.c): New rule.
8932 * configure.srv: Add nios2*-*-linux*.
8933 * linux-nios2-low.c: New.
8935 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8937 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8939 2013-04-25 Hui Zhu <hui@codesourcery.com>
8942 * ax.c (ax_printf): Add fflush.
8944 2013-04-22 Tom Tromey <tromey@redhat.com>
8946 * Makefile.in (SFILES): Add filestuff.c.
8947 (OBS): Add filestuff.o.
8948 (filestuff.o): New target.
8949 * config.in, configure: Rebuild.
8950 * configure.ac: Check for fdwalk, pipe2.
8952 2013-04-17 Pedro Alves <palves@redhat.com>
8954 * configure.ac (USE_THREAD_DB): Delete variable.
8955 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8956 Don't AC_SUBST USE_THREAD_DB.
8957 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8958 * config.in, configure: Regenerate.
8960 2013-04-16 Pedro Alves <palves@redhat.com>
8962 * linux-low.h (struct lwp_info) <thread_known>: Move under
8963 the USE_THREAD_DB #ifdef.
8965 2013-04-16 Pedro Alves <palves@redhat.com>
8967 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8968 (linux-low.o): Delete rule.
8969 * linux-low.h: Always include "gdb_thread_db.h" instead of
8970 conditionally including thread_db.h.
8971 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8974 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8976 * Makefile.in (install-only): Fix make install regression.
8978 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8980 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8981 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8983 * gdbserver.1: Remove.
8985 2013-03-22 Pedro Alves <palves@redhat.com>
8987 * linux-low.c (handle_extended_wait): Don't call
8988 linux_enable_event_reporting.
8990 2013-03-15 Tony Theodore <tonyt@logyst.com>
8993 * Makefile.in (SHELL): Use @SHELL@.
8995 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8997 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9000 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9002 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9003 Remove extraneous NULL element.
9005 2013-03-13 Yao Qi <yao@codesourcery.com>
9007 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9008 'V' block in trace frame.
9010 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9012 * target.h (struct target_ops): Add btrace ops.
9013 (target_supports_btrace): New macro.
9014 (target_enable_btrace): New macro.
9015 (target_disable_btrace): New macro.
9016 (target_read_btrace): New macro.
9017 * gdbthread.h (struct thread_info): Add btrace field.
9018 * server.c: Include btrace-common.h.
9019 (handle_btrace_general_set): New function.
9020 (handle_btrace_enable): New function.
9021 (handle_btrace_disable): New function.
9022 (handle_general_set): Call handle_btrace_general_set.
9023 (handle_qxfer_btrace): New function.
9024 (struct qxfer qxfer_packets[]): Add btrace entry.
9025 * inferiors.c (remove_thread): Disable btrace.
9026 * linux-low: Include linux-btrace.h.
9027 (linux_low_enable_btrace): New function.
9028 (linux_low_read_btrace): New function.
9029 (linux_target_ops): Add btrace ops.
9030 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9031 Add srv_linux_btrace=yes.
9032 (x86_64-*-linux*): Add linux-btrace.o.
9033 Add srv_linux_btrace=yes.
9034 * configure.ac: Define HAVE_LINUX_BTRACE.
9035 * config.in: Regenerated.
9036 * configure: Regenerated.
9038 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9040 * server.c (handle_qxfer): Preserve error message if -3 is
9042 (qxfer): Document the -3 return value.
9044 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9046 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9047 (linux_btrace_h): New variable.
9048 (linux-btrace.o): New rule.
9050 2013-03-08 Stan Shebs <stan@codesourcery.com>
9051 Hafiz Abid Qadeer <abidh@codesourcery.com>
9053 * tracepoint.c (trace_buffer_size): New global.
9054 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9055 (init_trace_buffer): Change to one-argument function. Allocate
9056 trace buffer memory.
9057 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9058 handle QTBuffer:size packet.
9059 (cmd_bigqtbuffer_size): New function.
9060 (initialize_tracepoint): Call init_trace_buffer with
9061 DEFAULT_TRACE_BUFFER_SIZE.
9062 * server.c (handle_query): Add QTBuffer:size in the
9065 2013-03-07 Yao Qi <yao@codesourcery.com>
9067 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9068 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9070 (cmd_qtsp): Adjust condition. Do post increment.
9071 Set cur_action and cur_step_action back to 0.
9073 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9076 * linux-low.c (linux_write_memory): Return early success if LEN is
9079 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9081 * configure.srv: Add x86_64-*-cygwin* as target.
9083 2013-02-28 Tom Tromey <tromey@redhat.com>
9085 * configure.ac: Invoke AC_SYS_LARGEFILE.
9086 * configure, config.in: Rebuild.
9088 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9090 * win32-low.c: Throughout, fix format strings and casts of
9091 printf-like functions to avoid type related warnings on all
9093 (get_child_debug_event): Print dwDebugEventCode as hex since
9094 that's how it's usually documented.
9096 2013-02-28 Yao Qi <yao@codesourcery.com>
9098 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9101 2013-02-27 Jiong Wang <jiwang@tilera.com>
9103 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9104 (reg-tilegx32.c): New rule.
9105 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9106 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9107 different register info initializer according to elf class.
9108 (init_registers_tilgx32): New function. The tilegx32 register info
9110 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9111 (tile_store_gregset): Likewise.
9113 2013-02-27 Yao Qi <yao@codesourcery.com>
9115 * server.c (process_point_options): Print debug message when
9116 debug_threads is true.
9118 2013-02-26 Yao Qi <yao@codesourcery.com>
9120 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9122 2013-02-19 Pedro Alves <palves@redhat.com>
9123 Kai Tietz <ktietz@redhat.com>
9127 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9128 instead of strtoul to extract address from packet.
9129 (process_serial_event) <'z'>: Likewise.
9131 2013-02-18 Yao Qi <yao@codesourcery.com>
9133 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9135 2013-02-14 Pedro Alves <palves@redhat.com>
9139 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9140 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9142 2013-02-14 Pedro Alves <palves@redhat.com>
9144 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9146 2013-02-14 Pedro Alves <palves@redhat.com>
9148 * tracepoint.c (save_string): Delete.
9149 (add_tracepoint_action): Use savestring instead of save_string.
9151 2013-02-12 Pedro Alves <palves@redhat.com>
9153 * linux-xtensa-low.c: Ditto.
9154 * xtensa-xtregs.c: Ditto.
9156 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9158 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9161 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9163 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9164 aarch64_num_wp_regs and aarch64_num_bp_regs to
9165 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9167 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9169 * linux-aarch64-low.c (ps_get_thread_area): Replace
9170 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9172 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9173 Marcus Shawcroft <marcus.shawcroft@arm.com>
9174 Nigel Stephens <nigel.stephens@arm.com>
9175 Yufeng Zhang <yufeng.zhang@arm.com>
9177 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9178 (aarch64.c, aarch64-without-fpu.c): New targets.
9179 * configure.srv (aarch64*-*-linux*): New.
9180 * linux-aarch64-low.c: New file.
9182 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9184 * linux-low.c (handle_extended_wait, linux_create_inferior)
9185 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9186 (dequeue_one_deferred_signal, linux_resume_one_thread)
9187 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9188 (linux_tracefork_grandchild, linux_test_for_tracefork)
9189 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9190 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9191 where the argument is 0.
9193 2013-01-25 Yao Qi <yao@codesourcery.com>
9195 * event-loop.c: Include "queue.h".
9196 (gdb_event_p): New typedef.
9197 (struct gdb_event) <next_event>: Remove.
9198 (event_queue): Change to QUEUE(gdb_event_p).
9199 (async_queue_event): Remove.
9200 (gdb_event_xfree): New.
9201 (initialize_event_loop): New.
9202 (process_event): Use API from QUEUE.
9203 (wait_for_event): Likewise.
9204 * server.c (main): Call initialize_event_loop.
9205 * server.h (initialize_event_loop): Declare.
9207 2013-01-18 Yao Qi <yao@codesourcery.com>
9209 * ax.h (struct eval_agent_expr_context): New.
9210 (gdb_eval_agent_expr): Update declaration.
9211 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9212 TFRAME. Add new argument CTX.
9213 * server.h (struct eval_agent_expr_context): Declare.
9214 (agent_mem_read, agent_tsv_read): Update declaration.
9215 (agent_mem_read_string): Likewise.
9216 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9217 (add_traceframe_block): Add new argument TPOINT.
9218 Increase TPOINT->traceframe_usage.
9219 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9220 eval_tracepoint_agent_expr.
9221 (condition_true_at_tracepoint): Likewise.
9222 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9223 (agent_mem_read_string, agent_tsv_read): Likewise.
9225 2013-01-16 Yao Qi <yao@codesourcery.com>
9227 * linux-low.c (linux_resume_one_lwp): Don't check
9228 'lwp->bp_reinsert != 0'.
9230 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9231 Pedro Alves <palves@redhat.com>
9233 * lynx-low.c (ptrace_request_to_str): Define a temporary
9234 macro and use it to simplify this function's implementation.
9236 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9238 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9241 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9243 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9245 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9247 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9249 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9251 * lynx-low.c (lynx_resume): Use the resume_info parameter
9252 to determine the ptid for the lynx_ptrace call, unless
9253 it is equal to minus_one_ptid, in which case we use the
9254 ptid of the current_inferior.
9255 (lynx_wait_1): After having received a thread create/exit
9256 event, resume the inferior's execution using the signaling
9257 thread's ptid, rather than the old ptid.
9259 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9261 * lynx-low.c (lynx_resume): Delete variable ret.
9263 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9265 * gdbreplay.c (gdbreplay_version): Update copyright year.
9266 * server.c (gdbserver_version): Likewise.
9268 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9270 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9273 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9275 * lynx-low.c (ptrace_request_to_str): Add handling for
9278 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9280 * lynx-low.c (lynx_attach): Delete variable new_process.
9282 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9284 * lynx-low.c (lynx_create_inferior): Delete variable
9287 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9289 * lynx-low.c (ptrace_request_to_str): Do not handle
9290 PTRACE_GETTHREADLIST if this macro does not exist.
9292 2012-12-15 Yao Qi <yao@codesourcery.com>
9294 * Makefile.in (OBS): Add notif.o.
9295 * notif.c, notif.h: New.
9296 * server.c: Include "notif.h".
9297 (struct vstop_notif) <next>: Remove.
9299 (queue_stop_reply): Update.
9300 (push_event, send_next_stop_reply): Remove.
9301 (discard_queued_stop_replies): Update.
9302 (notif_stop): New variable.
9303 (handle_v_stopped): Remove.
9304 (handle_v_requests): Don't call handle_v_stopped. Call
9305 handle_ack_notif instead.
9306 (queue_stop_reply_callback): Call notif_event_enque instead
9307 of queue_stop_reply.
9308 (handle_status): Don't call send_next_stop_reply, call
9309 notif_write_event instead.
9310 (kill_inferior_callback): Likewise.
9311 (detach_or_kill_inferior_callback): Likewise.
9312 (main): Call initialize_notif.
9313 (process_serial_event): Call QUEUE_is_empty.
9314 (handle_target_event): Call notif_push instead of push event.
9315 * server.h (push_event): Remove declaration.
9317 2012-12-10 Tom Tromey <tromey@redhat.com>
9319 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9320 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9323 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9324 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9325 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9326 (amd64-linux-ipa.o, ax.o): Rewrite.
9327 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9328 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9329 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9330 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9331 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9332 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9333 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9334 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9335 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9336 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9337 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9338 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9339 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9340 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9341 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9342 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9343 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9344 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9345 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9346 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9347 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9348 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9349 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9350 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9351 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9352 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9353 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9354 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9355 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9356 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9357 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9358 (reg-tilegx.o): Remove.
9359 (all_object_files): New macro.
9360 Include .deps files.
9361 * aclocal.m4, configure: Rebuild.
9362 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9363 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9364 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9366 2012-12-05 Tom Tromey <tromey@redhat.com>
9369 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9371 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9373 * configure.ac: Check for linux/perf_event.h.
9374 * config.in: Regenerated.
9375 * configure: Regenerated.
9377 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9379 * hostio.c (handle_readlink): Decrease buffer size
9380 parameter passed to readlink by one byte.
9382 2012-11-26 Yao Qi <yao@codesourcery.com>
9384 * configure.ac (build_warnings): Append '-Wempty-body'.
9385 * configure: Regenerated.
9386 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9389 2012-11-15 Pierre Muller <muller@sourceware.org>
9391 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9392 * config.in: Regenerate.
9393 * configure: Regenerate.
9394 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9395 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9396 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9397 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9399 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9400 instead of <sys/wait.h> header.
9401 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9403 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9405 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9406 (various make rules): Remove -DGDBSERVER
9408 2012-11-09 Yao Qi <yao@codesourcery.com>
9410 * spu-low.c (current_ptid): Move it to ..
9411 * gdbthread.h: ... here. New.
9412 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9413 * server.c (myresume, process_serial_event): Likewise.
9414 * thread-db.c (thread_db_find_new_threads): Likewise.
9415 * tracepoint.c (run_inferior_command): Likewise.
9417 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9419 * server.c (handle_search_memory_1): Include access length in
9422 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9424 * linux-crisv32-low.c: Fix compile errors.
9426 2012-09-04 Yao Qi <yao@codesourcery.com>
9428 * tracepoint.c (cmd_qtsv): Adjust debug message.
9429 Don't check CUR_TPOINT.
9431 2012-08-28 Yao Qi <yao@codesourcery.com>
9433 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9434 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9435 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9436 Remove declarations of xmalloc, xreallloc, xstrdup and
9438 * Makefile.in (libiberty_h): New.
9439 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9440 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9442 2012-08-23 Yao Qi <yao@codesourcery.com>
9444 * server.h: Remove declaration of 'xsnprintf'.
9446 2012-08-22 Keith Seitz <keiths@redhat.com>
9448 * server.h: Include build-gnulib-gbserver/config.h.
9449 * gdbreplay.c: Likewise.
9451 2012-08-08 Doug Evans <dje@google.com>
9453 * Makefile.in (SFILES): Add gdb_vecs.c.
9454 (OBS): Add gdb_vecs.o.
9455 (gdb_vecs_h, host_defs_h): New variables.
9456 (thread-db.o): Add $(gdb_vecs_h) dependency.
9457 (gdb_vecs.o): New rule.
9458 * thread-db.c: #include "gdb_vecs.h".
9459 (thread_db_load_search): Use a vector to iterate over path elements.
9460 Handle text appearing after "$pdir".
9462 * configure.ac: Add check for strstr.
9463 * config.in: Regenerate.
9464 * configure: Regenerate.
9466 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9468 * hostio.c (handle_pread): If pread fails, fall back to attempting
9470 (handle_pwrite): Likewise for pwrite.
9472 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9474 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9475 between unsupported TYPE and unimplementable ADDR/LEN combination.
9476 (arm_insert_point): Act on new return value.
9478 2012-07-31 Pedro Alves <palves@redhat.com>
9480 * server.c (process_point_options): Only skip tokens if we find
9481 one that is unrecognized. Don't treat 'X' specially while
9482 skipping unrecognized tokens.
9484 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9486 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9487 to 4-byte-align HW breakpoint addresses for Thumb.
9489 2012-07-27 Yao Qi <yao@codesourcery.com>
9493 * server.h: Declare gdb_agent_about_to_close.
9494 * target.c (kill_inferior): Include "agent.h".
9495 New. Send command 'kill'.
9496 * target.h (kill_inferior): Removed macro.
9497 * tracepoint.c (gdb_agent_about_to_close): New.
9498 (gdb_agent_helper_thread): Handle command 'close'.
9499 Wait endlessly until the inferior stops.
9500 Install gdb_agent_remove_socket to atexit hook.
9501 (agent_socket_name): New static variable.
9502 (gdb_agent_socket_init): Replace local variable 'name' with
9503 'agent_socket_name'.
9504 (gdb_agent_remove_socket): New.
9506 2012-07-27 Yao Qi <yao@codesourcery.com>
9508 * server.c (process_point_options): Stop at 'X' when parsing.
9510 2012-07-19 Michael Eager <eager@eagercon.com>
9512 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9514 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9515 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9516 hardware breakpoint.
9518 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9520 * gdbserver/linux-low.c (initialize_low): Call
9521 linux_ptrace_init_warnings.
9523 2012-07-02 Doug Evans <dje@google.com>
9525 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9528 2012-07-02 Stan Shebs <stan@codesourcery.com>
9530 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9531 (ax.o): Add it to build rule.
9533 (OBS): Add format.o.
9534 (IPA_OBS): Add format.o.
9535 * server.c (handle_query): Claim support for breakpoint commands.
9536 (process_point_options): Add command case.
9537 (process_serial_event): Leave running if there are printfs in
9539 * mem-break.h (any_persistent_commands): Declare.
9540 (add_breakpoint_commands): Declare.
9541 (gdb_no_commands_at_breakpoint): Declare.
9542 (run_breakpoint_commands): Declare.
9543 * mem-break.c (struct point_command_list): New struct.
9544 (struct breakpoint): New field command_list.
9545 (any_persistent_commands): New function.
9546 (add_commands_to_breakpoint): New function.
9547 (add_breakpoint_commands): New function.
9548 (gdb_no_commands_at_breakpoint): New function.
9549 (run_breakpoint_commands): New function.
9550 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9552 * ax.c: Include format.h.
9553 (ax_printf): New function.
9554 (gdb_eval_agent_expr): Add printf opcode.
9556 2012-06-13 Yao Qi <yao@codesourcery.com>
9558 * server.c (start_inferior): Remove duplicated writes to fields
9559 'last_resume_kind' and 'last_status' of 'current_inferior'.
9561 2012-06-12 Yao Qi <yao@codesourcery.com>
9562 Pedro Alves <palves@redhat.com>
9564 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9566 * server.c (handle_v_cont): Extend comment.
9568 2012-06-11 Yao Qi <yao@codesourcery.com>
9570 * linux-low.c (linux_attach): Add 'static'.
9572 2012-06-06 Yao Qi <yao@codesourcery.com>
9574 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9576 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9578 Fix gcc -flto compilation warning.
9579 * server.c (main): Make variable multi_mode and attach volatile.
9581 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9583 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9584 if the platform doesn't know about it.
9586 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9588 * Makefile.in (SFILES): Add linux-tile-low.c.
9589 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9590 * configure.srv: Handle tilegx-*-linux*.
9591 * linux-tile-low.c: New file.
9593 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9595 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9597 2012-05-24 Pedro Alves <palves@redhat.com>
9601 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9603 2012-05-24 Pedro Alves <palves@redhat.com>
9607 Replace target_signal with gdb_signal throughout.
9609 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9611 * linux-low.c (linux_store_registers): Avoid the copying sequence
9612 when no data has been retrieved by ptrace.
9614 2012-05-22 Will Deacon <will.deacon@arm.com>
9616 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9617 Include asm/ptrace.h.
9618 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9621 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9623 * linux-low.c (linux_store_registers): Don't re-retrieve data
9624 with ptrace that has already been obtained from /proc. Always
9625 copy any data retrieved with ptrace to the buffer supplied.
9627 2012-05-11 Yao Qi <yao@codesourcery.com>
9628 Pedro Alves <palves@redhat.com>
9630 * linux-low.c (enum stopping_threads_kind): New.
9631 (stopping_threads): Change type to `enum stopping_threads_kind'.
9632 (handle_extended_wait): If stopping and suspending threads, leave
9633 the new_lwp suspended too.
9634 (linux_wait_for_event): Adjust.
9635 (stop_all_lwps): Set `stopping_threads' to
9636 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9637 whether we're suspending threads or just stopping them. Assert no
9640 2012-04-29 Yao Qi <yao@codesourcery.com>
9642 * server.h: Move some code to ...
9643 * gdbthread.h: ... here. New.
9644 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9645 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9646 (nto-low.o, win32-low.o): Likewise.
9647 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9648 * regcache.c, remote-utils.c, server.c: Likewise.
9649 * target.c, tracepoint.c, win32-low.c: Likewise.
9651 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9653 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9654 (PTRACE_ARG4_TYPE): Likewise.
9655 (PTRACE_XFER_TYPE): Likewise.
9656 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9657 ptrace to PTRACE_ARG3_TYPE.
9658 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9659 (PTRACE_ARG4_TYPE): Likewise.
9660 (PTRACE_XFER_TYPE): Likewise.
9661 (linux_detach_one_lwp): Cast fourth argument of
9662 ptrace to long then PTRACE_ARG4_TYPE.
9663 (regsets_fetch_inferior_registers): Cast third argument of
9664 ptrace to long then PTRACE_ARG3_TYPE.
9665 (regsets_store_inferior_registers): Likewise.
9667 2012-04-20 Pedro Alves <palves@redhat.com>
9669 * configure: Regenerate.
9671 2012-04-19 Pedro Alves <palves@redhat.com>
9673 * Makefile.in (GNULIB_BUILDDIR): New.
9674 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9675 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9676 (all, install-only, uninstall, clean-info, all-lib, clean): No
9677 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9678 (maintainer-clean realclean distclean): Use subdir_do.
9680 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9681 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9682 * acinclude.m4: Include acx_configure_dir.m4.
9683 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9684 calls. Call AC_PROG_RANLIB. Configure gnulib using
9687 (GNULIB_STDINT_H): Adjust.
9688 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9689 * gdbreplay.c: Include build-gnulib/config.h.
9690 * server.h: Likewise.
9691 * aclocal.m4: Regenerate.
9692 * config.in: Regenerate.
9693 * configure: Regenerate.
9695 2012-04-19 Pedro Alves <palves@redhat.com>
9697 * Makefile.in (LIBGNU, INCGNU): Adjust.
9698 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9699 (all, install-only, uninstall, clean-info, all-lib, clean)
9700 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9701 * configure.ac: Adjust AC_OUTPUT output.
9702 * aclocal.m4: Regenerate.
9703 * configure: Regenerate.
9705 2012-04-19 Pedro Alves <palves@redhat.com>
9707 * Makefile.in (generated_files): New.
9708 (server_h): Remove the explicit dependency on config.h, and depend
9709 on $generated_files.
9711 2012-04-19 Pedro Alves <palves@redhat.com>
9713 * Makefile.in (INCGNU): Add -Ignulib.
9715 2012-04-19 Pedro Alves <palves@redhat.com>
9717 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9718 (INCGNU): ... this, and spell out -I here.
9719 (GNULIB_LIB): Rename to ...
9721 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9723 2012-04-19 Pedro Alves <palves@redhat.com>
9725 * config.in: Regenerate.
9727 2012-04-19 Pedro Alves <palves@redhat.com>
9729 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9730 * server.h (memmem): Remove declaration.
9731 * config.in: Regenerate.
9732 * configure: Regenerate.
9734 2012-04-19 Yao Qi <yao@codesourcery.com>
9736 * Makefile.in (SFILES): Add common/vec.c.
9740 2012-04-19 Yao Qi <yao@codesourcery.com>
9742 * remote-utils.c (prepare_resume_reply): Replace with macro
9743 target_core_of_thread.
9744 * server.c (handle_qxfer_threads_proper): Likewise.
9745 * target.h (traget_core_of_thread): New macro.
9747 2012-04-18 Pedro Alves <palves@redhat.com>
9749 * aclocal.m4: Regenerate.
9750 * configure: Regenerate.
9752 2012-04-16 Yao Qi <yao@codesourcery.com>
9754 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9755 duplicated on address.
9757 2012-04-16 Yao Qi <yao@codesourcery.com>
9759 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9760 (struct tracepoint_action_ops) <send>: New field.
9761 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9762 (agent_expr_send, x_tracepoint_action_send): New.
9763 (l_tracepoint_action_send): New.
9764 (cmd_qtdp): Download and install tracepoint
9765 according to `use_agent'.
9766 (run_inferior_command): Add one more parameter `len'.
9768 (tracepoint_send_agent): New.
9769 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9771 2012-04-16 Yao Qi <yao@codesourcery.com>
9773 * tracepoint.c (download_tracepoints): Moved to ...
9774 (cmd_qtstart): ... here.
9776 2012-04-14 Yao Qi <yao@codesourcery.com>
9778 * tracepoint.c: Include inttypes.h.
9779 (struct collect_memory_action): Use sized types.
9780 (struct tracepoint): Likewise.
9781 (cmd_qtdp, stop_tracing): Update print specifiers.
9782 (cmd_qtp, response_tracepoint): Likewise.
9783 (collect_data_at_tracepoint): Likewise.
9784 (collect_data_at_step): Likewise.
9786 2012-04-14 Yao Qi <yao@codesourcery.com>
9788 Import gnulib module inttypes.
9789 * aclocal.m4, config.in, configure: Regenerated.
9791 2012-04-14 Yao Qi <yao@codesourcery.com>
9793 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9794 Makefile and config.status at last.
9796 2012-04-13 Yao Qi <yao@codesourcery.com>
9798 * tracepoint.c: Include stdint.h unconditionally.
9800 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9802 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9803 on BFD_HAVE_SYS_PROCFS_TYPE.
9804 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9805 * configure: Regenerate.
9806 * config.in: Likewise.
9808 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9810 * Makefile.in (clean): Also remove x32.c x32-linux.c
9811 x32-avx.c x32-avx-linux.c.
9812 (x32.o): New target.
9814 (x32-linux.o): Likewise.
9815 (x32-linux.c): Likewise.
9816 (x32-avx.o): Likewise.
9817 (x32-avx.c): Likewise.
9818 (x32-avx-linux.o): Likewise.
9819 (x32-avx-linux.c): Likewise.
9821 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9822 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9823 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9824 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9825 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9826 i386/x32-avx-linux.xml.
9828 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9829 (init_registers_x32_avx_linux): Likwise.
9830 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9831 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9833 2012-04-13 Pedro Alves <palves@redhat.com>
9835 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9836 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9837 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9838 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9841 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9843 * linux-x86-low.c (compat_x32_clock_t): New.
9844 (compat_x32_siginfo_t): Likewise.
9845 (compat_x32_siginfo_from_siginfo): Likewise.
9846 (siginfo_from_compat_x32_siginfo): Likewise.
9847 (linux_is_elf64): Likewise.
9848 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9849 and siginfo_from_compat_x32_siginfo for x32.
9850 (x86_arch_setup): Set linux_is_elf64.
9852 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9855 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9857 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9858 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9859 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9860 compatible with process.
9862 2012-04-12 Yao Qi <yao@codesourcery.com>
9864 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9865 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9866 (install-only, install-info, clean): Handle sub dir gnulib.
9867 (all-lib, am--refresh): New targets.
9868 (memmem.o): Remove target.
9869 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9870 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9871 (AC_REPLACE_FUNCS): Remove memmem.
9872 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9873 (AC_OUTPUT): Generate Makefile in gnulib/.
9874 * aclocal.m4, config.in, configure: Regenerated.
9876 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9878 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9880 2012-04-05 Pedro Alves <palves@redhat.com>
9882 -Werror=strict-aliasing
9884 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9887 2012-04-04 Pedro Alves <palves@redhat.com>
9889 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9890 (sparc_store_gregset_from_stack, sparc_store_gregset)
9891 (sparc_breakpoint_at): Fix formatting.
9893 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9895 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9897 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9898 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9899 * config.in: Regenerate.
9900 * configure: Likewise.
9902 2012-03-29 Pedro Alves <palves@redhat.com>
9904 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9905 Correct ptrace arguments.
9907 2012-03-28 Pedro Alves <palves@redhat.com>
9909 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9910 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9911 (IA64_FR1_REGNUM): New defines.
9912 (ia64_fetch_register): New.
9913 (the_low_target): Install it.
9914 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9916 * linux-low.c (linux_fetch_registers): Try the
9917 the_low_target.fetch_register hook first.
9919 * linux-arm-low.c (the_low_target): Adjust.
9920 * linux-bfin-low.c (the_low_target): Adjust.
9921 * linux-cris-low.c (the_low_target): Adjust.
9922 * linux-crisv32-low.c (the_low_target): Adjust.
9923 * linux-m32r-low.c (the_low_target): Adjust.
9924 * linux-m68k-low.c (the_low_target): Adjust.
9925 * linux-mips-low.c (the_low_target): Adjust.
9926 * linux-ppc-low.c (the_low_target): Adjust.
9927 * linux-s390-low.c (the_low_target): Adjust.
9928 * linux-sh-low.c (the_low_target): Adjust.
9929 * linux-sparc-low.c (the_low_target): Adjust.
9930 * linux-tic6x-low.c (the_low_target): Adjust.
9931 * linux-x86-low.c (the_low_target): Adjust.
9932 * linux-xtensa-low.c (the_low_target): Adjust.
9934 2012-03-26 Pedro Alves <palves@redhat.com>
9936 * server.c (handle_qxfer_libraries): Don't bail early if
9937 the_target->qxfer_libraries_svr4 is not NULL.
9939 2012-03-26 Pedro Alves <palves@redhat.com>
9941 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9943 2012-03-23 Pedro Alves <palves@redhat.com>
9945 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9946 "library-list-svr4" element's start tag when the the DSO list is
9949 2012-03-23 Pedro Alves <palves@redhat.com>
9951 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9952 a variable whose type size is the same as the inferior's pointer
9955 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9957 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9959 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9960 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9961 * linux-low.h: Include <signal.h>.
9962 (struct siginfo): Remove forward declaration.
9963 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9966 2012-03-21 Mike Frysinger <vapier@gentoo.org>
9968 * .gitignore: Ignore more files.
9970 2012-03-19 Pedro Alves <palves@redhat.com>
9971 Jan Kratochvil <jan.kratochvil@redhat.com>
9973 * server.c (cont_thread, general_thread): Add describing comments.
9974 (start_inferior): Clear `cont_thread'.
9975 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9978 2012-03-15 Yao Qi <yao@codesourcery.com>
9980 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9982 (cmd_qtdp): ... here.
9984 2012-03-15 Yao Qi <yao@codesourcery.com>
9986 * tracepoint.c (struct tracepoint_action_ops): New.
9987 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9988 (m_tracepoint_action_download): New.
9989 (r_tracepoint_action_download): New.
9990 (x_tracepoint_action_download): New.
9991 (l_tracepoint_action_download): New.
9992 (add_tracepoint_action): Install `action->ops' according type.
9993 (download_tracepoint_1): Move code `download' function pointer
9994 of various tracepoint_action_ops.
9996 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9998 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9999 linux_ptrace_attach_warnings.
10001 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10003 * Makefile.in (linux-ptrace.o): New.
10004 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10005 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10006 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10007 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10008 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10010 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10012 2012-03-08 Yao Qi <yao@codesourcery.com>
10013 Pedro Alves <palves@redhat.com>
10015 Fix PR server/13392.
10016 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10017 offset of JMP insn.
10018 * tracepoint.c (remove_tracepoint): New.
10019 (cmd_qtdp): Call remove_tracepoint when failed to install.
10021 2012-03-07 Pedro Alves <palves@redhat.com>
10023 * linux-low.c (get_detach_signal): New.
10024 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10025 Pass on pending signals to PTRACE_DETACH. Check the result of the
10027 * server.c (program_signals, program_signals_p): New.
10028 (handle_general_set): Handle QProgramSignals.
10029 * server.h (program_signals, program_signals_p): Declare.
10031 2012-03-05 Pedro Alves <palves@redhat.com>
10032 Jan Kratochvil <jan.kratochvil@redhat.com>
10034 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10037 2012-03-03 Yao Qi <yao@codesourcery.com>
10039 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10040 agent_look_up_symbols.
10042 2012-03-03 Yao Qi <yao@codesourcery.com>
10044 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10045 (linux-x86-low.o): Likewise.
10046 * server.h: Remove in_process_agent_loaded.
10047 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10051 2012-03-03 Yao Qi <yao@codesourcery.com>
10053 * tracepoint.c (gdb_agent_capability): New global.
10054 (in_process_agent_loaded_ust): Renamed to
10055 `in_process_agent_supports_ust'.
10057 (in_process_agent_supports_ust): Call agent_capability_check.
10058 (clear_installed_tracepoints): Assert that agent supports
10061 2012-03-03 Yao Qi <yao@codesourcery.com>
10063 * linux-low.c (linux_supports_agent): New.
10064 (linux_target_ops): Initialize field `supports_agent' with
10065 linux_supports_agent.
10066 * target.h (struct target_ops) <supports_agent>: New.
10067 (target_supports_agent): New macro.
10068 * server.c (handle_general_set): Handle packet 'QAgent'.
10069 (handle_query): Send `QAgent+'.
10070 * Makefile.in (server.o): Depends on agent.h.
10072 2012-03-03 Yao Qi <yao@codesourcery.com>
10074 * Makefile.in (OBS): Add agent.o.
10075 Add new rule for agent.o.
10076 Track dependence of tracepoint.c on agent.h.
10077 * tracepoint.c (run_inferior_command_1):
10078 (run_inferior_command): Call agent_run_command.
10079 (gdb_ust_connect_sync_socket): Deleted. Move it to
10081 (resume_thread, stop_thread): Likewise.
10082 (gdb_ust_socket_init): Renamed to ...
10083 (gdb_agent_socket_init): ... New.
10084 (gdb_ust_thread): Renamed to ...
10085 (gdb_agent_helper_thread): ... New.
10086 (gdb_ust_init): Move some code to ...
10087 (gdb_agent_init): ... here. New.
10088 [HAVE_UST]: Call gdb_ust_init.
10089 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10090 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10091 * config.in, configure: Regenerated.
10093 2012-03-02 Pedro Alves <palves@redhat.com>
10095 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10096 * linux-low.c (struct simple_pid_list): New.
10097 (stopped_pids): New a struct simple_pid_list pointer.
10098 (add_to_pid_list, pull_pid_from_list): New.
10099 (handle_extended_wait): Don't assume the first signal new children
10100 report is SIGSTOP. Adjust call to pull_pid_from_list.
10101 (linux_wait_for_lwp): Adjust.
10103 2012-03-02 Yao Qi <yao@codesourcery.com>
10105 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10108 2012-03-02 Yao Qi <yao@codesourcery.com>
10110 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10111 `stop_pc' and `tpoint'. Update caller.
10113 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10115 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10116 * linux-low.c (use_linux_regsets): New macro.
10117 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10118 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10119 (linux_register_in_regsets): New function.
10120 (usr_fetch_inferior_registers): Skip registers covered by
10122 (usr_store_inferior_registers): Likewise.
10123 (usr_fetch_inferior_registers): New macro.
10124 (usr_store_inferior_registers): Likewise.
10125 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10126 (linux_store_registers): Likewise.
10127 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10129 (init_registers_mips64_dsp_linux): Likewise.
10130 (init_registers_mips_linux): New macro.
10131 (init_registers_mips_dsp_linux): Likewise.
10132 (mips_dsp_num_regs): Likewise.
10133 (DSP_BASE, DSP_CONTROL): New fallback macros.
10134 (mips_base_regs): New macro.
10135 (mips_regmap): Use it. Fix the size.
10136 (mips_dsp_regmap): New variable.
10137 (mips_dsp_regset_bitmap): Likewise.
10138 (mips_arch_setup): New function.
10139 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10141 (mips_cannot_store_register): Likewise.
10142 (the_low_target): Update .arch_setup, .num_regs and .regmap
10143 initializers. Add .regset_bitmap initializer.
10144 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10146 * linux-bfin-low.c (the_low_target): Likewise.
10147 * linux-cris-low.c (the_low_target): Likewise.
10148 * linux-crisv32-low.c (the_low_target): Likewise.
10149 * linux-ia64-low.c (the_low_target): Likewise.
10150 * linux-m32r-low.c (the_low_target): Likewise.
10151 * linux-m68k-low.c (the_low_target): Likewise.
10152 * linux-ppc-low.c (the_low_target): Likewise.
10153 * linux-s390-low.c (the_low_target): Likewise.
10154 * linux-sh-low.c (the_low_target): Likewise.
10155 * linux-sparc-low.c (the_low_target): Likewise.
10156 * linux-tic6x-low.c (the_low_target): Likewise.
10157 * linux-x86-low.c (the_low_target): Likewise.
10158 * linux-xtensa-low.c (the_low_target): Likewise.
10159 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10160 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10161 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10163 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10164 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10166 2012-02-29 Yao Qi <yao@codesourcery.com>
10167 Pedro Alves <palves@redhat.com>
10169 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10170 `step_over_finished' is true.
10172 2012-02-27 Pedro Alves <palves@redhat.com>
10174 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10175 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10177 2012-02-27 Pedro Alves <palves@redhat.com>
10180 * linux-low.c (pid_is_stopped): New.
10181 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10183 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10185 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10188 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10190 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10192 2012-02-24 Luis Machado <lgustavo@codesourcery>
10194 * server.c (handle_query): Advertise support for target-side
10195 breakpoint condition evaluation.
10196 (process_point_options): New function.
10197 (process_serial_event): When inserting a breakpoint, check for
10198 a target-side condition that should be evaluated.
10200 * mem-break.c: Include regcache.h and ax.h.
10201 (point_cond_list_t): New data structure.
10202 (breakpoint) <cond_list>: New field.
10203 (find_gdb_breakpoint_at): Make non-static.
10204 (delete_gdb_breakpoint_at): Clear any target-side
10206 (clear_gdb_breakpoint_conditions): New function.
10207 (add_condition_to_breakpoint): Likewise.
10208 (add_breakpoint_condition): Likewise.
10209 (gdb_condition_true_at_breakpoint): Likewise.
10210 (gdb_breakpoint_here): Return result directly instead
10211 of going through a local variable.
10213 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10214 (clear_gdb_breakpoint_conditions): Likewise.
10215 (add_breakpoint_condition): Likewise.
10216 (gdb_condition_true_at_breakpoint): Likewise.
10218 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10219 (need_step_over_p): Take target-side breakpoint condition into
10222 2012-02-24 Luis Machado <lgustavo@codesourcery>
10224 * server.h: Include tracepoint.h.
10225 (agent_mem_read, agent_get_trace_state_variable_value,
10226 agent_set_trace_state_variable_value,
10227 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10228 get_set_tsv_func_addr): New prototypes.
10230 * ax.h: New include file.
10231 * ax.c: New source file.
10233 * tracepoint.c: Include ax.h.
10234 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10235 agent_expr, eval_result_type): Move to ax.h.
10236 (parse_agent_expr): Rename to ...
10237 (gdb_parse_agent_expr): ... this, make it non-static and move
10239 (unparse_agent_expr) Rename to ...
10240 (gdb_unparse_agent_expr): ... this, make it non-static and move
10242 (eval_agent_expr): Rename to ...
10243 (eval_tracepoint_agent_expr): ... this.
10244 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10245 forward declarations.
10246 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10247 (agent_get_trace_state_variable_value): New function.
10248 (agent_set_trace_state_variable_value): New function.
10249 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10250 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10251 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10252 (condition_true_at_tracepoint): Likewise.
10253 (parse_agent_expr): Rename to ...
10254 (gdb_parse_agent_expr): ... this and move to ax.c.
10255 (unparse_agent_expr): Rename to ...
10256 (gdb_unparse_agent_expr): ... this and move to ax.c.
10257 (gdb_agent_op_name): Move to ax.c.
10258 (eval_agent_expr): Rename to ...
10259 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10261 (eval_tracepoint_agent_expr): New function.
10262 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10264 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10266 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10267 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10268 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10269 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10270 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10271 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10272 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10273 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10274 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10275 (compile_bytecodes): Remove forward declaration.
10276 (is_goto_target): Move to ax.c.
10277 (compile_bytecodes): Move to ax.c and call
10278 agent_get_trace_state_variable_value (...) and
10279 agent_set_trace_state_variable_value (...).
10281 * Makefile.in: Update ax.c and IPA dependencies.
10283 2012-02-24 Pedro Alves <palves@redhat.com>
10285 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10286 (cmd_bigqtbuffer_circular): ... this. Only handle
10287 'QTBuffer:circular:'.
10288 (handle_tracepoint_general_set): Adjust.
10290 2012-02-16 Yao Qi <yao@codesourcery.com>
10292 * inferiors.c: Move code to ...
10293 * dll.c: .... here. New.
10294 * server.h: Declare clear_dlls.
10295 * Makefile.in (SFILES): Add dll.c.
10299 2012-02-11 Yao Qi <yao@codesourcery.com>
10301 * server.c: (handle_monitor_command): Add a new parameter
10303 (handle_query): Update caller.
10305 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10307 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10308 * configure, config.in: Regenerate.
10309 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10312 2012-02-02 Pedro Alves <palves@redhat.com>
10314 Try SIGKILL first, then PTRACE_KILL.
10315 * linux-low.c (linux_kill_one_lwp): New.
10316 (linux_kill_one_lwp): Rename to ...
10317 (kill_one_lwp_callback): ... this. Use the new
10318 linux_kill_one_lwp.
10320 2012-02-02 Pedro Alves <palves@redhat.com>
10322 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10325 2012-01-27 Pedro Alves <palves@redhat.com>
10327 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10328 (elf_64_file_p): Make static.
10329 (linux_pid_exe_is_elf_64_file): New.
10330 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10331 Delete declarations.
10332 (linux_pid_exe_is_elf_64_file): Declare.
10333 * linux-x86-low.c (x86_arch_setup): Use
10334 linux_pid_exe_is_elf_64_file.
10336 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10338 * linux-low.c (linux_wait_for_event_1): Rename to ...
10339 (linux_wait_for_event): ... here and merge it with former
10340 linux_wait_for_event - new variable wait_ptid, use it.
10341 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10343 2012-01-23 Pedro Alves <palves@redhat.com>
10345 * server.c (main): Avoid yet another case of infinite loop while
10346 detaching/killing after a longjmp.
10348 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10351 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10353 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10355 * hostio.c (handle_readlink): New function.
10356 (handle_vFile): Call it to handle "vFile:readlink" packets.
10358 2012-01-20 Pedro Alves <palves@redhat.com>
10359 Ulrich Weigand <ulrich.weigand@linaro.org>
10361 * server.c (handle_v_requests): Only support vAttach and vRun to
10362 start multiple processes when in extended protocol mode.
10364 2012-01-17 Pedro Alves <palves@redhat.com>
10366 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10367 memalign plus mprotect to allocate the scratch buffer.
10369 2012-01-13 Pedro Alves <palves@redhat.com>
10371 * server.c (attach_inferior): Clear `cont_thread'.
10373 2012-01-13 Pedro Alves <palves@redhat.com>
10375 * server.c (main): Avoid infinite loop while detaching/killing
10378 2012-01-09 Doug Evans <dje@google.com>
10380 * server.c (start_inferior): Set last_ptid in --wrapper case.
10382 2012-01-06 Yao Qi <yao@codesourcery.com>
10384 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10386 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10388 2012-01-04 Yao Qi <yao@codesourcery.com>
10390 * tracepoint.c (cmd_qtdp): Print debug message
10391 for static tracepoint.
10393 2012-01-04 Yao Qi <yao@codesourcery.com>
10395 * tracepoint.c (trace_vdebug): Differentiate debug message
10396 between gdbserver and IPA.
10398 2012-01-03 Yao Qi <yao@codesourcery.com>
10400 * tracepoint.c (tracepoint_was_hit): Don't collect for
10403 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10405 * terminal.h: Reformat copyright header.
10407 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10409 * server.c (gdbserver_version): Update copyright year.
10410 * gdbreplay.c (gdbreplay_version): Likewise.
10412 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10414 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10417 2011-12-18 Hui Zhu <teawater@gmail.com>
10418 * linux-low.c (linux_create_inferior): Save return value to ret.
10420 2011-12-18 Hui Zhu <teawater@gmail.com>
10422 * linux-low.c (linux_create_inferior): Save return value to ret.
10424 2011-12-16 Doug Evans <dje@google.com>
10426 * linux-low.c (linux_create_inferior): If stdio connection,
10427 redirect stdin from /dev/null, stdout to stderr.
10428 * remote-utils.c (remote_is_stdio): New static global.
10429 (remote_connection_is_stdio): New function.
10430 (remote_prepare): Handle stdio connection.
10431 (remote_open): Ditto.
10432 (remote_close): Don't close stdin for stdio connections.
10433 (read_prim,write_prim): New functions. Replace all calls to
10434 read/write to these.
10435 * server.c (main): Watch for "-" argument. Move call to
10436 remote_prepare before start_inferior.
10437 * server.h (STDIO_CONNECTION_NAME): New macro.
10438 (remote_connection_is_stdio): Declare.
10440 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10441 in debugging output.
10443 2011-12-15 Yao Qi <yao@codesourcery.com>
10445 * tracepoint.c: Include sys/syscall.h.
10446 (gdb_ust_thread): Remove preprocessor conditional.
10448 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10450 * linux-low.c (linux_detach_one_lwp): Call
10451 the_low_target.prepare_to_resume before detaching.
10453 2011-12-14 Yao Qi <yao@codesourcery.com>
10455 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10458 2011-12-14 Yao Qi <yao@codesourcery.com>
10460 * i386-low.c (i386_low_stopped_data_address): Initialize local
10461 variable `control'.
10463 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10467 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10468 DR_CONTROL unless necessary. Extend comments.
10469 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10470 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10472 2011-12-13 Yao Qi <yao@codesourcery.com>
10474 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10476 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10478 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10480 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10481 Print new debug message for such case.
10483 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10485 Fix overlapping memcpy.
10486 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10487 the read_inferior_memory transfer.
10488 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10489 write_inferior_memory transfer.
10490 (set_fast_tracepoint_jump): New variable buf. Use it for the
10491 read_inferior_memory and write_inferior_memory transfers.
10492 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10493 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10494 Use it for the write_inferior_memory transfer.
10495 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10498 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10500 * linux-low.c (fetch_register, store_register): Make code
10501 consistent, fix formatting.
10503 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10505 * linux-low.c (usr_store_inferior_registers): Factor out code
10506 to handle individual registers into...
10507 (store_register): ... this new function.
10509 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10511 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10512 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10513 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10514 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10515 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10516 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10517 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10518 (srv_xmlfiles): Add new XML files.
10520 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10522 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10523 (init_registers_s390_linux32v1): Add prototype.
10524 (init_registers_s390_linux32v2): Likewise.
10525 (init_registers_s390_linux64v1): Likewise.
10526 (init_registers_s390_linux64v2): Likewise.
10527 (init_registers_s390x_linux64v1): Likewise.
10528 (init_registers_s390x_linux64v2): Likewise.
10529 (s390_num_regs): Increment to 52.
10530 (s390_regmap): Add orig_r2 register.
10531 (s390_num_regs_3264): Increment to 68.
10532 (s390_regmap_3264): Add orig_r2 register.
10533 (s390_collect_ptrace_register): Handle orig_r2 register.
10534 (s390_supply_ptrace_register): Likewise.
10535 (s390_fill_last_break): New function.
10536 (s390_store_last_break): Likewise.
10537 (s390_fill_system_call): New function.
10538 (s390_store_system_call): Likewise.
10539 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10541 (s390_check_regset): New function.
10542 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10543 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10544 Update target_regsets for available register sets.
10546 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10547 Jan Kratochvil <jan.kratochvil@redhat.com>
10549 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10550 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10552 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10553 * linux-low.h (struct process_info_private): New member r_debug.
10554 * server.c (handle_qxfer_libraries): Call
10555 the_target->qxfer_libraries_svr4.
10556 (handle_qxfer_libraries_svr4): New function.
10557 (qxfer_packets): New entry "libraries-svr4".
10558 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10559 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10560 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10561 PACKET_qXfer_libraries_svr4.
10563 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10565 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10566 PSW address/mask between 8-byte and 16-byte formats.
10567 (s390_supply_ptrace_register): Likewise.
10568 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10569 basic addressing mode bit.
10571 2011-11-24 Stan Shebs <stan@codesourcery.com>
10573 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10575 2011-11-17 Stan Shebs <stan@codesourcery.com>
10577 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10578 (tracing_start_time): New global.
10579 (tracing_stop_time): New global.
10580 (tracing_user_name): New global.
10581 (tracing_notes): New global.
10582 (tracing_stop_note): New global.
10583 (cmd_qtstart): Set traceframe_usage, start_time.
10584 (stop_tracing): Set stop_time.
10585 (cmd_qtstatus): Report additional status.
10586 (cmd_qtp): New function.
10587 (handle_tracepoint_query): Call it.
10588 (cmd_qtnotes): New function.
10589 (handle_tracepoint_general_set): Call it.
10590 (get_timestamp): Rename from tsv_get_timestamp.
10592 2011-11-14 Stan Shebs <stan@codesourcery.com>
10593 Kwok Cheung Yeung <kcy@codesourcery.com>
10595 * linux-x86-low.c (small_jump_insn): New.
10596 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10597 trampoline and error message, build a trampoline and issue a small
10598 jump instruction to it.
10599 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10600 trampoline and error message.
10601 (x86_get_min_fast_tracepoint_insn_len): New.
10602 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10603 * linux-low.h (struct linux_target_ops): Add arguments to
10604 install_fast_tracepoint_jump_pad operation, add new operation.
10605 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10607 (linux_get_min_fast_tracepoint_insn_len): New function.
10608 (linux_target_op): Add new operation.
10609 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10610 (gdb_trampoline_buffer_end): Ditto.
10611 (gdb_trampoline_buffer_error): Ditto.
10612 (struct ipa_sym_addresses): Add fields for new IPA variables.
10613 (symbol_list): Add entries for new IPA variables.
10614 (struct tracepoint): Add fields to hold the address range of the
10615 trampoline used by the tracepoint.
10616 (trampoline_buffer_head): New static variable.
10617 (trampoline_buffer_tail): Ditto.
10618 (claim_trampoline_space): New function.
10619 (have_fast_tracepoint_trampoline_buffer): New function.
10620 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10622 (install_fast_tracepoint): Ditto, also add error buffer argument.
10623 (cmd_qtminftpilen): New function.
10624 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10625 (fast_tracepoint_from_trampoline_address): New function.
10626 (fast_tracepoint_collecting): Handle trampoline as part of jump
10628 (set_trampoline_buffer_space): New function.
10629 (initialize_tracepoint): Initialize new IPA variables.
10630 * target.h (struct target_ops): Add arguments to
10631 install_fast_tracepoint_jump_pad operation, add new
10632 get_min_fast_tracepoint_insn_len operation.
10633 (target_get_min_fast_tracepoint_insn_len): New.
10634 (install_fast_tracepoint_jump_pad): Add arguments.
10635 * server.h (IPA_BUFSIZ): Define.
10636 * linux-i386-ipa.c: Include extra header files.
10637 (initialize_fast_tracepoint_trampoline_buffer): New function.
10638 (initialize_low_tracepoint): Call it.
10639 * server.h (set_trampoline_buffer_space): Declare.
10640 (claim_trampoline_space): Ditto.
10641 (have_fast_tracepoint_trampoline_buffer): Ditto.
10643 2011-11-14 Yao Qi <yao@codesourcery.com>
10645 * server.c (handle_query): Handle InstallInTrace for qSupported.
10646 * tracepoint.c (add_tracepoint): Sort list.
10647 (install_tracepoint, download_tracepoint): New.
10648 (cmd_qtdp): Call them to install and download tracepoints.
10649 (sort_tracepoints): Removed.
10650 (cmd_qtstart): Update.
10652 2011-11-14 Yao Qi <yao@codesourcery.com>
10654 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10655 * mem-break.h: Declare.
10656 * tracepoint.c (cmd_qtstart): Move some code to ...
10657 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10659 (download_tracepoints): Move some code to ...
10660 (download_tracepoint_1): ... here. New.
10662 2011-11-08 Yao Qi <yao@codesourcery.com>
10664 * remote-utils.c (relocate_instruction): A comment fix.
10666 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10668 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10669 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10670 dr_status_mirror and dr_control_mirror from debug_reg_state.
10671 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10672 (i386_initial_stuff): Remove use of deleted globals.
10673 (i386_get_thread_context, i386_set_thread_context,
10674 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10675 from debug_reg_state.
10677 2011-11-05 Yao Qi <yao@codesourcery.com>
10679 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10680 address as TPOINT's.
10682 2011-11-02 Stan Shebs <stan@codesourcery.com>
10684 * tracepoint.c (agent_mem_read_string): New function.
10685 (eval_agent_expr): Call it for tracenz.
10686 * server.c (handle_query): Report support for tracenz.
10688 2011-11-02 Yao Qi <yao@codesourcery.com>
10690 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10692 2011-11-02 Yao Qi <yao@codesourcery.com>
10694 * target.h: Fix a typo in comment.
10696 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10698 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10699 clobber the breakpoints' shadows with fast tracepoint jumps.
10700 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10701 * target.c (write_inferior_memory): Also pass MYADDR down to
10704 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10706 * configure.ac: Check support for personality routine.
10707 * configure: Regenerate.
10708 * config.in: Likewise.
10709 * linux-low.c: Include <sys/personality.h>.
10710 Define ADDR_NO_RANDOMIZE if necessary.
10711 (linux_create_inferior): Disable address space randomization when
10712 forking inferior, if requested.
10713 (linux_supports_disable_randomization): New function.
10714 (linux_target_ops): Install it.
10715 * server.h (disable_randomization): Declare.
10716 * server.c (disable_randomization): New global variable.
10717 (handle_general_set): Handle QDisableRandomization.
10718 (handle_query): Likewise for qSupported.
10719 (main): Support --disable-randomization and --no-disable-randomization
10720 command line arguments.
10721 * target.h (struct target_ops): Add supports_disable_randomization.
10722 (target_supports_disable_randomization): New macro.
10724 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10726 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10728 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10729 [!PT_GETDSBT] (target_loadmap): New definition.
10730 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10731 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10732 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10733 and PT_GETDSBT to LINUX_LOADMAP.
10734 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10735 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10737 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10739 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10740 (arm_linux_hwbp_cap): New static variable.
10741 (arm_linux_get_hwbp_cap): Replace by ...
10742 (arm_linux_init_hwbp_cap): ... this new function.
10743 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10744 (arm_linux_get_hw_watchpoint_count): Likewise.
10745 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10746 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10747 (arm_prepare_to_resume): Use perror_with_name instead of error.
10749 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10751 * linux-arm-low.c: Include <signal.h>.
10752 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10753 (struct arm_linux_hwbp_cap): New data type.
10754 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10755 (struct arm_linux_hw_breakpoint): New data type.
10756 (MAX_BPTS, MAX_WPTS): Define.
10757 (struct arch_process_info, struct arch_lwp_info): New data types.
10758 (arm_linux_get_hwbp_cap): New function.
10759 (arm_linux_get_hw_breakpoint_count): Likewise.
10760 (arm_linux_get_hw_watchpoint_count): Likewise.
10761 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10762 (arm_hwbp_control_initialize): Likewise.
10763 (arm_hwbp_control_is_enabled): Likewise.
10764 (arm_hwbp_control_is_initialized): Likewise.
10765 (arm_hwbp_control_disable): Likewise.
10766 (arm_linux_hw_breakpoint_equal): Likewise.
10767 (arm_linux_hw_point_initialize): Likewise.
10768 (struct update_registers_data): New data structure.
10769 (update_registers_callback: New function.
10770 (arm_insert_point): Likewise.
10771 (arm_remove_point): Likewise.
10772 (arm_stopped_by_watchpoint): Likewise.
10773 (arm_stopped_data_address): Likewise.
10774 (arm_new_process): Likewise.
10775 (arm_new_thread): Likewise.
10776 (arm_prepare_to_resume): Likewise.
10777 (the_low_target): Register arm_insert_point, arm_remove_point,
10778 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10779 arm_new_thread, and arm_prepare_to_resume.
10781 2011-09-15 Stan Shebs <stan@codesourcery.com>
10783 * server.h (struct emit_ops): Add compare-goto fields.
10784 * tracepoint.c (gdb_agent_op_sizes): New table.
10785 (emit_eq_goto): New function.
10786 (emit_ne_goto): New function.
10787 (emit_lt_goto): New function.
10788 (emit_le_goto): New function.
10789 (emit_gt_goto): New function.
10790 (emit_ge_goto): New function.
10791 (is_goto_target): New function.
10792 (compile_bytecodes): Recognize special cases of compare-goto
10793 combinations and call specialized emitters for them.
10794 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10795 (amd64_emit_ne_goto): New function.
10796 (amd64_emit_lt_goto): New function.
10797 (amd64_emit_le_goto): New function.
10798 (amd64_emit_gt_goto): New function.
10799 (amd64_emit_ge_goto): New function.
10800 (amd64_emit_ops): Add the new functions.
10801 (i386_emit_eq_goto): New function.
10802 (i386_emit_ne_goto): New function.
10803 (i386_emit_lt_goto): New function.
10804 (i386_emit_le_goto): New function.
10805 (i386_emit_gt_goto): New function.
10806 (i386_emit_ge_goto): New function.
10807 (i386_emit_ops): Add the new functions.
10809 2011-09-08 Stan Shebs <stan@codesourcery.com>
10811 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10812 (i386_emit_epilogue): Restore %ebx.
10814 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10816 * server.c (step_thread): Remove definition.
10817 (process_serial_event): Don't handle Hs.
10818 * server.h (step_thread): Remove declaration.
10819 * target.c (set_desired_inferior): Remove use of step_thread.
10821 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10823 * linux-low.c: Include linux-procfs.h.
10824 (linux_attach_lwp_1): Update comments.
10825 (linux_attach): Scan for existing threads when attaching to a
10826 process that is the tgid.
10827 * Makefile.in: Update dependencies.
10829 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10831 * configure.srv: Add linux-procfs.o dependencies.
10833 2011-08-14 Yao Qi <yao@codesourcery.com>
10835 * target.h (struct target_ops): Fix indent.
10836 * win32-low.c (win32_target_ops): Fix comment.
10838 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
10839 Yao Qi <yao@codesourcery.com>
10841 * Makefile.in (clean): Remove tic6x-*.c files.
10842 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10843 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10844 (tic6x-c64xp-linux.c): Likewise.
10845 * configure.srv: Add support for tic6x-*-uclinux.
10846 * linux-tic6x-low.c: New.
10847 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10849 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
10850 Yao Qi <yao@codesourcery.com>
10852 * target.h (struct target_ops): Add read_loadmap.
10853 * linux-low.c (struct target_loadseg): New type.
10854 (struct target_loadmap): New type.
10855 (linux_read_loadmap): New function.
10856 (linux_target_ops): Add linux_read_loadmap.
10857 * server.c (handle_query): Support qXfer:fdpic:read packet.
10858 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10861 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10863 * win32-low.c: Include <stdint.h>.
10865 2011-07-22 Pedro Alves <pedro@codesourcery.com>
10867 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10868 to the inferior here.
10869 (i386_remove_aligned_watchpoint): Ditto.
10870 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10871 fit part of the watchpoint in the debug registers.
10872 (i386_update_inferior_debug_regs): New.
10873 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10874 registers, and only update the inferior on success.
10875 (i386_low_remove_watchpoint): Ditto.
10877 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10879 * linux-low.c (compare_ints, unique, list_threads, show_process,
10880 linux_core_of_thread): Delete.
10881 (linux_target_ops): Change linux_core_of_thread to
10882 linux_common_core_of_thread.
10883 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10884 * utils.c (malloc_failure): Change type of argument.
10885 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10886 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10887 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10888 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10889 (IPA_OBJS): Add common-utils-ipa.o.
10890 (ptid_h, linux_osdata_h): New macros.
10891 (server_h): Add common/common-utils.h, common/xml-utils.h,
10892 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10894 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10895 ptid.o, buffer.o): New rules.
10896 (linux-low.o): Add common/linux-osdata.h as a dependency.
10897 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10898 * configure.ac: Add AC_HEADER_DIRENT check.
10899 * config.in: Regenerate.
10900 * configure: Regenerate.
10901 * remote-utils.c (xml_escape_text): Delete.
10902 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10903 buffer_xml_printf): Move to common/buffer.c.
10904 * server.c (main): Remove call to initialize_inferiors.
10905 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10906 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10907 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10908 internal_error, gdb_assert, gdb_assert_fail): Delete.
10909 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10910 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10912 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10913 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10914 initialize_inferiors): Delete.
10916 2011-07-20 Pedro Alves <pedro@codesourcery.com>
10918 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10921 2011-05-31 Pedro Alves <pedro@codesourcery.com>
10923 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10925 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10927 2011-05-26 Yao Qi <yao@codesourcery.com>
10929 * Makefile.in (thread-db.o): Track dependence to
10930 common/gdb_thread_db.h.
10931 * thread-db.c: include gdb_thread_db.h from right place.
10933 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10935 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10936 __FILE__ and __LINE__ to internal_error.
10938 2011-05-13 Doug Evans <dje@google.com>
10940 * thread-db.c (try_thread_db_load_from_sdir): New function.
10941 (try_thread_db_load_from_dir): New function.
10942 (thread_db_load_search): Handle $sdir, ignore $pdir.
10943 Remove trying of system directories if search of
10944 libthread-db-search-path fails, that is now done via $sdir.
10946 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10948 * server.c (handle_query): Add EnableDisableTracepoints to the list
10949 of supported features.
10950 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
10952 (cmd_qtenable_disable): New.
10953 (cmd_qtstart): Install tracepoints even if disabled.
10954 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10955 receiving a QTEnable or QTDisable packet.
10956 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10957 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10959 (gdb_probe): Skip data collection if static tracepoint is disabled.
10961 2011-05-10 Doug Evans <dje@google.com>
10963 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10965 2011-05-04 Doug Evans <dje@google.com>
10967 * linux-low.c (linux_join): Skip process lookup.
10968 * spu-low.c (spu_join): Ditto.
10969 * server.c (join_inferiors_callback): Delete.
10970 (process_serial_event): For 'D' packet (detach) call join_inferior
10973 2011-05-04 Joseph Myers <joseph@codesourcery.com>
10975 * README: Don't mention xscale*-*-linux*.
10976 * configure.srv (xscale*-*-linux*): Don't handle target.
10978 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10980 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10982 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10983 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10984 (i386_emit_void_call_2): Likewise.
10986 2011-04-26 Yao Qi <yao@codesourcery.com>
10988 * linux-low.c: Move common macros to linux-ptrace.h.
10989 Include linux-ptrace.h.
10990 * Makefile.in (linux_ptrace_h): New.
10991 (linux-low.o): Depends on linux-ptrace.h.
10993 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10995 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10996 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10997 (remote_prepare): New function with most of the TCP code from ...
10998 (remote_open): ... here. Detect PORT here unconditionally. Move also
10999 setting transport_is_reliable.
11000 * server.c (run_once): New variable.
11001 (gdbserver_usage): Document it.
11002 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11003 the first run if RUN_ONCE.
11004 * server.h (run_once, remote_prepare): New declarations.
11006 2011-04-19 Tom Tromey <tromey@redhat.com>
11008 * win32-low.c (handle_load_dll): Remove duplicate "the".
11010 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11012 Remove support for old Cygwin 1.5 versions.
11013 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11014 function to avoid warning.
11015 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11018 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11020 * gdbserver/server.h (Macro _): Define it if not available.
11022 2011-03-14 Michael Snyder <msnyder@vmware.com>
11024 * hostio.c (handle_close): Remove unnecessary null test.
11026 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11028 * Makefile.in (maintainer-clean realclean distclean): Remove
11029 "make ... subdir_do" command.
11031 2011-03-10 Michael Snyder <msnyder@vmware.com>
11033 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11035 * server.c (handle_v_run): Free alloced buffer on early return.
11037 2011-03-09 Yao Qi <yao@codesourcery.com>
11040 2011-03-04 Yao Qi <yao@codesourcery.com>
11042 * Makefile.in: Remove GNU make feature --directory.
11044 2011-03-05 Yao Qi <yao@codesourcery.com>
11046 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11047 (subdir_do): New make target. Copied from gdb/Makefile.
11048 (maintainer-clean, realclean, distclean, clean): Call corresponding
11049 make targets in common/Makefile.
11051 2011-02-11 Yao Qi <yao@codesourcery.com>
11053 * configure.ac: Call AC_PROG_RANLIB.
11054 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11055 * configure: Regenerate.
11057 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11059 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11061 2011-03-06 Yao Qi <yao@codesourcery.com>
11063 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11065 2011-03-05 Yao Qi <yao@codesourcery.com>
11067 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11068 (subdir_do): New make target. Copied from gdb/Makefile.
11069 (maintainer-clean, realclean, distclean, clean): Call corresponding
11070 make targets in common/Makefile.
11072 2011-03-04 Yao Qi <yao@codesourcery.com>
11074 * Makefile.in: Remove GNU make feature --directory.
11076 2011-03-04 Michael Snyder <msnyder@vmware.com>
11078 * server.c (queue_stop_reply): Call xmalloc not malloc.
11080 2011-03-02 Michael Snyder <msnyder@vmware.com>
11082 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11084 2011-02-28 Michael Snyder <msnyder@vmware.com>
11086 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11087 (cmd_qtframe): Ditto.
11088 (cmd_qtbuffer): Ditto.
11089 (cmd_bigqtbuffer): Ditto.
11091 * utils.c (decimal2str): Initialize 'width' to nine, then
11092 don't mess with it.
11094 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11096 * hostio.c (require_data): Free *data, not data.
11098 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11100 * hostio.c (require_data): Use free, not xfree.
11102 2011-02-27 Michael Snyder <msnyder@vmware.com>
11104 * server.c (handle_query): Discard unused value.
11106 * hostio.c (require_data): Free malloc memory before returning
11109 2011-02-26 Michael Snyder <msnyder@vmware.com>
11111 * linux-low.c (list_threads): Call closedir for dirent.
11113 2011-02-27 Michael Snyder <msnyder@vmware.com>
11115 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11116 a case statement falls through.
11118 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11120 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11123 2011-02-26 Michael Snyder <msnyder@vmware.com>
11125 * utils.c (decimal2str): Eliminate dead code and dead param.
11126 (pulongest): Drop dead param from call to decimal2str.
11129 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11131 Revert the following patch (not approved yet):
11132 2011-02-21 Hui Zhu <teawater@gmail.com>
11133 * tracepoint.c (tp_printf): New function.
11134 (eval_agent_expr): Handle gdb_agent_op_printf.
11136 2011-02-21 Hui Zhu <teawater@gmail.com>
11138 * tracepoint.c (tp_printf): New function.
11139 (eval_agent_expr): Handle gdb_agent_op_printf.
11141 2011-02-18 Tom Tromey <tromey@redhat.com>
11143 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11144 (tracepoint.o): Likewise.
11145 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11146 (gdb_agent_op_names): Likewise.
11148 2011-02-18 Tom Tromey <tromey@redhat.com>
11150 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11151 gdb_agent_op_rot>: New constants.
11152 (gdb_agent_op_names): Add pick and roll.
11153 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11156 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11158 * aclocal.m4: Regenerated with aclocal-1.11.1.
11160 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11162 * server.c (handle_qxfer_traceframe_info): New.
11163 (qxfer_packets): Register "traceframe-info".
11164 (handle_query): Report support for qXfer:traceframe-info:read+.
11165 * tracepoint.c (match_blocktype): New.
11166 (traceframe_find_block_type): Rename to ...
11167 (traceframe_walk_blocks): ... this. Add callback filter argument,
11169 (traceframe_find_block_type): New, reimplemented on top of
11170 traceframe_walk_blocks.
11171 (build_traceframe_info_xml): New.
11172 (traceframe_read_info): New.
11173 * server.h (traceframe_read_info): Declare.
11175 2011-02-11 Yao Qi <yao@codesourcery.com>
11177 * configure.ac: Call AC_PROG_RANLIB.
11178 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11179 * configure: Regenerate.
11181 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11183 * server.c (gdb_read_memory): Change return semantics to allow
11185 (handle_search_memory_1): Adjust.
11186 (process_serial_event) <'m' packet>: Handle partial transfers.
11187 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11189 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11191 * regcache.c (init_register_cache): Initialize
11192 regcache->register_status.
11193 (free_register_cache): Release regcache->register_status.
11194 (regcache_cpy): Copy register_status.
11195 (registers_to_string): Print 'x's for unavailable registers.
11196 (supply_register): Mark the register's status valid or
11197 unavailable, depending on whether a buffer was passed in or not.
11198 (supply_register_zeroed): New.
11199 (supply_regblock): Mark the registers' status valid or
11200 unavailable, depending on whether a buffer was passed in or not.
11201 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11202 (struct regcache): New `register_status' field.
11203 (supply_register_zeroed): Declare.
11204 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11205 supply_register_zeroed, rather than passing a NULL buffer to
11207 * tracepoint.c (fetch_traceframe_registers): Update comment.
11209 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11211 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11214 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11216 * server.h (decode_xfer_write): Change prototype.
11217 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11218 and don't extract the annex here.
11219 * server.c (decode_xfer_read): Remove `annex' parameter,
11220 and don't extract the annex here.
11221 (decode_xfer): New.
11222 (struct qxfer): New.
11223 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11224 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11225 (handle_qxfer_statictrace): New functions, abstracted out from
11226 handle_query, and made to use the struct qxfer interface.
11227 (handle_threads_qxfer_proper): Rename to ...
11228 (handle_qxfer_threads_proper): ... this.
11229 (handle_threads_qxfer): Rename to ...
11230 (handle_qxfer_threads): ... this. Adjust.
11231 (qxfer_packets): New array.
11232 (handle_qxfer): New function.
11233 (handle_query): Use handle_qxfer.
11235 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11237 * gdbreplay.c: Shorten lines of >= 80 columns.
11238 * linux-low.c: Ditto.
11239 * linux-ppc-low.c: Ditto.
11240 * linux-s390-low.c: Ditto.
11241 * linux-sparc-low.c: Ditto.
11242 * linux-x86-low.c: Ditto.
11243 * linux-xtensa-low.c: Ditto.
11244 * mem-break.c: Ditto.
11245 * nto-low.c: Ditto.
11246 * regcache.h: Ditto.
11247 * remote-utils.c: Ditto.
11250 * thread-db.c: Ditto.
11251 * tracepoint.c: Ditto.
11253 * win32-low.h: Ditto.
11255 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11257 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11260 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11262 * server.c (gdbserver_version): Update copyright year in version
11264 * gdbreplay.c (gdbreplay_version): Ditto.
11266 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11268 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11269 * linux-bfin-low.c: New file.
11270 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11271 PT_DATA_ADDR for BFIN targets.
11272 * Makefile.in (SFILES): Add linux-bfin-low.c.
11273 (clean): Remove reg-bfin.c.
11274 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11275 * README: Mention supported Blackfin targets.
11277 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11279 * .gitignore: New file.
11281 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11283 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11285 2010-10-22 Jie Zhang <jie@codesourcery.com>
11287 * Makefile.in: Add FLAGS_TO_PASS variable.
11288 (install): Remove dependency of install-only and recursively
11289 invoke make for install-only.
11291 2010-10-04 Doug Evans <dje@google.com>
11293 * Makefile.in (uninstall): Use $(DESTDIR).
11295 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11299 * linux-x86-low.c (compat_siginfo_from_siginfo)
11300 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11301 si_code is < 0. Check for si_code == SI_TIMER before checking for
11304 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11306 * lynx-i386-low.c: New file.
11307 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11309 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11311 * lynx-low.c (ptrace_request_to_str): Remove handling for
11312 request values that have been removed in LynxOS 5.x.
11314 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11316 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11319 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11321 * configure.ac: Add --enable-inprocess-agent option.
11322 * configure: Rebuilt.
11324 2010-09-06 Yao Qi <yao@codesourcery.com>
11326 * linux-low.c (linux_kill): Remove unused variable.
11327 (linux_stabilize_threads): Likewise.
11328 * server.c (start_inferior): Likewise.
11329 (queue_stop_reply_callback): Likewise.
11330 * tracepoint.c (do_action_at_tracepoint): Likewise.
11332 2010-09-06 Yao Qi <yao@codesourcery.com>
11334 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11337 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11339 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11341 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11343 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11348 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11349 gdbserver/lynx-ppc-low.c: New files.
11350 * Makefile.in (lynx_low_h): New variable.
11351 (lynx-low.o, lynx-ppc-low.o): New rules.
11352 * configure.ac: On LynxOS, link with -lnetinet.
11353 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11354 * configure: regenerate.
11356 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11358 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11359 * configure.ac: Add check for vasprintf and vsnprintf.
11360 * configure, config.in: Regenerate.
11361 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11363 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11365 * gdbreplay.c: Move include of alloca.h up, next to include of
11367 * server.h: Add include of malloc.h.
11368 * mem-break.c: Remove include of malloc.h.
11369 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11371 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11373 * Makefile.in (memmem.o): Build with -Wno-error.
11375 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11377 * utils.c (xsnprintf): Make non-static.
11378 * server.h: Add xsnprintf declaration.
11379 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11380 replace calls to snprintf by calls to xsnprintf throughout.
11382 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11384 * configure.ac: Add configure check for alloca.
11385 * configure, config.in: Regenerate.
11386 * server.h: Include alloca.h if it exists.
11387 * gdbreplay.c: Include alloca.h if it exists.
11389 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11391 * linux-low.c (__SIGRTMIN): Define if not already defined.
11392 (linux_create_inferior): Check for __ANDROID__ rather than
11394 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11395 are already deferred.
11396 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11397 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11398 stopped and already has a pending signal to report.
11399 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11400 a pending signal to report or is moving out of a jump pad.
11401 (linux_init_signals): Check for __ANDROID__ rather than
11404 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11406 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11407 debug_threads check. Avoid a linear search when not doing debug
11410 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11412 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11413 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11414 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11415 (process_event): Change local fd's type to gdb_fildes_t.
11416 (create_file_handler): Adjust prototype.
11417 (delete_file_handler): Adjust prototype.
11418 (handle_file_event): Adjust prototype. Use pfildes.
11419 (create_file_event): Adjsut prototype.
11420 * remote-utils.c (remote_desc, listen_desc): Change type to
11422 * server.h: New gdb_fildes_t typedef.
11423 [USE_WIN32API]: Include winsock2.h.
11424 (delete_file_handler, add_file_handler): Adjust prototypes.
11425 (pfildes): Declare.
11426 * utils.c (pfildes): New.
11428 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11430 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11431 * configure: Regenerate.
11433 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11435 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11436 (linux_done_accessing_memory): ... this.
11437 (linux_target_ops): Adjust.
11438 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11439 * nto-low.c (nto_target_ops): Adjust comment.
11440 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11441 * spu-low.c (spu_target_ops): Adjust comment.
11442 * target.h (target_ops): Rename unprepare_to_access_memory field
11443 to done_accessing_memory.
11444 (unprepare_to_access_memory): Rename to ...
11445 (done_accessing_memory): ... this.
11447 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11449 * linux-low.c (linux_prepare_to_access_memory): New.
11450 (linux_unprepare_to_access_memory): New.
11451 (linux_target_ops): Install them.
11452 * server.c (read_memory): Rename to ...
11453 (gdb_read_memory): ... this. Use
11454 prepare_to_access_memory/prepare_to_access_memory.
11455 (write_memory): Rename to ...
11456 (gdb_write_memory): ... this. Use
11457 prepare_to_access_memory/prepare_to_access_memory.
11458 (handle_search_memory_1): Adjust.
11459 (process_serial_event): Adjust.
11460 * target.h (struct target_ops): New fields
11461 prepare_to_access_memory and unprepare_to_access_memory.
11462 (prepare_to_access_memory, unprepare_to_access_memory): New.
11463 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11464 prepare_to_access_memory/prepare_to_access_memory.
11465 * nto-low.c (nto_target_ops): Adjust.
11466 * spu-low.c (spu_target_ops): Adjust.
11467 * win32-low.c (win32_target_ops): Adjust.
11469 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11471 * Makefile.in (WARN_CFLAGS): Get it from configure.
11472 (WERROR_CFLAGS): New.
11473 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11474 * configure.ac: Introduce --enable-werror, which adds -Werror to
11475 the compiler command line. Enabled by default. Disable with
11476 --disable-werror. Add -Wdeclaration-after-statement
11477 Wpointer-arith and -Wformat-nonliteral to warning flags.
11478 * configure: Regenerate.
11480 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11482 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11484 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11486 * gdbreplay.c (remote_error): New.
11488 (expect): Use gdbchar. Check for error reading from GDB.
11489 Clarify sync error output.
11490 (play): Check for errors writing to GDB.
11491 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11492 * remote-utils.c (getpkt): Check for errors writing to the remote
11495 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11497 * linux-low.c (linux_wait_1): Move non-debugging code out of
11498 `debug_threads' control.
11500 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11502 * linux-low.c (linux_wait_1): Don't set last_status here.
11503 * server.c (push_event, queue_stop_reply_callback): Assert we're
11504 not pushing a TARGET_WAITKIND_IGNORE event.
11505 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11506 (myresume, handle_target_event): Set the thread's last_resume_kind
11507 and last_status from the target returned status.
11509 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11513 * linux-x86-low.c (update_debug_registers_callback): New.
11514 (i386_dr_low_set_addr): Use it.
11515 (i386_dr_low_get_addr): New.
11516 (i386_dr_low_set_control): Use update_debug_registers_callback.
11517 (i386_dr_low_get_control): New.
11518 (i386_dr_low_get_status): Adjust.
11519 * linux-low.c (linux_stop_lwp): New.
11520 * linux-low.h (linux_stop_lwp): Declare.
11522 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11523 argument instead of a i386_debug_reg_state.
11524 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11525 a i386_debug_reg_state.
11526 (i386_insert_aligned_watchpoint): Adjust.
11527 (i386_remove_aligned_watchpoint): Adjust.
11528 (i386_low_stopped_data_address): Read the debug registers from the
11529 inferior instead of from the mirrors.
11530 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11531 (i386_dr_low_get_addr): Declare.
11532 (i386_dr_low_get_control): Declare.
11533 (i386_dr_low_get_status): Change prototype.
11535 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11536 (i386_dr_low_get_addr): New.
11537 (i386_dr_low_get_control): New.
11538 (i386_dr_low_get_status): Adjust prototype. Return
11540 (i386_initial_stuff): Clear dr_status_mirror and
11542 (i386_get_thread_context): Adjust.
11543 (i386_set_thread_context): Adjust.
11544 (i386_thread_added): Adjust.
11546 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11548 * linux-low.h (linux_thread_area): Delete declaration.
11550 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11552 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11553 after its termination.
11555 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11557 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11558 (gdb_wants_all_stopped): Delete.
11559 (linux_wait_1): Don't call them.
11560 * server.c (handle_v_cont): Tag all threads as want-stopped.
11561 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11562 stopped as "client-wants-stopped".
11564 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11566 * Makefile.in (signals_h): New.
11567 (server_h): Depend on it.
11568 (server.o): Don't depend on $(signals_def).
11569 (signals.o): Depend on $(signals_def).
11571 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11573 * Makefile.in (signals_def): New.
11574 (server_h): Append include/gdb/signals.h and signals_def.
11575 (server.o): Append signals_def.
11577 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11579 * server.c (handle_target_event): Use target_signal_to_host for
11580 resume_info.sig initialization.
11581 * target.h (struct thread_resume) <sig>: New comment.
11583 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11585 * server.c (handle_query): strcpy() the returned string from paddress()
11586 instead of sprintf().
11587 * utils.c (paddress): Return phex_nz().
11589 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11591 * server.c (handle_v_cont): Call mourn_inferior if process
11593 (myresume): Likewise.
11595 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11597 Static tracepoints, and integration with UST.
11599 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11600 * mem-break.c (uninsert_all_breakpoints)
11601 (reinsert_all_breakpoints): New.
11602 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11603 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11604 (gdb_agent_ust_loaded, helper_thread_id)
11605 (gdb_agent_helper_thread_id): New macros.
11606 (struct ipa_sym_addresses): Add addr_ust_loaded,
11607 addr_helper_thread_id, addr_cmd_buf.
11608 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11609 (in_process_agent_loaded_ust): New.
11610 (write_e_ust_not_loaded): New.
11611 (maybe_write_ipa_ust_not_loaded): New.
11612 (struct collect_static_trace_data_action): New.
11613 (enum tracepoint_type) <static_tracepoint>: New.
11614 (struct tracepoint) <handle>: Mention static tracepoints.
11615 (struct static_tracepoint_ctx): New.
11616 (CMD_BUF_SIZE): New.
11617 (add_tracepoint_action): Handle static tracepoint actions.
11618 (unprobe_marker_at): New.
11619 (clear_installed_tracepoints): Handle static tracepoints.
11620 (cmd_qtdp): Handle static tracepoints.
11621 (probe_marker_at): New.
11622 (cmd_qtstart): Handle static tracepoints.
11623 (response_tracepoint): Handle static tracepoints.
11624 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11625 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11626 (get_context_regcache): Handle static tracepoints.
11627 (do_action_at_tracepoint): Handle static tracepoint actions.
11628 (traceframe_find_block_type): Handle static trace data blocks.
11629 (traceframe_read_sdata): New.
11630 (download_tracepoints): Download static tracepoint actions.
11631 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11632 (GDB_PROBE_NAME): New.
11634 (GET_UST_SYM): New.
11637 (ust_marker_to_static_tracepoint): New.
11639 (collect_ust_data_at_tracepoint): New.
11640 (gdb_ust_probe): New.
11641 (UNIX_PATH_MAX, SOCK_DIR): New.
11642 (gdb_ust_connect_sync_socket): New.
11643 (resume_thread, stop_thread): New.
11644 (run_inferior_command): New.
11645 (init_named_socket): New.
11646 (gdb_ust_socket_init): New.
11647 (cstr_to_hexstr): New.
11649 (first_marker, next_marker): New.
11650 (response_ust_marker): New.
11651 (cmd_qtfstm, cmd_qtsstm): New.
11652 (unprobe_marker_at, probe_marker_at): New.
11653 (cmd_qtstmat, gdb_ust_thread): New.
11654 (gdb_ust_init): New.
11655 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11656 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11657 (ST_REGENTRY): New.
11658 (x86_64_st_collect_regmap): New.
11659 (X86_64_NUM_ST_COLLECT_GREGS): New.
11660 (AMD64_RIP_REGNUM): New.
11661 (supply_static_tracepoint_registers): New.
11662 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11663 (ST_REGENTRY): New.
11664 (i386_st_collect_regmap): New.
11665 (i386_NUM_ST_COLLECT_GREGS): New.
11666 (supply_static_tracepoint_registers): New.
11667 * server.c (handle_query): Handle qXfer:statictrace:read.
11668 <qSupported>: Report support for StaticTracepoints, and
11669 qXfer:statictrace:read features.
11670 * server.h (traceframe_read_sdata)
11671 (supply_static_tracepoint_registers): Declare.
11672 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11673 (unpack_varlen_hex): Include in IPA build.
11674 * Makefile.in (ustlibs, ustinc): New.
11675 (IPA_OBJS): Add remote-utils-ipa.o.
11676 ($(IPA_LIB)): Link -ldl and -lpthread.
11678 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11679 * config.in, configure: Regenerate.
11681 2010-06-20 Ian Lance Taylor <iant@google.com>
11682 Pedro Alves <pedro@codesourcery.com>
11684 * linux-x86-low.c (always_true): Delete.
11685 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11686 trying to fool the compiler with always_true.
11688 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11690 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11691 conditions in gdbserver.
11693 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11695 * spu-low.c (spu_read_memory): Wrap around local store limit.
11696 (spu_write_memory): Likewise.
11698 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11700 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11701 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11703 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11705 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11706 uses with LONGEST uses.
11708 2010-06-14 Stan Shebs <stan@codesourcery.com>
11709 Pedro Alves <pedro@codesourcery.com>
11713 * linux-x86-low.c: Include limits.h.
11715 (always_true): New.
11718 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11719 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11720 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11721 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11722 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11723 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11724 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11725 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11726 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11727 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11728 (amd64_emit_void_call_2): New.
11729 (amd64_emit_ops): New.
11730 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11731 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11732 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11733 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11734 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11735 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11736 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11737 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11738 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11739 (i386_emit_stack_adjust, i386_emit_int_call_1)
11740 (i386_emit_void_call_2): New.
11741 (i386_emit_ops): New.
11742 (x86_emit_ops): New.
11743 (the_low_target): Install x86_emit_ops.
11744 * server.h (struct emit_ops): New.
11745 (get_raw_reg_func_addr): Declare.
11746 (current_insn_ptr, emit_error): Declare.
11747 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11748 (set_trace_state_variable_value): New defines.
11749 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11750 addr_get_trace_state_variable_value and
11751 addr_set_trace_state_variable_value.
11752 (symbol_list): New fields for get_raw_reg,
11753 get_trace_state_variable_value and set_trace_state_variable_value.
11754 (condfn): New typedef.
11755 (struct tracepoint): New field `compiled_cond'.
11756 (do_action_at_tracepoint): Clear compiled_cond.
11757 (get_trace_state_variable_value, set_trace_state_variable_value):
11759 (condition_true_at_tracepoint): If there's a compiled condition,
11761 (current_insn_ptr, emit_error): New globals.
11762 (struct bytecode_address): New.
11763 (get_raw_reg_func_addr): New.
11764 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11765 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11766 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11767 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11768 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11769 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11770 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11771 (compile_tracepoint_condition, compile_bytecodes): New.
11772 * target.h (emit_ops): Forward declare.
11773 (struct target_ops): New field emit_ops.
11774 (target_emit_ops): New.
11775 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11776 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11777 * linux-low.c (linux_emit_ops): New.
11778 (linux_target_ops): Install it.
11779 * linux-low.h (struct linux_target_ops): New field emit_ops.
11781 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11783 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11784 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11786 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11787 Stan Shebs <stan@codesourcery.com>
11789 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11790 (all): Depend on $(extra_libraries).
11791 (install-only): Install the IPA.
11792 (IPA_OBJS, IPA_LIB): New.
11793 (clean): Remove the IPA lib.
11794 (IPAGENT_CFLAGS): New.
11795 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11796 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11797 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11798 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11799 * configure.ac: Check for atomic builtins support in the compiler.
11800 (IPA_DEPFILES, extra_libraries): Define.
11801 * configure.srv (ipa_obj): Add description.
11802 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11803 (i[34567]86-*-linux*): Set ipa_obj.
11804 (x86_64-*-linux*): Set ipa_obj.
11805 * linux-low.c (stabilizing_threads): New.
11806 (supports_fast_tracepoints): New.
11807 (linux_detach): Stabilize threads before detaching.
11808 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11809 the lwp is either not stabilizing, or is moving out of a jump pad.
11810 (linux_fast_tracepoint_collecting): New.
11811 (maybe_move_out_of_jump_pad): New.
11812 (enqueue_one_deferred_signal): New.
11813 (dequeue_one_deferred_signal): New.
11814 (linux_wait_for_event_1): If moving out of a jump pad, defer
11815 pending signals to later.
11816 (linux_stabilize_threads): New.
11817 (linux_wait_1): Check if threads need moving out of jump pads, and
11819 (stuck_in_jump_pad_callback): New.
11820 (move_out_of_jump_pad_callback): New.
11821 (lwp_running): New.
11822 (linux_resume_one_lwp): Handle moving out of jump pads.
11823 (linux_set_resume_request): Dequeue deferred signals.
11824 (need_step_over_p): Also step over fast tracepoint jumps.
11825 (start_step_over): Also uninsert fast tracepoint jumps.
11826 (finish_step_over): Also reinsert fast tracepoint jumps.
11827 (linux_install_fast_tracepoint_jump): New.
11828 (linux_target_ops): Install linux_stabilize_threads and
11829 linux_install_fast_tracepoint_jump_pad.
11830 * linux-low.h (linux_target_ops) <get_thread_area,
11831 install_fast_tracepoint_jump_pad>: New fields.
11832 (struct lwp_info) <collecting_fast_tracepoint,
11833 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11834 (linux_get_thread_area): Declare.
11835 * linux-x86-low.c (jump_insn): New.
11836 (x86_get_thread_area): New.
11837 (append_insns): New.
11838 (push_opcode): New.
11839 (amd64_install_fast_tracepoint_jump_pad): New.
11840 (i386_install_fast_tracepoint_jump_pad): New.
11841 (x86_install_fast_tracepoint_jump_pad): New.
11842 (the_low_target): Install x86_get_thread_area and
11843 x86_install_fast_tracepoint_jump_pad.
11844 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11845 (struct fast_tracepoint_jump): New.
11846 (fast_tracepoint_jump_insn): New.
11847 (fast_tracepoint_jump_shadow): New.
11848 (find_fast_tracepoint_jump_at): New.
11849 (fast_tracepoint_jump_here): New.
11850 (delete_fast_tracepoint_jump): New.
11851 (set_fast_tracepoint_jump): New.
11852 (uninsert_fast_tracepoint_jumps_at): New.
11853 (reinsert_fast_tracepoint_jumps_at): New.
11854 (set_breakpoint_at): Use write_inferior_memory.
11855 (uninsert_raw_breakpoint): Use write_inferior_memory.
11856 (check_mem_read): Mask out fast tracepoint jumps.
11857 (check_mem_write): Mask out fast tracepoint jumps.
11858 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11859 (set_fast_tracepoint_jump): Declare.
11860 (delete_fast_tracepoint_jump)
11861 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11862 (reinsert_fast_tracepoint_jumps_at): Declare.
11863 * regcache.c: Don't compile many functions when building the
11864 in-process agent library.
11865 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11866 the register buffer in the heap.
11867 (free_register_cache): If the register buffer isn't owned by the
11868 regcache, don't free it.
11869 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11870 pre-existing register caches.
11871 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11873 (convert_ascii_to_int): : Constify `from' parameter type.
11874 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11875 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11876 the needed buffer in-place.
11877 (relocate_instruction): New.
11878 * server.c (handle_query) <qSymbols>: If the target supports
11879 tracepoints, give it a chance of looking up symbols. Report
11880 support for fast tracepoints.
11881 (handle_status): Stabilize threads.
11882 (process_serial_event): Adjust.
11883 * server.h (struct fast_tracepoint_jump): Forward declare.
11884 (struct process_info) <fast_tracepoint_jumps>: New field.
11885 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11886 (decode_X_packet, decode_M_packet): Adjust.
11887 (relocate_instruction): Declare.
11888 (in_process_agent_loaded): Declare.
11889 (tracepoint_look_up_symbols): Declare.
11890 (struct fast_tpoint_collect_status): Declare.
11891 (fast_tracepoint_collecting): Declare.
11892 (force_unlock_trace_buffer): Declare.
11893 (handle_tracepoint_bkpts): Declare.
11894 (initialize_low_tracepoint)
11895 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11896 * target.h (struct target_ops) <stabilize_threads,
11897 install_fast_tracepoint_jump_pad>: New fields.
11898 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11899 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11900 [HAVE_STDINT_H]: Include stdint.h.
11901 (trace_debug_1): Rename to ...
11902 (trace_vdebug): ... this.
11903 (trace_debug): Rename to ...
11904 (trace_debug_1): ... this. Add `level' parameter.
11905 (trace_debug): New.
11906 (ATTR_USED, ATTR_NOINLINE): New.
11907 (IP_AGENT_EXPORT): New.
11908 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11909 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11910 (about_to_request_buffer_space, trace_buffer_is_full)
11911 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11912 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11913 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11914 (traceframe_write_count, traceframes_created)
11915 (trace_state_variables)
11916 New renaming defines.
11917 (struct ipa_sym_addresses): New.
11918 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11919 (symbol_list): New.
11920 (ipa_sym_addrs): New.
11921 (all_tracepoint_symbols_looked_up): New.
11922 (in_process_agent_loaded): New.
11923 (write_e_ipa_not_loaded): New.
11924 (maybe_write_ipa_not_loaded): New.
11925 (tracepoint_look_up_symbols): New.
11926 (debug_threads) [IN_PROCESS_AGENT]: New.
11927 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11928 (UNKNOWN_SIDE_EFFECTS): New.
11929 (stop_tracing): New.
11930 (flush_trace_buffer): New.
11931 (stop_tracing_bkpt): New.
11932 (flush_trace_buffer_bkpt): New.
11933 (read_inferior_integer): New.
11934 (read_inferior_uinteger): New.
11935 (read_inferior_data_pointer): New.
11936 (write_inferior_data_pointer): New.
11937 (write_inferior_integer): New.
11938 (write_inferior_uinteger): New.
11939 (struct collect_static_trace_data_action): Delete.
11940 (enum tracepoint_type): New.
11941 (struct tracepoint) <type>: New field `type'.
11942 <actions_str, step_actions, step_actions_str>: Only include in
11944 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11945 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11946 (tracepoints): Use IP_AGENT_EXPORT.
11947 (last_tracepoint): Don't include in the IPA.
11948 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11949 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11950 (alloced_trace_state_variables): New.
11951 (trace_state_variables): Use IP_AGENT_EXPORT.
11952 (traceframe_t): Delete unused variable.
11953 (circular_trace_buffer): Don't include in the IPA.
11954 (trace_buffer_start): Delete.
11955 (struct trace_buffer_control): New.
11956 (trace_buffer_free): Delete.
11957 (struct ipa_trace_buffer_control): New.
11958 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11959 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11961 (trace_buffer_ctrl): New.
11962 (TRACE_BUFFER_CTRL_CURR): New.
11963 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11964 Reimplement as macros.
11965 (trace_buffer_wrap): Delete.
11966 (traceframe_write_count, traceframe_read_count)
11967 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11968 (struct tracepoint_hit_ctx) <type>: New field.
11969 (struct fast_tracepoint_ctx): New.
11970 (memory_barrier): New.
11972 (record_tracepoint_error): Update atomically in the IPA.
11973 (clear_inferior_trace_buffer): New.
11974 (about_to_request_buffer_space): New.
11975 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11976 updating the same buffer.
11977 (add_tracepoint): Default the tracepoint's type to trap
11978 tracepoint, and orig_size to -1.
11979 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11980 internal variables.
11981 (create_trace_state_variable): New parameter `gdb'. Handle it.
11982 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11983 (cmd_qtdp): Handle fast tracepoints.
11984 (cmd_qtdv): Adjust.
11985 (max_jump_pad_size): New.
11986 (gdb_jump_pad_head): New.
11987 (get_jump_space_head): New.
11988 (claim_jump_space): New.
11989 (sort_tracepoints): New.
11990 (MAX_JUMP_SIZE): New.
11991 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11993 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11994 support. Upload fast traceframes, and delete internal IPA
11996 (stop_tracing_handler): New.
11997 (flush_trace_buffer_handler): New.
11998 (cmd_qtstop): Upload fast tracepoints.
11999 (response_tracepoint): Handle fast tracepoints.
12000 (tracepoint_finished_step): Upload fast traceframes. Set the
12001 tracepoint hit context's tracepoint type.
12002 (handle_tracepoint_bkpts): New.
12003 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12004 type. Add comment about fast tracepoints.
12005 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12006 non-existing action_str field.
12007 (get_context_regcache): Handle fast tracepoints.
12008 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12010 (fast_tracepoint_from_jump_pad_address): New.
12011 (fast_tracepoint_from_ipa_tpoint_address): New.
12012 (collecting_t): New.
12013 (force_unlock_trace_buffer): New.
12014 (fast_tracepoint_collecting): New.
12016 (gdb_collect): New.
12017 (write_inferior_data_ptr): New.
12018 (target_tp_heap): New.
12019 (target_malloc): New.
12020 (download_agent_expr): New.
12022 (download_tracepoints): New.
12023 (download_trace_state_variables): New.
12024 (upload_fast_traceframes): New.
12025 (IPA_FIRST_TRACEFRAME): New.
12026 (IPA_NEXT_TRACEFRAME_1): New.
12027 (IPA_NEXT_TRACEFRAME): New.
12028 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12029 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12030 (gdb_jump_pad_buffer_end): New.
12031 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12032 (initialize_tracepoint): Adjust.
12033 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12034 buffer. Initialize the low module.
12035 * utils.c (PREFIX, TOOLNAME): New.
12036 (malloc_failure): Use PREFIX.
12037 (error): In the IPA, an error causes an exit.
12038 (fatal, warning): Use PREFIX.
12039 (internal_error): Use TOOLNAME.
12040 (NUMCELLS): Increase to 10.
12041 * configure, config.in: Regenerate.
12043 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12045 * server.c (handle_query) <qSupported>: Do two passes over the
12046 qSupported string to avoid nesting strtok.
12048 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12050 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12052 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12053 -Wl,--dynamic-list.
12054 * configure: Regenerate.
12055 * proc-service.list: New.
12057 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12059 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12062 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12064 * gdbreplay.c (remote_open): Check error return from socket() call by
12065 its equality to -1 not by it being negative.
12066 * remote-utils.c (remote_open): Likewise.
12068 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12070 * config.h: Regenerate.
12072 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12074 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12075 doesn't provide PTRACE_GET_THREAD_AREA.
12077 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12079 * linux-m68k-low.c: Include <asm/ptrace.h>
12080 (ps_get_thread_area): Implement.
12082 2010-05-03 Doug Evans <dje@google.com>
12084 * event-loop.c (struct callback_event): New struct.
12085 (callback_list): New global.
12086 (append_callback_event, delete_callback_event): New functions.
12087 (process_callback): New function.
12088 (start_event_loop): Call it.
12089 * remote-utils.c (NOT_SCHEDULED): Define.
12090 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12091 moved out of readchar.
12092 (readchar): Rewrite. Call reschedule before returning.
12093 (reset_readchar): New function.
12094 (remote_close): Call it.
12095 (process_remaining, reschedule): New functions.
12096 * server.h (callback_handler_func): New typedef.
12097 (append_callback_event, delete_callback_event): Declare.
12099 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12101 * proc-service.c (ps_pglobal_lookup): Use
12102 thread_db_look_up_one_symbol.
12103 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12104 parameter. Use it instead of all_symbols_looked_up.
12105 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12107 (all_symbols_looked_up): Don't declare.
12108 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12109 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12111 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12112 Set all_symbols_looked_up here.
12113 (thread_db_look_up_one_symbol): New.
12114 (thread_db_get_tls_address): Adjust.
12115 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12116 thread_db object on the heap, and tentatively set it in the
12118 (thread_db_init): Don't set all_symbols_looked_up here.
12119 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12121 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12123 * linux-low.c (linux_kill, linux_detach): Adjust.
12124 (status_pending_p_callback): Remove redundant statement. Check
12125 for !TARGET_WAITIKIND_IGNORE, instead of
12126 TARGET_WAITKIND_STOPPED.
12127 (handle_tracepoints): Make sure LWP is locked. Adjust.
12128 (linux_wait_for_event_1): Adjust.
12129 (linux_cancel_breakpoints): New.
12130 (unsuspend_one_lwp): New.
12131 (unsuspend_all_lwps): New.
12132 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12133 (send_sigstop_callback): Change return type to int, add new
12134 `except' parameter and handle it.
12135 (suspend_and_send_sigstop_callback): New.
12136 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12137 pass them down. If SUSPEND, also increment the lwp's suspend
12139 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12140 (need_step_over_p): Don't consider suspended LWPs.
12141 (start_step_over): Adjust.
12142 (proceed_one_lwp): Change return type to int, add new `except'
12143 parameter and handle it.
12144 (unsuspend_and_proceed_one_lwp): New.
12145 (proceed_all_lwps): Use find_inferior instead of
12147 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12148 also decrement the suspend count of LWPs. Pass `except' down,
12149 instead of hacking its suspend count.
12150 (linux_pause_all): Add `freeze' parameter. Adjust.
12151 (linux_unpause_all): New.
12152 (linux_target_ops): Install linux_unpause_all.
12153 * server.c (handle_status): Adjust.
12154 * target.h (struct target_ops): New fields `unpause_all' and
12155 `cancel_breakpoints'. Add new parameter to `pause_all'.
12156 (pause_all): Add new `freeze' parameter.
12157 (unpause_all): New.
12158 (cancel_breakpoints): New.
12159 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12160 cancel breakpoints.
12161 (cmd_qtstart): Pause threads.
12162 (stop_tracing): Pause threads, and cancel breakpoints.
12163 * win32-low.c (win32_target_ops): Adjust.
12165 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12167 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12168 the inferior right away from here...
12169 (linux_wait_1): ... to here, and adjust to check the thread's
12170 last_resume_kind instead of the lwp's step or stop_expected flags.
12172 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12174 * README: Use consistent `GDB' and `GDBserver' spellings.
12176 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12178 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12179 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12180 (linux_detach_one_lwp): Assume the lwp is stopped.
12181 (any_thread_of): Delete.
12182 (linux_detach): Stop all lwps here. Don't blindly delete all
12184 (delete_lwp_callback): New.
12185 (linux_mourn): Delete all lwps of the process that is gone.
12186 (linux_wait_1): Don't delete the last lwp of the process here.
12187 * mem-break.h (mark_breakpoints_out): Declare.
12188 * mem-break.c (mark_breakpoints_out): New.
12189 (free_all_breakpoints): Use it.
12190 * server.c (handle_target_event): If the process is gone, mark
12192 * thread-db.c (struct thread_db) <create_bp>: New field.
12193 (thread_db_enable_reporting): Fix prototype. Store a thread event
12194 breakpoint reference in the thread_db struct.
12195 (thread_db_load_search): Clear the thread_db object.
12196 (try_thread_db_load_1): Ditto.
12197 (switch_to_process): New.
12198 (disable_thread_event_reporting): Use it.
12199 (remove_thread_event_breakpoints): New.
12200 (thread_db_detach, thread_db_mourn): Use it.
12202 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12204 * linux-low.c (linux_enable_event_reporting): New.
12205 (linux_wait_for_event_1, handle_extended_wait): Use it.
12207 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12209 * linux-low.c (linux_kill_one_lwp, linux_kill)
12210 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12211 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12212 SIGSTOP even if the LWP is stopped.
12213 (send_sigstop_callback): New.
12214 (stop_all_lwps): Use send_sigstop_callback instead.
12215 (linux_resume_one_thread): Adjust.
12216 (proceed_one_lwp): Still proceed an LWP that the client has
12217 requested to stop, if we haven't reported it as stopped yet. Make
12218 sure that LWPs the client want stopped, have a pending SIGSTOP.
12220 2010-04-26 Doug Evans <dje@google.com>
12222 * server.c (handle_general_set): Make static.
12224 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12225 Print received char after testing for error/eof instead of before.
12226 (input_interrupt): Tweak comment.
12228 2010-04-23 Doug Evans <dje@google.com>
12230 * server.c (start_inferior): Print inferior argv if --debug.
12232 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12234 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12235 * nto-x86-low.c: Include server.h
12237 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12239 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12240 be consistent with other sources of this directory.
12241 (init_registers_amd64): Correct name of source file of this function
12244 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12246 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12247 64-bit executables.
12249 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12251 * win32-i386-low.c: Add 64-bit support.
12252 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12253 (init_registers_amd64): Declare.
12254 (mappings): Add 64-bit version of array.
12255 (init_windows_x86): New function.
12256 (the_low_target): Change init_arch field to init_windows_x86.
12258 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12260 * win32-low.c: Adapt to support also 64-bit architecture.
12261 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12262 (get_image_name): Use SIZE_T type for local variable `done'.
12263 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12264 (toolhelp_get_dll_name): Idem.
12265 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12266 Use uintptr_t typecast to avoid warning.
12267 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12268 (handle_exception): Use phex_nz to avoid warning.
12269 (win32_wait): Remove unused local variable `process'.
12271 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12273 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12276 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12278 * configure.ac: Use `ws2_32' library for srv_mingw.
12279 * configure: Regenerate.
12280 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12281 * remote-utils.c: Likewise.
12283 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12285 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12286 if __x86_64__ is defined.
12288 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12290 * configure: Regenerate.
12292 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12294 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12295 * target.h (target_ops): New get_tib_address field.
12296 * win32-low.h (win32_thread_info): Add thread_local_base field.
12297 * win32-low.c (child_add_thread): Add tlb argument.
12298 Set thread_local_base field to TLB.
12299 (get_child_debug_event): Adapt to child_add_thread change.
12300 (win32_get_tib_address): New function.
12301 (win32_target_ops): Set get_tib_address field to
12302 win32_get_tib_address.
12303 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12305 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12307 * linux-low.c (linux_mourn): Also remove the process.
12308 * server.c (handle_target_event): Don't remove the process here.
12309 * nto-low.c (nto_mourn): New.
12310 (nto_target_ops): Install it.
12311 * spu-low.c (spu_mourn): New.
12312 (spu_target_ops): Install it.
12313 * win32-low.c (win32_mourn): New.
12314 (win32_target_ops): Install it.
12316 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12318 * server.h (buffer_xml_printf): Remove redundant `;'.
12320 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12322 * regcache.c (set_register_cache): Invalidate regcaches before
12323 changing the register cache layout.
12324 (regcache_invalidate_one): Allow a NULL regcache.
12325 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12326 regcaches before changing the register cache layout or the target
12329 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12331 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12332 variable warning on Linux/x86-64.
12334 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12336 GDBserver disconnected tracing support.
12338 * linux-low.c (linux_remove_process): Delete.
12339 (add_lwp): Don't set last_resume_kind here.
12340 (linux_kill): Use `mourn'.
12341 (linux_detach): Use `thread_db_detach', and `mourn'.
12342 (linux_mourn): New.
12343 (linux_attach_lwp_1): Adjust comment.
12344 (linux_attach): last_resume_kind moved the thread_info; adjust.
12345 (status_pending_p_callback): Adjust.
12346 (linux_wait_for_event_1): Adjust.
12347 (count_events_callback, select_singlestep_lwp_callback)
12348 (select_event_lwp_callback, cancel_breakpoints_callback)
12349 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12350 (proceed_one_lwp): Adjust.
12351 (linux_async): Add debug output.
12352 (linux_thread_stopped): New.
12353 (linux_pause_all): New.
12354 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12356 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12357 (thread_db_free): Delete declaration.
12358 (thread_db_detach, thread_db_mourn): Declare.
12359 * thread-db.c (thread_db_init): Use thread_db_mourn.
12360 (thread_db_free): Delete, split in two.
12361 (disable_thread_event_reporting): New.
12362 (thread_db_detach): New.
12363 (thread_db_mourn): New.
12365 * server.h (struct thread_info) <last_resume_kind>: New field.
12366 <attached>: Add comment.
12367 <gdb_detached>: New field.
12368 (handler_func): Change return type to int.
12369 (handle_serial_event, handle_target_event): Ditto.
12370 (gdb_connected): Declare.
12372 (disconnected_tracing): Declare.
12373 (stop_tracing): Declare.
12375 * server.c (handle_query) <qSupported>: Report support for
12376 disconnected tracing.
12377 (queue_stop_reply_callback): Account for running threads.
12378 (gdb_wants_thread_stopped): New.
12379 (gdb_wants_all_threads_stopped): New.
12380 (gdb_reattached_process): New.
12381 (handle_status): Clear the `gdb_detached' flag of all processes.
12382 In all-stop, stop all threads.
12383 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12384 (process_serial_event): If the remote connection breaks, or if an
12385 exit was forced with "monitor exit", force an event loop exit.
12386 Handle disconnected tracing on detach.
12387 (handle_serial_event): Adjust.
12388 (handle_target_event): If GDB isn't connected, forward events back
12389 to the inferior, unless the last process exited, in which case,
12390 exit gdbserver. Adjust interface.
12392 * remote-utils.c (remote_open): Don't block in accept. Instead
12393 register an event loop source on the listen socket file
12394 descriptor. Refactor bits into ...
12395 (listen_desc): ... this new global.
12396 (gdb_connected): ... this new function.
12397 (enable_async_notification): ... this new function.
12398 (handle_accept_event): ... this new function.
12399 (remote_close): Clear remote_desc.
12401 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12403 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12405 (mourn_inferior): Define.
12406 (target_process_qsupported): Avoid the dangling else problem.
12407 (thread_stopped): Define.
12408 (pause_all): Define.
12409 (target_waitstatus_to_string): Declare.
12410 * target.c (target_waitstatus_to_string): New.
12412 * tracepoint.c (tracing): Make extern.
12413 (disconnected_tracing): New.
12414 (stop_tracing): Make extern. Handle tracing stops due to GDB
12416 (cmd_qtdisconnected): New.
12417 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12418 (handle_tracepoint_general_set): Handle QTDisconnected.
12420 * event-loop.c (event_handler_func): Change return type to int.
12421 (process_event): Bail out if the event handler wants the event
12423 (handle_file_event): Ditto.
12424 (start_event_loop): Bail out if the event handler wants the event
12427 * nto-low.c (nto_target_ops): Adjust.
12428 * spu-low.c (spu_wait): Don't remove the process here.
12429 (spu_target_ops): Adjust.
12430 * win32-low.c (win32_wait): Don't remove the process here.
12431 (win32_target_ops): Adjust.
12433 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12435 * regcache.c (realloc_register_cache): Invalidate inferior's
12436 regcache before recreating it.
12438 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12440 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12442 2010-04-09 Stan Shebs <stan@codesourcery.com>
12443 Pedro Alves <pedro@codesourcery.com>
12445 * server.h (LONGEST): New.
12446 (struct thread_info) <while_stepping>: New field.
12447 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12449 (initialize_tracepoint, handle_tracepoint_general_set)
12450 (handle_tracepoint_query, tracepoint_finished_step)
12451 (tracepoint_was_hit, release_while_stepping_state_list):
12452 (current_traceframe): Declare.
12453 * server.c (handle_general_set): Handle tracepoint packets.
12454 (read_memory): New.
12455 (write_memory): New.
12456 (handle_search_memory_1): Use read_memory.
12457 (handle_query): Report support for conditional tracepoints, trace
12458 state variables, and tracepoint sources. Handle tracepoint
12460 (main): Initialize the tracepoints module.
12461 (process_serial_event): Handle traceframe reads/writes.
12463 * linux-low.c (handle_tracepoints): New.
12464 (linux_wait_1): Call it.
12465 (linux_resume_one_lwp): Handle while-stepping.
12466 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12467 (linux_target_ops): Install them.
12468 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12470 * linux-x86-low.c (x86_supports_tracepoints): New.
12471 (the_low_target). Install it.
12473 * mem-break.h (delete_breakpoint): Declare.
12474 * mem-break.c (delete_breakpoint): Make external.
12476 * target.h (struct target_ops): Add `supports_tracepoints',
12477 `read_pc', and `write_pc' fields.
12478 (target_supports_tracepoints): Define.
12479 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12482 * regcache.h (struct regcache) <registers_owned>: New field.
12483 (init_register_cache, regcache_cpy): Declare.
12484 (regcache_read_pc, regcache_write_pc): Declare.
12485 (register_cache_size): Declare.
12486 (supply_regblock): Declare.
12487 * regcache.c (init_register_cache): New.
12488 (new_register_cache): Use it.
12489 (regcache_cpy): New.
12490 (register_cache_size): New.
12491 (supply_regblock): New.
12492 (regcache_read_pc, regcache_write_pc): New.
12494 * tracepoint.c: New.
12496 * Makefile.in (OBS): Add tracepoint.o.
12497 (tracepoint.o): New rule.
12499 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12501 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12503 (i386-mmx.c): Likewise.
12504 (i386-mmx-linux.o): Likewise.
12505 (i386-mmx-linux.c): Likewise.
12507 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12508 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12509 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12510 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12512 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12513 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12514 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12516 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12518 * Makefile.in (clean): Updated.
12520 (i386-avx.c): Likewise.
12521 (i386-avx-linux.o): Likewise.
12522 (i386-avx-linux.c): Likewise.
12523 (amd64-avx.o): Likewise.
12524 (amd64-avx.c): Likewise.
12525 (amd64-avx-linux.o): Likewise.
12526 (amd64-avx-linux.c): Likewise.
12528 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12529 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12530 (srv_amd64_regobj): Add amd64-avx.o.
12531 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12532 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12533 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12534 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12535 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12536 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12537 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12539 * i387-fp.c: Include "i386-xstate.h".
12541 (i387_cache_to_xsave): Likewise.
12542 (i387_xsave_to_cache): Likewise.
12543 (x86_xcr0): Likewise.
12545 * i387-fp.h (i387_cache_to_xsave): Likewise.
12546 (i387_xsave_to_cache): Likewise.
12547 (x86_xcr0): Likewise.
12549 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12550 * linux-crisv32-low.c (target_regsets): Likewise.
12551 * linux-m68k-low.c (target_regsets): Likewise.
12552 * linux-mips-low.c (target_regsets): Likewise.
12553 * linux-ppc-low.c (target_regsets): Likewise.
12554 * linux-s390-low.c (target_regsets): Likewise.
12555 * linux-sh-low.c (target_regsets): Likewise.
12556 * linux-sparc-low.c (target_regsets): Likewise.
12557 * linux-xtensa-low.c (target_regsets): Likewise.
12559 * linux-low.c: Include <sys/uio.h>.
12560 (regsets_fetch_inferior_registers): Support nt_type.
12561 (regsets_store_inferior_registers): Likewise.
12562 (linux_process_qsupported): New.
12563 (linux_target_ops): Add linux_process_qsupported.
12565 * linux-low.h (regset_info): Add nt_type.
12566 (linux_target_ops): Add process_qsupported.
12568 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12570 (init_registers_i386_avx_linux): New.
12571 (init_registers_amd64_avx_linux): Likewise.
12572 (xmltarget_i386_linux_no_xml): Likewise.
12573 (xmltarget_amd64_linux_no_xml): Likewise.
12574 (PTRACE_GETREGSET): Likewise.
12575 (PTRACE_SETREGSET): Likewise.
12576 (x86_fill_xstateregset): Likewise.
12577 (x86_store_xstateregset): Likewise.
12578 (use_xml): Likewise.
12579 (x86_linux_update_xmltarget): Likewise.
12580 (x86_linux_process_qsupported): Likewise.
12581 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12582 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12583 init_registers_i386_linux here. Call
12584 x86_linux_update_xmltarget.
12585 (the_low_target): Add x86_linux_process_qsupported.
12587 * server.c (handle_query): Call target_process_qsupported.
12589 * target.h (target_ops): Add process_qsupported.
12590 (target_process_qsupported): New.
12592 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12594 * inferiors.c (add_thread): Set last_status kind to
12595 TARGET_WAITKIND_IGNORE.
12596 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12597 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12598 (linux_wait_1): Move `thread' local definition to block that uses
12599 it. Don't NULL initialize `event_child'.
12600 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12601 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12602 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12604 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12606 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12607 an extended waitstatus, or by a watchpoint.
12608 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12609 thread was stepping or has been stopped by a watchpoint.
12611 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12613 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12614 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12615 of another, then delete the previous, and validate all
12617 (validate_inserted_breakpoint): New.
12618 (delete_disabled_breakpoints): New.
12619 (validate_breakpoints): New.
12620 (check_mem_read): Validate breakpoints before trusting their
12621 shadow. Delete disabled breakpoints.
12622 (check_mem_write): Validate breakpoints before trusting they
12623 should be inserted. Delete disabled breakpoints.
12624 * mem-break.h (validate_breakpoints):
12625 * server.c (handle_query): Validate breakpoints when we see a
12628 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12630 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12631 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12632 if we could tell there's a GDB breakpoint at stop_pc.
12633 (need_step_over_p): Don't do a step over if we find a GDB
12634 breakpoint at the resume PC.
12636 * mem-break.c (struct raw_breakpoint): New.
12637 (enum bkpt_type): New type `gdb_breakpoint'.
12638 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12639 fields. New field `raw'.
12640 (find_raw_breakpoint_at): New.
12641 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12642 breakpoint instead.
12643 (set_breakpoint_at): Adjust.
12644 (delete_raw_breakpoint): New.
12645 (release_breakpoint): New.
12646 (delete_breakpoint): Rename to...
12647 (delete_breakpoint_1): ... this. Add proc parameter. Use
12648 release_breakpoint. Return ENOENT.
12649 (delete_breakpoint): Reimplement.
12650 (find_breakpoint_at): Delete.
12651 (find_gdb_breakpoint_at): New.
12652 (delete_breakpoint_at): Delete.
12653 (set_gdb_breakpoint_at): New.
12654 (delete_gdb_breakpoint_at): New.
12655 (gdb_breakpoint_here): New.
12656 (set_reinsert_breakpoint): Use release_breakpoint.
12657 (uninsert_breakpoint): Rename to ...
12658 (uninsert_raw_breakpoint): ... this.
12659 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12660 (reinsert_raw_breakpoint): Change parameter type to
12662 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12664 (check_breakpoints): Adjust. Use release_breakpoint.
12665 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12666 (breakpoint_inserted_here): Ditto.
12667 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12668 Don't trust the breakpoint's shadow if it is not inserted.
12669 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12670 (delete_all_breakpoints): Adjust.
12671 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12672 use delete_breakpoint_1.
12674 * mem-break.h (breakpoints_supported): Delete declaration.
12675 (set_gdb_breakpoint_at): Declare.
12676 (gdb_breakpoint_here): Declare.
12677 (delete_breakpoint_at): Delete.
12678 (delete_gdb_breakpoint_at): Declare.
12680 * server.h (struct raw_breakpoint): Forward declare.
12681 (struct process_info): New field `raw_breakpoints'.
12683 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12686 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12688 * linux-low.c (status_pending_p_callback): Fix comment.
12689 (linux_wait_for_event_1): Move most of the internal breakpoint
12690 handling from here...
12691 (linux_wait_1): ... to here.
12692 (count_events_callback): New.
12693 (select_singlestep_lwp_callback): New.
12694 (select_event_lwp_callback): New.
12695 (cancel_breakpoints_callback): New.
12696 (select_event_lwp): New.
12697 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12698 priority to all LWPs that have had events that should be reported
12699 to the client. Cancel breakpoints when about to reporting the
12700 event to the client, not while stopping lwps. No longer cancel
12701 finished single-steps here.
12702 (cancel_finished_single_step): Delete.
12703 (cancel_finished_single_steps): Delete.
12705 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12707 * mem-break.c (enum bkpt_type): New.
12708 (struct breakpoint): New field `type'.
12709 (set_breakpoint_at): Change return type to struct breakpoint
12710 pointer. Set type to `other_breakpoint' by default.
12711 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12712 in the breakpoint list.
12713 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12714 (reinsert_breakpoint): Rename to ...
12715 (reinsert_raw_breakpoint): ... this.
12716 (reinsert_breakpoints_at): Adjust.
12717 * mem-break.h (struct breakpoint): Declare.
12718 (set_breakpoint_at): Change return type to struct breakpoint
12721 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12723 * server.c (handle_query): Assign, not compare.
12725 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12727 Teach linux gdbserver to step-over-breakpoints.
12729 * linux-low.c (can_hardware_single_step): New.
12730 (supports_breakpoints): New.
12731 (handle_extended_wait): If stopping threads, read the stop pc of
12732 the new cloned LWP.
12734 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12735 low target doesn't support retrieving the PC.
12736 (add_lwp): Set last_resume_kind to resume_continue.
12737 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12738 (linux_attach): Don't clear stop_expected. Set the lwp's
12739 last_resume_kind to resume_stop.
12740 (linux_detach_one_lwp): Don't check for removed breakpoints.
12741 (check_removed_breakpoint): Delete.
12742 (status_pending_p): Rename to ...
12743 (status_pending_p_callback): ... this. Don't check for removed
12744 breakpoints. Don't consider threads that are stopped from GDB's
12746 (linux_wait_for_lwp): Always read the stop_pc here.
12747 (cancel_breakpoint): New.
12748 (step_over_bkpt): New global.
12749 (linux_wait_for_event_1): Implement stepping over breakpoints.
12750 (gdb_wants_lwp_stopped): New.
12751 (gdb_wants_all_stopped): New.
12752 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12753 single-step traps here. Store the thread's last reported target
12755 (send_sigstop): Don't clear stop_expected. Always set it,
12757 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12758 (cancel_finished_single_step): New.
12759 (cancel_finished_single_steps): New.
12760 (wait_for_sigstop): Don't cancel finished single-step traps here.
12761 (linux_resume_one_lwp): Don't check for removed breakpoints.
12762 Don't set `step' on non-hardware step archs.
12763 (linux_set_resume_request): Ignore resume_stop requests if already
12764 stopping or stopped. Set the lwp's last_resume_kind.
12765 (resume_status_pending_p): Don't check for removed breakpoints.
12766 (need_step_over_p): New.
12767 (start_step_over): New.
12768 (finish_step_over): New.
12769 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12770 requests. Clear the thread's last reported target waitstatus.
12771 Don't use the `suspended' flag. Don't consider pending breakpoints.
12772 (linux_resume): Start a step-over if necessary.
12773 (proceed_one_lwp): New.
12774 (proceed_all_lwps): New.
12775 (unstop_all_lwps): New.
12776 * linux-low.h (struct lwp_info): Rewrite comment for the
12777 `suspended' flag. Add the `stop_pc' field. Delete the
12778 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12779 Add `'last_resume_kind' and `need_step_over' fields.
12780 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12781 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12782 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12783 (set_raw_breakpoint_at): New.
12784 (set_breakpoint_at): Rewrite to use it.
12785 (reinsert_breakpoint_handler): Delete.
12786 (set_reinsert_breakpoint): New.
12787 (reinsert_breakpoint_by_bp): Delete.
12788 (delete_reinsert_breakpoints): New.
12789 (uninsert_breakpoint): Rewrite.
12790 (uninsert_breakpoints_at): New.
12791 (reinsert_breakpoint): Rewrite.
12792 (reinsert_breakpoints_at): New.
12793 (check_breakpoints): Rewrite.
12794 (breakpoint_here): New.
12795 (breakpoint_inserted_here): New.
12796 (check_mem_read): Adjust.
12797 * mem-break.h (breakpoints_supported, breakpoint_here)
12798 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12799 (reinsert_breakpoint_by_bp): Delete declaration.
12800 (delete_reinsert_breakpoints): Declare.
12801 (reinsert_breakpoint): Delete declaration.
12802 (reinsert_breakpoints_at): Declare.
12803 (uninsert_breakpoint): Delete declaration.
12804 (uninsert_breakpoints_at): Declare.
12805 (check_breakpoints): Adjust prototype.
12806 * server.h: Adjust include order.
12807 (struct thread_info): Declare here. Add a `last_status' field.
12809 2010-03-23 Michael Snyder <msnyder@vmware.com>
12811 * server.c (crc32): New function.
12812 (handle_query): Add handling for 'qCRC:' request.
12814 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12816 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12817 lwp had been stopped by a watchpoint.
12819 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12821 * server.h (internal_error): Declare.
12822 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12823 * utils.c (internal_error): New function.
12825 2010-03-15 Andreas Schwab <schwab@redhat.com>
12827 * configure.srv: Fix typo setting srv_regobj.
12829 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12831 * linux-low.c (fetch_register): Avoid passing a non string literal
12833 (usr_store_inferior_registers): Ditto.
12835 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12837 * linux-low.c (linux_write_memory): Bail out early if peeking
12840 2010-03-14 Pedro Alves <pedro@codesourcery.com>
12842 * linux-low.h (struct lwp_info): New fields
12843 `stopped_by_watchpoint' and `stopped_data_address'.
12844 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12845 here, and cache them in the lwp object.
12846 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12848 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12850 (linux_stopped_by_watchpoint): Rewrite.
12851 (linux_stopped_data_address): Rewrite.
12853 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
12855 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12856 switching the current inferior, not before.
12858 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12860 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12861 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12862 i386-linux.c and amd64-linux.c.
12863 (reg-i386.o): Removed.
12864 (reg-i386.c): Likewise.
12865 (reg-i386-linux.o): Likewise.
12866 (reg-i386-linux.c): Likewise.
12867 (reg-x86-64.o): Likewise.
12868 (reg-x86-64.c): Likewise.
12869 (reg-x86-64-linux.o): Likewise.
12870 (reg-x86-64-linux.c): Likewise.
12872 (i386.c): Likewise.
12873 (i386-linux.o): Likewise.
12874 (i386-linux.c): Likewise.
12875 (amd64.o): Likewise.
12876 (amd64.c): Likewise.
12877 (amd64-linux.o): Likewise.
12878 (amd64-linux.c): Likewise.
12880 * configure.srv (srv_i386_regobj): New.
12881 (srv_i386_linux_regobj): Likewise.
12882 (srv_amd64_regobj): Likewise.
12883 (srv_amd64_linux_regobj): Likewise.
12884 (srv_i386_32bit_xmlfiles): Likewise.
12885 (srv_i386_64bit_xmlfiles): Likewise.
12886 (srv_i386_xmlfiles): Likewise.
12887 (srv_amd64_xmlfiles): Likewise.
12888 (srv_i386_linux_xmlfiles): Likewise.
12889 (srv_amd64_linux_xmlfiles): Likewise.
12890 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12891 srv_xmlfiles to $srv_i386_xmlfiles.
12892 (i[34567]86-*-mingw32ce*): Likewise.
12893 (i[34567]86-*-mingw*): Likewise.
12894 (i[34567]86-*-nto*): Likewise.
12895 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12896 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12897 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12898 (x86_64-*-linux*): Likewise.
12900 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12901 (init_registers_amd64_linux): New.
12902 (x86_arch_setup): Replace init_registers_x86_64_linux with
12903 init_registers_amd64_linux.
12905 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12907 * configure.ac: Check for libdl. If it is not available link against
12908 static libthread_db.
12909 * configure: Regenerate.
12911 2010-02-22 Pedro Alves <pedro@codesourcery.com>
12915 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12916 handing a read watchpoint.
12917 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12919 2010-02-12 Doug Evans <dje@google.com>
12921 * linux-low.c (linux_supports_tracefork_flag): Document.
12922 (linux_look_up_symbols): Add comment.
12924 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12926 * regcache.c (supply_register): Clear regcache if buf is NULL.
12928 2010-02-02 Nicolas Roche <roche@sourceware.org>
12929 Joel Brobecker <brobecker@adacore.com>
12931 * inferiors.c (find_inferior): Add function documentation.
12932 (unloaded_dll): Handle the case where the unloaded dll has not
12933 been previously registered in the dll list.
12935 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12937 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12938 (thumb2_breakpoint): New.
12939 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12941 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12943 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12944 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12947 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12949 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12951 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12953 * linux-s390-low.c (s390_collect_ptrace_register)
12954 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12956 2010-01-21 Doug Evans <dje@google.com>
12958 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12959 (PTRACE_ARG4_TYPE): New macro.
12960 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12961 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12962 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12963 (usr_store_inferior_registers): Ditto.
12964 (linux_read_memory, linux_write_memory): Ditto.
12965 (linux_test_for_tracefork): Ditto.
12967 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12968 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12970 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12972 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12975 2010-01-21 Pedro Alves <pedro@codesourcery.com>
12977 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12978 prototype to take a regcache. Adjust.
12980 2010-01-20 Pedro Alves <pedro@codesourcery.com>
12982 * regcache.h (struct thread_info): Forward declare.
12983 (struct regcache): New.
12984 (new_register_cache): Adjust prototype.
12985 (get_thread_regcache): Declare.
12986 (free_register_cache): Adjust prototype.
12987 (registers_to_string, registers_from_string): Ditto.
12988 (supply_register, supply_register_by_name, collect_register)
12989 (collect_register_as_string, collect_register_by_name): Ditto.
12990 * regcache.c (struct inferior_regcache_data): Delete.
12991 (get_regcache): Rename to ...
12992 (get_thread_regcache): ... this. Adjust. Switch inferior before
12993 fetching registers.
12994 (regcache_invalidate_one): Adjust.
12995 (regcache_invalidate): Fix prototype.
12996 (new_register_cache): Return the new register cache.
12997 (free_register_cache): Change prototype.
12998 (realloc_register_cache): Adjust.
12999 (registers_to_string): Change prototype to take a regcache. Adjust.
13000 (registers_from_string): Ditto.
13001 (register_data): Ditto.
13002 (supply_register): Ditto.
13003 (supply_register_by_name): Ditto.
13004 (collect_register): Ditto.
13005 (collect_register_as_string): Ditto.
13006 (collect_register_by_name): Ditto.
13007 * server.c (process_serial_event): Adjust.
13008 * linux-low.h (regset_fill_func, regset_store_func): Change
13010 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13012 * linux-low.c (get_stop_pc): Adjust.
13013 (check_removed_breakpoint): Adjust.
13014 (linux_wait_for_event): Adjust.
13015 (linux_resume_one_lwp): Adjust.
13016 (fetch_register): Add regcache parameter. Adjust.
13017 (usr_store_inferior_registers): Ditto.
13018 (regsets_fetch_inferior_registers): Ditto.
13019 (regsets_store_inferior_registers): Ditto.
13020 (linux_fetch_registers, linux_store_registers): Ditto.
13021 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13023 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13025 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13026 prototype to take a regcache.
13027 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13028 * remote-utils.c (convert_ascii_to_int, outreg)
13029 (prepare_resume_reply): Change prototype to take a regcache.
13031 * target.h (struct target_ops) <fetch_registers, store_registers>:
13032 Change prototype to take a regcache.
13033 (fetch_inferior_registers, store_inferior_registers): Change
13034 prototype to take a regcache. Adjust.
13035 * proc-service.c (ps_lgetregs): Adjust.
13036 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13037 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13038 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13039 take a regcache. Adjust.
13040 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13041 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13042 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13043 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13044 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13045 (cris_cannot_fetch_register):
13046 (cris_breakpoint_at): Change prototype to take a regcache.
13048 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13049 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13050 to take a regcache. Adjust.
13051 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13053 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13054 take a regcache. Adjust.
13055 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13056 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13057 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13058 * linux-mips-low.c (mips_get_pc):
13059 (mips_set_pc): Change prototype to take a regcache. Adjust.
13060 (mips_reinsert_addr): Adjust.
13061 (mips_collect_register): Change prototype to take a regcache.
13063 (mips_supply_register):
13064 (mips_collect_register_32bit, mips_supply_register_32bit)
13065 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13066 (mips_store_fpregset): Ditto.
13067 * linux-ppc-low.c (ppc_supply_ptrace_register)
13068 (ppc_supply_ptrace_register): Ditto.
13069 (parse_spufs_run): Adjust.
13070 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13071 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13072 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13073 take a regcache. Adjust.
13074 * linux-s390-low.c (s390_collect_ptrace_register)
13075 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13076 (s390_set_pc): Change prototype to take a regcache. Adjust.
13077 (s390_arch_setup): Adjust.
13078 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13079 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13080 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13081 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13082 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13084 (sparc_breakpoint_at): Adjust.
13085 * linux-xtensa-low.c (xtensa_fill_gregset):
13086 (xtensa_store_gregset):
13087 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13088 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13089 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13090 prototype to take a regcache. Adjust.
13091 * win32-arm-low.c (arm_fetch_inferior_register)
13092 (arm_store_inferior_register): Change prototype to take a
13094 * win32-i386-low.c (i386_fetch_inferior_register)
13095 (i386_store_inferior_register): Change prototype to take a
13097 * win32-low.c (child_fetch_inferior_registers)
13098 (child_store_inferior_registers): Change prototype to take a
13100 (win32_wait): Adjust.
13101 (win32_fetch_inferior_registers): Change prototype to take a
13103 (win32_store_inferior_registers): Adjust.
13104 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13105 store_inferior_register>: Change prototype to take a regcache.
13107 2010-01-20 Doug Evans <dje@google.com>
13109 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13111 (linux_wait_for_event1, linux_init_signals): Ditto.
13112 (W_STOPCODE): Provide definition if missing.
13114 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13116 * linux-low.c (linux_core_of_thread): New.
13117 (compare_ints, show_process, list_threads): New.
13118 (linux_qxfer_osdata): Report threads and cores.
13119 (linux_target_op): Register linux_core_of_thread.
13120 * remote-utils.c (prepare_resume_reply): Report the core.
13121 (buffer_xml_printf): Support %d specifier.
13122 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13124 (handle_query): Handle qXfer:threads. Announce availability
13126 * target.h (struct target_ops): New field core_of_thread.
13128 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13130 * Makefile.in (clean): Remove new generated files.
13131 (reg-s390.o, reg-s390.c): Remove rules.
13132 (reg-s390x.o, reg-s390x.c): Likewise.
13133 (s390-linux32.o, s390-linux32.c): Add rules.
13134 (s390-linux64.o, s390-linux64.c): Likewise.
13135 (s390x-linux64.o, s390x-linux64.c): Likewise.
13136 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13137 * linux-s390-low.c: Include <elf.h>.
13138 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13139 (init_registers_s390): Remove prototype.
13140 (init_registers_s390x): Likewise.
13141 (init_registers_s390_linux32): Add prototype.
13142 (init_registers_s390_linux64): Likewise.
13143 (init_registers_s390x_linux64): Likewise.
13144 (s390_num_regs_3264): New define.
13145 (s390_regmap_3264): New global variable.
13146 (s390_cannot_fetch_register): Remove obsolete check.
13147 (s390_cannot_store_register): Likewise.
13148 (s390_collect_ptrace_register): Handle upper/lower register halves.
13149 (s390_supply_ptrace_register): Likewise.
13150 (s390_fill_gregset): Update to register number changes.
13151 (s390_get_hwcap): New routine.
13152 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13153 Install appropriate regmap and register set.
13155 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13157 * server.c (gdbserver_version): Update copyright year to 2010.
13158 * gdbreplay.c (gdbreplay_version): Likewise.
13160 2009-12-28 Doug Evans <dje@google.com>
13162 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13163 elf/external.h. Include <elf.h> instead but only if necessary.
13165 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13167 * linux-low.c (linux_remove_process): Remove `detaching'
13168 parameter. Don't release/detach from thread_db here.
13169 (linux_kill): Release/detach from thread_db here, ...
13170 (linux_detach): ... and here, before actually detaching.
13171 (linux_wait_1): ... and here, when a process exits.
13172 * thread-db.c (any_thread_of): New.
13173 (thread_db_free): Switch the current inferior to a thread of the
13176 2009-12-21 Doug Evans <dje@google.com>
13178 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13180 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13181 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13182 warning ifndef __NR_tkill. Move setting of errno there too.
13183 Delete unnecessary resetting of errno after syscall.
13184 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13186 * configure.ac: Check for dladdr.
13187 * config.in: Regenerate.
13188 * configure: Regenerate.
13189 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13190 (try_thread_db_load): Update.
13192 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13194 2009-12-18 Doug Evans <dje@google.com>
13196 * event-loop.c: Include unistd.h if it exists.
13198 * linux-low.c (my_waitpid): Move definition away from being in
13199 between linux_tracefork_child/linux_test_for_tracefork.
13201 * gdb_proc_service.h (psaddr_t): Fix type.
13202 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13203 signature to match glibc.
13205 2009-12-16 Doug Evans <dje@google.com>
13207 * linux-low.c (linux_read_memory): Fix argument to read.
13209 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13211 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13212 events, don't leave current_inferior pointing at null.
13214 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13216 * win32-low.c (LOG): Delete.
13217 (OUTMSG): Output to stderr.
13218 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13219 on compile time LOG macro.
13220 (win32_wait): Fix debug output.
13222 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13224 * win32-low.c (win32_add_one_solib): If the dll name is
13225 "ntdll.dll", prepend the system directory to the dll path.
13227 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13229 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13231 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13232 Vladimir Prus <vladimir@codesourcery.com>
13234 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13235 * configure.ac: Check for __mcoldfire__ and set
13236 gdb_cv_m68k_is_coldfire.
13237 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13238 reg-cf.o and reg-m68k.o.
13239 * configure: Regenerated.
13241 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13243 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13244 Pass it to thread_db_free.
13245 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13246 proper `detaching' argument to linux_remove_process.
13247 * linux-low.h (thread_db_free): Add `detaching' parameter.
13248 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13250 (thread_db_free): Add `detaching' parameter. Only
13251 call td_ta_clear_event if detaching from process.
13253 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13255 * thread-db.c (thread_db_free): Fix typo.
13257 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13260 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13262 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13264 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13265 with an i686 compiler.
13266 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13268 * configure: Rebuilt.
13270 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13274 * server.c (handle_search_memory_1): Correct read_addr initialization
13275 in loop for searching subsequent chunks.
13277 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13279 * configure.ac: New --with-libthread-db option.
13280 * thread-db.c: Allow direct dependence on libthread_db.
13281 (thread_db_free): Adjust.
13282 * config.in: Regenerate.
13283 * configure: Likewise.
13285 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13288 * thread-db.c (attach_thread): New function.
13289 (maybe_attach_thread): Return success/failure.
13290 (find_new_threads_callback): Adjust.
13291 (thread_db_find_new_threads): Loop until no new threads.
13293 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13295 * proc-service.c (ps_lgetregs): Formatting.
13297 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13299 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13300 * configure.ac: Adjust.
13301 * linux-low.h (struct process_info_private): Move members to struct
13303 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13304 * linux-low.c (linux_remove_process): Adjust.
13305 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13306 * server.c (handle_query): Move code ...
13307 (handle_monitor_command): ... here. New function.
13308 * target.h (struct target_ops): New member.
13309 * thread-db.c (struct thread_db): New.
13310 (libthread_db_search_path): New variable.
13311 (thread_db_create_event, thread_db_enable_reporting)
13312 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13313 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13314 (try_thread_db_load_1, dladdr_to_soname): New functions.
13315 (try_thread_db_load, thread_db_load_search): New functions.
13316 (thread_db_init): Search for libthread_db.
13317 (thread_db_free): New function.
13318 (thread_db_handle_monitor_command): Likewise.
13319 * config.in: Regenerate.
13320 * configure: Regenerate.
13322 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13324 * spu-low.c (spu_kill): Wait for inferior to terminate.
13325 Call clear_inferiors.
13326 (spu_detach): Call clear_inferiors.
13328 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13330 * aclocal.m4: Regenerate.
13331 * config.in: Likewise.
13332 * configure: Likewise.
13334 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13336 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13337 (parse_spufs_run): New function.
13338 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13339 (ppc_breakpoint_at): Handle SPU breakpoints.
13341 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13343 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13344 (SPUFS_MAGIC): Define.
13345 (spu_enumerate_spu_ids): New function.
13346 (linux_qxfer_spu): New function.
13347 (linux_target_ops): Install linux_qxfer_spu.
13349 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13351 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13352 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13353 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13354 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13355 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13356 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13357 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13358 (init_registers_powerpc_cell32l): Add prototype.
13359 (init_registers_powerpc_cell64l): Likewise.
13360 (ppc_arch_setup): Detect Cell/B.E. architecture.
13362 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13364 * Makefile.in (datarootdir): New variable.
13366 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13368 * linux-low.c (linux_write_memory): Update debugging output.
13369 * Makefile.in (clean): Add new descriptions.
13370 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13371 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13372 * configure.srv: Add new files for arm*-*-linux*.
13373 * linux-arm-low.c: Add new declarations.
13374 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13375 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13376 (HWCAP_VFPv3D16): New.
13377 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13378 instead of __IWMMXT__.
13379 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13380 (arm_arch_setup): New.
13381 (target_regsets): Remove #ifdef. Add VFP regset.
13382 (the_low_target): Use arm_arch_setup.
13384 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13386 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13387 the main thread again.
13389 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13391 Adding Neutrino gdbserver.
13392 * configure: Regenerated.
13393 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13394 * configure.srv (i[34567]86-*-nto*): New target.
13395 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13396 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13397 (nto_comctrl) [__QNX__]: New function.
13398 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13400 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13402 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13405 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13406 Pedro Alves <pedro@codesourcery.com>
13408 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13409 don't support CONTEXT_EXTENDED_REGISTERS.
13410 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13411 (the_low_target): Install them.
13412 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13413 failing with ERROR_PIPE_NOT_CONNECTED.
13415 2009-06-30 Doug Evans <dje@google.com>
13416 Pierre Muller <muller@ics.u-strasbg.fr>
13418 Add h/w watchpoint support to x86-linux, win32-i386.
13419 * Makefile.in (SFILES): Add i386-low.c
13420 (i386_low_h): Define.
13421 (i386-low.o): Add dependencies.
13422 (linux-x86-low.o): Add i386-low.h dependency.
13423 (win32-i386-low.o): Ditto.
13424 * i386-low.c: New file.
13425 * i386-low.h: New file.
13426 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13427 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13428 * linux-low.c (linux_add_process): Initialize arch_private.
13429 (linux_remove_process): Free arch_private.
13430 (add_lwp): Initialize arch_private.
13431 (delete_lwp): Free arch_private.
13432 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13434 * linux-low.h (process_info_private): New member arch_private.
13435 (lwp_info): New member arch_private.
13436 (linux_target_ops): New members new_process, new_thread,
13438 (ptid_of): New macro.
13439 * linux-x86-low.c: Include stddef.h, i386-low.h.
13440 (arch_process_info): New struct.
13441 (arch_lwp_info): New struct.
13442 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13443 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13444 (i386_dr_low_get_status): New function.
13445 (x86_insert_point, x86_remove_point): New functions.
13446 (x86_stopped_by_watchpoint): New function.
13447 (x86_stopped_data_address): New function.
13448 (x86_linux_new_process, x86_linux_new_thread): New functions.
13449 (x86_linux_prepare_to_resume): New function.
13450 (the_low_target): Add entries for insert_point, remove_point,
13451 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13453 * server.c (debug_hw_points): New global.
13454 (monitor_show_help): Document set debug-hw-points.
13455 (handle_query): Process "set debug-hw-points".
13456 * server.h (debug_hw_points): Declare.
13457 (paddress): Declare.
13458 * utils.c (NUMCELLS, CELLSIZE): New macros.
13459 (get_sell, xsnprintf, paddress): New functions.
13460 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13461 remove_point, stopped_by_watchpoint, stopped_data_address.
13462 * win32-i386-low.c: Include i386-low.h.
13463 (debug_reg_state): Replaces dr.
13464 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13465 (i386_dr_low_get_status): New function.
13466 (i386_insert_point, i386_remove_point): New functions.
13467 (i386_stopped_by_watchpoint): New function.
13468 (i386_stopped_data_address): New function.
13469 (i386_initial_stuff): Update.
13470 (get_thread_context,set_thread_context,i386_thread_added): Update.
13471 (the_low_target): Add entries for insert_point,
13472 remove_point, stopped_by_watchpoint, stopped_data_address.
13473 * win32-low.c (win32_insert_watchpoint): New function.
13474 (win32_remove_watchpoint): New function.
13475 (win32_stopped_by_watchpoint): New function.
13476 (win32_stopped_data_address): New function.
13477 (win32_target_ops): Add entries for insert_watchpoint,
13478 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13479 * win32-low.h (win32_target_ops): New members insert_point,
13480 remove_point, stopped_by_watchpoint, stopped_data_address.
13482 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13484 * server.c (process_serial_event): Re-return unsupported, not
13485 error, if the type isn't recognized. Re-allow supporting only
13486 insert or remove packets. Also call require_running for
13487 breakpoints. Add missing break statement to default case. Tidy.
13488 * target.h (struct target_ops): Rename insert_watchpoint to
13489 insert_point, and remove_watchpoint to remove_point.
13491 * linux-low.h (struct linux_target_ops): Likewise.
13492 * linux-low.c (linux_insert_watchpoint): Rename to ...
13493 (linux_insert_point): ... this. Adjust.
13494 (linux_remove_watchpoint): Rename to ...
13495 (linux_remove_point): ... this. Adjust.
13496 (linux_target_ops): Adjust.
13497 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13498 (cris_insert_point): ... this.
13499 (cris_remove_watchpoint): Rename to ...
13500 (cris_remove_point): ... this.
13501 (the_low_target): Adjust.
13503 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13505 * server.c (handle_v_kill): Pass signal_pid to
13506 kill_inferior if multi_process is zero.
13508 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13510 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13511 * target.h (target_ops): Comment for *_watchpoint to make it clear
13512 the functions can get types '0' and '1'.
13514 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13516 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13517 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13518 * regcache.c (get_regcache): Likewise.
13519 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13520 * win32-low.c (child_fetch_inferior_registers): Remove check for
13523 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13524 Pedro Alves <pedro@codesourcery.com>
13526 * target.h (struct target_ops) <supports_multi_process>: New
13528 (target_supports_multi_process): New.
13529 * server.c (handle_query): Even if GDB reports support, only
13530 enable multi-process if the target also supports it. Report
13531 multi-process support only if the target backend supports it.
13532 * linux-low.c (linux_supports_multi_process): New function.
13533 (linux_target_ops): Install it as target_supports_multi_process
13536 2009-05-24 Doug Evans <dje@google.com>
13538 Global renaming of find_thread_pid to find_thread_ptid.
13539 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13540 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13541 All callers updated.
13543 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13544 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13547 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13548 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13549 (linux_resume_one_lwp): Ditto.
13551 2009-05-23 Doug Evans <dje@google.com>
13553 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13554 from struct inferior_list_entry * to struct lwp_info *.
13555 All callers updated.
13557 2009-05-13 Doug Evans <dje@google.com>
13559 * linux-x86-low.c: Don't include assert.h.
13560 (x86_siginfo_fixup): Use fatal, not assert.
13561 (x86_arch_setup): Fix comment.
13563 2009-05-12 Doug Evans <dje@google.com>
13565 Biarch support for i386/amd64 gdbserver.
13566 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13567 Add linux-x86-low.c.
13568 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13569 (linux-x86-low.o): Add.
13570 * linux-x86-64-low.c: Delete.
13571 * linux-i386-low.c: Delete.
13572 * linux-x86-low.c: New file.
13573 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13575 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13577 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13578 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13579 (linux_child_pid_to_exec_file): New function.
13580 (elf_64_header_p, elf_64_file_p): New functions.
13581 (siginfo_fixup): New function.
13582 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13583 give target a chance to convert layout.
13584 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13585 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13587 2009-05-07 Doug Evans <dje@google.com>
13589 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13590 (regsets_store_inferior_registers): Ditto.
13592 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13596 * linux-low.c (must_set_ptrace_flags): Delete.
13597 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13599 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13600 `lwp->must_set_ptrace_flags' instead.
13601 (linux_wait_for_event_1): Set ptrace options here.
13602 (linux_wait_1): ... not here.
13604 2009-04-30 Doug Evans <dje@google.com>
13606 * inferiors.c (started_inferior_callback): New function.
13607 (attached_inferior_callback): New function.
13608 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13609 * server.c (print_started_pid, print_attached_pid): New functions.
13610 (detach_or_kill_for_exit): New function.
13611 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13612 * server.h (have_started_inferiors_p): Declare.
13613 (have_attached_inferiors_p): Declare.
13615 * inferiors.c (remove_process): Fix memory leak, free process.
13616 * linux-low.c (linux_remove_process): New function.
13617 (linux_kill): Call it instead of remove_process.
13618 (linux_detach, linux_wait_1): Ditto.
13620 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13622 * configure.srv: Add x86 Windows CE target.
13624 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13626 * inferiors.c (get_thread_process): Make global.
13627 * server.h (get_thread_process): Add prototype.
13628 * thread-db.c (find_one_thread): Use get_thread_process
13629 instead of current_process.
13630 (thread_db_get_tls_address): Do not crash if called when
13631 thread layer is not yet initialized.
13633 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13635 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13636 * spu-low.c (current_tid): Rename to ...
13637 (current_ptid): ... this.
13638 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13639 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13640 ptid_get_lwp (current_ptid) instead of current_tid.
13641 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13642 instead of current_tid. Use find_process_pid to verify pid
13643 argument is valid. Pass proper argument to remove_process.
13644 (spu_thread_alive): Compare current_ptid instead of current_tid.
13645 (spu_resume): Likewise.
13647 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13649 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13652 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13654 Implement the multiprocess extensions, and add linux multiprocess
13657 * server.h (ULONGEST): Declare.
13658 (struct ptid, ptid_t): New.
13659 (minus_one_ptid, null_ptid): Declare.
13660 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13661 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13662 (struct inferior_list_entry): Change `id' type from unsigned from
13664 (struct sym_cache, struct breakpoint, struct
13665 process_info_private): Forward declare.
13666 (struct process_info): Declare.
13667 (current_process): Declare.
13668 (all_processes): Declare.
13669 (initialize_inferiors): Declare.
13670 (add_thread): Adjust to use ptid_t.
13671 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13672 (add_process, remove_process, find_thread_pid): Declare.
13673 (find_inferior_id): Adjust to use ptid_t.
13674 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13675 (multi_process): Declare.
13676 (push_event): Adjust to use ptid_t.
13677 (read_ptid, write_ptid): Declare.
13678 (prepare_resume_reply): Adjust to use ptid_t.
13679 (clear_symbol_cache): Declare.
13680 * inferiors.c (all_processes): New.
13681 (null_ptid, minus_one_ptid): New.
13682 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13683 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13684 (add_thread): Change unsigned long to ptid. Remove gdb_id
13686 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13687 (gdb_id_to_thread): Rename to ...
13688 (find_thread_pid): ... this. Change unsigned long to ptid.
13689 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13690 (loaded_dll, pull_pid_from_list): Adjust.
13691 (add_process, remove_process, find_process_pid)
13692 (get_thread_process, current_process, initialize_inferiors): New.
13693 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13694 (struct target_waitstatus) <related_pid>: Ditto.
13695 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13696 return type to int.
13697 (struct target_ops) <join>: Add `pid' argument.
13698 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13699 (struct target_ops) <wait>: Add `ptid' field. Change return type
13701 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13702 (mywait): Add `ptid' argument. Change return type to ptid_t.
13703 (target_pid_to_str): Declare.
13704 * target.c (set_desired_inferior): Adjust to use ptids.
13705 (mywait): Add new `ptid' argument. Adjust.
13706 (target_pid_to_str): New.
13707 * mem-break.h (free_all_breakpoints): Declare.
13708 * mem-break.c (breakpoints): Delelete.
13709 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13710 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13711 to use per-process breakpoint list.
13712 (free_all_breakpoints): New.
13713 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13714 (symbol_cache, all_symbols_looked_up): Delete.
13716 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13718 (prepare_resume_reply): Change ptid argument's type from unsigned
13719 long to ptid_t. Adjust. Implement W;process and X;process.
13720 (free_sym_cache, clear_symbol_cache): New.
13721 (look_up_one_symbol): Adjust to per-process symbol cache. *
13722 * server.c (cont_thread, general_thread, step_thread): Change type
13724 (attached): Delete.
13725 (multi_process): New.
13726 (last_ptid): Change type to ptid_t.
13727 (struct vstop_notif) <ptid>: Change type to ptid_t.
13728 (queue_stop_reply, push_event): Change `ptid' argument's type to
13730 (discard_queued_stop_replies): Add `pid' argument.
13731 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13732 changes. Don't reference the `attached' global.
13733 (attach_inferior): Adjust to mywait interface changes.
13734 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13735 features. Handle and report "multiprocess+". Handle
13737 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13739 (handle_v_kill): New.
13740 (handle_v_stopped): Adjust to use target_pid_to_str.
13741 (handle_v_requests): Allow multiple attaches and runs when
13742 multiprocess extensions are in effect. Handle "vKill".
13743 (myresume): Adjust to use ptids.
13744 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13745 (handle_status): Adjust to discard_queued_stop_replies interface
13747 (first_thread_of, kill_inferior_callback)
13748 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13749 (main): Call initialize_inferiors. Adjust to use ptids, killing
13750 and detaching from all inferiors. Handle multiprocess packet
13752 * linux-low.h: Include gdb_proc_service.h.
13753 (struct process_info_private): New.
13754 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13755 <lwpid_of>: Use ptid_get_lwp.
13756 (get_lwp_thread): Adjust.
13757 (struct lwp_info): Add `dead' member.
13758 (find_lwp_pid): Declare.
13759 * linux-low.c (thread_db_active): Delete.
13760 (new_inferior): Adjust comment.
13761 (inferior_pid): Delete.
13762 (linux_add_process): New.
13763 (handle_extended_wait): Adjust.
13764 (add_lwp): Change unsigned long to ptid.
13765 (linux_create_inferior): Add process to processes table. Adjust
13766 to use ptids. Don't set new_inferior here.
13767 (linux_attach_lwp): Rename to ...
13768 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13769 it. Adjust to use ptids.
13770 (linux_attach_lwp): New.
13771 (linux_attach): Add process to processes table. Don't set
13773 (struct counter): New.
13774 (second_thread_of_pid_p, last_thread_of_process_p): New.
13775 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13776 multiple processes.
13777 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13778 processes. Remove process from process table.
13779 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13780 to multiple processes.
13781 (any_thread_of): New.
13782 (linux_detach): Add `pid' argument, and handle it. Remove process
13783 from processes table.
13784 (linux_join): Add `pid' argument. Handle it.
13785 (linux_thread_alive): Change unsighed long argument to ptid_t.
13786 Consider dead lwps as not being alive.
13787 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13788 threads we're not interested in.
13789 (same_lwp, find_lwp_pid): New.
13790 (linux_wait_for_lwp): Change `pid' argument's type from int to
13792 (linux_wait_for_event): Rename to ...
13793 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13794 from int to ptid_t. Adjust.
13795 (linux_wait_for_event): New.
13796 (linux_wait_1): Add `ptid' argument. Change return type to
13797 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13798 that exit from the process table.
13799 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13801 (mark_lwp_dead): New.
13802 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13803 stopping all threads, mark its main lwp as dead.
13804 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13806 (fetch_register, usr_store_inferior_registers)
13807 (regsets_fetch_inferior_registers)
13808 (regsets_store_inferior_registers, linux_read_memory)
13809 (linux_write_memory): Inline `inferior_pid'.
13810 (linux_look_up_symbols): Adjust to use per-process
13811 `thread_db_active'.
13812 (linux_request_interrupt): Adjust to use ptids.
13813 (linux_read_auxv): Inline `inferior_pid'.
13814 (initialize_low): Don't reference thread_db_active.
13815 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13816 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13817 (ps_getpid): Return the pid of the current inferior.
13818 * thread-db.c (proc_handle, thread_agent): Delete.
13819 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13821 (find_one_thread): Change argument type to ptid_t. Adjust to
13823 (maybe_attach_thread): Adjust to per-process data and ptids.
13824 (thread_db_find_new_threads): Ditto.
13825 (thread_db_init): Ditto.
13826 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13827 processes table. Adjust to use ptids.
13828 (spu_kill, spu_detach): Adjust interface. Remove process from
13830 (spu_join, spu_thread_alive): Adjust interface.
13831 (spu_wait): Adjust interface. Remove process from processes
13832 table. Adjust to use ptids.
13833 * win32-low.c (current_inferior_tid): Delete.
13834 (current_inferior_ptid): New.
13835 (debug_event_ptid): New.
13836 (thread_rec): Take a ptid. Adjust.
13837 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13838 (child_delete_thread): Ditto.
13839 (do_initial_child_stuff): Add `attached' argument. Add process to
13841 (child_fetch_inferior_registers, child_store_inferior_registers):
13843 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13844 (win32_attach): Pass 1 to do_initial_child_stuff.
13845 (win32_kill): Adjust interface. Remove process from processes
13847 (win32_detach): Ditto.
13848 (win32_join): Adjust interface.
13849 (win32_thread_alive): Take a ptid.
13850 (win32_resume): Adjust to use ptids.
13851 (get_child_debug_event): Ditto.
13852 (win32_wait): Adjust interface. Remove exiting process from
13855 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13857 Non-stop mode support.
13859 * server.h (non_stop): Declare.
13860 (gdb_client_data, handler_func): Declare.
13861 (delete_file_handler, add_file_handler, start_event_loop):
13863 (handle_serial_event, handle_target_event, push_event)
13864 (putpkt_notif): Declare.
13865 * target.h (enum resume_kind): New.
13866 (struct thread_resume): Replace `step' field by `kind' field.
13867 (TARGET_WNOHANG): Define.
13868 (struct target_ops) <wait>: Add `options' argument.
13869 <supports_non_stop, async, start_non_stop>: New fields.
13870 (target_supports_non_stop, target_async): New.
13871 (start_non_stop): Declare.
13872 (mywait): Add `options' argument.
13873 * target.c (mywait): Add `options' argument. Print child exit
13874 notifications here.
13875 (start_non_stop): New.
13876 * server.c (non_stop, own_buf, mem_buf): New globals.
13877 (struct vstop_notif): New.
13878 (notif_queue): New global.
13879 (queue_stop_reply, push_event, discard_queued_stop_replies)
13880 (send_next_stop_reply): New.
13881 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13883 (attach_inferior): In non-stop mode, don't wait for the target
13885 (handle_general_set): Handle QNonStop.
13886 (handle_query): When handling qC, return the current general
13887 thread, instead of the first thread of the list.
13888 (handle_query): If the backend supports non-stop mode, include
13889 QNonStop+ in the qSupported query response.
13890 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13892 (handle_v_attach, handle_v_run): Handle non-stop mode.
13893 (handle_v_stopped): New.
13894 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13895 (myresume): Adjust to use resume_kind. Handle non-stop.
13896 (queue_stop_reply_callback): New.
13897 (handle_status): Handle non-stop mode.
13898 (main): Clear non_stop flag on reconnection. Use the event-loop.
13899 Refactor serial protocol handling from here ...
13900 (process_serial_event): ... to this new function. When GDB
13901 selects any thread, select one here. In non-stop mode, wait until
13902 GDB acks all pending events before exiting.
13903 (handle_serial_event, handle_target_event): New.
13904 * remote-utils.c (remote_open): Install remote_desc in the event
13906 (remote_close): Remove remote_desc from the event loop.
13907 (putpkt_binary): Rename to...
13908 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13909 (putpkt_binary): New as wrapper around putpkt_binary_1.
13910 (putpkt_notif): New.
13911 (prepare_resume_reply): In non-stop mode, don't change the
13913 * event-loop.c: New.
13914 * Makefile.in (OBJ): Add event-loop.o.
13915 (event-loop.o): New rule.
13917 * linux-low.h (pid_of): Moved here.
13919 (get_lwp_thread): Use lwpid_of.
13920 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13921 * linux-low.c (pid_of): Delete.
13922 (inferior_pid): Use lwpid_of.
13923 (linux_event_pipe): New.
13924 (target_is_async_p): New.
13926 (handle_extended_wait): Use lwpid_of.
13927 (add_lwp): Don't set lwpid field.
13928 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13929 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13930 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13931 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13932 first. Adjust to linux_wait_for_event interface changes. Use
13934 (linux_detach): Don't delete the main lwp here.
13935 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13936 (status_pending_p): Don't consider explicitly suspended lwps.
13937 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13938 pointer. Add OPTIONS argument. Change return type to int. Use
13939 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13940 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13941 pointer. Add status pointer argument. Return a pid instead of a
13942 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13943 changes. In non-stop mode, don't switch to a random thread.
13944 (linux_wait): Rename to...
13945 (linux_wait_1): ... this. Add target_options argument, and handle
13946 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13947 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13948 clean exit and signal exit code. Don't stop all threads in
13949 non-stop mode. In all-stop mode, only stop all threads when
13950 reporting a stop to GDB. Handle explicit thread stop requests.
13951 (async_file_flush, async_file_mark): New.
13953 (send_sigstop): Use lwpid_of.
13954 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13955 interface changes. In non-stop mode, don't switch to a random
13957 (linux_resume_one_lwp): Use lwpid_of.
13958 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13959 (linux_resume_one_thread): ... this. Handle resume_stop. In
13960 non-stop mode, don't look for pending flag in all threads.
13961 (resume_status_pending_p): Don't consider explicitly suspended
13963 (my_waitpid): Reimplement. Emulate __WALL.
13964 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13966 (sigchld_handler, linux_supports_non_stop, linux_async)
13967 (linux_start_non_stop): New.
13968 (linux_target_ops): Register linux_supports_non_stop, linux_async
13969 and linux_start_non_stop.
13970 (initialize_low): Install SIGCHLD handler.
13971 * thread-db.c (thread_db_create_event, find_one_thread)
13972 (thread_db_get_tls_address): Use lwpid_of.
13973 * win32-low.c (win32_detach): Adjust to use resume_kind.
13974 (win32_wait): Add `options' argument.
13975 * spu-low.c (spu_resume): Adjust to use resume_kind.
13976 (spu_wait): Add `options' argument.
13978 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13980 Decouple target code from remote protocol.
13982 * target.h (enum target_waitkind): New.
13983 (struct target_waitstatus): New.
13984 (struct target_ops) <wait>: Return an unsigned long. Take a
13985 target_waitstatus pointer instead of a char pointer.
13986 (mywait): Likewise.
13987 * target.c (mywait): Change prototype to return an unsigned long.
13988 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13989 * server.h (thread_from_wait, old_thread_from_wait): Delete
13991 (prepare_resume_reply): Change prototype to take a
13993 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13994 (last_status, last_ptid): New.
13995 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13996 pid instead of a signal.
13997 (attach_inferior): Remove "status" and "signal" parameters.
13999 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14001 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14002 (handle_v_requests, myresume): Remove "status" and "signal"
14003 parameters. Adjust.
14004 (handle_status): New.
14005 (main): Delete local `status'. Adjust.
14006 * remote-utils.c: Include target.h.
14007 (prepare_resume_reply): Change prototype to take a
14008 target_waitstatus. Adjust.
14010 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14012 * spu-low.c (spu_wait): Adjust.
14013 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14015 (win32_wait): Adjust.
14017 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14019 * target.h (struct thread_resume): Delete leave_stopped member.
14020 (struct target_ops): Add a `n' argument to the `resume' callback.
14021 * server.c (start_inferior): Adjust.
14022 (handle_v_cont, myresume): Adjust.
14023 * linux-low.c (check_removed_breakpoint): Adjust to resume
14024 interface change, and to removed leave_stopped field.
14025 (resume_ptr): Delete.
14026 (struct thread_resume_array): New.
14027 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14028 resume interface change.
14029 (linux_continue_one_thread, linux_queue_one_thread)
14030 (resume_status_pending_p): Check if the resume field is NULL
14031 instead of checking the leave_stopped member.
14032 (linux_resume): Adjust to the target resume interface change.
14033 * spu-low.c (spu_resume): Adjust to the target resume interface
14035 * win32-low.c (win32_detach, win32_resume): Ditto.
14037 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14039 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14041 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14043 (linux_continue_one_thread): Only preserve the stepping flag if
14044 there's a pending breakpoint.
14046 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14048 * server.c (main): After the inferior having exited, call
14049 remote_close before exiting gdbserver.
14051 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14053 Fix size of FPSCR in Power 7 processors.
14054 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14055 (PPC_FEATURE_HAS_DFP): New #define.
14056 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14059 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14061 * server.c (handle_query) Whitespace and formatting.
14063 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14065 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14066 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14067 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14068 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14069 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14070 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14071 Makefile.in, configure.ac: Fix whitespace throughout.
14072 * configure: Regenerate.
14074 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14076 * inferiors.c (find_inferior): Make it safe for the callback
14077 function to delete the currently iterated inferior.
14079 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14081 * Makefile.in (linuw_low_h): Move higher.
14082 (thread-db.o): Depend on $(linux_low_h).
14084 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14086 Rename "process" to "lwp" throughout.
14088 * linux-low.c (all_processes): Rename to...
14089 (all_lwps): ... this.
14090 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14091 (add_process): Rename to ...
14092 (add_lwp): ... this. Adjust.
14093 (linux_create_inferior): Adjust.
14094 (linux_attach_lwp): Adjust.
14095 (linux_attach): Adjust.
14096 (linux_kill_one_process): Rename to ...
14097 (linux_kill_one_lwp): ... this. Adjust.
14098 (linux_kill): Adjust.
14099 (linux_detach_one_process): Rename to ...
14100 (linux_detach_one_lwp): ... this. Adjust.
14101 (linux_detach): Adjust.
14102 (check_removed_breakpoint): Adjust.
14103 (status_pending_p): Adjust.
14104 (linux_wait_for_process): Rename to ...
14105 (linux_wait_for_lwp): ... this. Adjust.
14106 (linux_wait_for_event): Adjust.
14107 (send_sigstop): Adjust.
14108 (wait_for_sigstop): Adjust.
14109 (stop_all_processes): Rename to ...
14110 (stop_all_lwps): ... this.
14111 (linux_resume_one_process): Rename to ...
14112 (linux_resume_one_lwp): ... this. Adjust.
14113 (linux_set_resume_request, linux_continue_one_thread)
14114 (linux_queue_one_thread, resume_status_pending_p)
14115 (usr_store_inferior_registers, regsets_store_inferior_registers)
14116 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14118 * linux-low.h (get_process): Rename to ...
14119 (get_lwp): ... this. Adjust.
14120 (get_thread_process): Rename to ...
14121 (get_thread_lwp): ... this. Adjust.
14122 (get_process_thread): Rename to ...
14123 (get_lwp_thread): ... this. Adjust.
14124 (struct process_info): Rename to ...
14125 (struct lwp_info): ... this.
14126 (all_processes): Rename to ...
14127 (all_lwps): ... this.
14128 * proc-service.c (ps_lgetregs): Adjust.
14129 * thread-db.c (thread_db_create_event, find_one_thread)
14130 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14132 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14134 * server.c (handle_query): Handle "qAttached".
14136 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14138 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14139 GPLv3, update license URL.
14141 2009-03-01 Doug Evans <dje@google.com>
14143 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14144 (server_h): Add gdb_signals.h.
14145 (signals.o): Update.
14146 * server.h (target_signal_from_host,target_signal_to_host_p)
14147 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14149 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14151 * remote-utils.c (getpkt): Also generate remote-debug
14152 information if noack_mode is set.
14154 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14156 * server.c (handle_query): Report qXfer:siginfo:read and
14157 qXfer:siginfo:write as supported and handle them.
14158 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14159 * linux-low.c (linux_xfer_siginfo): New.
14160 (linux_target_ops): Set it.
14162 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14164 * server.c (gdbserver_usage): Mention --remote-debug.
14165 (main): Accept '--remote-debug' switch.
14167 2009-01-18 Doug Evans <dje@google.com>
14169 * regcache.c (new_register_cache): No need to check result of xcalloc.
14170 * server.c (handle_search_memory): Back out calls to xmalloc,
14171 result is checked and error is returned to user upon failure.
14172 (handle_query): Ditto. Add more checks for result of malloc.
14173 (handle_v_cont): Check result of malloc, report error back to
14175 (handle_v_run): Ditto. Call freeargv.
14176 * server.h (freeargv): Declare.
14177 * utils.c (freeargv): New fn.
14179 2009-01-15 Doug Evans <dje@google.com>
14181 * gdbreplay.c (perror_with_name): Make arg const char *.
14182 * server.h (target_signal_to_name): Make return type const char *.
14183 * thread-db.c (thread_db_err_str): Make return type const char *.
14184 * utils.c (perror_with_name): Make arg const char *.
14186 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14188 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14189 when handling a EXIT_PROCESS_DEBUG_EVENT.
14191 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14193 * gdbreplay.c (gdbreplay_version): Update copyright year.
14194 * server.c (gdbserver_version): Likewise.
14196 2009-01-05 Doug Evans <dje@google.com>
14198 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14199 (handle_extended_wait): Improve comment.
14201 2008-12-13 Doug Evans <dje@google.com>
14203 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14204 * server.h (ATTR_MALLOC): New macro.
14205 (xmalloc,xcalloc,xstrdup): Declare.
14206 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14207 * inferiors.c: Ditto.
14208 * linux-low.c: Ditto.
14209 * mem-break.c: Ditto.
14210 * regcache.c: Ditto.
14211 * remote-utils.c: Ditto.
14214 * win32-low.c: Ditto.
14216 2008-12-12 Doug Evans <dje@google.com>
14218 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14219 in debugging printf.
14221 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14223 2008-12-09 Doug Evans <dje@google.com>
14225 * linux-low.h (struct process_info): Delete member tid, unused.
14226 * thread-db.c (find_one_thread): Update.
14227 (maybe_attach_thread): Update.
14229 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14231 * target.h (struct target_ops): Add qxfer_osdata member.
14232 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14234 (linux_qxfer_osdata): New functions.
14235 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14237 * server.c (handle_query): Handle "qXfer:osdata:read:".
14238 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14239 (buffer_xml_printf): New functions.
14240 * server.h (struct buffer): New.
14241 (buffer_grow_str, buffer_grow_str0): New macros.
14242 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14243 (buffer_xml_printf): Declare.
14245 2008-11-24 Doug Evans <dje@google.com>
14247 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14249 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14251 * server.c (handle_v_run): Always use the supplied argument list.
14253 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14255 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14256 (xtensa_regmap_table): Add entry for scompare1.
14258 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14260 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14261 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14262 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14263 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14264 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14265 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14266 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14267 XML target descriptions.
14268 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14269 when inferior is running on an ISA 2.05 or later processor. Add
14270 special case to return offset for full 64-bit slot of FPSCR when
14273 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14275 * Makefile.in (SFILES, clean): Added sparc64 files.
14276 (reg-sparc64.o, reg-sparc64.c): New.
14277 * configure.srv (sparc*-*-linux*): New configuration.
14278 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14279 syscall arguments for SPARC.
14280 (regsets_store_inferior_registers): Likewise.
14281 * linux-sparc-low.c: New file.
14283 2008-10-21 Doug Evans <dje@google.com>
14285 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14286 (READLINE_DIR,READLINE_DEP): Delete.
14287 (INTERNAL_CFLAGS): Update.
14288 (LINTFLAGS): Update.
14290 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14292 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14293 whole argv from the last run, not just argv[0].
14295 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14297 * regcache.c (new_register_cache): Return NULL if the register
14298 cache size isn't known yet.
14299 (free_register_cache): Avoid dereferencing a NULL regcache.
14301 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14303 * configure.srv: Merge MIPS and MIPS64.
14305 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14307 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14309 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14311 * Makefile.in: Add required vsx dependencies.
14313 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14314 Declare init_registers_powerpc_vsx32l.
14315 Declare init_registers_powerpc_vsx64l.
14316 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14317 (ppc_arch_setup): Check for VSX in hwcap.
14318 (ppc_fill_vsxregset): New function.
14319 (ppc_store_vsxregset): New function.
14320 Add new VSX entry in regset_info target_regsets.
14322 * configure.srv: Add new VSX dependencies.
14324 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14326 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14327 (remote_open): Set or clear transport_is_reliable.
14328 (putpkt_binary): Don't expect acks in noack mode.
14329 (getpkt): Don't send ack/nac in noack mode.
14330 * server.c (handle_general_set): Handle QStartNoAckMode.
14331 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14333 (main): Reset noack_mode on every connection.
14334 * server.h (noack_mode): Declare.
14336 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14338 * Makefile.in (GDBREPLAY_OBS): New variable.
14339 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14341 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14342 Daniel Jacobowitz <dan@codesourcery.com>
14344 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14345 (usr_store_inferior_registers): Likewise.
14346 (regsets_store_inferior_registers): Likewise.
14348 2008-07-31 Rolf Jansen <rj@surtec.com>
14349 Pedro Alves <pedro@codesourcery.com>
14351 * configure.ac: Check for memmem declaration.
14352 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14353 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14354 (disable_packet_qfThreadInfo): Unconditionally compile.
14355 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14356 * configure, config.in: Regenerate.
14358 2008-07-28 Doug Kwan <dougkwan@google.com>
14360 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14361 (linux_write_memory): Remove declaration of errno.
14363 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14365 * linux-low.c (handle_extended_wait): Do not use "status"
14366 variable uninitialized.
14368 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14370 * server.c (handle_v_attach): Inhibit reporting dll changes.
14372 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14374 * remote-utils.c (prepare_resume_reply): If requested, don't
14375 output "thread:TID" in the T stop reply.
14377 * server.c (disable_packet_vCont, disable_packet_Tthread)
14378 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14379 (handle_query): If requested, disable support for qC, qfThreadInfo
14381 (handle_v_requests): If requested, disable support for vCont.
14382 (gdbserver_show_disableable): New.
14383 (main): Handle --disable-packet and --disable-packet=LIST.
14385 * server.h (disable_packet_vCont, disable_packet_Tthread)
14386 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14388 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14390 * server.c (gdbserver_usage): Mention --version.
14392 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14394 * Makefile.in (gdbreplay.o): New rule.
14396 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14398 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14399 message, not gdbserver.
14401 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14402 Nathan Sidwell <nathan@codesourcery.com>
14403 Joseph Myers <joseph@codesourcery.com>
14405 * acinclude.m4: Include ../../config/acx.m4.
14406 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14407 * configure, config.in: Regenerate.
14408 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14409 * server.c (gdbserver_version): Print PKGVERSION.
14410 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14411 (main): Adjust gdbserver_usage calls.
14412 * gdbreplay.c (version, host_name): Add declarations.
14413 (gdbreplay_version, gdbreplay_usage): New.
14414 (main): Accept --version and --help options.
14416 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14418 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14419 (arm_breakpoint_at): Handle Thumb.
14420 (the_low_target): Add comment.
14422 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14424 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14426 2008-05-09 Doug Evans <dje@google.com>
14428 * server.h (decode_search_memory_packet): Declare.
14429 * remote-utils.c (decode_search_memory_packet): New fn.
14430 * server.c (handle_search_memory_1): New fn.
14431 (handle_search_memory): New fn.
14432 (handle_query): Process qSearch:memory packets.
14434 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14436 * regcache.c (registers_length): Remove.
14437 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14438 full register packet.
14439 * regcache.h (registers_length): Remove prototype.
14440 * server.h (PBUFSIZ): Define to 16384.
14442 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14444 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14445 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14446 powerpc-64l.o, and powerpc-altivec64l.o.
14447 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14448 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14449 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14450 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14451 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14454 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14455 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14456 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14457 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14458 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14459 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14460 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14461 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14462 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14463 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14466 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14467 (init_registers_powerpc_32l): ... this new prototype.
14468 (init_registers_powerpc_32): Remove, replace by ...
14469 (init_registers_powerpc_altivec32l): ... this new prototype.
14470 (init_registers_powerpc_e500): Remove, replace by ...
14471 (init_registers_powerpc_e500l): ... this new prototype.
14472 (init_registers_ppc64): Remove, replace by ...
14473 (init_registers_powerpc_64l): ... this new prototype.
14474 (init_registers_powerpc_64): Remove, replace by ...
14475 (init_registers_powerpc_altivec64l): ... this new prototype.
14476 (ppc_num_regs): Set to 73.
14477 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14478 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14479 (ppc_cannot_store_register): Handle orig_r3 and trap.
14480 (ppc_arch_setup): Update init_registers_... calls.
14481 (ppc_fill_gregset): Handle orig_r3 and trap.
14483 * inferiors.c (clear_inferiors): Reset current_inferior.
14485 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14487 * acinclude.m4: Add override.m4.
14488 * configure: Regenerate.
14490 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14492 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14493 initial call to init_register_ppc64.
14495 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14497 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14498 single powerpc*-*-linux* case.
14499 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14501 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14503 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14504 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14506 * linux-ppc-low.c: Include <elf.h>.
14507 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14508 (ppc_hwcap): New global variable.
14509 (ppc_regmap): Remove __SPE__ #ifdef sections.
14510 (ppc_regmap_e500): New global variable.
14511 (ppc_cannot_store_register): Update __SPE__ special case.
14512 (ppc_get_hwcap): New function.
14513 (ppc_arch_setup): Use it to determine whether inferior supports
14514 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14515 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14516 Do not access registers if target does not support AltiVec.
14517 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14518 Do not access registers if target does not support SPE.
14519 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14521 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14523 * linux-low.c (disabled_regsets, num_regsets): New.
14524 (use_regsets_p): Delete.
14525 (linux_wait_for_process): Clear disabled_regsets.
14526 (regsets_fetch_inferior_registers): Check and set it.
14527 (regsets_store_inferior_registers): Likewise.
14528 (linux_fetch_registers, linux_store_registers): Do not use
14530 (initialize_low): Allocate disabled_regsets.
14532 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14534 * Makefile.in (LIBOBJS): New.
14535 (OBS): Use LIBOBJS.
14536 (memmem.o): New rule.
14537 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14538 * configure: Regenerated.
14540 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14542 * server.c (handle_query): Never return "unsupported" for
14543 qXfer:features:read queries.
14545 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14547 * server.c (get_features_xml): Fix inverted condition.
14548 (handle_query): Always support qXfer:feature:read.
14550 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14552 * server.c (wrapper_argv): New.
14553 (start_inferior): Handle wrapper_argv. If set, expect an extra
14555 (gdbserver_usage): Document --wrapper.
14556 (main): Parse --wrapper.
14558 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14560 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14561 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14562 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14563 (ppc_set_pc): Likewise.
14564 (ppc_arch_setup): New function.
14565 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14566 of collect_register.
14567 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14569 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14571 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14572 instead of linux-ppc64-low.o.
14573 * linux-ppc64-low.c: Remove file.
14574 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14575 (linux-ppc64-low.o): Remove rule.
14577 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14578 (init_registers_powerpc_64): Likewise.
14579 (ppc_regmap): Conditionally define depending on __powerpc64__.
14580 (ppc_cannot_store_register): Do not special-case "fpscr" when
14581 compiled on __powerpc64__.
14582 (ppc_collect_ptrace_register): New function.
14583 (ppc_supply_ptrace_register): New function.
14584 (ppc_breakpoint): Change type to "unsigned int".
14585 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14586 (the_low_target): Conditionally provide initializers for the
14587 arch_setup member depending on __powerpc64__. Install
14588 collect_ptrace_register and supply_ptrace_register members.
14590 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14592 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14593 * server.c (gdbserver_xmltarget): Define.
14594 (get_features_xml): Use it to replace "target.xml" and arch_string.
14596 * configure.srv: Remove srv_xmltarget. Add XML files that were
14597 mentioned there to srv_xmlfiles instead. Remove conditional tests
14598 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14599 srv_xmlfiles and srv_regobj to include all possible choices.
14600 * configure.ac (srv_xmltarget): Remove.
14601 (srv_xmlfiles): Do not add "target.xml".
14602 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14603 checks for supplementary target information.
14604 * configure: Regenerate.
14605 * Makefile.in (XML_TARGET): Remove.
14606 (target.xml): Remove rule.
14607 (clean): Do not clean up target.xml.
14608 (.PRECIOUS): Do not mention target.xml.
14610 * target.h (struct target_ops): Remove arch_string member.
14611 * linux-low.c (linux_arch_string): Remove.
14612 (linux_target_ops): Remove arch_string initializer.
14613 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14614 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14615 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14616 * spu-low.c (spu_arch_string): Remove.
14617 (spu_target_ops): Remove arch_string initializer.
14618 * win32-low.c (win32_arch_string): Remove.
14619 (win32_target_ops): Remove arch_string initializer.
14620 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14621 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14622 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14624 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14626 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14627 by collect_ptrace_register and supply_ptrace_register hooks.
14628 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14629 instead of checking for the_low_target.left_pad_xfer.
14630 (usr_store_inferior_registers): Use collect_ptrace_register callback
14631 instead of checking for the_low_target.left_pad_xfer.
14633 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14634 (s390_supply_ptrace_register): Likewise.
14635 (s390_fill_gregset): Call s390_collect_ptrace_register.
14636 (the_low_target): Update.
14638 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14639 (ppc_supply_ptrace_register): Likewise.
14640 (the_low_target): Update.
14642 * linux-i386-low.c (the_low_target): Update.
14643 * linux-x86-64-low.c (the_low_target): Update.
14645 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14647 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14648 reg-s390.o and reg-s390x.o.
14650 * linux-low.c (new_inferior): New global variable.
14651 (linux_create_inferior, linux_attach): Set it.
14652 (linux_wait_for_process): Call the_low_target.arch_setup after the
14653 target has stopped for the first time.
14654 (initialize_low): Do not call the_low_target.arch_setup.
14656 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14657 (s390_set_pc): Likewise.
14658 (s390_arch_setup): New function.
14659 (the_low_target): Use s390_arch_setup as arch_setup routine.
14661 * regcache.c (realloc_register_cache): New function.
14662 (set_register_cache): Call it for each existing regcache.
14664 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14666 * server.h (init_registers): Remove prototype.
14668 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14669 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14670 instead of init_registers ().
14671 * linux-arm-low.c (init_registers_arm): Add prototype.
14672 (init_registers_arm_with_iwmmxt): Likewise.
14673 (the_low_target): Add initializer for arch_setup field.
14674 * linux-cris-low.c (init_registers_cris): Add prototype.
14675 (the_low_target): Add initializer for arch_setup field.
14676 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14677 (the_low_target): Add initializer for arch_setup field.
14678 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14679 (the_low_target): Add initializer for arch_setup field.
14680 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14681 (the_low_target): Add initializer for arch_setup field.
14682 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14683 (the_low_target): Add initializer for arch_setup field.
14684 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14685 (the_low_target): Add initializer for arch_setup field.
14686 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14687 (init_registers_mips64_linux): Likewise.
14688 (the_low_target): Add initializer for arch_setup field.
14689 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14690 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14691 (the_low_target): Add initializer for arch_setup field.
14692 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14693 (init_registers_powerpc_64): Likewise.
14694 (the_low_target): Add initializer for arch_setup field.
14695 * linux-s390-low.c (init_registers_s390): Add prototype.
14696 (init_registers_s390x): Likewise.
14697 (the_low_target): Add initializer for arch_setup field.
14698 * linux-sh-low.c (init_registers_sh): Add prototype.
14699 (the_low_target): Add initializer for arch_setup field.
14700 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14701 (the_low_target): Add initializer for arch_setup field.
14702 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14703 (the_low_target): Add initializer for arch_setup field.
14705 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14706 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14707 instead of init_registers ().
14708 * win32-arm-low.c (init_registers_arm): Add prototype.
14709 (the_low_target): Add initializer for arch_setup field.
14710 * win32-i386-low.c (init_registers_i386): Add prototype.
14711 (the_low_target): Add initializer for arch_setup field.
14713 * spu-low.c (init_registers_spu): Add prototype.
14714 (initialize_low): Call initialie_registers_spu () instead of
14715 initialize_registers ().
14717 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14719 * server.c (handle_v_requests): When handling the vRun and vAttach
14720 packets, if already debugging a process, don't kill it. Return an
14723 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14725 * server.c (handle_query): Correct length check.
14727 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14729 * win32-low.c (do_initial_child_stuff): Add process handle
14730 parameter. Set current_process_handle and current_process_id from the
14731 parameters. Clear globals.
14732 (win32_create_inferior): Don't set current_process_handle and
14733 current_process_id here. Instead pass them on the call to
14734 do_initial_child_stuff.
14735 (win32_attach): Likewise.
14736 (win32_clear_inferiors): New.
14737 (win32_kill): Don't close the current process handle or the
14738 current thread handle here. Instead call win32_clear_inferiors.
14739 (win32_detach): Don't open a new handle to the process. Call
14740 win32_clear_inferiors.
14741 (win32_join): Don't rely on current_process_handle; open a new
14742 handle using the process id.
14743 (win32_wait): Call win32_clear_inferiors when the inferior process
14746 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14748 * server.c (monitor_show_help): Add "exit".
14750 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14752 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14753 (clean): Add reg-xtensa.c.
14754 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14755 * configure.srv (xtensa*-*-linux*) New target.
14756 * linux-xtensa-low.c: New.
14757 * xtensa-xtregs.c: New.
14759 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14761 * hostio.c: Don't include errno.h.
14762 (errno_to_fileio_errno): Move to hostio-errno.
14763 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14764 error number outputting to the target->hostio_last_error callback.
14765 (hostio_packet_error): Use FILEIO_EINVAL directly.
14766 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14767 calls to hostio_error.
14768 * hostio-errno.c: New.
14769 * server.h (hostio_last_error_from_errno): Declare.
14770 * target.h (target_ops): Add hostio_last_error member.
14771 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14772 as hostio_last_error handler.
14773 * spu-low.c (spu_target_ops): Likewise.
14774 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14775 (wince_hostio_last_error): New functions.
14776 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14777 as hostio_last_error handler.
14778 (win32_target_ops) [!_WIN32_WCE]: Register
14779 hostio_last_error_from_errno as hostio_last_error handler.
14780 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14781 (hostio-errno.o): New rule.
14782 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14783 * configure.srv (srv_hostio_err_objs): New variable. Default to
14785 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14786 * configure: Regenerate.
14788 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14790 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14791 (linux_kill, linux_detach): Clean up the process list.
14792 * remote-utils.c (remote_open): Improve port number parsing.
14793 (putpkt_binary, input_interrupt): Only send interrupts if the target
14795 * server.c (extended_protocol): Make static.
14796 (attached): Define earlier.
14797 (exit_requested, response_needed, program_argv): New variables.
14798 (target_running): New.
14799 (start_inferior): Clear attached here.
14800 (attach_inferior): Set attached here.
14801 (require_running): Define.
14802 (handle_query): Use require_running and target_running. Implement
14804 (handle_v_attach, handle_v_run): New.
14805 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14806 (gdbserver_usage): Update.
14807 (main): Redo argument parsing. Handle --debug and --multi. Handle
14808 --attach along with other options or after the port. Save
14809 program_argv. Support no initial program. Resynchronize
14810 communication with GDB after an error. Handle "monitor exit".
14811 Use require_running and target_running. Always allow the extended
14812 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14813 restart in extended mode.
14814 * README: Refer to the GDB manual. Update --attach usage.
14816 2007-12-20 Andreas Schwab <schwab@suse.de>
14818 * linux-low.c (STACK_SIZE): Define.
14819 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14820 (linux_test_for_tracefork): Likewise.
14822 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14824 * linux-low.c (linux_wait_for_event): Update messages. Do not
14825 reinsert auto-delete breakpoints.
14826 * mem-break.c (struct breakpoint): Change return type of handler to
14828 (set_breakpoint_at): Update handler type.
14829 (reinsert_breakpoint_handler): Return 1 instead of calling
14831 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14833 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14834 * mem-break.h (set_breakpoint_at): Update handler type.
14835 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14836 * win32-low.c (auto_delete_breakpoint): New.
14837 (get_child_debug_event): Use it.
14839 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14841 * configure.ac: Check for pread and pwrite.
14842 * hostio.c (handle_pread): Fall back to lseek and read.
14843 (handle_pwrite): Fall back to lseek and write.
14844 * config.in, configure: Regenerated.
14846 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14848 * server.c (myresume): Add own_buf argument.
14849 (main): Update calls.
14851 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14853 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14854 * remote-utils.c (remote_open): Do not call disable_async_io.
14855 (block_async_io): Delete.
14856 (unblock_async_io): Make static.
14857 (initialize_async_io): New.
14858 * server.c (handle_v_cont): Handle async I/O here.
14859 (myresume): Likewise. Move other common resume tasks here...
14860 (main): ... from here. Call initialize_async_io. Disable async
14861 I/O before the main loop.
14862 * server.h (initialize_async_io): Declare.
14863 (block_async_io, unblock_async_io): Delete prototypes.
14864 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14866 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14868 * remote-utils.c (readchar): Allow binary data in received messages.
14870 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14872 * win32-low.c (attaching): New global.
14873 (win32_create_inferior): Clear the `attaching' global.
14874 (win32_attach): Set the `attaching' global.
14875 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14876 attaching. Only set a breakpoint at the entry point if not
14879 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14881 * server.c (main): Don't report dll events on the initial
14882 connection on attaches.
14884 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14886 * server.c (main): Relax numerical bases supported for the pid of
14887 the --attach command line argument.
14889 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14891 * win32-low.c (win32_attach): Call OpenProcess before
14892 DebugActiveProcess, not after. Add last error output to error
14895 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14897 * win32-low.c (win32_get_thread_context)
14898 (win32_set_thread_context): New functions.
14899 (thread_rec): Use win32_get_thread_context.
14900 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14901 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14904 2007-12-03 Leo Zayas
14905 Pedro Alves <pedro_alves@portugalmail.pt>
14907 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14909 (child_add_thread): Minor cleanup.
14910 (child_continue): Resume artificially suspended threads before
14911 calling ContinueDebugEvent.
14912 (suspend_one_thread): New.
14913 (fake_breakpoint_event): New.
14914 (get_child_debug_event): Change return type to int. Check here if
14915 gdb sent an interrupt request. If a soft interrupt was requested,
14916 fake a breakpoint event. Return 0 if there is no event to handle,
14918 (win32_wait): Don't check here if gdb sent an interrupt request.
14919 Ensure there is a valid event to handle.
14920 (win32_request_interrupt): Add soft interruption method as last
14923 2007-12-03 Leo Zayas
14924 Pedro Alves <pedro_alves@portugalmail.pt>
14926 * win32-low.h (win32_thread_info): Add descriptions to the
14927 structure members. Replace `suspend_count' counter by a
14929 * win32-low.c (thread_rec): Update condition of when to get the
14930 context from the inferior. Rely on ContextFlags being set if it
14931 has already been retrieved. Only suspend the inferior thread if
14932 we haven't already. Warn if that fails.
14933 (continue_one_thread): s/suspend_count/suspended/. Only call
14934 ResumeThread once. Warn if that fails.
14936 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14938 * win32-low.c (win32_wait): Don't read from the inferior when it
14939 has already exited.
14941 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14943 * Makefile.in (win32_low_h): New variable.
14944 (win32-low.o): Add dependency on $(win32_low_h).
14945 (win32-arm-low.o, win32-i386-low.o): New rules.
14947 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14949 * hostio.c: Correct copyright year.
14951 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14953 * Makefile.in (OBS): Add hostio.o.
14954 (hostio.o): New rule.
14955 * server.h (handle_vFile): Declare.
14956 * hostio.c: New file.
14957 * server.c (handle_v_requests): Take packet_len and new_packet_len
14958 for binary packets. Call handle_vFile.
14959 (main): Update call to handle_v_requests.
14961 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14963 * linux-low.c: Include <sched.h>.
14965 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14967 * linux-low.c (linux_tracefork_grandchild): New.
14968 (linux_tracefork_child): Use clone.
14969 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14971 2007-10-31 Joel Brobecker <brobecker@adacore.com>
14973 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14975 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14977 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14979 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14981 * inferiors.c (change_inferior_id): Delete.
14982 (add_pid_to_list, pull_pid_from_list): New.
14983 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14984 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14985 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14986 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14987 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14988 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14989 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14990 (using_threads): Always set to 1.
14991 (handle_extended_wait): New.
14992 (add_process): Do not set TID.
14993 (linux_create_inferior): Set must_set_ptrace_flags.
14994 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14995 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14996 (linux_thread_alive): Rename TID argument to LWPID.
14997 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14998 (linux_wait_for_event): Do not use TID or check using_threads. Update
14999 call to dead_thread_notify. Call handle_extended_wait.
15000 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15001 (send_sigstop): Delete sigstop_sent.
15002 (wait_for_sigstop): Avoid TID.
15003 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15004 (linux_test_for_tracefork): New.
15005 (linux_lookup_signals): Use thread_db_active and
15006 linux_supports_tracefork_flag.
15007 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15008 * linux-low.h (get_process_thread): Avoid TID.
15009 (struct process_ifo): Move thread_known and tid to the end. Remove
15011 (linux_attach_lwp, thread_db_init): Update prototypes.
15012 * server.h (change_inferior_id): Delete prototype.
15013 (add_pid_to_list, pull_pid_from_list): New prototypes.
15014 * thread-db.c (thread_db_use_events): New.
15015 (find_first_thread): Rename to...
15016 (find_one_thread): ...this. Update callers and messages. Do not
15017 call fatal. Check thread_db_use_events. Do not call
15018 change_inferior_id or new_thread_notify.
15019 (maybe_attach_thread): Update. Do not call new_thread_notify.
15020 (thread_db_init): Set thread_db_use_events. Check use_events.
15021 * utils.c (fatal, warning): Correct message prefix.
15023 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15025 * Makefile.in (clean): Remove new files.
15026 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15027 (powerpc-64.o, powerpc-64.c): New rules.
15028 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15029 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15031 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15033 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15034 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15035 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15036 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15037 (target_regsets): Add AltiVec and SPE register sets.
15038 * configure.ac: Check for AltiVec and SPE.
15039 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15040 (ppc_fill_vrregset, ppc_store_vrregset): New.
15041 (target_regsets): Add AltiVec register set.
15042 * configure: Regenerated.
15044 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15046 * linux-low.c (O_LARGEFILE): Define.
15047 (linux_read_memory): Use /proc/PID/mem.
15048 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15049 * configure, config.in: Regenerated.
15051 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15053 * linux-low.c (linux_wait_for_event): Do not pass signals while
15056 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15058 * win32-low.c (create_process): New.
15059 (win32_create_inferior): Use create_process instead of
15060 CreateProcess. If create_process failed retry appending an ".exe"
15061 suffix. Store the GetLastError result immediatelly after
15062 create_process calls and use it on the call to error.
15064 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15066 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15068 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15070 * configure.ac: Switch license to GPLv3.
15072 2007-08-01 Michael Snyder <msnyder@access-company.com>
15074 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15076 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15078 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15080 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15081 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15082 CloseToolhelp32Snapshot.
15083 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15084 CloseToolhelp32Snapshot.
15086 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15088 * server.c (main): Check for inferior exit before main loop.
15090 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15092 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15093 instead of on tmp_desc.
15095 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15096 Daniel Jacobowitz <dan@codesourcery.com>
15098 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15099 (add_thread): Minor cleanups.
15100 (clear_inferiors): Move lower in the file. Clear the DLL
15102 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15103 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15104 (xml_escape_text): New.
15105 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15107 (handle_v_cont): Report errors.
15108 (gdbserver_version): Update.
15109 (main): Correct size of own_buf. Do not report initial DLL events.
15110 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15111 (unloaded_dll, xml_escape_text): New.
15112 * win32-low.c (enum target_waitkind): Update comments.
15113 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15114 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15115 (win32_EnumProcessModules, win32_GetModuleInformation)
15116 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15117 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15118 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15119 (win32_Module32First, win32_Module32Next, load_toolhelp)
15120 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15121 (get_child_debug_event): Handle DLL events.
15122 (win32_wait): Likewise.
15124 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15126 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15127 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15129 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15131 * win32-low.c (handle_output_debug_string): Ignore event if not
15134 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15136 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15138 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15140 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15142 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15144 * inferiors.c (change_inferior_id): Add comment.
15145 * linux-low.c (check_removed_breakpoint): Add an early
15146 prototype. Improve debug output.
15147 (linux_attach): Doc update.
15148 (linux_detach_one_process, linux_detach): Clean up before releasing
15150 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15151 * linux-low.h (struct process_info): Doc improvement.
15152 * mem-break.c (delete_all_breakpoints): New.
15153 * mem-break.h (delete_all_breakpoints): New prototype.
15154 * thread-db.c (find_first_thread): New.
15155 (thread_db_create_event): Call it instead of
15156 thread_db_find_new_threads. Clean up unused variables.
15157 (maybe_attach_thread): Remove first thread handling.
15158 (thread_db_find_new_threads): Use find_first_thread.
15159 (thread_db_get_tls_address): Likewise.
15161 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15163 * thread-db.c (thread_db_find_new_threads): Add prototype.
15164 (thread_db_create_event): Check for the main thread before adding
15166 (maybe_attach_thread): Only enable event reporting if TID == 0.
15167 (thread_db_get_tls_address): Check for new threads.
15169 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15171 * linux-low.c (linux_create_inferior): Try execv before execvp.
15172 * spu-low.c (spu_create_inferior): Likewise.
15174 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15176 * linux-low.c (linux_create_inferior): Change execv to execvp.
15177 * spu-low.c (spu_create_inferior): Likewies.
15179 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15181 * Makefile.in (clean): Clean new files instead of deleted ones.
15182 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15183 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15185 * configure.srv: Specify XML files and new regformats for MIPS and
15187 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15188 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15189 an entry for the restart register.
15190 (mips_cannot_fetch_register, mips_cannot_store_register)
15191 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15192 register names to match the XML descriptions.
15193 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15194 restart register instead of $0.
15196 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15197 Markus Deuling <deuling@de.ibm.com>
15199 * remote-utils.c (decode_xfer_write): New function.
15200 * server.h (decode_xfer_write): Add prototype.
15201 * server.c (handle_query): Add PACKET_LEN argument. Support
15202 qXfer:spu:read and qXfer:spu:write packets.
15203 (main): Pass packet_len to handle_query.
15204 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15205 * target.h (target_ops): Add qxfer_spu.
15207 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15209 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15210 accessing non-seekable spufs files.
15212 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15214 * server.c (handle_query): Add reply for qC packet.
15216 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15217 Leo Zayas <lerele@champenstudios@com>
15219 * server.h (check_remote_input_interrupt_request): New function.
15220 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15221 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15222 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15223 (check_remote_input_interrupt_request): New function.
15224 * server.h (check_remote_input_interrupt_request): Declare.
15225 * win32-low.c (winapi_DebugBreakProcess,
15226 winapi_GenerateConsoleCtrlEvent): New typedefs.
15227 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15229 (win32_wait): Check for remote interrupt request
15230 with check_remote_input_interrupt_request.
15231 (win32_request_interrupt): New function.
15232 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15234 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15236 * win32-low.c (debug_registers_changed,
15237 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15238 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15239 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15240 (thread_rec): Get context using the low target.
15241 (child_add_thread): Call thread_added on the low target,
15242 which does the same thing.
15244 (do_initial_child_stuff): Remove debug registers references.
15245 Set context using the low target. Resume threads after
15246 setting the contexts.
15247 (child_continue): Remove dead variable. Remove debug
15248 registers references.
15249 (child_fetch_inferior_registers): Go through the low target.
15250 (do_child_store_inferior_registers): Remove.
15251 (child_store_inferior_registers): Go through the low target.
15252 (win32_resume): Remove debug registers references.
15253 Set context using the low target.
15254 (handle_exception): Change return type to void. Don't record
15255 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15256 first chance exception.
15257 (get_child_debug_event): Change return type to void. Remove
15258 goto loop. Always return after waiting for debug event.
15259 (win32_wait): Convert to switch statement. Handle spurious
15262 * win32-i386-low.c (debug_registers_changed,
15263 debug_registers_used): New.
15264 (initial_stuff): Rename to ...
15265 (i386_initial_stuff): ... this. Clear debug registers
15267 (store_debug_registers): Delete.
15268 (i386_get_thread_context): New.
15269 (load_debug_registers): Delete.
15270 (i386_set_thread_context): New.
15271 (i386_thread_added): New.
15272 (single_step): Rename to ...
15273 (i386_single_step): ... this.
15274 (do_fetch_inferior_registers): Rename to ...
15275 (i386_fetch_inferior_register): ... this.
15276 (i386_store_inferior_register): New.
15277 (the_low_target): Adapt to new interface.
15279 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15280 (arm_get_thread_context): New.
15281 (arm_set_thread_context): New.
15283 (do_fetch_inferior_registers): Rename to ...
15284 (arm_fetch_inferior_register): ... this.
15285 (arm_store_inferior_register): New.
15286 (arm_wince_breakpoint): Reimplement as unsigned long.
15287 (arm_wince_breakpoint_len): Define.
15288 (the_low_target): Adapt to new interface.
15290 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15291 load_debug_registers. Add get_thread_context, set_thread_context,
15292 thread_added and store_inferior_register. Rename
15293 fetch_inferior_registers to fetch_inferior_register.
15294 (regptr): Remove declaration.
15296 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15298 * linux-low.c (linux_detach): Change return type to int. Return 0.
15299 * spu-low.c (spu_detach): Likewise.
15301 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15303 * target.h (target_ops): Change return type of detach to int.
15305 (join_inferior): New.
15306 * server.c (main): Don't skip detach support on mingw32.
15307 If the inferior doesn't support detaching return error.
15308 Call join_inferior instead of using waitpid.
15309 * linux-low.c (linux_join): New.
15310 (linux_target_op): Add linux_join.
15311 * spu-low.c (spu_join): New.
15312 (spu_target_ops): Add spu_join.
15313 * win32-low.c (win32_detach): Adapt to new interface.
15314 Reopen current_process_handle before detaching. Issue a child
15315 resume before detaching.
15317 (win32_target_op): Add win32_join.
15319 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15321 * win32-low.c (win32-attach): Fix return value.
15322 * target.h (target_ops): Describe ATTACH return values.
15324 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15326 * win32-low.c (GETPROCADDRESS): Define.
15327 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15328 (winapi_DebugSetProcessKillOnExit): Likewise.
15329 (win32_create_inferior): Force usage of ansi CreateProcessA.
15330 (win32_attach): Use GETPROCADDRESS.
15331 (win32_detach): Likewise.
15333 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15335 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15337 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15339 * win32-low.c: Commit leftover changes from 2007-03-29.
15341 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15343 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15344 fields short instead of int. Add explicit padding.
15345 (i387_cache_to_fsave): Remove unnecessary casts.
15346 (i387_fsave_to_cache): Doc fix.
15347 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15349 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15351 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15352 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15354 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15356 * configure.srv (arm*-*-mingw32ce*): Move near the other
15359 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15361 * configure.ac: Add errno checking.
15362 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15363 sys/file.h and malloc.h.
15364 (AC_CHECK_DECLS): Add perror.
15365 (srv_mingwce): Handle.
15366 * configure.srv (i[34567]86-*-cygwin*): Add
15367 win32-i386-low.o to srv_tgtobj.
15368 (i[34567]86-*-mingw*): Likewise.
15369 (arm*-*-mingw32ce*): Add case.
15370 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15371 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15372 [__MINGW32CE__] (strerror): New function.
15373 [__MINGW32CE__] (errno): Define to GetLastError.
15374 [__MINGW32CE__] (COUNTOF): New macro.
15375 (remote_open): Remove extra close call.
15376 * mem-break.c (delete_breakpoint_at): New function.
15377 * mem-break.h (delete_breakpoint_at): Declare.
15378 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15379 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15380 [USE_WIN32API] (read, write): Add char* casts.
15381 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15382 * server.h: Include wincecompat.h on Windows CE.
15383 [HAVE_ERRNO_H]: Check.
15384 (perror): Declare if not declared.
15385 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15386 (perror_with_name): Remove errno declaration.
15387 * wincecompat.h: New.
15388 * wincecompat.c: New.
15389 * win32-low.h: New.
15390 * win32-arm-low.c: New.
15391 * win32-i386-low.c: New.
15392 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15393 (OUTMSG2): Make it safe.
15395 (COUNTOF): New macro.
15396 (NUM_REGS): Get it from the low target.
15397 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15398 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15399 (thread_rec): Let low target handle debug registers.
15400 (child_add_thread): Likewise.
15401 (child_init_thread_list): Likewise.
15402 (continue_one_thread): Likewise.
15404 (do_child_fetch_inferior_registers): Move to ...
15405 * win32-i386-low.c: ... here, and rename to ...
15406 (do_fetch_inferior_registers): ... this.
15407 * win32-low.c (child_fetch_inferior_registers):
15408 Go through the low target.
15409 (do_child_store_inferior_registers): Use regptr.
15410 (strwinerror): New function.
15411 (win32_create_inferior): Handle Windows CE.
15412 Use strwinerror instead of strerror on Windows error
15413 codes. Add program to the error output.
15414 Don't close the main thread handle on Windows CE.
15415 (win32_attach): Use coredll.dll on Windows CE.
15416 (win32_kill): Close current process and current
15418 (win32_detach): Use coredll.dll on Windows CE.
15419 (win32_resume): Let low target handle debug registers, and
15421 (handle_exception): Add/Remove initial breakpoint. Avoid
15422 non-existant WSTOPSIG on Windows CE.
15423 (win32_read_inferior_memory): Cast to remove warning.
15424 (win32_arch_string): Go through the low target.
15425 (initialize_low): Call set_breakpoint_data with the low
15426 target's breakpoint.
15427 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15428 FOP_REGNUM, mappings): Move to ...
15429 * win32-i386-low.c: ... here.
15430 * win32-low.c (win32_thread_info): Move to ...
15431 * win32-low.h: ... here.
15432 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15433 win32-arm-low.c and wincecompat.c.
15434 (all:): Add $EXEEXT.
15435 (install-only:): Likewise.
15436 (gdbserver:): Likewise.
15437 (gdbreplay:): Likewise.
15438 * config.in: Regenerate.
15439 * configure: Regenerate.
15441 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15443 * win32-low.c: Rename typedef thread_info to
15444 win32_thread_info throughout.
15446 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15448 * win32-i386-low.c: Rename to ...
15449 * win32-low.c: ... this.
15450 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15451 * Makefile.in: Likewise.
15453 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15455 * remote-utils.c (monitor_output): Constify msg parameter.
15456 * server.h (monitor_output): Likewise.
15457 * win32-i386-low.c (handle_output_debug_string): New.
15458 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15459 handle_output_debug_string.
15460 (get_child_debug_event): Likewise.
15462 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15464 * server.c (main): Correct strtoul check.
15466 2007-03-27 Jon Ringle <jon@ringle.org>
15468 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15470 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15472 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15474 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15476 * terminal.h: Check HAVE_SGTTY_H.
15478 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15480 * remote-utils.c (remote_open): Print out the assigned port number.
15482 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15484 * remote-utils.c (monitor_output): New function.
15485 * server.c (debug_threads): Define here.
15486 (monitor_show_help): New function.
15487 (handle_query): Handle qRcmd.
15488 (main): Do not handle 'd' packet.
15489 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15490 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15493 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15495 * Makefile.in (EXEEXT): New.
15496 (clean): Use $(EXEEXT).
15498 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15500 * target.h (target_ops): Rename send_signal to request_interrupt,
15501 and remove enum target_signal parameter.
15502 * linux-low.c (linux_request_interrupt): Rename from
15503 linux_send_signal, and always send SIGINT.
15504 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15505 and always send SIGINT.
15506 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15508 (input_interrupt): Likewise.
15510 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15512 * server.c (get_features_xml): Check if target implemented
15514 * win32-i386-low.c (win32_arch_string): New.
15515 (win32_target_ops): Add win32_arch_string as arch_string member.
15517 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15519 * spu-low.c (spu_arch_string): New.
15520 (spu_target_ops): Add spu_arch_string.
15522 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15524 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15525 * configure.ac: Do not check for terminal.h.
15526 * configure, config.in: Regenerated.
15528 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15530 * Makefile.in (OBS): Add $(XML_BUILTIN).
15531 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15533 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15534 (arm-with-iwmmxt.c): New.
15535 * config.in, configure: Regenerate.
15536 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15537 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15538 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15539 (arm*-*-linux*): Add iWMMXt and regset support.
15540 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15541 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15542 (arm_store_wmmxregset, target_regsets): New.
15543 * server.c (get_features_xml): Take annex argument. Check builtin
15545 (handle_query): Handle multiple annexes.
15547 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15549 * remote-utils.c [USE_WIN32API] (read, write): Define.
15550 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15553 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15555 * linux-i386-low.c (the_low_target): Set arch_string.
15556 * linux-x86-64-low.c (the_low_target): Likewise.
15557 * linux-low.c (linux_arch_string): New.
15558 (linux_target_ops): Add it.
15559 * linux-low.h (struct linux_target_ops): Add arch_string.
15560 * server.c (write_qxfer_response): Use const void * for DATA.
15561 (get_features_xml): New.
15562 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15563 * target.h (struct target_ops): Add arch_string method.
15565 2007-01-03 Denis Pilat <denis.pilat@st.com>
15566 Daniel Jacobowitz <dan@codesourcery.com>
15568 * linux-low.c (linux_kill): Handle being called with no threads.
15569 * win32-i386-low.c (win32_kill): Likewise.
15570 (get_child_debug_event): Clear current_process_handle.
15572 2006-12-30 Denis PILAT <denis.pilat@st.com>
15573 Daniel Jacobowitz <dan@codesourcery.com>
15575 * remote-utils.c (remote_open): Check the type of specified
15576 serial port devices before opening them.
15577 * server.c (main): Kill the inferior if an error occurs during
15578 the first remote_open.
15580 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15582 * README: Update supported targets.
15584 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15586 * Makefile.in (clean): Remove reg-mips64.c.
15587 (reg-mips64.c, reg-mips64.o): New rules.
15588 * configure.srv: Handle mips64. Include regset support for mips.
15589 * linux-mips-low.c (union mips_register): New.
15590 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15591 (mips_breakpoint, mips_breakpoint_at): Use int.
15592 (mips_collect_register, mips_supply_register)
15593 (mips_collect_register_32bit, mips_supply_register_32bit)
15594 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15595 (mips_store_fpregset, target_regsets): New.
15596 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15598 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15600 * configure.srv: Add target "spu*-*-*".
15601 * Makefile.in (clean): Remove reg-spu.c.
15602 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15603 * spu-low.c: New file.
15605 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15607 * configure.ac: Correct td_thr_tls_get_addr test.
15608 * configure: Regenerated.
15610 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15612 * linux-low.c (linux_wait_for_event): Reformat. Use the
15613 pass_signals array.
15614 * remote-utils.c (decode_address_to_semicolon): New.
15615 * server.c (pass_signals, handle_general_set): New.
15616 (handle_query): Mention QPassSignals for qSupported.
15617 (main): Call handle_general_set.
15618 * server.h (pass_signals, decode_address_to_semicolon): New.
15620 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15622 * server.c (handle_query): Correct error handling for read_auxv.
15624 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15626 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15627 and srv_linux_thread_db to yes.
15628 * linux-s390-low.c (s390_fill_gregset): New function.
15629 (target_regsets): Define data structure.
15631 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15633 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15634 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15635 * config.in, configure: Regenerated.
15636 * inferiors.c (gdb_id_to_thread): New function.
15637 (gdb_id_to_thread_id): Use it.
15638 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15639 * linux-low.h (struct process_info): Add th member.
15640 (thread_db_get_tls_address): New prototype.
15641 * remote-utils.c (decode_address): Make non-static.
15642 * server.c (handle_query): Handle qGetTLSAddr.
15643 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15644 * target.h (struct target_ops): Add get_tls_address.
15645 * thread-db.c (maybe_attach_thread): Save the thread handle.
15646 (thread_db_get_tls_address): New.
15648 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15650 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15651 (linux_resume_one_process): Take a siginfo_t *. Update all
15652 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15653 (struct pending_signals): Add a siginfo_t.
15654 (linux_wait_for_process): Always set last_status.
15655 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15656 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15657 * linux-low.h (struct process_info): Add last_status.
15659 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15661 * remote-utils.c (try_rle): New function.
15662 (putpkt_binary): Use it.
15664 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15666 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15667 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15668 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15669 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15670 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15673 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15675 * server.c (terminal_fd): New variable.
15676 (old_foreground_pgrp): Likewise.
15677 (restore_old_foreground_pgrp): New function.
15678 (start_inferior): Record the terminal file descriptor in terminal_fd
15679 and its original foreground group in old_foreground_pgrp. Register
15680 restore_old_foreground_pgrp with atexit().
15682 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15684 * server.c (handle_query): Correct qPart to qXfer.
15686 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15688 * configure.ac: Check for more headers which are missing on
15689 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15690 * configure.srv: Add Cygwin and mingw32.
15691 * remote-utils.c: Don't include headers unconditionally which
15692 are missing on mingw32. Include <winsock.h> for mingw32.
15693 (remote_open): Adjust for mingw32 support. Flush
15694 standard error after writing to it.
15695 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15696 (unblock_async_io, enable_async_io, disable_async_io)
15697 (readchar, getpkt): Update for Winsock support.
15698 (prepare_resume_reply): Expect a protocol signal number.
15699 * server.c: Disable <sys/wait.h> on mingw32.
15700 (start_inferior): Adjust for mingw32 support. Flush
15701 standard error after writing to it.
15702 (attach_inferior): Likewise. Use protocol signal
15704 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15706 * win32-i386-low.c: New file.
15707 * Makefile.in (XM_CLIBS): Set.
15708 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15709 (win32-i386-low.o): New dependency rule.
15710 * linux-low.c (linux_wait): Use target signal numbers.
15711 * target.h (struct target_ops): Doc fix.
15712 * server.h (target_signal_to_name): New prototype.
15713 * gdbreplay.c: Don't include headers unconditionally which
15714 are missing on mingw32. Include <winsock.h> for mingw32.
15715 (remote_close, remote_open): Adjust for Winsock support.
15716 * configure, config.in: Regenerated.
15718 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15720 * server.c (decode_xfer_read, write_qxfer_response): New.
15721 (handle_query): Take a packet length argument. Handle
15722 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15723 the qSupported response.
15724 (main): Update call to handle_query.
15726 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15728 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15729 (putpkt_binary): Renamed from putpkt and adjusted for binary
15731 (putpkt): New wrapper for putpkt_binary.
15732 (readchar): Don't mask off the high bit.
15733 (decode_X_packet): New function.
15734 * server.c (main): Call putpkt_binary if a handler sets the packet
15735 length. Save the length of the incoming packet. Handle 'X'.
15736 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15738 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15740 * server.c (handle_query): Handle qSupported.
15742 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15744 * remote-utils.c (all_symbols_looked_up): New variable.
15745 (look_up_one_symbol): Check it.
15746 * server.h (look_up_one_symbol): New declaration.
15747 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15749 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15751 * Makefile.in (linux-arm-low.o): Update dependencies.
15752 * linux-arm-low.c: Include "gdb_proc_service.h".
15753 (PTRACE_GET_THREAD_AREA): Define.
15754 (ps_get_thread_area): New function.
15756 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15758 * configure.srv (m68k*-*-uclinux*): New target.
15759 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15760 (linux_resume_one_process): Remove extraneous cast.
15761 (linux_read_offsets): New.
15762 (linux_target_op): Add linux_read_offsets on mmuless systems.
15763 * server.c (handle_query): Add qOffsets logic.
15764 * target.h (struct target_ops): Add read_offsets.
15766 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15768 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15769 (PTRACE_GET_THREAD_AREA): Define.
15770 (ps_get_thread_area): New function.
15771 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15772 (linux-x86-64-low.o): Update.
15774 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15776 * configure.ac: Remove checks for prfpregset_t.
15777 * gdb_proc_service.h: New file.
15778 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15779 new "gdb_proc_service.h".
15780 * proc-service.c: Likewise.
15781 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15782 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15783 * Makefile.in (gdb_proc_service_h): Updated.
15784 * configure, config.in: Regenerated.
15786 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15788 * remote-utils.c (prepare_resume_reply): Move declaration
15789 of gdb_id_from_wait to the top of the block.
15791 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15793 * linux-low.c (regsets_store_inferior_registers): Read the regset
15794 from the target before filling it.
15796 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15798 * server.c (attach_inferior): Return SIGTRAP for a successful
15801 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15803 * Makefile.in (OBS): Add version.o.
15804 (STAGESTUFF): Delete.
15805 (version.o): Add dependencies.
15806 (version.c): Replace rule.
15807 (clean): Remove version.c.
15808 * server.c (gdbserver_version): New.
15809 (gdbserver_usage): Use printf.
15810 (main): Handle --version and --help.
15811 * server.h (version, host_name): Add declarations.
15813 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15825 * linux-x86-64-low.c:
15827 * linux-s390-low.c:
15828 * linux-ppc64-low.c:
15830 * linux-mips-low.c:
15831 * linux-m68k-low.c:
15832 * linux-m32r-low.c:
15835 * linux-ia64-low.c:
15836 * linux-i386-low.c:
15837 * linux-crisv32-low.c:
15849 * gdbserver.1: Add (C) after Copyright. Update the FSF
15852 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15854 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15855 (arm_breakpoint_at): Recognize both breakpoints.
15856 (the_low_target): Use the correct breakpoint instruction.
15858 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15860 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15861 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15862 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15863 (the_low_target): Update.
15865 2005-10-25 Andreas Schwab <schwab@suse.de>
15867 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15869 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15870 (ia64_num_regs): Reduce to 462.
15872 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15874 * acinclude.m4: Correct quoting.
15875 * aclocal.m4: Regenerated.
15877 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15878 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15879 (thread_db_init): Call thread_db_err_str.
15880 * configure.ac: Check for TD_VERSION.
15881 * config.in, configure: Regenerated.
15883 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15885 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15887 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15889 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15890 is not available. Define HAVE_PTRACE_GETREGS if it is.
15891 * config.in, configure: Regenerated.
15892 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15893 * linux-i386-low.c, linux-m68k-low.c: Update to use
15894 HAVE_PTRACE_GETREGS.
15895 * linux-low.c (regsets_fetch_inferior_registers)
15896 (regsets_store_inferior_registers): Only return 0 if we processed
15898 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15899 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15901 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15903 * inferiors.c (struct thread_info): Add gdb_id.
15904 (add_thread): Add gdb_id argument.
15905 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15906 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15907 calls to add_thread.
15908 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15909 * server.c (handle_query): Use thread_to_gdb_id.
15910 (handle_v_cont, main): Use gdb_id_to_thread_id.
15911 * server.h (add_thread): Update prototype.
15912 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15915 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15917 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15918 left-padded registers.
15919 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15920 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15922 2005-07-01 Steve Ellcey <sje@cup.hp.com>
15924 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15925 * configure: Regenerate.
15926 * config.in: Regenerate.
15927 * server.h (NEED_DECLARATION_STRERROR):
15928 Replace with !HAVE_DECL_STRERROR.
15930 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15932 * linux-low.c (linux_wait, linux_send_signal): Don't test
15933 an unsigned long variable for > 0 if it could be MAX_ULONG.
15934 * server.c (myresume): Likewise.
15935 * target.c (set_desired_inferior): Likewise.
15937 2005-06-13 Mark Kettenis <kettenis@gnu.org>
15939 * configure.ac: Simplify and improve check for socklen_t.
15940 * configure, config.in: Regenerate.
15942 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15944 * acconfig.h: Remove.
15945 * configure.ac: Add a test for socklen_t. Use three-argument
15946 AC_DEFINE throughout.
15947 * config.in: Regenerated using autoheader 2.59.
15948 * configure: Regenerated.
15950 * gdbreplay.c (socklen_t): Provide a default.
15951 (remote_open): Use socklen_t.
15952 * remote-utils.c (socklen_t): Provide a default.
15953 (remote_open): Use socklen_t.
15954 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15957 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15959 * linux-low.c (linux_read_memory, linux_write_memory)
15960 (linux_read_auxv): Likewise.
15961 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15962 (check_mem_write): Likewise.
15963 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15965 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15966 (registers_from_string, register_data): Likewise.
15967 * server.c (handle_query, main): Likewise.
15968 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15969 (decode_M_packet): Likewise.
15970 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15971 * target.h (struct target_ops): Update read_memory, write_memory,
15973 (read_inferior_memory, write_inferior_memory): Update.
15974 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15975 to unsigned char *.
15976 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15977 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15978 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15979 linux-s390-low.c, linux-sh-low.c: Update for changes in
15980 read_inferior_memory and the_low_target->breakpoint.
15982 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15984 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15985 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15986 * configure.srv: Add powerpc64-*-linux*.
15987 * linux-ppc64-low.c: New file.
15989 2005-05-23 Orjan Friberg <orjanf@axis.com>
15991 * linux-cris-low.c: New file with support for CRIS.
15992 * linux-crisv32-low.c: Ditto for CRISv32.
15993 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15994 (clean): Add reg-cris.c and reg-crisv32.c.
15995 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
15996 reg-crisv32.o, and reg-crisv32.c to make rules.
15997 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15998 recognized targets.
16000 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16002 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16003 of sizeof (PTRACE_XFER_TYPE).
16004 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16006 2005-05-12 Orjan Friberg <orjanf@axis.com>
16008 * target.h (struct target_ops): Add insert_watchpoint,
16009 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16010 pointers for hardware watchpoint support.
16011 * linux-low.h (struct linux_target_ops): Ditto.
16012 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16013 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16014 to linux_target_ops.
16015 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16017 * server.c (main): Recognize 'Z' and 'z' packets.
16019 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16021 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16022 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16023 (the_low_target): Add new members.
16025 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16027 * proc-service.c (ps_lgetregs): Search all_processes instead of
16030 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16032 * server.c (start_inferior): Change return type to int.
16033 (attach_inferior): Change sigptr to int *.
16034 (handle_v_cont, handle_v_requests): Change signal to int *.
16035 (main): Change signal to int.
16037 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16039 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16040 * configure.srv: Add m32r*-*-linux*.
16041 * linux-m32r-low.c: New file.
16043 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16045 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16047 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16049 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16050 Take unsigned long arguments for PIDs.
16051 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16052 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16053 (wait_for_sigstop, linux_resume_one_process)
16054 (regsets_fetch_inferior_registers, linux_send_signal)
16055 (linux_read_auxv): Likewise. Update the types of variables holding
16056 PIDs. Update format string specifiers.
16057 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16058 * remote-utils.c (prepare_resume_reply): Likewise.
16059 * server.c (cont_thread, general_thread, step_thread)
16060 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16062 (handle_query): Update format specifiers.
16063 (handle_v_cont, main): Use strtoul for thread IDs.
16064 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16065 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16066 (general_thread, step_thread, thread_from_wait)
16067 (old_thread_from_wait): Update.
16068 * target.h (struct thread_resume): Use unsigned long for THREAD.
16069 (struct target_ops): Use unsigned long for arguments to attach and
16072 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16074 * acinclude.m4: Include bfd/bfd.m4 directly.
16075 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16076 <agriffis@toolchain.org>.
16077 * aclocal.m4, configure: Regenerated.
16079 2005-01-07 Andrew Cagney <cagney@gnu.org>
16081 * configure.ac: Rename configure.in, require autoconf 2.59.
16082 * configure: Re-generate.
16084 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16086 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16087 LIBS when finished.
16088 * aclocal.m4: Regenerated.
16089 * configure: Regenerated.
16091 2004-11-21 Andreas Schwab <schwab@suse.de>
16093 * linux-m68k-low.c (m68k_num_gregs): Define.
16094 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16095 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16096 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16097 (m68k_breakpoint_at): New. Add to the_low_target.
16099 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16100 srv_linux_thread_db to yes.
16102 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16104 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16105 (ARCH_SET_FS): Likewise.
16106 (ARCH_GET_FS): Likewise.
16107 (ARCH_GET_GS): Likewise.
16109 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16111 * linux-i386-low.c (ps_get_thread_area): New.
16112 * linux-x86-64-low.c (ps_get_thread_area): New.
16113 * linux-low.c: Include <sys/syscall.h>.
16114 (linux_kill_one_process): Don't kill the first thread here.
16115 (linux_kill): Kill the first thread here.
16116 (kill_lwp): New function.
16117 (send_sigstop, linux_send_signal): Use it.
16118 * proc-service.c: Clean up #ifdefs.
16119 (fpregset_info): Delete.
16120 (ps_lgetregs): Update and enable implementation.
16121 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16123 * remote-utils.c (struct sym_cache, symbol_cache): New.
16124 (input_interrupt): Print a clearer message.
16125 (async_io_enabled): New variable.
16126 (enable_async_io, disable_async_io): Use it. Update comments.
16127 (look_up_one_symbol): Use the symbol cache.
16128 * thread-db.c (thread_db_look_up_symbols): New function.
16129 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16131 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16133 * configure.in: Test for -rdynamic.
16134 * configure: Regenerated.
16135 * Makefile (INTERNAL_LDFLAGS): New.
16136 (gdbserver, gdbreplay): Use it.
16138 2004-09-02 Andrew Cagney <cagney@gnu.org>
16140 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16142 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16144 * linux-low.c (linux_wait): Clear all_processes list also.
16146 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16148 * linux-low.c: Include <errno.h>. Remove extern declaration of
16151 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16153 * gdbreplay.c, server.h, utils.c: Update copyright years.
16155 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16157 * server.c (main): Print child status or termination signal from
16158 variable 'signal', not 'sig'.
16160 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16162 * linux-low.c (linux_read_memory): Change return type to
16163 int. Check for and return error from ptrace().
16164 * target.c (read_inferior_memory): Change return type to int. Pass
16165 back return status from the_target->read_memory().
16166 * target.h (struct target_ops): Adapt *read_memory() prototype.
16168 (read_inferior_memory): Adapt prototype.
16169 * server.c (main): Return an error packet if
16170 read_inferior_memory() returns an error.
16172 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16174 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16175 Unify with other clean targets.
16177 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16179 * server.c (handle_v_cont): Call set_desired_inferior.
16181 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16183 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16185 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16187 * linux-low.c (linux_wait): Unblock async I/O.
16188 (linux_resume): Block and enable async I/O.
16189 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16190 * server.h (block_async_io, unblock_async_io): Add prototypes.
16192 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16194 * remote-utils.c (remote_open): Print a status notice after
16195 opening a TCP port.
16196 * server.c (attach_inferior): Print a status notice after
16199 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16201 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16203 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16205 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16207 * server.c, target.h: Update copyright years.
16209 2004-02-25 Roland McGrath <roland@redhat.com>
16211 * target.h (struct target_ops): New member `read_auxv'.
16212 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16213 * linux-low.c (linux_read_auxv): New function.
16214 (linux_target_ops): Initialize `read_auxv' member to that.
16216 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16218 Committed by Jim Blandy <jimb@redhat.com>.
16220 * linux-s390-low.c (s390_num_regs): Update.
16221 (s390_regmap): Remove control registers. Use __s390x__ predefine
16222 instead of GPR_SIZE to distiguish s390 and s390x targets.
16224 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16226 * linux-low.c: Update copyright year.
16227 (check_removed_breakpoint): Clear pending_is_breakpoint.
16228 (linux_set_resume_request, linux_queue_one_thread)
16229 (resume_status_pending_p): New functions.
16230 (linux_continue_one_thread): Use process->resume.
16231 (linux_resume): Only resume threads if there are no pending events.
16232 * linux-low.h (struct process_info): Add resume request
16235 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16237 * regcache.c (new_register_cache): Clear the allocated register
16238 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16240 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16242 * linux-low.c (linux_resume): Take a struct thread_resume *
16244 (linux_wait): Update call.
16245 (resume_ptr): New static variable.
16246 (linux_continue_one_thread): Renamed from
16247 linux_continue_one_process. Use resume_ptr.
16248 (linux_resume): Use linux_continue_one_thread.
16249 * server.c (handle_v_cont, handle_v_requests): New functions.
16250 (myresume): New function.
16251 (main): Handle 'v' case.
16252 * target.h (struct thread_resume): New type.
16253 (struct target_ops): Change argument of "resume" to struct
16255 (myresume): Delete macro.
16257 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16259 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16260 (uninstall): Support DESTDIR.
16262 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16264 * configure.srv: Add xscale*linux copy of arm*linux entry.
16266 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16268 * linux-arm-low.c (arm_reinsert_addr): New function.
16269 (the_low_target): Add arm_reinsert_addr.
16271 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16273 * mem-break.c: Remove whitespace at end of file.
16275 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16277 * configure.in: Check whether we need to prototype strerror.
16278 * server.h: Optionally prototype strerror.
16279 * gdbreplay.c (perror_with_name): Use strerror.
16280 * linux-low.c (linux_attach_lwp): Use strerror.
16281 * utils.c (perror_with_name): Use strerror.
16282 * config.in, configure: Regenerated.
16284 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16286 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16287 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16289 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16291 * Makefile.in (SFILES): Update.
16292 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16293 low-sun3.c: Remove files.
16295 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16297 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16298 (linux_detach_one_process, linux_detach): New functions.
16299 (linux_target_ops): Add linux_detach.
16300 * server.c (main): Handle 'D' packet.
16301 * target.h (struct target_ops): Add "detach" member.
16302 (detach_inferior): Define.
16304 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16306 From Kelley Cook <kelleycook@wideopenwest.com>:
16307 * configure.srv: Accept i[34567]86 variants.
16309 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16311 * linux-low.c (linux_wait_for_event): Correct comment typos.
16312 (linux_resume_one_process): Call check_removed_breakpoint.
16313 (linux_send_signal): New function.
16314 (linux_target_ops): Add linux_send_signal.
16315 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16317 * target.h (struct target_ops): Add send_signal.
16319 2003-05-29 Jim Blandy <jimb@redhat.com>
16321 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16322 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16323 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16324 away part of the register's value.
16326 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16328 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16329 (linux_wait_for_event, linux_init_signals): Likewise.
16331 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16333 * configure.in: Check for stdlib.h.
16334 * configure: Regenerated.
16335 * config.in: Regenerated.
16337 2003-01-04 Andreas Schwab <schwab@suse.de>
16339 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16341 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16343 * Makefile.in: Remove obsolete code.
16345 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16347 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16348 defined(PT_FPR0_HI).
16350 2002-11-17 Stuart Hughes <seh@zee2.com>
16352 * linux-arm-low.c (arm_num_regs): Increase.
16353 (arm_regmap): Include status register.
16355 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16357 * linux-low.c (register_addr): Remove incorrect -1 check.
16359 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16361 * linux-low.c (linux_create_inferior): Call setpgid. Return
16363 (unstopped_p, linux_signal_pid): Remove.
16364 (linux_target_ops): Remove linux_signal_pid.
16365 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16366 global instead of target method.
16367 * target.h (struct target_ops): Remove signal_pid. Update comment
16368 for create_inferior.
16369 * server.c (signal_pid): New variable.
16370 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16371 gdbserver. Set the child to be the foreground process group.
16372 (attach_inferior): Set signal_pid.
16374 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16376 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16378 2002-08-20 Jim Blandy <jimb@redhat.com>
16380 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16383 2002-08-01 Andrew Cagney <cagney@redhat.com>
16385 * Makefile.in: Make chill references obsolete.
16387 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16389 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16390 * configure: Regenerate.
16391 * config.in: Regenerate.
16393 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16395 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16396 (perror_with_name, remote_close, remote_open, expect, play): Static.
16398 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16400 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16401 byte offsets instead of an array of indexes.
16402 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16404 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16406 * regcache.c: Add comment.
16408 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16410 * thread-db.c: New file.
16411 * proc-service.c: New file.
16412 * acinclude.m4: New file.
16413 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16414 proc-service.o, and thread-db.o.
16415 (linux-low.o): Add USE_THREAD_DB.
16416 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16417 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16418 * aclocal.m4: Regenerated.
16419 * config.in: Regenerated.
16420 * configure: Regenerated.
16421 * configure.in: Check for proc_service.h, sys/procfs.h,
16422 thread_db.h, and linux/elf.h headrs.
16423 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16424 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16425 Check for -lthread_db and thread support.
16426 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16427 PowerPC, and SuperH.
16428 * i387-fp.c: Constify arguments.
16429 * i387-fp.h: Likewise.
16430 * inferiors.c: (struct thread_info): Renamed from
16431 `struct inferior_info'. Remove PID member. Use generic inferior
16432 list header. All uses updated.
16433 (inferiors, signal_pid): Removed.
16434 (all_threads): New variable.
16435 (get_thread): Define.
16436 (add_inferior_to_list): New function.
16437 (for_each_inferior): New function.
16438 (change_inferior_id): New function.
16439 (add_inferior): Removed.
16440 (remove_inferior): New function.
16441 (add_thread): New function.
16442 (free_one_thread): New function.
16443 (remove_thread): New function.
16444 (clear_inferiors): Use for_each_inferior and free_one_thread.
16445 (find_inferior): New function.
16446 (find_inferior_id): New function.
16447 (inferior_target_data): Update argument type.
16448 (set_inferior_target_data): Likewise.
16449 (inferior_regcache_data): Likewise.
16450 (set_inferior_regcache_data): Likewise.
16451 * linux-low.c (linux_bp_reinsert): Remove.
16452 (all_processes, stopping_threads, using_thrads)
16453 (struct pending_signals, debug_threads, pid_of): New.
16454 (inferior_pid): Replace with macro.
16455 (struct inferior_linux_data): Remove.
16456 (get_stop_pc, add_process): New functions.
16457 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16458 Use add_process and add_thread.
16459 (linux_attach_lwp): New function, based on old linux_attach. Use
16460 add_process and add_thread. Set stop_expected for new threads.
16461 (linux_attach): New function.
16462 (linux_kill_one_process): New function.
16463 (linux_kill): Kill all LWPs.
16464 (linux_thread_alive): Use find_inferior_id.
16465 (check_removed_breakpoints, status_pending_p): New functions.
16466 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16467 Update. Use WNOHANG. Wait for cloned processes also. Update process
16468 struct for the found process.
16469 (linux_wait_for_event): New function.
16470 (linux_wait): Use it. Support LWPs.
16471 (send_sigstop, wait_for_sigstop, stop_all_processes)
16472 (linux_resume_one_process, linux_continue_one_process): New functions.
16473 (linux_resume): Support LWPs.
16474 (REGISTER_RAW_SIZE): Remove.
16475 (fetch_register): Use register_size instead. Call supply_register.
16476 (usr_store_inferior_registers): Likewise. Call collect_register.
16477 Fix recursive case.
16478 (regsets_fetch_inferior_registers): Improve error message.
16479 (regsets_store_inferior_registers): Add debugging.
16480 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16481 (unstopped_p, linux_signal_pid): New functions.
16482 (linux_target_ops): Add linux_signal_pid.
16483 (linux_init_signals): New function.
16484 (initialize_low): Call it. Initialize using_threads.
16485 * regcache.c (inferior_regcache_data): Add valid
16487 (get_regcache): Fetch registers lazily. Add fetch argument
16488 and update all callers.
16489 (regcache_invalidate_one, regcache_invalidate): New
16491 (new_register_cache): Renamed from create_register_cache.
16492 Return the new regcache.
16493 (free_register_cache): Change argument to a void *.
16494 (registers_to_string, registers_from_string): Call get_regcache
16495 with fetch flag set.
16496 (register_data): Make static. Pass fetch flag to get_regcache.
16497 (supply_register): Call get_regcache with fetch flag clear.
16498 (collect_register): Call get_regcache with fetch flag set.
16499 (collect_register_as_string): New function.
16500 * regcache.h: Update.
16501 * remote-utils.c (putpkt): Flush after debug output and use
16503 Handle input interrupts while waiting for an ACK.
16504 (input_interrupt): Use signal_pid method.
16505 (getpkt): Flush after debug output and use stderr.
16506 (outreg): Use collect_register_as_string.
16507 (new_thread_notify, dead_thread_notify): New functions.
16508 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16509 and general_thread.
16510 (look_up_one_symbol): Flush after debug output.
16511 * server.c (step_thread, server_waiting): New variables.
16512 (start_inferior): Don't use signal_pid. Update call to mywait.
16513 (attach_inferior): Update call to mywait.
16514 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16515 (main): Don't fetch/store registers explicitly. Use
16516 set_desired_inferior. Support proposed ``Hs'' packet. Update
16518 * server.h: Update.
16519 (struct inferior_list, struct_inferior_list_entry): New.
16520 * target.c (set_desired_inferior): New.
16521 (write_inferior_memory): Constify.
16522 (mywait): New function.
16523 * target.h: Update.
16524 (struct target_ops): New signal_pid method.
16525 (mywait): Removed macro, added prototype.
16527 * linux-low.h (regset_func): Removed.
16528 (regset_fill_func, regset_store_func): New.
16529 (enum regset_type): New.
16530 (struct regset_info): Add type field. Use new operation types.
16531 (struct linux_target_ops): stop_pc renamed to get_pc.
16532 Add decr_pc_after_break and breakpoint_at.
16533 (get_process, get_thread_proess, get_process_thread)
16534 (strut process_info, all_processes, linux_attach_lwp)
16535 (thread_db_init): New.
16537 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16538 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16539 (the_low_target): Add new members.
16540 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16541 (i386_store_fpxregset): Constify.
16542 (target_regsets): Add new kind identifier.
16543 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16544 (i386_set_pc): Add debugging.
16545 (i386_breakpoint_at): New function.
16546 (the_low_target): Add new members.
16547 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16548 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16549 (mips_breakpoint_at): New.
16550 (the_low_target): Add new members.
16551 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16552 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16553 (the_low_target): Add new members.
16554 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16555 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16556 (the_low_target): Add new members.
16557 * linux-x86-64-low.c (target_regsets): Add new kind
16560 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16562 From Martin Pool <mbp@samba.org>:
16563 * server.c (gdbserver_usage): New function.
16566 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16568 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16569 stop_at -> stop_pc.
16571 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16573 * Makefile.in: Remove obsolete code.
16575 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16577 * linux-low.c (regsets_fetch_inferior_registers),
16578 (regsets_store_inferior_registers): Removed cast to int from
16580 * regcache.h: Added declaration of struct inferior_info.
16582 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16584 * inferiors.c (struct inferior_info): Add regcache_data.
16585 (add_inferior): Call create_register_cache.
16586 (clear_inferiors): Call free_register_cache.
16587 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16588 * regcache.c (struct inferior_regcache_data): New.
16589 (registers): Remove.
16590 (get_regcache): New function.
16591 (create_register_cache, free_register_cache): New functions.
16592 (set_register_cache): Don't initialize the register cache here.
16593 (registers_to_string, registers_from_string, register_data): Call
16595 * regcache.h: Add prototypes.
16596 * server.h: Likewise.
16598 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16600 * mem-break.c: New file.
16601 * mem-break.h: New file.
16602 * Makefile.in: Add mem-break.o rule; update server.h
16604 * inferiors.c (struct inferior_info): Add target_data
16606 (clear_inferiors): Free target_data member if set.
16607 (inferior_target_data, set_inferior_target_data): New functions.
16608 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16609 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16610 * linux-low.c (linux_bp_reinsert): New variable.
16611 (struct inferior_linux_data): New.
16612 (linux_create_inferior): Use set_inferior_target_data.
16613 (linux_attach): Likewise. Call add_inferior.
16614 (linux_wait_for_one_inferior): New function.
16615 (linux_wait): Call it.
16616 (linux_write_memory): Add const.
16617 (initialize_low): Call set_breakpoint_data.
16618 * linux-low.h (struct linux_target_ops): Add breakpoint
16620 * server.c (attach_inferior): Remove extra add_inferior
16622 * server.h: Include mem-break.h. Update inferior.c
16624 * target.c (read_inferior_memory)
16625 (write_inferior_memory): New functions.
16626 * target.h (read_inferior_memory)
16627 (write_inferior_memory): Change macros to prototypes.
16628 (struct target_ops): Update comments. Add const to write_memory
16631 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16633 * linux-low.c (usr_store_inferior_registers): Support
16634 registers which are allowed to fail to store.
16635 * linux-low.h (linux_target_ops): Likewise.
16636 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16637 (ppc_cannot_store_register): FPSCR may not be storable.
16639 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16641 * server.h: Include <string.h> if HAVE_STRING_H.
16642 * ChangeLog: Correct paths in last ChangeLog entry.
16644 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16646 * linux-low.h: Remove obsolete prototypes.
16647 (struct linux_target_ops): New.
16648 (extern the_low_target): New.
16649 * linux-low.c (num_regs, regmap): Remove declarations.
16650 (register_addr): Use the_low_target explicitly.
16651 (fetch_register): Likewise.
16652 (usr_fetch_inferior_registers): Likewise.
16653 (usr_store_inferior_registers): Likewise.
16654 * linux-arm-low.c (num_regs): Remove.
16655 (arm_num_regs): Define.
16656 (arm_regmap): Renamed from regmap, made static.
16657 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16659 (arm_cannot_store_register): Renamed from cannot_store_register,
16661 (the_low_target): New.
16662 * linux-i386-low.c (num_regs): Remove.
16663 (i386_num_regs): Define.
16664 (i386_regmap): Renamed from regmap, made static.
16665 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16667 (i386_cannot_store_register): Renamed from cannot_store_register,
16669 (the_low_target): New.
16670 * linux-ia64-low.c (num_regs): Remove.
16671 (ia64_num_regs): Define.
16672 (ia64_regmap): Renamed from regmap, made static.
16673 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16675 (ia64_cannot_store_register): Renamed from cannot_store_register,
16677 (the_low_target): New.
16678 * linux-m68k-low.c (num_regs): Remove.
16679 (m68k_num_regs): Define.
16680 (m68k_regmap): Renamed from regmap, made static.
16681 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16683 (m68k_cannot_store_register): Renamed from cannot_store_register,
16685 (the_low_target): New.
16686 * linux-mips-low.c (num_regs): Remove.
16687 (mips_num_regs): Define.
16688 (mips_regmap): Renamed from regmap, made static.
16689 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16691 (mips_cannot_store_register): Renamed from cannot_store_register,
16693 (the_low_target): New.
16694 * linux-ppc-low.c (num_regs): Remove.
16695 (ppc_num_regs): Define.
16696 (ppc_regmap): Renamed from regmap, made static.
16697 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16699 (ppc_cannot_store_register): Renamed from cannot_store_register,
16701 (the_low_target): New.
16702 * linux-s390-low.c (num_regs): Remove.
16703 (s390_num_regs): Define.
16704 (s390_regmap): Renamed from regmap, made static.
16705 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16707 (s390_cannot_store_register): Renamed from cannot_store_register,
16709 (the_low_target): New.
16710 * linux-sh-low.c (num_regs): Remove.
16711 (sh_num_regs): Define.
16712 (sh_regmap): Renamed from regmap, made static.
16713 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16715 (sh_cannot_store_register): Renamed from cannot_store_register,
16717 (the_low_target): New.
16718 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16719 (the_low_target): New.
16721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16723 * Makefile.in: Add stamp-h target.
16724 * configure.in: Create stamp-h.
16725 * configure: Regenerated.
16727 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16729 * inferiors.c: New file.
16730 * target.c: New file.
16731 * target.h: New file.
16732 * Makefile.in: Add target.o and inferiors.o. Update
16734 * linux-low.c (inferior_pid): New static variable,
16735 moved from server.c.
16736 (linux_create_inferior): Renamed from create_inferior.
16737 Call add_inferior. Return 0 on success instead of a PID.
16738 (linux_attach): Renamed from myattach.
16739 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16740 (linux_thread_alive): Renamed from mythread_alive.
16741 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16743 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16744 (regsets_store_inferior_registers): Correct error message.
16745 Add missing ``return 0''.
16746 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16747 (linux_store_registers): Renamed from store_inferior_registers.
16748 (linux_read_memory): Renamed from read_inferior_memory.
16749 (linux_write_memory): Renamed from write_inferior_memory.
16750 (linux_target_ops): New structure.
16751 (initialize_low): Call set_target_ops ().
16752 * remote-utils.c (unhexify): New function.
16753 (hexify): New function.
16754 (input_interrupt): Send signals to ``signal_pid''.
16755 * server.c (inferior_pid): Remove.
16756 (start_inferior): Update create_inferior call.
16757 (attach_inferior): Call add_inferior.
16758 (handle_query): New function.
16759 (main): Call handle_query for `q' packets.
16760 * server.h: Include "target.h". Remove obsolete prototypes.
16761 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16763 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16765 * Makefile.in: Add WARN_CFLAGS. Update configury
16767 * configure.in: Check for <string.h>
16768 * configure: Regenerate.
16769 * config.in: Regenerate.
16770 * gdbreplay.c: Include needed system headers.
16771 (remote_open): Remove strchr prototype.
16772 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16773 * regcache.c (supply_register): Change buf argument to const void *.
16774 (supply_register_by_name): Likewise.
16775 (collect_register): Change buf argument to void *.
16776 (collect_register_by_name): Likewise.
16777 * regcache.h: Add missing prototypes.
16778 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16779 * server.c (handle_query): New function.
16780 (attached): New static variable, moved out of main.
16781 (main): Quiet longjmp clobber warnings.
16782 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16783 * utils.c (error): Remove NORETURN.