1 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
3 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
4 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5 ($(IPA_LIB)): Sort IPA_OBJS.
7 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
9 * Makefile.in: Remove references to $(ADD_DEPS).
11 2018-09-16 Tom Tromey <tom@tromey.com>
13 * remote-utils.c (remote_open): Use GNU style for metasyntactic
15 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
18 2018-09-05 Tom Tromey <tom@tromey.com>
22 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
25 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
27 2018-08-27 Tom Tromey <tom@tromey.com>
32 2018-08-27 Tom Tromey <tom@tromey.com>
34 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
35 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
36 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
37 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
38 (s390x_emit_stack_adjust): Add casts to unsigned char.
40 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
44 * server.h (struct client_state) <disable_randomization>:
47 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
49 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
51 (mips_supply_ptrace_register): Likewise.
53 2018-07-22 Tom Tromey <tom@tromey.com>
57 2018-07-22 Tom Tromey <tom@tromey.com>
59 * win32-low.c (win32_create_inferior): Remove unused variables.
60 * gdbreplay.c (remote_open): Remove unused variable.
61 * remote-utils.c (remote_prepare): Remove unused variable.
62 * x86-tdesc.h (X86_TDESC_H): Define.
63 (amd64_expedite_regs): Define conditionally.
64 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
65 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
66 * remote-utils.c (readchar): Remove unused variable.
68 2018-07-13 Pedro Alves <palves@redhat.com>
70 * linux-low.c (linux_kill): Change parameter to process_info
71 pointer instead of pid. Adjust.
72 * lynx-low.c (lynx_kill): Likewise.
73 * nto-low.c (nto_kill): Likewise.
74 * spu-low.c (spu_kill): Likewise.
75 * win32-low.c (win32_kill): Likewise.
76 * server.c (handle_v_kill, kill_inferior_callback)
77 (detach_or_kill_for_exit): Adjust.
78 * target.c (kill_inferior): Change parameter to process_info
79 pointer instead of pid. Adjust.
80 * target.h (struct target_ops) <kill>: Change parameter to
81 process_info pointer instead of pid. Adjust all implementations
83 (kill_inferior): Likewise.
85 2018-07-13 Pedro Alves <palves@redhat.com>
87 * linux-low.c (linux_detach, linux_join): Change parameter to
88 process_info pointer instead of pid. Adjust.
89 * lynx-low.c (lynx_detach, lynx_join): Likewise.
90 * nto-low.c (nto_detach): Likewise.
91 * spu-low.c (spu_detach, spu_join): Likewise.
92 * win32-low.c (win32_detach, win32_join): Likewise.
93 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
94 * target.h (struct target_ops) <detach, join>: Change parameter to
95 process_info pointer instead of pid. Adjust all implementations
97 (detach_inferior, join_inferior): Rename 'pid' parameter to
100 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
101 Jan Kratochvil <jan.kratochvil@redhat.com>
102 Paul Fertser <fercerpav@gmail.com>
103 Tsutomu Seki <sekiriki@gmail.com>
105 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
106 (OBS): Add 'common/netstuff.o'.
107 (GDBREPLAY_OBS): Likewise.
108 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
109 (remote_open): Implement support for IPv6
111 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
113 (handle_accept_event): Accept connections from IPv6 sources.
114 (remote_prepare): Handle IPv6-style hostnames; implement
115 support for IPv6 connections.
116 (remote_open): Implement support for printing connections from
119 2018-07-11 Pedro Alves <palves@redhat.com>
122 * mem-break.c (any_persistent_commands): Add process_info
123 parameter and use it instead of relying on the current process.
124 Change return type to bool.
125 * mem-break.h (any_persistent_commands): Add process_info
126 parameter and change return type to bool.
127 * server.c (handle_detach): Remove require_running_or_return call.
128 Look up the process_info for the process we're about to detach.
129 If not found, return back error to GDB. Adjust
130 any_persistent_commands call to pass down a process pointer.
132 2018-07-11 Pedro Alves <palves@redhat.com>
134 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
135 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
136 instead of collect_register_by_name.
137 * regcache.c (regcache_raw_get_unsigned_by_name): New.
138 * regcache.h (regcache_raw_get_unsigned_by_name): New.
140 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
141 Pedro Alves <palves@redhat.com>
143 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
145 2018-07-03 Tom Tromey <tom@tromey.com>
147 * linux-low.c: Update.
148 * lynx-low.c: Update.
149 * mem-break.c: Update.
151 * remote-utils.c: Update.
155 * win32-low.c: Update.
157 2018-07-03 Tom Tromey <tom@tromey.com>
161 2018-07-03 Tom Tromey <tom@tromey.com>
163 * linux-low.c: Update.
165 2018-07-03 Tom Tromey <tom@tromey.com>
169 2018-07-03 Tom Tromey <tom@tromey.com>
171 * linux-low.c: Update.
172 * linux-mips-low.c: Update.
173 * lynx-low.c: Update.
175 * remote-utils.c: Update.
179 * thread-db.c: Update.
181 2018-07-03 Tom Tromey <tom@tromey.com>
183 * linux-low.c: Update.
184 * linux-mips-low.c: Update.
185 * lynx-low.c: Update.
186 * mem-break.c: Update.
188 * remote-utils.c: Update.
192 * tracepoint.c: Update.
194 2018-07-03 Tom Tromey <tom@tromey.com>
196 * linux-low.c: Update.
197 * linux-ppc-low.c: Update.
198 * linux-x86-low.c: Update.
199 * proc-service.c: Update.
202 * thread-db.c: Update.
203 * win32-low.c: Update.
205 2018-07-03 Tom Tromey <tom@tromey.com>
207 * linux-low.c: Update.
208 * lynx-low.c: Update.
210 * remote-utils.c: Update.
212 * thread-db.c: Update.
213 * win32-low.c: Update.
215 2018-06-29 Joel Brobecker <brobecker@adacore.com>
217 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
218 parameter in call to 'amd64_create_target_description'.
220 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
222 * x86-tdesc.h: Remove executable permission flag.
224 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
226 * configure.ac: Remove AC_PREREQ, add missing quoting.
227 * configure: Re-generate.
228 * config.in: Re-generate.
229 * aclocal.m4: Re-generate.
231 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
233 * tracepoint.h (current_traceframe): Remove declaration.
235 2018-06-18 Alan Hayward <alan.hayward@arm.com>
237 * linux-aarch64-low.c (is_sve_tdesc): New function.
238 (aarch64_sve_regs_copy_to_regcache): Likewise.
239 (aarch64_sve_regs_copy_from_regcache): Likewise.
240 (aarch64_regs_info): Add SVE checks.
241 (initialize_low_arch): Initialize SVE.
243 2018-06-18 Alan Hayward <alan.hayward@arm.com>
245 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
247 2018-06-11 Alan Hayward <alan.hayward@arm.com>
249 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
250 (initialize_low_tracepoint): Likewise
251 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
252 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
254 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
256 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
258 2018-06-11 Alan Hayward <alan.hayward@arm.com>
260 * server.h (PBUFSIZ): Increase size
262 2018-06-11 Alan Hayward <alan.hayward@arm.com>
264 * regcache.c (regcache::raw_compare): New function.
265 * regcache.h (regcache::raw_compare): New declaration.
267 2018-06-11 Alan Hayward <alan.hayward@arm.com>
269 * regcache.c (new_register_cache): Use new.
270 (free_register_cache): Use delete.
271 (register_data): Use const.
272 (supply_register): Move body inside regcache.
273 (regcache::raw_supply): New override function.
274 (collect_register): Move body inside regcache.
275 (regcache::raw_collect): New override function.
276 (regcache::get_register_status): New override function.
277 * regcache.h (struct regcache): Inherit from reg_buffer_common.
279 2018-06-09 Tom Tromey <tom@tromey.com>
281 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
283 (event_queue): Use std::queue.
284 (gdb_event_xfree): Remove.
285 (initialize_event_loop, process_event, wait_for_event): Update.
287 2018-06-08 Stan Cox <scox@redhat.com>
289 * win32-low.c (win32_create_inferior): last_ptid and last_status
290 moved to client_state.
292 2018-06-08 Pedro Alves <palves@redhat.com>
294 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
295 common/common-exceptions.o, common/common-utils.o,
296 common/errors.o, common/print-utils.o and utils.o.
297 * gdbreplay.c: Include "common-defs.h" instead of the two
298 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
299 string.h or alloca.h.
300 (perror_with_name): Delete.
301 (remote_open): Use xstrdup instead of strdup.
302 (main): Rename to ...
303 (captured_main): ... this.
306 2018-06-08 Tom Tromey <tom@tromey.com>
308 * linux-low.c (linux_low_read_btrace): Update.
310 2018-06-04 Stan Cox <scox@redhat.com>
312 * server.h (struct client_state): New.
313 * server.c (cont_thread, general_thread, multi_process)
314 (report_fork_events, report_vfork_events, report_exec_events)
315 (report_thread_events, swbreak_feature, hwbreak_feature)
316 (vCont_supported, disable_randomization, pass_signals)
317 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
318 Moved to client_state.
319 * remote-utils.c (remote_debug, noack_mode)
320 (transport_is_reliable): Moved to client_state.
321 * tracepoint.c (current_traceframe): Moved to client_state.
324 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
325 linux-low.c, remote-utils.h, target.c: Use client_state.
327 2018-05-31 Alan Hayward <alan.hayward@arm.com>
329 * configure.srv: Add new c/h file.
331 2018-05-31 Alan Hayward <alan.hayward@arm.com>
333 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
336 2018-05-25 Maciej W. Rozycki <macro@mips.com>
338 * gdb.arch/mips-fpregset-core.exp: New test.
339 * gdb.arch/mips-fpregset-core.c: New test source.
341 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
344 * hostio.c (require_int): Do not report overflow for integers
345 between 0xfffffff and 0x7fffffff.
347 2018-05-22 Maciej W. Rozycki <macro@mips.com>
349 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
350 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
351 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
353 (the_low_target): Wire them.
355 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
357 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
358 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
359 mode. Call collect_register_by_name with vscr using
360 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
361 (ppc_store_vrregset): Add and set vscr_offset variable as in
362 ppc_fill_vrregset. Call supply_register_by_name with vscr using
365 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
367 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
368 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
369 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
371 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
373 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
374 (ppc_store_vsxregset): Likewise.
375 (ppc_fill_vrregset): Likewise.
376 (ppc_store_vrregset): Likewise.
377 (ppc_fill_evrregset): Likewise.
378 (ppc_store_evrregset): Likewise.
379 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
380 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
383 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
385 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
386 wordsize of the inferior. Call ppc_linux_target_wordsize.
388 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
390 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
391 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
392 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
393 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
394 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
395 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
396 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
397 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
398 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
399 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
400 (tdesc_powerpc_e500l): Remove.
401 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
402 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
403 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
404 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
406 (ppc_arch_setup): Remove target description matching code. Fill a
407 ppc_linux_features struct and call ppc_linux_match_description
410 2018-05-22 Maciej W. Rozycki <macro@mips.com>
412 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
413 width of the requested register exceeds the width of the
415 (mips_cannot_store_register): Likewise.
417 2018-05-21 Maciej W. Rozycki <macro@mips.com>
419 * linux-mips-low.c (mips_fetch_register): New function. Update
421 (mips_store_gregset): Supply 0 rather than $restart for $zero.
422 (the_low_target): Wire `mips_fetch_register'.
424 2018-05-10 Joel Brobecker <brobecker@adacore.com>
426 * lynx-i386-low.c (LYNXOS_178): New macro.
427 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
428 the layout on LynxOS-178.
429 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
430 handle floating point registers that are not supported by
433 2018-05-10 Tom Tromey <tom@tromey.com>
435 * configure: Rebuild.
437 2018-05-10 Joel Brobecker <brobecker@adacore.com>
440 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
441 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
442 Use it to set the expedite_regs field in the given tdesc.
443 * x86-tdesc.h: New file.
444 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
445 Adjust following the addition of the new expedite_regs parameter
447 * linux-tic6x-low.c (tic6x_read_description): Likewise.
448 * linux-x86-tdesc.c: #include "x86-tdesc.h".
449 (i386_linux_read_description, amd64_linux_read_description):
450 Adjust following the addition of the new expedite_regs parameter
452 * lynx-i386-low.c: #include "x86-tdesc.h".
453 (lynx_i386_arch_setup): Adjust following the addition of the new
454 expedite_regs parameter to init_target_desc.
455 * nto-x86-low.c: #include "x86-tdesc.h".
456 (nto_x86_arch_setup): Adjust following the addition of the new
457 expedite_regs parameter to init_target_desc.
458 * win32-i386-low.c: #include "x86-tdesc.h".
459 (i386_arch_setup): Adjust following the addition of the new
460 expedite_regs parameter to init_target_desc.
462 2018-05-10 Joel Brobecker <brobecker@adacore.com>
465 * win32-low.c (win32_create_inferior): Add call to my_wait
466 setting last_status global.
468 2018-05-10 Joel Brobecker <brobecker@adacore.com>
471 * win32-low.c (create_process): Only call gdb_tilde_expand if
472 inferior_cwd is not NULL.
474 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
476 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
477 registers to the cache if their values have changed.
478 (i387_xsave_to_cache): Provide default values for x87 control
479 registers when these features are available, but disabled.
480 * regcache.c (supply_register_by_name_zeroed): New function.
481 * regcache.h (supply_register_by_name_zeroed): Declare new
484 2018-05-07 Tom Tromey <tom@tromey.com>
486 * configure: Rebuild.
488 2018-05-04 Tom Tromey <tom@tromey.com>
490 * configure: Rebuild.
492 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
493 Pedro Alves <palves@redhat.com>
495 * linux-aarch64-low.c (aarch64_stopped_data_address):
498 2018-04-27 Tom Tromey <tom@tromey.com>
500 * configure: Rebuild.
502 2018-04-23 Tom Tromey <tom@tromey.com>
504 * configure: Rebuild.
506 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
508 * Makefile.in (depcomp): Add "..".
509 (all_deps_files): New and use it.
511 2018-04-18 Alan Hayward <alan.hayward@arm.com>
513 * configure.srv (aarch64*-*-linux*): Don't include xml.
514 (i[34567]86-*-cygwin*): Likewise.
515 (i[34567]86-*-linux*): Likewise.
516 (i[34567]86-*-lynxos*): Likewise.
517 (i[34567]86-*-mingw32ce*): Likewise.
518 (i[34567]86-*-mingw*): Likewise.
519 (i[34567]86-*-nto*): Likewise.
520 (tic6x-*-uclinux): Likewise.
521 (x86_64-*-linux*): Likewise.
522 (x86_64-*-mingw*): Likewise.
523 (x86_64-*-cygwin*): Likewise.
525 2018-04-18 Alan Hayward <alan.hayward@arm.com>
527 * tdesc.c: Remove xml parameter.
529 2018-04-18 Alan Hayward <alan.hayward@arm.com>
531 * server.c (get_features_xml): Remove cast.
532 * tdesc.c (void target_desc::accept): Fill in function.
533 (tdesc_get_features_xml): Remove old xml creation.
534 (print_xml_feature::visit_pre): Add xml vistor.
535 * tdesc.h (struct target_desc): Make xmltarget mutable.
536 (tdesc_get_features_xml): Remove declaration.
538 2018-04-18 Alan Hayward <alan.hayward@arm.com>
540 * tdesc.c (tdesc_architecture_name): Add new function.
541 (tdesc_osabi_name): Likewise.
542 (tdesc_get_features_xml): Use new functions.
544 2018-04-18 Alan Hayward <alan.hayward@arm.com>
546 * tdesc.c (tdesc_create_flags): Remove.
547 (tdesc_add_flag): Likewise.
548 (tdesc_named_type): Likewise.
549 (tdesc_create_union): Likewise.
550 (tdesc_create_struct): Likewise.
551 (tdesc_create_vector): Likewise.
552 (tdesc_add_bitfield): Likewise.
553 (tdesc_add_field): Likewise.
554 (tdesc_set_struct_size): Likewise.
556 2018-04-18 Alan Hayward <alan.hayward@arm.com>
558 * tdesc.c (~target_desc): Remove implictly deleted items.
559 (init_target_desc): Iterate all features.
560 (tdesc_get_features_xml): Use vector.
561 (tdesc_create_feature): Create feature.
562 * tdesc.h (tdesc_feature) Remove
563 (target_desc): Add features.
565 2018-04-18 Alan Hayward <alan.hayward@arm.com>
567 * Makefile.in: Add common/tdesc.c
568 * tdesc.c (init_target_desc): init all reg_defs from register
570 (tdesc_create_reg): Create tdesc_reg.
571 * tdesc.h (tdesc_feature): Add register vector.
573 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
575 * tdesc.h (struct target_desc) <features>: Change type to
576 std::vector<std::string>.
577 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
579 (tdesc_get_features_xml): Likewise.
580 (tdesc_create_feature): Likewise.
582 2018-03-26 Alan Hayward <alan.hayward@arm.com>
584 * regcache.c (find_register_by_number): Return a ref.
585 (find_regno): Use references.
586 (register_size): Likewise.
587 (register_data): Likewise.
588 * tdesc.c (target_desc::~target_desc): Remove free calls.
589 (target_desc::operator==): Use std::vector compare.
590 (init_target_desc): Use reference.
591 (tdesc_create_reg): Use reg constructors.
592 * tdesc.h (struct target_desc): Replace pointer with object.
594 2018-03-23 Alan Hayward <alan.hayward@arm.com>
596 * regcache.c (find_register_by_number): Make static.
597 (find_regno): Use find_register_by_number
598 * regcache.h (struct reg): Remove declaration.
600 2018-03-23 Alan Hayward <alan.hayward@arm.com>
602 * tdesc.c (target_desc::~target_desc): Move to here.
603 (target_desc::operator==): Likewise.
604 * tdesc.h (target_desc::~target_desc): Move from here.
605 (target_desc::operator==): Likewise.
607 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
609 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
611 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
613 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
615 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
616 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
617 and init_registers_s390_gs_linux64.
619 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
621 * linux-s390-low.c (s390_fill_gs): Remove function.
622 (s390_fill_gsbc): Remove function.
623 (s390_regsets): Set fill functions for the guarded storage regsets
626 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
628 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
629 the word size. Add comment.
630 (s390_get_wordsize): New function.
631 (s390_arch_setup): No longer select a temporary tdesc to fetch the
632 pswm with it. Instead, use s390_get_wordsize to determine the
633 word size first and derive the correct tdesc from that directly.
635 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
637 * Makefile.in: Include silent-rules.mk.
638 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
639 (COMPILE): Add ECHO_CXX.
640 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
641 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
642 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
643 (version-generated.c): Add ECHO_GEN.
644 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
645 (IPAGENT_COMPILE): Add ECHO_CXX.
646 (%-generated.c): Add ECHO_REGDAT.
648 2018-03-14 Tom Tromey <tom@tromey.com>
651 * ax.c (ax_printf): Special case for NULL.
653 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
655 * linux-low.c (linux_qxfer_libraries_svr4): Use
656 xml_escape_text_append.
658 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
660 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
662 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
664 * server.c (handle_general_set): Remove unnecessary xstrdup.
666 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
668 * server.c (parse_debug_format_options): Adjust to
669 delim_string_to_char_ptr_vec changes.
670 * thread-db.c (thread_db_load_search): Adjust to
671 dirnames_to_char_ptr_vec changes.
673 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
675 * target.h (target_enable_btrace, target_disable_btrace)
676 (target_read_btrace, target_read_btrace_conf): Turn macro into
677 inline function. Throw error if target method is not defined.
678 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
679 check for btrace target method. Be prepared to handle exceptions
680 from btrace target methods.
682 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
684 * server.c (captured_main): Change order of error message printed
685 when the current working directory cannot be found.
687 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
689 * server.c: Include "filenames.h" and "pathstuff.h".
690 (program_name): Delete variable.
691 (program_path): New anonymous class.
692 (get_exec_wrapper): Use "program_path" instead of
694 (handle_v_run): Likewise.
695 (captured_main): Likewise.
696 (process_serial_event): Likewise.
698 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
700 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
701 (OBJS): Add "pathstuff.o".
702 * server.c (current_directory): New global variable.
703 (captured_main): Initialize "current_directory".
705 2018-02-26 Alan Hayward <alan.hayward@arm.com>
707 * tdesc.c: Use common/tdesc.h.
710 2018-02-20 Alan Hayward <alan.hayward@arm.com>
711 Simon Marchi <simon.marchi@ericsson.com>
713 * Makefile.in: Switch order of make rules.
715 2018-02-19 Alan Hayward <alan.hayward@arm.com>
717 * Makefile.in: Add common directory in build.
718 * configure.ac: Add common reference.
719 * configure: Regenerate.
721 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
723 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
724 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
725 * spu-low.c (spu_target_ops): Likewise.
726 * win32-low.c (win32_target_ops): Likewise.
727 * server.c (supported_btrace_packets): Report packets unconditionally.
728 * target.h (target_ops) <supports_btrace>: Remove.
729 (target_supports_btrace): Remove.
731 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
733 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
734 (handle_btrace_disable): Change return type to void. Use exceptions
736 (handle_btrace_general_set): Catch exception and copy message to
739 2018-02-08 Tom Tromey <tom@tromey.com>
741 * linux-low.c (install_software_single_step_breakpoints): Use
743 * inferiors.c (make_cleanup_restore_current_thread): Remove.
744 (do_restore_current_thread_cleanup): Remove.
745 * gdbthread.h (make_cleanup_restore_current_thread): Don't
748 2018-02-08 Tom Tromey <tom@tromey.com>
750 * mem-break.c (set_raw_breakpoint_at): Use
751 gdb::unique_xmalloc_ptr.
753 2018-01-30 Pedro Alves <palves@redhat.com>
756 * target.c (target_terminal::terminal_state): Rename to ...
757 (target_terminal::m_terminal_state): ... this.
759 2018-01-19 James Clarke <jrtc27@jrtc27.com>
761 * linux-low.c (handle_extended_wait): Surround call to
762 thread_db_notice_clone with #ifdef USE_THREAD_DB.
764 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
766 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
767 linux_ptrace_attach_fail_reason_string now returning an
769 (linux_attach): Likewise.
770 * thread-db.c (attach_thread): Likewise.
772 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
775 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
776 checking for fs_base/gs_base fields in struct user_regs_struct.
777 * configure: Regenerate.
779 2018-01-16 Yao Qi <yao.qi@linaro.org>
782 * linux-low.c (fetch_register): Call supply_register instead of
785 2018-01-08 Yao Qi <yao.qi@linaro.org>
786 Simon Marchi <simon.marchi@ericsson.com>
788 * Makefile.in (OBS): Remove selftest.o.
789 * configure.ac: Set srv_selftest_objs if $development is true.
790 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
791 * configure: Re-generated.
792 * server.c (captured_main): Wrap variable selftest_filter with
795 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
797 * server.c (parse_debug_format_options): Return std::string.
798 (handle_monitor_command, captured_main): Adjust.
800 2018-01-05 Pedro Alves <palves@redhat.com>
803 * server.c (captured_main): Pass quiet=false to
804 save_original_signals_state.
806 2018-01-01 Joel Brobecker <brobecker@adacore.com>
808 * gdbreplay.c (gdbreplay_version): Update copyright year in
810 * server.c (gdbserver_version): Likewise.
812 2017-12-08 Tom Tromey <tom@tromey.com>
814 * ax.c (ax_printf): Update.
816 2017-12-07 Yao Qi <yao.qi@linaro.org>
818 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
819 aarch64_linux_read_description.
820 * linux-amd64-ipa.c (idx2mask): New array.
821 (get_ipa_tdesc): Move idx2mask out.
822 (initialize_low_tracepoint): Initialize target descriptions.
823 * linux-i386-ipa.c (idx2mask): New array.
824 (get_ipa_tdesc): Move idx2mask out.
825 (initialize_low_tracepoint): Initialize target descriptions.
827 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
829 * tdesc.c (struct tdesc_type): Change return type.
830 (tdesc_add_flag): Change parameter type.
831 (tdesc_add_bitfield): Likewise.
832 (tdesc_add_field): Likewise.
833 (tdesc_set_struct_size): Likewise.
835 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
837 * regcache.c (registers_to_string): Remove unused variable.
839 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
841 * inferiors.c (for_each_inferior_with_data): Remove.
842 * inferiors.h (for_each_inferior_with_data): Remove.
843 * server.c (handle_qxfer_threads_worker): Change parameter type.
844 (handle_qxfer_threads_proper): Use for_each_thread.
846 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
848 * inferiors.c (for_each_inferior): Remove.
849 (clear_inferiors): Use for_each_thread.
850 * inferiors.h (for_each_inferior): Remove.
851 * linux-low.c (linux_wait_for_event_filtered): Use
853 (linux_stabilize_threads): Likewise.
854 * regcache.c (regcache_release): Likewise.
855 * server.c (gdb_wants_all_threads_stopped): Likewise.
856 (clear_pending_status_callback): Remove.
857 (handle_status): Use for_each_thread.
858 (captured_main): Likewise.
859 * win32-low.c (child_init_thread_list): Likewise.
860 (win32_clear_inferiors): Likewise.
861 (fake_breakpoint_event): Likewise.
863 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
865 * inferiors.h (find_inferior): Remove.
866 * inferiors.c (find_inferior): Remove.
868 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
870 * linux-low.c (resume_status_pending_p): Update comment.
871 (need_step_over_p): Update comment.
873 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
875 * linux-low.c (proceed_one_lwp): Return void, change parameter
877 (unsuspend_and_proceed_one_lwp): Likewise.
878 (proceed_all_lwps): Use for_each_thread.
879 (unstop_all_lwps): Likewise.
881 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
883 * linux-low.c (linux_resume_one_thread): Return void, take
885 (linux_resume): Use for_each_thread.
887 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
889 * linux-low.c (send_sigstop_callback): Return void, change
890 parameter type. Rename to...
891 (send_sigstop): ... this.
892 (suspend_and_send_sigstop_callback): Return void, change parameter
894 (suspend_and_send_sigstop): ... this.
895 (stop_all_lwps): Use for_each_thread.
897 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
899 * linux-low.c (lwp_running): Return bool, remove unused
901 (linux_stabilize_threads): Use find_thread.
903 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
905 * linux-low.c (select_singlestep_lwp_callback): Remove.
906 (count_events_callback): Remove.
907 (select_event_lwp_callback): Remove.
908 (select_event_lwp): Use find_thread/for_each_thread.
910 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
912 * linux-low.c (not_stopped_callback): Return bool, take filter
914 (linux_wait_for_event_filtered): Use find_thread.
915 (linux_wait_1): Likewise.
917 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
919 * linux-low.c (same_lwp): Remove.
920 (find_lwp_pid): Use find_thread.
922 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
924 * linux-low.c (delete_lwp_callback): Remove.
925 (linux_mourn): Use for_each_thread.
927 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
929 * linux-low.c (linux_detach_lwp_callback): Return void, remove
930 args parameter, don't check for pid.
931 (linux_detach): Use for_each_thread.
933 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
935 * linux-low.c (struct counter): Remove.
936 (second_thread_of_pid_p): Remove.
937 (last_thread_of_process_p): Use find_thread.
939 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
941 * inferiors.c (find_inferior_in_random): Remove.
942 * inferiors.h (find_inferior_in_random): Remove.
943 * linux-low.c (status_pending_p_callback): Return bool, accept
944 parameter ptid directly.
945 (linux_wait_for_event_filtered): Use find_thread_in_random.
946 (linux_wait_1): Likewise.
948 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
950 * inferiors.c (find_inferior_id): Remove.
951 (find_thread_ptid): Move implemention from find_inferior_id to
953 * inferiors.h (find_inferior_id): Remove.
954 * server.c (handle_status): Use find_thread_ptid.
955 (process_serial_event): Likewise.
956 * thread-db.c (find_one_thread): Likewise.
957 (thread_db_thread_handle): Likewise.
958 * win32-low.c (thread_rec): Likewise.
959 (child_delete_thread): Likewise.
960 (win32_thread_alive): Likewise.
961 (get_child_debug_event): Likewise.
963 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
965 * linux-mips-low.c (update_watch_registers_callback): Return
966 void, remove pid_p parameter, don't check for pid.
967 (mips_insert_point, mips_remove_point): Use for_each_thread.
969 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
971 * lynx.low (lynx_delete_thread_callback): Remove.
972 (lynx_mourn): Use for_each_thread.
974 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
976 * regcache.c (regcache_invalidate_one): Remove.
977 (regcache_invalidate_pid): use for_each_thread.
979 2017-11-26 Tom Tromey <tom@tromey.com>
981 * linux-low.c (linux_create_inferior): Update.
983 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
985 * spu-low.c (spu_create_inferior): Fix typo in argument name.
987 2017-11-24 Alan Hayward <alan.hayward@arm.com>
989 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
990 * linux-aarch64-low.c (initialize_low_arch): Call init func.
991 * linux-aarch64-tdesc-selftest.c: New file.
992 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
994 2017-11-24 Alan Hayward <alan.hayward@arm.com>
996 * configure.srv: Add new file.
997 * linux-aarch64-low.c (initialize_low_arch): Call init func.
998 * linux-aarch64-tdesc-selftest.c: New file.
999 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1001 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1003 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1004 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1005 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1007 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1009 * configure.srv: Add new files.
1010 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1011 aarch64_linux_read_description.
1012 * linux-aarch64-low.c (aarch64_linux_read_description):
1013 Merge with aarch64_arch_setup.
1014 (aarch64_arch_setup): Call aarch64_linux_read_description.
1015 * linux-aarch64-tdesc.c: New file.
1016 * linux-aarch64-tdesc.h: New file.
1018 2017-11-24 Yao Qi <yao.qi@linaro.org>
1020 * configure.srv: Set $srv_regobj for tic6x-linux.
1021 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1022 (tic6x_read_description): Move some code to tic6x_arch_setup.
1023 (tic6x_tdesc_test): New function.
1024 (initialize_low_arch): Call selftests::register_test.
1026 2017-11-22 Yao Qi <yao.qi@linaro.org>
1028 * remote-utils.c (prepare_resume_reply): Use memcpy.
1030 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1032 * linux-low.c (kill_one_lwp_callback): Return void, take
1033 argument directly, don't filter on pid.
1034 (linux_kill): Use for_each_thread.
1036 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1038 * linux-low.c (need_step_over_p): Return bool, remove dummy
1040 (linux_resume, proceed_all_lwps): Use find_thread.
1042 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1044 * linux-low.c (resume_status_pending_p): Return bool, remove
1046 (linux_resume): Use find_thread.
1048 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1050 * linux-low.c (struct thread_resume_array): Remove.
1051 (linux_set_resume_request): Return void, take arguments
1053 (linux_resume): Use for_each_thread.
1055 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1057 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1058 return bool, remove data argument.
1059 (linux_stabilize_threads): Use find_thread.
1061 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1063 * linux-low.c (unsuspend_one_lwp): Remove.
1064 (unsuspend_all_lwps): Use for_each_thread, inline code from
1067 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1069 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1070 * linux-low.c (struct iterate_over_lwps_args): Remove.
1071 (iterate_over_lwps_filter): Remove.
1072 (iterate_over_lwps): Use find_thread.
1074 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1076 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1077 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1078 code from reset_lwp_ptrace_options_callback.
1080 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1082 * linux-arm-low.c (struct update_registers_data): Remove.
1083 (update_registers_callback): Return void, take arguments
1084 directly, don't check thread's pid.
1085 (arm_insert_point, arm_remove_point): Use for_each_thread.
1087 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1089 * win32-low.c (continue_one_thread): Return void, take argument
1091 (child_continue): Use for_each_thread.
1093 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1095 * win32-i386-low.c (update_debug_registers_callback): Rename
1097 (update_debug_registers): ... this, return void, remove pid_p arg.
1098 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1100 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1102 * inferiors.h (struct process_info): Add constructor, initialize
1104 <syscalls_to_catch>: Change type to std::vector<int>.
1105 * inferiors.c (add_process): Allocate process_info with new.
1106 (remove_process): Free process_info with delete.
1107 * linux-low.c (handle_extended_wait): Adjust.
1108 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1109 * server.c (handle_general_set): Adjust.
1111 2017-11-16 Pedro Alves <palves@redhat.com>
1113 * remote-utils.c (remote_close): Block SIGIO signals instead of
1114 uninstalling the SIGIO handler.
1116 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1118 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1120 2017-11-16 Yao Qi <yao.qi@linaro.org>
1122 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1123 (tic6x_store_gregset): Likewise.
1124 (tic6x_usrregs_info): Move it up.
1126 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1128 * Makefile.in: Update arch rules.
1129 * configure.srv: Explicitly mark arch/ files.
1131 2017-11-13 Andreas Schwab <schwab@suse.de>
1133 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1135 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1137 2017-11-06 Pedro Alves <palves@redhat.com>
1139 * config.in, configure: Regenerate.
1141 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1143 * target.c (struct thread_search): Remove.
1144 (thread_search_callback): Remove.
1145 (prepare_to_access_memory): Use for_each_thread instead of
1146 find_inferior. Inline code from thread_search_callback.
1148 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1150 * server.c (struct visit_actioned_threads_data): Remove.
1151 (visit_actioned_threads): Change prototype to take arguments
1153 (resume): Use find_thread instead of find_inferior.
1155 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1157 * server.c (queue_stop_reply_callback): Change prototype, return
1159 (find_status_pending_thread_callback): Remove.
1160 (handle_status): Replace find_inferior with find_thread and
1163 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1165 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1167 (aarch64_store_gregset): Likewise.
1168 (aarch64_fill_fpregset): Likewise.
1169 (aarch64_store_fpregset): Likewise.
1171 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1173 * gdbthread.h (find_thread, for_each_thread): New functions.
1174 * inferiors.c (thread_of_pid): Remove.
1175 (find_any_thread_of_pid): Use find_thread.
1176 * linux-low.c (num_lwps): Use for_each_thread.
1178 2017-10-17 Yao Qi <yao.qi@linaro.org>
1180 * Makefile.in: Remove one rule.
1181 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1183 2017-10-17 Yao Qi <yao.qi@linaro.org>
1185 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1186 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1188 2017-10-17 Yao Qi <yao.qi@linaro.org>
1190 * configure.srv: Rename arm.o with arch/arm.o.
1192 2017-10-17 Yao Qi <yao.qi@linaro.org>
1194 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1195 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1196 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1197 (arch-i386.o, arch-amd64.o): Remove rules.
1198 (arch/%.o): New rule.
1199 Update POSTCOMPILE and COMPILE.pre.
1200 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1201 * configure: Re-generated.
1202 * configure.srv: Replace arch-i386.o with arch/i386.o.
1203 Replace arch-amd64.o with arch/amd64.o.
1205 2017-10-16 Yao Qi <yao.qi@linaro.org>
1207 * configure: Regenerated.
1209 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1211 * inferiors.h: (struct inferior_list): Remove.
1212 (struct inferior_list_entry); Remove.
1213 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1214 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1215 get_first_inferior): Remove.
1216 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1217 find_inferior_id, find_inferior_in_random): Change signature.
1218 * inferiors.c (all_threads): Change type to
1219 std::list<thread_info *>.
1220 (get_thread): Remove macro.
1221 (find_inferior, find_inferior_id): Change signature, implement
1223 (find_inferior_in_random): Change signature, implement using
1224 find_thread_in_random.
1225 (for_each_inferior, for_each_inferior_with_data): Change
1226 signature, implement using for_each_thread.
1227 (add_inferior_to_list, remove_inferior): Remove.
1228 (add_thread, get_first_thread, thread_of_pid,
1229 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1230 (get_first_inferior, one_inferior_p, clear_inferior_list):
1232 (clear_inferiors, get_thread_process): Update.
1233 * gdbthread.h: Include <list>.
1234 (struct thread_info) <entry>: Remove field.
1236 (all_threads): Change type to std::list<thread_info *>.
1237 (get_first_inferior): Add doc.
1238 (find_thread, for_each_thread, find_thread_in_random): New
1240 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1241 * linux-arm-low.c (update_registers_callback): Update.
1242 * linux-low.c (second_thread_of_pid_p): Update.
1243 (kill_one_lwp_callback, linux_detach_lwp_callback,
1244 delete_lwp_callback, status_pending_p_callback, same_lwp,
1245 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1246 iterate_over_lwps, not_stopped_callback,
1247 resume_stopped_resumed_lwps, count_events_callback,
1248 select_singlestep_lwp_callback, select_event_lwp_callback,
1249 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1250 suspend_and_send_sigstop_callback, wait_for_sigstop,
1251 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1252 lwp_running, linux_set_resume_request, resume_status_pending_p,
1253 need_step_over_p, start_step_over, linux_resume_one_thread,
1254 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1255 reset_lwp_ptrace_options_callback): Update.
1256 * linux-mips-low.c (update_watch_registers_callback): Update.
1257 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1259 (free_register_cache_thread_one): Remove.
1260 (regcache_release): Update.
1261 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1262 handle_qxfer_threads_worker): Update.
1263 (handle_query): Update, use list iterator.
1264 (visit_actioned_threads, handle_pending_status,
1265 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1266 clear_pending_status_callback, set_pending_status_callback,
1267 find_status_pending_thread_callback, handle_status,
1268 process_serial_event): Update.
1269 * target.c (thread_search_callback): Update.
1270 * thread-db.c (thread_db_get_tls_address): Update.
1271 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1273 * win32-i386-low.c (update_debug_registers_callback): Update.
1274 * win32-low.c (delete_thread_info, child_delete_thread,
1275 continue_one_thread, suspend_one_thread,
1276 get_child_debug_event): Adjust.
1278 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1280 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1281 * inferiors.h: Include <list>.
1282 (struct process_info) <entry>: Remove field.
1284 (pid_of): Change macro to function.
1285 (ptid_of, lwpid_of): Remove macro.
1286 (all_processes): Change type to std::list<process_info *>.
1287 (ALL_PROCESSES): Remove macro.
1288 (for_each_process, find_process): New function.
1289 * inferiors.c (all_processes): Change type to
1290 std::list<process_info *>.
1291 (find_thread_process): Adjust.
1292 (add_process): Likewise.
1293 (remove_process): Likewise.
1294 (find_process_pid): Likewise.
1295 (get_first_process): Likewise.
1296 (started_inferior_callback): Remove.
1297 (have_started_inferiors_p): Adjust.
1298 (attached_inferior_callback): Remove.
1299 (have_attached_inferiors_p): Adjust.
1300 * linux-low.c (check_zombie_leaders): Likewise.
1301 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1302 (x86_linux_update_xmltarget): Adjust.
1303 * server.c (handle_query): Likewise.
1304 (gdb_reattached_process): Remove.
1305 (handle_status): Adjust.
1306 (kill_inferior_callback): Likewise.
1307 (detach_or_kill_inferior): Remove.
1308 (print_started_pid): Likewise.
1309 (print_attached_pid): Likewise.
1310 (detach_or_kill_for_exit): Update.
1311 (process_serial_event): Likewise.
1312 * linux-arm-low.c (arm_new_fork): Likewise.
1314 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1316 * dll.h: Include <list>.
1317 (struct dll_info): Add constructor.
1318 <entry>: Remove field.
1319 (all_dlls): Change type to std::list<dll_info>.
1320 * dll.c: Include <algorithm>.
1321 (get_dll): Remove macro.
1322 (all_dlls): Change type to std::list<dll_info *>.
1323 (free_one_dll): Remove.
1324 (match_dll): Likewise.
1325 (loaded_dll): Adjust.
1326 (unloaded_dll): Adjust to all_dlls type change, use
1327 std::find_if. Inline code from match_dll.
1328 (clear_dlls): Adjust to all_dlls type change.
1329 * server.c (emit_dll_description): Remove.
1330 (handle_qxfer_libraries): Adjust to all_dlls type change,
1331 integrate emit_dll_description's functionality.
1333 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1335 * linux-low.h (struct linux_target_ops) <delete_process>: New
1337 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1338 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1339 (struct linux_target_ops): Add delete_process callback.
1340 * linux-arm-low.c (arm_delete_process): New.
1341 (struct linux_target_ops): Add delete_process callback.
1342 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1343 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1344 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1345 * linux-mips-low.c (mips_linux_delete_process): New.
1346 (struct linux_target_ops): Add delete_process callback.
1347 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1348 * linux-s390-low.c (struct linux_target_ops): Likewise.
1349 * linux-sh-low.c (struct linux_target_ops): Likewise.
1350 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1351 * linux-tile-low.c (struct linux_target_ops): Likewise.
1352 * linux-x86-low.c (x86_linux_delete_process): New.
1353 (struct linux_target_ops): Add delete_process callback.
1354 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1356 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1358 * linux-aarch64-low.c (the_low_target): Add thread delete
1360 * linux-arm-low.c (arm_delete_thread): New function.
1361 (the_low_target): Add thread delete callback.
1362 * linux-bfin-low.c (the_low_target): Likewise.
1363 * linux-crisv32-low.c (the_low_target): Likewise.
1364 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1366 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1368 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1369 * linux-mips-low.c (mips_linux_delete_thread): New function.
1370 (the_low_target): Add thread delete callback.
1371 * linux-ppc-low.c (the_low_target): Likewise.
1372 * linux-s390-low.c (the_low_target): Likewise.
1373 * linux-sh-low.c (the_low_target): Likewise.
1374 * linux-tic6x-low.c (the_low_target): Likewise.
1375 * linux-tile-low.c (the_low_target): Likewise.
1376 * linux-x86-low.c (the_low_target): Likewise.
1377 * linux-xtensa-low.c (the_low_target): Likewise.
1379 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1381 * win32-low.c: Include "common-inferior.h".
1383 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1385 * inferiors.c (set_inferior_cwd): New function.
1386 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1387 (handle_query): Inform that QSetWorkingDir is supported.
1388 * win32-low.c (create_process): Pass the inferior's cwd to
1391 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1393 * inferiors.c (current_inferior_cwd): New global variable.
1394 (get_inferior_cwd): New function.
1395 * inferiors.h (struct process_info) <cwd>: New field.
1397 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1399 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1400 (OBS): Add gdb_tilde_expand.o.
1402 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1404 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1405 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1407 2017-09-29 Pedro Alves <palves@redhat.com>
1409 * ax.c (gdb_parse_agent_expr): Constify.
1410 * ax.h (gdb_parse_agent_expr): Constify.
1411 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1413 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1414 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1415 * remote-utils.h (read_ptid): Constify.
1416 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1417 (process_point_options, process_serial_event): Constify.
1418 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1419 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1420 (cmd_qtbuffer): Constify.
1422 2017-09-29 Pedro Alves <palves@redhat.com>
1424 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1427 2017-09-29 Pedro Alves <palves@redhat.com>
1429 * linux-low.c (handle_extended_wait): Pass parent thread instead
1430 of process to thread_db_notice_clone.
1431 * linux-low.h (thread_db_notice_clone): Replace parent process
1432 parameter with parent thread parameter.
1433 * thread-db.c (find_one_thread): Add comment.
1434 (thread_db_notice_clone): Replace parent process parameter with
1435 parent thread parameter. Temporarily switch to the parent thread.
1437 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1439 * gdbthread.h: Include "common-gdbthread.h".
1440 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1441 "if" when validating the ptid.
1442 * remote-utils.c: Include "gdbthread.h".
1443 (prepare_resume_reply): Use "switch_to_thread".
1444 * target.c (done_accessing_memory): Likewise.
1446 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1448 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1449 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1450 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1451 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1452 s390x-gs-linux64-ipa.o to ipa_obj.
1453 * linux-s390-low.c (HWCAP_S390_GS): New define.
1454 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1456 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1457 (s390_arch_setup): Check for guarded-storage support and choose
1459 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1460 init_registers_s390x_gs_linux64.
1461 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1463 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1464 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1466 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1468 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1470 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1472 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1473 (thread_db_thread_handle): Declare.
1474 * linux-low.c (linux_target_ops): Initialize thread_handle.
1475 * server.c (handle_qxfer_threads_worker): Add support for
1477 * target.h (struct target_ops): Add new function pointer,
1479 (target_thread_handle): Define.
1480 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1482 (thread_db_thread_handle): New function.
1484 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1486 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1487 * linux-low.h (thread_db_notice_clone): Declare.
1488 * thread-db.c (thread_db_notice_clone): New function.
1490 2017-09-21 Pedro Alves <palves@redhat.com>
1492 * server.c (gdb_read_memory, handle_status, process_serial_event)
1493 (handle_serial_event, handle_target_event): Adjust to
1494 set_desired_thread prototype change.
1495 * target.c (set_desired_thread): Remove 'use_general' parameter
1497 * target.h (set_desired_thread): Remove 'use_general' parameter.
1499 2017-09-20 Tom Tromey <tom@tromey.com>
1501 * target.c (target_terminal::terminal_state): Define.
1502 (target_terminal::init): Rename from target_terminal_init.
1503 (target_terminal::inferior): Rename from
1504 target_terminal_inferior.
1505 (target_terminal::ours): Rename from target_terminal_ours.
1506 (target_terminal::ours_for_output, target_terminal::info): New.
1508 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1510 * server.c (accumulate_file_name_length): Remove.
1511 (emit_dll_description): Adjust to std::string change.
1512 (handle_qxfer_libraries): Use std::string to hold document.
1514 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1516 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1517 return type of xml_escape_text.
1518 * server.c (emit_dll_description): Likewise.
1520 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1522 * server.c (captured_main): Accept argument for --selftest.
1523 Update run_tests call.
1524 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1525 when registering selftests.
1527 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1529 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1530 instead of "VEC" for "target_desc.reg_defs".
1531 (regcache_cpy): Likewise.
1532 (registers_to_string): Likewise.
1533 (registers_from_string): Likewise.
1534 (find_regno): Likewise.
1535 (supply_regblock): Likewise.
1536 (regcache_raw_read_unsigned): Likewise.
1537 * tdesc.c (init_target_desc): Likewise.
1538 (tdesc_create_reg): Likewise.
1539 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1540 (struct target_desc) <reg_defs>: Convert to "std::vector".
1541 (target_desc): Do not initialize "reg_defs".
1542 (~target_desc): Update code to use "std::vector" instead of "VEC"
1543 for "target_desc.reg_defs".
1544 (operator==): Likewise.
1546 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1548 * inferiors.h (thread_to_gdb_id): Remove.
1549 * inferiors.c (thread_to_gdb_id): Remove.
1550 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1551 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1552 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1554 * nto-low.c (nto_fetch_registers, nto_store_registers,
1555 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1557 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1559 * inferiors.h (gdb_id_to_thread_id): Remove.
1560 * inferiors.c (gdb_id_to_thread_id): Remove.
1561 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1562 removal. Move pid declaration closer to where it's used.
1564 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1566 * server.c (handle_detach): New function.
1567 (process_serial_event): Move code out, call handle_detach.
1569 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1571 * server.c (require_running): Rename to ...
1572 (require_running_or_return): ... this ...
1573 (require_running_or_break): ... and this.
1574 (handle_query, process_serial_event): Adjust.
1576 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1578 * linux-low.c (linux_set_resume_request): Remove unused
1581 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1583 * server.c (first_thread_of): Remove.
1584 (process_serial_event): Replace usage of first_thread_of with
1585 find_any_thread_of_pid.
1586 * tracepoint.c (same_process_p): Remove.
1587 (gdb_agent_about_to_close): Replace usage of same_process_p with
1588 find_any_thread_of_pid.
1589 * linux-x86-low.c (same_process_callback): Remove.
1590 (x86_arch_setup_process_callback): Replace usage of
1591 same_process_callback with find_any_thread_of_pid.
1592 * thread-db.c (any_thread_of): Remove.
1593 (switch_to_process): Replace usage of any_thread_of with
1594 find_any_thread_of_pid.
1595 * inferiors.c (thread_pid_matches_callback): Remove.
1596 (find_thread_process): Adjust to use find_any_thread_of_pid.
1598 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1600 * regcache.c (get_thread_regcache): Guard calls to "memset"
1603 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1605 * linux-low.c (handle_extended_wait): Use
1606 "allocate_target_description" instead of "XNEW".
1607 * linux-x86-low.c (initialize_low_arch): Likewise.
1609 2017-09-05 Yao Qi <yao.qi@linaro.org>
1611 * configure.srv (srv_i386_regobj): Remove.
1612 (srv_amd64_regobj): Remove.
1613 (srv_regobj): Set it to "" for x86 non-linux targets.
1614 * linux-x86-tdesc.c (i386_linux_read_description):
1615 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1616 (init_registers_i386): Remove the declaration.
1617 (tdesc_i386): Remove the declaration.
1618 (lynx_i386_arch_setup): Call i386_create_target_description.
1619 * nto-x86-low.c: Likewise.
1620 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1621 [!__x86_64__]: include arch/i386.h.
1622 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1624 2017-09-05 Yao Qi <yao.qi@linaro.org>
1626 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1627 i386/amd64-XXX-linux from it.
1629 2017-09-05 Yao Qi <yao.qi@linaro.org>
1631 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1633 (ipa_amd64_linux_regobj): Remove.
1634 (ipa_x32_linux_regobj): Remove.
1636 2017-09-05 Yao Qi <yao.qi@linaro.org>
1638 * Makefile.in (arch-amd64.o): New rule.
1639 * configure.srv: Append arch-amd64.o.
1640 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1641 (get_ipa_tdesc): Call amd64_linux_read_description.
1642 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1643 and init_registers_amd64_XXX.
1644 * linux-x86-low.c (x86_linux_read_description): Call
1645 amd64_linux_read_description.
1646 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1647 (initialize_low_arch): Don't call init_registers_x32_XXX and
1648 init_registers_amd64_XXX.
1649 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1650 and tdesc_amd64_XXX.
1651 [__x86_64__] (amd64_tdesc_test): New function.
1652 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1653 and init_registers_amd64_XXX.
1654 * linux-x86-tdesc.c: Include arch/amd64.h.
1655 (xcr0_to_tdesc_idx): New function.
1656 (i386_linux_read_description): New function.
1657 (amd64_get_ipa_tdesc_idx): New function.
1658 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1659 (amd64_get_ipa_tdesc): Declare.
1661 2017-09-05 Yao Qi <yao.qi@linaro.org>
1663 * configure.srv (srv_i386_linux_xmlfiles): Remove
1664 i386/i386-XXX-linux.xml from it.
1666 2017-09-05 Yao Qi <yao.qi@linaro.org>
1668 * configure.srv: Set srv_i386_linux_regobj empty if $development
1670 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1671 initialize_low_tdesc.
1672 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1673 with #if initialize_low_tdesc.
1674 * linux-x86-tdesc-selftest.c: New file.
1675 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1677 2017-09-05 Yao Qi <yao.qi@linaro.org>
1679 * Makefile.in (arch-i386.o): New rule.
1680 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1681 (x86_64-*-linux*): Likewise.
1682 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1683 include arch/i386.h.
1684 (i386_linux_read_description): Remove code and call
1685 i386_create_target_description.
1686 * tdesc.c (allocate_target_description): New function.
1687 * tdesc.h (set_tdesc_architecture): Remove declaration.
1688 (set_tdesc_osabi): Likewise.
1690 2017-09-05 Yao Qi <yao.qi@linaro.org>
1692 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1693 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1694 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1696 * server.c (get_features_xml): Call tdesc_get_features_xml.
1697 * tdesc.c (set_tdesc_architecture): New function.
1698 (set_tdesc_osabi): New function.
1699 (tdesc_get_features_xml): New function.
1700 (tdesc_create_feature): Add an argument.
1701 * tdesc.h (struct target_desc) <features>: New field.
1702 <arch, osabi>: New field.
1703 (~target_desc): xfree features, arch, and osabi.
1704 (target_desc::oerator==): Don't compare .xmltarget.
1705 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1706 (set_tdesc_osabi): Likewise.
1707 (tdesc_get_features_xml): Likewise.
1709 2017-09-05 Yao Qi <yao.qi@linaro.org>
1711 * linux-x86-tdesc.c: Include selftest.h.
1712 (i386_tdesc_test): New function.
1713 (initialize_low_tdesc): Call selftests::register_test.
1714 * tdesc.h: Include regdef.h.
1715 (target_desc): Override operator == and !=.
1717 2017-09-05 Yao Qi <yao.qi@linaro.org>
1719 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1720 (ipa_obj): Likewise.
1721 * linux-i386-ipa.c: Include common/x86-xstate.h
1722 (get_ipa_tdesc): Call i386_linux_read_description.
1723 (initialize_low_tracepoint): Don't call init_registers_XXX
1724 functions, call initialize_low_tdesc instead.
1725 * linux-x86-low.c (x86_linux_read_description): Call
1726 i386_linux_read_description.
1727 (initialize_low_arch): Don't call init_registers_i386_XXX
1728 functions, call initialize_low_tdesc.
1729 * linux-x86-tdesc.c: New file.
1730 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1731 (i386_get_ipa_tdesc_idx): Declare.
1732 (i386_get_ipa_tdesc): Declare.
1733 (initialize_low_tdesc): Declare.
1735 2017-09-05 Yao Qi <yao.qi@linaro.org>
1737 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1740 2017-09-05 Yao Qi <yao.qi@linaro.org>
1742 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1743 * regcache.c (get_thread_regcache): Use VEC_length.
1744 (init_register_cache): Likewise.
1745 (regcache_cpy): Likewise.
1746 (registers_to_string): Iterate reg_defs via VEC_iterate.
1747 (find_regno): Likewise.
1748 (find_register_by_number): Use VEC_index.
1749 (register_size): Call find_register_by_number.
1750 (register_data): Call find_register_by_number.
1751 (supply_regblock): Use VEC_length.
1752 (regcache_raw_read_unsigned): Likewise.
1753 * tdesc.c (init_target_desc): Iterate reg_defs via
1755 (default_description): Update initializer.
1756 (copy_target_description): Don't update field num_registers.
1757 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1758 <num_registers>: Remove.
1760 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1762 * Makefile.in (.SECONDARY): Define target.
1764 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1766 * linux-low.c (linux_wait_1): Adjust.
1767 * server.c (queue_stop_reply_callback): Adjust.
1769 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1771 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1772 QEnvironmentUnset and QEnvironmentReset packets.
1773 (handle_query): Inform remote that QEnvironmentHexEncoded,
1774 QEnvironmentUnset and QEnvironmentReset are supported.
1776 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1778 * inferiors.h (inferior_target_data): Rename to ...
1779 (thread_target_data): ... this.
1780 (inferior_regcache_data): Rename to ...
1781 (thread_regcache_data): ... this.
1782 (set_inferior_regcache_data): Rename to ...
1783 (set_thread_regcache_data): ... this.
1784 * inferiors.c (inferior_target_data): Rename to ...
1785 (thread_target_data): ... this.
1786 (inferior_regcache_data): Rename to ...
1787 (thread_regcache_data): ... this.
1788 (set_inferior_regcache_data): Rename to ...
1789 (set_thread_regcache_data): ... this.
1790 (free_one_thread): Update.
1791 * linux-low.h (get_thread_lwp): Update.
1792 * regcache.c (get_thread_regcache): Update.
1793 (regcache_invalidate_thread): Update.
1794 (free_register_cache_thread): Update.
1795 * win32-i386-low.c (update_debug_registers_callback): Update.
1796 (win32_get_current_dr): Update.
1797 * win32-low.c (thread_rec): Update.
1798 (delete_thread_info): Update.
1799 (continue_one_thread): Update.
1800 (suspend_one_thread): Update.
1802 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1804 * inferiors.c (set_inferior_target_data): Remove.
1805 * inferiors.h (set_inferior_target_data): Remove.
1807 2017-08-18 Yao Qi <yao.qi@linaro.org>
1809 * Makefile.in (OBS): Add selftest.o.
1810 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1811 * configure, config.in: Re-generated.
1812 * server.c: Include common/sefltest.h.
1813 (captured_main): Handle option --selftest.
1815 2017-08-09 Yao Qi <yao.qi@linaro.org>
1817 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1818 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1819 i386-avx-mpx.o and i386-mmx.o.
1820 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1821 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1822 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1823 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1824 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1825 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1826 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1827 i386/amd64-avx-mpx.xml.
1829 2017-08-09 Yao Qi <yao.qi@linaro.org>
1831 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1832 and x32-avx-avx512.o.
1833 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1834 i386/x32-avx-avx512.xml.
1836 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1838 * tracepoint.h (enum class fast_tpoint_collect_result): New
1840 (fast_tracepoint_collecting): Change return type to
1841 fast_tpoint_collect_result.
1842 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1843 * linux-low.h: Include tracepoint.h.
1844 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1845 fast_tpoint_collect_result.
1846 * linux-low.c (handle_tracepoints): Adjust.
1847 (linux_fast_tracepoint_collecting): Change return type to
1848 fast_tpoint_collect_result.
1849 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1850 linux_wait_1, stuck_in_jump_pad_callback,
1851 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1852 proceed_one_lwp): Adjust to type change.
1854 2017-07-10 Yao Qi <yao.qi@linaro.org>
1856 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1858 2017-06-29 Yao Qi <yao.qi@linaro.org>
1860 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1862 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1864 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
1866 * Makefile.in (IPA_OBJS): Sort and format one item per line.
1868 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1870 * linux-low.c (linux_create_inferior): Adjust code to access the
1871 environment information via 'gdb_environ' class.
1872 * lynx-low.c (lynx_create_inferior): Likewise.
1873 * server.c (our_environ): Make it an instance of 'gdb_environ'.
1874 (get_environ): Return a pointer to 'our_environ'.
1875 (captured_main): Initialize 'our_environ'.
1876 * server.h (get_environ): Adjust prototype.
1877 * spu-low.c (spu_create_inferior): Adjust code to access the
1878 environment information via 'gdb_environ' class.
1880 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1882 * linux-low.c (linux_read_memory, linux_write_memory): Remove
1883 usage of "register" keyword.
1885 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1887 * configure: Re-generate.
1889 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1891 * configure: Re-generate.
1893 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1895 * Makefile.in (COMPILE.pre): Add "-x c++".
1897 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
1899 * fork-child.c: Conditionally include <signal.h>.
1901 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1903 * server.c (handle_general_set): Handle new packet
1904 "QStartupWithShell".
1905 (handle_query): Add "QStartupWithShell" to the list of supported
1907 (gdbserver_usage): Add help text explaining the
1908 new "--startup-with-shell" and "--no-startup-with-shell" CLI
1910 (captured_main): Recognize and act upon the presence of the new
1913 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1914 Pedro Alves <palves@redhat.com>
1916 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1917 * configure: Regenerate.
1918 * configure.srv (srv_linux_obj): Add "fork-child.o" and
1920 (i[34567]86-*-lynxos*): Likewise.
1921 (spu*-*-*): Likewise.
1922 * fork-child.c: New file.
1923 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1925 (linux_ptrace_fun): New function.
1926 (linux_create_inferior): Adjust function prototype to reflect
1927 change on "target.h". Adjust function code to use
1929 (linux_request_interrupt): Delete "signal_pid".
1930 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1931 (lynx_ptrace_fun): New function.
1932 (lynx_create_inferior): Adjust function prototype to reflect
1933 change on "target.h". Adjust function code to use
1935 * nto-low.c (nto_create_inferior): Adjust function prototype and
1936 code to reflect change on "target.h". Update comments.
1937 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1938 "common-terminal.h" and "environ.h".
1939 (terminal_fd): Moved to fork-child.c.
1940 (old_foreground_pgrp): Likewise.
1941 (restore_old_foreground_pgrp): Likewise.
1942 (last_status): Make it global.
1943 (last_ptid): Likewise.
1944 (our_environ): New variable.
1945 (startup_with_shell): Likewise.
1946 (program_name): Likewise.
1947 (program_argv): Rename to...
1948 (program_args): ...this.
1949 (wrapper_argv): New variable.
1950 (start_inferior): Delete function.
1951 (get_exec_wrapper): New function.
1952 (get_exec_file): Likewise.
1953 (get_environ): Likewise.
1954 (prefork_hook): Likewise.
1955 (post_fork_inferior): Likewise.
1956 (postfork_hook): Likewise.
1957 (postfork_child_hook): Likewise.
1958 (handle_v_run): Update code to deal with arguments coming from the
1959 remote host. Update calls from "start_inferior" to
1961 (captured_main): Likewise. Initialize environment variable. Call
1963 * server.h (post_fork_inferior): New prototype.
1964 (get_environ): Likewise.
1965 (last_status): Declare.
1966 (last_ptid): Likewise.
1967 (signal_pid): Likewise.
1968 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1969 (spu_ptrace_fun): New function.
1970 (spu_create_inferior): Adjust function prototype to reflect change
1971 on "target.h". Adjust function code to use "fork_inferior".
1972 * target.c (target_terminal_init): New function.
1973 (target_terminal_inferior): Likewise.
1974 (target_terminal_ours): Likewise.
1975 * target.h: Include <vector>.
1976 (struct target_ops) <create_inferior>: Update prototype.
1977 (create_inferior): Update macro.
1978 * utils.c (gdb_flush_out_err): New function.
1979 * win32-low.c (win32_create_inferior): Adjust function prototype
1980 and code to reflect change on "target.h".
1982 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1984 * inferiors.c (switch_to_thread): New function.
1986 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1988 * Makefile.in (SFILE): Add "common/job-control.c".
1989 (OBS): Add "job-control.o".
1991 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1993 * Makefile: Remove "@host_makefile_frag@".
1995 2017-05-05 Pedro Alves <palves@redhat.com>
1997 * configure: Regenerate.
1999 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2001 * configure: Regenerate.
2003 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2005 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2006 software_single_step change of return type to
2007 std::vector<CORE_ADDR>.
2008 * linux-low.c (install_software_single_step_breakpoints):
2010 * linux-low.h (install_software_single_step_breakpoints):
2013 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2015 * remote-utils.c: Include "gdb_termios.h" instead of
2017 * terminal.h: Delete file.
2019 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2021 * server.c: Include <vector>.
2022 <program_argv, wrapper_argv>: Convert to std::vector.
2023 (start_inferior): Rewrite function to use C++.
2024 (handle_v_run): Likewise. Update code that calculates the argv
2025 based on the vRun packet; use C++.
2026 (captured_main): Likewise.
2028 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2030 * server.c (handle_v_cont): Initialize thread_resume::thread
2033 2017-04-05 Pedro Alves <palves@redhat.com>
2035 * configure: Regenerate.
2037 2017-04-05 Pedro Alves <palves@redhat.com>
2039 * gdbreplay.c (sync_error): Constify.
2040 * linux-x86-low.c (push_opcode): Constify.
2042 2017-04-05 Pedro Alves <palves@redhat.com>
2044 * win32-low.c (get_child_debug_event)
2045 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2046 Report TARGET_WAITKIND_SPURIOUS instead.
2048 2017-04-05 Pedro Alves <palves@redhat.com>
2050 * remote-utils.c (remote_prepare, remote_open): Constify.
2051 * remote-utils.h (remote_prepare, remote_open): Constify.
2052 * server.c (captured_main): Constify 'port' handling.
2054 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2056 * Makefile.in (clean): Clear .deps.
2058 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2060 * .gitignore: Remove generated files, replace with wildcard.
2061 * (clean): Replace removal of generated files with wildcard.
2062 (version.c): Replace with...
2063 (version-generated.c): ...this.
2064 (xml-builtin.c): Replace with...
2065 (xml-builtin-generated.c): ...this.
2066 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2067 (%.c: *regformats*): Replace with...
2068 (%-generated.c: *regformats*): ...this.
2070 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2072 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2073 (xtensa_fill_gregset): Call collect_register_by_name for
2075 (xtensa_store_gregset): Call supply_register_by_name for
2078 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2080 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2081 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2082 (xtensa_store_gregset): Call supply_register for all registers in
2083 a0_regnum..a0_regnum + C0_NREGS range.
2085 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2087 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2088 (ax-ipa.o: ax.c): Remove.
2089 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2090 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2091 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2092 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2093 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2095 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2097 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2098 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2099 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2100 (errors-ipa.o: ../common/errors.c): Remove.
2101 (format-ipa.o: ../common/format.c): Remove.
2102 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2104 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2106 * Makefile.in (%-ipa.o: %.c): New rule.
2107 (tracepoint-ipa.o: tracepoint.c): Remove.
2108 (utils-ipa.o: utils.c): Remove.
2109 (remote-utils-ipa.o: remote-utils.c): Remove.
2110 (regcache-ipa.o: regcache.c): Remove.
2111 (i386-linux-ipa.o: i386-linux.c): Remove.
2112 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2113 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2114 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2115 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2116 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2117 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2118 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2119 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2120 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2121 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2122 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2123 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2124 (aarch64-ipa.o: aarch64.c): Remove.
2125 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2126 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2127 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2128 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2129 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2130 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2131 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2132 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2133 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2134 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2135 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2136 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2137 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2138 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2139 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2140 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2141 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2142 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2143 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2144 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2145 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2146 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2147 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2148 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2149 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2150 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2151 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2152 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2153 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2154 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2155 (tdesc-ipa.o: tdesc.c): Remove.
2156 (x32-linux-ipa.o: x32-linux.c): Remove.
2157 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2158 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2160 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2162 * Makefile.in (%.o: ../arch/%.c): New rule.
2163 (arm.o: ../arch/arm.c): Remove.
2164 (arm-linux.o: ../arch/arm-linux.c): Remove.
2165 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2166 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2168 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2170 * Makefile.in (%.o: ../nat/%.c): New rule.
2171 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2172 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2173 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2174 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2175 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2176 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2177 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2178 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2179 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2180 (linux-personality.o: ../nat/linux-personality.c): Remove.
2181 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2182 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2183 (x86-linux.o: ../nat/x86-linux.c): Remove.
2184 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2185 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2187 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2189 * Makefile.in (%.o: ../common/%.c): New rule.
2190 (signals.o: ../common/signals.c): Remove.
2191 (print-utils.o: ../common/print-utils.c): Remove.
2192 (rsp-low.o: ../common/rsp-low.c): Remove.
2193 (common-utils.o: ../common/common-utils.c): Remove.
2194 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2195 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2196 (vec.o: ../common/vec.c): Remove.
2197 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2198 (xml-utils.o: ../common/xml-utils.c): Remove.
2199 (ptid.o: ../common/ptid.c): Remove.
2200 (buffer.o: ../common/buffer.c): Remove.
2201 (format.o: ../common/format.c): Remove.
2202 (filestuff.o: ../common/filestuff.c): Remove.
2203 (agent.o: ../common/agent.c): Remove.
2204 (errors.o: ../common/errors.c): Remove.
2205 (environ.o: ../common/environ.c): Remove.
2206 (common-debug.o: ../common/common-debug.c): Remove.
2207 (cleanups.o: ../common/cleanups.c): Remove.
2208 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2209 (fileio.o: ../common/fileio.c): Remove.
2210 (common-regcache.o: ../common/common-regcache.c): Remove.
2211 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2212 (new-op.o: ../common/new-op.c): Remove.
2213 (btrace-common.o: ../common/btrace-common.c): Remove.
2215 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2217 * Makefile.in (%.o: ../target/%.c): New rule.
2218 (waitstatus.o: ../target/waitstatus.c): Remove.
2220 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2223 (%.c: ../regformats/%.dat,
2224 (%.c: ../regformats/arm/%.dat,
2225 (%.c: ../regformats/i386/%.dat,
2226 (%.c: ../regformats/rs6000/%.dat): New rules.
2227 (aarch64.c): Remove.
2228 (reg-arm.c): Remove.
2229 (arm-with-iwmmxt.c): Remove.
2230 (arm-with-vfpv2.c): Remove.
2231 (arm-with-vfpv3.c): Remove.
2232 (arm-with-neon.c): Remove.
2233 (reg-bfin.c): Remove.
2234 (reg-cris.c): Remove.
2235 (reg-crisv32.c): Remove.
2237 (i386-linux.c): Remove.
2238 (i386-avx.c): Remove.
2239 (i386-avx-linux.c): Remove.
2240 (i386-avx-avx512.c): Remove.
2241 (i386-avx-avx512-linux.c): Remove.
2242 (i386-mpx.c): Remove.
2243 (i386-mpx-linux.c): Remove.
2244 (i386-avx-mpx-avx512-pku.c): Remove.
2245 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2246 (i386-avx-mpx.c): Remove.
2247 (i386-avx-mpx-linux.c): Remove.
2248 (i386-mmx.c): Remove.
2249 (i386-mmx-linux.c): Remove.
2250 (reg-ia64.c): Remove.
2251 (reg-m32r.c): Remove.
2252 (reg-m68k.c): Remove.
2254 (mips-linux.c): Remove.
2255 (mips-dsp-linux.c): Remove.
2256 (mips64-linux.c): Remove.
2257 (mips64-dsp-linux.c): Remove.
2258 (nios2-linux.c): Remove.
2259 (powerpc-32.c): Remove.
2260 (powerpc-32l.c): Remove.
2261 (powerpc-altivec32l.c): Remove.
2262 (powerpc-cell32l.c): Remove.
2263 (powerpc-vsx32l.c): Remove.
2264 (powerpc-isa205-32l.c): Remove.
2265 (powerpc-isa205-altivec32l.c): Remove.
2266 (powerpc-isa205-vsx32l.c): Remove.
2267 (powerpc-e500l.c): Remove.
2268 (powerpc-64l.c): Remove.
2269 (powerpc-altivec64l.c): Remove.
2270 (powerpc-cell64l.c): Remove.
2271 (powerpc-vsx64l.c): Remove.
2272 (powerpc-isa205-64l.c): Remove.
2273 (powerpc-isa205-altivec64l.c): Remove.
2274 (powerpc-isa205-vsx64l.c): Remove.
2275 (s390-linux32.c): Remove.
2276 (s390-linux32v1.c): Remove.
2277 (s390-linux32v2.c): Remove.
2278 (s390-linux64.c): Remove.
2279 (s390-linux64v1.c): Remove.
2280 (s390-linux64v2.c): Remove.
2281 (s390-te-linux64.c): Remove.
2282 (s390-vx-linux64.c): Remove.
2283 (s390-tevx-linux64.c): Remove.
2284 (s390x-linux64.c): Remove.
2285 (s390x-linux64v1.c): Remove.
2286 (s390x-linux64v2.c): Remove.
2287 (s390x-te-linux64.c): Remove.
2288 (s390x-vx-linux64.c): Remove.
2289 (s390x-tevx-linux64.c): Remove.
2290 (tic6x-c64xp-linux.c): Remove.
2291 (tic6x-c64x-linux.c): Remove.
2292 (tic6x-c62x-linux.c): Remove.
2294 (reg-sparc64.c): Remove.
2295 (reg-spu.c): Remove.
2297 (amd64-linux.c): Remove.
2298 (amd64-avx.c): Remove.
2299 (amd64-avx-linux.c): Remove.
2300 (amd64-avx-avx512.c): Remove.
2301 (amd64-avx-avx512-linux.c): Remove.
2302 (amd64-mpx.c): Remove.
2303 (amd64-mpx-linux.c): Remove.
2304 (amd64-avx-mpx-avx512-pku.c): Remove.
2305 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2306 (amd64-avx-mpx.c): Remove.
2307 (amd64-avx-mpx-linux.c): Remove.
2309 (x32-linux.c): Remove.
2310 (x32-avx.c): Remove.
2311 (x32-avx-linux.c): Remove.
2312 (x32-avx-avx512.c): Remove.
2313 (x32-avx-avx512-linux.c): Remove.
2314 (reg-xtensa.c): Remove.
2315 (reg-tilegx.c): Remove.
2316 (reg-tilegx32.c): Remove.
2318 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2320 * Makefile.in (SFILES): Add "common/environ.c".
2321 (OBJS): Add "common/environ.h".
2323 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2325 * configure.ac: Check if the fs_base and gs_base members of
2326 `struct user_regs_struct' exist.
2327 * config.in: Regenerated.
2328 * configure: Likewise.
2330 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2332 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2334 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2335 (get_next_pcs_syscall_next_pc): Likewise.
2337 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2339 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2340 * nto-x86-low.c: Likewise.
2342 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2344 * Makefile.in: Include disable-implicit-rules.mk.
2346 2016-11-23 Pedro Alves <palves@redhat.com>
2348 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2349 (debug_vprintf): Use std::chrono::steady_clock instead of
2350 gettimeofday. Use '.' instead of ':'.
2351 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2352 (get_timestamp): Use std::chrono::steady_clock instead of
2355 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2357 * Makefile.in: Fix whitespace formatting.
2359 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2361 * Makefile.in (SFILES, OBS): Flatten list and order
2364 2016-11-23 Pedro Alves <palves@redhat.com>
2366 * event-loop.c (handle_file_event): Use warning.
2367 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2368 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2371 2016-11-23 Pedro Alves <palves@redhat.com>
2373 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2375 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2376 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2377 debug_printf and debug_flush for debug output.
2378 * server.c (handle_general_set): Likewise.
2379 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2382 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2384 * Makefile.in (.c.o): Replace rule with ...
2385 (%.o: %.c): ... this one.
2387 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2389 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2390 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2392 * configure.ac: Remove checks for the make program.
2393 * configure: Re-generate.
2395 2016-10-28 Pedro Alves <palves@redhat.com>
2397 * Makefile.in (CXX_DIALECT): Get from configure.
2398 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2399 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2400 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2401 * config.in: Regenerate.
2402 * configure: Regenerate.
2404 2016-10-27 Yao Qi <yao.qi@linaro.org>
2406 * linux-low.c (linux_supports_range_stepping): Return true if
2407 can_software_single_step return true.
2409 2016-10-27 Yao Qi <yao.qi@linaro.org>
2411 * inferiors.c (find_inferior_in_random): New function.
2412 * inferiors.h (find_inferior_in_random): Declare.
2413 * linux-low.c (linux_wait_for_event_filtered): Call
2414 find_inferior_in_random instead of find_inferior.
2416 2016-10-27 Yao Qi <yao.qi@linaro.org>
2418 * linux-low.c (linux_wait_1): If single-step breakpoints are
2419 inserted, remove them.
2421 2016-10-26 Pedro Alves <palves@redhat.com>
2423 * linux-low.c (handle_extended_wait): Link parent/child fork
2425 (linux_wait_1): Unlink them.
2426 (linux_set_resume_request): Ignore resume requests for
2427 already-resumed and unhandled fork child threads.
2428 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2429 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2431 (handle_v_requests) <vCont>: Don't call require_running.
2432 * server.h (in_queued_stop_replies): New declaration.
2434 2016-10-24 Yao Qi <yao.qi@linaro.org>
2437 * linux-aarch64-low.c (append_insns): Cast the return value to
2440 2016-10-10 Yao Qi <yao.qi@linaro.org>
2442 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2444 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2446 * target.c (target_supports_multi_process): New function, moved
2448 * target.h (target_supports_multi_process): ... here. Remove
2451 2016-10-05 Tom Tromey <tom@tromey.com>
2454 * tracepoint.c (handle_tracepoint_bkpts): Check
2455 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2457 2016-10-05 Yao Qi <yao.qi@linaro.org>
2459 * configure.srv: Update the path of arm-*.xml files.
2461 2016-10-05 Terry Guo <terry.guo@arm.com>
2462 Yao Qi <yao.qi@linaro.org>
2464 * Makefile.in: Adjust the path of rules.
2465 * configure.srv: Update the path of xml files.
2466 * regformats/arm-with-iwmmxt.dat: Regenerated.
2467 * regformats/arm-with-neon.dat: Likewise.
2468 * regformats/arm-with-vfpv2.dat: Likewise.
2469 * regformats/arm-with-vfpv3.dat Likewise.
2471 2016-09-30 Yao Qi <yao.qi@linaro.org>
2474 * target.c (target_stop_and_wait): Don't call
2475 target_continue_no_signal, use resume_stop instead.
2477 2016-09-26 Yao Qi <yao.qi@linaro.org>
2479 * linux-low.c (linux_wait_1): Call debug_exit.
2481 2016-09-23 Pedro Alves <palves@redhat.com>
2483 * Makefile.in (SFILES): Add common/new-op.c.
2484 (OBS): Add common/new-op.o.
2485 (new-op.o): New rule.
2487 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2489 * .gitinore: Ignore more files.
2491 2016-09-21 Yao Qi <yao.qi@linaro.org>
2493 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2496 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2498 * server.c (start_inferior): Call target_mourn_inferior instead of
2499 mourn_inferior; pass ptid_t argument to it.
2501 (handle_target_event): Likewise.
2502 * target.c (target_mourn_inferior): New function.
2503 * target.h (mourn_inferior): Delete macro.
2505 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2507 * linux-low.c (lwp_is_stepping): New function.
2509 2016-09-06 Carl Love <cel@us.ibm.com>
2511 * server.c (start_inferior): Fixed comment, requested comment change
2512 didn't get updated correctly. Removed reference to ptrace () call as
2513 it is only true on Linux systems.
2515 2016-09-06 Carl Love <cel@us.ibm.com>
2517 * server.c (start_inferior): Do not call
2518 function target_post_create_inferior () if the
2519 inferior process has already exited.
2521 2016-09-05 Pedro Alves <palves@redhat.com>
2523 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2524 (COMPILE.pre, CC_LD): Use CXX directly.
2525 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2526 * acinclude.m4: Don't include build-with-cxx.m4.
2527 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2528 * configure: Regenerate.
2530 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2533 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2534 call writing data to own_buf.
2536 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2538 * target.c (mywait): Call target_wait instead of
2540 (target_wait): New function.
2542 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2544 * server.c (start_inferior): New variable 'ptid'. Replace calls
2545 to the_target->resume by target_continue{,_no_signal}, depending
2547 * target.c (target_stop_and_wait): Call target_continue_no_signal
2548 instead of the_target->resume.
2549 (target_continue): New function.
2551 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2553 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2555 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2558 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2560 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2561 * linux-arm-low.c (ps_get_thread_area): Likewise.
2562 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2563 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2564 * linux-mips-low.c (ps_get_thread_area): Likewise.
2565 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2566 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2567 * linux-x86-low.c (ps_get_thread_area): Likewise.
2568 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2570 2016-08-19 Pedro Alves <palves@redhat.com>
2572 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2574 2016-08-19 Pedro Alves <palves@redhat.com>
2576 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2577 comment. Use memcpy instead of casting through unsigned long.
2579 2016-08-19 Pedro Alves <palves@redhat.com>
2581 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2582 allocating around 0x80000000.
2584 2016-08-19 Pedro Alves <palves@redhat.com>
2587 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2588 (x32-avx512-linux-ipa.o): New rules.
2589 * configure.ac (x86_64-*-linux*): New x32 check.
2590 * configure.srv (ipa_x32_linux_regobj): New.
2591 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2592 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2594 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2596 * configure: Regenerate.
2598 2016-08-09 Pedro Alves <palves@redhat.com>
2601 * Makefile.in (OBS): Add signals-state-save-restore.o.
2602 (signals-state-save-restore.o): New rule.
2603 * config.in: Regenerate.
2604 * configure: Regenerate.
2605 * linux-low.c: Include "signals-state-save-restore.h".
2606 (linux_create_inferior): Call
2607 restore_original_signals_state.
2608 * server.c: Include "dispositions-save-restore.h".
2609 (captured_main): Call save_original_signals_state.
2611 2016-08-05 Pedro Alves <palves@redhat.com>
2613 * configure: Regenerate.
2615 2016-08-04 Yao Qi <yao.qi@linaro.org>
2617 * linux-low.c (regsets_fetch_inferior_registers): Check
2618 errno is ESRCH or not.
2620 2016-08-02 Yao Qi <yao.qi@linaro.org>
2622 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2623 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2624 (thread_db_load_search): Update.
2625 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2626 td_ta_set_event and td_ta_event_getmsg.
2628 2016-07-26 Pedro Alves <palves@redhat.com>
2631 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2632 of unsigned long for 64-bit registers and use uint32_t instead of
2633 unsigned int for 32-bit registers.
2635 2016-07-26 Pedro Alves <palves@redhat.com>
2637 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2640 2016-07-21 Tom Tromey <tom@tromey.com>
2642 * configure: Rebuild.
2644 2016-07-21 Yao Qi <yao.qi@linaro.org>
2646 * mem-break.c (find_gdb_breakpoint): Cast bp to
2647 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2649 2016-07-21 Yao Qi <yao.qi@linaro.org>
2651 * server.c (handle_v_requests): Support s and S actions
2652 if target_supports_software_single_step return true.
2654 2016-07-21 Yao Qi <yao.qi@linaro.org>
2656 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2657 is resume_step, call maybe_hw_step.
2658 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2660 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2662 (proceed_one_lwp): If resume request is resume_step, install
2663 reinsert breakpoints and call maybe_hw_step.
2665 2016-07-21 Yao Qi <yao.qi@linaro.org>
2667 * linux-low.c (proceed_one_lwp): Declare.
2668 (linux_resume_one_thread): Remove local variable 'step'.
2669 Lift code enqueue signal. Call proceed_one_lwp instead of
2670 linux_resume_one_lwp.
2672 2016-07-21 Yao Qi <yao.qi@linaro.org>
2674 * linux-low.c (linux_resume_one_thread): Call
2675 enqueue_pending_signal.
2677 2016-07-21 Yao Qi <yao.qi@linaro.org>
2679 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2680 * inferiors.c (do_restore_current_thread_cleanup): New function.
2681 (make_cleanup_restore_current_thread): Likewise.
2682 * linux-low.c (install_software_single_step_breakpoints): Call
2683 make_cleanup_restore_current_thread. Switch current_thread to
2686 2016-07-21 Yao Qi <yao.qi@linaro.org>
2688 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2689 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2690 (clone_one_breakpoint): Likewise.
2691 (delete_reinsert_breakpoints): Change parameter to thread.
2693 (has_reinsert_breakpoints): Likewise.
2694 (uninsert_reinsert_breakpoints): Likewise.
2695 (reinsert_reinsert_breakpoints): Likewise.
2696 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2697 (delete_reinsert_breakpoints): Likewise.
2698 (reinsert_reinsert_breakpoints): Likewise.
2699 (uninsert_reinsert_breakpoints): Likewise.
2700 (has_reinsert_breakpoints): Likewise.
2702 2016-07-21 Yao Qi <yao.qi@linaro.org>
2704 * inferiors.c (get_thread_process): Make parameter const.
2705 * inferiors.h (get_thread_process): Update declaration.
2706 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2707 Add new parameters child_thread and parent_thread. Callers
2709 * mem-break.h (clone_all_breakpoints): Update declaration.
2711 2016-07-21 Yao Qi <yao.qi@linaro.org>
2713 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2714 <command_list, handler>: Remove.
2715 (struct gdb_breakpoint): New.
2716 (struct other_breakpoint): New.
2717 (struct reinsert_breakpoint): New.
2718 (is_gdb_breakpoint): New function.
2719 (any_persistent_commands): Update command_list if
2720 is_gdb_breakpoint returns true.
2721 (set_breakpoint): Create breakpoints according to their types.
2722 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2723 (set_gdb_breakpoint_1): Likewise.
2724 (set_gdb_breakpoint): Likewise.
2725 (clear_breakpoint_conditions): Change parameter type to
2726 'struct gdb_breakpoint *'.
2727 (clear_breakpoint_commands): Likewise.
2728 (clear_breakpoint_conditions_and_commands): Likewise.
2729 (add_condition_to_breakpoint): Likewise.
2730 (add_breakpoint_condition): Likewise.
2731 (add_commands_to_breakpoint): Likewise.
2732 (check_breakpoints): Check other_breakpoint.
2733 (clone_one_breakpoint): Clone breakpopint according to its type.
2734 * mem-break.h (struct gdb_breakpoint): Declare.
2735 (set_gdb_breakpoint): Update declaration.
2736 (clear_breakpoint_conditions_and_commands): Likewise.
2737 (add_breakpoint_condition): Likewise.
2738 (add_breakpoint_commands): Likewise.
2739 * server.c (process_point_options): Change parameter type to
2740 'struct gdb_breakpoint *'.
2742 2016-07-21 Yao Qi <yao.qi@linaro.org>
2744 * mem-break.c (set_breakpoint_at): Rename it to ...
2745 (set_breakpoint_type_at): ... it.
2746 (set_breakpoint_at): Call set_breakpoint_type_at.
2747 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2748 * mem-break.h (set_breakpoint_at): Update comments.
2750 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2752 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2754 (nios2_store_gregset): Likewise.
2756 2016-07-01 Pedro Alves <palves@redhat.com>
2757 Antoine Tremblay <antoine.tremblay@ericsson.com>
2759 * linux-low.c: Change interface to take the target lwp_info
2760 pointer directly and return void. Handle detaching from a zombie
2762 (linux_detach_lwp_callback): New function.
2763 (linux_detach): Detach from the leader thread after detaching from
2766 2016-06-28 Yao Qi <yao.qi@linaro.org>
2768 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2769 for variable new_offset.
2770 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2771 (aarch64_ftrace_insn_reloc_cb): Likewise.
2772 (aarch64_ftrace_insn_reloc_tb): Likewise.
2773 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2774 PRIx64 instead of PRIx32.
2776 2016-06-28 Yao Qi <yao.qi@linaro.org>
2778 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2779 (the_low_target): Install arm_get_syscall_trapinfo.
2781 2016-06-28 Yao Qi <yao.qi@linaro.org>
2783 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2785 (the_low_target): Install aarch64_get_syscall_trapinfo.
2787 2016-06-28 Yao Qi <yao.qi@linaro.org>
2789 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2791 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2792 Remove parameter sysno.
2793 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2796 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2798 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2799 (s390_emit_ne_goto): Likewise.
2800 (s390_emit_lt_goto): Likewise.
2801 (s390_emit_le_goto): Likewise.
2802 (s390_emit_gt_goto): Likewise.
2803 (s390_emit_ge_goto): Likewise.
2804 (s390x_emit_eq_goto): Likewise.
2805 (s390x_emit_ne_goto): Likewise.
2806 (s390x_emit_lt_goto): Likewise.
2807 (s390x_emit_le_goto): Likewise.
2808 (s390x_emit_gt_goto): Likewise.
2809 (s390x_emit_ge_goto): Likewise.
2810 (s390_emit_ops_impl): Mark variable static.
2811 (s390x_emit_ops): Likewise.
2813 2016-06-17 Yao Qi <yao.qi@linaro.org>
2815 * linux-low.c (handle_extended_wait): Call
2816 uninsert_reinsert_breakpoints for the parent process. Remove
2817 reinsert breakpoints from the child process. Reinsert them to
2818 the parent process when vfork is done.
2819 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2820 (reinsert_reinsert_breakpoints): New function.
2821 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2822 (reinsert_reinsert_breakpoints): Declare.
2824 2016-06-17 Yao Qi <yao.qi@linaro.org>
2826 * linux-low.c (handle_extended_wait): If the parent is doing
2827 step-over, remove the reinsert breakpoints from the forked child.
2829 2016-06-17 Yao Qi <yao.qi@linaro.org>
2831 * linux-low.c (unsuspend_all_lwps): Declare.
2832 (linux_low_filter_event): If thread exited, call finish_step_over.
2833 If step-over is finished, unsuspend other threads.
2835 2016-06-17 Yao Qi <yao.qi@linaro.org>
2837 * linux-low.c (linux_resume_one_lwp_throw): Assert
2838 has_reinsert_breakpoints returns false.
2839 * mem-break.c (delete_disabled_breakpoints): Assert
2840 bp type isn't reinsert_breakpoint.
2842 2016-06-17 Yao Qi <yao.qi@linaro.org>
2844 * linux-low.c (maybe_hw_step): New function.
2845 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2846 (finish_step_over): Switch current_thread to lwp temporarily,
2847 and assert has_reinsert_breakpoints returns true.
2848 (proceed_one_lwp): Call maybe_hw_step.
2849 * mem-break.c (has_reinsert_breakpoints): New function.
2850 * mem-break.h (has_reinsert_breakpoints): Declare.
2852 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
2854 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2856 2016-05-17 Yao Qi <yao.qi@linaro.org>
2858 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2859 instead of find_inferior.
2861 2016-05-05 Yao Qi <yao.qi@linaro.org>
2863 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2864 Initialize res to zero.
2866 2016-05-05 Yao Qi <yao.qi@linaro.org>
2868 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2871 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2873 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2874 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2875 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2877 2016-04-28 Par Olsson <par.olsson@windriver.com>
2878 Simon Marchi <simon.marchi@ericsson.com>
2880 * tracepoint.c (write_inferior_int8): New function.
2881 (cmd_qtenable_disable): Write enable flag using
2882 write_inferior_int8.
2884 2016-04-25 Yao Qi <yao.qi@linaro.org>
2886 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2887 (need_step_over_p): Return zero if the LWP has pending signals
2888 can be delivered on software single step target.
2890 2016-04-25 Yao Qi <yao.qi@linaro.org>
2892 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2893 return instead of error.
2895 2016-04-22 Yao Qi <yao.qi@linaro.org>
2897 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2900 2016-04-22 Yao Qi <yao.qi@linaro.org>
2902 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2903 signal when stepping over breakpoint with software single
2906 2016-04-21 Pedro Alves <palves@redhat.com>
2908 * linux-s390-low.c (s390_collect_ptrace_register)
2909 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2911 (s390_check_regset): Use void * instead of gdb_byte *.
2913 2016-04-20 Pedro Alves <palves@redhat.com>
2915 * configure: Renegerate.
2917 2016-04-20 Yao Qi <yao.qi@linaro.org>
2919 * linux-aarch32-low.c: Include "arch/arm-linux.h".
2920 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2922 (arm_store_gregset): Likewise.
2924 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2926 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2927 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2928 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2929 (amd64-avx-mpx-linux.c): New rules.
2930 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2931 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2932 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2933 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2934 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2935 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2936 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2937 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2938 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2939 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2940 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2941 * linux-x86-low.c (x86_linux_read_description): Add case for
2942 X86_XSTATE_AVX_MPX_MASK.
2943 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2944 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2945 init_registers_i386_avx_mpx_linux.
2946 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2947 (initialize_low_tracepoint): Call
2948 init_registers_i386_avx_mpx_linux.
2949 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2950 (initialize_low_tracepoint): Call
2951 init_registers_amd64_avx_mpx_linux.
2952 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2953 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2954 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2957 2016-04-18 Pedro Alves <palves@redhat.com>
2959 * configure: Regenerate.
2961 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2963 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2964 (aarch64_emit_sub): Likewise.
2966 2016-04-12 Pedro Alves <palves@redhat.com>
2968 * utils.c (prepare_to_throw_exception): Delete.
2970 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2972 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2974 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2976 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2978 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2980 * linux-aarch64-ipa.c: Add <elf.h> include.
2981 * linux-ppc-ipa.c: Add <elf.h> include.
2982 * linux-s390-ipa.c: Add <elf.h> include.
2984 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2986 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2987 (get_raw_reg_ptr): Likewise.
2988 (get_trace_state_variable_value_ptr): Likewise.
2989 (set_trace_state_variable_value_ptr): Likewise.
2990 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2993 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
2994 Marcin Kościelnicki <koriakin@0x04.net>
2997 * linux-ppc-low.c (emit_insns): New function.
2998 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2999 (ppc_emit_prologue): New function.
3000 (ppc_emit_epilogue): New function.
3001 (ppc_emit_add): New function.
3002 (ppc_emit_sub): New function.
3003 (ppc_emit_mul): New function.
3004 (ppc_emit_lsh): New function.
3005 (ppc_emit_rsh_signed): New function.
3006 (ppc_emit_rsh_unsigned): New function.
3007 (ppc_emit_ext): New function.
3008 (ppc_emit_zero_ext): New function.
3009 (ppc_emit_log_not): New function.
3010 (ppc_emit_bit_and): New function.
3011 (ppc_emit_bit_or): New function.
3012 (ppc_emit_bit_xor): New function.
3013 (ppc_emit_bit_not): New function.
3014 (ppc_emit_equal): New function.
3015 (ppc_emit_less_signed): New function.
3016 (ppc_emit_less_unsigned): New function.
3017 (ppc_emit_ref): New function.
3018 (ppc_emit_const): New function.
3019 (ppc_emit_reg): New function.
3020 (ppc_emit_pop): New function.
3021 (ppc_emit_stack_flush): New function.
3022 (ppc_emit_swap): New function.
3023 (ppc_emit_stack_adjust): New function.
3024 (ppc_emit_call): New function.
3025 (ppc_emit_int_call_1): New function.
3026 (ppc_emit_void_call_2): New function.
3027 (ppc_emit_if_goto): New function.
3028 (ppc_emit_goto): New function.
3029 (ppc_emit_eq_goto): New function.
3030 (ppc_emit_ne_goto): New function.
3031 (ppc_emit_lt_goto): New function.
3032 (ppc_emit_le_goto): New function.
3033 (ppc_emit_gt_goto): New function.
3034 (ppc_emit_ge_goto): New function.
3035 (ppc_write_goto_address): New function.
3036 (ppc_emit_ops_impl): New static variable.
3037 (ppc64v1_emit_prologue): New function.
3038 (ppc64v2_emit_prologue): New function.
3039 (ppc64_emit_epilogue): New function.
3040 (ppc64_emit_add): New function.
3041 (ppc64_emit_sub): New function.
3042 (ppc64_emit_mul): New function.
3043 (ppc64_emit_lsh): New function.
3044 (ppc64_emit_rsh_signed): New function.
3045 (ppc64_emit_rsh_unsigned): New function.
3046 (ppc64_emit_ext): New function.
3047 (ppc64_emit_zero_ext): New function.
3048 (ppc64_emit_log_not): New function.
3049 (ppc64_emit_bit_and): New function.
3050 (ppc64_emit_bit_or): New function.
3051 (ppc64_emit_bit_xor): New function.
3052 (ppc64_emit_bit_not): New function.
3053 (ppc64_emit_equal): New function.
3054 (ppc64_emit_less_signed): New function.
3055 (ppc64_emit_less_unsigned): New function.
3056 (ppc64_emit_ref): New function.
3057 (ppc64_emit_const): New function.
3058 (ppc64v1_emit_reg): New function.
3059 (ppc64v2_emit_reg): New function.
3060 (ppc64_emit_pop): New function.
3061 (ppc64_emit_stack_flush): New function.
3062 (ppc64_emit_swap): New function.
3063 (ppc64v1_emit_call): New function.
3064 (ppc64v2_emit_call): New function.
3065 (ppc64v1_emit_int_call_1): New function.
3066 (ppc64v2_emit_int_call_1): New function.
3067 (ppc64v1_emit_void_call_2): New function.
3068 (ppc64v2_emit_void_call_2): New function.
3069 (ppc64_emit_if_goto): New function.
3070 (ppc64_emit_eq_goto): New function.
3071 (ppc64_emit_ne_goto): New function.
3072 (ppc64_emit_lt_goto): New function.
3073 (ppc64_emit_le_goto): New function.
3074 (ppc64_emit_gt_goto): New function.
3075 (ppc64_emit_ge_goto): New function.
3076 (ppc64v1_emit_ops_impl): New static variable.
3077 (ppc64v2_emit_ops_impl): New static variable.
3078 (ppc_emit_ops): New function.
3079 (linux_low_target): Wire in ppc_emit_ops.
3081 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3082 Marcin Kościelnicki <koriakin@0x04.net>
3085 * Makefile.in: Add powerpc-*-ipa.o
3086 * configure.srv: Add ipa_obj for powerpc*-linux.
3087 * linux-ppc-ipa.c: New file.
3088 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3090 (PPC_FIELD): New macro.
3091 (PPC_SEXT): New macro.
3092 (PPC_OP6): New macro.
3093 (PPC_BO): New macro.
3094 (PPC_LI): New macro.
3095 (PPC_BD): New macro.
3096 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3097 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3098 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3099 (ppc_get_thread_area): New function.
3100 (is_elfv2_inferior): New function.
3101 (gen_ds_form): New function.
3102 (GEN_STD): New macro.
3103 (GEN_STDU): New macro.
3104 (GEN_LD): New macro.
3105 (GEN_LDU): New macro.
3106 (gen_d_form): New function.
3107 (GEN_ADDI): New macro.
3108 (GEN_ADDIS): New macro.
3109 (GEN_LI): New macro.
3110 (GEN_LIS): New macro.
3111 (GEN_ORI): New macro.
3112 (GEN_ORIS): New macro.
3113 (GEN_LWZ): New macro.
3114 (GEN_STW): New macro.
3115 (GEN_STWU): New macro.
3116 (gen_xfx_form): New function.
3117 (GEN_MFSPR): New macro.
3118 (GEN_MTSPR): New macro.
3119 (GEN_MFCR): New macro.
3120 (GEN_MTCR): New macro.
3121 (GEN_SYNC): New macro.
3122 (GEN_LWSYNC): New macro.
3123 (gen_x_form): New function.
3124 (GEN_OR): New macro.
3125 (GEN_MR): New macro.
3126 (GEN_LWARX): New macro.
3127 (GEN_STWCX): New macro.
3128 (GEN_CMPW): New macro.
3129 (gen_md_form): New function.
3130 (GEN_RLDICL): New macro.
3131 (GEN_RLDICR): New macro.
3132 (gen_i_form): New function.
3134 (GEN_BL): New macro.
3135 (gen_b_form): New function.
3136 (GEN_BNE): New macro.
3137 (GEN_LOAD): New macro.
3138 (GEN_STORE): New macro.
3139 (gen_limm): New function.
3140 (gen_atomic_xchg): New function.
3141 (gen_call): New function.
3142 (ppc_relocate_instruction): New function.
3143 (ppc_install_fast_tracepoint_jump_pad): New function.
3144 (ppc_get_min_fast_tracepoint_insn_len): New function.
3145 (ppc_get_ipa_tdesc_idx): New function.
3146 (the_low_target): Wire in the new functions.
3147 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3149 * linux-ppc-tdesc.h: New file.
3151 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3153 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3154 (alloc_jump_pad_buffer): New function.
3155 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3156 (alloc_jump_pad_buffer): New function.
3157 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3158 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3159 (alloc_jump_pad_buffer): New function.
3160 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3161 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3162 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3163 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3165 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3167 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3168 * linux-amd64-ipa.c: Likewise.
3169 * linux-i386-ipa.c: Likewise.
3170 * linux-s390-ipa.c: Likewise.
3171 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3172 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3173 set_trace_state_variable_value_ptr.
3174 (struct ipa_sym_addresses): Likewise.
3175 (symbol_list): Likewise.
3176 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3177 accessing gdb_collect directly.
3178 (gdb_collect_ptr_type): New typedef.
3179 (get_raw_reg_ptr_type): New typedef.
3180 (get_trace_state_variable_value_ptr_type): New typedef.
3181 (set_trace_state_variable_value_ptr_type): New typedef.
3182 (gdb_collect_ptr): New global.
3183 (get_raw_reg_ptr): New global.
3184 (get_trace_state_variable_value_ptr): New global.
3185 (set_trace_state_variable_value_ptr): New global.
3186 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3187 accessing get_raw_reg directly.
3188 (get_get_tsv_func_addr): Likewise for
3189 get_trace_state_variable_value_ptr.
3190 (get_set_tsv_func_addr): Likewise for
3191 set_trace_state_variable_value_ptr.
3192 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3194 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3196 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3198 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3200 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3202 (relocate_instruction): Remove own_buf.
3203 * server.c (own_buf): Make global.
3204 (handle_v_requests): Make global.
3205 * server.h (own_buf): New declaration.
3206 (handle_v_requests): New prototype.
3208 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3211 * linux-s390-low.c (add_insns): New function.
3212 (s390_emit_prologue): New function.
3213 (s390_emit_epilogue): New function.
3214 (s390_emit_add): New function.
3215 (s390_emit_sub): New function.
3216 (s390_emit_mul): New function.
3217 (s390_emit_lsh): New function.
3218 (s390_emit_rsh_signed): New function.
3219 (s390_emit_rsh_unsigned): New function.
3220 (s390_emit_ext): New function.
3221 (s390_emit_log_not): New function.
3222 (s390_emit_bit_and): New function.
3223 (s390_emit_bit_or): New function.
3224 (s390_emit_bit_xor): New function.
3225 (s390_emit_bit_not): New function.
3226 (s390_emit_equal): New function.
3227 (s390_emit_less_signed): New function.
3228 (s390_emit_less_unsigned): New function.
3229 (s390_emit_ref): New function.
3230 (s390_emit_if_goto): New function.
3231 (s390_emit_goto): New function.
3232 (s390_write_goto_address): New function.
3233 (s390_emit_litpool): New function.
3234 (s390_emit_const): New function.
3235 (s390_emit_call): New function.
3236 (s390_emit_reg): New function.
3237 (s390_emit_pop): New function.
3238 (s390_emit_stack_flush): New function.
3239 (s390_emit_zero_ext): New function.
3240 (s390_emit_swap): New function.
3241 (s390_emit_stack_adjust): New function.
3242 (s390_emit_set_r2): New function.
3243 (s390_emit_int_call_1): New function.
3244 (s390_emit_void_call_2): New function.
3245 (s390_emit_eq_goto): New function.
3246 (s390_emit_ne_goto): New function.
3247 (s390_emit_lt_goto): New function.
3248 (s390_emit_le_goto): New function.
3249 (s390_emit_gt_goto): New function.
3250 (s390_emit_ge_goto): New function.
3251 (s390x_emit_prologue): New function.
3252 (s390x_emit_epilogue): New function.
3253 (s390x_emit_add): New function.
3254 (s390x_emit_sub): New function.
3255 (s390x_emit_mul): New function.
3256 (s390x_emit_lsh): New function.
3257 (s390x_emit_rsh_signed): New function.
3258 (s390x_emit_rsh_unsigned): New function.
3259 (s390x_emit_ext): New function.
3260 (s390x_emit_log_not): New function.
3261 (s390x_emit_bit_and): New function.
3262 (s390x_emit_bit_or): New function.
3263 (s390x_emit_bit_xor): New function.
3264 (s390x_emit_bit_not): New function.
3265 (s390x_emit_equal): New function.
3266 (s390x_emit_less_signed): New function.
3267 (s390x_emit_less_unsigned): New function.
3268 (s390x_emit_ref): New function.
3269 (s390x_emit_if_goto): New function.
3270 (s390x_emit_const): New function.
3271 (s390x_emit_call): New function.
3272 (s390x_emit_reg): New function.
3273 (s390x_emit_pop): New function.
3274 (s390x_emit_stack_flush): New function.
3275 (s390x_emit_zero_ext): New function.
3276 (s390x_emit_swap): New function.
3277 (s390x_emit_stack_adjust): New function.
3278 (s390x_emit_int_call_1): New function.
3279 (s390x_emit_void_call_2): New function.
3280 (s390x_emit_eq_goto): New function.
3281 (s390x_emit_ne_goto): New function.
3282 (s390x_emit_lt_goto): New function.
3283 (s390x_emit_le_goto): New function.
3284 (s390x_emit_gt_goto): New function.
3285 (s390x_emit_ge_goto): New function.
3286 (s390_emit_ops): New function.
3287 (struct linux_target_ops): Fill in emit_ops hook.
3289 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3292 * Makefile.in: Add s390 IPA files.
3293 * configure.srv: Build IPA for s390.
3294 * linux-s390-ipa.c: New file.
3295 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3296 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3297 (tdesc_s390_linux32): Likewise.
3298 (init_registers_s390_linux32v1): Likewise.
3299 (tdesc_s390_linux32v1): Likewise.
3300 (init_registers_s390_linux32v2): Likewise.
3301 (tdesc_s390_linux32v2): Likewise.
3302 (init_registers_s390_linux64): Likewise.
3303 (tdesc_s390_linux64): Likewise.
3304 (init_registers_s390_linux64v1): Likewise.
3305 (tdesc_s390_linux64v1): Likewise.
3306 (init_registers_s390_linux64v2): Likewise.
3307 (tdesc_s390_linux64v2): Likewise.
3308 (init_registers_s390_te_linux64): Likewise.
3309 (tdesc_s390_te_linux64): Likewise.
3310 (init_registers_s390_vx_linux64): Likewise.
3311 (tdesc_s390_vx_linux64): Likewise.
3312 (init_registers_s390_tevx_linux64): Likewise.
3313 (tdesc_s390_tevx_linux64): Likewise.
3314 (init_registers_s390x_linux64): Likewise.
3315 (tdesc_s390x_linux64): Likewise.
3316 (init_registers_s390x_linux64v1): Likewise.
3317 (tdesc_s390x_linux64v1): Likewise.
3318 (init_registers_s390x_linux64v2): Likewise.
3319 (tdesc_s390x_linux64v2): Likewise.
3320 (init_registers_s390x_te_linux64): Likewise.
3321 (tdesc_s390x_te_linux64): Likewise.
3322 (init_registers_s390x_vx_linux64): Likewise.
3323 (tdesc_s390x_vx_linux64): Likewise.
3324 (init_registers_s390x_tevx_linux64): Likewise.
3325 (tdesc_s390x_tevx_linux64): Likewise.
3326 (have_hwcap_s390_vx): New static variable.
3327 (s390_arch_setup): Fill have_hwcap_s390_vx.
3328 (s390_get_thread_area): New function.
3329 (s390_ft_entry_gpr_esa): New const.
3330 (s390_ft_entry_gpr_zarch): New const.
3331 (s390_ft_entry_misc): New const.
3332 (s390_ft_entry_fr): New const.
3333 (s390_ft_entry_vr): New const.
3334 (s390_ft_main_31): New const.
3335 (s390_ft_main_64): New const.
3336 (s390_ft_exit_fr): New const.
3337 (s390_ft_exit_vr): New const.
3338 (s390_ft_exit_misc): New const.
3339 (s390_ft_exit_gpr_esa): New const.
3340 (s390_ft_exit_gpr_zarch): New const.
3341 (append_insns): New function.
3342 (s390_relocate_instruction): New function.
3343 (s390_install_fast_tracepoint_jump_pad): New function.
3344 (s390_get_min_fast_tracepoint_insn_len): New function.
3345 (s390_get_ipa_tdesc_idx): New function.
3346 (struct linux_target_ops): Wire in the above functions.
3347 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3348 * linux-s390-tdesc.h: New file.
3350 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3352 * linux-s390-low.c (s390_supports_tracepoints): New function.
3353 (struct linux_target_ops): Fill supports_tracepoints hook.
3355 2016-03-18 Yao Qi <yao.qi@linaro.org>
3357 * linux-low.c (lwp_signal_can_be_delivered): New function.
3358 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3360 2016-03-18 Yao Qi <yao.qi@linaro.org>
3362 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3363 0 if signal is enqueued. Remove 'signal' from one debugging
3364 message. Move one debugging message to some lines below.
3365 Remove code setting 'signal' to 0.
3367 2016-03-18 Yao Qi <yao.qi@linaro.org>
3369 * linux-low.c (linux_low_filter_event): Remove redundant
3370 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3372 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3374 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3375 (struct linux_target_ops): Wire in the above.
3377 2016-03-03 Yao Qi <yao.qi@linaro.org>
3379 * linux-low.c: Update comments to start_step_over.
3381 2016-03-03 Yao Qi <yao.qi@linaro.org>
3384 * linux-low.c (handle_extended_wait): Set child suspended
3385 if event_lwp->bp_reinsert isn't zero.
3387 2016-03-02 Yao Qi <yao.qi@linaro.org>
3389 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3390 enqueue_pending_signal.
3392 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3394 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3397 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3399 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3400 (s390_regmap_3264) [!__s390x__]: New global.
3401 (s390_collect_ptrace_register): Skip map entries containing -1.
3402 (s390_supply_ptrace_register): Ditto.
3403 (s390_fill_gprs_high): New function.
3404 (s390_store_gprs_high): New function.
3405 (s390_regsets): Add NT_S390_HIGH_GPRS.
3406 (s390_get_hwcap): Enable on 31-bit.
3407 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3408 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3409 Detect NT_S390_HIGH_GPRS.
3410 (s390_usrregs_info_3264): Enable on 31-bit.
3411 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3412 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3414 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3417 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3418 * configure.srv: Ditto.
3419 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3420 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3421 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3422 (init_registers_amd64_linux): Remove prototype.
3423 (tdesc_amd64_linux): Remove declaration.
3424 (get_ipa_tdesc): New function.
3425 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3426 initialize remaining tdescs.
3427 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3428 (init_registers_i386_linux): Remove prototype.
3429 (tdesc_i386_linux): Remove declaration.
3430 (get_ipa_tdesc): New function.
3431 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3432 initialize remaining tdescs.
3433 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3434 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3435 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3436 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3437 (x86_get_ipa_tdesc_idx): New function.
3438 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3439 * linux-x86-tdesc.h: New file.
3440 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3441 (target_get_ipa_tdesc_idx): New macro.
3442 * tracepoint.c (ipa_tdesc_idx): New macro.
3443 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3444 (symbol_list): Add ipa_tdesc_idx.
3445 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3446 (ipa_tdesc): Remove.
3447 (ipa_tdesc_idx): New variable.
3448 (get_context_regcache): Use get_ipa_tdesc.
3449 (gdb_collect): Ditto.
3451 * tracepoint.h (get_ipa_tdesc): New prototype.
3452 (ipa_tdesc): Remove.
3454 2016-02-24 Pedro Alves <palves@redhat.com>
3456 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3457 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3458 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3459 Factor out common code between the USE_SIGTRAP_SIGINFO and
3460 !USE_SIGTRAP_SIGINFO blocks.
3461 (linux_low_filter_event): Call save_stop_reason instead of
3462 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3464 (linux_wait_1): Update comments.
3466 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3468 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3469 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3470 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3471 ppc_insert_point, ppc_remove_point.
3473 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3475 * linux-s390-low.c (s390_supports_z_point_type): New function.
3476 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3478 2016-02-16 Yao Qi <yao.qi@linaro.org>
3480 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3481 PC. Get pc from regcache_read_pc.
3483 2016-02-12 Yao Qi <yao.qi@linaro.org>
3485 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3486 or linux_get_pc_32bit.
3487 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3489 2016-02-12 Yao Qi <yao.qi@linaro.org>
3491 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3492 arm_linux_get_next_pcs_fixup.
3494 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3496 * tracepoint.c (x_tracepoint_action_download): Change
3497 write_inferior_data_ptr to write_inferior_data_pointer.
3498 (cmd_qtstart): Likewise.
3499 (write_inferior_data_ptr): Remove.
3500 (download_agent_expr): Change write_inferior_data_ptr to
3501 write_inferior_data_pointer.
3502 (download_tracepoint_1): Likewise.
3503 (download_tracepoint): Likewise.
3504 (download_trace_state_variables): Likewise.
3506 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3507 Marcin Kościelnicki <koriakin@0x04.net>
3509 * tracepoint.c (struct tracepoint_action_ops): Remove.
3510 (struct tracepoint_action): Remove ops.
3511 (m_tracepoint_action_download, r_tracepoint_action_download)
3512 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3513 size and offset accordingly.
3514 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3515 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3516 (tracepoint_action_send, tracepoint_action_download): New functions.
3517 Helpers for trace action handlers.
3518 (add_tracepoint_action): Remove setup actions ops.
3519 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3521 2016-02-10 Yao Qi <yao.qi@linaro.org>
3523 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3525 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3527 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3529 * configure: Regenerate.
3531 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3533 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3534 void * to gdb_byte *.
3535 * linux-low.c (siginfo_fixup): Likewise.
3536 (linux_xfer_siginfo): Likewise.
3537 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3539 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3541 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3543 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3545 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3547 * linux-x86-low.c [__x86_64__]: Include
3548 "nat/amd64-linux-siginfo.h".
3549 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3550 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3551 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3552 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3553 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3554 (cpt_si_fd, si_timerid, si_overrun): Move from
3555 nat/amd64-linux-siginfo.c.
3556 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3558 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3560 * server.c (skip_to_semicolon): Remove.
3561 (process_point_options): Use strchrnul instead of
3564 2016-01-26 Yao Qi <yao.qi@linaro.org>
3566 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3567 * linux-low.c (install_software_single_step_breakpoints): Don't
3568 call regcache_read_pc.
3569 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3572 2016-01-26 Yao Qi <yao.qi@linaro.org>
3574 * linux-low.c (install_software_single_step_breakpoints): Call
3575 regcache_read_pc instead of get_pc.
3577 2016-01-26 Yao Qi <yao.qi@linaro.org>
3579 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3580 (unblock_async_io): Rename to ...
3581 (block_unblock_async_io): ... it. New function.
3582 (enable_async_io): Don't install SIGIO handler. Unblock it
3584 (disable_async_io): Don't ignore SIGIO. Block it instead.
3585 (initialize_async_io): Install SIGIO handler. Don't call
3588 2016-01-26 Yao Qi <yao.qi@linaro.org>
3590 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3591 first character is '\003', call *the_target->request_interrupt.
3593 2016-01-25 Yao Qi <yao.qi@linaro.org>
3595 * remote-utils.c (new_thread_notify): Remove.
3596 (dead_thread_notify): Likewise.
3597 * remote-utils.h (new_thread_notify): Remove declaration.
3598 (dead_thread_notify): Likewise.
3600 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3602 * gdb.trace/pending.exp: Fix expected message on continue.
3604 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3606 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3607 it works properly on big-endian machines where sizeof (CORE_ADDR)
3610 2016-01-21 Pedro Alves <palves@redhat.com>
3612 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3613 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3614 * configure: Regenerate.
3616 2016-01-21 Yao Qi <yao.qi@linaro.org>
3618 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3619 is_thumb and set it according to CPSR saved on the stack.
3620 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3621 arm_sigreturn_next_pc.
3623 2016-01-18 Yao Qi <yao.qi@linaro.org>
3625 * linux-low.c (linux_set_pc_64bit): New function.
3626 (linux_get_pc_64bit): New function.
3627 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3629 * linux-sparc-low.c (debug_threads): Remove declaration.
3630 (sparc_get_pc): Remove.
3631 (the_low_target): Use linux_get_pc_64bit instead of
3633 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3634 (the_low_target): Use linux_get_pc_64bit and
3637 2016-01-18 Yao Qi <yao.qi@linaro.org>
3639 * linux-arm-low.c (debug_threads): Remove declaration.
3640 (arm_get_pc, arm_set_pc): Remove.
3641 (the_low_target): Use linux_get_pc_32bit and
3643 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3644 (the_low_target): Use linux_get_pc_32bit and
3646 * linux-cris-low.c (debug_threads): Remove declaration.
3647 (cris_get_pc, cris_set_pc,): Remove.
3648 (the_low_target): Use linux_get_pc_32bit and
3650 * linux-crisv32-low.c (debug_threads): Remove declaration.
3651 (cris_get_pc, cris_set_pc): Remove.
3652 (the_low_target): Use linux_get_pc_32bit and
3654 * linux-low.c: Include inttypes.h.
3655 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3656 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3657 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3658 (the_low_target): Use linux_get_pc_32bit and
3660 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3661 (the_low_target): Use linux_get_pc_32bit and
3663 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3664 (the_low_target): Use linux_get_pc_32bit and
3666 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3667 (the_low_target): Use linux_get_pc_32bit and
3669 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3670 (the_low_target): Use linux_get_pc_32bit and
3673 2016-01-18 Gary Benson <gbenson@redhat.com>
3675 * configure.ac (AC_FUNC_FORK): New check.
3676 * config.in: Regenerate.
3677 * configure: Likewise.
3679 2016-01-14 Yao Qi <yao.qi@linaro.org>
3681 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3682 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3683 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3684 arm_get_next_pcs_ctor.
3686 2016-01-12 Josh Stone <jistone@redhat.com>
3687 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3689 * inferiors.h: Include "gdb_vecs.h".
3690 (struct process_info): Add syscalls_to_catch.
3691 * inferiors.c (remove_process): Free syscalls_to_catch.
3692 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3693 syscall_return stops.
3694 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3695 * server.c (handle_general_set): Handle QCatchSyscalls.
3696 (handle_query): Report support for QCatchSyscalls.
3697 * target.h (struct target_ops): Add supports_catch_syscall.
3698 (target_supports_catch_syscall): New macro.
3699 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3700 (struct lwp_info): Add syscall_state.
3701 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3702 Maintain syscall_state and syscalls_to_catch across exec.
3703 (get_syscall_trapinfo): New function, proxy to the_low_target.
3704 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3705 (linux_low_filter_event): Toggle syscall_state entry/return for
3706 syscall traps, and set it ignored for all others.
3707 (gdb_catching_syscalls_p): New function.
3708 (gdb_catch_this_syscall_p): New function.
3709 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3710 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3711 (linux_supports_catch_syscall): New function.
3712 (linux_target_ops): Install it.
3713 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3714 (the_low_target): Install it.
3716 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3718 * acinclude.m4: Include new ../warning.m4 file.
3719 * configure: Regenerated.
3720 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3722 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3724 * ax.c (is_goto_target): Mark static.
3725 * linux-low.c (register_addr): Likewise.
3726 (linux_fetch_registers, linux_store_registers): Likewise.
3727 * mem-break.c (any_persistent_commands): Fix old prototype.
3728 (add_commands_to_breakpoint): Mark static.
3729 * regcache.c (find_register_by_name): Delete unused func.
3730 * remote-utils.c (hex_or_minus_one): Mark static.
3731 * server.c (monitor_show_help): Mark static.
3732 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3733 handle_v_requests): Likewise.
3735 2016-01-12 Pedro Alves <palves@redhat.com>
3737 Remove use of the registered trademark symbol throughout.
3739 2016-01-08 Yao Qi <yao.qi@linaro.org>
3741 * remote-utils.c (getpkt): If c is '\003', call target hook
3744 2016-01-06 Yao Qi <yao.qi@linaro.org>
3746 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3747 linux-aarch32-low.c.
3748 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3749 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3750 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3751 (thumb2_breakpoint): Declare.
3752 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3753 linux-aarch32-low.h.
3754 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3755 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3756 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3758 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3760 * gdbreplay.c (gdbreplay_version): Change copyright year in
3762 * server.c (gdbserver_version): Likewise.
3764 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3766 * server.c (crc32_table): Delete.
3767 (crc32): Use libiberty's xcrc32 function.
3769 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3771 * lynx-low.c (lynx_delete_thread_callback): New function.
3772 (lynx_mourn): Properly delete our process and all of its
3773 threads. Remove call to clear_inferiors.
3775 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3777 * target.c (thread_search_callback): Add check that
3778 the thread_stopped target callback is not NULL before
3781 2015-12-21 Yao Qi <yao.qi@linaro.org>
3783 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3786 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3788 * server.c (handle_query): Call target_supports_software_single_step.
3790 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3792 * linux-low.c (single_step): New function.
3793 (linux_resume_one_lwp_throw): Call single_step.
3794 (start_step_over): Likewise.
3796 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3798 * Makefile.in (SFILES): Append arch/arm-linux.c,
3799 arch/arm-get-next-pcs.c.
3800 (arm-linux.o): New rule.
3801 (arm-get-next-pcs.o): New rule.
3802 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3804 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3805 to linux-aarch32-low.c.
3806 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3807 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3808 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3809 (thumb2_breakpoint_len): Likewise.
3810 (arm_is_thumb_mode): Make non-static.
3811 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3812 from linux-aarch32-low.c.
3813 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3814 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3815 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3816 (thumb2_breakpoint_len): Likewise.
3817 (arm_is_thumb_mode): New declaration.
3818 * linux-arm-low.c: Include arch/arm-linux.h
3819 aarch/arm-get-next-pcs.h, sys/syscall.h.
3820 (get_next_pcs_ops): New struct.
3821 (get_next_pcs_addr_bits_remove): New function.
3822 (get_next_pcs_is_thumb): New function.
3823 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3824 (arm_sigreturn_next_pc): Likewise.
3825 (get_next_pcs_syscall_next_pc): Likewise.
3826 (arm_gdbserver_get_next_pcs): Likewise.
3827 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3829 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3830 * server.h: Include gdb_vecs.h.
3832 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3834 * Makefile.in (SFILES): Append common/common-regcache.c.
3835 (OBS): Append common-regcache.o.
3836 (common-regcache.o): New rule.
3837 * regcache.c (init_register_cache): Initialize cache to
3839 (regcache_raw_read_unsigned): New function.
3840 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3841 register_status enum.
3843 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3845 * linux-aarch64-low.c (the_low_targets): Rename
3846 breakpoint_reinsert_addr to get_next_pcs.
3847 * linux-arm-low.c (the_low_targets): Likewise.
3848 * linux-bfin-low.c (the_low_targets): Likewise.
3849 * linux-cris-low.c (the_low_targets): Likewise.
3850 * linux-crisv32-low.c (the_low_targets): Likewise.
3851 * linux-low.c (can_software_single_step): Likewise.
3852 (install_software_single_step_breakpoints): New function.
3853 (start_step_over): Use install_software_single_step_breakpoints.
3854 * linux-low.h: New CORE_ADDR vector.
3855 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3857 * linux-mips-low.c (the_low_targets): Likewise.
3858 * linux-nios2-low.c (the_low_targets): Likewise.
3859 * linux-sparc-low.c (the_low_targets): Likewise.
3861 2015-12-17 Pedro Alves <palves@redhat.com>
3863 * linux-low.c (linux_kill_one_lwp): Remove references to
3865 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
3867 (linux_init_signals): Delete.
3868 (initialize_low): Adjust.
3869 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3871 2015-12-16 Pedro Alves <palves@redhat.com>
3873 * configure.ac (compiler warning flags): When testing a
3874 -Wno-foo option, check whether -Wfoo works instead.
3875 * configure: Regenerate.
3877 2015-12-11 Don Breazeal <donb@codesourcery.com>
3879 * server.c (process_serial_event): Don't exit from gdbserver
3880 in remote mode if there are still active inferiors.
3882 2015-12-11 Yao Qi <yao.qi@linaro.org>
3884 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3885 arm_breakpoint_at if the process is 32-bit.
3887 2015-12-11 Yao Qi <yao.qi@linaro.org>
3889 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3892 2015-12-07 Yao Qi <yao.qi@linaro.org>
3894 * configure.srv: Append arm.o to srv_tgtobj for
3895 aarch64*-*-linux* target.
3896 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
3897 from linux-arm-low.c.
3898 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3899 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3900 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3901 (thumb2_breakpoint_len): Likewise.
3902 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3903 (arm_breakpoint_kinds): Likewise.
3904 (arm_breakpoint_kind_from_pc): Likewise.
3905 (arm_sw_breakpoint_from_kind): Likewise.
3906 (arm_breakpoint_kind_from_current_state): Likewise.
3907 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3908 (arm_sw_breakpoint_from_kind): Declare.
3909 (arm_breakpoint_kind_from_current_state): Declare.
3910 (arm_breakpoint_at): Declare.
3911 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3912 arm_sw_breakpoint_from_kind if process is 32-bit.
3913 (aarch64_breakpoint_kind_from_pc): New function.
3914 (aarch64_breakpoint_kind_from_current_state): New function.
3915 (the_low_target): Initialize fields breakpoint_kind_from_pc
3916 and breakpoint_kind_from_current_state.
3917 * linux-arm-low.c (arm_breakpoint_kinds): Move to
3918 linux-aarch32-low.c.
3919 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3920 (arm_breakpoint, arm_breakpoint_len): Likewise.
3921 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3922 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3923 (arm_is_thumb_mode): Likewise.
3924 (arm_breakpoint_at): Likewise.
3925 (arm_breakpoint_kind_from_pc): Likewise.
3926 (arm_sw_breakpoint_from_kind): Likewise.
3927 (arm_breakpoint_kind_from_current_state): Likewise.
3930 2015-08-04 Yao Qi <yao.qi@linaro.org>
3932 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3933 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3934 * server.c (extended_protocol): Remove "static".
3935 * server.h (extended_protocol): Declare it.
3937 2015-12-04 Josh Stone <jistone@redhat.com>
3939 * target.h (struct target_ops) <arch_setup>: Rename to ...
3940 (struct target_ops) <post_create_inferior>: ... this.
3941 (target_arch_setup): Rename to ...
3942 (target_post_create_inferior): ... this, calling post_create_inferior.
3943 * server.c (start_inferior): Update target_arch_setup calls to
3944 target_post_create_inferior.
3945 * linux-low.c (linux_low_ptrace_options): Forward declare.
3946 (linux_arch_setup): Update its comment for general use.
3947 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3948 (struct linux_target_ops): Use linux_post_create_inferior.
3949 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3950 to post_create_inferior.
3951 * nto-low.c (struct nto_target_ops): Likewise.
3952 * spu-low.c (struct spu_target_ops): Likewise.
3953 * win32-low.c (struct win32_target_ops): Likewise.
3955 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3957 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3959 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3961 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3962 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3963 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3964 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3965 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3967 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3968 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3969 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3970 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3971 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3972 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3974 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3976 * linux-low.c (linux_look_up_symbols): Don't call
3977 linux_supports_traceclone.
3978 * linux-low.h (thread_db_init): Remove use_events argument.
3979 * thread-db.c (thread_db_use_event): Remove global variable.
3980 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3981 (struct thread_db) <td_create_bp>: Remove field.
3982 (thread_db_create_event): Remove function.
3983 (thread_db_enable_reporting): Likewise.
3984 (find_one_thread): Don't check for thread_db_use_events.
3985 (attach_thread): Likewise.
3986 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3987 (try_thread_db_load_1): Don't check for thread_db_use_events.
3988 (thread_db_init): Remove use_events argument and thread events
3990 (remove_thread_event_breakpoints): Remove function.
3991 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3993 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3995 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3997 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3998 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4000 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4001 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4003 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4006 * linux-low.c (can_hardware_single_step): Use
4007 supports_hardware_single_step.
4008 (can_software_single_step): New function.
4009 (start_step_over): Call can_software_single_step.
4010 (linux_supports_hardware_single_step): New function.
4011 (struct target_ops) <supports_software_single_step>: Initialize.
4012 * linux-low.h (struct linux_target_ops)
4013 <supports_hardware_single_step>: Initialize.
4014 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4016 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4017 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4018 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4019 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4020 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4021 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4022 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4023 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4025 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4026 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4028 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4030 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4033 * target.h (struct target_ops): <supports_software_single_step>:
4035 (target_supports_software_single_step): New macro.
4037 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4039 * linux-low.c (linux_wait_1): Fix pc advance condition.
4040 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4041 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4043 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4045 * linux-arm-low.c (arm_is_thumb_mode): New function.
4046 (arm_breakpoint_at): Use arm_is_thumb_mode.
4047 (arm_breakpoint_kind_from_current_state): New function.
4048 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4050 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4051 (linux_breakpoint_kind_from_current_state): New function.
4052 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4053 * linux-low.h (struct linux_target_ops)
4054 <breakpoint_kind_from_current_state>: New field.
4055 * target.h (struct target_ops): Likewise.
4056 (target_breakpoint_kind_from_current_state): New macro.
4058 2015-11-30 Pedro Alves <palves@redhat.com>
4060 * linux-low.c (linux_resume): Wake up the event loop before
4063 2015-11-30 Pedro Alves <palves@redhat.com>
4065 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4067 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4069 * target.c (struct thread_search): New structure.
4070 (thread_search_callback): New function.
4071 (prev_general_thread): New global.
4072 (prepare_to_access_memory, done_accessing_memory): New functions.
4073 * target.h (prepare_to_access_memory, done_accessing_memory):
4074 Replace macros with function declarations.
4076 2015-11-30 Pedro Alves <palves@redhat.com>
4079 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4080 report TARGET_WAITKIND_NO_RESUMED.
4081 * remote-utils.c (prepare_resume_reply): Handle
4082 TARGET_WAITKIND_NO_RESUMED.
4083 * server.c (report_no_resumed): New global.
4084 (handle_query) <qSupported>: Handle "no-resumed+". Report
4085 "no-resumed+" support.
4086 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4087 return error if the client doesn't support no-resumed events.
4088 (push_stop_notification): New function.
4089 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4090 events if the client supports them.
4092 2015-11-30 Pedro Alves <palves@redhat.com>
4094 * linux-low.c (thread_still_has_status_pending_p): Don't check
4096 (lwp_resumed): New function.
4097 (status_pending_p_callback): Return early if the LWP is not
4098 supposed to be resumed.
4100 2015-11-30 Pedro Alves <palves@redhat.com>
4102 * linux-low.c (handle_extended_wait): Assert that the LWP's
4103 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4104 thread create events, leave the new child's status pending.
4105 (linux_low_filter_event): If GDB wants to hear about thread exit
4106 events, leave the LWP marked dead and don't delete it.
4107 (linux_wait_for_event_filtered): Don't check for thread exit.
4108 (filter_exit_event): New function.
4109 (linux_wait_1): Use it, when returning an exit event.
4110 (linux_resume_one_lwp_throw): Assert that the LWP's
4111 waitstatus is TARGET_WAITKIND_IGNORE.
4112 * remote-utils.c (prepare_resume_reply): Handle
4113 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4114 * server.c (report_thread_events): New global.
4115 (handle_general_set): Handle QThreadEvents.
4116 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4117 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4118 TARGET_WAITKIND_THREAD_EXITED.
4119 * server.h (report_thread_events): Declare.
4121 2015-11-30 Pedro Alves <palves@redhat.com>
4123 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4124 the thread's last_resume_kind was resume_stop.
4126 2015-11-30 Pedro Alves <palves@redhat.com>
4128 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4131 2015-11-30 Pedro Alves <palves@redhat.com>
4133 * server.c (handle_v_requests): Handle vCtrlC.
4135 2015-11-30 Pedro Alves <palves@redhat.com>
4137 * gdbthread.h (find_any_thread_of_pid): Declare.
4138 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4140 * server.c (handle_query): If current_thread is NULL, look for
4141 another thread of the selected process.
4143 2015-11-26 Daniel Colascione <dancol@dancol.org>
4144 Simon Marchi <simon.marchi@ericsson.com>
4146 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4147 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4149 * target.h (struct target_ops) <thread_name>: New field.
4150 (target_thread_name): New macro.
4152 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4154 * regcache.h (regcache_invalidate_pid): Add declaration.
4155 * regcache.c (regcache_invalidate_pid): New function, extracted
4156 from regcache_invalidate.
4157 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4158 Add trivial documentation comment.
4159 * lynx-low.c: Use regcache_invalidate_pid instead of
4160 regcache_invalidate.
4162 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4164 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4165 and Elf64_auxv_t if the target is Android.
4167 2015-11-22 Doug Evans <xdje42@gmail.com>
4169 * target.h: #include <sys/types.h>.
4171 2015-11-19 Pedro Alves <palves@redhat.com>
4173 * linux-low.c (linux_process_qsupported): Change prototype.
4175 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4177 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4178 and adjust to loop over all features.
4179 * server.c (handle_query) <qSupported>: Adjust to call
4180 target_process_qsupported once, passing it a vector of unprocessed
4182 * target.h (struct target_ops) <process_qsupported>: Change
4184 (target_process_qsupported): Adjust.
4186 2015-11-19 Pedro Alves <palves@redhat.com>
4188 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4190 * configure: Regenerate.
4192 2015-11-19 Pedro Alves <palves@redhat.com>
4194 * configure: Regenerate.
4196 2015-11-19 Yao Qi <yao.qi@linaro.org>
4198 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4201 2015-11-19 Yao Qi <yao.qi@linaro.org>
4203 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4204 (struct aarch64_operand): Move enum out.
4206 2015-11-19 Yao Qi <yao.qi@linaro.org>
4208 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4209 struct user_fpsimd_state *.
4210 (aarch64_store_fpregset): Likewise.
4212 2015-11-19 Yao Qi <yao.qi@linaro.org>
4214 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4215 struct user_pt_regs *.
4216 (aarch64_store_gregset): Likewise.
4218 2015-11-18 Pedro Alves <palves@redhat.com>
4220 * Makefile.in (all_object_files): Add $IPA_OBJS.
4222 2015-11-17 Pedro Alves <palves@redhat.com>
4224 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4225 GDB_SIGNAL_0 and gdb_signal_to_string.
4227 2015-11-17 Pedro Alves <palves@redhat.com>
4229 * win32-low.c (handle_output_debug_string): Remove parameter.
4230 (win32_kill): Remove our_status local and adjust call to
4231 handle_output_debug_string.
4232 (get_child_debug_event): Adjust call to
4233 handle_output_debug_string.
4235 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4237 * linux-mips-low.c (mips_fill_gregset): Add cast.
4238 (mips_store_gregset): Likewise.
4239 (mips_fill_fpregset): Likewise.
4240 (mips_store_fpregset): Likewise.
4242 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4244 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4247 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4249 * linux-mips-low.c (mips_linux_new_thread): Change type of
4250 watch_type to enum target_hw_bp_type.
4252 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4254 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4255 Change return type to arm_hwbp_type.
4257 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4259 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4260 (arm_store_gregset): Likewise.
4261 * linux-arm-low.c (arm_get_hwcap): Likewise.
4262 (arm_read_description): Likewise.
4264 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4266 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4268 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4270 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4271 (ppc_fill_vsxregset): Likewise.
4272 (ppc_store_vsxregset): Likewise.
4273 (ppc_fill_vrregset): Likewise.
4274 (ppc_store_vrregset): Likewise.
4275 (ppc_fill_evrregset): Likewise.
4276 (ppc_store_evrregset): Likewise.
4278 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4280 * linux-ppc-low.c (ppc_usrregs_info): Remove
4281 forward-declaration.
4282 (ppc_arch_setup): Move lower in file.
4284 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4286 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4287 (ps_pdwrite): Likewise.
4289 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4291 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4292 to after assert checks.
4294 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4296 * proc-service.c (ps_pdread): Add/adjust casts.
4297 (ps_pdwrite): Add/adjust casts.
4299 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4301 * server.c (handle_search_memory_1): Cast return value of
4304 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4306 * server.c (write_qxfer_response): Change type of data to
4309 2015-10-29 Pedro Alves <palves@redhat.com>
4311 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4313 2015-10-29 Pedro Alves <palves@redhat.com>
4315 * tracepoint.c (clear_installed_tracepoints): Add casts.
4317 2015-10-29 Pedro Alves <palves@redhat.com>
4319 * server.c (handle_v_cont, process_serial_event): Add enum
4320 gdb_signal casts to signal parsing code.
4322 2015-10-29 Pedro Alves <palves@redhat.com>
4324 * linux-low.h (NULL_REGSET): Define.
4325 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4326 * linux-arm-low.c (arm_regsets): Likewise.
4327 * linux-crisv32-low.c (cris_regsets): Likewise.
4328 * linux-m68k-low.c (m68k_regsets): Likewise.
4329 * linux-mips-low.c (mips_regsets): Likewise.
4330 * linux-nios2-low.c (nios2_regsets): Likewise.
4331 * linux-ppc-low.c (ppc_regsets): Likewise.
4332 * linux-s390-low.c (s390_regsets): Likewise.
4333 * linux-sh-low.c (sh_regsets): Likewise.
4334 * linux-sparc-low.c (sparc_regsets): Likewise.
4335 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4336 * linux-tile-low.c (tile_regsets): Likewise.
4337 * linux-x86-low.c (x86_regsets): Likewise.
4338 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4340 2015-10-29 Pedro Alves <palves@redhat.com>
4342 * linux-low.h (NULL_REGSET): Define.
4343 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4344 * linux-arm-low.c (arm_regsets): Likewise.
4345 * linux-crisv32-low.c (cris_regsets): Likewise.
4346 * linux-m68k-low.c (m68k_regsets): Likewise.
4347 * linux-mips-low.c (mips_regsets): Likewise.
4348 * linux-nios2-low.c (nios2_regsets): Likewise.
4349 * linux-ppc-low.c (ppc_regsets): Likewise.
4350 * linux-s390-low.c (s390_regsets): Likewise.
4351 * linux-sh-low.c (sh_regsets): Likewise.
4352 * linux-sparc-low.c (sparc_regsets): Likewise.
4353 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4354 * linux-tile-low.c (tile_regsets): Likewise.
4355 * linux-x86-low.c (x86_regsets): Likewise.
4356 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4358 2015-10-26 Doug Evans <dje@google.com>
4360 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4362 2015-10-26 Doug Evans <dje@google.com>
4364 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4366 2015-10-26 Doug Evans <dje@google.com>
4368 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4370 (attach_thread, find_new_threads_callback): Ditto.
4372 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4374 * mem-break.h (set_breakpoint_data): Remove.
4376 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4378 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4380 (initialize_low): Remove set_breakpoint_data call.
4381 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4382 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4383 (initialize_low): Remove set_breakpoint_data call.
4384 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4385 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4386 (initialize_low): Remove set_breakpoint_data call.
4388 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4390 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4391 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4392 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4393 * target.h (target_breakpoint_kind_from_pc): New macro.
4395 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4397 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4398 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4399 the default breakpoint kind.
4401 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4403 * linux-arm-low.c (arm_supports_z_point_type): Add software
4406 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4408 * linux-arm-low.c: Refactor breakpoint definitions.
4409 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4410 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4412 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4414 * Makefile.in: Add arm.c/o.
4415 * configure.srv: Likewise.
4416 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4417 (arm_breakpoint_kind_from_pc): New function.
4418 (arm_sw_breakpoint_from_kind): Return proper kind.
4419 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4421 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4423 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4425 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4426 (struct raw_breakpoint) <size>: Remove.
4427 (struct raw_breakpoint) <kind>: Add.
4428 (bp_size): New function.
4429 (bp_opcode): Likewise.
4430 (find_raw_breakpoint_at): Adjust for kind.
4431 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4432 (remove_memory_breakpoint): Adjust for kind call bp_size.
4433 (set_raw_breakpoint_at): Adjust for kind.
4434 (set_breakpoint): Likewise.
4435 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4436 (delete_raw_breakpoint): Adjust for kind.
4437 (delete_breakpoint): Likewise.
4438 (find_gdb_breakpoint): Likewise.
4439 (set_gdb_breakpoint_1): Likewise.
4440 (set_gdb_breakpoint): Likewise.
4441 (delete_gdb_breakpoint_1): Likewise.
4442 (delete_gdb_breakpoint): Likewise.
4443 (uninsert_raw_breakpoint): Likewise.
4444 (reinsert_raw_breakpoint): Likewise.
4445 (set_breakpoint_data): Remove.
4446 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4447 (check_mem_read): Adjust for kind call bp_size.
4448 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4449 (clone_one_breakpoint): Adjust for kind.
4450 * mem-break.h (set_gdb_breakpoint): Likewise.
4451 (delete_gdb_breakpoint): Likewise.
4452 * server.c (process_serial_event): Likewise.
4454 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4456 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4457 (struct linux_target_ops) <breakpoint>: Remove.
4458 (struct linux_target_ops) <breakpoint_len>: Remove.
4459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4460 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4461 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4462 (arm_sw_breakpoint_from_kind): New function.
4463 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4464 (struct linux_target_ops) <breakpoint>: Remove.
4465 (struct linux_target_ops) <breakpoint_len>: Remove.
4466 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4467 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4468 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4469 (struct linux_target_ops) <breakpoint>: Remove.
4470 (struct linux_target_ops) <breakpoint_len>: Remove.
4471 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4472 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4473 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4474 (struct linux_target_ops) <breakpoint>: Remove.
4475 (struct linux_target_ops) <breakpoint_len>: Remove.
4476 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4477 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4478 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4479 and sw_breakpoint_from_kind to increment the pc.
4480 (linux_breakpoint_kind_from_pc): New function.
4481 (linux_sw_breakpoint_from_kind): New function.
4482 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483 (initialize_low): Call breakpoint_kind_from_pc and
4484 sw_breakpoint_from_kind to replace breakpoint_data/len.
4485 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4488 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4489 (struct linux_target_ops) <breakpoint>: Remove.
4490 (struct linux_target_ops) <breakpoint_len>: Remove.
4491 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4492 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4493 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4494 (struct linux_target_ops) <breakpoint>: Remove.
4495 (struct linux_target_ops) <breakpoint_len>: Remove.
4496 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4497 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4498 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4499 (struct linux_target_ops) <breakpoint>: Remove.
4500 (struct linux_target_ops) <breakpoint_len>: Remove.
4501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4503 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4504 (struct linux_target_ops) <breakpoint>: Remove.
4505 (struct linux_target_ops) <breakpoint_len>: Remove.
4506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4508 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4509 (struct linux_target_ops) <breakpoint>: Remove.
4510 (struct linux_target_ops) <breakpoint_len>: Remove.
4511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4514 (struct linux_target_ops) <breakpoint>: Remove.
4515 (struct linux_target_ops) <breakpoint_len>: Remove.
4516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4518 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4519 (struct linux_target_ops) <breakpoint>: Remove.
4520 (struct linux_target_ops) <breakpoint_len>: Remove.
4521 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4523 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4524 (struct linux_target_ops) <breakpoint>: Remove.
4525 (struct linux_target_ops) <breakpoint_len>: Remove.
4526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4528 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4529 (struct linux_target_ops) <breakpoint>: Remove.
4530 (struct linux_target_ops) <breakpoint_len>: Remove.
4531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4533 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4534 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4535 (struct linux_target_ops) <breakpoint>: Remove.
4536 (struct linux_target_ops) <breakpoint_len>: Remove.
4537 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4538 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4539 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4540 (struct linux_target_ops) <breakpoint>: Remove.
4541 (struct linux_target_ops) <breakpoint_len>: Remove.
4542 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4543 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4545 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4547 * linux-cris-low.c (cris_get_pc): Remove void arg.
4549 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4551 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4554 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4556 * inferiors.c (thread_pid_matches_callback): New function.
4557 (find_thread_process): New function.
4558 (remove_thread): Reset current_thread.
4559 (remove_process): Assert threads have been removed first.
4561 2015-10-15 Yao Qi <yao.qi@linaro.org>
4563 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4565 (aarch64_remove_point): Likewise.
4566 * regcache.c (regcache_register_size): New function.
4568 2015-10-12 Yao Qi <yao.qi@linaro.org>
4570 * linux-aarch64-low.c: Update all callers as emit_load_store
4571 is renamed to aarch64_emit_load_store.
4573 2015-10-12 Yao Qi <yao.qi@linaro.org>
4575 * linux-aarch64-low.c: Update all callers of function renaming
4576 from emit_insn to aarch64_emit_insn.
4578 2015-10-12 Yao Qi <yao.qi@linaro.org>
4580 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4581 arch/aarch64-insn.h.
4582 (struct aarch64_memory_operand): Likewise.
4584 (emit_insn): Move to arch/aarch64-insn.c.
4585 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4586 (emit_load_store): Move to arch/aarch64-insn.c.
4587 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4588 (can_encode_int32): Remove.
4590 2015-10-12 Yao Qi <yao.qi@linaro.org>
4592 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4593 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4594 (aarch64_relocate_instruction): Likewise.
4595 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4596 (struct aarch64_insn_visitor): Likewise.
4598 2015-10-12 Yao Qi <yao.qi@linaro.org>
4600 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4601 (struct aarch64_insn_visitor): New.
4602 (struct aarch64_insn_relocation_data): New.
4603 (aarch64_ftrace_insn_reloc_b): New function.
4604 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4605 (aarch64_ftrace_insn_reloc_cb): Likewise.
4606 (aarch64_ftrace_insn_reloc_tb): Likewise.
4607 (aarch64_ftrace_insn_reloc_adr): Likewise.
4608 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4609 (aarch64_ftrace_insn_reloc_others): Likewise.
4611 (aarch64_relocate_instruction): Use visitor.
4613 2015-10-12 Yao Qi <yao.qi@linaro.org>
4615 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4616 int. Add argument buf.
4617 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4618 aarch64_relocate_instruction.
4620 2015-10-12 Yao Qi <yao.qi@linaro.org>
4622 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4623 argument insn. Remove local variable insn. Don't call
4625 (aarch64_install_fast_tracepoint_jump_pad): Call
4628 2015-09-30 Yao Qi <yao.qi@linaro.org>
4630 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4631 (emit_load_store_pair): Likewise.
4633 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4635 * dll.c (match_dll): Add cast(s).
4636 (unloaded_dll): Likewise.
4637 * linux-low.c (second_thread_of_pid_p): Likewise.
4638 (delete_lwp_callback): Likewise.
4639 (count_events_callback): Likewise.
4640 (select_event_lwp_callback): Likewise.
4641 (linux_set_resume_request): Likewise.
4642 * server.c (accumulate_file_name_length): Likewise.
4643 (emit_dll_description): Likewise.
4644 (handle_qxfer_threads_worker): Likewise.
4645 (visit_actioned_threads): Likewise.
4646 * thread-db.c (any_thread_of): Likewise.
4647 * tracepoint.c (same_process_p): Likewise.
4648 (match_blocktype): Likewise.
4649 (build_traceframe_info_xml): Likewise.
4651 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4653 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4655 (gdb_unparse_agent_expr): Likewise.
4656 * hostio.c (require_data): Likewise.
4657 (handle_pread): Likewise.
4658 * linux-low.c (disable_regset): Likewise.
4659 (fetch_register): Likewise.
4660 (store_register): Likewise.
4661 (get_dynamic): Likewise.
4662 (linux_qxfer_libraries_svr4): Likewise.
4663 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4664 (set_fast_tracepoint_jump): Likewise.
4665 (uninsert_fast_tracepoint_jumps_at): Likewise.
4666 (reinsert_fast_tracepoint_jumps_at): Likewise.
4667 (validate_inserted_breakpoint): Likewise.
4668 (clone_agent_expr): Likewise.
4669 * regcache.c (init_register_cache): Likewise.
4670 * remote-utils.c (putpkt_binary_1): Likewise.
4671 (decode_M_packet): Likewise.
4672 (decode_X_packet): Likewise.
4673 (look_up_one_symbol): Likewise.
4674 (relocate_instruction): Likewise.
4675 (monitor_output): Likewise.
4676 * server.c (handle_search_memory): Likewise.
4677 (handle_qxfer_exec_file): Likewise.
4678 (handle_qxfer_libraries): Likewise.
4679 (handle_qxfer): Likewise.
4680 (handle_query): Likewise.
4681 (handle_v_cont): Likewise.
4682 (handle_v_run): Likewise.
4683 (captured_main): Likewise.
4684 * target.c (write_inferior_memory): Likewise.
4685 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4686 * tracepoint.c (init_trace_buffer): Likewise.
4687 (add_tracepoint_action): Likewise.
4688 (add_traceframe): Likewise.
4689 (add_traceframe_block): Likewise.
4690 (cmd_qtdpsrc): Likewise.
4691 (cmd_qtdv): Likewise.
4692 (cmd_qtstatus): Likewise.
4693 (response_source): Likewise.
4694 (response_tsv): Likewise.
4695 (cmd_qtnotes): Likewise.
4696 (gdb_collect): Likewise.
4697 (initialize_tracepoint): Likewise.
4699 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4701 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4702 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4703 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4705 (enum aarch64_condition_codes): New enum.
4706 (w0): New static global.
4709 (struct aarch64_memory_operand) <type>: New
4710 MEMORY_OPERAND_POSTINDEX type.
4711 (postindex_memory_operand): New helper function.
4712 (emit_ret): New function.
4713 (emit_load_store_pair): New function, factored out of emit_stp
4714 with support for MEMORY_OPERAND_POSTINDEX.
4715 (emit_stp): Rewrite using emit_load_store_pair.
4716 (emit_ldp): New function.
4717 (emit_load_store): Likewise.
4718 (emit_ldr): Mention post-index instruction in comment.
4719 (emit_ldrh): New function.
4720 (emit_ldrb): New function.
4721 (emit_ldrsw): Mention post-index instruction in comment.
4722 (emit_str): Likewise.
4723 (emit_subs): New function.
4724 (emit_cmp): Likewise.
4725 (emit_and): Likewise.
4726 (emit_orr): Likewise.
4727 (emit_orn): Likewise.
4728 (emit_eor): Likewise.
4729 (emit_mvn): Likewise.
4730 (emit_lslv): Likewise.
4731 (emit_lsrv): Likewise.
4732 (emit_asrv): Likewise.
4733 (emit_mul): Likewise.
4734 (emit_sbfm): Likewise.
4735 (emit_sbfx): Likewise.
4736 (emit_ubfm): Likewise.
4737 (emit_ubfx): Likewise.
4738 (emit_csinc): Likewise.
4739 (emit_cset): Likewise.
4740 (emit_nop): Likewise.
4741 (emit_ops_insns): New helper function.
4742 (emit_pop): Likewise.
4743 (emit_push): Likewise.
4744 (aarch64_emit_prologue): New function.
4745 (aarch64_emit_epilogue): Likewise.
4746 (aarch64_emit_add): Likewise.
4747 (aarch64_emit_sub): Likewise.
4748 (aarch64_emit_mul): Likewise.
4749 (aarch64_emit_lsh): Likewise.
4750 (aarch64_emit_rsh_signed): Likewise.
4751 (aarch64_emit_rsh_unsigned): Likewise.
4752 (aarch64_emit_ext): Likewise.
4753 (aarch64_emit_log_not): Likewise.
4754 (aarch64_emit_bit_and): Likewise.
4755 (aarch64_emit_bit_or): Likewise.
4756 (aarch64_emit_bit_xor): Likewise.
4757 (aarch64_emit_bit_not): Likewise.
4758 (aarch64_emit_equal): Likewise.
4759 (aarch64_emit_less_signed): Likewise.
4760 (aarch64_emit_less_unsigned): Likewise.
4761 (aarch64_emit_ref): Likewise.
4762 (aarch64_emit_if_goto): Likewise.
4763 (aarch64_emit_goto): Likewise.
4764 (aarch64_write_goto_address): Likewise.
4765 (aarch64_emit_const): Likewise.
4766 (aarch64_emit_call): Likewise.
4767 (aarch64_emit_reg): Likewise.
4768 (aarch64_emit_pop): Likewise.
4769 (aarch64_emit_stack_flush): Likewise.
4770 (aarch64_emit_zero_ext): Likewise.
4771 (aarch64_emit_swap): Likewise.
4772 (aarch64_emit_stack_adjust): Likewise.
4773 (aarch64_emit_int_call_1): Likewise.
4774 (aarch64_emit_void_call_2): Likewise.
4775 (aarch64_emit_eq_goto): Likewise.
4776 (aarch64_emit_ne_goto): Likewise.
4777 (aarch64_emit_lt_goto): Likewise.
4778 (aarch64_emit_le_goto): Likewise.
4779 (aarch64_emit_gt_goto): Likewise.
4780 (aarch64_emit_ge_got): Likewise.
4781 (aarch64_emit_ops_impl): New static global variable.
4782 (aarch64_emit_ops): New target function, return
4783 &aarch64_emit_ops_impl.
4784 (struct linux_target_ops): Install it.
4786 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4788 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4789 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4791 * linux-aarch64-ipa.c: New file.
4792 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4794 (aarch64_get_thread_area): New target method.
4795 (extract_signed_bitfield): New helper function.
4796 (aarch64_decode_ldr_literal): New function.
4797 (enum aarch64_opcodes): New enum.
4798 (struct aarch64_register): New struct.
4799 (struct aarch64_operand): New struct.
4800 (x0): New static global.
4809 (aarch64_register): New helper function.
4810 (register_operand): Likewise.
4811 (immediate_operand): Likewise.
4812 (struct aarch64_memory_operand): New struct.
4813 (offset_memory_operand): New helper function.
4814 (preindex_memory_operand): Likewise.
4815 (enum aarch64_system_control_registers): New enum.
4816 (ENCODE): New macro.
4817 (emit_insn): New helper function.
4818 (emit_b): New function.
4819 (emit_bcond): Likewise.
4820 (emit_cb): Likewise.
4821 (emit_tb): Likewise.
4822 (emit_blr): Likewise.
4823 (emit_stp): Likewise.
4824 (emit_ldp_q_offset): Likewise.
4825 (emit_stp_q_offset): Likewise.
4826 (emit_load_store): Likewise.
4827 (emit_ldr): Likewise.
4828 (emit_ldrsw): Likewise.
4829 (emit_str): Likewise.
4830 (emit_ldaxr): Likewise.
4831 (emit_stxr): Likewise.
4832 (emit_stlr): Likewise.
4833 (emit_data_processing_reg): Likewise.
4834 (emit_data_processing): Likewise.
4835 (emit_add): Likewise.
4836 (emit_sub): Likewise.
4837 (emit_mov): Likewise.
4838 (emit_movk): Likewise.
4839 (emit_mov_addr): Likewise.
4840 (emit_mrs): Likewise.
4841 (emit_msr): Likewise.
4842 (emit_sevl): Likewise.
4843 (emit_wfe): Likewise.
4844 (append_insns): Likewise.
4845 (can_encode_int32_in): New helper function.
4846 (aarch64_relocate_instruction): New function.
4847 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4848 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4849 (struct linux_target_ops): Install aarch64_get_thread_area,
4850 aarch64_install_fast_tracepoint_jump_pad and
4851 aarch64_get_min_fast_tracepoint_insn_len.
4853 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4855 * Makefile.in (aarch64-insn.o): New rule.
4856 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4858 2015-09-21 Yao Qi <yao.qi@linaro.org>
4860 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4862 2015-09-21 Yao Qi <yao.qi@linaro.org>
4864 * tracepoint.c (max_jump_pad_size): Remove.
4866 2015-09-18 Yao Qi <yao.qi@linaro.org>
4868 * linux-aarch64-low.c: Don't include sys/uio.h.
4869 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4871 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
4873 * tracepoint.c (eval_result_type): Change prototype.
4874 (condition_true_at_tracepoint): Fix argument to compiled_cond.
4876 2015-09-15 Pedro Alves <palves@redhat.com>
4878 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4879 Check whether to report exec events instead of checking whether
4880 multiprocess is enabled.
4882 2015-09-15 Pedro Alves <palves@redhat.com>
4885 * remote-utils.c (prepare_resume_reply): Merge
4886 TARGET_WAITKIND_VFORK_DONE switch case with the
4887 TARGET_WAITKIND_FORKED case.
4889 2015-09-15 Yao Qi <yao.qi@linaro.org>
4891 * server.c (handle_query): Check string comparison using
4892 "else if" instead of "if".
4894 2015-09-15 Yao Qi <yao.qi@linaro.org>
4896 * server.c (vCont_supported): New global variable.
4897 (handle_query): Set vCont_supported to 1 if "vContSupported+"
4898 matches. Append ";vContSupported+" to own_buf.
4899 (handle_v_requests): Append ";s;S" to own_buf if target supports
4900 hardware single step or vCont_supported is false.
4901 (capture_main): Set vCont_supported to zero.
4903 2015-09-15 Yao Qi <yao.qi@linaro.org>
4905 * linux-low.c (linux_supports_conditional_breakpoints): Rename
4907 (linux_supports_hardware_single_step): ... New function.
4908 (linux_target_ops): Update.
4909 * lynx-low.c (lynx_target_ops): Set field
4910 supports_hardware_single_step to target_can_do_hardware_single_step.
4911 * nto-low.c (nto_target_ops): Likewise.
4912 * spu-low.c (spu_target_ops): Likewise.
4913 * win32-low.c (win32_target_ops): Likewise.
4914 * target.c (target_can_do_hardware_single_step): New function.
4915 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4916 Remove. <supports_hardware_single_step>: New field.
4917 (target_supports_conditional_breakpoints): Remove.
4918 (target_supports_hardware_single_step): New macro.
4919 (target_can_do_hardware_single_step): Declare.
4920 * server.c (handle_query): Use target_supports_hardware_single_step
4921 instead of target_supports_conditional_breakpoints.
4923 2015-09-15 Yao Qi <yao.qi@linaro.org>
4925 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4927 (struct linux_target_ops the_low_target): Install
4928 aarch64_linux_siginfo_fixup.
4930 2015-09-11 Don Breazeal <donb@codesourcery.com>
4931 Luis Machado <lgustavo@codesourcery.com>
4933 * linux-low.c (linux_mourn): Static declaration.
4934 (linux_arch_setup): Move in front of
4935 handle_extended_wait.
4936 (linux_arch_setup_thread): New function.
4937 (handle_extended_wait): Handle exec events. Call
4938 linux_arch_setup_thread. Make event_lwp argument a
4939 pointer-to-a-pointer.
4940 (check_zombie_leaders): Do not check stopped threads.
4941 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4942 (linux_low_filter_event): Add lwp and thread for exec'ing
4943 non-leader thread if leader thread has been deleted.
4944 Refactor code into linux_arch_setup_thread and call it.
4945 Pass child lwp pointer by reference to handle_extended_wait.
4946 (linux_wait_for_event_filtered): Update comment.
4947 (linux_wait_1): Prevent clobbering exec event status.
4948 (linux_supports_exec_events): New function.
4949 (linux_target_ops) <supports_exec_events>: Initialize new member.
4950 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4952 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4953 * server.c (report_exec_events): New global variable.
4954 (handle_query): Handle qSupported query for exec-events feature.
4955 (captured_main): Initialize report_exec_events.
4956 * server.h (report_exec_events): Declare new global variable.
4957 * target.h (struct target_ops) <supports_exec_events>: New
4959 (target_supports_exec_events): New macro.
4960 * win32-low.c (win32_target_ops) <supports_exec_events>:
4961 Initialize new member.
4963 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4965 * linux-low.c (linux_low_enable_btrace): Remove.
4966 (linux_target_ops): Replace linux_low_enable_btrace with
4967 linux_enable_btrace.
4969 2015-09-03 Yao Qi <yao.qi@linaro.org>
4971 * linux-aarch64-low.c (aarch64_insert_point): Call
4972 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4975 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4977 * linux-low.c (check_stopped_by_breakpoint): Use
4978 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4980 2015-08-27 Pedro Alves <palves@redhat.com>
4982 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4984 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4986 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4987 the XNEW-family equivalent.
4988 (compile_bytecodes): Likewise.
4989 * dll.c (loaded_dll): Likewise.
4990 * event-loop.c (append_callback_event): Likewise.
4991 (create_file_handler): Likewise.
4992 (create_file_event): Likewise.
4993 * hostio.c (handle_open): Likewise.
4994 * inferiors.c (add_thread): Likewise.
4995 (add_process): Likewise.
4996 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4997 * linux-arm-low.c (arm_new_process): Likewise.
4998 (arm_new_thread): Likewise.
4999 * linux-low.c (add_to_pid_list): Likewise.
5000 (linux_add_process): Likewise.
5001 (handle_extended_wait): Likewise.
5002 (add_lwp): Likewise.
5003 (enqueue_one_deferred_signal): Likewise.
5004 (enqueue_pending_signal): Likewise.
5005 (linux_resume_one_lwp_throw): Likewise.
5006 (linux_resume_one_thread): Likewise.
5007 (linux_read_memory): Likewise.
5008 (linux_write_memory): Likewise.
5009 * linux-mips-low.c (mips_linux_new_process): Likewise.
5010 (mips_linux_new_thread): Likewise.
5011 (mips_add_watchpoint): Likewise.
5012 * linux-x86-low.c (initialize_low_arch): Likewise.
5013 * lynx-low.c (lynx_add_process): Likewise.
5014 * mem-break.c (set_raw_breakpoint_at): Likewise.
5015 (set_breakpoint): Likewise.
5016 (add_condition_to_breakpoint): Likewise.
5017 (add_commands_to_breakpoint): Likewise.
5018 (clone_agent_expr): Likewise.
5019 (clone_one_breakpoint): Likewise.
5020 * regcache.c (new_register_cache): Likewise.
5021 * remote-utils.c (look_up_one_symbol): Likewise.
5022 * server.c (queue_stop_reply): Likewise.
5023 (start_inferior): Likewise.
5024 (queue_stop_reply_callback): Likewise.
5025 (handle_target_event): Likewise.
5026 * spu-low.c (fetch_ppc_memory): Likewise.
5027 (store_ppc_memory): Likewise.
5028 * target.c (set_target_ops): Likewise.
5029 * thread-db.c (thread_db_load_search): Likewise.
5030 (try_thread_db_load_1): Likewise.
5031 * tracepoint.c (add_tracepoint): Likewise.
5032 (add_tracepoint_action): Likewise.
5033 (create_trace_state_variable): Likewise.
5034 (cmd_qtdpsrc): Likewise.
5035 (cmd_qtro): Likewise.
5036 (add_while_stepping_state): Likewise.
5037 * win32-low.c (child_add_thread): Likewise.
5038 (get_image_name): Likewise.
5040 2015-08-25 Yao Qi <yao.qi@linaro.org>
5042 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5044 2015-08-25 Yao Qi <yao.qi@linaro.org>
5046 * Makefile.in (aarch64-linux.o): New rule.
5047 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5049 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5050 (aarch64_init_debug_reg_state): Make it extern.
5051 (aarch64_linux_prepare_to_resume): Remove.
5053 2015-08-25 Yao Qi <yao.qi@linaro.org>
5055 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5056 lwp_arch_private_info and ptid_of_lwp.
5058 2015-08-25 Yao Qi <yao.qi@linaro.org>
5060 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5061 Find proc_info by find_process_pid. All callers updated.
5063 2015-08-25 Yao Qi <yao.qi@linaro.org>
5065 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5067 (debug_reg_change_callback): Remove.
5068 (aarch64_notify_debug_reg_change): Remove.
5070 2015-08-25 Yao Qi <yao.qi@linaro.org>
5072 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5073 Call current_lwp_ptid.
5075 2015-08-25 Yao Qi <yao.qi@linaro.org>
5077 * linux-aarch64-low.c (debug_reg_change_callback): Use
5080 2015-08-25 Yao Qi <yao.qi@linaro.org>
5082 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5084 2015-08-25 Yao Qi <yao.qi@linaro.org>
5086 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5088 2015-08-25 Yao Qi <yao.qi@linaro.org>
5090 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5093 2015-08-25 Yao Qi <yao.qi@linaro.org>
5095 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5097 (debug_reg_change_callback): Remove argument entry and add argument
5098 lwp. Remove local variable thread. Don't print thread id in the
5099 debugging output. Don't check whether pid of thread equals to pid.
5100 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5101 iterate_over_lwps instead find_inferior.
5103 2015-08-24 Pedro Alves <palves@redhat.com>
5105 * inferiors.c (get_first_process): New function.
5106 * inferiors.h (get_first_process): New declaration.
5107 * remote-utils.c (read_ptid): Default to the first process in the
5108 list, instead of to the current thread's process.
5110 2015-08-24 Pedro Alves <palves@redhat.com>
5112 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5113 * event-loop.c: Likewise.
5114 * remote-utils.c: Likewise.
5115 * tracepoint.c: Likewise.
5117 2015-08-24 Pedro Alves <palves@redhat.com>
5119 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5122 2015-08-21 Pedro Alves <palves@redhat.com>
5124 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5125 instead of literal 1.
5127 2015-08-21 Pedro Alves <palves@redhat.com>
5129 * tdesc.c (default_description): Explicitly zero-initialize.
5131 2015-08-21 Pedro Alves <palves@redhat.com>
5134 * inferiors.c (remove_thread): Discard any pending stop reply for
5136 * server.c (remove_all_on_match_pid): Rename to ...
5137 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5139 (discard_queued_stop_replies): Change parameter to a ptid. Now
5141 (handle_v_kill, kill_inferior_callback, captured_main)
5142 (process_serial_event): Adjust.
5143 * server.h (discard_queued_stop_replies): Declare.
5145 2015-08-21 Pedro Alves <palves@redhat.com>
5147 * linux-low.c (wait_for_sigstop): Always switch to no thread
5148 selected if the previously current thread dies.
5149 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5150 process instead of the current thread's.
5151 * remote-utils.c (input_interrupt): Don't check if there's no
5153 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5154 current thread to the general thread fails, error out.
5155 (handle_qxfer_auxv, handle_qxfer_libraries)
5156 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5157 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5158 (handle_query): Check if there's a thread selected instead of
5159 checking whether there's any thread in the thread list.
5160 (handle_qxfer_threads, handle_qxfer_btrace)
5161 (handle_qxfer_btrace_conf): Don't error out early if there's no
5162 thread in the thread list.
5163 (handle_v_cont, myresume): Don't set the current thread to the
5165 (process_serial_event) <Hg handling>: Also set thread_id if the
5166 previous general thread is still alive.
5167 (process_serial_event) <g/G handling>: If setting the current
5168 thread to the general thread fails, error out.
5169 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5170 thread's lwp instead of the current thread's.
5171 * target.c (set_desired_thread): If the desired thread was not
5172 found, leave the current thread pointing to NULL. Return an int
5173 (boolean) indicating success.
5174 * target.h (set_desired_thread): Change return type to int.
5176 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5178 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5179 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5181 (ps_get_thread_area): New function.
5183 2015-08-19 Gary Benson <gbenson@redhat.com>
5185 * hostio.c (handle_pread): Do not attempt to read more data
5186 than hostio_reply_with_data can fit in a packet.
5188 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5190 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5192 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5194 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5196 2015-08-06 Pedro Alves <palves@redhat.com>
5198 * tracepoint.c (expr_eval_result): Now an int.
5200 2015-08-06 Pedro Alves <palves@redhat.com>
5202 * gdbthread.h (struct regcache): Forward declare.
5203 (struct thread_info) <regcache_data>: Now a struct regcache
5205 * inferiors.c (inferior_regcache_data)
5206 (set_inferior_regcache_data): Now work with struct regcache
5208 * inferiors.h (struct regcache): Forward declare.
5209 (inferior_regcache_data, set_inferior_regcache_data): Now work
5210 with struct regcache pointers.
5211 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5212 (free_register_cache_thread): Remove struct regcache pointer
5215 2015-08-06 Pedro Alves <palves@redhat.com>
5217 * server.c (captured_main): On error, print the exception message
5218 to stderr, and if run_once is set, throw a quit.
5220 2015-08-06 Pedro Alves <palves@redhat.com>
5222 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5225 2015-08-06 Pedro Alves <palves@redhat.com>
5227 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5228 reading beyond the passed in buffer length.
5230 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5232 * tracepoint.c (symbol_list) <required>: Remove.
5234 2015-08-06 Pedro Alves <palves@redhat.com>
5236 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5237 count if stopping and suspending threads.
5238 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5239 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5240 (linux_detach): Complete an ongoing step-over.
5241 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5243 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5244 (linux_wait_1): If passing a signal to the inferior after
5245 finishing a step-over, unsuspend and re-resume all lwps. If we
5246 see a single-step event but the thread should be continuing, don't
5247 pass the trap to gdb.
5248 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5249 internal_error instead of gdb_assert.
5250 (enqueue_pending_signal): New function.
5251 (check_ptrace_stopped_lwp_gone): Add debug output.
5252 (start_step_over): Use internal_error instead of gdb_assert.
5253 (complete_ongoing_step_over): New function.
5254 (linux_resume_one_thread): Don't resume a suspended thread.
5255 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5258 2015-08-06 Pedro Alves <palves@redhat.com>
5260 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5261 (linux_thread_alive): Use lwp_is_marked_dead.
5262 (extended_event_reported): Delete.
5263 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5264 instead of extended_event_reported.
5265 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5267 (lwp_is_marked_dead): New function.
5268 (lwp_running): Use lwp_is_marked_dead.
5269 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5272 2015-08-06 Pedro Alves <palves@redhat.com>
5274 * linux-low.c (linux_wait_1): Move fork event output out of the
5275 !report_to_gdb check. Pass event_child->waitstatus to
5276 target_waitstatus_to_string instead of ourstatus.
5278 2015-08-04 Yao Qi <yao.qi@linaro.org>
5280 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5281 if current_thread is 32 bit.
5283 2015-08-04 Yao Qi <yao.qi@linaro.org>
5285 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5286 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5287 * server.c (extended_protocol): Remove "static".
5288 * server.h (extended_protocol): Declare it.
5290 2015-08-04 Yao Qi <yao.qi@linaro.org>
5292 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5293 both aarch64 and aarch32.
5294 (aarch64_set_pc): Likewise.
5296 2015-08-04 Yao Qi <yao.qi@linaro.org>
5298 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5299 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5300 arm-with-neon.xml to srv_xmlfiles.
5301 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5302 (is_64bit_tdesc): New function.
5303 (aarch64_linux_read_description): New function.
5304 (aarch64_arch_setup): Call aarch64_linux_read_description.
5305 (regs_info): Rename to regs_info_aarch64.
5306 (aarch64_regs_info): Return right regs_info.
5307 (initialize_low_arch): Call initialize_low_arch_aarch32.
5309 2015-08-04 Yao Qi <yao.qi@linaro.org>
5311 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5312 * linux-aarch32-low.c: New file.
5313 * linux-aarch32-low.h: New file.
5314 * linux-arm-low.c (arm_fill_gregset): Move it to
5315 linux-aarch32-low.c.
5316 (arm_store_gregset): Likewise.
5317 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5318 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5319 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5320 (regs_info): Rename to regs_info_arm.
5321 (arm_regs_info): Return regs_info_aarch32 if
5322 have_ptrace_getregset is 1 and target description is
5323 arm_with_neon or arm_with_vfpv3.
5324 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5325 Call initialize_low_arch_aarch32 instead.
5327 2015-08-04 Yao Qi <yao.qi@linaro.org>
5329 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5330 * linux-low.c: ... here.
5331 * linux-low.h (have_ptrace_getregset): Declare it.
5333 2015-08-04 Pedro Alves <palves@redhat.com>
5335 * thread-db.c (struct thread_db): Use new typedefs.
5336 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5338 (disable_thread_event_reporting): Cast result of dlsym to
5339 destination function pointer type.
5340 (thread_db_mourn): Use td_ta_delete_ftype.
5342 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5344 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5346 (CDX_BREAKPOINT): Define for R2.
5347 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5348 (the_low_target): Add comments.
5350 2015-07-30 Yao Qi <yao.qi@linaro.org>
5352 * linux-arm-low.c (arm_hwcap): Remove it.
5353 (arm_read_description): New local variable arm_hwcap. Don't
5354 set arm_hwcap to zero.
5356 2015-07-30 Yao Qi <yao.qi@linaro.org>
5358 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5359 Use regcache->tdesc instead.
5360 (arm_store_wmmxregset): Likewise.
5361 (arm_fill_vfpregset): Likewise.
5362 (arm_store_vfpregset): Likewise.
5364 2015-07-30 Yao Qi <yao.qi@linaro.org>
5366 * linux-arm-low.c: Include arch/arm.h.
5367 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5368 (arm_store_gregset): Likewise.
5370 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5372 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5373 ptrace's 4th parameter.
5375 2015-07-27 Yao Qi <yao.qi@linaro.org>
5377 * configure.srv (case aarch64*-*-linux*): Don't set
5380 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5382 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5384 * linux-arm-low.c: Likewise.
5385 * linux-cris-low.c: Likewise.
5386 * linux-crisv32-low.c: Likewise.
5387 * linux-low.c: Likewise.
5388 * linux-m68k-low.c: Likewise.
5389 * linux-mips-low.c: Likewise.
5390 * linux-nios2-low.c: Likewise.
5391 * linux-s390-low.c: Likewise.
5392 * linux-sparc-low.c: Likewise.
5393 * linux-tic6x-low.c: Likewise.
5394 * linux-tile-low.c: Likewise.
5395 * linux-x86-low.c: Likewise.
5397 2015-07-24 Pedro Alves <palves@redhat.com>
5399 * config.in: Regenerate.
5400 * configure: Regenerate.
5402 2015-07-24 Pedro Alves <palves@redhat.com>
5404 * acinclude.m4: Include ../ptrace.m4.
5405 * configure.ac: Call GDB_AC_PTRACE.
5406 * config.in, configure: Regenerate.
5408 2015-07-24 Yao Qi <yao.qi@linaro.org>
5410 * linux-low.c (linux_create_inferior): Remove setting to
5411 proc->priv->new_inferior.
5412 (linux_attach): Likewise.
5413 (linux_low_filter_event): Likewise.
5414 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5416 2015-07-24 Yao Qi <yao.qi@linaro.org>
5418 * linux-low.c (linux_arch_setup): New function.
5419 (linux_low_filter_event): If proc->tdesc is NULL and
5420 proc->attached is true, call the_low_target.arch_setup.
5421 Otherwise, keep status pending, and return.
5422 (linux_resume_one_lwp_throw): Don't call get_pc if
5423 thread->while_stepping isn't NULL. Don't call
5424 get_thread_regcache if proc->tdesc is NULL.
5425 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5426 (linux_target_ops): Install arch_setup.
5427 * server.c (start_inferior): Call the_target->arch_setup.
5428 * target.h (struct target_ops) <arch_setup>: New field.
5429 (target_arch_setup): New marco.
5430 * lynx-low.c (lynx_target_ops): Update.
5431 * nto-low.c (nto_target_ops): Update.
5432 * spu-low.c (spu_target_ops): Update.
5433 * win32-low.c (win32_target_ops): Update.
5435 2015-07-24 Yao Qi <yao.qi@linaro.org>
5437 * linux-low.c (linux_add_process): Don't set
5438 proc->priv->new_inferior.
5439 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5440 (linux_attach): Likewise.
5442 2015-07-24 Yao Qi <yao.qi@linaro.org>
5444 * server.c (start_inferior): Code refactor.
5446 2015-07-24 Yao Qi <yao.qi@linaro.org>
5448 * server.c (process_serial_event): Set general_thread.
5450 2015-07-21 Yao Qi <yao.qi@linaro.org>
5452 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5453 aarch64_linux_get_debug_reg_capacity.
5455 2015-07-17 Yao Qi <yao.qi@linaro.org>
5457 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5458 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5459 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5460 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5461 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5462 (AARCH64_HWP_ALIGNMENT): Likewise.
5463 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5464 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5465 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5466 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5467 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5468 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5469 (struct aarch64_debug_reg_state): Likewise.
5470 (struct arch_lwp_info): Likewise.
5471 (aarch64_align_watchpoint): Likewise.
5472 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5473 (aarch64_watchpoint_length): Likewise.
5474 (aarch64_point_encode_ctrl_reg): Likewise
5475 (aarch64_point_is_aligned): Likewise.
5476 (aarch64_align_watchpoint): Likewise.
5477 (aarch64_linux_set_debug_regs):
5478 (aarch64_dr_state_insert_one_point): Likewise.
5479 (aarch64_dr_state_remove_one_point): Likewise.
5480 (aarch64_handle_breakpoint): Likewise.
5481 (aarch64_handle_aligned_watchpoint): Likewise.
5482 (aarch64_handle_unaligned_watchpoint): Likewise.
5483 (aarch64_handle_watchpoint): Likewise.
5485 2015-07-17 Yao Qi <yao.qi@linaro.org>
5487 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5488 and don't aarch64_get_debug_reg_state. All callers update.
5489 (aarch64_handle_aligned_watchpoint): Likewise.
5490 (aarch64_handle_unaligned_watchpoint): Likewise.
5491 (aarch64_handle_watchpoint): Likewise.
5492 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5493 (aarch64_remove_point): Likewise.
5495 2015-07-17 Yao Qi <yao.qi@linaro.org>
5497 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5499 (aarch64_handle_unaligned_watchpoint): Likewise.
5501 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5503 Revert the previous 3 commits:
5504 Move gdb_regex* to common/
5505 Move linux_find_memory_regions_full & co.
5506 gdbserver build-id attribute generator
5508 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5509 Jan Kratochvil <jan.kratochvil@redhat.com>
5511 gdbserver build-id attribute generator.
5512 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5513 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5514 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5516 (get_dynamic): Use find_pdhr to traverse program headers.
5517 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5518 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5519 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5520 (get_hex_build_id): New.
5521 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5522 to reply XML document.
5524 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5525 Jan Kratochvil <jan.kratochvil@redhat.com>
5527 * target.c: Include target/target-utils.h and fcntl.h.
5528 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5529 (target_fileio_read_stralloc): New functions.
5531 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5533 * Makefile.in (OBS): Add gdb_regex.o.
5535 * config.in: Rebuilt.
5536 * configure: Rebuilt.
5538 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5539 Jan Kratochvil <jan.kratochvil@redhat.com>
5541 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5542 * Makefile.in (OBS): Add target-utils.o.
5543 (linux-maps.o, target-utils.o): New.
5544 * configure.srv (srv_linux_obj): Add linux-maps.o.
5546 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5548 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5550 (the_low_target): Install it.
5552 2015-07-14 Pedro Alves <palves@redhat.com>
5554 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5555 Instead, ignore ECHILD, and throw an error for other errnos.
5557 2015-07-10 Pedro Alves <palves@redhat.com>
5559 * event-loop.c (struct callback_event) <data>: Change type to
5560 gdb_client_data instance instead of gdb_client_data pointer.
5561 (append_callback_event): Adjust.
5563 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5565 * linux-aarch64-low.c: Add comments for each linux_target_ops
5566 method. Remove comments already covered in target_ops and
5567 linux_target_ops definitions.
5568 (the_low_target): Add comments for each unimplemented method.
5570 2015-07-09 Yao Qi <yao.qi@linaro.org>
5572 * linux-aarch64-low.c (aarch64_regmap): Remove.
5573 (aarch64_usrregs_info): Remove.
5574 (regs_info): Set field usrregs to NULL.
5576 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5578 * linux-low.c: Include "rsp-low.h"
5579 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5580 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5581 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5582 (handle_btrace_enable_pt): New.
5583 (handle_btrace_general_set): Support "pt".
5584 (handle_btrace_conf_general_set): Support "pt:size".
5586 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5588 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5591 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5593 * linux-aarch64-low.c: Remove comment about endianness.
5594 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5595 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5598 2015-06-24 Gary Benson <gbenson@redhat.com>
5600 * linux-i386-ipa.c (stdint.h): Do not include.
5601 * lynx-i386-low.c (stdint.h): Likewise.
5602 * lynx-ppc-low.c (stdint.h): Likewise.
5603 * mem-break.c (stdint.h): Likewise.
5604 * thread-db.c (stdint.h): Likewise.
5605 * tracepoint.c (stdint.h): Likewise.
5606 * win32-low.c (stdint.h): Likewise.
5608 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5610 * server.c (write_qxfer_response): Update call to
5611 remote_escape_output.
5613 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5614 Jan Kratochvil <jan.kratochvil@redhat.com>
5616 Merge multiple hex conversions.
5617 * gdbreplay.c (tohex): Rename to 'fromhex'.
5618 (logchar): Use fromhex.
5620 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5622 * server.c (handle_qxfer_libraries): Set `version' attribute for
5625 2015-06-10 Gary Benson <gbenson@redhat.com>
5627 * target.h (struct target_ops) <multifs_open>: New field.
5628 <multifs_unlink>: Likewise.
5629 <multifs_readlink>: Likewise.
5630 * linux-low.c (nat/linux-namespaces.h): New include.
5631 (linux_target_ops): Initialize the_target->multifs_open,
5632 the_target->multifs_unlink and the_target->multifs_readlink.
5633 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5634 * hostio.c (hostio_fs_pid): New static variable.
5635 (hostio_handle_new_gdb_connection): New function.
5636 (handle_setfs): Likewise.
5637 (handle_open): Use the_target->multifs_open as appropriate.
5638 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5639 (handle_readlink): Use the_target->multifs_readlink as
5641 (handle_vFile): Handle vFile:setfs packets.
5642 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5643 after target_handle_new_gdb_connection.
5645 2015-06-10 Gary Benson <gbenson@redhat.com>
5647 * configure.ac (AC_CHECK_FUNCS): Add setns.
5648 * config.in: Regenerate.
5649 * configure: Likewise.
5650 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5651 (linux-namespaces.o): New rule.
5652 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5654 2015-06-09 Gary Benson <gbenson@redhat.com>
5656 * hostio.c (handle_open): Process mode argument with
5657 fileio_to_host_mode.
5659 2015-06-01 Yao Qi <yao.qi@linaro.org>
5661 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5662 * linux-x86-low.c: Likewise.
5664 2015-05-28 Don Breazeal <donb@codesourcery.com>
5666 * linux-low.c (handle_extended_wait): Initialize
5667 thread_info.last_resume_kind for new fork children.
5669 2015-05-15 Pedro Alves <palves@redhat.com>
5671 * target.h (target_handle_new_gdb_connection): Rewrite using if
5672 wrapped in do/while.
5674 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5676 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5677 * configure, config.in: Regenerate.
5678 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5681 2015-05-12 Don Breazeal <donb@codesourcery.com>
5683 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5684 PTRACE_EVENT_VFORK_DONE.
5685 (linux_low_ptrace_options, extended_event_reported): Add vfork
5687 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5688 and "vforkdone" for RSP 'T' Stop Reply Packet.
5689 * server.h (report_vfork_events): Declare
5692 2015-05-12 Don Breazeal <donb@codesourcery.com>
5694 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5695 (the_low_target) <new_fork>: Initialize new member.
5696 * linux-arm-low.c (arm_new_fork): New function.
5697 (the_low_target) <new_fork>: Initialize new member.
5698 * linux-low.c (handle_extended_wait): Call new target function
5700 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5701 * linux-mips-low.c (mips_add_watchpoint): New function
5702 extracted from mips_insert_point.
5703 (the_low_target) <new_fork>: Initialize new member.
5704 (mips_linux_new_fork): New function.
5705 (mips_insert_point): Call mips_add_watchpoint.
5706 * linux-x86-low.c (x86_linux_new_fork): New function.
5707 (the_low_target) <new_fork>: Initialize new member.
5709 2015-05-12 Don Breazeal <donb@codesourcery.com>
5711 * linux-low.c (handle_extended_wait): Implement return value,
5712 rename argument 'event_child' to 'event_lwp', handle
5713 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5714 (linux_low_ptrace_options): New function.
5715 (linux_low_filter_event): Call linux_low_ptrace_options,
5716 use different argument fo linux_enable_event_reporting,
5717 use return value from handle_extended_wait.
5718 (extended_event_reported): New function.
5719 (linux_wait_1): Call extended_event_reported and set
5720 status to report fork events.
5721 (linux_write_memory): Add pid to debug message.
5722 (reset_lwp_ptrace_options_callback): New function.
5723 (linux_handle_new_gdb_connection): New function.
5724 (linux_target_ops): Initialize new structure member.
5725 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5726 * lynx-low.c: Initialize new structure member.
5727 * remote-utils.c (prepare_resume_reply): Implement stop reason
5728 "fork" for "T" stop message.
5729 * server.c (handle_query): Call handle_new_gdb_connection.
5730 * server.h (report_fork_events): Declare global flag.
5731 * target.h (struct target_ops) <handle_new_gdb_connection>:
5733 (target_handle_new_gdb_connection): New macro.
5734 * win32-low.c: Initialize new structure member.
5736 2015-05-12 Don Breazeal <donb@codesourcery.com>
5738 * mem-break.c (APPEND_TO_LIST): Define macro.
5739 (clone_agent_expr): New function.
5740 (clone_one_breakpoint): New function.
5741 (clone_all_breakpoints): New function.
5742 * mem-break.h: Declare new functions.
5744 2015-05-12 Don Breazeal <donb@codesourcery.com>
5746 * linux-low.c (linux_supports_fork_events): New function.
5747 (linux_supports_vfork_events): New function.
5748 (linux_target_ops): Initialize new structure members.
5749 (initialize_low): Call linux_check_ptrace_features.
5750 * lynx-low.c (lynx_target_ops): Initialize new structure
5752 * server.c (report_fork_events, report_vfork_events):
5754 (handle_query): Add new features to qSupported packet and
5756 (captured_main): Initialize new global variables.
5757 * target.h (struct target_ops) <supports_fork_events>:
5759 <supports_vfork_events>: New member.
5760 (target_supports_fork_events): New macro.
5761 (target_supports_vfork_events): New macro.
5762 * win32-low.c (win32_target_ops): Initialize new structure
5765 2015-05-12 Gary Benson <gbenson@redhat.com>
5767 * server.c (handle_qxfer_exec_file): Use current process
5770 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5772 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5773 Remove HAVE_PTRACE_GETREGS conditionals.
5774 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5775 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5777 2015-05-08 Yao Qi <yao.qi@linaro.org>
5779 * linux-low.c (linux_supports_conditional_breakpoints): New
5781 (linux_target_ops): Install new target method.
5782 * lynx-low.c (lynx_target_ops): Install NULL hook for
5783 supports_conditional_breakpoints.
5784 * nto-low.c (nto_target_ops): Likewise.
5785 * spu-low.c (spu_target_ops): Likewise.
5786 * win32-low.c (win32_target_ops): Likewise.
5787 * server.c (handle_query): Check
5788 target_supports_conditional_breakpoints.
5789 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5791 (target_supports_conditional_breakpoints): New macro.
5793 2015-05-06 Pedro Alves <palves@redhat.com>
5796 * server.c (start_inferior): If the process exits, mourn it.
5798 2015-04-21 Gary Benson <gbenson@redhat.com>
5800 * hostio.c (fileio_open_flags_to_host): Factored out to
5801 fileio_to_host_openflags in common/fileio.c. Single use
5804 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5806 * linux-xtensa-low.c (xtensa_fill_gregset)
5807 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5810 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5812 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5813 (regs_info): Replace usrregs pointer with NULL.
5815 2015-04-17 Gary Benson <gbenson@redhat.com>
5817 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5818 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5819 * server.c (handle_qxfer_exec_file): New function.
5820 (qxfer_packets): Add exec-file entry.
5821 (handle_query): Report qXfer:exec-file:read as supported packet.
5823 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5825 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5827 2015-04-09 Gary Benson <gbenson@redhat.com>
5829 * hostio-errno.c (errno_to_fileio_error): Remove function.
5830 Update caller to use remote_fileio_to_fio_error.
5832 2015-04-09 Yao Qi <yao.qi@linaro.org>
5834 * linux-low.c (linux_insert_point): Call
5835 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5836 (linux_remove_point): Call remove_memory_breakpoint if type is
5838 * linux-x86-low.c (x86_insert_point): Don't call
5839 insert_memory_breakpoint.
5840 (x86_remove_point): Don't call remove_memory_breakpoint.
5842 2015-04-01 Pedro Alves <palves@redhat.com>
5843 Cleber Rosa <crosa@redhat.com>
5845 * server.c (gdbserver_usage): Reorganize and extend the usage
5848 2015-03-24 Pedro Alves <palves@redhat.com>
5850 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5851 output. Also dump TRAP_TRACE.
5852 (linux_low_filter_event): In debug output, distinguish a
5853 resume_stop SIGSTOP from a delayed SIGSTOP.
5855 2015-03-24 Gary Benson <gbenson@redhat.com>
5857 * linux-x86-low.c (x86_linux_new_thread): Moved to
5859 (x86_linux_prepare_to_resume): Likewise.
5861 2015-03-24 Gary Benson <gbenson@redhat.com>
5863 * Makefile.in (x86-linux-dregs.o): New rule.
5864 * configure.srv: Add x86-linux-dregs.o to relevant targets.
5865 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5866 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5867 (x86_linux_dr_get): Likewise.
5868 (x86_linux_dr_set): Likewise.
5869 (update_debug_registers_callback): Likewise.
5870 (x86_linux_dr_set_addr): Likewise.
5871 (x86_linux_dr_get_addr): Likewise.
5872 (x86_linux_dr_set_control): Likewise.
5873 (x86_linux_dr_get_control): Likewise.
5874 (x86_linux_dr_get_status): Likewise.
5875 (x86_linux_update_debug_registers): Likewise.
5877 2015-03-24 Gary Benson <gbenson@redhat.com>
5879 * linux-x86-low.c (x86_linux_update_debug_registers):
5880 New function, factored out from...
5881 (x86_linux_prepare_to_resume): ...this.
5883 2015-03-24 Gary Benson <gbenson@redhat.com>
5885 * linux-x86-low.c (x86_linux_dr_get): Update comments.
5886 (x86_linux_dr_set): Likewise.
5887 (update_debug_registers_callback): Likewise.
5888 (x86_linux_dr_set_addr): Likewise.
5889 (x86_linux_dr_get_addr): Likewise.
5890 (x86_linux_dr_set_control): Likewise.
5891 (x86_linux_dr_get_control): Likewise.
5892 (x86_linux_dr_get_status): Likewise.
5893 (x86_linux_prepare_to_resume): Likewise.
5895 2015-03-24 Gary Benson <gbenson@redhat.com>
5897 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5898 Use perror_with_name. Pass string through gettext.
5899 (x86_linux_dr_set): Likewise.
5901 2015-03-24 Gary Benson <gbenson@redhat.com>
5903 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5904 (x86_linux_dr_set_addr): ...this.
5905 (x86_dr_low_get_addr): Rename to...
5906 (x86_linux_dr_get_addr): ...this.
5907 (x86_dr_low_set_control): Rename to...
5908 (x86_linux_dr_set_control): ...this.
5909 (x86_dr_low_get_control): Rename to...
5910 (x86_linux_dr_get_control): ...this.
5911 (x86_dr_low_get_status): Rename to...
5912 (x86_linux_dr_get_status): ...this.
5913 (x86_dr_low): Update with new function names.
5915 2015-03-24 Gary Benson <gbenson@redhat.com>
5917 * Makefile.in (x86-linux.o): New rule.
5918 * configure.srv: Add x86-linux.o to relevant targets.
5919 * linux-low.c (lwp_set_arch_private_info): New function.
5920 (lwp_arch_private_info): Likewise.
5921 * linux-x86-low.c: Include nat/x86-linux.h.
5922 (arch_lwp_info): Removed structure.
5923 (update_debug_registers_callback):
5924 Use lwp_set_debug_registers_changed.
5925 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5926 and lwp_set_debug_registers_changed.
5927 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5929 2015-03-24 Gary Benson <gbenson@redhat.com>
5931 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5932 * linux-arm-low.c (arm_new_thread): Likewise.
5933 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5934 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5935 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5936 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5938 2015-03-24 Gary Benson <gbenson@redhat.com>
5940 * linux-low.c (ptid_of_lwp): New function.
5941 (lwp_is_stopped): Likewise.
5942 (lwp_stop_reason): Likewise.
5943 * linux-x86-low.c (update_debug_registers_callback):
5945 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5948 2015-03-24 Gary Benson <gbenson@redhat.com>
5950 * linux-low.h (linux_stop_lwp): Remove declaration.
5952 2015-03-24 Gary Benson <gbenson@redhat.com>
5954 * linux-low.h: Include nat/linux-nat.h.
5955 * linux-low.c (iterate_over_lwps_args): New structure.
5956 (iterate_over_lwps_filter): New function.
5957 (iterate_over_lwps): Likewise.
5958 * linux-x86-low.c (update_debug_registers_callback):
5959 Update signature to what iterate_over_lwps expects.
5960 Remove PID check that iterate_over_lwps now performs.
5961 (x86_dr_low_set_addr): Use iterate_over_lwps.
5962 (x86_dr_low_set_control): Likewise.
5964 2015-03-24 Gary Benson <gbenson@redhat.com>
5966 * linux-x86-low.c (x86_debug_reg_state): New function.
5967 (x86_linux_prepare_to_resume): Use the above.
5969 2015-03-24 Gary Benson <gbenson@redhat.com>
5971 * linux-low.c (current_lwp_ptid): New function.
5972 * linux-x86-low.c: Include nat/linux-nat.h.
5973 (x86_dr_low_get_addr): Use current_lwp_ptid.
5974 (x86_dr_low_get_control): Likewise.
5975 (x86_dr_low_get_status): Likewise.
5977 2015-03-20 Pedro Alves <palves@redhat.com>
5979 * tracepoint.c (cmd_qtstatus): Make "str" const.
5981 2015-03-20 Pedro Alves <palves@redhat.com>
5983 * server.c (handle_general_set): Make "req_str" const.
5985 2015-03-19 Pedro Alves <palves@redhat.com>
5987 * linux-low.c (linux_resume_one_lwp): Rename to ...
5988 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5989 instead call perror_with_name.
5990 (check_ptrace_stopped_lwp_gone): New function.
5991 (linux_resume_one_lwp): Reimplement as wrapper around
5992 linux_resume_one_lwp_throw that swallows errors if the LWP is
5995 2015-03-19 Pedro Alves <palves@redhat.com>
5997 * linux-low.c (count_events_callback, select_event_lwp_callback):
5998 No longer check whether the thread has resume_stop as last resume
6001 2015-03-19 Pedro Alves <palves@redhat.com>
6003 * linux-low.c (count_events_callback, select_event_lwp_callback):
6004 Use the lwp's status_pending_p field, not the thread's.
6006 2015-03-19 Pedro Alves <palves@redhat.com>
6008 * linux-low.c (select_event_lwp_callback): Update comments to
6009 no longer mention SIGTRAP.
6011 2015-03-18 Gary Benson <gbenson@redhat.com>
6013 * server.c (handle_query): Do not report vFile:fstat as supported.
6015 2015-03-11 Gary Benson <gbenson@redhat.com>
6017 * hostio.c (sys/types.h): New include.
6018 (sys/stat.h): Likewise.
6019 (common-remote-fileio.h): Likewise.
6020 (handle_fstat): New function.
6021 (handle_vFile): Handle vFile:fstat packets.
6023 2015-03-11 Gary Benson <gbenson@redhat.com>
6025 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6026 struct stat.st_blocks and struct stat.st_blksize.
6027 * configure: Regenerate.
6028 * config.in: Likewise.
6029 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6030 (OBS): Add common-remote-fileio.o.
6031 (common-remote-fileio.o): New rule.
6033 2015-03-09 Pedro Alves <palves@redhat.com>
6035 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6036 'struct sockaddr' pointer in 'accept' call.
6038 2015-03-09 Pedro Alves <palves@redhat.com>
6041 2015-03-07 Pedro Alves <palves@redhat.com>
6042 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6043 or <winsock2.h> here. Instead include "gdb_socket.h".
6044 (remote_open): Use union gdb_sockaddr_u.
6045 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6046 or <winsock2.h> here. Instead include "gdb_socket.h".
6047 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6048 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6050 (init_named_socket, gdb_agent_helper_thread): Use union
6053 2015-03-07 Pedro Alves <palves@redhat.com>
6055 * configure.ac (build_warnings): Move
6056 -Wdeclaration-after-statement to the C-specific set.
6057 * configure: Regenerate.
6059 2015-03-07 Pedro Alves <palves@redhat.com>
6061 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6062 or <winsock2.h> here. Instead include "gdb_socket.h".
6063 (remote_open): Use union gdb_sockaddr_u.
6064 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6065 or <winsock2.h> here. Instead include "gdb_socket.h".
6066 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6067 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6069 (init_named_socket, gdb_agent_helper_thread): Use union
6072 2015-03-07 Pedro Alves <palves@redhat.com>
6074 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6077 2015-03-06 Yao Qi <yao.qi@linaro.org>
6079 * linux-aarch64-low.c (aarch64_insert_point): Use
6080 show_debug_regs as a boolean.
6081 (aarch64_remove_point): Likewise.
6083 2015-03-05 Pedro Alves <palves@redhat.com>
6085 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6086 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6087 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6088 * nto-low.c (nto_target_ops): Likewise.
6089 * spu-low.c (spu_target_ops): Likewise.
6090 * win32-low.c (win32_target_ops): Likewise.
6092 2015-03-04 Pedro Alves <palves@redhat.com>
6094 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6095 Decide whether a breakpoint triggered based on the SIGTRAP's
6097 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6098 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6099 (linux_low_filter_event): Check for breakpoints before checking
6101 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6103 (linux_stopped_by_sw_breakpoint)
6104 (linux_supports_stopped_by_sw_breakpoint)
6105 (linux_stopped_by_hw_breakpoint)
6106 (linux_supports_stopped_by_hw_breakpoint): New functions.
6107 (linux_target_ops): Install new target methods.
6109 2015-03-04 Pedro Alves <palves@redhat.com>
6111 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6112 * server.c (swbreak_feature, hwbreak_feature): New globals.
6113 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6114 (captured_main): Clear swbreak_feature and hwbreak_feature.
6115 * server.h (swbreak_feature, hwbreak_feature): Declare.
6116 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6117 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6118 supports_stopped_by_hw_breakpoint>: New fields.
6119 (target_supports_stopped_by_sw_breakpoint)
6120 (target_stopped_by_sw_breakpoint)
6121 (target_supports_stopped_by_hw_breakpoint)
6122 (target_stopped_by_hw_breakpoint): Declare.
6124 2015-03-04 Pedro Alves <palves@redhat.com>
6126 enum lwp_stop_reason -> enum target_stop_reason
6127 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6128 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6129 (linux_wait_1, stuck_in_jump_pad_callback)
6130 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6131 (linux_stopped_by_watchpoint):
6132 * linux-low.h (enum lwp_stop_reason): Delete.
6133 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6134 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6136 2015-03-04 Yao Qi <yao.qi@linaro.org>
6138 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6140 2015-03-03 Gary Benson <gbenson@redhat.com>
6142 * hostio.c (handle_vFile): Fix prefix lengths.
6144 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6146 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6149 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6151 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6152 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6153 (clean): Add "rm -f" for above C files.
6154 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6155 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6156 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6157 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6158 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6159 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6160 (init_registers_s390x_vx_linux64)
6161 (init_registers_s390x_tevx_linux64)
6162 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6163 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6165 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6166 (s390_store_vxrs_high): New functions.
6167 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6169 (s390_arch_setup): Add logic for selecting one of the new target
6170 descriptions. Activate the new vector regsets if applicable.
6171 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6172 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6173 and init_registers_s390x_tevx_linux64.
6175 2015-03-01 Pedro Alves <palves@redhat.com>
6177 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6180 2015-02-27 Pedro Alves <palves@redhat.com>
6182 * linux-x86-low.c (u_debugreg_offset): New function.
6183 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6185 2015-02-27 Pedro Alves <palves@redhat.com>
6187 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6188 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6189 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6190 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6191 (ps_lsetfpregs, ps_getpid)
6192 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6193 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6194 (ps_lsetxregs, ps_plog): Declare.
6196 2015-02-27 Pedro Alves <palves@redhat.com>
6198 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6199 IP_AGENT_EXPORT_FUNC.
6200 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6201 IP_AGENT_EXPORT_FUNC.
6202 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6203 (IP_AGENT_EXPORT): Delete.
6204 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6205 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6206 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6207 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6208 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6209 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6210 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6211 (traceframe_read_count, traceframe_write_count)
6212 (traceframes_created, trace_state_variables, get_raw_reg)
6213 (get_trace_state_variable_value, set_trace_state_variable_value)
6214 (ust_loaded, helper_thread_id, cmd_buf): Use
6215 IPA_SYM_EXPORTED_NAME.
6216 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6217 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6218 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6219 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6220 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6221 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6222 EXTERN_C_PUSH/EXTERN_C_POP.
6223 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6224 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6225 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6226 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6227 (traceframe_write_count, traceframe_read_count)
6228 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6229 (about_to_request_buffer_space, get_trace_state_variable_value)
6230 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6231 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6232 EXTERN_C_PUSH/EXTERN_C_POP.
6233 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6234 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6235 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6236 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6237 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6238 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6239 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6240 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6242 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6243 (IP_AGENT_EXPORT_VAR_DECL): Define.
6245 (gdb_agent_get_raw_reg): Declare.
6247 2015-02-27 Tom Tromey <tromey@redhat.com>
6248 Pedro Alves <palves@redhat.com>
6250 Rename symbols whose names are reserved C++ keywords throughout.
6252 2015-02-27 Pedro Alves <palves@redhat.com>
6254 * Makefile.in (COMPILER): New, get it from autoconf.
6255 (CXX): Get from autoconf instead.
6256 (COMPILE.pre): Use COMPILER.
6257 (CC-LD): Rename to ...
6258 (CC_LD): ... this. Use COMPILER.
6259 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6260 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6261 * acinclude.m4: Include build-with-cxx.m4.
6262 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6263 Disable -Werror by default if building in C++ mode.
6264 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6265 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6266 the C++ compiler. Save/restore CXXFLAGS too.
6267 * configure: Regenerate.
6269 2015-02-27 Pedro Alves <palves@redhat.com>
6271 * acinclude.m4: Include libiberty.m4.
6272 * configure.ac: Call libiberty_INIT.
6273 * config.in, configure: Regenerate.
6275 2015-02-26 Pedro Alves <palves@redhat.com>
6277 * linux-low.c (linux_wait_1): When incrementing the PC past a
6278 program breakpoint always use the_low_target.breakpoint_len as
6279 increment, rather than the maximum between that and
6280 the_low_target.decr_pc_after_break.
6282 2015-02-23 Pedro Alves <palves@redhat.com>
6284 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6285 thread was doing a step-over; always adjust the PC if
6286 we stepped over a permanent breakpoint.
6287 (linux_wait_1): If we stepped over breakpoint that was on top of a
6288 permanent breakpoint, manually advance the PC past it.
6290 2015-02-23 Pedro Alves <palves@redhat.com>
6292 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6294 (x86_fill_gregset, x86_store_gregset): Use it when handling
6297 2015-02-20 Pedro Alves <palves@redhat.com>
6299 * thread-db.c: Include "nat/linux-procfs.h".
6300 (thread_db_init): Skip listing new threads if the kernel supports
6301 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6303 2015-02-20 Pedro Alves <palves@redhat.com>
6305 * linux-low.c (status_pending_p_callback): Use ptid_match.
6307 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6309 PR breakpoints/16812
6310 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6311 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6312 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6314 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6316 PR breakpoints/15956
6317 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6319 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6321 * linux-low.c (linux_low_btrace_conf): Print size.
6322 * server.c (handle_btrace_conf_general_set): New.
6323 (hanle_general_set): Call handle_btrace_conf_general_set.
6324 (handle_query): Report Qbtrace-conf:bts:size as supported.
6326 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6328 * linux-low.c (linux_low_enable_btrace): Update parameters.
6329 (linux_low_btrace_conf): New.
6330 (linux_target_ops)<to_btrace_conf>: Initialize.
6331 * server.c (current_btrace_conf): New.
6332 (handle_btrace_enable): Rename to ...
6333 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6334 to target_enable_btrace. Update comment. Update users.
6335 (handle_qxfer_btrace_conf): New.
6336 (qxfer_packets): Add btrace-conf entry.
6337 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6338 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6339 (target_ops)<read_btrace_conf>: New.
6340 (target_enable_btrace): Update parameters.
6341 (target_read_btrace_conf): New.
6343 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6345 * server.c (handle_btrace_general_set): Remove call to
6346 target_supports_btrace.
6347 (supported_btrace_packets): New.
6348 (handle_query): Call supported_btrace_packets.
6349 * target.h: include btrace-common.h.
6350 (btrace_target_info): Removed.
6351 (supports_btrace, target_supports_btrace): Update parameters.
6353 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6355 * Makefile.in (SFILES): Add common/btrace-common.c.
6356 (OBS): Add common/btrace-common.o.
6357 (btrace-common.o): Add build rules.
6358 * linux-low: Include btrace-common.h.
6359 (linux_low_read_btrace): Use struct btrace_data. Call
6360 btrace_data_init and btrace_data_fini.
6362 2015-02-06 Pedro Alves <palves@redhat.com>
6364 * thread-db.c (find_new_threads_callback): Add debug output.
6366 2015-02-04 Pedro Alves <palves@redhat.com>
6368 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6369 (resume_stopped_resumed_lwps): New function.
6370 (linux_wait_for_event_filtered): Use it.
6372 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6374 * Makefile.in (SFILES): Add linux-personality.c.
6375 (linux-personality.o): New rule.
6376 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6377 list of objects to be built.
6378 * linux-low.c: Include nat/linux-personality.h.
6379 (linux_create_inferior): Remove code to disable address space
6380 randomization (moved to ../nat/linux-personality.c). Create
6381 cleanup to disable address space randomization.
6383 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6385 * Makefile.in (posix-strerror.o): New rule.
6386 (mingw-strerror.o): Likewise.
6387 * configure: Regenerated.
6388 * configure.ac: Source file ../common/common.host. Initialize new
6389 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6391 2015-01-14 Yao Qi <yao@codesourcery.com>
6393 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6394 (ppc-linux.o): New rule.
6395 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6396 * configure.ac: AC_CHECK_FUNCS(getauxval).
6397 * config.in: Re-generated.
6398 * configure: Re-generated.
6399 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6400 ppc64_64bit_inferior_p
6402 2015-01-14 Yao Qi <yao@codesourcery.com>
6404 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6405 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6406 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6407 (PT_ORIG_R3, PT_TRAP): Likewise.
6408 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6409 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6410 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6412 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6414 * i387-fp.c (i387_cache_to_xsave): In look over
6415 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6416 zmmh_low_space field by use of zmmh_high_space.
6418 2015-01-09 Pedro Alves <palves@redhat.com>
6420 * linux-low.c (step_over_bkpt): Move higher up in the file.
6421 (handle_extended_wait): Don't store the stop_pc here.
6422 (get_stop_pc): Adjust comments and rename to ...
6423 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6424 stopped for a software breakpoint or hardware breakpoint.
6425 (thread_still_has_status_pending_p): New function.
6426 (status_pending_p_callback): Use
6427 thread_still_has_status_pending_p. If the event is no longer
6428 interesting, resume the LWP.
6429 (handle_tracepoints): Add assert.
6430 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6431 (wstatus_maybe_breakpoint): New function.
6432 (cancel_breakpoint): Delete function.
6433 (check_stopped_by_watchpoint): New function, factored out from
6434 linux_low_filter_event.
6435 (lp_status_maybe_breakpoint): Delete function.
6436 (linux_low_filter_event): Remove filter_ptid argument.
6437 Leave thread group exits pending here. Store the LWP's stop PC.
6438 Always leave events pending.
6439 (linux_wait_for_event_filtered): Pull all events out of the
6440 kernel, and leave them all pending.
6441 (count_events_callback, select_event_lwp_callback): Consider all
6443 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6444 (select_event_lwp): Only give preference to the stepping LWP in
6445 all-stop mode. Adjust comments.
6446 (ignore_event): New function.
6447 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6448 references to cancel_breakpoints. Adjust to renames. Also give
6449 equal priority to all LWPs that have had events in non-stop mode.
6450 If reporting a software breakpoint event, unadjust the LWP's PC.
6451 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6452 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6454 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6455 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6456 (linux_stopped_by_watchpoint): Adjust.
6457 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6458 * linux-low.h (enum lwp_stop_reason): New.
6459 (struct lwp_info) <stop_pc>: Adjust comment.
6460 <stopped_by_watchpoint>: Delete field.
6461 <stop_reason>: New field.
6462 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6463 * mem-break.c (software_breakpoint_inserted_here)
6464 (hardware_breakpoint_inserted_here): New function.
6465 * mem-break.h (software_breakpoint_inserted_here)
6466 (hardware_breakpoint_inserted_here): Declare.
6467 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6468 (cancel_breakpoints): Delete.
6469 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6470 (upload_fast_traceframes): Remove references to
6473 2015-01-09 Pedro Alves <palves@redhat.com>
6475 * thread-db.c (find_new_threads_callback): Ignore thread if the
6476 kernel thread ID is -1.
6478 2015-01-09 Pedro Alves <palves@redhat.com>
6480 * linux-low.c (linux_attach_fail_reason_string): Move to
6481 nat/linux-ptrace.c, and rename.
6482 (linux_attach_lwp): Update comment.
6483 (attach_proc_task_lwp_callback): New function.
6484 (linux_attach): Adjust to rename and use
6485 linux_proc_attach_tgid_threads.
6486 (linux_attach_fail_reason_string): Delete declaration.
6488 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6490 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6491 * server.c (gdbserver_version): Likewise.
6493 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6495 * remote-utils.c: Include ctype.h.
6496 (input_interrupt): Explicitly handle the case when the char
6497 received is the NUL byte. Improve the printing of non-ASCII
6500 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6502 * linux-low.c (linux_low_filter_event): Update call to
6503 linux_enable_event_reporting following the addition of
6504 a new parameter to that function.
6506 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6509 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6510 (AARCH64_FPCR_REGNO): Likewise.
6511 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6512 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6513 (aarch64_store_fpregset): Likewise.
6515 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6517 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6518 Remove FIXME comment about assumption about N.
6520 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6522 * configure.ac: If large-file support is disabled in GDBserver,
6523 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6524 * configure: Regenerate.
6526 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6528 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6529 warning upon ENODATA from ptrace.
6530 * linux-s390-low.c (s390_store_tdb): New.
6531 (s390_regsets): Add regset for NT_S390_TDB.
6533 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6535 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6536 without a fill_function.
6537 * linux-s390-low.c (s390_fill_last_break): Remove.
6538 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6539 (s390_arch_setup): Use regset's size instead of fill_function for
6542 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6544 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6545 the regset's store function when ptrace returned an error.
6546 * regcache.c (get_thread_regcache): Invalidate register cache
6547 before fetching inferior's registers.
6549 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6551 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6552 while-loop as for-loop.
6553 (regsets_store_inferior_registers): Likewise.
6555 2014-11-28 Yao Qi <yao@codesourcery.com>
6557 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6558 * config.in, configure: Re-generate.
6559 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6562 2014-11-21 Yao Qi <yao@codesourcery.com>
6564 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6565 (AC_CHECK_HEADERS): Remove malloc.h.
6566 * configure: Re-generated.
6567 * config.in: Re-generated.
6568 * server.h: Don't include alloca.h and malloc.h.
6569 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6570 Don't include malloc.h.
6572 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6574 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6575 corresponding ERRNO check in same block.
6577 2014-11-12 Pedro Alves <palves@redhat.com>
6579 * server.c (cont_thread): Update comment.
6580 (start_inferior, attach_inferior): No longer clear cont_thread.
6581 (handle_v_cont): No longer set cont_thread.
6582 (captured_main): Clear cont_thread each time a GDB connects.
6584 2014-11-12 Pedro Alves <palves@redhat.com>
6586 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6587 thread, and don't resume all threads if the Hc thread has exited.
6589 2014-11-12 Pedro Alves <palves@redhat.com>
6591 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6592 the process group instead of to a specific LWP.
6594 2014-10-15 Pedro Alves <palves@redhat.com>
6597 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6599 (arm_set_thread_context): Delete.
6600 (the_low_target): Adjust.
6601 * win32-i386-low.c (debug_registers_changed)
6602 (debug_registers_used): Delete.
6603 (update_debug_registers_callback): New function.
6604 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6605 needing to update their debug registers.
6606 (win32_get_current_dr): New function.
6607 (x86_dr_low_get_addr, x86_dr_low_get_control)
6608 (x86_dr_low_get_status): Fetch the debug register from the thread
6610 (i386_initial_stuff): Adjust.
6611 (i386_get_thread_context): Remove current_event parameter. Don't
6612 clear debug_registers_changed nor copy DR values to
6614 (i386_set_thread_context): Delete.
6615 (i386_prepare_to_resume): New function.
6616 (i386_thread_added): Mark the thread as needing to update irs
6618 (the_low_target): Remove i386_set_thread_context and install
6619 i386_prepare_to_resume.
6620 * win32-low.c (win32_get_thread_context): Adjust.
6621 (win32_set_thread_context): Use SetThreadContext
6623 (win32_prepare_to_resume): New function.
6624 (win32_require_context): New function, factored out from ...
6625 (thread_rec): ... this.
6626 (continue_one_thread): Call win32_prepare_to_resume on each thread
6627 we're about to continue.
6628 (win32_resume): Call win32_prepare_to_resume on the event thread.
6629 * win32-low.h (struct win32_thread_info)
6630 <debug_registers_changed>: New field.
6631 (struct win32_target_ops): Change prototype of set_thread_context,
6632 delete set_thread_context and add prepare_to_resume.
6633 (win32_require_context): New declaration.
6635 2014-10-08 Gary Benson <gbenson@redhat.com>
6637 * server.h: Do not include common-exceptions.h.
6639 2014-10-08 Gary Benson <gbenson@redhat.com>
6641 * server.h: Do not include cleanups.h.
6643 2014-09-30 James Hogan <james.hogan@imgtec.com>
6645 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6648 2014-09-23 Yao Qi <yao@codesourcery.com>
6650 * linux-low.c (lp_status_maybe_breakpoint): New function.
6651 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6652 (count_events_callback): Likewise.
6653 (select_event_lwp_callback): Likewise.
6654 (cancel_breakpoints_callback): Likewise.
6656 2014-09-19 Don Breazeal <donb@codesourcery.com>
6658 * linux-low.c (handle_extended_wait): Call
6659 linux_ptrace_get_extended_event.
6660 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6661 linux_is_extended_waitstatus.
6663 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6665 * Makefile.in (CPPFLAGS): Define.
6666 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6667 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6669 2014-09-16 Gary Benson <gbenson@redhat.com>
6671 * inferiors.h (current_inferior): Renamed as...
6672 (current_thread): New variable. All uses updated.
6673 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6674 (maybe_move_out_of_jump_pad): Likewise.
6675 (cancel_breakpoint): Likewise.
6676 (linux_low_filter_event): Likewise.
6677 (wait_for_sigstop): Likewise.
6678 (linux_resume_one_lwp): Likewise.
6679 (need_step_over_p): Likewise.
6680 (start_step_over): Likewise.
6681 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6682 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6683 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6684 and save_inferior as saved_thread.
6685 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6687 (regcache_invalidate_thread): Likewise.
6688 * remote-utils.c (prepare_resume_reply): Likewise.
6689 * thread-db.c (thread_db_get_tls_address): Likewise.
6690 (disable_thread_event_reporting): Likewise.
6691 (remove_thread_event_breakpoints): Likewise.
6692 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6694 * target.h (set_desired_inferior): Renamed as...
6695 (set_desired_thread): New declaration. All uses updated.
6696 * server.c (myresume): Updated comment to reference thread instead
6698 (handle_serial_event): Likewise.
6699 (handle_target_event): Likewise.
6701 2014-09-12 Tom Tromey <tromey@redhat.com>
6702 Gary Benson <gbenson@redhat.com>
6704 * regcache.h: Include common-regcache.h.
6705 (regcache_read_pc): Don't declare.
6706 * regcache.c (get_thread_regcache_for_ptid): New function.
6708 2014-09-11 Tom Tromey <tromey@redhat.com>
6709 Gary Benson <gbenson@redhat.com>
6711 * symbol.c: New file.
6712 * Makefile.in (SFILES): Add symbol.c.
6713 (OBS): Add symbol.o.
6715 2014-09-11 Gary Benson <gbenson@redhat.com>
6717 * target.c (target_stop_ptid, target_continue_ptid): New
6720 2014-09-11 Tom Tromey <tromey@redhat.com>
6721 Gary Benson <gbenson@redhat.com>
6723 * target.h: Include target/target.h.
6724 * target.c (target_read_memory, target_read_uint32)
6725 (target_write_memory): New functions.
6727 2014-09-11 Gary Benson <gbenson@redhat.com>
6729 * server.h (debug_hw_points): Don't declare.
6730 * server.c (debug_hw_points): Don't define. Replace all uses
6731 with show_debug_regs.
6732 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6733 all uses with show_debug_regs.
6735 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6737 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6738 endianness into account.
6739 (ppc_supply_ptrace_register): Likewise.
6741 2014-09-03 James Hogan <james.hogan@imgtec.com>
6743 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6744 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6746 2014-09-03 Gary Benson <gbenson@redhat.com>
6748 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6749 ALL_DEBUG_ADDRESS_REGISTERS.
6751 2014-09-02 Gary Benson <gbenson@redhat.com>
6753 * i386-low.h: Renamed as...
6754 * x86-low.h: New file. All type, function and variable name
6755 prefixes changed from "i386_" to "x86_". All references updated.
6756 * i386-low.c: Renamed as...
6757 * x86-low.c: New file. All type, function and variable name
6758 prefixes changed from "i386_" to "x86_". All references updated.
6760 2014-09-02 Gary Benson <gbenson@redhat.com>
6762 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6763 (x86_linux_new_thread): Likewise.
6765 2014-08-29 Gary Benson <gbenson@redhat.com>
6767 * server.h (setjmp.h): Do not include.
6768 (toplevel): Do not declare.
6769 (common-exceptions.h): Include.
6770 (cleanups.h): Likewise.
6771 * server.c (toplevel): Do not define.
6772 (exit_code): New static global.
6773 (detach_or_kill_for_exit_cleanup): New function.
6774 (main): New function. Original main renamed to...
6775 (captured_main): New function.
6776 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6778 2014-08-29 Gary Benson <gbenson@redhat.com>
6780 * Makefile.in (SFILES): Add common/common-exceptions.c.
6781 (OBS): Add common-exceptions.o.
6782 (common-exceptions.o): New rule.
6783 * utils.c (prepare_to_throw_exception): New function.
6785 2014-08-29 Gary Benson <gbenson@redhat.com>
6787 * config.in: Regenerate.
6788 * configure: Likewise.
6790 2014-08-29 Gary Benson <gbenson@redhat.com>
6792 * Makefile.in (SFILES): Add common/cleanups.c.
6794 (cleanups.o): New rule.
6796 2014-08-29 Gary Benson <gbenson@redhat.com>
6798 * utils.c (internal_vwarning): New function.
6800 2014-08-28 Gary Benson <gbenson@redhat.com>
6802 * utils.h (fatal): Remove declaration.
6803 * utils.c (fatal): Remove function.
6805 2014-08-28 Gary Benson <gbenson@redhat.com>
6807 * tracepoint.c (gdb_agent_init): Replace fatal with
6809 (initialize_tracepoint): Likewise.
6811 2014-08-28 Gary Benson <gbenson@redhat.com>
6813 * remote-utils.c (remote_prepare): Replace fatal with error.
6815 2014-08-28 Gary Benson <gbenson@redhat.com>
6817 * linux-low.c (linux_async): Replace fatal with warning.
6819 (linux_start_non_stop): Return -1 if linux_async failed.
6821 2014-08-28 Gary Benson <gbenson@redhat.com>
6823 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6825 (i386_dr_low_get_addr): Remove vague comment.
6826 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6829 2014-08-28 Gary Benson <gbenson@redhat.com>
6831 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6832 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6834 (linux_resume_one_lwp): Likewise.
6835 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6837 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6838 with internal_error.
6839 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6840 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6841 (find_register_by_name): Replace fatal with internal_error.
6842 (find_regno): Likewise.
6843 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6844 * thread-db.c (thread_db_create_event): Likewise.
6845 (thread_db_load_search): Likewise.
6846 (try_thread_db_load_1): Likewise.
6847 * tracepoint.c (get_jump_space_head): Replace fatal with
6849 (claim_trampoline_space): Likewise.
6850 (have_fast_tracepoint_trampoline_buffer): Likewise.
6851 (cmd_qtstart): Likewise.
6852 (stop_tracing): Likewise.
6853 (fast_tracepoint_collecting): Likewise.
6854 (target_malloc): Likewise.
6855 (download_tracepoint): Likewise.
6856 (download_trace_state_variables): Replace check with gdb_assert.
6857 (upload_fast_traceframes): Replace fatal with internal_error.
6859 2014-08-19 Tom Tromey <tromey@redhat.com>
6860 Gary Benson <gbenson@redhat.com>
6862 * Makefile.in (SFILES): Add common/common-debug.c.
6863 (OBS): Add common-debug.o.
6864 (common-debug.o): New rule.
6865 * debug.h (debug_printf): Don't declare.
6866 * debug.c (debug_printf): Renamed and rewritten as...
6867 (debug_vprintf): New function.
6869 2014-08-19 Gary Benson <gbenson@redhat.com>
6871 * utils.h: Do not include print-utils.h.
6873 2014-08-19 Tom Tromey <tromey@redhat.com>
6874 Gary Benson <gbenson@redhat.com>
6876 * server.h: Add static assertion.
6877 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6879 2014-08-19 Tom Tromey <tromey@redhat.com>
6880 Gary Benson <gbenson@redhat.com>
6882 * Makefile.in (SFILES): Add common/errors.c.
6883 (OBS): Add errors.o.
6884 (IPA_OBS): Add errors-ipa.o.
6885 (errors.o): New rule.
6886 (errors-ipa.o): Likewise.
6887 * utils.h (perror_with_name, error, warning): Don't declare.
6888 * utils.c (warning): Renamed and rewritten as...
6889 (vwarning): New function.
6890 (error): Renamed and rewritten as...
6891 (verror): New function.
6892 (internal_error): Renamed and rewritten as...
6893 (internal_verror): New function.
6895 2014-08-07 Gary Benson <gbenson@redhat.com>
6897 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6898 * configure: Regenerate.
6899 * config.in: Likewise.
6900 * server.h: Do not include errno.h.
6901 * event-loop.c: Likewise.
6902 * hostio-errno.c: Likewise.
6903 * linux-low.c: Likewise.
6904 * remote-utils.c: Likewise.
6905 * spu-low.c: Likewise.
6906 * utils.c: Likewise.
6907 * gdbreplay.c: Unconditionally include errno.h.
6909 2014-08-07 Gary Benson <gbenson@redhat.com>
6911 * server.h: Do not include string.h.
6912 * event-loop.c: Likewise.
6913 * linux-low.c: Likewise.
6914 * regcache.c: Likewise.
6915 * remote-utils.c: Likewise.
6916 * spu-low.c: Likewise.
6917 * utils.c: Likewise.
6919 2014-08-07 Gary Benson <gbenson@redhat.com>
6921 * server.h: Do not include gdb_assert.h.
6923 2014-08-07 Gary Benson <gbenson@redhat.com>
6925 * server.h: Do not include common-utils.h.
6927 2014-08-07 Gary Benson <gbenson@redhat.com>
6929 * server.h: Do not include ptid.h.
6930 * notif.h: Likewise.
6932 2014-08-07 Gary Benson <gbenson@redhat.com>
6934 * server.h: Do not include gdb_locale.h.
6936 2014-08-07 Gary Benson <gbenson@redhat.com>
6938 * server.h: Do not include gdb/signals.h.
6939 * win32-low.c: Likewise.
6941 2014-08-07 Gary Benson <gbenson@redhat.com>
6943 * server.h: Do not include pathmax.h.
6945 2014-08-07 Gary Benson <gbenson@redhat.com>
6947 * server.h: Do not include libiberty.h.
6948 * linux-bfin-low.c: Likewise.
6950 2014-08-07 Gary Benson <gbenson@redhat.com>
6952 * server.h: Do not include ansidecl.h.
6954 2014-08-07 Gary Benson <gbenson@redhat.com>
6956 * linux-x86-low.c: Do not include stddef.h.
6957 * lynx-ppc-low.c: Likewise.
6958 * tracepoint.c: Likewise.
6960 2014-08-07 Gary Benson <gbenson@redhat.com>
6962 * server.h: Do not include stdarg.h.
6963 * nto-low.c: Likewise.
6965 2014-08-07 Gary Benson <gbenson@redhat.com>
6967 * server.h: Do not include stdlib.h.
6968 * inferiors.c: Likewise.
6969 * linux-low.c: Likewise.
6970 * regcache.c: Likewise.
6971 * spu-low.c: Likewise.
6972 * tracepoint.c: Likewise.
6973 * utils.c: Likewise.
6975 2014-08-07 Gary Benson <gbenson@redhat.com>
6977 * server.h: Do not include stdio.h.
6978 * linux-low.c: Likewise.
6979 * remote-utils.c: Likewise.
6980 * spu-low.c: Likewise.
6981 * utils.c: Likewise.
6982 * wincecompat.c: Likewise.
6984 2014-08-06 Gary Benson <gbenson@redhat.com>
6986 * regcache.c (init_register_cache): Move conditionals inside if.
6988 2014-08-06 Gary Benson <gbenson@redhat.com>
6990 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6992 2014-07-31 Gary Benson <gbenson@redhat.com>
6994 * ax.h: Do not include server.h.
6995 * gdbthread.h: Likewise.
6996 * lynx-low.h: Likewise.
6997 * notif.h: Likewise.
6999 2014-07-30 Gary Benson <gbenson@redhat.com>
7001 * server.h: Include common-defs.h.
7002 Do not include config.h or build-gnulib-gdbserver/config.h.
7004 2014-07-30 Gary Benson <gbenson@redhat.com>
7006 * hostio-errno.c: Move server.h to top of includes list.
7007 * inferiors.c: Likewise.
7008 * linux-x86-low.c: Likewise.
7009 * notif.c: Include server.h.
7011 2014-07-24 Tom Tromey <tromey@redhat.com>
7012 Gary Benson <gbenson@redhat.com>
7014 * server.h (CORE_ADDR): Now unsigned.
7016 2014-07-16 Pedro Alves <palves@redhat.com>
7018 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7020 2014-07-15 Pedro Alves <palves@redhat.com>
7022 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7025 2014-07-11 Pedro Alves <palves@redhat.com>
7027 * linux-low.c (kill_wait_lwp): New function, based on
7028 kill_one_lwp_callback, but use my_waitpid directly.
7029 (kill_one_lwp_callback, linux_kill): Use it.
7031 2014-06-23 Pedro Alves <palves@redhat.com>
7033 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7034 before setting DR0..DR3.
7036 2014-06-20 Gary Benson <gbenson@redhat.com>
7038 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7039 * configure: Regenerated.
7040 * config.in: Likewise.
7042 2014-06-20 Gary Benson <gbenson@redhat.com>
7044 * Makefile.in (SFILES): Update locations for files moved
7046 (object file files): Reordered.
7048 2014-06-20 Gary Benson <gbenson@redhat.com>
7050 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7051 (i386_dr_low_set_addr): Likewise.
7052 (i386_dr_low_get_addr): Likewise.
7053 (i386_dr_low_can_set_control): Likewise.
7054 (i386_dr_low_set_control): Likewise.
7055 (i386_dr_low_get_control): Likewise.
7056 (i386_dr_low_get_status): Likewise.
7057 (i386_get_debug_register_length): Likewise.
7058 * linux-x86-low.c (i386_dr_low_set_addr):
7059 Changed signature. Made static.
7060 (i386_dr_low_get_addr): Likewise.
7061 (i386_dr_low_set_control): Likewise.
7062 (i386_dr_low_get_control): Likewise.
7063 (i386_dr_low_get_status): Likewise.
7064 (i386_dr_low): New global variable.
7065 * win32-i386-low.c (i386_dr_low_set_addr):
7066 Changed signature. Made static.
7067 (i386_dr_low_get_addr): Likewise.
7068 (i386_dr_low_set_control): Likewise.
7069 (i386_dr_low_get_control): Likewise.
7070 (i386_dr_low_get_status): Likewise.
7071 (i386_dr_low): New global variable.
7073 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7075 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7076 * Makefile.in (AR, AR_FLAGS): Define.
7077 * configure: Regenerate.
7079 2014-06-19 Gary Benson <gbenson@redhat.com>
7081 * Makefile.in (i386-dregs.o): New rule.
7082 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7083 * i386-low.c (target.h): Remove include.
7084 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7085 (DR_CONTROL_SHIFT): Likewise.
7086 (DR_CONTROL_SIZE): Likewise.
7087 (DR_RW_EXECUTE): Likewise.
7088 (DR_RW_WRITE): Likewise.
7089 (DR_RW_READ): Likewise.
7090 (DR_RW_IORW): Likewise.
7091 (DR_LEN_1): Likewise.
7092 (DR_LEN_2): Likewise.
7093 (DR_LEN_4): Likewise.
7094 (DR_LEN_8): Likewise.
7095 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7096 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7097 (DR_ENABLE_SIZE): Likewise.
7098 (DR_LOCAL_SLOWDOWN): Likewise.
7099 (DR_GLOBAL_SLOWDOWN): Likewise.
7100 (DR_CONTROL_RESERVED): Likewise.
7101 (I386_DR_CONTROL_MASK): Likewise.
7102 (I386_DR_VACANT): Likewise.
7103 (I386_DR_LOCAL_ENABLE): Likewise.
7104 (I386_DR_GLOBAL_ENABLE): Likewise.
7105 (I386_DR_DISABLE): Likewise.
7106 (I386_DR_SET_RW_LEN): Likewise.
7107 (I386_DR_GET_RW_LEN): Likewise.
7108 (I386_DR_WATCH_HIT): Likewise.
7109 (i386_wp_op_t): Likewise.
7110 (i386_show_dr): Likewise.
7111 (i386_length_and_rw_bits): Likewise.
7112 (i386_insert_aligned_watchpoint): Likewise.
7113 (i386_remove_aligned_watchpoint): Likewise.
7114 (i386_handle_nonaligned_watchpoint): Likewise.
7115 i386_update_inferior_debug_regs(): Likewise.
7116 (i386_dr_insert_watchpoint): Likewise.
7117 (i386_dr_remove_watchpoint): Likewise.
7118 (i386_dr_region_ok_for_watchpoint): Likewise.
7119 (i386_dr_stopped_data_address): Likewise.
7120 (i386_dr_stopped_by_watchpoint): Likewise.
7122 2014-06-19 Gary Benson <gbenson@redhat.com>
7124 * i386-low.c (i386_dr_show): Renamed to
7125 i386_show_dr and made static. All uses updated.
7126 (i386_dr_length_and_rw_bits): Renamed to
7127 i386_length_and_rw_bits and made static.
7129 (i386_dr_insert_aligned_watchpoint): Renamed to
7130 i386_insert_aligned_watchpoint and made static.
7132 (i386_dr_remove_aligned_watchpoint): Renamed to
7133 i386_remove_aligned_watchpoint and made static.
7135 (i386_dr_update_inferior_debug_regs): Renamed to
7136 i386_update_inferior_debug_regs and made static.
7139 2014-06-18 Gary Benson <gbenson@redhat.com>
7141 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7142 (i386_dr_low_can_set_control): Likewise.
7143 (i386_get_debug_register_length): Likewise.
7144 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7145 (i386_dr_low_can_set_control): Likewise.
7146 (i386_get_debug_register_length): Likewise.
7148 2014-06-17 Gary Benson <gbenson@redhat.com>
7150 * i386-low.h (i386-dregs.h): New include.
7151 (DR_FIRSTADDR): Now in i386-dregs.h.
7152 (DR_LASTADDR): Likewise.
7153 (DR_NADDR): Likewise.
7154 (DR_STATUS): Likewise.
7155 (DR_CONTROL): Likewise.
7156 (i386_debug_reg_state): Likewise.
7157 (i386_dr_insert_watchpoint): Likewise.
7158 (i386_dr_remove_watchpoint): Likewise.
7159 (i386_dr_region_ok_for_watchpoint): Likewise.
7160 (i386_dr_stopped_data_address): Likewise.
7161 (i386_dr_stopped_by_watchpoint): Likewise.
7162 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7164 2014-06-18 Gary Benson <gbenson@redhat.com>
7166 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7167 i386_dr_insert_watchpoint.
7168 (i386_low_remove_watchpoint): Renamed to
7169 i386_dr_remove_watchpoint.
7170 (i386_low_region_ok_for_watchpoint): Renamed to
7171 i386_dr_region_ok_for_watchpoint.
7172 (i386_low_stopped_data_address): Renamed to
7173 i386_dr_stopped_data_address.
7174 (i386_low_stopped_by_watchpoint): Renamed to
7175 i386_dr_stopped_by_watchpoint.
7176 * i386-low.c (i386_show_dr): Renamed to
7177 i386_dr_show and made nonstatic. All uses updated.
7178 (i386_length_and_rw_bits): Renamed to
7179 i386_dr_length_and_rw_bits and made nonstatic.
7181 (i386_insert_aligned_watchpoint): Renamed to
7182 i386_dr_insert_aligned_watchpoint and made nonstatic.
7184 (i386_remove_aligned_watchpoint): Renamed to
7185 i386_dr_remove_aligned_watchpoint and made nonstatic.
7187 (i386_update_inferior_debug_regs): Renamed to
7188 i386_dr_update_inferior_debug_regs and made nonstatic.
7190 (i386_low_insert_watchpoint): Renamed to
7191 i386_dr_insert_watchpoint. All uses updated.
7192 (i386_low_remove_watchpoint): Renamed to
7193 i386_dr_remove_watchpoint. All uses updated.
7194 (i386_low_region_ok_for_watchpoint): Renamed to
7195 i386_dr_region_ok_for_watchpoint. All uses updated.
7196 (i386_low_stopped_data_address): Renamed to
7197 i386_dr_stopped_data_address. All uses updated.
7198 (i386_low_stopped_by_watchpoint): Renamed to
7199 i386_dr_stopped_by_watchpoint. All uses updated.
7201 2014-06-18 Gary Benson <gbenson@redhat.com>
7203 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7204 (i386_dr_low_can_set_control): Likewise.
7205 (i386_insert_aligned_watchpoint): New check.
7207 2014-06-18 Gary Benson <gbenson@redhat.com>
7209 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7212 2014-06-18 Gary Benson <gbenson@redhat.com>
7214 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7215 instead of fatal and error.
7216 (i386_handle_nonaligned_watchpoint): Likewise.
7218 2014-06-18 Gary Benson <gbenson@redhat.com>
7220 * i386-low.c (i386_get_debug_register_length): New macro.
7221 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7222 (i386_show_dr): Use debug_printf instead of fprintf. Use
7223 phex to format values.
7225 2014-06-18 Gary Benson <gbenson@redhat.com>
7227 * i386-low.h: Comment changes.
7228 * i386-low.c: Likewise.
7230 2014-06-18 Gary Benson <gbenson@redhat.com>
7232 * i386-low.c: Whitespace changes.
7234 2014-06-12 Tom Tromey <tromey@redhat.com>
7236 * utils.c (freeargv): Remove.
7238 2014-06-12 Tom Tromey <tromey@redhat.com>
7240 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7241 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7242 (parse_debug_format_options): Likewise.
7243 (gdbserver_usage): Likewise.
7244 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7245 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7246 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7248 ($(LIBGNU)): Depend on libiberty.
7249 (all-lib): Recurse into all subdirs.
7250 (install-only): Invoke "install" target in subdirs.
7251 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7253 * configure: Rebuild.
7254 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7255 for vasprintf, vsnprintf, or gettimeofday.
7256 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7259 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7261 * development.sh: Delete.
7262 * Makefile.in (config.status): Adjust dependency on development.sh.
7263 * configure.ac: Adjust development.sh source call.
7264 * configure: Regenerate.
7266 2014-06-02 Pedro Alves <palves@redhat.com>
7268 * ax.c (gdb_free_agent_expr): New function.
7269 * ax.h (gdb_free_agent_expr): New declaration.
7270 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7272 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7274 (clear_breakpoint_conditions_and_commands): New function.
7275 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7276 (clear_breakpoint_conditions_and_commands): New declaration.
7278 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7280 * linux-aarch64-low.c (asm/ptrace.h): Include.
7282 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7284 Fix TLS access for -static -pthread.
7285 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7286 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7287 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7289 2014-05-20 Pedro Alves <palves@redhat.com>
7291 * linux-aarch64-low.c (aarch64_insert_point)
7292 (aarch64_remove_point): No longer check whether the type is
7293 supported here. Adjust to new interface.
7294 (the_low_target): Install aarch64_supports_z_point_type as
7295 supports_z_point_type method.
7296 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7297 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7298 instead of a Z packet char. Adjust.
7299 (arm_supports_z_point_type): New function.
7300 (arm_insert_point, arm_remove_point): Adjust to new interface.
7301 (the_low_target): Install arm_supports_z_point_type.
7302 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7303 (cris_insert_point, cris_remove_point): Adjust to new interface.
7304 Don't check whether the type is supported here.
7305 (the_low_target): Install cris_supports_z_point_type.
7306 * linux-low.c (linux_supports_z_point_type): New function.
7307 (linux_insert_point, linux_remove_point): Adjust to new interface.
7308 * linux-low.h (struct linux_target_ops) <insert_point,
7309 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7310 raw_breakpoint pointer parameter.
7311 <supports_z_point_type>: New method.
7312 * linux-mips-low.c (mips_supports_z_point_type): New function.
7313 (mips_insert_point, mips_remove_point): Adjust to new interface.
7314 Use mips_supports_z_point_type.
7315 (the_low_target): Install mips_supports_z_point_type.
7316 * linux-ppc-low.c (the_low_target): Install NULL as
7317 supports_z_point_type method.
7318 * linux-s390-low.c (the_low_target): Install NULL as
7319 supports_z_point_type method.
7320 * linux-sparc-low.c (the_low_target): Install NULL as
7321 supports_z_point_type method.
7322 * linux-x86-low.c (x86_supports_z_point_type): New function.
7323 (x86_insert_point): Adjust to new insert_point interface. Use
7324 insert_memory_breakpoint. Adjust to new
7325 i386_low_insert_watchpoint interface.
7326 (x86_remove_point): Adjust to remove_point interface. Use
7327 remove_memory_breakpoint. Adjust to new
7328 i386_low_remove_watchpoint interface.
7329 (the_low_target): Install x86_supports_z_point_type.
7330 * lynx-low.c (lynx_target_ops): Install NULL as
7331 supports_z_point_type callback.
7332 * nto-low.c (nto_supports_z_point_type): New.
7333 (nto_insert_point, nto_remove_point): Adjust to new interface.
7334 (nto_target_ops): Install nto_supports_z_point_type.
7335 * mem-break.c: Adjust intro comment.
7336 (struct raw_breakpoint) <raw_type, size>: New fields.
7337 <inserted>: Update comment.
7338 <shlib_disabled>: Delete field.
7339 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7340 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7341 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7342 (raw_bkpt_type_to_target_hw_bp_type): New function.
7343 (find_enabled_raw_code_breakpoint_at): New function.
7344 (find_raw_breakpoint_at): New type and size parameters. Use them.
7345 (insert_memory_breakpoint): New function, based off
7346 set_raw_breakpoint_at.
7347 (remove_memory_breakpoint): New function.
7348 (set_raw_breakpoint_at): Reimplement.
7349 (set_breakpoint): New, based on set_breakpoint_at.
7350 (set_breakpoint_at): Reimplement.
7351 (delete_raw_breakpoint): Go through the_target->remove_point
7352 instead of assuming memory breakpoints.
7353 (find_gdb_breakpoint_at): Delete.
7354 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7355 (find_gdb_breakpoint): New function.
7356 (set_gdb_breakpoint_at): Delete.
7357 (z_type_supported): New function.
7358 (set_gdb_breakpoint_1): New function, loosely based off
7359 set_gdb_breakpoint_at.
7360 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7361 (delete_gdb_breakpoint_at): Delete.
7362 (delete_gdb_breakpoint_1): New function, loosely based off
7363 delete_gdb_breakpoint_at.
7364 (delete_gdb_breakpoint): New function.
7365 (clear_gdb_breakpoint_conditions): Rename to ...
7366 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7368 (add_condition_to_breakpoint): Make static.
7369 (add_breakpoint_condition): Take a struct breakpoint pointer
7370 instead of an address. Adjust.
7371 (gdb_condition_true_at_breakpoint): Rename to ...
7372 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7374 (gdb_condition_true_at_breakpoint): Reimplement.
7375 (add_breakpoint_commands): Take a struct breakpoint pointer
7376 instead of an address. Adjust.
7377 (gdb_no_commands_at_breakpoint): Rename to ...
7378 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7379 parameter. Return true if no breakpoint was found. Change debug
7381 (gdb_no_commands_at_breakpoint): Reimplement.
7382 (run_breakpoint_commands): Rename to ...
7383 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7384 and change return type to boolean.
7385 (run_breakpoint_commands): New function.
7386 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7387 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7388 breakpoint. Go through the_target->remove_point instead of
7389 assuming memory breakpoint.
7390 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7391 software and hardware breakpoints.
7392 (reinsert_raw_breakpoint): Go through the_target->insert_point
7393 instead of assuming memory breakpoint.
7394 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7395 software and hardware breakpoints.
7396 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7397 Check both software and hardware breakpoints.
7398 (validate_inserted_breakpoint): Assert the breakpoint is a
7399 software breakpoint. Set the inserted flag to -1 instead of
7400 setting shlib_disabled.
7401 (delete_disabled_breakpoints): Adjust.
7402 (validate_breakpoints): Only validate software breakpoints.
7403 Adjust to inserted flag change.
7404 (check_mem_read, check_mem_write): Skip breakpoint types other
7405 than software breakpoints. Adjust to inserted flag change.
7406 * mem-break.h (enum raw_bkpt_type): New enum.
7407 (raw_breakpoint, struct process_info): Forward declare.
7408 (Z_packet_to_target_hw_bp_type): Delete declaration.
7409 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7410 (set_gdb_breakpoint, delete_gdb_breakpoint)
7411 (clear_breakpoint_conditions): New declarations.
7412 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7413 (breakpoint_inserted_here): Update comment.
7414 (add_breakpoint_condition, add_breakpoint_commands): Replace
7415 address parameter with a breakpoint pointer parameter.
7416 (gdb_breakpoint_here): Update comment.
7417 (delete_gdb_breakpoint_at): Delete.
7418 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7419 * server.c (process_point_options): Take a struct breakpoint
7420 pointer instead of an address. Adjust.
7421 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7422 delete_gdb_breakpoint.
7423 * spu-low.c (spu_target_ops): Install NULL as
7424 supports_z_point_type method.
7425 * target.h: Include mem-break.h.
7426 (struct target_ops) <prepare_to_access_memory>: Update comment.
7427 <supports_z_point_type>: New field.
7428 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7429 instead of a char. Also take a raw breakpoint pointer.
7430 * win32-arm-low.c (the_low_target): Install NULL as
7431 supports_z_point_type.
7432 * win32-i386-low.c (i386_supports_z_point_type): New function.
7433 (i386_insert_point, i386_remove_point): Adjust to new interface.
7434 (the_low_target): Install i386_supports_z_point_type.
7435 * win32-low.c (win32_supports_z_point_type): New function.
7436 (win32_insert_point, win32_remove_point): Adjust to new interface.
7437 (win32_target_ops): Install win32_supports_z_point_type.
7438 * win32-low.h (struct win32_target_ops):
7439 <supports_z_point_type>: New method.
7440 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7441 instead of a char. Also take a raw breakpoint pointer.
7443 2014-05-20 Pedro Alves <palves@redhat.com>
7445 * mem-break.h: Include break-common.h.
7446 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7447 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7448 (Z_packet_to_target_hw_bp_type): New declaration.
7449 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7450 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7451 (Z_PACKET_ACCESS_WP): Delete macros.
7452 (Z_packet_to_hw_type): Delete function.
7453 * i386-low.h: Don't include break-common.h here.
7454 (Z_packet_to_hw_type): Delete declaration.
7455 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7456 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7457 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7458 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7459 * linux-aarch64-low.c: Don't include break-common.h here.
7460 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7461 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7462 (Z_packet_to_target_hw_bp_type): Delete function.
7463 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7465 (mips_insert_point, mips_remove_point): Use
7466 Z_packet_to_target_hw_bp_type.
7468 2014-05-20 Pedro Alves <palves@redhat.com>
7470 * linux-aarch64-low.c: Include break-common.h.
7471 (enum target_point_type): Delete.
7472 (Z_packet_to_point_type): Rename to ...
7473 (Z_packet_to_target_hw_bp_type): ... this, and return a
7474 target_hw_bp_type instead.
7475 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7476 instead of an enum target_point_type.
7477 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7479 (aarch64_dr_state_insert_one_point)
7480 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7481 (aarch64_handle_aligned_watchpoint)
7482 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7483 Take an enum target_hw_bp_type instead of an enum
7485 (aarch64_supports_z_point_type): New function.
7486 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7487 use Z_packet_to_target_hw_bp_type.
7489 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7491 * configure.ac: Only use -Werror by default when DEVELOPMENT
7493 * configure: Regenerate.
7495 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7497 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7498 * linux-x86-low.c (X86_64_USER_REGS): New.
7499 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7501 2014-04-28 Yao Qi <yao@codesourcery.com>
7503 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7506 2014-04-25 Pedro Alves <palves@redhat.com>
7509 * linux-low.c (linux_attach_fail_reason_string): New function.
7510 (linux_attach_lwp): Delete.
7511 (linux_attach_lwp_1): Rename to ...
7512 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7513 argument. Remove "initial" parameter. Return int instead of
7514 void. Don't error or warn here.
7515 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7516 failure to attach to the tgid. Call warning when failing to
7518 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7519 argument. Remove "initial" parameter. Return int instead of
7520 void. Don't error or warn here.
7521 (linux_attach_fail_reason_string): New declaration.
7522 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7523 interface change. Use linux_attach_fail_reason_string.
7525 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7526 Walfred Tedeschi <walfred.tedeschi@intel.com>
7528 * Makefile.in: Added rules to handle new files
7529 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7530 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7531 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7532 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7533 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7534 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7536 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7537 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7538 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7539 i386/x32-avx512.xml.
7540 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7541 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7542 i386/x32-avx512-linux.xml.
7543 * i387-fp.c (num_avx512_k_registers): New constant for number
7545 (num_avx512_zmmh_low_registers): New constant for number of
7546 lower ZMM registers (0-15).
7547 (num_avx512_zmmh_high_registers): New constant for number of
7548 higher ZMM registers (16-31).
7549 (num_avx512_ymmh_registers): New contant for number of higher
7550 YMM registers (ymm16-31 added by avx521 on x86_64).
7551 (num_avx512_xmm_registers): New constant for number of higher
7552 XMM registers (xmm16-31 added by AVX512 on x86_64).
7553 (struct i387_xsave): Add space for AVX512 registers.
7554 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7555 Add code to handle AVX512 registers.
7556 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7557 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7558 prototypei from generated file.
7559 (tdesc_amd64_avx512_linux): Likewise.
7560 (init_registers_x32_avx512_linux): Likewise.
7561 (tdesc_x32_avx512_linux): Likewise.
7562 (init_registers_i386_avx512_linux): Likewise.
7563 (tdesc_i386_avx512_linux): Likewise.
7564 (x86_64_regmap): Add AVX512 registers.
7565 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7567 (initialize_low_arch): Add code to initialize AVX512 registers.
7569 2014-04-23 Pedro Alves <palves@redhat.com>
7571 * mem-break.c (find_gdb_breakpoint_at): Make static.
7572 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7574 2014-04-23 Pedro Alves <palves@redhat.com>
7576 * i386-low.c: Don't include break-common.h here.
7577 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7578 prototype to take target_hw_bp_type as argument instead of a Z
7580 * i386-low.h: Include break-common.h here.
7581 (Z_packet_to_hw_type): Declare.
7582 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7584 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7585 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7586 (x86_remove_point): Convert the packet number to a
7587 target_hw_bp_type before calling i386_low_remove_watchpoint.
7588 * win32-i386-low.c (i386_insert_point): Convert the packet number
7589 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7590 (i386_remove_point): Convert the packet number to a
7591 target_hw_bp_type before calling i386_low_remove_watchpoint.
7593 2014-04-23 Pedro Alves <palves@redhat.com>
7595 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7597 2014-04-10 Pedro Alves <palves@redhat.com>
7599 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7600 Check if the condition or command is NULL before checking if the
7601 breakpoint is known. On success, return true.
7602 * mem-break.h (add_breakpoint_condition): Document return.
7603 (add_breakpoint_commands): Add describing comment.
7604 * server.c (skip_to_semicolon): New function.
7605 (process_point_options): Use it.
7607 2014-04-09 Pedro Alves <palves@redhat.com>
7609 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7612 2014-02-27 Pedro Alves <palves@redhat.com>
7615 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7617 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7619 (last_thread_of_process_p): Take a PID argument instead of a
7621 (linux_wait_for_lwp): Delete.
7622 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7624 (linux_low_filter_event): New function, party factored out from
7625 linux_wait_for_event.
7626 (linux_wait_for_event): Rename to ...
7627 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7628 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7629 sigsuspend. Check for zombie leaders.
7630 (linux_wait_for_event): Reimplement as wrapper around
7631 linux_wait_for_event_filtered.
7632 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7633 a normal or signal exit is seen, it's the whole process exiting.
7634 (wait_for_sigstop): No longer a for_each_inferior callback.
7635 Rewrite on top of linux_wait_for_event_filtered.
7636 (stop_all_lwps): Call wait_for_sigstop directly.
7637 * server.c (resume, handle_target_event): Handle
7638 TARGET_WAITKIND_NO_RESUMED.
7640 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7642 * win32-low.c (psapi_get_dll_name,
7643 * win32_CreateToolhelp32Snapshot): Delete.
7644 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7645 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7647 (handle_load_dll): Add function description.
7648 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7650 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7652 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7654 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7655 base address when calling win32_add_one_solib.
7656 (handle_load_dll): Delete local variable load_addr.
7657 Remove 0x1000 offset applied to DLL base address when calling
7658 win32_add_one_solib.
7659 (handle_unload_dll): Add comment.
7661 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7663 * win32-low.c (win32_add_all_dlls): Renames
7664 win32_ensure_ntdll_loaded. Rewrite function documentation.
7665 Adjust implementation to always load all DLLs.
7666 Add 0x1000 offset to DLL base address when calling
7667 win32_add_one_solib.
7668 (child_initialization_done): New static global.
7669 (do_initial_child_stuff): Set child_initialization_done to
7670 zero during child initialization, and 1 after. Replace call
7671 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7673 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7674 (handle_unload_dll): Add function documentation.
7675 (get_child_debug_event): Ignore load and unload DLL events
7676 during child initialization.
7678 2014-02-20 Doug Evans <dje@google.com>
7680 Remove global all_lwps.
7681 * inferiors.h (ptid_of): Move here from linux-low.h.
7682 (pid_of, lwpid_of): Ditto.
7683 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7684 parameter is a struct thread_info * now.
7685 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7686 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7687 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7689 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7690 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7691 * linux-arm-low.c (update_registers_callback): Update, "entry"
7692 parameter is a struct thread_info * now.
7693 Fetch lwpid from current_inferior directly.
7694 (arm_insert_point): Pass &all_threads to find_inferior instead of
7696 (arm_remove_point): Ditto.
7697 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7698 (arm_prepare_to_resume): Fetch pid from thread.
7699 (arm_read_description): Fetch lwpid from current_inferior directly.
7700 * linux-low.c (all_lwps): Delete.
7701 (delete_lwp): Delete call to remove_inferior.
7702 (handle_extended_wait): Fetch lwpid from thread.
7703 (add_lwp): Don't set lwp->entry.id. Remove call to
7704 add_inferior_to_list.
7705 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7706 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7707 (kill_one_lwp_callback): Ditto.
7708 (linux_kill): Don't dereference NULL pointer.
7709 Fetch ptid,lwpid from thread.
7710 (get_detach_signal): Fetch ptid from thread.
7711 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7712 Simplify call to regcache_invalidate_thread.
7713 (delete_lwp_callback): Update, "entry" parameter is a
7714 struct thread_info * now. Fetch pid from thread.
7715 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7716 (status_pending_p_callback): Update, "entry" parameter is a
7717 struct thread_info * now. Fetch ptid from thread.
7718 (find_lwp_pid): Update, "entry" parameter is a
7719 struct thread_info * now.
7720 (linux_wait_for_lwp): Fetch pid from thread.
7721 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7722 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7723 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7724 (dequeue_one_deferred_signal): Ditto.
7725 (cancel_breakpoint): Fetch ptid from current_inferior.
7726 (linux_wait_for_event): Pass &all_threads to find_inferior,
7727 not &all_lwps. Fetch ptid, lwpid from thread.
7728 (count_events_callback): Update, "entry" parameter is a
7729 struct thread_info * now.
7730 (select_singlestep_lwp_callback): Ditto.
7731 (select_event_lwp_callback): Ditto.
7732 (cancel_breakpoints_callback): Ditto.
7733 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7735 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7736 (unsuspend_one_lwp): Update, "entry" parameter is a
7737 struct thread_info * now.
7738 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7740 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7741 Fetch lwpid from thread, not lwp.
7742 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7743 Pass &all_threads to find_inferior, not &all_lwps.
7744 (send_sigstop): Fetch lwpid from thread, not lwp.
7745 (send_sigstop_callback): Update, "entry" parameter is a
7746 struct thread_info * now.
7747 (suspend_and_send_sigstop_callback): Ditto.
7748 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7749 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7750 struct thread_info * now.
7751 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7753 (lwp_running): Update, "entry" parameter is a
7754 struct thread_info * now.
7755 (stop_all_lwps): Fetch ptid from thread.
7756 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7757 (linux_resume_one_lwp): Fetch lwpid from thread.
7758 (linux_set_resume_request): Update, "entry" parameter is a
7759 struct thread_info * now. Fetch pid, lwpid from thread.
7760 (resume_status_pending_p): Update, "entry" parameter is a
7761 struct thread_info * now.
7762 (need_step_over_p): Ditto. Fetch lwpid from thread.
7763 (start_step_over): Fetch lwpid from thread.
7764 (linux_resume_one_thread): Update, "entry" parameter is a
7765 struct thread_info * now. Fetch lwpid from thread.
7766 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7767 (proceed_one_lwp): Update, "entry" parameter is a
7768 struct thread_info * now. Fetch lwpid from thread.
7769 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7770 struct thread_info * now.
7771 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7772 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7773 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7775 (regsets_store_inferior_registers): Ditto.
7776 (fetch_register, store_register): Ditto.
7777 (linux_read_memory, linux_write_memory): Ditto.
7778 (linux_request_interrupt): Ditto.
7779 (linux_read_auxv): Ditto.
7780 (linux_xfer_siginfo): Ditto.
7781 (linux_qxfer_spu): Ditto.
7782 (linux_qxfer_libraries_svr4): Ditto.
7783 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7784 moved to inferiors.h.
7786 (get_thread_lwp): Update.
7787 (struct lwp_info): Delete member "entry". Simplify comment for
7790 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7791 current_inferior directly.
7792 (update_watch_registers_callback): Update, "entry" parameter is a
7793 struct thread_info * now. Fetch pid from thread.
7794 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7795 (mips_insert_point): Fetch lwpid from current_inferior.
7796 Pass &all_threads to find_inferior, not &all_lwps.
7797 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7798 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7800 (mips_stopped_data_address): Ditto.
7801 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7803 * linux-tile-low.c (tile_arch_setup): Ditto.
7804 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7805 (update_debug_registers_callback): Update, "entry" parameter is a
7806 struct thread_info * now. Fetch pid from thread.
7807 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7808 Pass &all_threads to find_inferior, not &all_lwps.
7809 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7810 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7811 Pass &all_threads to find_inferior, not &all_lwps.
7812 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7813 (i386_dr_low_get_status): Ditto.
7814 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7815 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7816 (x86_linux_read_description): Ditto.
7817 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7819 2014-02-20 Doug Evans <dje@google.com>
7821 * inferiors.c (get_first_inferior): Fix buglet.
7823 2014-02-19 Doug Evans <dje@google.com>
7825 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7826 * inferiors.c (add_thread): Change result type to struct thread_info *.
7827 All callers updated.
7828 (add_lwp): Call add_thread here instead of in callers.
7829 All callers updated.
7830 * linux-low.h (get_lwp_thread): Rewrite.
7831 (struct lwp_info): New member "thread".
7833 2014-02-19 Doug Evans <dje@google.com>
7835 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7836 All callers updated.
7838 2014-02-19 Doug Evans <dje@google.com>
7840 * inferiors.c (add_thread): Fix whitespace.
7842 2014-02-19 Doug Evans <dje@google.com>
7844 * dll.c (clear_dlls): Replace accessing list implemention details
7846 * gdbthread.h (get_first_thread): Declare.
7847 * inferiors.c (for_each_inferior_with_data): New function.
7848 (get_first_thread): New function.
7849 (find_thread_ptid): Simplify.
7850 (get_first_inferior): New function.
7851 (clear_list): Delete.
7852 (one_inferior_p): New function.
7853 (clear_inferior_list): New function.
7854 (clear_inferiors): Update.
7855 * inferiors.h (for_each_inferior_with_data): Declare.
7856 (clear_inferior_list): Declare.
7857 (one_inferior_p): Declare.
7858 (get_first_inferior): Declare.
7859 * linux-low.c (linux_wait_for_event): Replace accessing list
7860 implemention details with API function.
7861 * server.c (target_running): Ditto.
7862 (accumulate_file_name_length): New function.
7863 (emit_dll_description): New function.
7864 (handle_qxfer_libraries): Replace accessing list implemention
7865 details with API function.
7866 (handle_qxfer_threads_worker): New function.
7867 (handle_qxfer_threads_proper): Replace accessing list implemention
7868 details with API function.
7869 (handle_query): Ditto.
7870 (visit_actioned_threads_callback_ftype): New typedef.
7871 (visit_actioned_threads_data): New struct.
7872 (visit_actioned_threads): Rewrite to be find_inferior callback.
7873 (resume): Call find_inferior.
7874 (handle_status): Replace accessing list implemention
7875 details with API function.
7876 (process_serial_event): Replace accessing list implemention details
7878 * target.c (set_desired_inferior): Replace accessing list implemention
7879 details with API function.
7880 * tracepoint.c (same_process_p): New function.
7881 (gdb_agent_about_to_close): Replace accessing list implemention
7882 details with API function.
7883 * win32-low.c (child_delete_thread): Replace accessing list
7884 implemention details with API function.
7885 (match_dll_by_basename): New function.
7886 (dll_is_loaded_by_basename): New function.
7887 (win32_ensure_ntdll_loaded): Replace accessing list implemention
7888 details call to dll_is_loaded_by_basename.
7890 2014-02-19 Doug Evans <dje@google.com>
7892 * dll.h (struct dll_info): Add comment.
7893 * gdbthread.h (struct thread_info): Add comment.
7894 (current_ptid): Simplify.
7895 * inferiors.c (add_process): Update.
7896 (remove_process): Update.
7897 * inferiors.h (struct process_info): Rename member "head" to "entry".
7898 * linux-low.c (delete_lwp): Update.
7900 (last_thread_of_process_p): Update.
7901 (kill_one_lwp_callback, linux_kill): Update.
7902 (status_pending_p_callback): Update.
7903 (wait_for_sigstop): Update. Simplify read of ptid.
7904 (start_step_over): Update.
7905 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7906 (get_lwp_thread): Update.
7907 (struct lwp_info): Rename member "head" to "entry".
7908 * regcache.h (inferior_list_entry): Delete.
7909 * server.c (kill_inferior_callback): Update.
7910 (detach_or_kill_inferior_callback): Update.
7911 (print_started_pid): Update.
7912 (print_attached_pid): Update.
7913 (process_serial_event): Simplify read of ptid.
7914 * thread-db.c (thread_db_create_event): Update.
7915 (thread_db_get_tls_address): Update.
7916 * win32-low.c (current_inferior_ptid): Simplify.
7918 2014-02-19 Tom Tromey <tromey@redhat.com>
7920 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7922 (target_supports_btrace): Update.
7924 2014-02-14 Yao Qi <yao@codesourcery.com>
7926 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7927 (rsp-low-ipa.o): New target.
7929 2014-02-12 Tom Tromey <tromey@redhat.com>
7931 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7932 convert_ascii_to_int.
7933 * regcache.c (registers_to_string): Likewise.
7934 * remote-utils.c (decode_M_packet): Likewise.
7935 * server.c (process_serial_event): Likewise.
7937 2014-02-12 Tom Tromey <tromey@redhat.com>
7939 * server.c (handle_query, handle_v_run): Use hex2bin, not
7941 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7943 2014-02-12 Tom Tromey <tromey@redhat.com>
7945 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7946 convert_int_to_ascii.
7947 * regcache.c (registers_to_string, collect_register_as_string):
7949 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7951 * server.c (process_serial_event): Likewise.
7952 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7953 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7955 2014-02-12 Tom Tromey <tromey@redhat.com>
7957 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7958 bin2hex, not hexify.
7959 * tracepoint.c (cmd_qtstatus): Likewise.
7961 2014-02-12 Tom Tromey <tromey@redhat.com>
7963 * remote-utils.c (monitor_output): Pass explicit length to
7966 2014-02-12 Tom Tromey <tromey@redhat.com>
7968 * tracepoint.c: Include rsp-low.h.
7969 * server.c: Include rsp-low.h.
7970 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7971 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7973 * remote-utils.c: Include rsp-low.h.
7974 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7975 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7976 (convert_int_to_ascii, convert_ascii_to_int): Move to
7978 * regcache.c: Include rsp-low.h.
7979 * ax.c: Include rsp-low.h.
7980 * Makefile.in (SFILES): Add common/rsp-low.c.
7981 (OBS): Add rsp-low.o.
7982 (rsp-low.o): New target.
7984 2014-02-12 Tom Tromey <tromey@redhat.com>
7986 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7987 Include print-utils.h.
7988 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7989 (plongest, thirty_two, phex_nz): Remove.
7990 * Makefile.in (SFILES): Add common/print-utils.c.
7991 (OBS): Add print-utils.o.
7992 (print-utils-ipa.o): New target.
7993 (print-utils.o): New target.
7994 (IPA_OBJS): Add print-utils-ipa.o.
7996 2014-02-06 Tom Tromey <tromey@redhat.com>
7998 * Makefile.in (SFILES): Fix indentation.
8000 2014-02-05 Doug Evans <dje@google.com>
8002 * linux-low.c (linux_wait_for_event): Improve comment.
8003 (linux_wait_1): Keep current_inferior in sync with event_child.
8005 2014-01-22 Doug Evans <dje@google.com>
8007 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8009 2014-01-22 Doug Evans <dje@google.com>
8011 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8012 * configure: Regenerate.
8013 * config.in: Regenerate.
8014 * Makefile.in (SFILES): Add debug.c.
8016 * debug.c: New file.
8017 * debug.h: New file.
8018 * linux-aarch64-low.c (*): Update all debugging printfs to use
8019 debug_printf instead of fprintf.
8020 * linux-arm-low.c (*): Ditto.
8021 * linux-cris-low.c (*): Ditto.
8022 * linux-crisv32-low.c (*): Ditto.
8023 * linux-m32r-low.c (*): Ditto.
8024 * linux-sparc-low.c (*): Ditto.
8025 * linux-x86.c (*): Ditto.
8026 * linux-low.c (*): Ditto.
8027 (linux_wait_1): Add calls to debug_enter, debug_exit.
8028 (linux_wait): Remove redundant debugging printf.
8029 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8030 (linux_resume, unstop_all_lwps): Ditto.
8031 * mem-break.c (*): Update all debugging printfs to use
8032 debug_printf instead of fprintf.
8033 * remote-utils.c (*): Ditto.
8034 * thread-db.c (*): Ditto.
8035 * server.c #include <ctype.h>, "gdb_vecs.h".
8036 (debug_threads): Moved to debug.c.
8037 (*): Update all debugging printfs to use debug_printf instead of
8039 (start_inferior): Replace call to fflush with call to debug_flush.
8040 (monitor_show_help): Mention set debug-format.
8041 (parse_debug_format_options): New function.
8042 (handle_monitor_command): Handle "monitor set debug-format".
8043 (gdbserver_usage): Mention --debug-format.
8044 (main): Parse --debug-format.
8045 * server.h (debug_threads): Declaration moved to debug.h.
8047 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8048 trace_debug_1 that uses debug_printf.
8049 (tracepoint_look_up_symbols): Update all debugging printfs to use
8050 debug_printf instead of fprintf.
8052 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8054 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8057 2014-01-17 Pedro Alves <palves@redhat.com>
8060 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8061 defined after including gdb_proc_service.h.
8063 2014-01-16 Doug Evans <dje@google.com>
8065 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8066 (match_dll): Use it.
8068 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8070 * target.h (target_ops) <read_btrace>: Change parameters and
8071 return type to allow error reporting.
8072 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8073 trace reading errors on.
8074 * linux-low.c (linux_low_read_btrace): Pass trace reading
8076 (linux_low_disable_btrace): New.
8078 2014-01-15 Doug Evans <dje@google.com>
8080 * inferiors.c (thread_id_to_gdb_id): Delete.
8081 * inferiors.h (thread_id_to_gdb_id): Delete.
8083 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8085 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8086 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8089 2014-01-08 Pedro Alves <palves@redhat.com>
8091 * server.c (handle_status): Don't discard previous queued stop
8092 replies or thread's pending status here.
8093 (main) <disconnection>: Do it here instead.
8095 2014-01-08 Pedro Alves <palves@redhat.com>
8097 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8098 * server.c (visit_actioned_threads, handle_pending_status): New
8100 (handle_v_cont): Factor out parts to ...
8101 (resume): ... this new function. If in all-stop, and a thread
8102 being resumed has a pending status, report it without actually
8104 (myresume): Adjust to use the new 'resume' function.
8105 (clear_pending_status_callback, set_pending_status_callback)
8106 (find_status_pending_thread_callback): New functions.
8107 (handle_status): Handle the case of multiple threads having
8108 interesting statuses to report. Report threads' real last signal
8109 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8110 with an interesting thread to report the status for, instead of
8111 always reporting the status of the first thread.
8113 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8115 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8116 * gdbreplay.c (gdbreplay_version): Likewise.
8118 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8120 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8121 iov.iov_len with the real length in use.
8123 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8125 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8126 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8127 for all targets that use win32-low.c.
8128 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8129 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8131 2013-12-13 Pedro Alves <palves@redhat.com>
8133 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8134 if equal to TARGET_WAITKIND_LOADED.
8135 * win32-low.c (cached_status): New static global.
8136 (win32_wait): Add declaration.
8137 (do_initial_child_stuff): Flush all initial pending debug events
8138 up to the initial breakpoint.
8139 (win32_wait): If CACHED_STATUS was set, return that instead
8140 of doing a real wait. Remove the code resuming the execution
8141 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8142 during the initial phase. Also remove the code changing
8143 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8144 TARGET_WAITKIND_STOPPED.
8146 2013-12-11 Yao Qi <yao@codesourcery.com>
8148 * notif.c (handle_notif_ack): Return 0 if no notification
8151 2013-11-20 Doug Evans <dje@google.com>
8153 * linux-low.c (linux_set_resume_request): Fix comment.
8155 2013-11-20 Doug Evans <dje@google.com>
8157 * linux-low.c (resume_status_pending_p): Tweak comment.
8159 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8161 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8162 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8163 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8164 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8165 (srv_amd64_regobj): Add amd64-mpx.o.
8166 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8167 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8168 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8169 * i387-fp.c (num_pl_bnd_register) Added constant.
8170 (num_pl_bnd_cfg_registers) Added constant.
8171 (struct i387_xsave) Added reserved area and MPX fields.
8172 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8173 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8175 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8176 (init_registers_amd64_mpx_linux): Declare new function.
8177 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8178 (x86_64_regmap): Add MPX registers.
8179 (x86_linux_read_description): Add MPX case.
8180 (initialize_low_arch): Initialize MPX targets.
8182 2013-11-18 Tom Tromey <tromey@redhat.com>
8184 * configure: Rebuild.
8185 * configure.ac: Don't check for stdlib.h.
8186 * gdbreplay.c: Unconditionally include stdlib.h.
8188 2013-11-18 Tom Tromey <tromey@redhat.com>
8190 * config.in: Rebuild.
8191 * configure: Rebuild.
8192 * configure.ac: Don't use AC_HEADER_DIRENT.
8194 2013-11-18 Tom Tromey <tromey@redhat.com>
8196 * server.h: Don't check HAVE_STRING_H.
8197 * gdbreplay.c: Don't check HAVE_STRING_H.
8198 * configure: Rebuild.
8200 2013-11-18 Tom Tromey <tromey@redhat.com>
8202 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8205 2013-11-08 Tom Tromey <tromey@redhat.com>
8207 * configure, config.in: Rebuild.
8208 * configure.ac: Remove unused configury.
8210 2013-11-08 Tom Tromey <tromey@redhat.com>
8212 * acinclude.m4: Include common.m4, codeset.m4.
8213 * configure, config.in: Rebuild.
8214 * configure.ac: Use GDB_AC_COMMON.
8216 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8218 * linux-s390-low.c (HWCAP_S390_TE): New define.
8219 (s390_arch_setup): Consider the TE field in the HWCAP for
8220 determining 'have_regset_tdb'.
8222 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8225 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8228 2013-10-02 Pedro Alves <palves@redhat.com>
8230 * server.c (process_serial_event): Don't output "GDBserver
8231 exiting" if GDB is connected through stdio.
8232 * target.c (mywait): Likewise, be silent if GDB is connected
8235 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8237 * lynx-low.c (lynx_add_threads_after_attach): New function.
8238 (lynx_attach): Remove call to add_thread. Add call to
8239 lynx_add_threads_after_attach instead.
8241 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8243 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8244 * config.in, configure: Regenerated.
8246 2013-09-18 Yao Qi <yao@codesourcery.com>
8249 * server.c (start_inferior): Clear 'resume_info'.
8251 2013-09-16 Jiong Wang <jiwang@tilera.com>
8253 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8256 2013-09-16 Jiong Wang <jiwang@tilera.com>
8258 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8259 linux-tile-low.o to srv_tgtobj.
8261 2013-09-16 Will Newton <will.newton@linaro.org>
8263 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8266 2013-09-06 Pedro Alves <palves@redhat.com>
8268 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8269 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8270 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8271 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8272 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8273 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8275 2013-09-06 Pedro Alves <palves@redhat.com>
8277 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8278 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8280 2013-09-06 Pedro Alves <palves@redhat.com>
8282 * linux-amd64-ipa.c: Include tracepoint.h.
8283 * linux-i386-ipa.c: Include tracepoint.h.
8285 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8287 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8288 (ps_get_thread_area): New function.
8290 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8292 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8293 (initialize_low_arch): Call init_registers_crisv32 rather than
8294 init_register_crisv32.
8296 2013-09-05 Pedro Alves <palves@redhat.com>
8298 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8300 * hostio.h: ... this new file.
8301 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8302 win32-low.c: Include hostio.h.
8304 2013-09-05 Pedro Alves <palves@redhat.com>
8306 * server.h (gdb_client_data, handler_func, callback_handler_func)
8307 (delete_file_handler, add_file_handler, append_callback_event)
8308 (delete_callback_event, start_event_loop, initialize_event_loop):
8309 Move to event-loop.h and include it.
8310 * event-loop.h: New file.
8312 2013-09-05 Pedro Alves <palves@redhat.com>
8314 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8315 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8316 (loaded_dll, unloaded_dll): Move to ...
8317 * dll.h: ... this new file.
8318 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8320 2013-09-05 Pedro Alves <palves@redhat.com>
8322 * server.h (current_process, get_thread_process, all_processes)
8323 (add_inferior_to_list, for_each_inferior, current_inferior)
8324 (remove_inferior, add_process, remove_process, find_process_pid)
8325 (have_started_inferiors_p, have_attached_inferiors_p)
8326 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8327 (clear_inferiors, find_inferior, find_inferior_id)
8328 (inferior_target_data, set_inferior_target_data)
8329 (inferior_regcache_data, set_inferior_regcache_data): Move to
8330 inferiors.h, and include it.
8331 * inferiors.h: New file.
8333 2013-09-05 Pedro Alves <palves@redhat.com>
8335 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8339 2013-09-05 Pedro Alves <palves@redhat.com>
8341 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8343 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8344 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8345 (handle_tracepoint_general_set, handle_tracepoint_query)
8346 (tracepoint_finished_step, tracepoint_was_hit)
8347 (release_while_stepping_state_list, current_traceframe)
8348 (in_readonly_region, traceframe_read_mem)
8349 (fetch_traceframe_registers, traceframe_read_sdata)
8350 (traceframe_read_info, struct fast_tpoint_collect_status)
8351 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8352 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8353 (supply_fast_tracepoint_registers)
8354 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8355 (ipa_tdesc, claim_trampoline_space)
8356 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8357 (agent_mem_read, agent_get_trace_state_variable_value)
8358 (agent_set_trace_state_variable_value, agent_tsv_read)
8359 (agent_mem_read_string, get_raw_reg_func_addr)
8360 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8361 * tracepoint.h: ... this new file.
8363 2013-09-05 Pedro Alves <palves@redhat.com>
8365 * server.h (perror_with_name, error, fatal, warning, paddress)
8366 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8368 * utils.h: New file.
8370 2013-09-05 Pedro Alves <palves@redhat.com>
8372 * server.h (remote_debug, noack_mode, transport_is_reliable)
8373 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8374 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8375 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8376 (write_enn, initialize_async_io, enable_async_io)
8377 (disable_async_io, check_remote_input_interrupt_request)
8378 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8379 (dead_thread_notify, prepare_resume_reply)
8380 (decode_address_to_semicolon, decode_address, decode_m_packet)
8381 (decode_M_packet, decode_X_packet, decode_xfer_write)
8382 (decode_search_memory_packet, unhexify, hexify)
8383 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8384 (look_up_one_symbol, relocate_instruction)
8385 (monitor_output): Move to remote-utils.h, and include it.
8386 * remote-utils.h: New file.
8388 2013-09-05 Pedro Alves <palves@redhat.com>
8390 * server.h (_): Delete.
8392 2013-09-02 Pedro Alves <palves@redhat.com>
8394 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8395 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8397 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8399 2013-09-02 Pierre Muller <muller@sourceware.org>
8401 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8402 or WriteProcessMemory complete successfully and handle
8403 ERROR_PARTIAL_COPY error.
8405 2013-09-02 Pedro Alves <palves@redhat.com>
8407 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8408 error instead of EIO.
8410 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8413 * linux-low.c: Include filestuff.h.
8414 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8415 * lynx-low.c: Include filestuff.h.
8416 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8417 * server.c: Include filestuff.h.
8418 (main): Call notice_open_fds.
8419 * spu-low.c: Include filestuff.h.
8420 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8422 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8424 * Makefile.in: Explain why ../target and ../nat are not
8425 listed as include file search paths.
8426 (linux-waitpid.o): New object file rule.
8427 * configure.srv (srv_native_linux_obj): New variable.
8428 Replace all occurrences of linux native object files with
8429 $srv_native_linux_obj.
8430 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8431 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8432 (linux_enable_event_reporting): Remove declaration.
8433 (my_waitpid): Moved to common/linux-waitpid.c.
8434 (linux_wait_for_event): Pass ptid when calling
8435 linux_enable_event_reporting.
8436 (linux_supports_tracefork_flag): Remove.
8437 (linux_enable_event_reporting): Likewise.
8438 (linux_tracefork_grandchild): Remove.
8439 (STACK_SIZE): Moved to common/linux-ptrace.c.
8440 (linux_tracefork_child): Remove.
8441 (linux_test_for_tracefork): Remove.
8442 (linux_look_up_symbols): Call linux_supports_traceclone.
8443 (initialize_low): Remove call to linux_test_for_tracefork.
8444 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8445 common/linux-ptrace.h.
8446 (PTRACE_TYPE_ARG4): Likewise.
8447 Include linux-ptrace.h.
8449 2013-08-21 Pedro Alves <palves@redhat.com>
8451 * config.in: Renegerate.
8453 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8455 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8456 (SFILES): Remove $(srcdir)/common/target-common.c and
8457 add $(srcdir)/target/waitstatus.c.
8458 (OBS): Remove target-common.o and add waitstatus.o.
8459 (server_h): Remove $(srcdir)/../common/target-common.h and
8460 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8461 and $(srcdir)/../target/waitstatus.h.
8462 (target-common.o): Remove.
8463 (waitstatus.o): New target object file.
8464 * target.h: Do not include target-common.h and
8465 include target/resume.h, target/wait.h and
8466 target/waitstatus.h.
8468 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8470 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8471 to PTRACE_TYPE_ARG3.
8472 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8473 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8475 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8476 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8478 2013-07-27 Jie Zhang <jie@codesourcery.com>
8479 Daniel Jacobowitz <dan@codesourcery.com>
8480 Yao Qi <yao@codesourcery.com>
8482 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8483 (mips-linux-watch.o): New rule.
8484 (mips_linux_watch_h): New variable.
8485 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8487 * linux-mips-low.c: Include mips-linux-watch.h.
8488 (struct arch_process_info, struct arch_lwp_info): New.
8489 (update_watch_registers_callback): New function.
8490 (mips_linux_new_process, mips_linux_new_thread) New functions.
8491 (mips_linux_prepare_to_resume, mips_insert_point): New
8493 (mips_remove_point, mips_stopped_by_watchpoint): New
8495 (rsp_bp_type_to_target_hw_bp_type): New function.
8496 (mips_stopped_data_address): New function.
8497 (the_low_target): Add watchpoint support functions.
8499 2013-07-27 Yao Qi <yao@codesourcery.com>
8501 * i386-low.c: Include break-common.h.
8502 (enum target_hw_bp_type): Remove.
8504 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8506 * Makefile.in (SFILES): /common/target-common.c.
8507 (OBS): Add target-common.o.
8508 (server_h): Add $(srcdir)/../common/target-common.h.
8509 (target-common.o): New target.
8510 * server.c (queue_stop_reply_callback): Free
8511 status string after use.
8512 * target.c (target_waitstatus_to_string): Remove.
8513 * target.h: Include target-common.h.
8514 (resume_kind): Likewise.
8515 (target_waitkind): Likewise.
8516 (target_waitstatus): Likewise.
8517 (TARGET_WNOHANG): Likewise.
8519 2013-07-04 Yao Qi <yao@codesourcery.com>
8521 * Makefile.in (host_alias): Use @host_noncanonical@.
8522 (target_alias): Use @target_noncanonical@.
8523 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8524 ACX_NONCANONICAL_HOST.
8525 * configure: Regenerated.
8528 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8530 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8531 * configure: Rebuild.
8532 * Makefile.in (version_host, version_target): Get from configure.
8533 (version.c): Use $(version_host) and $(version_target).
8535 2013-07-03 Pedro Alves <palves@redhat.com>
8537 * Makefile.in (config.status): Depend on development.sh.
8538 * acinclude.m4: Include libmcheck.m4.
8539 * configure: Regenerate.
8541 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8543 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8544 attribute inside the parentheses.
8545 (winapi_DebugSetProcessKillOnExit): Ditto.
8546 (winapi_DebugBreakProcess): Ditto.
8547 (winapi_GenerateConsoleCtrlEvent): Ditto.
8549 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8551 * notif.h (notif_event): Add a dummy member to avoid compiler
8554 2013-07-01 Pedro Alves <palves@redhat.com>
8556 * hostio.c (HOSTIO_PATH_MAX): Define.
8557 (require_filename, handle_open, handle_unlink, handle_readlink):
8560 2013-07-01 Pedro Alves <palves@redhat.com>
8562 * server.h: Include "pathmax.h".
8563 * linux-low.c: Don't include sys/param.h.
8564 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8566 * win32-low.c: Don't include sys/param.h.
8567 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8569 2013-07-01 Pedro Alves <palves@redhat.com>
8571 * event-loop.c: Don't check HAVE_UNISTD_H before including
8573 * gdbreplay.c: Likewise.
8574 * remote-utils.c: Likewise.
8575 * server.c: Likewise.
8576 * configure.ac: Don't check for unistd.h.
8577 * configure: Regenerate.
8579 2013-06-28 Tom Tromey <tromey@redhat.com>
8581 * Makefile.in (version.c): Use version.in, not
8584 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8586 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8587 * configure: Rebuild.
8588 * Makefile.in (version_host, version_target): Get from configure.
8589 (version.c): Use $(version_host) and $(version_target).
8591 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8593 Fix trace-status to output user name without trailing colon.
8594 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8596 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8598 Fix trace-status to output proper start-time and stop-time.
8599 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8600 output start time and stop time in hex as gdb expects.
8602 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8604 * tracepoint.c (build_traceframe_info_xml): Output trace state
8605 variables present in the trace buffer.
8607 2013-06-24 Tom Tromey <tromey@redhat.com>
8609 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8611 (version.o): Remove.
8612 * gdbreplay.c: Include version.h.
8613 (version, host_name): Don't declare.
8614 * server.h: Include version.h.
8615 (version, host_name): Don't declare.
8617 2013-06-12 Pedro Alves <palves@redhat.com>
8619 * linux-x86-low.c (linux_is_elf64): Delete global.
8620 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8621 with local linux_pid_exe_is_elf_64_file use.
8623 2013-06-11 Pedro Alves <palves@redhat.com>
8625 * linux-low.c (regset_disabled, disable_regset): New functions.
8626 (regsets_fetch_inferior_registers)
8627 (regsets_store_inferior_registers): Use them.
8628 (initialize_regsets_info); Don't allocate the disabled_regsets
8630 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8633 2013-06-11 Pedro Alves <palves@redhat.com>
8635 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8638 2013-06-11 Pedro Alves <palves@redhat.com>
8640 * linux-x86-low.c (initialize_low_arch): Call
8641 init_registers_x32_avx_linux.
8643 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8645 Fix compatibility with Android Bionic.
8646 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8649 2013-06-07 Pedro Alves <palves@redhat.com>
8652 * Makefile.in (OBS): Add tdesc.o.
8653 (IPA_OBJS): Add tdesc-ipa.o.
8654 (tdesc-ipa.o): New rule.
8655 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8657 * linux-low.c (new_inferior): Delete.
8658 (disabled_regsets, num_regsets): Delete.
8659 (linux_add_process): Adjust to set the new per-process
8661 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8662 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8663 was a stop. When calling arch_setup, switch the current inferior
8664 to the thread that got an event.
8665 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8666 (regsets_fetch_inferior_registers)
8667 (regsets_store_inferior_registers): New regsets_info parameter.
8669 (linux_register_in_regsets): New regs_info parameter. Adjust to
8671 (register_addr, fetch_register, store_register): New usrregs_info
8672 parameter. Adjust to use it.
8673 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8674 parameter regs_info. Adjust to use it.
8675 (linux_fetch_registers): Get the current inferior's regs_info, and
8677 (linux_store_registers): Ditto.
8678 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8679 (initialize_low): Don't initialize the target_regsets here. Call
8680 initialize_low_arch.
8681 * linux-low.h (target_regsets): Delete declaration.
8682 (struct regsets_info): New.
8683 (struct usrregs_info): New.
8684 (struct regs_info): New.
8685 (struct process_info_private) <new_inferior>: New field.
8686 (struct linux_target_ops): Delete the num_regs, regmap, and
8687 regset_bitmap fields. New field regs_info.
8688 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8689 * i387-fp.c (num_xmm_registers): Delete.
8690 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8691 calls to new interface.
8692 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8693 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8694 Infer the number of xmm registers from the regcache's target
8696 * i387-fp.h (num_xmm_registers): Delete.
8697 * inferiors.c (add_thread): Don't install the thread's regcache
8699 * proc-service.c (gregset_info): Fetch the current inferior's
8700 regs_info. Adjust to use it.
8701 * regcache.c: Include tdesc.h.
8702 (register_bytes, reg_defs, num_registers)
8703 (gdbserver_expedite_regs): Delete.
8704 (get_thread_regcache): If the thread doesn't have a regcache yet,
8705 create one, instead of aborting gdbserver.
8706 (regcache_invalidate_one): Rename to ...
8707 (regcache_invalidate_thread): ... this.
8708 (regcache_invalidate_one): New.
8709 (regcache_invalidate): Only invalidate registers of the current
8711 (init_register_cache): Add target_desc parameter, and use it.
8712 (new_register_cache): Ditto. Assert the target description has a
8713 non zero registers_size.
8714 (regcache_cpy): Add assertions. Adjust.
8715 (realloc_register_cache, set_register_cache): Delete.
8716 (registers_to_string, registers_from_string): Adjust.
8717 (find_register_by_name, find_regno, find_register_by_number)
8718 (register_cache_size): Add target_desc parameter, and use it.
8719 (free_register_cache_thread, free_register_cache_thread_one)
8720 (regcache_release, register_cache_size): New.
8721 (register_size): Add target_desc parameter, and use it.
8722 (register_data, supply_register, supply_register_zeroed)
8723 (supply_regblock, supply_register_by_name, collect_register)
8724 (collect_register_as_string, collect_register_by_name): Adjust.
8725 * regcache.h (struct target_desc): Forward declare.
8726 (struct regcache) <tdesc>: New field.
8727 (init_register_cache, new_register_cache): Add target_desc
8729 (regcache_invalidate_thread): Declare.
8730 (regcache_invalidate_one): Delete declaration.
8731 (regcache_release): Declare.
8732 (find_register_by_number, register_cache_size, register_size)
8733 (find_regno): Add target_desc parameter.
8734 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8736 * remote-utils.c: Include tdesc.h.
8737 (outreg, prepare_resume_reply): Adjust.
8738 * server.c: Include tdesc.h.
8739 (gdbserver_xmltarget): Delete declaration.
8740 (get_features_xml, process_serial_event): Adjust.
8741 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8743 (struct process_info) <tdesc>: New field.
8744 (ipa_tdesc): Declare.
8745 * tdesc.c: New file.
8746 * tdesc.h: New file.
8747 * tracepoint.c: Include tdesc.h.
8748 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8749 (get_context_regcache): Adjust to pass ipa_tdesc down.
8750 (do_action_at_tracepoint): Adjust to get the register cache size
8751 from the context regcache's description.
8752 (traceframe_walk_blocks): Adjust to get the register cache size
8753 from the current trace frame's description.
8754 (traceframe_get_pc): Adjust to get current trace frame's
8755 description and pass it down.
8756 (gdb_collect): Adjust to get the register cache size from the
8758 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8759 (gdbserver_xmltarget): Delete.
8760 (initialize_low_tracepoint): Set the ipa's target description.
8761 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8762 (initialize_low_tracepoint): Set the ipa's target description.
8763 * linux-x86-low.c: Include tdesc.h.
8764 [__x86_64__] (is_64bit_tdesc): New.
8765 (ps_get_thread_area, x86_get_thread_area): Use it.
8766 (i386_cannot_store_register): Rename to ...
8767 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8768 (i386_cannot_fetch_register): Rename to ...
8769 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8770 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8772 (target_regsets): Rename to ...
8773 (x86_regsets): ... this.
8774 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8776 (x86_siginfo_fixup): Use is_64bit_tdesc.
8777 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8778 (tdesc_x32_avx_linux, tdesc_x32_linux)
8779 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8781 (x86_linux_update_xmltarget): Delete.
8782 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8783 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8784 (AMD64_LINUX_USER64_CS): New.
8785 (x86_linux_read_description): New, based on
8786 x86_linux_update_xmltarget.
8787 (same_process_callback): New.
8788 (x86_arch_setup_process_callback): New.
8789 (x86_linux_update_xmltarget): New.
8790 (x86_regsets_info): New.
8791 (amd64_linux_regs_info): New.
8792 (i386_linux_usrregs_info): New.
8793 (i386_linux_regs_info): New.
8794 (x86_linux_regs_info): New.
8795 (x86_arch_setup): Reimplement.
8796 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8797 (x86_emit_ops): Ditto.
8798 (the_low_target): Adjust. Install x86_linux_regs_info,
8799 x86_cannot_fetch_register, and x86_cannot_store_register.
8800 (initialize_low_arch): New.
8801 * linux-ia64-low.c (tdesc_ia64): Declare.
8802 (ia64_fetch_register): Adjust.
8803 (ia64_usrregs_info, regs_info): New globals.
8804 (ia64_regs_info): New function.
8805 (the_low_target): Adjust.
8806 (initialize_low_arch): New function.
8807 * linux-sparc-low.c (tdesc_sparc64): Declare.
8808 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8810 (sparc_arch_setup): New function.
8811 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8812 (the_low_target): Adjust.
8813 (initialize_low_arch): New function.
8814 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8815 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8816 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8817 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8818 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8819 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8820 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8821 (tdesc_powerpc_isa205_vsx64l): Declare.
8822 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8823 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8824 (ppc_set_pc, ppc_get_hwcap): Adjust.
8825 (ppc_usrregs_info): Forward declare.
8826 (!__powerpc64__) ppc_regmap_adjusted: New global.
8827 (ppc_arch_setup): Adjust to the current process'es target
8829 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8830 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8831 (ppc_store_evrregset): Adjust.
8832 (target_regsets): Rename to ...
8833 (ppc_regsets): ... this, and make static.
8834 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8835 (ppc_regs_info): New function.
8836 (the_low_target): Adjust.
8837 (initialize_low_arch): New function.
8838 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8839 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8840 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8841 (tdesc_s390x_linux64v2): Declare.
8842 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8843 (s390_fill_gregset, s390_store_last_break): Adjust.
8844 (target_regsets): Rename to ...
8845 (s390_regsets): ... this, and make static.
8846 (s390_get_pc, s390_set_pc): Adjust.
8847 (s390_get_hwcap): New target_desc parameter, and use it.
8848 [__s390x__] (have_hwcap_s390_high_gprs): New global.
8849 (s390_arch_setup): Adjust to set the current process'es target
8850 description. Don't adjust the regmap.
8851 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8852 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8853 (regs_info_3264): New globals.
8854 (s390_regs_info): New function.
8855 (the_low_target): Adjust.
8856 (initialize_low_arch): New function.
8857 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8858 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8859 [__mips64] (init_registers_mips_linux)
8860 (init_registers_mips_dsp_linux): Delete defines.
8861 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8862 (have_dsp): New global.
8863 (mips_read_description): New, based on mips_arch_setup.
8864 (mips_arch_setup): Reimplement.
8865 (get_usrregs_info): New function.
8866 (mips_cannot_fetch_register, mips_cannot_store_register)
8867 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8868 (mips_fill_fpregset, mips_store_fpregset): Adjust.
8869 (target_regsets): Rename to ...
8870 (mips_regsets): ... this, and make static.
8871 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8872 (dsp_regs_info, regs_info): New globals.
8873 (mips_regs_info): New function.
8874 (the_low_target): Adjust.
8875 (initialize_low_arch): New function.
8876 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8877 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8879 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8880 (arm_read_description): New, with bits factored from
8882 (arm_arch_setup): Reimplement.
8883 (target_regsets): Rename to ...
8884 (arm_regsets): ... this, and make static.
8885 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8886 (arm_regs_info): New function.
8887 (the_low_target): Adjust.
8888 (initialize_low_arch): New function.
8889 * linux-m68k-low.c (tdesc_m68k): Declare.
8890 (target_regsets): Rename to ...
8891 (m68k_regsets): ... this, and make static.
8892 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8893 (m68k_regs_info): New function.
8894 (m68k_arch_setup): New function.
8895 (the_low_target): Adjust.
8896 (initialize_low_arch): New function.
8897 * linux-sh-low.c (tdesc_sharch): Declare.
8898 (target_regsets): Rename to ...
8899 (sh_regsets): ... this, and make static.
8900 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8901 (sh_regs_info, sh_arch_setup): New functions.
8902 (the_low_target): Adjust.
8903 (initialize_low_arch): New function.
8904 * linux-bfin-low.c (tdesc_bfin): Declare.
8905 (bfin_arch_setup): New function.
8906 (bfin_usrregs_info, regs_info): New globals.
8907 (bfin_regs_info): New function.
8908 (the_low_target): Adjust.
8909 (initialize_low_arch): New function.
8910 * linux-cris-low.c (tdesc_cris): Declare.
8911 (cris_arch_setup): New function.
8912 (cris_usrregs_info, regs_info): New globals.
8913 (cris_regs_info): New function.
8914 (the_low_target): Adjust.
8915 (initialize_low_arch): New function.
8916 * linux-cris-low.c (tdesc_crisv32): Declare.
8917 (cris_arch_setup): New function.
8918 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8919 (cris_regs_info): New function.
8920 (the_low_target): Adjust.
8921 (initialize_low_arch): New function.
8922 * linux-m32r-low.c (tdesc_m32r): Declare.
8923 (m32r_arch_setup): New function.
8924 (m32r_usrregs_info, regs_info): New globals.
8925 (m32r_regs_info): Adjust.
8926 (initialize_low_arch): New function.
8927 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8928 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8929 (tic6x_usrregs_info): Forward declare.
8930 (tic6x_read_description): New function, based on ...
8931 (tic6x_arch_setup): ... this. Reimplement.
8932 (target_regsets): Rename to ...
8933 (tic6x_regsets): ... this, and make static.
8934 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8935 (tic6x_regs_info): New function.
8936 (the_low_target): Adjust.
8937 (initialize_low_arch): New function.
8938 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8939 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8940 (target_regsets): Rename to ...
8941 (xtensa_regsets): ... this, and make static.
8942 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8944 (xtensa_arch_setup, xtensa_regs_info): New functions.
8945 (the_low_target): Adjust.
8946 (initialize_low_arch): New function.
8947 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8948 (nios2_arch_setup): Set the current process'es tdesc.
8949 (target_regsets): Rename to ...
8950 (nios2_regsets): ... this.
8951 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8952 (nios2_regs_info): New function.
8953 (the_low_target): Adjust.
8954 (initialize_low_arch): New function.
8955 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8956 (aarch64_arch_setup): Set the current process'es tdesc.
8957 (target_regsets): Rename to ...
8958 (aarch64_regsets): ... this.
8959 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8960 (aarch64_regs_info): New function.
8961 (the_low_target): Adjust.
8962 (initialize_low_arch): New function.
8963 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8965 (target_regsets): Rename to ...
8966 (tile_regsets): ... this.
8967 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8968 (tile_regs_info): New function.
8969 (tile_arch_setup): Set the current process'es tdesc.
8970 (the_low_target): Adjust.
8971 (initialize_low_arch): New function.
8972 * spu-low.c (tdesc_spu): Declare.
8973 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8974 * win32-arm-low.c (tdesc_arm): Declare.
8975 (arm_arch_setup): New function.
8976 (the_low_target): Install arm_arch_setup instead of
8978 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8979 (init_windows_x86): Rename to ...
8980 (i386_arch_setup): ... this. Set `win32_tdesc'.
8981 (the_low_target): Adjust.
8982 * win32-low.c (win32_tdesc): New global.
8983 (child_add_thread): Don't create the thread cache here.
8984 (do_initial_child_stuff): Set the new process'es tdesc.
8985 * win32-low.h (struct target_desc): Forward declare.
8986 (win32_tdesc): Declare.
8987 * lynx-i386-low.c (tdesc_i386): Declare global.
8988 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8989 * lynx-low.c (lynx_tdesc): New global.
8990 (lynx_add_process): Set the new process'es tdesc.
8991 * lynx-low.h (struct target_desc): Forward declare.
8992 (lynx_tdesc): Declare global.
8993 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8994 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8995 * nto-low.c (nto_tdesc): New global.
8996 (do_attach): Set the new process'es tdesc.
8997 * nto-low.h (struct target_desc): Forward declare.
8998 (nto_tdesc): Declare.
8999 * nto-x86-low.c (tdesc_i386): Declare.
9000 (nto_x86_arch_setup): Set `nto_tdesc'.
9002 2013-06-04 Gary Benson <gbenson@redhat.com>
9004 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9005 to qSupported response when appropriate.
9006 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9007 with nonzero-length annex.
9008 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9009 arguments supplied in annex.
9011 2013-05-31 Doug Evans <dje@google.com>
9014 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9015 64 bits in 64-cross-32 environment.
9017 2013-05-28 Pedro Alves <palves@redhat.com>
9019 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9020 (aarch64-without-fpu.c): Delete rule.
9021 * configure.srv (aarch64*-*-linux*): Remove references to
9022 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9023 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9026 2013-05-24 Pedro Alves <palves@redhat.com>
9028 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9029 instead of strchr/decode_address. Error if the range isn't split
9030 with a ','. Don't assume there's be a ':' in the action.
9032 2013-05-23 Yao Qi <yao@codesourcery.com>
9033 Pedro Alves <palves@redhat.com>
9035 * linux-low.c (lwp_in_step_range): New function.
9036 (linux_wait_1): If the thread was range stepping and stopped
9037 outside the stepping range, report the stop to GDB. Otherwise,
9038 continue stepping. Add range stepping debug output.
9039 (linux_set_resume_request): Copy the step range from the resume
9041 (linux_supports_range_stepping): New.
9042 (linux_target_ops) <supports_range_stepping>: Set to
9043 linux_supports_range_stepping.
9044 * linux-low.h (struct linux_target_ops)
9045 <supports_range_stepping>: New field.
9046 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9047 * linux-x86-low.c (x86_supports_range_stepping): New.
9048 (the_low_target) <supports_range_stepping>: Set to
9049 x86_supports_range_stepping.
9050 * server.c (handle_v_cont): Handle 'r' action.
9051 (handle_v_requests): Append ";r" if the target supports range
9053 * target.h (struct thread_resume) <step_range_start,
9054 step_range_end>: New fields.
9055 (struct target_ops) <supports_range_stepping>:
9057 (target_supports_range_stepping): New macro.
9059 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9061 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9062 confusion in comment.
9064 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9066 * lynx-low.c (struct process_info_private): New type.
9067 (lynx_add_process): New function.
9068 (lynx_create_inferior, lynx_attach): Replace calls to
9069 add_process by calls to lynx_add_process.
9070 (lynx_resume): If PTID is null, then try using
9071 current_process()->private->last_wait_event_ptid.
9073 (lynx_clear_inferiors): Delete. The contents of that function
9074 has been inlined in lynx_mourn;
9075 (lynx_wait_1): Save the ptid in the process's private data.
9076 (lynx_mourn): Free the process' private data. Replace call
9077 to lynx_clear_inferiors by call to clear_inferiors.
9079 2013-05-17 Yao Qi <yao@codesourcery.com>
9081 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9084 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9086 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9087 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9088 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9089 PT_TEXT_END_ADDR guards. Update comments.
9090 (linux_target_op) <read_offsets>: Conditionally define to
9091 linux_read_offsets if the target is UCLIBC and if it defines
9092 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9094 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9095 Andrew Jenner <andrew@codesourcery.com>
9097 * Makefile.in (SFILES): Add linux-nios2-low.c.
9098 (clean): Add action to delete nios2-linux.c.
9099 (nios2-linux.c): New rule.
9100 * configure.srv: Add nios2*-*-linux*.
9101 * linux-nios2-low.c: New.
9103 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9105 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9107 2013-04-25 Hui Zhu <hui@codesourcery.com>
9110 * ax.c (ax_printf): Add fflush.
9112 2013-04-22 Tom Tromey <tromey@redhat.com>
9114 * Makefile.in (SFILES): Add filestuff.c.
9115 (OBS): Add filestuff.o.
9116 (filestuff.o): New target.
9117 * config.in, configure: Rebuild.
9118 * configure.ac: Check for fdwalk, pipe2.
9120 2013-04-17 Pedro Alves <palves@redhat.com>
9122 * configure.ac (USE_THREAD_DB): Delete variable.
9123 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9124 Don't AC_SUBST USE_THREAD_DB.
9125 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9126 * config.in, configure: Regenerate.
9128 2013-04-16 Pedro Alves <palves@redhat.com>
9130 * linux-low.h (struct lwp_info) <thread_known>: Move under
9131 the USE_THREAD_DB #ifdef.
9133 2013-04-16 Pedro Alves <palves@redhat.com>
9135 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9136 (linux-low.o): Delete rule.
9137 * linux-low.h: Always include "gdb_thread_db.h" instead of
9138 conditionally including thread_db.h.
9139 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9142 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9144 * Makefile.in (install-only): Fix make install regression.
9146 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9148 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9149 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9151 * gdbserver.1: Remove.
9153 2013-03-22 Pedro Alves <palves@redhat.com>
9155 * linux-low.c (handle_extended_wait): Don't call
9156 linux_enable_event_reporting.
9158 2013-03-15 Tony Theodore <tonyt@logyst.com>
9161 * Makefile.in (SHELL): Use @SHELL@.
9163 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9165 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9168 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9170 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9171 Remove extraneous NULL element.
9173 2013-03-13 Yao Qi <yao@codesourcery.com>
9175 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9176 'V' block in trace frame.
9178 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9180 * target.h (struct target_ops): Add btrace ops.
9181 (target_supports_btrace): New macro.
9182 (target_enable_btrace): New macro.
9183 (target_disable_btrace): New macro.
9184 (target_read_btrace): New macro.
9185 * gdbthread.h (struct thread_info): Add btrace field.
9186 * server.c: Include btrace-common.h.
9187 (handle_btrace_general_set): New function.
9188 (handle_btrace_enable): New function.
9189 (handle_btrace_disable): New function.
9190 (handle_general_set): Call handle_btrace_general_set.
9191 (handle_qxfer_btrace): New function.
9192 (struct qxfer qxfer_packets[]): Add btrace entry.
9193 * inferiors.c (remove_thread): Disable btrace.
9194 * linux-low: Include linux-btrace.h.
9195 (linux_low_enable_btrace): New function.
9196 (linux_low_read_btrace): New function.
9197 (linux_target_ops): Add btrace ops.
9198 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9199 Add srv_linux_btrace=yes.
9200 (x86_64-*-linux*): Add linux-btrace.o.
9201 Add srv_linux_btrace=yes.
9202 * configure.ac: Define HAVE_LINUX_BTRACE.
9203 * config.in: Regenerated.
9204 * configure: Regenerated.
9206 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9208 * server.c (handle_qxfer): Preserve error message if -3 is
9210 (qxfer): Document the -3 return value.
9212 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9214 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9215 (linux_btrace_h): New variable.
9216 (linux-btrace.o): New rule.
9218 2013-03-08 Stan Shebs <stan@codesourcery.com>
9219 Hafiz Abid Qadeer <abidh@codesourcery.com>
9221 * tracepoint.c (trace_buffer_size): New global.
9222 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9223 (init_trace_buffer): Change to one-argument function. Allocate
9224 trace buffer memory.
9225 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9226 handle QTBuffer:size packet.
9227 (cmd_bigqtbuffer_size): New function.
9228 (initialize_tracepoint): Call init_trace_buffer with
9229 DEFAULT_TRACE_BUFFER_SIZE.
9230 * server.c (handle_query): Add QTBuffer:size in the
9233 2013-03-07 Yao Qi <yao@codesourcery.com>
9235 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9236 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9238 (cmd_qtsp): Adjust condition. Do post increment.
9239 Set cur_action and cur_step_action back to 0.
9241 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9244 * linux-low.c (linux_write_memory): Return early success if LEN is
9247 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9249 * configure.srv: Add x86_64-*-cygwin* as target.
9251 2013-02-28 Tom Tromey <tromey@redhat.com>
9253 * configure.ac: Invoke AC_SYS_LARGEFILE.
9254 * configure, config.in: Rebuild.
9256 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9258 * win32-low.c: Throughout, fix format strings and casts of
9259 printf-like functions to avoid type related warnings on all
9261 (get_child_debug_event): Print dwDebugEventCode as hex since
9262 that's how it's usually documented.
9264 2013-02-28 Yao Qi <yao@codesourcery.com>
9266 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9269 2013-02-27 Jiong Wang <jiwang@tilera.com>
9271 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9272 (reg-tilegx32.c): New rule.
9273 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9274 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9275 different register info initializer according to elf class.
9276 (init_registers_tilgx32): New function. The tilegx32 register info
9278 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9279 (tile_store_gregset): Likewise.
9281 2013-02-27 Yao Qi <yao@codesourcery.com>
9283 * server.c (process_point_options): Print debug message when
9284 debug_threads is true.
9286 2013-02-26 Yao Qi <yao@codesourcery.com>
9288 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9290 2013-02-19 Pedro Alves <palves@redhat.com>
9291 Kai Tietz <ktietz@redhat.com>
9295 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9296 instead of strtoul to extract address from packet.
9297 (process_serial_event) <'z'>: Likewise.
9299 2013-02-18 Yao Qi <yao@codesourcery.com>
9301 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9303 2013-02-14 Pedro Alves <palves@redhat.com>
9307 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9308 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9310 2013-02-14 Pedro Alves <palves@redhat.com>
9312 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9314 2013-02-14 Pedro Alves <palves@redhat.com>
9316 * tracepoint.c (save_string): Delete.
9317 (add_tracepoint_action): Use savestring instead of save_string.
9319 2013-02-12 Pedro Alves <palves@redhat.com>
9321 * linux-xtensa-low.c: Ditto.
9322 * xtensa-xtregs.c: Ditto.
9324 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9326 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9329 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9331 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9332 aarch64_num_wp_regs and aarch64_num_bp_regs to
9333 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9335 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9337 * linux-aarch64-low.c (ps_get_thread_area): Replace
9338 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9340 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9341 Marcus Shawcroft <marcus.shawcroft@arm.com>
9342 Nigel Stephens <nigel.stephens@arm.com>
9343 Yufeng Zhang <yufeng.zhang@arm.com>
9345 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9346 (aarch64.c, aarch64-without-fpu.c): New targets.
9347 * configure.srv (aarch64*-*-linux*): New.
9348 * linux-aarch64-low.c: New file.
9350 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9352 * linux-low.c (handle_extended_wait, linux_create_inferior)
9353 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9354 (dequeue_one_deferred_signal, linux_resume_one_thread)
9355 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9356 (linux_tracefork_grandchild, linux_test_for_tracefork)
9357 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9358 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9359 where the argument is 0.
9361 2013-01-25 Yao Qi <yao@codesourcery.com>
9363 * event-loop.c: Include "queue.h".
9364 (gdb_event_p): New typedef.
9365 (struct gdb_event) <next_event>: Remove.
9366 (event_queue): Change to QUEUE(gdb_event_p).
9367 (async_queue_event): Remove.
9368 (gdb_event_xfree): New.
9369 (initialize_event_loop): New.
9370 (process_event): Use API from QUEUE.
9371 (wait_for_event): Likewise.
9372 * server.c (main): Call initialize_event_loop.
9373 * server.h (initialize_event_loop): Declare.
9375 2013-01-18 Yao Qi <yao@codesourcery.com>
9377 * ax.h (struct eval_agent_expr_context): New.
9378 (gdb_eval_agent_expr): Update declaration.
9379 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9380 TFRAME. Add new argument CTX.
9381 * server.h (struct eval_agent_expr_context): Declare.
9382 (agent_mem_read, agent_tsv_read): Update declaration.
9383 (agent_mem_read_string): Likewise.
9384 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9385 (add_traceframe_block): Add new argument TPOINT.
9386 Increase TPOINT->traceframe_usage.
9387 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9388 eval_tracepoint_agent_expr.
9389 (condition_true_at_tracepoint): Likewise.
9390 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9391 (agent_mem_read_string, agent_tsv_read): Likewise.
9393 2013-01-16 Yao Qi <yao@codesourcery.com>
9395 * linux-low.c (linux_resume_one_lwp): Don't check
9396 'lwp->bp_reinsert != 0'.
9398 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9399 Pedro Alves <palves@redhat.com>
9401 * lynx-low.c (ptrace_request_to_str): Define a temporary
9402 macro and use it to simplify this function's implementation.
9404 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9406 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9409 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9411 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9413 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9415 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9417 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9419 * lynx-low.c (lynx_resume): Use the resume_info parameter
9420 to determine the ptid for the lynx_ptrace call, unless
9421 it is equal to minus_one_ptid, in which case we use the
9422 ptid of the current_inferior.
9423 (lynx_wait_1): After having received a thread create/exit
9424 event, resume the inferior's execution using the signaling
9425 thread's ptid, rather than the old ptid.
9427 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9429 * lynx-low.c (lynx_resume): Delete variable ret.
9431 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9433 * gdbreplay.c (gdbreplay_version): Update copyright year.
9434 * server.c (gdbserver_version): Likewise.
9436 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9438 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9441 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9443 * lynx-low.c (ptrace_request_to_str): Add handling for
9446 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9448 * lynx-low.c (lynx_attach): Delete variable new_process.
9450 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9452 * lynx-low.c (lynx_create_inferior): Delete variable
9455 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9457 * lynx-low.c (ptrace_request_to_str): Do not handle
9458 PTRACE_GETTHREADLIST if this macro does not exist.
9460 2012-12-15 Yao Qi <yao@codesourcery.com>
9462 * Makefile.in (OBS): Add notif.o.
9463 * notif.c, notif.h: New.
9464 * server.c: Include "notif.h".
9465 (struct vstop_notif) <next>: Remove.
9467 (queue_stop_reply): Update.
9468 (push_event, send_next_stop_reply): Remove.
9469 (discard_queued_stop_replies): Update.
9470 (notif_stop): New variable.
9471 (handle_v_stopped): Remove.
9472 (handle_v_requests): Don't call handle_v_stopped. Call
9473 handle_ack_notif instead.
9474 (queue_stop_reply_callback): Call notif_event_enque instead
9475 of queue_stop_reply.
9476 (handle_status): Don't call send_next_stop_reply, call
9477 notif_write_event instead.
9478 (kill_inferior_callback): Likewise.
9479 (detach_or_kill_inferior_callback): Likewise.
9480 (main): Call initialize_notif.
9481 (process_serial_event): Call QUEUE_is_empty.
9482 (handle_target_event): Call notif_push instead of push event.
9483 * server.h (push_event): Remove declaration.
9485 2012-12-10 Tom Tromey <tromey@redhat.com>
9487 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9488 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9491 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9492 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9493 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9494 (amd64-linux-ipa.o, ax.o): Rewrite.
9495 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9496 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9497 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9498 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9499 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9500 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9501 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9502 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9503 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9504 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9505 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9506 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9507 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9508 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9509 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9510 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9511 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9512 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9513 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9514 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9515 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9516 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9517 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9518 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9519 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9520 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9521 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9522 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9523 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9524 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9525 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9526 (reg-tilegx.o): Remove.
9527 (all_object_files): New macro.
9528 Include .deps files.
9529 * aclocal.m4, configure: Rebuild.
9530 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9531 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9532 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9534 2012-12-05 Tom Tromey <tromey@redhat.com>
9537 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9539 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9541 * configure.ac: Check for linux/perf_event.h.
9542 * config.in: Regenerated.
9543 * configure: Regenerated.
9545 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9547 * hostio.c (handle_readlink): Decrease buffer size
9548 parameter passed to readlink by one byte.
9550 2012-11-26 Yao Qi <yao@codesourcery.com>
9552 * configure.ac (build_warnings): Append '-Wempty-body'.
9553 * configure: Regenerated.
9554 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9557 2012-11-15 Pierre Muller <muller@sourceware.org>
9559 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9560 * config.in: Regenerate.
9561 * configure: Regenerate.
9562 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9563 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9564 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9565 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9567 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9568 instead of <sys/wait.h> header.
9569 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9571 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9573 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9574 (various make rules): Remove -DGDBSERVER
9576 2012-11-09 Yao Qi <yao@codesourcery.com>
9578 * spu-low.c (current_ptid): Move it to ..
9579 * gdbthread.h: ... here. New.
9580 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9581 * server.c (myresume, process_serial_event): Likewise.
9582 * thread-db.c (thread_db_find_new_threads): Likewise.
9583 * tracepoint.c (run_inferior_command): Likewise.
9585 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9587 * server.c (handle_search_memory_1): Include access length in
9590 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9592 * linux-crisv32-low.c: Fix compile errors.
9594 2012-09-04 Yao Qi <yao@codesourcery.com>
9596 * tracepoint.c (cmd_qtsv): Adjust debug message.
9597 Don't check CUR_TPOINT.
9599 2012-08-28 Yao Qi <yao@codesourcery.com>
9601 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9602 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9603 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9604 Remove declarations of xmalloc, xreallloc, xstrdup and
9606 * Makefile.in (libiberty_h): New.
9607 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9608 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9610 2012-08-23 Yao Qi <yao@codesourcery.com>
9612 * server.h: Remove declaration of 'xsnprintf'.
9614 2012-08-22 Keith Seitz <keiths@redhat.com>
9616 * server.h: Include build-gnulib-gbserver/config.h.
9617 * gdbreplay.c: Likewise.
9619 2012-08-08 Doug Evans <dje@google.com>
9621 * Makefile.in (SFILES): Add gdb_vecs.c.
9622 (OBS): Add gdb_vecs.o.
9623 (gdb_vecs_h, host_defs_h): New variables.
9624 (thread-db.o): Add $(gdb_vecs_h) dependency.
9625 (gdb_vecs.o): New rule.
9626 * thread-db.c: #include "gdb_vecs.h".
9627 (thread_db_load_search): Use a vector to iterate over path elements.
9628 Handle text appearing after "$pdir".
9630 * configure.ac: Add check for strstr.
9631 * config.in: Regenerate.
9632 * configure: Regenerate.
9634 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9636 * hostio.c (handle_pread): If pread fails, fall back to attempting
9638 (handle_pwrite): Likewise for pwrite.
9640 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9642 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9643 between unsupported TYPE and unimplementable ADDR/LEN combination.
9644 (arm_insert_point): Act on new return value.
9646 2012-07-31 Pedro Alves <palves@redhat.com>
9648 * server.c (process_point_options): Only skip tokens if we find
9649 one that is unrecognized. Don't treat 'X' specially while
9650 skipping unrecognized tokens.
9652 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9654 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9655 to 4-byte-align HW breakpoint addresses for Thumb.
9657 2012-07-27 Yao Qi <yao@codesourcery.com>
9661 * server.h: Declare gdb_agent_about_to_close.
9662 * target.c (kill_inferior): Include "agent.h".
9663 New. Send command 'kill'.
9664 * target.h (kill_inferior): Removed macro.
9665 * tracepoint.c (gdb_agent_about_to_close): New.
9666 (gdb_agent_helper_thread): Handle command 'close'.
9667 Wait endlessly until the inferior stops.
9668 Install gdb_agent_remove_socket to atexit hook.
9669 (agent_socket_name): New static variable.
9670 (gdb_agent_socket_init): Replace local variable 'name' with
9671 'agent_socket_name'.
9672 (gdb_agent_remove_socket): New.
9674 2012-07-27 Yao Qi <yao@codesourcery.com>
9676 * server.c (process_point_options): Stop at 'X' when parsing.
9678 2012-07-19 Michael Eager <eager@eagercon.com>
9680 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9682 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9683 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9684 hardware breakpoint.
9686 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9688 * gdbserver/linux-low.c (initialize_low): Call
9689 linux_ptrace_init_warnings.
9691 2012-07-02 Doug Evans <dje@google.com>
9693 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9696 2012-07-02 Stan Shebs <stan@codesourcery.com>
9698 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9699 (ax.o): Add it to build rule.
9701 (OBS): Add format.o.
9702 (IPA_OBS): Add format.o.
9703 * server.c (handle_query): Claim support for breakpoint commands.
9704 (process_point_options): Add command case.
9705 (process_serial_event): Leave running if there are printfs in
9707 * mem-break.h (any_persistent_commands): Declare.
9708 (add_breakpoint_commands): Declare.
9709 (gdb_no_commands_at_breakpoint): Declare.
9710 (run_breakpoint_commands): Declare.
9711 * mem-break.c (struct point_command_list): New struct.
9712 (struct breakpoint): New field command_list.
9713 (any_persistent_commands): New function.
9714 (add_commands_to_breakpoint): New function.
9715 (add_breakpoint_commands): New function.
9716 (gdb_no_commands_at_breakpoint): New function.
9717 (run_breakpoint_commands): New function.
9718 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9720 * ax.c: Include format.h.
9721 (ax_printf): New function.
9722 (gdb_eval_agent_expr): Add printf opcode.
9724 2012-06-13 Yao Qi <yao@codesourcery.com>
9726 * server.c (start_inferior): Remove duplicated writes to fields
9727 'last_resume_kind' and 'last_status' of 'current_inferior'.
9729 2012-06-12 Yao Qi <yao@codesourcery.com>
9730 Pedro Alves <palves@redhat.com>
9732 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9734 * server.c (handle_v_cont): Extend comment.
9736 2012-06-11 Yao Qi <yao@codesourcery.com>
9738 * linux-low.c (linux_attach): Add 'static'.
9740 2012-06-06 Yao Qi <yao@codesourcery.com>
9742 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9744 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9746 Fix gcc -flto compilation warning.
9747 * server.c (main): Make variable multi_mode and attach volatile.
9749 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9751 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9752 if the platform doesn't know about it.
9754 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9756 * Makefile.in (SFILES): Add linux-tile-low.c.
9757 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9758 * configure.srv: Handle tilegx-*-linux*.
9759 * linux-tile-low.c: New file.
9761 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9763 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9765 2012-05-24 Pedro Alves <palves@redhat.com>
9769 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9771 2012-05-24 Pedro Alves <palves@redhat.com>
9775 Replace target_signal with gdb_signal throughout.
9777 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9779 * linux-low.c (linux_store_registers): Avoid the copying sequence
9780 when no data has been retrieved by ptrace.
9782 2012-05-22 Will Deacon <will.deacon@arm.com>
9784 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9785 Include asm/ptrace.h.
9786 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9789 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9791 * linux-low.c (linux_store_registers): Don't re-retrieve data
9792 with ptrace that has already been obtained from /proc. Always
9793 copy any data retrieved with ptrace to the buffer supplied.
9795 2012-05-11 Yao Qi <yao@codesourcery.com>
9796 Pedro Alves <palves@redhat.com>
9798 * linux-low.c (enum stopping_threads_kind): New.
9799 (stopping_threads): Change type to `enum stopping_threads_kind'.
9800 (handle_extended_wait): If stopping and suspending threads, leave
9801 the new_lwp suspended too.
9802 (linux_wait_for_event): Adjust.
9803 (stop_all_lwps): Set `stopping_threads' to
9804 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9805 whether we're suspending threads or just stopping them. Assert no
9808 2012-04-29 Yao Qi <yao@codesourcery.com>
9810 * server.h: Move some code to ...
9811 * gdbthread.h: ... here. New.
9812 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9813 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9814 (nto-low.o, win32-low.o): Likewise.
9815 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9816 * regcache.c, remote-utils.c, server.c: Likewise.
9817 * target.c, tracepoint.c, win32-low.c: Likewise.
9819 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9821 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9822 (PTRACE_ARG4_TYPE): Likewise.
9823 (PTRACE_XFER_TYPE): Likewise.
9824 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9825 ptrace to PTRACE_ARG3_TYPE.
9826 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9827 (PTRACE_ARG4_TYPE): Likewise.
9828 (PTRACE_XFER_TYPE): Likewise.
9829 (linux_detach_one_lwp): Cast fourth argument of
9830 ptrace to long then PTRACE_ARG4_TYPE.
9831 (regsets_fetch_inferior_registers): Cast third argument of
9832 ptrace to long then PTRACE_ARG3_TYPE.
9833 (regsets_store_inferior_registers): Likewise.
9835 2012-04-20 Pedro Alves <palves@redhat.com>
9837 * configure: Regenerate.
9839 2012-04-19 Pedro Alves <palves@redhat.com>
9841 * Makefile.in (GNULIB_BUILDDIR): New.
9842 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9843 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9844 (all, install-only, uninstall, clean-info, all-lib, clean): No
9845 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9846 (maintainer-clean realclean distclean): Use subdir_do.
9848 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
9849 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
9850 * acinclude.m4: Include acx_configure_dir.m4.
9851 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9852 calls. Call AC_PROG_RANLIB. Configure gnulib using
9855 (GNULIB_STDINT_H): Adjust.
9856 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9857 * gdbreplay.c: Include build-gnulib/config.h.
9858 * server.h: Likewise.
9859 * aclocal.m4: Regenerate.
9860 * config.in: Regenerate.
9861 * configure: Regenerate.
9863 2012-04-19 Pedro Alves <palves@redhat.com>
9865 * Makefile.in (LIBGNU, INCGNU): Adjust.
9866 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9867 (all, install-only, uninstall, clean-info, all-lib, clean)
9868 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9869 * configure.ac: Adjust AC_OUTPUT output.
9870 * aclocal.m4: Regenerate.
9871 * configure: Regenerate.
9873 2012-04-19 Pedro Alves <palves@redhat.com>
9875 * Makefile.in (generated_files): New.
9876 (server_h): Remove the explicit dependency on config.h, and depend
9877 on $generated_files.
9879 2012-04-19 Pedro Alves <palves@redhat.com>
9881 * Makefile.in (INCGNU): Add -Ignulib.
9883 2012-04-19 Pedro Alves <palves@redhat.com>
9885 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9886 (INCGNU): ... this, and spell out -I here.
9887 (GNULIB_LIB): Rename to ...
9889 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9891 2012-04-19 Pedro Alves <palves@redhat.com>
9893 * config.in: Regenerate.
9895 2012-04-19 Pedro Alves <palves@redhat.com>
9897 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9898 * server.h (memmem): Remove declaration.
9899 * config.in: Regenerate.
9900 * configure: Regenerate.
9902 2012-04-19 Yao Qi <yao@codesourcery.com>
9904 * Makefile.in (SFILES): Add common/vec.c.
9908 2012-04-19 Yao Qi <yao@codesourcery.com>
9910 * remote-utils.c (prepare_resume_reply): Replace with macro
9911 target_core_of_thread.
9912 * server.c (handle_qxfer_threads_proper): Likewise.
9913 * target.h (traget_core_of_thread): New macro.
9915 2012-04-18 Pedro Alves <palves@redhat.com>
9917 * aclocal.m4: Regenerate.
9918 * configure: Regenerate.
9920 2012-04-16 Yao Qi <yao@codesourcery.com>
9922 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9923 duplicated on address.
9925 2012-04-16 Yao Qi <yao@codesourcery.com>
9927 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9928 (struct tracepoint_action_ops) <send>: New field.
9929 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9930 (agent_expr_send, x_tracepoint_action_send): New.
9931 (l_tracepoint_action_send): New.
9932 (cmd_qtdp): Download and install tracepoint
9933 according to `use_agent'.
9934 (run_inferior_command): Add one more parameter `len'.
9936 (tracepoint_send_agent): New.
9937 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9939 2012-04-16 Yao Qi <yao@codesourcery.com>
9941 * tracepoint.c (download_tracepoints): Moved to ...
9942 (cmd_qtstart): ... here.
9944 2012-04-14 Yao Qi <yao@codesourcery.com>
9946 * tracepoint.c: Include inttypes.h.
9947 (struct collect_memory_action): Use sized types.
9948 (struct tracepoint): Likewise.
9949 (cmd_qtdp, stop_tracing): Update print specifiers.
9950 (cmd_qtp, response_tracepoint): Likewise.
9951 (collect_data_at_tracepoint): Likewise.
9952 (collect_data_at_step): Likewise.
9954 2012-04-14 Yao Qi <yao@codesourcery.com>
9956 Import gnulib module inttypes.
9957 * aclocal.m4, config.in, configure: Regenerated.
9959 2012-04-14 Yao Qi <yao@codesourcery.com>
9961 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9962 Makefile and config.status at last.
9964 2012-04-13 Yao Qi <yao@codesourcery.com>
9966 * tracepoint.c: Include stdint.h unconditionally.
9968 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9970 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9971 on BFD_HAVE_SYS_PROCFS_TYPE.
9972 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9973 * configure: Regenerate.
9974 * config.in: Likewise.
9976 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9978 * Makefile.in (clean): Also remove x32.c x32-linux.c
9979 x32-avx.c x32-avx-linux.c.
9980 (x32.o): New target.
9982 (x32-linux.o): Likewise.
9983 (x32-linux.c): Likewise.
9984 (x32-avx.o): Likewise.
9985 (x32-avx.c): Likewise.
9986 (x32-avx-linux.o): Likewise.
9987 (x32-avx-linux.c): Likewise.
9989 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9990 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9991 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9992 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9993 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9994 i386/x32-avx-linux.xml.
9996 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9997 (init_registers_x32_avx_linux): Likwise.
9998 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9999 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10001 2012-04-13 Pedro Alves <palves@redhat.com>
10003 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10004 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10005 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10006 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10009 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10011 * linux-x86-low.c (compat_x32_clock_t): New.
10012 (compat_x32_siginfo_t): Likewise.
10013 (compat_x32_siginfo_from_siginfo): Likewise.
10014 (siginfo_from_compat_x32_siginfo): Likewise.
10015 (linux_is_elf64): Likewise.
10016 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10017 and siginfo_from_compat_x32_siginfo for x32.
10018 (x86_arch_setup): Set linux_is_elf64.
10020 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10023 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10025 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10026 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10027 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10028 compatible with process.
10030 2012-04-12 Yao Qi <yao@codesourcery.com>
10032 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10033 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10034 (install-only, install-info, clean): Handle sub dir gnulib.
10035 (all-lib, am--refresh): New targets.
10036 (memmem.o): Remove target.
10037 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10038 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10039 (AC_REPLACE_FUNCS): Remove memmem.
10040 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10041 (AC_OUTPUT): Generate Makefile in gnulib/.
10042 * aclocal.m4, config.in, configure: Regenerated.
10044 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10046 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10048 2012-04-05 Pedro Alves <palves@redhat.com>
10050 -Werror=strict-aliasing
10052 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10055 2012-04-04 Pedro Alves <palves@redhat.com>
10057 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10058 (sparc_store_gregset_from_stack, sparc_store_gregset)
10059 (sparc_breakpoint_at): Fix formatting.
10061 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10063 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10065 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10066 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10067 * config.in: Regenerate.
10068 * configure: Likewise.
10070 2012-03-29 Pedro Alves <palves@redhat.com>
10072 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10073 Correct ptrace arguments.
10075 2012-03-28 Pedro Alves <palves@redhat.com>
10077 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10078 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10079 (IA64_FR1_REGNUM): New defines.
10080 (ia64_fetch_register): New.
10081 (the_low_target): Install it.
10082 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10084 * linux-low.c (linux_fetch_registers): Try the
10085 the_low_target.fetch_register hook first.
10087 * linux-arm-low.c (the_low_target): Adjust.
10088 * linux-bfin-low.c (the_low_target): Adjust.
10089 * linux-cris-low.c (the_low_target): Adjust.
10090 * linux-crisv32-low.c (the_low_target): Adjust.
10091 * linux-m32r-low.c (the_low_target): Adjust.
10092 * linux-m68k-low.c (the_low_target): Adjust.
10093 * linux-mips-low.c (the_low_target): Adjust.
10094 * linux-ppc-low.c (the_low_target): Adjust.
10095 * linux-s390-low.c (the_low_target): Adjust.
10096 * linux-sh-low.c (the_low_target): Adjust.
10097 * linux-sparc-low.c (the_low_target): Adjust.
10098 * linux-tic6x-low.c (the_low_target): Adjust.
10099 * linux-x86-low.c (the_low_target): Adjust.
10100 * linux-xtensa-low.c (the_low_target): Adjust.
10102 2012-03-26 Pedro Alves <palves@redhat.com>
10104 * server.c (handle_qxfer_libraries): Don't bail early if
10105 the_target->qxfer_libraries_svr4 is not NULL.
10107 2012-03-26 Pedro Alves <palves@redhat.com>
10109 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10111 2012-03-23 Pedro Alves <palves@redhat.com>
10113 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10114 "library-list-svr4" element's start tag when the the DSO list is
10117 2012-03-23 Pedro Alves <palves@redhat.com>
10119 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10120 a variable whose type size is the same as the inferior's pointer
10123 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10125 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10127 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10128 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10129 * linux-low.h: Include <signal.h>.
10130 (struct siginfo): Remove forward declaration.
10131 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10134 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10136 * .gitignore: Ignore more files.
10138 2012-03-19 Pedro Alves <palves@redhat.com>
10139 Jan Kratochvil <jan.kratochvil@redhat.com>
10141 * server.c (cont_thread, general_thread): Add describing comments.
10142 (start_inferior): Clear `cont_thread'.
10143 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10146 2012-03-15 Yao Qi <yao@codesourcery.com>
10148 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10150 (cmd_qtdp): ... here.
10152 2012-03-15 Yao Qi <yao@codesourcery.com>
10154 * tracepoint.c (struct tracepoint_action_ops): New.
10155 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10156 (m_tracepoint_action_download): New.
10157 (r_tracepoint_action_download): New.
10158 (x_tracepoint_action_download): New.
10159 (l_tracepoint_action_download): New.
10160 (add_tracepoint_action): Install `action->ops' according type.
10161 (download_tracepoint_1): Move code `download' function pointer
10162 of various tracepoint_action_ops.
10164 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10166 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10167 linux_ptrace_attach_warnings.
10169 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10171 * Makefile.in (linux-ptrace.o): New.
10172 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10173 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10174 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10175 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10176 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10178 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10180 2012-03-08 Yao Qi <yao@codesourcery.com>
10181 Pedro Alves <palves@redhat.com>
10183 Fix PR server/13392.
10184 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10185 offset of JMP insn.
10186 * tracepoint.c (remove_tracepoint): New.
10187 (cmd_qtdp): Call remove_tracepoint when failed to install.
10189 2012-03-07 Pedro Alves <palves@redhat.com>
10191 * linux-low.c (get_detach_signal): New.
10192 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10193 Pass on pending signals to PTRACE_DETACH. Check the result of the
10195 * server.c (program_signals, program_signals_p): New.
10196 (handle_general_set): Handle QProgramSignals.
10197 * server.h (program_signals, program_signals_p): Declare.
10199 2012-03-05 Pedro Alves <palves@redhat.com>
10200 Jan Kratochvil <jan.kratochvil@redhat.com>
10202 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10205 2012-03-03 Yao Qi <yao@codesourcery.com>
10207 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10208 agent_look_up_symbols.
10210 2012-03-03 Yao Qi <yao@codesourcery.com>
10212 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10213 (linux-x86-low.o): Likewise.
10214 * server.h: Remove in_process_agent_loaded.
10215 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10219 2012-03-03 Yao Qi <yao@codesourcery.com>
10221 * tracepoint.c (gdb_agent_capability): New global.
10222 (in_process_agent_loaded_ust): Renamed to
10223 `in_process_agent_supports_ust'.
10225 (in_process_agent_supports_ust): Call agent_capability_check.
10226 (clear_installed_tracepoints): Assert that agent supports
10229 2012-03-03 Yao Qi <yao@codesourcery.com>
10231 * linux-low.c (linux_supports_agent): New.
10232 (linux_target_ops): Initialize field `supports_agent' with
10233 linux_supports_agent.
10234 * target.h (struct target_ops) <supports_agent>: New.
10235 (target_supports_agent): New macro.
10236 * server.c (handle_general_set): Handle packet 'QAgent'.
10237 (handle_query): Send `QAgent+'.
10238 * Makefile.in (server.o): Depends on agent.h.
10240 2012-03-03 Yao Qi <yao@codesourcery.com>
10242 * Makefile.in (OBS): Add agent.o.
10243 Add new rule for agent.o.
10244 Track dependence of tracepoint.c on agent.h.
10245 * tracepoint.c (run_inferior_command_1):
10246 (run_inferior_command): Call agent_run_command.
10247 (gdb_ust_connect_sync_socket): Deleted. Move it to
10249 (resume_thread, stop_thread): Likewise.
10250 (gdb_ust_socket_init): Renamed to ...
10251 (gdb_agent_socket_init): ... New.
10252 (gdb_ust_thread): Renamed to ...
10253 (gdb_agent_helper_thread): ... New.
10254 (gdb_ust_init): Move some code to ...
10255 (gdb_agent_init): ... here. New.
10256 [HAVE_UST]: Call gdb_ust_init.
10257 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10258 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10259 * config.in, configure: Regenerated.
10261 2012-03-02 Pedro Alves <palves@redhat.com>
10263 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10264 * linux-low.c (struct simple_pid_list): New.
10265 (stopped_pids): New a struct simple_pid_list pointer.
10266 (add_to_pid_list, pull_pid_from_list): New.
10267 (handle_extended_wait): Don't assume the first signal new children
10268 report is SIGSTOP. Adjust call to pull_pid_from_list.
10269 (linux_wait_for_lwp): Adjust.
10271 2012-03-02 Yao Qi <yao@codesourcery.com>
10273 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10276 2012-03-02 Yao Qi <yao@codesourcery.com>
10278 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10279 `stop_pc' and `tpoint'. Update caller.
10281 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10283 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10284 * linux-low.c (use_linux_regsets): New macro.
10285 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10286 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10287 (linux_register_in_regsets): New function.
10288 (usr_fetch_inferior_registers): Skip registers covered by
10290 (usr_store_inferior_registers): Likewise.
10291 (usr_fetch_inferior_registers): New macro.
10292 (usr_store_inferior_registers): Likewise.
10293 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10294 (linux_store_registers): Likewise.
10295 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10297 (init_registers_mips64_dsp_linux): Likewise.
10298 (init_registers_mips_linux): New macro.
10299 (init_registers_mips_dsp_linux): Likewise.
10300 (mips_dsp_num_regs): Likewise.
10301 (DSP_BASE, DSP_CONTROL): New fallback macros.
10302 (mips_base_regs): New macro.
10303 (mips_regmap): Use it. Fix the size.
10304 (mips_dsp_regmap): New variable.
10305 (mips_dsp_regset_bitmap): Likewise.
10306 (mips_arch_setup): New function.
10307 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10309 (mips_cannot_store_register): Likewise.
10310 (the_low_target): Update .arch_setup, .num_regs and .regmap
10311 initializers. Add .regset_bitmap initializer.
10312 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10314 * linux-bfin-low.c (the_low_target): Likewise.
10315 * linux-cris-low.c (the_low_target): Likewise.
10316 * linux-crisv32-low.c (the_low_target): Likewise.
10317 * linux-ia64-low.c (the_low_target): Likewise.
10318 * linux-m32r-low.c (the_low_target): Likewise.
10319 * linux-m68k-low.c (the_low_target): Likewise.
10320 * linux-ppc-low.c (the_low_target): Likewise.
10321 * linux-s390-low.c (the_low_target): Likewise.
10322 * linux-sh-low.c (the_low_target): Likewise.
10323 * linux-sparc-low.c (the_low_target): Likewise.
10324 * linux-tic6x-low.c (the_low_target): Likewise.
10325 * linux-x86-low.c (the_low_target): Likewise.
10326 * linux-xtensa-low.c (the_low_target): Likewise.
10327 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10328 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10329 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10331 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10332 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10334 2012-02-29 Yao Qi <yao@codesourcery.com>
10335 Pedro Alves <palves@redhat.com>
10337 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10338 `step_over_finished' is true.
10340 2012-02-27 Pedro Alves <palves@redhat.com>
10342 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10343 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10345 2012-02-27 Pedro Alves <palves@redhat.com>
10348 * linux-low.c (pid_is_stopped): New.
10349 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10351 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10353 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10356 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10358 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10360 2012-02-24 Luis Machado <lgustavo@codesourcery>
10362 * server.c (handle_query): Advertise support for target-side
10363 breakpoint condition evaluation.
10364 (process_point_options): New function.
10365 (process_serial_event): When inserting a breakpoint, check for
10366 a target-side condition that should be evaluated.
10368 * mem-break.c: Include regcache.h and ax.h.
10369 (point_cond_list_t): New data structure.
10370 (breakpoint) <cond_list>: New field.
10371 (find_gdb_breakpoint_at): Make non-static.
10372 (delete_gdb_breakpoint_at): Clear any target-side
10374 (clear_gdb_breakpoint_conditions): New function.
10375 (add_condition_to_breakpoint): Likewise.
10376 (add_breakpoint_condition): Likewise.
10377 (gdb_condition_true_at_breakpoint): Likewise.
10378 (gdb_breakpoint_here): Return result directly instead
10379 of going through a local variable.
10381 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10382 (clear_gdb_breakpoint_conditions): Likewise.
10383 (add_breakpoint_condition): Likewise.
10384 (gdb_condition_true_at_breakpoint): Likewise.
10386 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10387 (need_step_over_p): Take target-side breakpoint condition into
10390 2012-02-24 Luis Machado <lgustavo@codesourcery>
10392 * server.h: Include tracepoint.h.
10393 (agent_mem_read, agent_get_trace_state_variable_value,
10394 agent_set_trace_state_variable_value,
10395 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10396 get_set_tsv_func_addr): New prototypes.
10398 * ax.h: New include file.
10399 * ax.c: New source file.
10401 * tracepoint.c: Include ax.h.
10402 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10403 agent_expr, eval_result_type): Move to ax.h.
10404 (parse_agent_expr): Rename to ...
10405 (gdb_parse_agent_expr): ... this, make it non-static and move
10407 (unparse_agent_expr) Rename to ...
10408 (gdb_unparse_agent_expr): ... this, make it non-static and move
10410 (eval_agent_expr): Rename to ...
10411 (eval_tracepoint_agent_expr): ... this.
10412 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10413 forward declarations.
10414 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10415 (agent_get_trace_state_variable_value): New function.
10416 (agent_set_trace_state_variable_value): New function.
10417 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10418 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10419 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10420 (condition_true_at_tracepoint): Likewise.
10421 (parse_agent_expr): Rename to ...
10422 (gdb_parse_agent_expr): ... this and move to ax.c.
10423 (unparse_agent_expr): Rename to ...
10424 (gdb_unparse_agent_expr): ... this and move to ax.c.
10425 (gdb_agent_op_name): Move to ax.c.
10426 (eval_agent_expr): Rename to ...
10427 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10429 (eval_tracepoint_agent_expr): New function.
10430 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10432 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10434 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10435 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10436 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10437 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10438 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10439 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10440 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10441 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10442 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10443 (compile_bytecodes): Remove forward declaration.
10444 (is_goto_target): Move to ax.c.
10445 (compile_bytecodes): Move to ax.c and call
10446 agent_get_trace_state_variable_value (...) and
10447 agent_set_trace_state_variable_value (...).
10449 * Makefile.in: Update ax.c and IPA dependencies.
10451 2012-02-24 Pedro Alves <palves@redhat.com>
10453 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10454 (cmd_bigqtbuffer_circular): ... this. Only handle
10455 'QTBuffer:circular:'.
10456 (handle_tracepoint_general_set): Adjust.
10458 2012-02-16 Yao Qi <yao@codesourcery.com>
10460 * inferiors.c: Move code to ...
10461 * dll.c: .... here. New.
10462 * server.h: Declare clear_dlls.
10463 * Makefile.in (SFILES): Add dll.c.
10467 2012-02-11 Yao Qi <yao@codesourcery.com>
10469 * server.c: (handle_monitor_command): Add a new parameter
10471 (handle_query): Update caller.
10473 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10475 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10476 * configure, config.in: Regenerate.
10477 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10480 2012-02-02 Pedro Alves <palves@redhat.com>
10482 Try SIGKILL first, then PTRACE_KILL.
10483 * linux-low.c (linux_kill_one_lwp): New.
10484 (linux_kill_one_lwp): Rename to ...
10485 (kill_one_lwp_callback): ... this. Use the new
10486 linux_kill_one_lwp.
10488 2012-02-02 Pedro Alves <palves@redhat.com>
10490 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10493 2012-01-27 Pedro Alves <palves@redhat.com>
10495 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10496 (elf_64_file_p): Make static.
10497 (linux_pid_exe_is_elf_64_file): New.
10498 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10499 Delete declarations.
10500 (linux_pid_exe_is_elf_64_file): Declare.
10501 * linux-x86-low.c (x86_arch_setup): Use
10502 linux_pid_exe_is_elf_64_file.
10504 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10506 * linux-low.c (linux_wait_for_event_1): Rename to ...
10507 (linux_wait_for_event): ... here and merge it with former
10508 linux_wait_for_event - new variable wait_ptid, use it.
10509 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10511 2012-01-23 Pedro Alves <palves@redhat.com>
10513 * server.c (main): Avoid yet another case of infinite loop while
10514 detaching/killing after a longjmp.
10516 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10519 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10521 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10523 * hostio.c (handle_readlink): New function.
10524 (handle_vFile): Call it to handle "vFile:readlink" packets.
10526 2012-01-20 Pedro Alves <palves@redhat.com>
10527 Ulrich Weigand <ulrich.weigand@linaro.org>
10529 * server.c (handle_v_requests): Only support vAttach and vRun to
10530 start multiple processes when in extended protocol mode.
10532 2012-01-17 Pedro Alves <palves@redhat.com>
10534 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10535 memalign plus mprotect to allocate the scratch buffer.
10537 2012-01-13 Pedro Alves <palves@redhat.com>
10539 * server.c (attach_inferior): Clear `cont_thread'.
10541 2012-01-13 Pedro Alves <palves@redhat.com>
10543 * server.c (main): Avoid infinite loop while detaching/killing
10546 2012-01-09 Doug Evans <dje@google.com>
10548 * server.c (start_inferior): Set last_ptid in --wrapper case.
10550 2012-01-06 Yao Qi <yao@codesourcery.com>
10552 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10554 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10556 2012-01-04 Yao Qi <yao@codesourcery.com>
10558 * tracepoint.c (cmd_qtdp): Print debug message
10559 for static tracepoint.
10561 2012-01-04 Yao Qi <yao@codesourcery.com>
10563 * tracepoint.c (trace_vdebug): Differentiate debug message
10564 between gdbserver and IPA.
10566 2012-01-03 Yao Qi <yao@codesourcery.com>
10568 * tracepoint.c (tracepoint_was_hit): Don't collect for
10571 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10573 * terminal.h: Reformat copyright header.
10575 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10577 * server.c (gdbserver_version): Update copyright year.
10578 * gdbreplay.c (gdbreplay_version): Likewise.
10580 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10582 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10585 2011-12-18 Hui Zhu <teawater@gmail.com>
10586 * linux-low.c (linux_create_inferior): Save return value to ret.
10588 2011-12-18 Hui Zhu <teawater@gmail.com>
10590 * linux-low.c (linux_create_inferior): Save return value to ret.
10592 2011-12-16 Doug Evans <dje@google.com>
10594 * linux-low.c (linux_create_inferior): If stdio connection,
10595 redirect stdin from /dev/null, stdout to stderr.
10596 * remote-utils.c (remote_is_stdio): New static global.
10597 (remote_connection_is_stdio): New function.
10598 (remote_prepare): Handle stdio connection.
10599 (remote_open): Ditto.
10600 (remote_close): Don't close stdin for stdio connections.
10601 (read_prim,write_prim): New functions. Replace all calls to
10602 read/write to these.
10603 * server.c (main): Watch for "-" argument. Move call to
10604 remote_prepare before start_inferior.
10605 * server.h (STDIO_CONNECTION_NAME): New macro.
10606 (remote_connection_is_stdio): Declare.
10608 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10609 in debugging output.
10611 2011-12-15 Yao Qi <yao@codesourcery.com>
10613 * tracepoint.c: Include sys/syscall.h.
10614 (gdb_ust_thread): Remove preprocessor conditional.
10616 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10618 * linux-low.c (linux_detach_one_lwp): Call
10619 the_low_target.prepare_to_resume before detaching.
10621 2011-12-14 Yao Qi <yao@codesourcery.com>
10623 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10626 2011-12-14 Yao Qi <yao@codesourcery.com>
10628 * i386-low.c (i386_low_stopped_data_address): Initialize local
10629 variable `control'.
10631 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10635 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10636 DR_CONTROL unless necessary. Extend comments.
10637 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10638 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10640 2011-12-13 Yao Qi <yao@codesourcery.com>
10642 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10644 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10646 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10648 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10649 Print new debug message for such case.
10651 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10653 Fix overlapping memcpy.
10654 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10655 the read_inferior_memory transfer.
10656 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10657 write_inferior_memory transfer.
10658 (set_fast_tracepoint_jump): New variable buf. Use it for the
10659 read_inferior_memory and write_inferior_memory transfers.
10660 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10661 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10662 Use it for the write_inferior_memory transfer.
10663 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10666 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10668 * linux-low.c (fetch_register, store_register): Make code
10669 consistent, fix formatting.
10671 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10673 * linux-low.c (usr_store_inferior_registers): Factor out code
10674 to handle individual registers into...
10675 (store_register): ... this new function.
10677 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10679 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10680 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10681 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10682 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10683 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10684 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10685 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10686 (srv_xmlfiles): Add new XML files.
10688 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10690 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10691 (init_registers_s390_linux32v1): Add prototype.
10692 (init_registers_s390_linux32v2): Likewise.
10693 (init_registers_s390_linux64v1): Likewise.
10694 (init_registers_s390_linux64v2): Likewise.
10695 (init_registers_s390x_linux64v1): Likewise.
10696 (init_registers_s390x_linux64v2): Likewise.
10697 (s390_num_regs): Increment to 52.
10698 (s390_regmap): Add orig_r2 register.
10699 (s390_num_regs_3264): Increment to 68.
10700 (s390_regmap_3264): Add orig_r2 register.
10701 (s390_collect_ptrace_register): Handle orig_r2 register.
10702 (s390_supply_ptrace_register): Likewise.
10703 (s390_fill_last_break): New function.
10704 (s390_store_last_break): Likewise.
10705 (s390_fill_system_call): New function.
10706 (s390_store_system_call): Likewise.
10707 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10709 (s390_check_regset): New function.
10710 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10711 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10712 Update target_regsets for available register sets.
10714 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10715 Jan Kratochvil <jan.kratochvil@redhat.com>
10717 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10718 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10720 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10721 * linux-low.h (struct process_info_private): New member r_debug.
10722 * server.c (handle_qxfer_libraries): Call
10723 the_target->qxfer_libraries_svr4.
10724 (handle_qxfer_libraries_svr4): New function.
10725 (qxfer_packets): New entry "libraries-svr4".
10726 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10727 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10728 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10729 PACKET_qXfer_libraries_svr4.
10731 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10733 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10734 PSW address/mask between 8-byte and 16-byte formats.
10735 (s390_supply_ptrace_register): Likewise.
10736 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10737 basic addressing mode bit.
10739 2011-11-24 Stan Shebs <stan@codesourcery.com>
10741 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10743 2011-11-17 Stan Shebs <stan@codesourcery.com>
10745 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10746 (tracing_start_time): New global.
10747 (tracing_stop_time): New global.
10748 (tracing_user_name): New global.
10749 (tracing_notes): New global.
10750 (tracing_stop_note): New global.
10751 (cmd_qtstart): Set traceframe_usage, start_time.
10752 (stop_tracing): Set stop_time.
10753 (cmd_qtstatus): Report additional status.
10754 (cmd_qtp): New function.
10755 (handle_tracepoint_query): Call it.
10756 (cmd_qtnotes): New function.
10757 (handle_tracepoint_general_set): Call it.
10758 (get_timestamp): Rename from tsv_get_timestamp.
10760 2011-11-14 Stan Shebs <stan@codesourcery.com>
10761 Kwok Cheung Yeung <kcy@codesourcery.com>
10763 * linux-x86-low.c (small_jump_insn): New.
10764 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10765 trampoline and error message, build a trampoline and issue a small
10766 jump instruction to it.
10767 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10768 trampoline and error message.
10769 (x86_get_min_fast_tracepoint_insn_len): New.
10770 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10771 * linux-low.h (struct linux_target_ops): Add arguments to
10772 install_fast_tracepoint_jump_pad operation, add new operation.
10773 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10775 (linux_get_min_fast_tracepoint_insn_len): New function.
10776 (linux_target_op): Add new operation.
10777 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10778 (gdb_trampoline_buffer_end): Ditto.
10779 (gdb_trampoline_buffer_error): Ditto.
10780 (struct ipa_sym_addresses): Add fields for new IPA variables.
10781 (symbol_list): Add entries for new IPA variables.
10782 (struct tracepoint): Add fields to hold the address range of the
10783 trampoline used by the tracepoint.
10784 (trampoline_buffer_head): New static variable.
10785 (trampoline_buffer_tail): Ditto.
10786 (claim_trampoline_space): New function.
10787 (have_fast_tracepoint_trampoline_buffer): New function.
10788 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10790 (install_fast_tracepoint): Ditto, also add error buffer argument.
10791 (cmd_qtminftpilen): New function.
10792 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10793 (fast_tracepoint_from_trampoline_address): New function.
10794 (fast_tracepoint_collecting): Handle trampoline as part of jump
10796 (set_trampoline_buffer_space): New function.
10797 (initialize_tracepoint): Initialize new IPA variables.
10798 * target.h (struct target_ops): Add arguments to
10799 install_fast_tracepoint_jump_pad operation, add new
10800 get_min_fast_tracepoint_insn_len operation.
10801 (target_get_min_fast_tracepoint_insn_len): New.
10802 (install_fast_tracepoint_jump_pad): Add arguments.
10803 * server.h (IPA_BUFSIZ): Define.
10804 * linux-i386-ipa.c: Include extra header files.
10805 (initialize_fast_tracepoint_trampoline_buffer): New function.
10806 (initialize_low_tracepoint): Call it.
10807 * server.h (set_trampoline_buffer_space): Declare.
10808 (claim_trampoline_space): Ditto.
10809 (have_fast_tracepoint_trampoline_buffer): Ditto.
10811 2011-11-14 Yao Qi <yao@codesourcery.com>
10813 * server.c (handle_query): Handle InstallInTrace for qSupported.
10814 * tracepoint.c (add_tracepoint): Sort list.
10815 (install_tracepoint, download_tracepoint): New.
10816 (cmd_qtdp): Call them to install and download tracepoints.
10817 (sort_tracepoints): Removed.
10818 (cmd_qtstart): Update.
10820 2011-11-14 Yao Qi <yao@codesourcery.com>
10822 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10823 * mem-break.h: Declare.
10824 * tracepoint.c (cmd_qtstart): Move some code to ...
10825 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10827 (download_tracepoints): Move some code to ...
10828 (download_tracepoint_1): ... here. New.
10830 2011-11-08 Yao Qi <yao@codesourcery.com>
10832 * remote-utils.c (relocate_instruction): A comment fix.
10834 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10836 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10837 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10838 dr_status_mirror and dr_control_mirror from debug_reg_state.
10839 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10840 (i386_initial_stuff): Remove use of deleted globals.
10841 (i386_get_thread_context, i386_set_thread_context,
10842 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10843 from debug_reg_state.
10845 2011-11-05 Yao Qi <yao@codesourcery.com>
10847 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10848 address as TPOINT's.
10850 2011-11-02 Stan Shebs <stan@codesourcery.com>
10852 * tracepoint.c (agent_mem_read_string): New function.
10853 (eval_agent_expr): Call it for tracenz.
10854 * server.c (handle_query): Report support for tracenz.
10856 2011-11-02 Yao Qi <yao@codesourcery.com>
10858 * tracepoint.c (cmd_qtstart): Remove unused local variables.
10860 2011-11-02 Yao Qi <yao@codesourcery.com>
10862 * target.h: Fix a typo in comment.
10864 2011-10-31 Pedro Alves <pedro@codesourcery.com>
10866 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
10867 clobber the breakpoints' shadows with fast tracepoint jumps.
10868 * mem-break.h (check_mem_write): Add `myaddr' parameter.
10869 * target.c (write_inferior_memory): Also pass MYADDR down to
10872 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
10874 * configure.ac: Check support for personality routine.
10875 * configure: Regenerate.
10876 * config.in: Likewise.
10877 * linux-low.c: Include <sys/personality.h>.
10878 Define ADDR_NO_RANDOMIZE if necessary.
10879 (linux_create_inferior): Disable address space randomization when
10880 forking inferior, if requested.
10881 (linux_supports_disable_randomization): New function.
10882 (linux_target_ops): Install it.
10883 * server.h (disable_randomization): Declare.
10884 * server.c (disable_randomization): New global variable.
10885 (handle_general_set): Handle QDisableRandomization.
10886 (handle_query): Likewise for qSupported.
10887 (main): Support --disable-randomization and --no-disable-randomization
10888 command line arguments.
10889 * target.h (struct target_ops): Add supports_disable_randomization.
10890 (target_supports_disable_randomization): New macro.
10892 2011-09-29 Mike Frysinger <vapier@gentoo.org>
10894 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10896 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10897 [!PT_GETDSBT] (target_loadmap): New definition.
10898 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10899 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10900 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10901 and PT_GETDSBT to LINUX_LOADMAP.
10902 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10903 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10905 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10907 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10908 (arm_linux_hwbp_cap): New static variable.
10909 (arm_linux_get_hwbp_cap): Replace by ...
10910 (arm_linux_init_hwbp_cap): ... this new function.
10911 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10912 (arm_linux_get_hw_watchpoint_count): Likewise.
10913 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10914 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10915 (arm_prepare_to_resume): Use perror_with_name instead of error.
10917 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
10919 * linux-arm-low.c: Include <signal.h>.
10920 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10921 (struct arm_linux_hwbp_cap): New data type.
10922 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10923 (struct arm_linux_hw_breakpoint): New data type.
10924 (MAX_BPTS, MAX_WPTS): Define.
10925 (struct arch_process_info, struct arch_lwp_info): New data types.
10926 (arm_linux_get_hwbp_cap): New function.
10927 (arm_linux_get_hw_breakpoint_count): Likewise.
10928 (arm_linux_get_hw_watchpoint_count): Likewise.
10929 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10930 (arm_hwbp_control_initialize): Likewise.
10931 (arm_hwbp_control_is_enabled): Likewise.
10932 (arm_hwbp_control_is_initialized): Likewise.
10933 (arm_hwbp_control_disable): Likewise.
10934 (arm_linux_hw_breakpoint_equal): Likewise.
10935 (arm_linux_hw_point_initialize): Likewise.
10936 (struct update_registers_data): New data structure.
10937 (update_registers_callback: New function.
10938 (arm_insert_point): Likewise.
10939 (arm_remove_point): Likewise.
10940 (arm_stopped_by_watchpoint): Likewise.
10941 (arm_stopped_data_address): Likewise.
10942 (arm_new_process): Likewise.
10943 (arm_new_thread): Likewise.
10944 (arm_prepare_to_resume): Likewise.
10945 (the_low_target): Register arm_insert_point, arm_remove_point,
10946 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10947 arm_new_thread, and arm_prepare_to_resume.
10949 2011-09-15 Stan Shebs <stan@codesourcery.com>
10951 * server.h (struct emit_ops): Add compare-goto fields.
10952 * tracepoint.c (gdb_agent_op_sizes): New table.
10953 (emit_eq_goto): New function.
10954 (emit_ne_goto): New function.
10955 (emit_lt_goto): New function.
10956 (emit_le_goto): New function.
10957 (emit_gt_goto): New function.
10958 (emit_ge_goto): New function.
10959 (is_goto_target): New function.
10960 (compile_bytecodes): Recognize special cases of compare-goto
10961 combinations and call specialized emitters for them.
10962 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10963 (amd64_emit_ne_goto): New function.
10964 (amd64_emit_lt_goto): New function.
10965 (amd64_emit_le_goto): New function.
10966 (amd64_emit_gt_goto): New function.
10967 (amd64_emit_ge_goto): New function.
10968 (amd64_emit_ops): Add the new functions.
10969 (i386_emit_eq_goto): New function.
10970 (i386_emit_ne_goto): New function.
10971 (i386_emit_lt_goto): New function.
10972 (i386_emit_le_goto): New function.
10973 (i386_emit_gt_goto): New function.
10974 (i386_emit_ge_goto): New function.
10975 (i386_emit_ops): Add the new functions.
10977 2011-09-08 Stan Shebs <stan@codesourcery.com>
10979 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10980 (i386_emit_epilogue): Restore %ebx.
10982 2011-08-31 Jie Zhang <jzhang918@gmail.com>
10984 * server.c (step_thread): Remove definition.
10985 (process_serial_event): Don't handle Hs.
10986 * server.h (step_thread): Remove declaration.
10987 * target.c (set_desired_inferior): Remove use of step_thread.
10989 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10991 * linux-low.c: Include linux-procfs.h.
10992 (linux_attach_lwp_1): Update comments.
10993 (linux_attach): Scan for existing threads when attaching to a
10994 process that is the tgid.
10995 * Makefile.in: Update dependencies.
10997 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
10999 * configure.srv: Add linux-procfs.o dependencies.
11001 2011-08-14 Yao Qi <yao@codesourcery.com>
11003 * target.h (struct target_ops): Fix indent.
11004 * win32-low.c (win32_target_ops): Fix comment.
11006 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11007 Yao Qi <yao@codesourcery.com>
11009 * Makefile.in (clean): Remove tic6x-*.c files.
11010 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11011 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11012 (tic6x-c64xp-linux.c): Likewise.
11013 * configure.srv: Add support for tic6x-*-uclinux.
11014 * linux-tic6x-low.c: New.
11015 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11017 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11018 Yao Qi <yao@codesourcery.com>
11020 * target.h (struct target_ops): Add read_loadmap.
11021 * linux-low.c (struct target_loadseg): New type.
11022 (struct target_loadmap): New type.
11023 (linux_read_loadmap): New function.
11024 (linux_target_ops): Add linux_read_loadmap.
11025 * server.c (handle_query): Support qXfer:fdpic:read packet.
11026 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11029 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11031 * win32-low.c: Include <stdint.h>.
11033 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11035 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11036 to the inferior here.
11037 (i386_remove_aligned_watchpoint): Ditto.
11038 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11039 fit part of the watchpoint in the debug registers.
11040 (i386_update_inferior_debug_regs): New.
11041 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11042 registers, and only update the inferior on success.
11043 (i386_low_remove_watchpoint): Ditto.
11045 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11047 * linux-low.c (compare_ints, unique, list_threads, show_process,
11048 linux_core_of_thread): Delete.
11049 (linux_target_ops): Change linux_core_of_thread to
11050 linux_common_core_of_thread.
11051 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11052 * utils.c (malloc_failure): Change type of argument.
11053 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11054 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11055 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11056 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11057 (IPA_OBJS): Add common-utils-ipa.o.
11058 (ptid_h, linux_osdata_h): New macros.
11059 (server_h): Add common/common-utils.h, common/xml-utils.h,
11060 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11062 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11063 ptid.o, buffer.o): New rules.
11064 (linux-low.o): Add common/linux-osdata.h as a dependency.
11065 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11066 * configure.ac: Add AC_HEADER_DIRENT check.
11067 * config.in: Regenerate.
11068 * configure: Regenerate.
11069 * remote-utils.c (xml_escape_text): Delete.
11070 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11071 buffer_xml_printf): Move to common/buffer.c.
11072 * server.c (main): Remove call to initialize_inferiors.
11073 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11074 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11075 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11076 internal_error, gdb_assert, gdb_assert_fail): Delete.
11077 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11078 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11080 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11081 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11082 initialize_inferiors): Delete.
11084 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11086 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11089 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11091 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11093 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11095 2011-05-26 Yao Qi <yao@codesourcery.com>
11097 * Makefile.in (thread-db.o): Track dependence to
11098 common/gdb_thread_db.h.
11099 * thread-db.c: include gdb_thread_db.h from right place.
11101 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11103 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11104 __FILE__ and __LINE__ to internal_error.
11106 2011-05-13 Doug Evans <dje@google.com>
11108 * thread-db.c (try_thread_db_load_from_sdir): New function.
11109 (try_thread_db_load_from_dir): New function.
11110 (thread_db_load_search): Handle $sdir, ignore $pdir.
11111 Remove trying of system directories if search of
11112 libthread-db-search-path fails, that is now done via $sdir.
11114 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11116 * server.c (handle_query): Add EnableDisableTracepoints to the list
11117 of supported features.
11118 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11120 (cmd_qtenable_disable): New.
11121 (cmd_qtstart): Install tracepoints even if disabled.
11122 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11123 receiving a QTEnable or QTDisable packet.
11124 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11125 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11127 (gdb_probe): Skip data collection if static tracepoint is disabled.
11129 2011-05-10 Doug Evans <dje@google.com>
11131 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11133 2011-05-04 Doug Evans <dje@google.com>
11135 * linux-low.c (linux_join): Skip process lookup.
11136 * spu-low.c (spu_join): Ditto.
11137 * server.c (join_inferiors_callback): Delete.
11138 (process_serial_event): For 'D' packet (detach) call join_inferior
11141 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11143 * README: Don't mention xscale*-*-linux*.
11144 * configure.srv (xscale*-*-linux*): Don't handle target.
11146 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11148 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11150 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11151 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11152 (i386_emit_void_call_2): Likewise.
11154 2011-04-26 Yao Qi <yao@codesourcery.com>
11156 * linux-low.c: Move common macros to linux-ptrace.h.
11157 Include linux-ptrace.h.
11158 * Makefile.in (linux_ptrace_h): New.
11159 (linux-low.o): Depends on linux-ptrace.h.
11161 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11163 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11164 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11165 (remote_prepare): New function with most of the TCP code from ...
11166 (remote_open): ... here. Detect PORT here unconditionally. Move also
11167 setting transport_is_reliable.
11168 * server.c (run_once): New variable.
11169 (gdbserver_usage): Document it.
11170 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11171 the first run if RUN_ONCE.
11172 * server.h (run_once, remote_prepare): New declarations.
11174 2011-04-19 Tom Tromey <tromey@redhat.com>
11176 * win32-low.c (handle_load_dll): Remove duplicate "the".
11178 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11180 Remove support for old Cygwin 1.5 versions.
11181 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11182 function to avoid warning.
11183 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11186 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11188 * gdbserver/server.h (Macro _): Define it if not available.
11190 2011-03-14 Michael Snyder <msnyder@vmware.com>
11192 * hostio.c (handle_close): Remove unnecessary null test.
11194 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11196 * Makefile.in (maintainer-clean realclean distclean): Remove
11197 "make ... subdir_do" command.
11199 2011-03-10 Michael Snyder <msnyder@vmware.com>
11201 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11203 * server.c (handle_v_run): Free alloced buffer on early return.
11205 2011-03-09 Yao Qi <yao@codesourcery.com>
11208 2011-03-04 Yao Qi <yao@codesourcery.com>
11210 * Makefile.in: Remove GNU make feature --directory.
11212 2011-03-05 Yao Qi <yao@codesourcery.com>
11214 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11215 (subdir_do): New make target. Copied from gdb/Makefile.
11216 (maintainer-clean, realclean, distclean, clean): Call corresponding
11217 make targets in common/Makefile.
11219 2011-02-11 Yao Qi <yao@codesourcery.com>
11221 * configure.ac: Call AC_PROG_RANLIB.
11222 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11223 * configure: Regenerate.
11225 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11227 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11229 2011-03-06 Yao Qi <yao@codesourcery.com>
11231 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11233 2011-03-05 Yao Qi <yao@codesourcery.com>
11235 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11236 (subdir_do): New make target. Copied from gdb/Makefile.
11237 (maintainer-clean, realclean, distclean, clean): Call corresponding
11238 make targets in common/Makefile.
11240 2011-03-04 Yao Qi <yao@codesourcery.com>
11242 * Makefile.in: Remove GNU make feature --directory.
11244 2011-03-04 Michael Snyder <msnyder@vmware.com>
11246 * server.c (queue_stop_reply): Call xmalloc not malloc.
11248 2011-03-02 Michael Snyder <msnyder@vmware.com>
11250 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11252 2011-02-28 Michael Snyder <msnyder@vmware.com>
11254 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11255 (cmd_qtframe): Ditto.
11256 (cmd_qtbuffer): Ditto.
11257 (cmd_bigqtbuffer): Ditto.
11259 * utils.c (decimal2str): Initialize 'width' to nine, then
11260 don't mess with it.
11262 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11264 * hostio.c (require_data): Free *data, not data.
11266 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11268 * hostio.c (require_data): Use free, not xfree.
11270 2011-02-27 Michael Snyder <msnyder@vmware.com>
11272 * server.c (handle_query): Discard unused value.
11274 * hostio.c (require_data): Free malloc memory before returning
11277 2011-02-26 Michael Snyder <msnyder@vmware.com>
11279 * linux-low.c (list_threads): Call closedir for dirent.
11281 2011-02-27 Michael Snyder <msnyder@vmware.com>
11283 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11284 a case statement falls through.
11286 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11288 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11291 2011-02-26 Michael Snyder <msnyder@vmware.com>
11293 * utils.c (decimal2str): Eliminate dead code and dead param.
11294 (pulongest): Drop dead param from call to decimal2str.
11297 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11299 Revert the following patch (not approved yet):
11300 2011-02-21 Hui Zhu <teawater@gmail.com>
11301 * tracepoint.c (tp_printf): New function.
11302 (eval_agent_expr): Handle gdb_agent_op_printf.
11304 2011-02-21 Hui Zhu <teawater@gmail.com>
11306 * tracepoint.c (tp_printf): New function.
11307 (eval_agent_expr): Handle gdb_agent_op_printf.
11309 2011-02-18 Tom Tromey <tromey@redhat.com>
11311 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11312 (tracepoint.o): Likewise.
11313 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11314 (gdb_agent_op_names): Likewise.
11316 2011-02-18 Tom Tromey <tromey@redhat.com>
11318 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11319 gdb_agent_op_rot>: New constants.
11320 (gdb_agent_op_names): Add pick and roll.
11321 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11324 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11326 * aclocal.m4: Regenerated with aclocal-1.11.1.
11328 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11330 * server.c (handle_qxfer_traceframe_info): New.
11331 (qxfer_packets): Register "traceframe-info".
11332 (handle_query): Report support for qXfer:traceframe-info:read+.
11333 * tracepoint.c (match_blocktype): New.
11334 (traceframe_find_block_type): Rename to ...
11335 (traceframe_walk_blocks): ... this. Add callback filter argument,
11337 (traceframe_find_block_type): New, reimplemented on top of
11338 traceframe_walk_blocks.
11339 (build_traceframe_info_xml): New.
11340 (traceframe_read_info): New.
11341 * server.h (traceframe_read_info): Declare.
11343 2011-02-11 Yao Qi <yao@codesourcery.com>
11345 * configure.ac: Call AC_PROG_RANLIB.
11346 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11347 * configure: Regenerate.
11349 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11351 * server.c (gdb_read_memory): Change return semantics to allow
11353 (handle_search_memory_1): Adjust.
11354 (process_serial_event) <'m' packet>: Handle partial transfers.
11355 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11357 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11359 * regcache.c (init_register_cache): Initialize
11360 regcache->register_status.
11361 (free_register_cache): Release regcache->register_status.
11362 (regcache_cpy): Copy register_status.
11363 (registers_to_string): Print 'x's for unavailable registers.
11364 (supply_register): Mark the register's status valid or
11365 unavailable, depending on whether a buffer was passed in or not.
11366 (supply_register_zeroed): New.
11367 (supply_regblock): Mark the registers' status valid or
11368 unavailable, depending on whether a buffer was passed in or not.
11369 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11370 (struct regcache): New `register_status' field.
11371 (supply_register_zeroed): Declare.
11372 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11373 supply_register_zeroed, rather than passing a NULL buffer to
11375 * tracepoint.c (fetch_traceframe_registers): Update comment.
11377 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11379 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11382 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11384 * server.h (decode_xfer_write): Change prototype.
11385 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11386 and don't extract the annex here.
11387 * server.c (decode_xfer_read): Remove `annex' parameter,
11388 and don't extract the annex here.
11389 (decode_xfer): New.
11390 (struct qxfer): New.
11391 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11392 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11393 (handle_qxfer_statictrace): New functions, abstracted out from
11394 handle_query, and made to use the struct qxfer interface.
11395 (handle_threads_qxfer_proper): Rename to ...
11396 (handle_qxfer_threads_proper): ... this.
11397 (handle_threads_qxfer): Rename to ...
11398 (handle_qxfer_threads): ... this. Adjust.
11399 (qxfer_packets): New array.
11400 (handle_qxfer): New function.
11401 (handle_query): Use handle_qxfer.
11403 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11405 * gdbreplay.c: Shorten lines of >= 80 columns.
11406 * linux-low.c: Ditto.
11407 * linux-ppc-low.c: Ditto.
11408 * linux-s390-low.c: Ditto.
11409 * linux-sparc-low.c: Ditto.
11410 * linux-x86-low.c: Ditto.
11411 * linux-xtensa-low.c: Ditto.
11412 * mem-break.c: Ditto.
11413 * nto-low.c: Ditto.
11414 * regcache.h: Ditto.
11415 * remote-utils.c: Ditto.
11418 * thread-db.c: Ditto.
11419 * tracepoint.c: Ditto.
11421 * win32-low.h: Ditto.
11423 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11425 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11428 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11430 * server.c (gdbserver_version): Update copyright year in version
11432 * gdbreplay.c (gdbreplay_version): Ditto.
11434 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11436 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11437 * linux-bfin-low.c: New file.
11438 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11439 PT_DATA_ADDR for BFIN targets.
11440 * Makefile.in (SFILES): Add linux-bfin-low.c.
11441 (clean): Remove reg-bfin.c.
11442 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11443 * README: Mention supported Blackfin targets.
11445 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11447 * .gitignore: New file.
11449 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11451 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11453 2010-10-22 Jie Zhang <jie@codesourcery.com>
11455 * Makefile.in: Add FLAGS_TO_PASS variable.
11456 (install): Remove dependency of install-only and recursively
11457 invoke make for install-only.
11459 2010-10-04 Doug Evans <dje@google.com>
11461 * Makefile.in (uninstall): Use $(DESTDIR).
11463 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11467 * linux-x86-low.c (compat_siginfo_from_siginfo)
11468 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11469 si_code is < 0. Check for si_code == SI_TIMER before checking for
11472 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11474 * lynx-i386-low.c: New file.
11475 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11477 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11479 * lynx-low.c (ptrace_request_to_str): Remove handling for
11480 request values that have been removed in LynxOS 5.x.
11482 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11484 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11487 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11489 * configure.ac: Add --enable-inprocess-agent option.
11490 * configure: Rebuilt.
11492 2010-09-06 Yao Qi <yao@codesourcery.com>
11494 * linux-low.c (linux_kill): Remove unused variable.
11495 (linux_stabilize_threads): Likewise.
11496 * server.c (start_inferior): Likewise.
11497 (queue_stop_reply_callback): Likewise.
11498 * tracepoint.c (do_action_at_tracepoint): Likewise.
11500 2010-09-06 Yao Qi <yao@codesourcery.com>
11502 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11505 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11507 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11509 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11511 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11514 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11516 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11517 gdbserver/lynx-ppc-low.c: New files.
11518 * Makefile.in (lynx_low_h): New variable.
11519 (lynx-low.o, lynx-ppc-low.o): New rules.
11520 * configure.ac: On LynxOS, link with -lnetinet.
11521 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11522 * configure: regenerate.
11524 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11526 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11527 * configure.ac: Add check for vasprintf and vsnprintf.
11528 * configure, config.in: Regenerate.
11529 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11531 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11533 * gdbreplay.c: Move include of alloca.h up, next to include of
11535 * server.h: Add include of malloc.h.
11536 * mem-break.c: Remove include of malloc.h.
11537 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11539 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11541 * Makefile.in (memmem.o): Build with -Wno-error.
11543 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11545 * utils.c (xsnprintf): Make non-static.
11546 * server.h: Add xsnprintf declaration.
11547 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11548 replace calls to snprintf by calls to xsnprintf throughout.
11550 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11552 * configure.ac: Add configure check for alloca.
11553 * configure, config.in: Regenerate.
11554 * server.h: Include alloca.h if it exists.
11555 * gdbreplay.c: Include alloca.h if it exists.
11557 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11559 * linux-low.c (__SIGRTMIN): Define if not already defined.
11560 (linux_create_inferior): Check for __ANDROID__ rather than
11562 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11563 are already deferred.
11564 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11565 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11566 stopped and already has a pending signal to report.
11567 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11568 a pending signal to report or is moving out of a jump pad.
11569 (linux_init_signals): Check for __ANDROID__ rather than
11572 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11574 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11575 debug_threads check. Avoid a linear search when not doing debug
11578 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11580 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11581 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11582 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11583 (process_event): Change local fd's type to gdb_fildes_t.
11584 (create_file_handler): Adjust prototype.
11585 (delete_file_handler): Adjust prototype.
11586 (handle_file_event): Adjust prototype. Use pfildes.
11587 (create_file_event): Adjsut prototype.
11588 * remote-utils.c (remote_desc, listen_desc): Change type to
11590 * server.h: New gdb_fildes_t typedef.
11591 [USE_WIN32API]: Include winsock2.h.
11592 (delete_file_handler, add_file_handler): Adjust prototypes.
11593 (pfildes): Declare.
11594 * utils.c (pfildes): New.
11596 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11598 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11599 * configure: Regenerate.
11601 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11603 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11604 (linux_done_accessing_memory): ... this.
11605 (linux_target_ops): Adjust.
11606 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11607 * nto-low.c (nto_target_ops): Adjust comment.
11608 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11609 * spu-low.c (spu_target_ops): Adjust comment.
11610 * target.h (target_ops): Rename unprepare_to_access_memory field
11611 to done_accessing_memory.
11612 (unprepare_to_access_memory): Rename to ...
11613 (done_accessing_memory): ... this.
11615 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11617 * linux-low.c (linux_prepare_to_access_memory): New.
11618 (linux_unprepare_to_access_memory): New.
11619 (linux_target_ops): Install them.
11620 * server.c (read_memory): Rename to ...
11621 (gdb_read_memory): ... this. Use
11622 prepare_to_access_memory/prepare_to_access_memory.
11623 (write_memory): Rename to ...
11624 (gdb_write_memory): ... this. Use
11625 prepare_to_access_memory/prepare_to_access_memory.
11626 (handle_search_memory_1): Adjust.
11627 (process_serial_event): Adjust.
11628 * target.h (struct target_ops): New fields
11629 prepare_to_access_memory and unprepare_to_access_memory.
11630 (prepare_to_access_memory, unprepare_to_access_memory): New.
11631 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11632 prepare_to_access_memory/prepare_to_access_memory.
11633 * nto-low.c (nto_target_ops): Adjust.
11634 * spu-low.c (spu_target_ops): Adjust.
11635 * win32-low.c (win32_target_ops): Adjust.
11637 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11639 * Makefile.in (WARN_CFLAGS): Get it from configure.
11640 (WERROR_CFLAGS): New.
11641 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11642 * configure.ac: Introduce --enable-werror, which adds -Werror to
11643 the compiler command line. Enabled by default. Disable with
11644 --disable-werror. Add -Wdeclaration-after-statement
11645 Wpointer-arith and -Wformat-nonliteral to warning flags.
11646 * configure: Regenerate.
11648 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11650 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11652 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11654 * gdbreplay.c (remote_error): New.
11656 (expect): Use gdbchar. Check for error reading from GDB.
11657 Clarify sync error output.
11658 (play): Check for errors writing to GDB.
11659 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11660 * remote-utils.c (getpkt): Check for errors writing to the remote
11663 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11665 * linux-low.c (linux_wait_1): Move non-debugging code out of
11666 `debug_threads' control.
11668 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11670 * linux-low.c (linux_wait_1): Don't set last_status here.
11671 * server.c (push_event, queue_stop_reply_callback): Assert we're
11672 not pushing a TARGET_WAITKIND_IGNORE event.
11673 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11674 (myresume, handle_target_event): Set the thread's last_resume_kind
11675 and last_status from the target returned status.
11677 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11681 * linux-x86-low.c (update_debug_registers_callback): New.
11682 (i386_dr_low_set_addr): Use it.
11683 (i386_dr_low_get_addr): New.
11684 (i386_dr_low_set_control): Use update_debug_registers_callback.
11685 (i386_dr_low_get_control): New.
11686 (i386_dr_low_get_status): Adjust.
11687 * linux-low.c (linux_stop_lwp): New.
11688 * linux-low.h (linux_stop_lwp): Declare.
11690 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11691 argument instead of a i386_debug_reg_state.
11692 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11693 a i386_debug_reg_state.
11694 (i386_insert_aligned_watchpoint): Adjust.
11695 (i386_remove_aligned_watchpoint): Adjust.
11696 (i386_low_stopped_data_address): Read the debug registers from the
11697 inferior instead of from the mirrors.
11698 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11699 (i386_dr_low_get_addr): Declare.
11700 (i386_dr_low_get_control): Declare.
11701 (i386_dr_low_get_status): Change prototype.
11703 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11704 (i386_dr_low_get_addr): New.
11705 (i386_dr_low_get_control): New.
11706 (i386_dr_low_get_status): Adjust prototype. Return
11708 (i386_initial_stuff): Clear dr_status_mirror and
11710 (i386_get_thread_context): Adjust.
11711 (i386_set_thread_context): Adjust.
11712 (i386_thread_added): Adjust.
11714 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11716 * linux-low.h (linux_thread_area): Delete declaration.
11718 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11720 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11721 after its termination.
11723 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11725 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11726 (gdb_wants_all_stopped): Delete.
11727 (linux_wait_1): Don't call them.
11728 * server.c (handle_v_cont): Tag all threads as want-stopped.
11729 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11730 stopped as "client-wants-stopped".
11732 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11734 * Makefile.in (signals_h): New.
11735 (server_h): Depend on it.
11736 (server.o): Don't depend on $(signals_def).
11737 (signals.o): Depend on $(signals_def).
11739 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11741 * Makefile.in (signals_def): New.
11742 (server_h): Append include/gdb/signals.h and signals_def.
11743 (server.o): Append signals_def.
11745 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11747 * server.c (handle_target_event): Use target_signal_to_host for
11748 resume_info.sig initialization.
11749 * target.h (struct thread_resume) <sig>: New comment.
11751 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11753 * server.c (handle_query): strcpy() the returned string from paddress()
11754 instead of sprintf().
11755 * utils.c (paddress): Return phex_nz().
11757 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11759 * server.c (handle_v_cont): Call mourn_inferior if process
11761 (myresume): Likewise.
11763 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11765 Static tracepoints, and integration with UST.
11767 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11768 * mem-break.c (uninsert_all_breakpoints)
11769 (reinsert_all_breakpoints): New.
11770 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11771 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11772 (gdb_agent_ust_loaded, helper_thread_id)
11773 (gdb_agent_helper_thread_id): New macros.
11774 (struct ipa_sym_addresses): Add addr_ust_loaded,
11775 addr_helper_thread_id, addr_cmd_buf.
11776 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11777 (in_process_agent_loaded_ust): New.
11778 (write_e_ust_not_loaded): New.
11779 (maybe_write_ipa_ust_not_loaded): New.
11780 (struct collect_static_trace_data_action): New.
11781 (enum tracepoint_type) <static_tracepoint>: New.
11782 (struct tracepoint) <handle>: Mention static tracepoints.
11783 (struct static_tracepoint_ctx): New.
11784 (CMD_BUF_SIZE): New.
11785 (add_tracepoint_action): Handle static tracepoint actions.
11786 (unprobe_marker_at): New.
11787 (clear_installed_tracepoints): Handle static tracepoints.
11788 (cmd_qtdp): Handle static tracepoints.
11789 (probe_marker_at): New.
11790 (cmd_qtstart): Handle static tracepoints.
11791 (response_tracepoint): Handle static tracepoints.
11792 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11793 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11794 (get_context_regcache): Handle static tracepoints.
11795 (do_action_at_tracepoint): Handle static tracepoint actions.
11796 (traceframe_find_block_type): Handle static trace data blocks.
11797 (traceframe_read_sdata): New.
11798 (download_tracepoints): Download static tracepoint actions.
11799 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11800 (GDB_PROBE_NAME): New.
11802 (GET_UST_SYM): New.
11805 (ust_marker_to_static_tracepoint): New.
11807 (collect_ust_data_at_tracepoint): New.
11808 (gdb_ust_probe): New.
11809 (UNIX_PATH_MAX, SOCK_DIR): New.
11810 (gdb_ust_connect_sync_socket): New.
11811 (resume_thread, stop_thread): New.
11812 (run_inferior_command): New.
11813 (init_named_socket): New.
11814 (gdb_ust_socket_init): New.
11815 (cstr_to_hexstr): New.
11817 (first_marker, next_marker): New.
11818 (response_ust_marker): New.
11819 (cmd_qtfstm, cmd_qtsstm): New.
11820 (unprobe_marker_at, probe_marker_at): New.
11821 (cmd_qtstmat, gdb_ust_thread): New.
11822 (gdb_ust_init): New.
11823 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11824 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11825 (ST_REGENTRY): New.
11826 (x86_64_st_collect_regmap): New.
11827 (X86_64_NUM_ST_COLLECT_GREGS): New.
11828 (AMD64_RIP_REGNUM): New.
11829 (supply_static_tracepoint_registers): New.
11830 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11831 (ST_REGENTRY): New.
11832 (i386_st_collect_regmap): New.
11833 (i386_NUM_ST_COLLECT_GREGS): New.
11834 (supply_static_tracepoint_registers): New.
11835 * server.c (handle_query): Handle qXfer:statictrace:read.
11836 <qSupported>: Report support for StaticTracepoints, and
11837 qXfer:statictrace:read features.
11838 * server.h (traceframe_read_sdata)
11839 (supply_static_tracepoint_registers): Declare.
11840 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11841 (unpack_varlen_hex): Include in IPA build.
11842 * Makefile.in (ustlibs, ustinc): New.
11843 (IPA_OBJS): Add remote-utils-ipa.o.
11844 ($(IPA_LIB)): Link -ldl and -lpthread.
11846 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11847 * config.in, configure: Regenerate.
11849 2010-06-20 Ian Lance Taylor <iant@google.com>
11850 Pedro Alves <pedro@codesourcery.com>
11852 * linux-x86-low.c (always_true): Delete.
11853 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11854 trying to fool the compiler with always_true.
11856 2010-06-20 Pedro Alves <pedro@codesourcery.com>
11858 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11859 conditions in gdbserver.
11861 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
11863 * spu-low.c (spu_read_memory): Wrap around local store limit.
11864 (spu_write_memory): Likewise.
11866 2010-06-15 Pedro Alves <pedro@codesourcery.com>
11868 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11869 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11871 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11873 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11874 uses with LONGEST uses.
11876 2010-06-14 Stan Shebs <stan@codesourcery.com>
11877 Pedro Alves <pedro@codesourcery.com>
11881 * linux-x86-low.c: Include limits.h.
11883 (always_true): New.
11886 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11887 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11888 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11889 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11890 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11891 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11892 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11893 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11894 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11895 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11896 (amd64_emit_void_call_2): New.
11897 (amd64_emit_ops): New.
11898 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11899 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11900 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11901 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11902 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11903 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11904 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11905 (i386_emit_call, i386_emit_reg, i386_emit_pop)
11906 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11907 (i386_emit_stack_adjust, i386_emit_int_call_1)
11908 (i386_emit_void_call_2): New.
11909 (i386_emit_ops): New.
11910 (x86_emit_ops): New.
11911 (the_low_target): Install x86_emit_ops.
11912 * server.h (struct emit_ops): New.
11913 (get_raw_reg_func_addr): Declare.
11914 (current_insn_ptr, emit_error): Declare.
11915 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11916 (set_trace_state_variable_value): New defines.
11917 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11918 addr_get_trace_state_variable_value and
11919 addr_set_trace_state_variable_value.
11920 (symbol_list): New fields for get_raw_reg,
11921 get_trace_state_variable_value and set_trace_state_variable_value.
11922 (condfn): New typedef.
11923 (struct tracepoint): New field `compiled_cond'.
11924 (do_action_at_tracepoint): Clear compiled_cond.
11925 (get_trace_state_variable_value, set_trace_state_variable_value):
11927 (condition_true_at_tracepoint): If there's a compiled condition,
11929 (current_insn_ptr, emit_error): New globals.
11930 (struct bytecode_address): New.
11931 (get_raw_reg_func_addr): New.
11932 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11933 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11934 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11935 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11936 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11937 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11938 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11939 (compile_tracepoint_condition, compile_bytecodes): New.
11940 * target.h (emit_ops): Forward declare.
11941 (struct target_ops): New field emit_ops.
11942 (target_emit_ops): New.
11943 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11944 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11945 * linux-low.c (linux_emit_ops): New.
11946 (linux_target_ops): Install it.
11947 * linux-low.h (struct linux_target_ops): New field emit_ops.
11949 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11951 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11952 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11954 2010-06-01 Pedro Alves <pedro@codesourcery.com>
11955 Stan Shebs <stan@codesourcery.com>
11957 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11958 (all): Depend on $(extra_libraries).
11959 (install-only): Install the IPA.
11960 (IPA_OBJS, IPA_LIB): New.
11961 (clean): Remove the IPA lib.
11962 (IPAGENT_CFLAGS): New.
11963 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11964 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11965 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11966 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11967 * configure.ac: Check for atomic builtins support in the compiler.
11968 (IPA_DEPFILES, extra_libraries): Define.
11969 * configure.srv (ipa_obj): Add description.
11970 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11971 (i[34567]86-*-linux*): Set ipa_obj.
11972 (x86_64-*-linux*): Set ipa_obj.
11973 * linux-low.c (stabilizing_threads): New.
11974 (supports_fast_tracepoints): New.
11975 (linux_detach): Stabilize threads before detaching.
11976 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11977 the lwp is either not stabilizing, or is moving out of a jump pad.
11978 (linux_fast_tracepoint_collecting): New.
11979 (maybe_move_out_of_jump_pad): New.
11980 (enqueue_one_deferred_signal): New.
11981 (dequeue_one_deferred_signal): New.
11982 (linux_wait_for_event_1): If moving out of a jump pad, defer
11983 pending signals to later.
11984 (linux_stabilize_threads): New.
11985 (linux_wait_1): Check if threads need moving out of jump pads, and
11987 (stuck_in_jump_pad_callback): New.
11988 (move_out_of_jump_pad_callback): New.
11989 (lwp_running): New.
11990 (linux_resume_one_lwp): Handle moving out of jump pads.
11991 (linux_set_resume_request): Dequeue deferred signals.
11992 (need_step_over_p): Also step over fast tracepoint jumps.
11993 (start_step_over): Also uninsert fast tracepoint jumps.
11994 (finish_step_over): Also reinsert fast tracepoint jumps.
11995 (linux_install_fast_tracepoint_jump): New.
11996 (linux_target_ops): Install linux_stabilize_threads and
11997 linux_install_fast_tracepoint_jump_pad.
11998 * linux-low.h (linux_target_ops) <get_thread_area,
11999 install_fast_tracepoint_jump_pad>: New fields.
12000 (struct lwp_info) <collecting_fast_tracepoint,
12001 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12002 (linux_get_thread_area): Declare.
12003 * linux-x86-low.c (jump_insn): New.
12004 (x86_get_thread_area): New.
12005 (append_insns): New.
12006 (push_opcode): New.
12007 (amd64_install_fast_tracepoint_jump_pad): New.
12008 (i386_install_fast_tracepoint_jump_pad): New.
12009 (x86_install_fast_tracepoint_jump_pad): New.
12010 (the_low_target): Install x86_get_thread_area and
12011 x86_install_fast_tracepoint_jump_pad.
12012 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12013 (struct fast_tracepoint_jump): New.
12014 (fast_tracepoint_jump_insn): New.
12015 (fast_tracepoint_jump_shadow): New.
12016 (find_fast_tracepoint_jump_at): New.
12017 (fast_tracepoint_jump_here): New.
12018 (delete_fast_tracepoint_jump): New.
12019 (set_fast_tracepoint_jump): New.
12020 (uninsert_fast_tracepoint_jumps_at): New.
12021 (reinsert_fast_tracepoint_jumps_at): New.
12022 (set_breakpoint_at): Use write_inferior_memory.
12023 (uninsert_raw_breakpoint): Use write_inferior_memory.
12024 (check_mem_read): Mask out fast tracepoint jumps.
12025 (check_mem_write): Mask out fast tracepoint jumps.
12026 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12027 (set_fast_tracepoint_jump): Declare.
12028 (delete_fast_tracepoint_jump)
12029 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12030 (reinsert_fast_tracepoint_jumps_at): Declare.
12031 * regcache.c: Don't compile many functions when building the
12032 in-process agent library.
12033 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12034 the register buffer in the heap.
12035 (free_register_cache): If the register buffer isn't owned by the
12036 regcache, don't free it.
12037 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12038 pre-existing register caches.
12039 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12041 (convert_ascii_to_int): : Constify `from' parameter type.
12042 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12043 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12044 the needed buffer in-place.
12045 (relocate_instruction): New.
12046 * server.c (handle_query) <qSymbols>: If the target supports
12047 tracepoints, give it a chance of looking up symbols. Report
12048 support for fast tracepoints.
12049 (handle_status): Stabilize threads.
12050 (process_serial_event): Adjust.
12051 * server.h (struct fast_tracepoint_jump): Forward declare.
12052 (struct process_info) <fast_tracepoint_jumps>: New field.
12053 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12054 (decode_X_packet, decode_M_packet): Adjust.
12055 (relocate_instruction): Declare.
12056 (in_process_agent_loaded): Declare.
12057 (tracepoint_look_up_symbols): Declare.
12058 (struct fast_tpoint_collect_status): Declare.
12059 (fast_tracepoint_collecting): Declare.
12060 (force_unlock_trace_buffer): Declare.
12061 (handle_tracepoint_bkpts): Declare.
12062 (initialize_low_tracepoint)
12063 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12064 * target.h (struct target_ops) <stabilize_threads,
12065 install_fast_tracepoint_jump_pad>: New fields.
12066 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12067 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12068 [HAVE_STDINT_H]: Include stdint.h.
12069 (trace_debug_1): Rename to ...
12070 (trace_vdebug): ... this.
12071 (trace_debug): Rename to ...
12072 (trace_debug_1): ... this. Add `level' parameter.
12073 (trace_debug): New.
12074 (ATTR_USED, ATTR_NOINLINE): New.
12075 (IP_AGENT_EXPORT): New.
12076 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12077 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12078 (about_to_request_buffer_space, trace_buffer_is_full)
12079 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12080 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12081 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12082 (traceframe_write_count, traceframes_created)
12083 (trace_state_variables)
12084 New renaming defines.
12085 (struct ipa_sym_addresses): New.
12086 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12087 (symbol_list): New.
12088 (ipa_sym_addrs): New.
12089 (all_tracepoint_symbols_looked_up): New.
12090 (in_process_agent_loaded): New.
12091 (write_e_ipa_not_loaded): New.
12092 (maybe_write_ipa_not_loaded): New.
12093 (tracepoint_look_up_symbols): New.
12094 (debug_threads) [IN_PROCESS_AGENT]: New.
12095 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12096 (UNKNOWN_SIDE_EFFECTS): New.
12097 (stop_tracing): New.
12098 (flush_trace_buffer): New.
12099 (stop_tracing_bkpt): New.
12100 (flush_trace_buffer_bkpt): New.
12101 (read_inferior_integer): New.
12102 (read_inferior_uinteger): New.
12103 (read_inferior_data_pointer): New.
12104 (write_inferior_data_pointer): New.
12105 (write_inferior_integer): New.
12106 (write_inferior_uinteger): New.
12107 (struct collect_static_trace_data_action): Delete.
12108 (enum tracepoint_type): New.
12109 (struct tracepoint) <type>: New field `type'.
12110 <actions_str, step_actions, step_actions_str>: Only include in
12112 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12113 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12114 (tracepoints): Use IP_AGENT_EXPORT.
12115 (last_tracepoint): Don't include in the IPA.
12116 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12117 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12118 (alloced_trace_state_variables): New.
12119 (trace_state_variables): Use IP_AGENT_EXPORT.
12120 (traceframe_t): Delete unused variable.
12121 (circular_trace_buffer): Don't include in the IPA.
12122 (trace_buffer_start): Delete.
12123 (struct trace_buffer_control): New.
12124 (trace_buffer_free): Delete.
12125 (struct ipa_trace_buffer_control): New.
12126 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12127 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12129 (trace_buffer_ctrl): New.
12130 (TRACE_BUFFER_CTRL_CURR): New.
12131 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12132 Reimplement as macros.
12133 (trace_buffer_wrap): Delete.
12134 (traceframe_write_count, traceframe_read_count)
12135 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12136 (struct tracepoint_hit_ctx) <type>: New field.
12137 (struct fast_tracepoint_ctx): New.
12138 (memory_barrier): New.
12140 (record_tracepoint_error): Update atomically in the IPA.
12141 (clear_inferior_trace_buffer): New.
12142 (about_to_request_buffer_space): New.
12143 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12144 updating the same buffer.
12145 (add_tracepoint): Default the tracepoint's type to trap
12146 tracepoint, and orig_size to -1.
12147 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12148 internal variables.
12149 (create_trace_state_variable): New parameter `gdb'. Handle it.
12150 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12151 (cmd_qtdp): Handle fast tracepoints.
12152 (cmd_qtdv): Adjust.
12153 (max_jump_pad_size): New.
12154 (gdb_jump_pad_head): New.
12155 (get_jump_space_head): New.
12156 (claim_jump_space): New.
12157 (sort_tracepoints): New.
12158 (MAX_JUMP_SIZE): New.
12159 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12161 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12162 support. Upload fast traceframes, and delete internal IPA
12164 (stop_tracing_handler): New.
12165 (flush_trace_buffer_handler): New.
12166 (cmd_qtstop): Upload fast tracepoints.
12167 (response_tracepoint): Handle fast tracepoints.
12168 (tracepoint_finished_step): Upload fast traceframes. Set the
12169 tracepoint hit context's tracepoint type.
12170 (handle_tracepoint_bkpts): New.
12171 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12172 type. Add comment about fast tracepoints.
12173 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12174 non-existing action_str field.
12175 (get_context_regcache): Handle fast tracepoints.
12176 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12178 (fast_tracepoint_from_jump_pad_address): New.
12179 (fast_tracepoint_from_ipa_tpoint_address): New.
12180 (collecting_t): New.
12181 (force_unlock_trace_buffer): New.
12182 (fast_tracepoint_collecting): New.
12184 (gdb_collect): New.
12185 (write_inferior_data_ptr): New.
12186 (target_tp_heap): New.
12187 (target_malloc): New.
12188 (download_agent_expr): New.
12190 (download_tracepoints): New.
12191 (download_trace_state_variables): New.
12192 (upload_fast_traceframes): New.
12193 (IPA_FIRST_TRACEFRAME): New.
12194 (IPA_NEXT_TRACEFRAME_1): New.
12195 (IPA_NEXT_TRACEFRAME): New.
12196 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12197 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12198 (gdb_jump_pad_buffer_end): New.
12199 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12200 (initialize_tracepoint): Adjust.
12201 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12202 buffer. Initialize the low module.
12203 * utils.c (PREFIX, TOOLNAME): New.
12204 (malloc_failure): Use PREFIX.
12205 (error): In the IPA, an error causes an exit.
12206 (fatal, warning): Use PREFIX.
12207 (internal_error): Use TOOLNAME.
12208 (NUMCELLS): Increase to 10.
12209 * configure, config.in: Regenerate.
12211 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12213 * server.c (handle_query) <qSupported>: Do two passes over the
12214 qSupported string to avoid nesting strtok.
12216 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12218 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12220 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12221 -Wl,--dynamic-list.
12222 * configure: Regenerate.
12223 * proc-service.list: New.
12225 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12227 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12230 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12232 * gdbreplay.c (remote_open): Check error return from socket() call by
12233 its equality to -1 not by it being negative.
12234 * remote-utils.c (remote_open): Likewise.
12236 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12238 * config.h: Regenerate.
12240 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12242 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12243 doesn't provide PTRACE_GET_THREAD_AREA.
12245 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12247 * linux-m68k-low.c: Include <asm/ptrace.h>
12248 (ps_get_thread_area): Implement.
12250 2010-05-03 Doug Evans <dje@google.com>
12252 * event-loop.c (struct callback_event): New struct.
12253 (callback_list): New global.
12254 (append_callback_event, delete_callback_event): New functions.
12255 (process_callback): New function.
12256 (start_event_loop): Call it.
12257 * remote-utils.c (NOT_SCHEDULED): Define.
12258 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12259 moved out of readchar.
12260 (readchar): Rewrite. Call reschedule before returning.
12261 (reset_readchar): New function.
12262 (remote_close): Call it.
12263 (process_remaining, reschedule): New functions.
12264 * server.h (callback_handler_func): New typedef.
12265 (append_callback_event, delete_callback_event): Declare.
12267 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12269 * proc-service.c (ps_pglobal_lookup): Use
12270 thread_db_look_up_one_symbol.
12271 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12272 parameter. Use it instead of all_symbols_looked_up.
12273 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12275 (all_symbols_looked_up): Don't declare.
12276 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12277 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12279 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12280 Set all_symbols_looked_up here.
12281 (thread_db_look_up_one_symbol): New.
12282 (thread_db_get_tls_address): Adjust.
12283 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12284 thread_db object on the heap, and tentatively set it in the
12286 (thread_db_init): Don't set all_symbols_looked_up here.
12287 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12289 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12291 * linux-low.c (linux_kill, linux_detach): Adjust.
12292 (status_pending_p_callback): Remove redundant statement. Check
12293 for !TARGET_WAITIKIND_IGNORE, instead of
12294 TARGET_WAITKIND_STOPPED.
12295 (handle_tracepoints): Make sure LWP is locked. Adjust.
12296 (linux_wait_for_event_1): Adjust.
12297 (linux_cancel_breakpoints): New.
12298 (unsuspend_one_lwp): New.
12299 (unsuspend_all_lwps): New.
12300 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12301 (send_sigstop_callback): Change return type to int, add new
12302 `except' parameter and handle it.
12303 (suspend_and_send_sigstop_callback): New.
12304 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12305 pass them down. If SUSPEND, also increment the lwp's suspend
12307 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12308 (need_step_over_p): Don't consider suspended LWPs.
12309 (start_step_over): Adjust.
12310 (proceed_one_lwp): Change return type to int, add new `except'
12311 parameter and handle it.
12312 (unsuspend_and_proceed_one_lwp): New.
12313 (proceed_all_lwps): Use find_inferior instead of
12315 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12316 also decrement the suspend count of LWPs. Pass `except' down,
12317 instead of hacking its suspend count.
12318 (linux_pause_all): Add `freeze' parameter. Adjust.
12319 (linux_unpause_all): New.
12320 (linux_target_ops): Install linux_unpause_all.
12321 * server.c (handle_status): Adjust.
12322 * target.h (struct target_ops): New fields `unpause_all' and
12323 `cancel_breakpoints'. Add new parameter to `pause_all'.
12324 (pause_all): Add new `freeze' parameter.
12325 (unpause_all): New.
12326 (cancel_breakpoints): New.
12327 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12328 cancel breakpoints.
12329 (cmd_qtstart): Pause threads.
12330 (stop_tracing): Pause threads, and cancel breakpoints.
12331 * win32-low.c (win32_target_ops): Adjust.
12333 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12335 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12336 the inferior right away from here...
12337 (linux_wait_1): ... to here, and adjust to check the thread's
12338 last_resume_kind instead of the lwp's step or stop_expected flags.
12340 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12342 * README: Use consistent `GDB' and `GDBserver' spellings.
12344 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12346 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12347 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12348 (linux_detach_one_lwp): Assume the lwp is stopped.
12349 (any_thread_of): Delete.
12350 (linux_detach): Stop all lwps here. Don't blindly delete all
12352 (delete_lwp_callback): New.
12353 (linux_mourn): Delete all lwps of the process that is gone.
12354 (linux_wait_1): Don't delete the last lwp of the process here.
12355 * mem-break.h (mark_breakpoints_out): Declare.
12356 * mem-break.c (mark_breakpoints_out): New.
12357 (free_all_breakpoints): Use it.
12358 * server.c (handle_target_event): If the process is gone, mark
12360 * thread-db.c (struct thread_db) <create_bp>: New field.
12361 (thread_db_enable_reporting): Fix prototype. Store a thread event
12362 breakpoint reference in the thread_db struct.
12363 (thread_db_load_search): Clear the thread_db object.
12364 (try_thread_db_load_1): Ditto.
12365 (switch_to_process): New.
12366 (disable_thread_event_reporting): Use it.
12367 (remove_thread_event_breakpoints): New.
12368 (thread_db_detach, thread_db_mourn): Use it.
12370 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12372 * linux-low.c (linux_enable_event_reporting): New.
12373 (linux_wait_for_event_1, handle_extended_wait): Use it.
12375 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12377 * linux-low.c (linux_kill_one_lwp, linux_kill)
12378 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12379 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12380 SIGSTOP even if the LWP is stopped.
12381 (send_sigstop_callback): New.
12382 (stop_all_lwps): Use send_sigstop_callback instead.
12383 (linux_resume_one_thread): Adjust.
12384 (proceed_one_lwp): Still proceed an LWP that the client has
12385 requested to stop, if we haven't reported it as stopped yet. Make
12386 sure that LWPs the client want stopped, have a pending SIGSTOP.
12388 2010-04-26 Doug Evans <dje@google.com>
12390 * server.c (handle_general_set): Make static.
12392 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12393 Print received char after testing for error/eof instead of before.
12394 (input_interrupt): Tweak comment.
12396 2010-04-23 Doug Evans <dje@google.com>
12398 * server.c (start_inferior): Print inferior argv if --debug.
12400 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12402 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12403 * nto-x86-low.c: Include server.h
12405 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12407 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12408 be consistent with other sources of this directory.
12409 (init_registers_amd64): Correct name of source file of this function
12412 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12414 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12415 64-bit executables.
12417 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12419 * win32-i386-low.c: Add 64-bit support.
12420 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12421 (init_registers_amd64): Declare.
12422 (mappings): Add 64-bit version of array.
12423 (init_windows_x86): New function.
12424 (the_low_target): Change init_arch field to init_windows_x86.
12426 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12428 * win32-low.c: Adapt to support also 64-bit architecture.
12429 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12430 (get_image_name): Use SIZE_T type for local variable `done'.
12431 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12432 (toolhelp_get_dll_name): Idem.
12433 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12434 Use uintptr_t typecast to avoid warning.
12435 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12436 (handle_exception): Use phex_nz to avoid warning.
12437 (win32_wait): Remove unused local variable `process'.
12439 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12441 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12444 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12446 * configure.ac: Use `ws2_32' library for srv_mingw.
12447 * configure: Regenerate.
12448 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12449 * remote-utils.c: Likewise.
12451 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12453 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12454 if __x86_64__ is defined.
12456 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12458 * configure: Regenerate.
12460 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12462 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12463 * target.h (target_ops): New get_tib_address field.
12464 * win32-low.h (win32_thread_info): Add thread_local_base field.
12465 * win32-low.c (child_add_thread): Add tlb argument.
12466 Set thread_local_base field to TLB.
12467 (get_child_debug_event): Adapt to child_add_thread change.
12468 (win32_get_tib_address): New function.
12469 (win32_target_ops): Set get_tib_address field to
12470 win32_get_tib_address.
12471 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12473 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12475 * linux-low.c (linux_mourn): Also remove the process.
12476 * server.c (handle_target_event): Don't remove the process here.
12477 * nto-low.c (nto_mourn): New.
12478 (nto_target_ops): Install it.
12479 * spu-low.c (spu_mourn): New.
12480 (spu_target_ops): Install it.
12481 * win32-low.c (win32_mourn): New.
12482 (win32_target_ops): Install it.
12484 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12486 * server.h (buffer_xml_printf): Remove redundant `;'.
12488 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12490 * regcache.c (set_register_cache): Invalidate regcaches before
12491 changing the register cache layout.
12492 (regcache_invalidate_one): Allow a NULL regcache.
12493 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12494 regcaches before changing the register cache layout or the target
12497 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12499 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12500 variable warning on Linux/x86-64.
12502 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12504 GDBserver disconnected tracing support.
12506 * linux-low.c (linux_remove_process): Delete.
12507 (add_lwp): Don't set last_resume_kind here.
12508 (linux_kill): Use `mourn'.
12509 (linux_detach): Use `thread_db_detach', and `mourn'.
12510 (linux_mourn): New.
12511 (linux_attach_lwp_1): Adjust comment.
12512 (linux_attach): last_resume_kind moved the thread_info; adjust.
12513 (status_pending_p_callback): Adjust.
12514 (linux_wait_for_event_1): Adjust.
12515 (count_events_callback, select_singlestep_lwp_callback)
12516 (select_event_lwp_callback, cancel_breakpoints_callback)
12517 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12518 (proceed_one_lwp): Adjust.
12519 (linux_async): Add debug output.
12520 (linux_thread_stopped): New.
12521 (linux_pause_all): New.
12522 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12524 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12525 (thread_db_free): Delete declaration.
12526 (thread_db_detach, thread_db_mourn): Declare.
12527 * thread-db.c (thread_db_init): Use thread_db_mourn.
12528 (thread_db_free): Delete, split in two.
12529 (disable_thread_event_reporting): New.
12530 (thread_db_detach): New.
12531 (thread_db_mourn): New.
12533 * server.h (struct thread_info) <last_resume_kind>: New field.
12534 <attached>: Add comment.
12535 <gdb_detached>: New field.
12536 (handler_func): Change return type to int.
12537 (handle_serial_event, handle_target_event): Ditto.
12538 (gdb_connected): Declare.
12540 (disconnected_tracing): Declare.
12541 (stop_tracing): Declare.
12543 * server.c (handle_query) <qSupported>: Report support for
12544 disconnected tracing.
12545 (queue_stop_reply_callback): Account for running threads.
12546 (gdb_wants_thread_stopped): New.
12547 (gdb_wants_all_threads_stopped): New.
12548 (gdb_reattached_process): New.
12549 (handle_status): Clear the `gdb_detached' flag of all processes.
12550 In all-stop, stop all threads.
12551 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12552 (process_serial_event): If the remote connection breaks, or if an
12553 exit was forced with "monitor exit", force an event loop exit.
12554 Handle disconnected tracing on detach.
12555 (handle_serial_event): Adjust.
12556 (handle_target_event): If GDB isn't connected, forward events back
12557 to the inferior, unless the last process exited, in which case,
12558 exit gdbserver. Adjust interface.
12560 * remote-utils.c (remote_open): Don't block in accept. Instead
12561 register an event loop source on the listen socket file
12562 descriptor. Refactor bits into ...
12563 (listen_desc): ... this new global.
12564 (gdb_connected): ... this new function.
12565 (enable_async_notification): ... this new function.
12566 (handle_accept_event): ... this new function.
12567 (remote_close): Clear remote_desc.
12569 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12571 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12573 (mourn_inferior): Define.
12574 (target_process_qsupported): Avoid the dangling else problem.
12575 (thread_stopped): Define.
12576 (pause_all): Define.
12577 (target_waitstatus_to_string): Declare.
12578 * target.c (target_waitstatus_to_string): New.
12580 * tracepoint.c (tracing): Make extern.
12581 (disconnected_tracing): New.
12582 (stop_tracing): Make extern. Handle tracing stops due to GDB
12584 (cmd_qtdisconnected): New.
12585 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12586 (handle_tracepoint_general_set): Handle QTDisconnected.
12588 * event-loop.c (event_handler_func): Change return type to int.
12589 (process_event): Bail out if the event handler wants the event
12591 (handle_file_event): Ditto.
12592 (start_event_loop): Bail out if the event handler wants the event
12595 * nto-low.c (nto_target_ops): Adjust.
12596 * spu-low.c (spu_wait): Don't remove the process here.
12597 (spu_target_ops): Adjust.
12598 * win32-low.c (win32_wait): Don't remove the process here.
12599 (win32_target_ops): Adjust.
12601 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12603 * regcache.c (realloc_register_cache): Invalidate inferior's
12604 regcache before recreating it.
12606 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12608 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12610 2010-04-09 Stan Shebs <stan@codesourcery.com>
12611 Pedro Alves <pedro@codesourcery.com>
12613 * server.h (LONGEST): New.
12614 (struct thread_info) <while_stepping>: New field.
12615 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12617 (initialize_tracepoint, handle_tracepoint_general_set)
12618 (handle_tracepoint_query, tracepoint_finished_step)
12619 (tracepoint_was_hit, release_while_stepping_state_list):
12620 (current_traceframe): Declare.
12621 * server.c (handle_general_set): Handle tracepoint packets.
12622 (read_memory): New.
12623 (write_memory): New.
12624 (handle_search_memory_1): Use read_memory.
12625 (handle_query): Report support for conditional tracepoints, trace
12626 state variables, and tracepoint sources. Handle tracepoint
12628 (main): Initialize the tracepoints module.
12629 (process_serial_event): Handle traceframe reads/writes.
12631 * linux-low.c (handle_tracepoints): New.
12632 (linux_wait_1): Call it.
12633 (linux_resume_one_lwp): Handle while-stepping.
12634 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12635 (linux_target_ops): Install them.
12636 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12638 * linux-x86-low.c (x86_supports_tracepoints): New.
12639 (the_low_target). Install it.
12641 * mem-break.h (delete_breakpoint): Declare.
12642 * mem-break.c (delete_breakpoint): Make external.
12644 * target.h (struct target_ops): Add `supports_tracepoints',
12645 `read_pc', and `write_pc' fields.
12646 (target_supports_tracepoints): Define.
12647 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12650 * regcache.h (struct regcache) <registers_owned>: New field.
12651 (init_register_cache, regcache_cpy): Declare.
12652 (regcache_read_pc, regcache_write_pc): Declare.
12653 (register_cache_size): Declare.
12654 (supply_regblock): Declare.
12655 * regcache.c (init_register_cache): New.
12656 (new_register_cache): Use it.
12657 (regcache_cpy): New.
12658 (register_cache_size): New.
12659 (supply_regblock): New.
12660 (regcache_read_pc, regcache_write_pc): New.
12662 * tracepoint.c: New.
12664 * Makefile.in (OBS): Add tracepoint.o.
12665 (tracepoint.o): New rule.
12667 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12669 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12671 (i386-mmx.c): Likewise.
12672 (i386-mmx-linux.o): Likewise.
12673 (i386-mmx-linux.c): Likewise.
12675 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12676 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12677 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12678 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12680 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12681 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12682 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12684 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12686 * Makefile.in (clean): Updated.
12688 (i386-avx.c): Likewise.
12689 (i386-avx-linux.o): Likewise.
12690 (i386-avx-linux.c): Likewise.
12691 (amd64-avx.o): Likewise.
12692 (amd64-avx.c): Likewise.
12693 (amd64-avx-linux.o): Likewise.
12694 (amd64-avx-linux.c): Likewise.
12696 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12697 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12698 (srv_amd64_regobj): Add amd64-avx.o.
12699 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12700 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12701 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12702 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12703 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12704 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12705 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12707 * i387-fp.c: Include "i386-xstate.h".
12709 (i387_cache_to_xsave): Likewise.
12710 (i387_xsave_to_cache): Likewise.
12711 (x86_xcr0): Likewise.
12713 * i387-fp.h (i387_cache_to_xsave): Likewise.
12714 (i387_xsave_to_cache): Likewise.
12715 (x86_xcr0): Likewise.
12717 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12718 * linux-crisv32-low.c (target_regsets): Likewise.
12719 * linux-m68k-low.c (target_regsets): Likewise.
12720 * linux-mips-low.c (target_regsets): Likewise.
12721 * linux-ppc-low.c (target_regsets): Likewise.
12722 * linux-s390-low.c (target_regsets): Likewise.
12723 * linux-sh-low.c (target_regsets): Likewise.
12724 * linux-sparc-low.c (target_regsets): Likewise.
12725 * linux-xtensa-low.c (target_regsets): Likewise.
12727 * linux-low.c: Include <sys/uio.h>.
12728 (regsets_fetch_inferior_registers): Support nt_type.
12729 (regsets_store_inferior_registers): Likewise.
12730 (linux_process_qsupported): New.
12731 (linux_target_ops): Add linux_process_qsupported.
12733 * linux-low.h (regset_info): Add nt_type.
12734 (linux_target_ops): Add process_qsupported.
12736 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12738 (init_registers_i386_avx_linux): New.
12739 (init_registers_amd64_avx_linux): Likewise.
12740 (xmltarget_i386_linux_no_xml): Likewise.
12741 (xmltarget_amd64_linux_no_xml): Likewise.
12742 (PTRACE_GETREGSET): Likewise.
12743 (PTRACE_SETREGSET): Likewise.
12744 (x86_fill_xstateregset): Likewise.
12745 (x86_store_xstateregset): Likewise.
12746 (use_xml): Likewise.
12747 (x86_linux_update_xmltarget): Likewise.
12748 (x86_linux_process_qsupported): Likewise.
12749 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12750 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12751 init_registers_i386_linux here. Call
12752 x86_linux_update_xmltarget.
12753 (the_low_target): Add x86_linux_process_qsupported.
12755 * server.c (handle_query): Call target_process_qsupported.
12757 * target.h (target_ops): Add process_qsupported.
12758 (target_process_qsupported): New.
12760 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12762 * inferiors.c (add_thread): Set last_status kind to
12763 TARGET_WAITKIND_IGNORE.
12764 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12765 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12766 (linux_wait_1): Move `thread' local definition to block that uses
12767 it. Don't NULL initialize `event_child'.
12768 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12769 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12770 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12772 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12774 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12775 an extended waitstatus, or by a watchpoint.
12776 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12777 thread was stepping or has been stopped by a watchpoint.
12779 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12781 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12782 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12783 of another, then delete the previous, and validate all
12785 (validate_inserted_breakpoint): New.
12786 (delete_disabled_breakpoints): New.
12787 (validate_breakpoints): New.
12788 (check_mem_read): Validate breakpoints before trusting their
12789 shadow. Delete disabled breakpoints.
12790 (check_mem_write): Validate breakpoints before trusting they
12791 should be inserted. Delete disabled breakpoints.
12792 * mem-break.h (validate_breakpoints):
12793 * server.c (handle_query): Validate breakpoints when we see a
12796 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12798 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12799 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12800 if we could tell there's a GDB breakpoint at stop_pc.
12801 (need_step_over_p): Don't do a step over if we find a GDB
12802 breakpoint at the resume PC.
12804 * mem-break.c (struct raw_breakpoint): New.
12805 (enum bkpt_type): New type `gdb_breakpoint'.
12806 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12807 fields. New field `raw'.
12808 (find_raw_breakpoint_at): New.
12809 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12810 breakpoint instead.
12811 (set_breakpoint_at): Adjust.
12812 (delete_raw_breakpoint): New.
12813 (release_breakpoint): New.
12814 (delete_breakpoint): Rename to...
12815 (delete_breakpoint_1): ... this. Add proc parameter. Use
12816 release_breakpoint. Return ENOENT.
12817 (delete_breakpoint): Reimplement.
12818 (find_breakpoint_at): Delete.
12819 (find_gdb_breakpoint_at): New.
12820 (delete_breakpoint_at): Delete.
12821 (set_gdb_breakpoint_at): New.
12822 (delete_gdb_breakpoint_at): New.
12823 (gdb_breakpoint_here): New.
12824 (set_reinsert_breakpoint): Use release_breakpoint.
12825 (uninsert_breakpoint): Rename to ...
12826 (uninsert_raw_breakpoint): ... this.
12827 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12828 (reinsert_raw_breakpoint): Change parameter type to
12830 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12832 (check_breakpoints): Adjust. Use release_breakpoint.
12833 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12834 (breakpoint_inserted_here): Ditto.
12835 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12836 Don't trust the breakpoint's shadow if it is not inserted.
12837 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12838 (delete_all_breakpoints): Adjust.
12839 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12840 use delete_breakpoint_1.
12842 * mem-break.h (breakpoints_supported): Delete declaration.
12843 (set_gdb_breakpoint_at): Declare.
12844 (gdb_breakpoint_here): Declare.
12845 (delete_breakpoint_at): Delete.
12846 (delete_gdb_breakpoint_at): Declare.
12848 * server.h (struct raw_breakpoint): Forward declare.
12849 (struct process_info): New field `raw_breakpoints'.
12851 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12854 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12856 * linux-low.c (status_pending_p_callback): Fix comment.
12857 (linux_wait_for_event_1): Move most of the internal breakpoint
12858 handling from here...
12859 (linux_wait_1): ... to here.
12860 (count_events_callback): New.
12861 (select_singlestep_lwp_callback): New.
12862 (select_event_lwp_callback): New.
12863 (cancel_breakpoints_callback): New.
12864 (select_event_lwp): New.
12865 (linux_wait_1): Simplify internal breakpoint handling. Give equal
12866 priority to all LWPs that have had events that should be reported
12867 to the client. Cancel breakpoints when about to reporting the
12868 event to the client, not while stopping lwps. No longer cancel
12869 finished single-steps here.
12870 (cancel_finished_single_step): Delete.
12871 (cancel_finished_single_steps): Delete.
12873 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12875 * mem-break.c (enum bkpt_type): New.
12876 (struct breakpoint): New field `type'.
12877 (set_breakpoint_at): Change return type to struct breakpoint
12878 pointer. Set type to `other_breakpoint' by default.
12879 (delete_breakpoint): Rewrite, supporting more than one breakpoint
12880 in the breakpoint list.
12881 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12882 (reinsert_breakpoint): Rename to ...
12883 (reinsert_raw_breakpoint): ... this.
12884 (reinsert_breakpoints_at): Adjust.
12885 * mem-break.h (struct breakpoint): Declare.
12886 (set_breakpoint_at): Change return type to struct breakpoint
12889 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12891 * server.c (handle_query): Assign, not compare.
12893 2010-03-24 Pedro Alves <pedro@codesourcery.com>
12895 Teach linux gdbserver to step-over-breakpoints.
12897 * linux-low.c (can_hardware_single_step): New.
12898 (supports_breakpoints): New.
12899 (handle_extended_wait): If stopping threads, read the stop pc of
12900 the new cloned LWP.
12902 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
12903 low target doesn't support retrieving the PC.
12904 (add_lwp): Set last_resume_kind to resume_continue.
12905 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
12906 (linux_attach): Don't clear stop_expected. Set the lwp's
12907 last_resume_kind to resume_stop.
12908 (linux_detach_one_lwp): Don't check for removed breakpoints.
12909 (check_removed_breakpoint): Delete.
12910 (status_pending_p): Rename to ...
12911 (status_pending_p_callback): ... this. Don't check for removed
12912 breakpoints. Don't consider threads that are stopped from GDB's
12914 (linux_wait_for_lwp): Always read the stop_pc here.
12915 (cancel_breakpoint): New.
12916 (step_over_bkpt): New global.
12917 (linux_wait_for_event_1): Implement stepping over breakpoints.
12918 (gdb_wants_lwp_stopped): New.
12919 (gdb_wants_all_stopped): New.
12920 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12921 single-step traps here. Store the thread's last reported target
12923 (send_sigstop): Don't clear stop_expected. Always set it,
12925 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12926 (cancel_finished_single_step): New.
12927 (cancel_finished_single_steps): New.
12928 (wait_for_sigstop): Don't cancel finished single-step traps here.
12929 (linux_resume_one_lwp): Don't check for removed breakpoints.
12930 Don't set `step' on non-hardware step archs.
12931 (linux_set_resume_request): Ignore resume_stop requests if already
12932 stopping or stopped. Set the lwp's last_resume_kind.
12933 (resume_status_pending_p): Don't check for removed breakpoints.
12934 (need_step_over_p): New.
12935 (start_step_over): New.
12936 (finish_step_over): New.
12937 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12938 requests. Clear the thread's last reported target waitstatus.
12939 Don't use the `suspended' flag. Don't consider pending breakpoints.
12940 (linux_resume): Start a step-over if necessary.
12941 (proceed_one_lwp): New.
12942 (proceed_all_lwps): New.
12943 (unstop_all_lwps): New.
12944 * linux-low.h (struct lwp_info): Rewrite comment for the
12945 `suspended' flag. Add the `stop_pc' field. Delete the
12946 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12947 Add `'last_resume_kind' and `need_step_over' fields.
12948 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12949 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12950 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12951 (set_raw_breakpoint_at): New.
12952 (set_breakpoint_at): Rewrite to use it.
12953 (reinsert_breakpoint_handler): Delete.
12954 (set_reinsert_breakpoint): New.
12955 (reinsert_breakpoint_by_bp): Delete.
12956 (delete_reinsert_breakpoints): New.
12957 (uninsert_breakpoint): Rewrite.
12958 (uninsert_breakpoints_at): New.
12959 (reinsert_breakpoint): Rewrite.
12960 (reinsert_breakpoints_at): New.
12961 (check_breakpoints): Rewrite.
12962 (breakpoint_here): New.
12963 (breakpoint_inserted_here): New.
12964 (check_mem_read): Adjust.
12965 * mem-break.h (breakpoints_supported, breakpoint_here)
12966 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12967 (reinsert_breakpoint_by_bp): Delete declaration.
12968 (delete_reinsert_breakpoints): Declare.
12969 (reinsert_breakpoint): Delete declaration.
12970 (reinsert_breakpoints_at): Declare.
12971 (uninsert_breakpoint): Delete declaration.
12972 (uninsert_breakpoints_at): Declare.
12973 (check_breakpoints): Adjust prototype.
12974 * server.h: Adjust include order.
12975 (struct thread_info): Declare here. Add a `last_status' field.
12977 2010-03-23 Michael Snyder <msnyder@vmware.com>
12979 * server.c (crc32): New function.
12980 (handle_query): Add handling for 'qCRC:' request.
12982 2010-03-23 Pedro Alves <pedro@codesourcery.com>
12984 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12985 lwp had been stopped by a watchpoint.
12987 2010-03-16 Pedro Alves <pedro@codesourcery.com>
12989 * server.h (internal_error): Declare.
12990 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12991 * utils.c (internal_error): New function.
12993 2010-03-15 Andreas Schwab <schwab@redhat.com>
12995 * configure.srv: Fix typo setting srv_regobj.
12997 2010-03-15 Pedro Alves <pedro@codesourcery.com>
12999 * linux-low.c (fetch_register): Avoid passing a non string literal
13001 (usr_store_inferior_registers): Ditto.
13003 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13005 * linux-low.c (linux_write_memory): Bail out early if peeking
13008 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13010 * linux-low.h (struct lwp_info): New fields
13011 `stopped_by_watchpoint' and `stopped_data_address'.
13012 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13013 here, and cache them in the lwp object.
13014 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13016 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13018 (linux_stopped_by_watchpoint): Rewrite.
13019 (linux_stopped_data_address): Rewrite.
13021 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13023 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13024 switching the current inferior, not before.
13026 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13028 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13029 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13030 i386-linux.c and amd64-linux.c.
13031 (reg-i386.o): Removed.
13032 (reg-i386.c): Likewise.
13033 (reg-i386-linux.o): Likewise.
13034 (reg-i386-linux.c): Likewise.
13035 (reg-x86-64.o): Likewise.
13036 (reg-x86-64.c): Likewise.
13037 (reg-x86-64-linux.o): Likewise.
13038 (reg-x86-64-linux.c): Likewise.
13040 (i386.c): Likewise.
13041 (i386-linux.o): Likewise.
13042 (i386-linux.c): Likewise.
13043 (amd64.o): Likewise.
13044 (amd64.c): Likewise.
13045 (amd64-linux.o): Likewise.
13046 (amd64-linux.c): Likewise.
13048 * configure.srv (srv_i386_regobj): New.
13049 (srv_i386_linux_regobj): Likewise.
13050 (srv_amd64_regobj): Likewise.
13051 (srv_amd64_linux_regobj): Likewise.
13052 (srv_i386_32bit_xmlfiles): Likewise.
13053 (srv_i386_64bit_xmlfiles): Likewise.
13054 (srv_i386_xmlfiles): Likewise.
13055 (srv_amd64_xmlfiles): Likewise.
13056 (srv_i386_linux_xmlfiles): Likewise.
13057 (srv_amd64_linux_xmlfiles): Likewise.
13058 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13059 srv_xmlfiles to $srv_i386_xmlfiles.
13060 (i[34567]86-*-mingw32ce*): Likewise.
13061 (i[34567]86-*-mingw*): Likewise.
13062 (i[34567]86-*-nto*): Likewise.
13063 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13064 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13065 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13066 (x86_64-*-linux*): Likewise.
13068 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13069 (init_registers_amd64_linux): New.
13070 (x86_arch_setup): Replace init_registers_x86_64_linux with
13071 init_registers_amd64_linux.
13073 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13075 * configure.ac: Check for libdl. If it is not available link against
13076 static libthread_db.
13077 * configure: Regenerate.
13079 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13083 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13084 handing a read watchpoint.
13085 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13087 2010-02-12 Doug Evans <dje@google.com>
13089 * linux-low.c (linux_supports_tracefork_flag): Document.
13090 (linux_look_up_symbols): Add comment.
13092 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13094 * regcache.c (supply_register): Clear regcache if buf is NULL.
13096 2010-02-02 Nicolas Roche <roche@sourceware.org>
13097 Joel Brobecker <brobecker@adacore.com>
13099 * inferiors.c (find_inferior): Add function documentation.
13100 (unloaded_dll): Handle the case where the unloaded dll has not
13101 been previously registered in the dll list.
13103 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13105 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13106 (thumb2_breakpoint): New.
13107 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13109 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13111 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13112 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13115 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13117 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13119 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13121 * linux-s390-low.c (s390_collect_ptrace_register)
13122 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13124 2010-01-21 Doug Evans <dje@google.com>
13126 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13127 (PTRACE_ARG4_TYPE): New macro.
13128 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13129 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13130 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13131 (usr_store_inferior_registers): Ditto.
13132 (linux_read_memory, linux_write_memory): Ditto.
13133 (linux_test_for_tracefork): Ditto.
13135 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13136 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13138 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13140 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13143 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13145 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13146 prototype to take a regcache. Adjust.
13148 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13150 * regcache.h (struct thread_info): Forward declare.
13151 (struct regcache): New.
13152 (new_register_cache): Adjust prototype.
13153 (get_thread_regcache): Declare.
13154 (free_register_cache): Adjust prototype.
13155 (registers_to_string, registers_from_string): Ditto.
13156 (supply_register, supply_register_by_name, collect_register)
13157 (collect_register_as_string, collect_register_by_name): Ditto.
13158 * regcache.c (struct inferior_regcache_data): Delete.
13159 (get_regcache): Rename to ...
13160 (get_thread_regcache): ... this. Adjust. Switch inferior before
13161 fetching registers.
13162 (regcache_invalidate_one): Adjust.
13163 (regcache_invalidate): Fix prototype.
13164 (new_register_cache): Return the new register cache.
13165 (free_register_cache): Change prototype.
13166 (realloc_register_cache): Adjust.
13167 (registers_to_string): Change prototype to take a regcache. Adjust.
13168 (registers_from_string): Ditto.
13169 (register_data): Ditto.
13170 (supply_register): Ditto.
13171 (supply_register_by_name): Ditto.
13172 (collect_register): Ditto.
13173 (collect_register_as_string): Ditto.
13174 (collect_register_by_name): Ditto.
13175 * server.c (process_serial_event): Adjust.
13176 * linux-low.h (regset_fill_func, regset_store_func): Change
13178 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13180 * linux-low.c (get_stop_pc): Adjust.
13181 (check_removed_breakpoint): Adjust.
13182 (linux_wait_for_event): Adjust.
13183 (linux_resume_one_lwp): Adjust.
13184 (fetch_register): Add regcache parameter. Adjust.
13185 (usr_store_inferior_registers): Ditto.
13186 (regsets_fetch_inferior_registers): Ditto.
13187 (regsets_store_inferior_registers): Ditto.
13188 (linux_fetch_registers, linux_store_registers): Ditto.
13189 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13191 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13193 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13194 prototype to take a regcache.
13195 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13196 * remote-utils.c (convert_ascii_to_int, outreg)
13197 (prepare_resume_reply): Change prototype to take a regcache.
13199 * target.h (struct target_ops) <fetch_registers, store_registers>:
13200 Change prototype to take a regcache.
13201 (fetch_inferior_registers, store_inferior_registers): Change
13202 prototype to take a regcache. Adjust.
13203 * proc-service.c (ps_lgetregs): Adjust.
13204 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13205 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13206 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13207 take a regcache. Adjust.
13208 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13209 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13210 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13211 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13212 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13213 (cris_cannot_fetch_register):
13214 (cris_breakpoint_at): Change prototype to take a regcache.
13216 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13217 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13218 to take a regcache. Adjust.
13219 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13221 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13222 take a regcache. Adjust.
13223 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13224 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13225 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13226 * linux-mips-low.c (mips_get_pc):
13227 (mips_set_pc): Change prototype to take a regcache. Adjust.
13228 (mips_reinsert_addr): Adjust.
13229 (mips_collect_register): Change prototype to take a regcache.
13231 (mips_supply_register):
13232 (mips_collect_register_32bit, mips_supply_register_32bit)
13233 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13234 (mips_store_fpregset): Ditto.
13235 * linux-ppc-low.c (ppc_supply_ptrace_register)
13236 (ppc_supply_ptrace_register): Ditto.
13237 (parse_spufs_run): Adjust.
13238 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13239 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13240 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13241 take a regcache. Adjust.
13242 * linux-s390-low.c (s390_collect_ptrace_register)
13243 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13244 (s390_set_pc): Change prototype to take a regcache. Adjust.
13245 (s390_arch_setup): Adjust.
13246 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13247 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13248 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13249 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13250 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13252 (sparc_breakpoint_at): Adjust.
13253 * linux-xtensa-low.c (xtensa_fill_gregset):
13254 (xtensa_store_gregset):
13255 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13256 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13257 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13258 prototype to take a regcache. Adjust.
13259 * win32-arm-low.c (arm_fetch_inferior_register)
13260 (arm_store_inferior_register): Change prototype to take a
13262 * win32-i386-low.c (i386_fetch_inferior_register)
13263 (i386_store_inferior_register): Change prototype to take a
13265 * win32-low.c (child_fetch_inferior_registers)
13266 (child_store_inferior_registers): Change prototype to take a
13268 (win32_wait): Adjust.
13269 (win32_fetch_inferior_registers): Change prototype to take a
13271 (win32_store_inferior_registers): Adjust.
13272 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13273 store_inferior_register>: Change prototype to take a regcache.
13275 2010-01-20 Doug Evans <dje@google.com>
13277 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13279 (linux_wait_for_event1, linux_init_signals): Ditto.
13280 (W_STOPCODE): Provide definition if missing.
13282 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13284 * linux-low.c (linux_core_of_thread): New.
13285 (compare_ints, show_process, list_threads): New.
13286 (linux_qxfer_osdata): Report threads and cores.
13287 (linux_target_op): Register linux_core_of_thread.
13288 * remote-utils.c (prepare_resume_reply): Report the core.
13289 (buffer_xml_printf): Support %d specifier.
13290 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13292 (handle_query): Handle qXfer:threads. Announce availability
13294 * target.h (struct target_ops): New field core_of_thread.
13296 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13298 * Makefile.in (clean): Remove new generated files.
13299 (reg-s390.o, reg-s390.c): Remove rules.
13300 (reg-s390x.o, reg-s390x.c): Likewise.
13301 (s390-linux32.o, s390-linux32.c): Add rules.
13302 (s390-linux64.o, s390-linux64.c): Likewise.
13303 (s390x-linux64.o, s390x-linux64.c): Likewise.
13304 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13305 * linux-s390-low.c: Include <elf.h>.
13306 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13307 (init_registers_s390): Remove prototype.
13308 (init_registers_s390x): Likewise.
13309 (init_registers_s390_linux32): Add prototype.
13310 (init_registers_s390_linux64): Likewise.
13311 (init_registers_s390x_linux64): Likewise.
13312 (s390_num_regs_3264): New define.
13313 (s390_regmap_3264): New global variable.
13314 (s390_cannot_fetch_register): Remove obsolete check.
13315 (s390_cannot_store_register): Likewise.
13316 (s390_collect_ptrace_register): Handle upper/lower register halves.
13317 (s390_supply_ptrace_register): Likewise.
13318 (s390_fill_gregset): Update to register number changes.
13319 (s390_get_hwcap): New routine.
13320 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13321 Install appropriate regmap and register set.
13323 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13325 * server.c (gdbserver_version): Update copyright year to 2010.
13326 * gdbreplay.c (gdbreplay_version): Likewise.
13328 2009-12-28 Doug Evans <dje@google.com>
13330 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13331 elf/external.h. Include <elf.h> instead but only if necessary.
13333 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13335 * linux-low.c (linux_remove_process): Remove `detaching'
13336 parameter. Don't release/detach from thread_db here.
13337 (linux_kill): Release/detach from thread_db here, ...
13338 (linux_detach): ... and here, before actually detaching.
13339 (linux_wait_1): ... and here, when a process exits.
13340 * thread-db.c (any_thread_of): New.
13341 (thread_db_free): Switch the current inferior to a thread of the
13344 2009-12-21 Doug Evans <dje@google.com>
13346 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13348 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13349 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13350 warning ifndef __NR_tkill. Move setting of errno there too.
13351 Delete unnecessary resetting of errno after syscall.
13352 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13354 * configure.ac: Check for dladdr.
13355 * config.in: Regenerate.
13356 * configure: Regenerate.
13357 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13358 (try_thread_db_load): Update.
13360 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13362 2009-12-18 Doug Evans <dje@google.com>
13364 * event-loop.c: Include unistd.h if it exists.
13366 * linux-low.c (my_waitpid): Move definition away from being in
13367 between linux_tracefork_child/linux_test_for_tracefork.
13369 * gdb_proc_service.h (psaddr_t): Fix type.
13370 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13371 signature to match glibc.
13373 2009-12-16 Doug Evans <dje@google.com>
13375 * linux-low.c (linux_read_memory): Fix argument to read.
13377 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13379 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13380 events, don't leave current_inferior pointing at null.
13382 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13384 * win32-low.c (LOG): Delete.
13385 (OUTMSG): Output to stderr.
13386 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13387 on compile time LOG macro.
13388 (win32_wait): Fix debug output.
13390 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13392 * win32-low.c (win32_add_one_solib): If the dll name is
13393 "ntdll.dll", prepend the system directory to the dll path.
13395 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13397 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13399 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13400 Vladimir Prus <vladimir@codesourcery.com>
13402 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13403 * configure.ac: Check for __mcoldfire__ and set
13404 gdb_cv_m68k_is_coldfire.
13405 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13406 reg-cf.o and reg-m68k.o.
13407 * configure: Regenerated.
13409 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13411 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13412 Pass it to thread_db_free.
13413 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13414 proper `detaching' argument to linux_remove_process.
13415 * linux-low.h (thread_db_free): Add `detaching' parameter.
13416 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13418 (thread_db_free): Add `detaching' parameter. Only
13419 call td_ta_clear_event if detaching from process.
13421 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13423 * thread-db.c (thread_db_free): Fix typo.
13425 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13428 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13430 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13432 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13433 with an i686 compiler.
13434 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13436 * configure: Rebuilt.
13438 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13442 * server.c (handle_search_memory_1): Correct read_addr initialization
13443 in loop for searching subsequent chunks.
13445 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13447 * configure.ac: New --with-libthread-db option.
13448 * thread-db.c: Allow direct dependence on libthread_db.
13449 (thread_db_free): Adjust.
13450 * config.in: Regenerate.
13451 * configure: Likewise.
13453 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13456 * thread-db.c (attach_thread): New function.
13457 (maybe_attach_thread): Return success/failure.
13458 (find_new_threads_callback): Adjust.
13459 (thread_db_find_new_threads): Loop until no new threads.
13461 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13463 * proc-service.c (ps_lgetregs): Formatting.
13465 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13467 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13468 * configure.ac: Adjust.
13469 * linux-low.h (struct process_info_private): Move members to struct
13471 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13472 * linux-low.c (linux_remove_process): Adjust.
13473 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13474 * server.c (handle_query): Move code ...
13475 (handle_monitor_command): ... here. New function.
13476 * target.h (struct target_ops): New member.
13477 * thread-db.c (struct thread_db): New.
13478 (libthread_db_search_path): New variable.
13479 (thread_db_create_event, thread_db_enable_reporting)
13480 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13481 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13482 (try_thread_db_load_1, dladdr_to_soname): New functions.
13483 (try_thread_db_load, thread_db_load_search): New functions.
13484 (thread_db_init): Search for libthread_db.
13485 (thread_db_free): New function.
13486 (thread_db_handle_monitor_command): Likewise.
13487 * config.in: Regenerate.
13488 * configure: Regenerate.
13490 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13492 * spu-low.c (spu_kill): Wait for inferior to terminate.
13493 Call clear_inferiors.
13494 (spu_detach): Call clear_inferiors.
13496 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13498 * aclocal.m4: Regenerate.
13499 * config.in: Likewise.
13500 * configure: Likewise.
13502 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13504 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13505 (parse_spufs_run): New function.
13506 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13507 (ppc_breakpoint_at): Handle SPU breakpoints.
13509 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13511 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13512 (SPUFS_MAGIC): Define.
13513 (spu_enumerate_spu_ids): New function.
13514 (linux_qxfer_spu): New function.
13515 (linux_target_ops): Install linux_qxfer_spu.
13517 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13519 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13520 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13521 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13522 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13523 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13524 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13525 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13526 (init_registers_powerpc_cell32l): Add prototype.
13527 (init_registers_powerpc_cell64l): Likewise.
13528 (ppc_arch_setup): Detect Cell/B.E. architecture.
13530 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13532 * Makefile.in (datarootdir): New variable.
13534 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13536 * linux-low.c (linux_write_memory): Update debugging output.
13537 * Makefile.in (clean): Add new descriptions.
13538 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13539 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13540 * configure.srv: Add new files for arm*-*-linux*.
13541 * linux-arm-low.c: Add new declarations.
13542 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13543 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13544 (HWCAP_VFPv3D16): New.
13545 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13546 instead of __IWMMXT__.
13547 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13548 (arm_arch_setup): New.
13549 (target_regsets): Remove #ifdef. Add VFP regset.
13550 (the_low_target): Use arm_arch_setup.
13552 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13554 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13555 the main thread again.
13557 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13559 Adding Neutrino gdbserver.
13560 * configure: Regenerated.
13561 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13562 * configure.srv (i[34567]86-*-nto*): New target.
13563 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13564 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13565 (nto_comctrl) [__QNX__]: New function.
13566 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13568 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13570 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13573 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13574 Pedro Alves <pedro@codesourcery.com>
13576 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13577 don't support CONTEXT_EXTENDED_REGISTERS.
13578 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13579 (the_low_target): Install them.
13580 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13581 failing with ERROR_PIPE_NOT_CONNECTED.
13583 2009-06-30 Doug Evans <dje@google.com>
13584 Pierre Muller <muller@ics.u-strasbg.fr>
13586 Add h/w watchpoint support to x86-linux, win32-i386.
13587 * Makefile.in (SFILES): Add i386-low.c
13588 (i386_low_h): Define.
13589 (i386-low.o): Add dependencies.
13590 (linux-x86-low.o): Add i386-low.h dependency.
13591 (win32-i386-low.o): Ditto.
13592 * i386-low.c: New file.
13593 * i386-low.h: New file.
13594 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13595 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13596 * linux-low.c (linux_add_process): Initialize arch_private.
13597 (linux_remove_process): Free arch_private.
13598 (add_lwp): Initialize arch_private.
13599 (delete_lwp): Free arch_private.
13600 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13602 * linux-low.h (process_info_private): New member arch_private.
13603 (lwp_info): New member arch_private.
13604 (linux_target_ops): New members new_process, new_thread,
13606 (ptid_of): New macro.
13607 * linux-x86-low.c: Include stddef.h, i386-low.h.
13608 (arch_process_info): New struct.
13609 (arch_lwp_info): New struct.
13610 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13611 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13612 (i386_dr_low_get_status): New function.
13613 (x86_insert_point, x86_remove_point): New functions.
13614 (x86_stopped_by_watchpoint): New function.
13615 (x86_stopped_data_address): New function.
13616 (x86_linux_new_process, x86_linux_new_thread): New functions.
13617 (x86_linux_prepare_to_resume): New function.
13618 (the_low_target): Add entries for insert_point, remove_point,
13619 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13621 * server.c (debug_hw_points): New global.
13622 (monitor_show_help): Document set debug-hw-points.
13623 (handle_query): Process "set debug-hw-points".
13624 * server.h (debug_hw_points): Declare.
13625 (paddress): Declare.
13626 * utils.c (NUMCELLS, CELLSIZE): New macros.
13627 (get_sell, xsnprintf, paddress): New functions.
13628 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13629 remove_point, stopped_by_watchpoint, stopped_data_address.
13630 * win32-i386-low.c: Include i386-low.h.
13631 (debug_reg_state): Replaces dr.
13632 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13633 (i386_dr_low_get_status): New function.
13634 (i386_insert_point, i386_remove_point): New functions.
13635 (i386_stopped_by_watchpoint): New function.
13636 (i386_stopped_data_address): New function.
13637 (i386_initial_stuff): Update.
13638 (get_thread_context,set_thread_context,i386_thread_added): Update.
13639 (the_low_target): Add entries for insert_point,
13640 remove_point, stopped_by_watchpoint, stopped_data_address.
13641 * win32-low.c (win32_insert_watchpoint): New function.
13642 (win32_remove_watchpoint): New function.
13643 (win32_stopped_by_watchpoint): New function.
13644 (win32_stopped_data_address): New function.
13645 (win32_target_ops): Add entries for insert_watchpoint,
13646 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13647 * win32-low.h (win32_target_ops): New members insert_point,
13648 remove_point, stopped_by_watchpoint, stopped_data_address.
13650 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13652 * server.c (process_serial_event): Re-return unsupported, not
13653 error, if the type isn't recognized. Re-allow supporting only
13654 insert or remove packets. Also call require_running for
13655 breakpoints. Add missing break statement to default case. Tidy.
13656 * target.h (struct target_ops): Rename insert_watchpoint to
13657 insert_point, and remove_watchpoint to remove_point.
13659 * linux-low.h (struct linux_target_ops): Likewise.
13660 * linux-low.c (linux_insert_watchpoint): Rename to ...
13661 (linux_insert_point): ... this. Adjust.
13662 (linux_remove_watchpoint): Rename to ...
13663 (linux_remove_point): ... this. Adjust.
13664 (linux_target_ops): Adjust.
13665 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13666 (cris_insert_point): ... this.
13667 (cris_remove_watchpoint): Rename to ...
13668 (cris_remove_point): ... this.
13669 (the_low_target): Adjust.
13671 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13673 * server.c (handle_v_kill): Pass signal_pid to
13674 kill_inferior if multi_process is zero.
13676 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13678 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13679 * target.h (target_ops): Comment for *_watchpoint to make it clear
13680 the functions can get types '0' and '1'.
13682 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13684 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13685 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13686 * regcache.c (get_regcache): Likewise.
13687 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13688 * win32-low.c (child_fetch_inferior_registers): Remove check for
13691 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13692 Pedro Alves <pedro@codesourcery.com>
13694 * target.h (struct target_ops) <supports_multi_process>: New
13696 (target_supports_multi_process): New.
13697 * server.c (handle_query): Even if GDB reports support, only
13698 enable multi-process if the target also supports it. Report
13699 multi-process support only if the target backend supports it.
13700 * linux-low.c (linux_supports_multi_process): New function.
13701 (linux_target_ops): Install it as target_supports_multi_process
13704 2009-05-24 Doug Evans <dje@google.com>
13706 Global renaming of find_thread_pid to find_thread_ptid.
13707 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13708 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13709 All callers updated.
13711 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13712 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13715 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13716 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13717 (linux_resume_one_lwp): Ditto.
13719 2009-05-23 Doug Evans <dje@google.com>
13721 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13722 from struct inferior_list_entry * to struct lwp_info *.
13723 All callers updated.
13725 2009-05-13 Doug Evans <dje@google.com>
13727 * linux-x86-low.c: Don't include assert.h.
13728 (x86_siginfo_fixup): Use fatal, not assert.
13729 (x86_arch_setup): Fix comment.
13731 2009-05-12 Doug Evans <dje@google.com>
13733 Biarch support for i386/amd64 gdbserver.
13734 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13735 Add linux-x86-low.c.
13736 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13737 (linux-x86-low.o): Add.
13738 * linux-x86-64-low.c: Delete.
13739 * linux-i386-low.c: Delete.
13740 * linux-x86-low.c: New file.
13741 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13743 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13745 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13746 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13747 (linux_child_pid_to_exec_file): New function.
13748 (elf_64_header_p, elf_64_file_p): New functions.
13749 (siginfo_fixup): New function.
13750 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13751 give target a chance to convert layout.
13752 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13753 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13755 2009-05-07 Doug Evans <dje@google.com>
13757 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13758 (regsets_store_inferior_registers): Ditto.
13760 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13764 * linux-low.c (must_set_ptrace_flags): Delete.
13765 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13767 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13768 `lwp->must_set_ptrace_flags' instead.
13769 (linux_wait_for_event_1): Set ptrace options here.
13770 (linux_wait_1): ... not here.
13772 2009-04-30 Doug Evans <dje@google.com>
13774 * inferiors.c (started_inferior_callback): New function.
13775 (attached_inferior_callback): New function.
13776 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13777 * server.c (print_started_pid, print_attached_pid): New functions.
13778 (detach_or_kill_for_exit): New function.
13779 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13780 * server.h (have_started_inferiors_p): Declare.
13781 (have_attached_inferiors_p): Declare.
13783 * inferiors.c (remove_process): Fix memory leak, free process.
13784 * linux-low.c (linux_remove_process): New function.
13785 (linux_kill): Call it instead of remove_process.
13786 (linux_detach, linux_wait_1): Ditto.
13788 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13790 * configure.srv: Add x86 Windows CE target.
13792 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13794 * inferiors.c (get_thread_process): Make global.
13795 * server.h (get_thread_process): Add prototype.
13796 * thread-db.c (find_one_thread): Use get_thread_process
13797 instead of current_process.
13798 (thread_db_get_tls_address): Do not crash if called when
13799 thread layer is not yet initialized.
13801 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13803 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13804 * spu-low.c (current_tid): Rename to ...
13805 (current_ptid): ... this.
13806 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13807 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13808 ptid_get_lwp (current_ptid) instead of current_tid.
13809 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13810 instead of current_tid. Use find_process_pid to verify pid
13811 argument is valid. Pass proper argument to remove_process.
13812 (spu_thread_alive): Compare current_ptid instead of current_tid.
13813 (spu_resume): Likewise.
13815 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13817 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13820 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13822 Implement the multiprocess extensions, and add linux multiprocess
13825 * server.h (ULONGEST): Declare.
13826 (struct ptid, ptid_t): New.
13827 (minus_one_ptid, null_ptid): Declare.
13828 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13829 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13830 (struct inferior_list_entry): Change `id' type from unsigned from
13832 (struct sym_cache, struct breakpoint, struct
13833 process_info_private): Forward declare.
13834 (struct process_info): Declare.
13835 (current_process): Declare.
13836 (all_processes): Declare.
13837 (initialize_inferiors): Declare.
13838 (add_thread): Adjust to use ptid_t.
13839 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13840 (add_process, remove_process, find_thread_pid): Declare.
13841 (find_inferior_id): Adjust to use ptid_t.
13842 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13843 (multi_process): Declare.
13844 (push_event): Adjust to use ptid_t.
13845 (read_ptid, write_ptid): Declare.
13846 (prepare_resume_reply): Adjust to use ptid_t.
13847 (clear_symbol_cache): Declare.
13848 * inferiors.c (all_processes): New.
13849 (null_ptid, minus_one_ptid): New.
13850 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13851 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13852 (add_thread): Change unsigned long to ptid. Remove gdb_id
13854 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13855 (gdb_id_to_thread): Rename to ...
13856 (find_thread_pid): ... this. Change unsigned long to ptid.
13857 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13858 (loaded_dll, pull_pid_from_list): Adjust.
13859 (add_process, remove_process, find_process_pid)
13860 (get_thread_process, current_process, initialize_inferiors): New.
13861 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13862 (struct target_waitstatus) <related_pid>: Ditto.
13863 (struct target_ops) <kill, detach>: Add `pid' argument. Change
13864 return type to int.
13865 (struct target_ops) <join>: Add `pid' argument.
13866 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13867 (struct target_ops) <wait>: Add `ptid' field. Change return type
13869 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13870 (mywait): Add `ptid' argument. Change return type to ptid_t.
13871 (target_pid_to_str): Declare.
13872 * target.c (set_desired_inferior): Adjust to use ptids.
13873 (mywait): Add new `ptid' argument. Adjust.
13874 (target_pid_to_str): New.
13875 * mem-break.h (free_all_breakpoints): Declare.
13876 * mem-break.c (breakpoints): Delelete.
13877 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13878 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13879 to use per-process breakpoint list.
13880 (free_all_breakpoints): New.
13881 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13882 (symbol_cache, all_symbols_looked_up): Delete.
13884 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13886 (prepare_resume_reply): Change ptid argument's type from unsigned
13887 long to ptid_t. Adjust. Implement W;process and X;process.
13888 (free_sym_cache, clear_symbol_cache): New.
13889 (look_up_one_symbol): Adjust to per-process symbol cache. *
13890 * server.c (cont_thread, general_thread, step_thread): Change type
13892 (attached): Delete.
13893 (multi_process): New.
13894 (last_ptid): Change type to ptid_t.
13895 (struct vstop_notif) <ptid>: Change type to ptid_t.
13896 (queue_stop_reply, push_event): Change `ptid' argument's type to
13898 (discard_queued_stop_replies): Add `pid' argument.
13899 (start_inferior): Adjust to use ptids. Adjust to mywait interface
13900 changes. Don't reference the `attached' global.
13901 (attach_inferior): Adjust to mywait interface changes.
13902 (handle_query): Adjust to use ptids. Parse GDB's qSupported
13903 features. Handle and report "multiprocess+". Handle
13905 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
13907 (handle_v_kill): New.
13908 (handle_v_stopped): Adjust to use target_pid_to_str.
13909 (handle_v_requests): Allow multiple attaches and runs when
13910 multiprocess extensions are in effect. Handle "vKill".
13911 (myresume): Adjust to use ptids.
13912 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
13913 (handle_status): Adjust to discard_queued_stop_replies interface
13915 (first_thread_of, kill_inferior_callback)
13916 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13917 (main): Call initialize_inferiors. Adjust to use ptids, killing
13918 and detaching from all inferiors. Handle multiprocess packet
13920 * linux-low.h: Include gdb_proc_service.h.
13921 (struct process_info_private): New.
13922 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13923 <lwpid_of>: Use ptid_get_lwp.
13924 (get_lwp_thread): Adjust.
13925 (struct lwp_info): Add `dead' member.
13926 (find_lwp_pid): Declare.
13927 * linux-low.c (thread_db_active): Delete.
13928 (new_inferior): Adjust comment.
13929 (inferior_pid): Delete.
13930 (linux_add_process): New.
13931 (handle_extended_wait): Adjust.
13932 (add_lwp): Change unsigned long to ptid.
13933 (linux_create_inferior): Add process to processes table. Adjust
13934 to use ptids. Don't set new_inferior here.
13935 (linux_attach_lwp): Rename to ...
13936 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13937 it. Adjust to use ptids.
13938 (linux_attach_lwp): New.
13939 (linux_attach): Add process to processes table. Don't set
13941 (struct counter): New.
13942 (second_thread_of_pid_p, last_thread_of_process_p): New.
13943 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13944 multiple processes.
13945 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13946 processes. Remove process from process table.
13947 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13948 to multiple processes.
13949 (any_thread_of): New.
13950 (linux_detach): Add `pid' argument, and handle it. Remove process
13951 from processes table.
13952 (linux_join): Add `pid' argument. Handle it.
13953 (linux_thread_alive): Change unsighed long argument to ptid_t.
13954 Consider dead lwps as not being alive.
13955 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13956 threads we're not interested in.
13957 (same_lwp, find_lwp_pid): New.
13958 (linux_wait_for_lwp): Change `pid' argument's type from int to
13960 (linux_wait_for_event): Rename to ...
13961 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13962 from int to ptid_t. Adjust.
13963 (linux_wait_for_event): New.
13964 (linux_wait_1): Add `ptid' argument. Change return type to
13965 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13966 that exit from the process table.
13967 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13969 (mark_lwp_dead): New.
13970 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13971 stopping all threads, mark its main lwp as dead.
13972 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13974 (fetch_register, usr_store_inferior_registers)
13975 (regsets_fetch_inferior_registers)
13976 (regsets_store_inferior_registers, linux_read_memory)
13977 (linux_write_memory): Inline `inferior_pid'.
13978 (linux_look_up_symbols): Adjust to use per-process
13979 `thread_db_active'.
13980 (linux_request_interrupt): Adjust to use ptids.
13981 (linux_read_auxv): Inline `inferior_pid'.
13982 (initialize_low): Don't reference thread_db_active.
13983 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13984 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13985 (ps_getpid): Return the pid of the current inferior.
13986 * thread-db.c (proc_handle, thread_agent): Delete.
13987 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13989 (find_one_thread): Change argument type to ptid_t. Adjust to
13991 (maybe_attach_thread): Adjust to per-process data and ptids.
13992 (thread_db_find_new_threads): Ditto.
13993 (thread_db_init): Ditto.
13994 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13995 processes table. Adjust to use ptids.
13996 (spu_kill, spu_detach): Adjust interface. Remove process from
13998 (spu_join, spu_thread_alive): Adjust interface.
13999 (spu_wait): Adjust interface. Remove process from processes
14000 table. Adjust to use ptids.
14001 * win32-low.c (current_inferior_tid): Delete.
14002 (current_inferior_ptid): New.
14003 (debug_event_ptid): New.
14004 (thread_rec): Take a ptid. Adjust.
14005 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14006 (child_delete_thread): Ditto.
14007 (do_initial_child_stuff): Add `attached' argument. Add process to
14009 (child_fetch_inferior_registers, child_store_inferior_registers):
14011 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14012 (win32_attach): Pass 1 to do_initial_child_stuff.
14013 (win32_kill): Adjust interface. Remove process from processes
14015 (win32_detach): Ditto.
14016 (win32_join): Adjust interface.
14017 (win32_thread_alive): Take a ptid.
14018 (win32_resume): Adjust to use ptids.
14019 (get_child_debug_event): Ditto.
14020 (win32_wait): Adjust interface. Remove exiting process from
14023 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14025 Non-stop mode support.
14027 * server.h (non_stop): Declare.
14028 (gdb_client_data, handler_func): Declare.
14029 (delete_file_handler, add_file_handler, start_event_loop):
14031 (handle_serial_event, handle_target_event, push_event)
14032 (putpkt_notif): Declare.
14033 * target.h (enum resume_kind): New.
14034 (struct thread_resume): Replace `step' field by `kind' field.
14035 (TARGET_WNOHANG): Define.
14036 (struct target_ops) <wait>: Add `options' argument.
14037 <supports_non_stop, async, start_non_stop>: New fields.
14038 (target_supports_non_stop, target_async): New.
14039 (start_non_stop): Declare.
14040 (mywait): Add `options' argument.
14041 * target.c (mywait): Add `options' argument. Print child exit
14042 notifications here.
14043 (start_non_stop): New.
14044 * server.c (non_stop, own_buf, mem_buf): New globals.
14045 (struct vstop_notif): New.
14046 (notif_queue): New global.
14047 (queue_stop_reply, push_event, discard_queued_stop_replies)
14048 (send_next_stop_reply): New.
14049 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14051 (attach_inferior): In non-stop mode, don't wait for the target
14053 (handle_general_set): Handle QNonStop.
14054 (handle_query): When handling qC, return the current general
14055 thread, instead of the first thread of the list.
14056 (handle_query): If the backend supports non-stop mode, include
14057 QNonStop+ in the qSupported query response.
14058 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14060 (handle_v_attach, handle_v_run): Handle non-stop mode.
14061 (handle_v_stopped): New.
14062 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14063 (myresume): Adjust to use resume_kind. Handle non-stop.
14064 (queue_stop_reply_callback): New.
14065 (handle_status): Handle non-stop mode.
14066 (main): Clear non_stop flag on reconnection. Use the event-loop.
14067 Refactor serial protocol handling from here ...
14068 (process_serial_event): ... to this new function. When GDB
14069 selects any thread, select one here. In non-stop mode, wait until
14070 GDB acks all pending events before exiting.
14071 (handle_serial_event, handle_target_event): New.
14072 * remote-utils.c (remote_open): Install remote_desc in the event
14074 (remote_close): Remove remote_desc from the event loop.
14075 (putpkt_binary): Rename to...
14076 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14077 (putpkt_binary): New as wrapper around putpkt_binary_1.
14078 (putpkt_notif): New.
14079 (prepare_resume_reply): In non-stop mode, don't change the
14081 * event-loop.c: New.
14082 * Makefile.in (OBJ): Add event-loop.o.
14083 (event-loop.o): New rule.
14085 * linux-low.h (pid_of): Moved here.
14087 (get_lwp_thread): Use lwpid_of.
14088 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14089 * linux-low.c (pid_of): Delete.
14090 (inferior_pid): Use lwpid_of.
14091 (linux_event_pipe): New.
14092 (target_is_async_p): New.
14094 (handle_extended_wait): Use lwpid_of.
14095 (add_lwp): Don't set lwpid field.
14096 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14097 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14098 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14099 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14100 first. Adjust to linux_wait_for_event interface changes. Use
14102 (linux_detach): Don't delete the main lwp here.
14103 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14104 (status_pending_p): Don't consider explicitly suspended lwps.
14105 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14106 pointer. Add OPTIONS argument. Change return type to int. Use
14107 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14108 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14109 pointer. Add status pointer argument. Return a pid instead of a
14110 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14111 changes. In non-stop mode, don't switch to a random thread.
14112 (linux_wait): Rename to...
14113 (linux_wait_1): ... this. Add target_options argument, and handle
14114 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14115 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14116 clean exit and signal exit code. Don't stop all threads in
14117 non-stop mode. In all-stop mode, only stop all threads when
14118 reporting a stop to GDB. Handle explicit thread stop requests.
14119 (async_file_flush, async_file_mark): New.
14121 (send_sigstop): Use lwpid_of.
14122 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14123 interface changes. In non-stop mode, don't switch to a random
14125 (linux_resume_one_lwp): Use lwpid_of.
14126 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14127 (linux_resume_one_thread): ... this. Handle resume_stop. In
14128 non-stop mode, don't look for pending flag in all threads.
14129 (resume_status_pending_p): Don't consider explicitly suspended
14131 (my_waitpid): Reimplement. Emulate __WALL.
14132 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14134 (sigchld_handler, linux_supports_non_stop, linux_async)
14135 (linux_start_non_stop): New.
14136 (linux_target_ops): Register linux_supports_non_stop, linux_async
14137 and linux_start_non_stop.
14138 (initialize_low): Install SIGCHLD handler.
14139 * thread-db.c (thread_db_create_event, find_one_thread)
14140 (thread_db_get_tls_address): Use lwpid_of.
14141 * win32-low.c (win32_detach): Adjust to use resume_kind.
14142 (win32_wait): Add `options' argument.
14143 * spu-low.c (spu_resume): Adjust to use resume_kind.
14144 (spu_wait): Add `options' argument.
14146 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14148 Decouple target code from remote protocol.
14150 * target.h (enum target_waitkind): New.
14151 (struct target_waitstatus): New.
14152 (struct target_ops) <wait>: Return an unsigned long. Take a
14153 target_waitstatus pointer instead of a char pointer.
14154 (mywait): Likewise.
14155 * target.c (mywait): Change prototype to return an unsigned long.
14156 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14157 * server.h (thread_from_wait, old_thread_from_wait): Delete
14159 (prepare_resume_reply): Change prototype to take a
14161 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14162 (last_status, last_ptid): New.
14163 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14164 pid instead of a signal.
14165 (attach_inferior): Remove "status" and "signal" parameters.
14167 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14169 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14170 (handle_v_requests, myresume): Remove "status" and "signal"
14171 parameters. Adjust.
14172 (handle_status): New.
14173 (main): Delete local `status'. Adjust.
14174 * remote-utils.c: Include target.h.
14175 (prepare_resume_reply): Change prototype to take a
14176 target_waitstatus. Adjust.
14178 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14180 * spu-low.c (spu_wait): Adjust.
14181 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14183 (win32_wait): Adjust.
14185 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14187 * target.h (struct thread_resume): Delete leave_stopped member.
14188 (struct target_ops): Add a `n' argument to the `resume' callback.
14189 * server.c (start_inferior): Adjust.
14190 (handle_v_cont, myresume): Adjust.
14191 * linux-low.c (check_removed_breakpoint): Adjust to resume
14192 interface change, and to removed leave_stopped field.
14193 (resume_ptr): Delete.
14194 (struct thread_resume_array): New.
14195 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14196 resume interface change.
14197 (linux_continue_one_thread, linux_queue_one_thread)
14198 (resume_status_pending_p): Check if the resume field is NULL
14199 instead of checking the leave_stopped member.
14200 (linux_resume): Adjust to the target resume interface change.
14201 * spu-low.c (spu_resume): Adjust to the target resume interface
14203 * win32-low.c (win32_detach, win32_resume): Ditto.
14205 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14207 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14209 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14211 (linux_continue_one_thread): Only preserve the stepping flag if
14212 there's a pending breakpoint.
14214 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14216 * server.c (main): After the inferior having exited, call
14217 remote_close before exiting gdbserver.
14219 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14221 Fix size of FPSCR in Power 7 processors.
14222 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14223 (PPC_FEATURE_HAS_DFP): New #define.
14224 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14227 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14229 * server.c (handle_query) Whitespace and formatting.
14231 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14233 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14234 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14235 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14236 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14237 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14238 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14239 Makefile.in, configure.ac: Fix whitespace throughout.
14240 * configure: Regenerate.
14242 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14244 * inferiors.c (find_inferior): Make it safe for the callback
14245 function to delete the currently iterated inferior.
14247 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14249 * Makefile.in (linuw_low_h): Move higher.
14250 (thread-db.o): Depend on $(linux_low_h).
14252 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14254 Rename "process" to "lwp" throughout.
14256 * linux-low.c (all_processes): Rename to...
14257 (all_lwps): ... this.
14258 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14259 (add_process): Rename to ...
14260 (add_lwp): ... this. Adjust.
14261 (linux_create_inferior): Adjust.
14262 (linux_attach_lwp): Adjust.
14263 (linux_attach): Adjust.
14264 (linux_kill_one_process): Rename to ...
14265 (linux_kill_one_lwp): ... this. Adjust.
14266 (linux_kill): Adjust.
14267 (linux_detach_one_process): Rename to ...
14268 (linux_detach_one_lwp): ... this. Adjust.
14269 (linux_detach): Adjust.
14270 (check_removed_breakpoint): Adjust.
14271 (status_pending_p): Adjust.
14272 (linux_wait_for_process): Rename to ...
14273 (linux_wait_for_lwp): ... this. Adjust.
14274 (linux_wait_for_event): Adjust.
14275 (send_sigstop): Adjust.
14276 (wait_for_sigstop): Adjust.
14277 (stop_all_processes): Rename to ...
14278 (stop_all_lwps): ... this.
14279 (linux_resume_one_process): Rename to ...
14280 (linux_resume_one_lwp): ... this. Adjust.
14281 (linux_set_resume_request, linux_continue_one_thread)
14282 (linux_queue_one_thread, resume_status_pending_p)
14283 (usr_store_inferior_registers, regsets_store_inferior_registers)
14284 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14286 * linux-low.h (get_process): Rename to ...
14287 (get_lwp): ... this. Adjust.
14288 (get_thread_process): Rename to ...
14289 (get_thread_lwp): ... this. Adjust.
14290 (get_process_thread): Rename to ...
14291 (get_lwp_thread): ... this. Adjust.
14292 (struct process_info): Rename to ...
14293 (struct lwp_info): ... this.
14294 (all_processes): Rename to ...
14295 (all_lwps): ... this.
14296 * proc-service.c (ps_lgetregs): Adjust.
14297 * thread-db.c (thread_db_create_event, find_one_thread)
14298 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14300 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14302 * server.c (handle_query): Handle "qAttached".
14304 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14306 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14307 GPLv3, update license URL.
14309 2009-03-01 Doug Evans <dje@google.com>
14311 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14312 (server_h): Add gdb_signals.h.
14313 (signals.o): Update.
14314 * server.h (target_signal_from_host,target_signal_to_host_p)
14315 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14317 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14319 * remote-utils.c (getpkt): Also generate remote-debug
14320 information if noack_mode is set.
14322 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14324 * server.c (handle_query): Report qXfer:siginfo:read and
14325 qXfer:siginfo:write as supported and handle them.
14326 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14327 * linux-low.c (linux_xfer_siginfo): New.
14328 (linux_target_ops): Set it.
14330 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14332 * server.c (gdbserver_usage): Mention --remote-debug.
14333 (main): Accept '--remote-debug' switch.
14335 2009-01-18 Doug Evans <dje@google.com>
14337 * regcache.c (new_register_cache): No need to check result of xcalloc.
14338 * server.c (handle_search_memory): Back out calls to xmalloc,
14339 result is checked and error is returned to user upon failure.
14340 (handle_query): Ditto. Add more checks for result of malloc.
14341 (handle_v_cont): Check result of malloc, report error back to
14343 (handle_v_run): Ditto. Call freeargv.
14344 * server.h (freeargv): Declare.
14345 * utils.c (freeargv): New fn.
14347 2009-01-15 Doug Evans <dje@google.com>
14349 * gdbreplay.c (perror_with_name): Make arg const char *.
14350 * server.h (target_signal_to_name): Make return type const char *.
14351 * thread-db.c (thread_db_err_str): Make return type const char *.
14352 * utils.c (perror_with_name): Make arg const char *.
14354 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14356 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14357 when handling a EXIT_PROCESS_DEBUG_EVENT.
14359 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14361 * gdbreplay.c (gdbreplay_version): Update copyright year.
14362 * server.c (gdbserver_version): Likewise.
14364 2009-01-05 Doug Evans <dje@google.com>
14366 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14367 (handle_extended_wait): Improve comment.
14369 2008-12-13 Doug Evans <dje@google.com>
14371 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14372 * server.h (ATTR_MALLOC): New macro.
14373 (xmalloc,xcalloc,xstrdup): Declare.
14374 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14375 * inferiors.c: Ditto.
14376 * linux-low.c: Ditto.
14377 * mem-break.c: Ditto.
14378 * regcache.c: Ditto.
14379 * remote-utils.c: Ditto.
14382 * win32-low.c: Ditto.
14384 2008-12-12 Doug Evans <dje@google.com>
14386 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14387 in debugging printf.
14389 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14391 2008-12-09 Doug Evans <dje@google.com>
14393 * linux-low.h (struct process_info): Delete member tid, unused.
14394 * thread-db.c (find_one_thread): Update.
14395 (maybe_attach_thread): Update.
14397 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14399 * target.h (struct target_ops): Add qxfer_osdata member.
14400 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14402 (linux_qxfer_osdata): New functions.
14403 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14405 * server.c (handle_query): Handle "qXfer:osdata:read:".
14406 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14407 (buffer_xml_printf): New functions.
14408 * server.h (struct buffer): New.
14409 (buffer_grow_str, buffer_grow_str0): New macros.
14410 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14411 (buffer_xml_printf): Declare.
14413 2008-11-24 Doug Evans <dje@google.com>
14415 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14417 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14419 * server.c (handle_v_run): Always use the supplied argument list.
14421 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14423 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14424 (xtensa_regmap_table): Add entry for scompare1.
14426 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14428 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14429 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14430 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14431 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14432 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14433 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14434 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14435 XML target descriptions.
14436 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14437 when inferior is running on an ISA 2.05 or later processor. Add
14438 special case to return offset for full 64-bit slot of FPSCR when
14441 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14443 * Makefile.in (SFILES, clean): Added sparc64 files.
14444 (reg-sparc64.o, reg-sparc64.c): New.
14445 * configure.srv (sparc*-*-linux*): New configuration.
14446 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14447 syscall arguments for SPARC.
14448 (regsets_store_inferior_registers): Likewise.
14449 * linux-sparc-low.c: New file.
14451 2008-10-21 Doug Evans <dje@google.com>
14453 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14454 (READLINE_DIR,READLINE_DEP): Delete.
14455 (INTERNAL_CFLAGS): Update.
14456 (LINTFLAGS): Update.
14458 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14460 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14461 whole argv from the last run, not just argv[0].
14463 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14465 * regcache.c (new_register_cache): Return NULL if the register
14466 cache size isn't known yet.
14467 (free_register_cache): Avoid dereferencing a NULL regcache.
14469 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14471 * configure.srv: Merge MIPS and MIPS64.
14473 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14475 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14477 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14479 * Makefile.in: Add required vsx dependencies.
14481 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14482 Declare init_registers_powerpc_vsx32l.
14483 Declare init_registers_powerpc_vsx64l.
14484 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14485 (ppc_arch_setup): Check for VSX in hwcap.
14486 (ppc_fill_vsxregset): New function.
14487 (ppc_store_vsxregset): New function.
14488 Add new VSX entry in regset_info target_regsets.
14490 * configure.srv: Add new VSX dependencies.
14492 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14494 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14495 (remote_open): Set or clear transport_is_reliable.
14496 (putpkt_binary): Don't expect acks in noack mode.
14497 (getpkt): Don't send ack/nac in noack mode.
14498 * server.c (handle_general_set): Handle QStartNoAckMode.
14499 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14501 (main): Reset noack_mode on every connection.
14502 * server.h (noack_mode): Declare.
14504 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14506 * Makefile.in (GDBREPLAY_OBS): New variable.
14507 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14509 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14510 Daniel Jacobowitz <dan@codesourcery.com>
14512 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14513 (usr_store_inferior_registers): Likewise.
14514 (regsets_store_inferior_registers): Likewise.
14516 2008-07-31 Rolf Jansen <rj@surtec.com>
14517 Pedro Alves <pedro@codesourcery.com>
14519 * configure.ac: Check for memmem declaration.
14520 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14521 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14522 (disable_packet_qfThreadInfo): Unconditionally compile.
14523 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14524 * configure, config.in: Regenerate.
14526 2008-07-28 Doug Kwan <dougkwan@google.com>
14528 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14529 (linux_write_memory): Remove declaration of errno.
14531 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14533 * linux-low.c (handle_extended_wait): Do not use "status"
14534 variable uninitialized.
14536 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14538 * server.c (handle_v_attach): Inhibit reporting dll changes.
14540 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14542 * remote-utils.c (prepare_resume_reply): If requested, don't
14543 output "thread:TID" in the T stop reply.
14545 * server.c (disable_packet_vCont, disable_packet_Tthread)
14546 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14547 (handle_query): If requested, disable support for qC, qfThreadInfo
14549 (handle_v_requests): If requested, disable support for vCont.
14550 (gdbserver_show_disableable): New.
14551 (main): Handle --disable-packet and --disable-packet=LIST.
14553 * server.h (disable_packet_vCont, disable_packet_Tthread)
14554 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14556 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14558 * server.c (gdbserver_usage): Mention --version.
14560 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14562 * Makefile.in (gdbreplay.o): New rule.
14564 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14566 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14567 message, not gdbserver.
14569 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14570 Nathan Sidwell <nathan@codesourcery.com>
14571 Joseph Myers <joseph@codesourcery.com>
14573 * acinclude.m4: Include ../../config/acx.m4.
14574 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14575 * configure, config.in: Regenerate.
14576 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14577 * server.c (gdbserver_version): Print PKGVERSION.
14578 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14579 (main): Adjust gdbserver_usage calls.
14580 * gdbreplay.c (version, host_name): Add declarations.
14581 (gdbreplay_version, gdbreplay_usage): New.
14582 (main): Accept --version and --help options.
14584 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14586 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14587 (arm_breakpoint_at): Handle Thumb.
14588 (the_low_target): Add comment.
14590 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14592 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14594 2008-05-09 Doug Evans <dje@google.com>
14596 * server.h (decode_search_memory_packet): Declare.
14597 * remote-utils.c (decode_search_memory_packet): New fn.
14598 * server.c (handle_search_memory_1): New fn.
14599 (handle_search_memory): New fn.
14600 (handle_query): Process qSearch:memory packets.
14602 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14604 * regcache.c (registers_length): Remove.
14605 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14606 full register packet.
14607 * regcache.h (registers_length): Remove prototype.
14608 * server.h (PBUFSIZ): Define to 16384.
14610 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14612 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14613 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14614 powerpc-64l.o, and powerpc-altivec64l.o.
14615 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14616 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14617 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14618 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14619 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14622 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14623 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14624 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14625 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14626 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14627 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14628 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14629 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14630 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14631 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14634 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14635 (init_registers_powerpc_32l): ... this new prototype.
14636 (init_registers_powerpc_32): Remove, replace by ...
14637 (init_registers_powerpc_altivec32l): ... this new prototype.
14638 (init_registers_powerpc_e500): Remove, replace by ...
14639 (init_registers_powerpc_e500l): ... this new prototype.
14640 (init_registers_ppc64): Remove, replace by ...
14641 (init_registers_powerpc_64l): ... this new prototype.
14642 (init_registers_powerpc_64): Remove, replace by ...
14643 (init_registers_powerpc_altivec64l): ... this new prototype.
14644 (ppc_num_regs): Set to 73.
14645 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14646 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14647 (ppc_cannot_store_register): Handle orig_r3 and trap.
14648 (ppc_arch_setup): Update init_registers_... calls.
14649 (ppc_fill_gregset): Handle orig_r3 and trap.
14651 * inferiors.c (clear_inferiors): Reset current_inferior.
14653 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14655 * acinclude.m4: Add override.m4.
14656 * configure: Regenerate.
14658 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14660 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14661 initial call to init_register_ppc64.
14663 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14665 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14666 single powerpc*-*-linux* case.
14667 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14669 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14671 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14672 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14674 * linux-ppc-low.c: Include <elf.h>.
14675 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14676 (ppc_hwcap): New global variable.
14677 (ppc_regmap): Remove __SPE__ #ifdef sections.
14678 (ppc_regmap_e500): New global variable.
14679 (ppc_cannot_store_register): Update __SPE__ special case.
14680 (ppc_get_hwcap): New function.
14681 (ppc_arch_setup): Use it to determine whether inferior supports
14682 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14683 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14684 Do not access registers if target does not support AltiVec.
14685 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14686 Do not access registers if target does not support SPE.
14687 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14689 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14691 * linux-low.c (disabled_regsets, num_regsets): New.
14692 (use_regsets_p): Delete.
14693 (linux_wait_for_process): Clear disabled_regsets.
14694 (regsets_fetch_inferior_registers): Check and set it.
14695 (regsets_store_inferior_registers): Likewise.
14696 (linux_fetch_registers, linux_store_registers): Do not use
14698 (initialize_low): Allocate disabled_regsets.
14700 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14702 * Makefile.in (LIBOBJS): New.
14703 (OBS): Use LIBOBJS.
14704 (memmem.o): New rule.
14705 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14706 * configure: Regenerated.
14708 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14710 * server.c (handle_query): Never return "unsupported" for
14711 qXfer:features:read queries.
14713 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14715 * server.c (get_features_xml): Fix inverted condition.
14716 (handle_query): Always support qXfer:feature:read.
14718 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14720 * server.c (wrapper_argv): New.
14721 (start_inferior): Handle wrapper_argv. If set, expect an extra
14723 (gdbserver_usage): Document --wrapper.
14724 (main): Parse --wrapper.
14726 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14728 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14729 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14730 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14731 (ppc_set_pc): Likewise.
14732 (ppc_arch_setup): New function.
14733 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14734 of collect_register.
14735 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14737 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14739 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14740 instead of linux-ppc64-low.o.
14741 * linux-ppc64-low.c: Remove file.
14742 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14743 (linux-ppc64-low.o): Remove rule.
14745 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14746 (init_registers_powerpc_64): Likewise.
14747 (ppc_regmap): Conditionally define depending on __powerpc64__.
14748 (ppc_cannot_store_register): Do not special-case "fpscr" when
14749 compiled on __powerpc64__.
14750 (ppc_collect_ptrace_register): New function.
14751 (ppc_supply_ptrace_register): New function.
14752 (ppc_breakpoint): Change type to "unsigned int".
14753 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14754 (the_low_target): Conditionally provide initializers for the
14755 arch_setup member depending on __powerpc64__. Install
14756 collect_ptrace_register and supply_ptrace_register members.
14758 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14760 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14761 * server.c (gdbserver_xmltarget): Define.
14762 (get_features_xml): Use it to replace "target.xml" and arch_string.
14764 * configure.srv: Remove srv_xmltarget. Add XML files that were
14765 mentioned there to srv_xmlfiles instead. Remove conditional tests
14766 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14767 srv_xmlfiles and srv_regobj to include all possible choices.
14768 * configure.ac (srv_xmltarget): Remove.
14769 (srv_xmlfiles): Do not add "target.xml".
14770 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14771 checks for supplementary target information.
14772 * configure: Regenerate.
14773 * Makefile.in (XML_TARGET): Remove.
14774 (target.xml): Remove rule.
14775 (clean): Do not clean up target.xml.
14776 (.PRECIOUS): Do not mention target.xml.
14778 * target.h (struct target_ops): Remove arch_string member.
14779 * linux-low.c (linux_arch_string): Remove.
14780 (linux_target_ops): Remove arch_string initializer.
14781 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14782 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14783 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14784 * spu-low.c (spu_arch_string): Remove.
14785 (spu_target_ops): Remove arch_string initializer.
14786 * win32-low.c (win32_arch_string): Remove.
14787 (win32_target_ops): Remove arch_string initializer.
14788 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14789 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14790 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14792 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14794 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14795 by collect_ptrace_register and supply_ptrace_register hooks.
14796 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14797 instead of checking for the_low_target.left_pad_xfer.
14798 (usr_store_inferior_registers): Use collect_ptrace_register callback
14799 instead of checking for the_low_target.left_pad_xfer.
14801 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14802 (s390_supply_ptrace_register): Likewise.
14803 (s390_fill_gregset): Call s390_collect_ptrace_register.
14804 (the_low_target): Update.
14806 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14807 (ppc_supply_ptrace_register): Likewise.
14808 (the_low_target): Update.
14810 * linux-i386-low.c (the_low_target): Update.
14811 * linux-x86-64-low.c (the_low_target): Update.
14813 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14815 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14816 reg-s390.o and reg-s390x.o.
14818 * linux-low.c (new_inferior): New global variable.
14819 (linux_create_inferior, linux_attach): Set it.
14820 (linux_wait_for_process): Call the_low_target.arch_setup after the
14821 target has stopped for the first time.
14822 (initialize_low): Do not call the_low_target.arch_setup.
14824 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14825 (s390_set_pc): Likewise.
14826 (s390_arch_setup): New function.
14827 (the_low_target): Use s390_arch_setup as arch_setup routine.
14829 * regcache.c (realloc_register_cache): New function.
14830 (set_register_cache): Call it for each existing regcache.
14832 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14834 * server.h (init_registers): Remove prototype.
14836 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14837 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14838 instead of init_registers ().
14839 * linux-arm-low.c (init_registers_arm): Add prototype.
14840 (init_registers_arm_with_iwmmxt): Likewise.
14841 (the_low_target): Add initializer for arch_setup field.
14842 * linux-cris-low.c (init_registers_cris): Add prototype.
14843 (the_low_target): Add initializer for arch_setup field.
14844 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14845 (the_low_target): Add initializer for arch_setup field.
14846 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14847 (the_low_target): Add initializer for arch_setup field.
14848 * linux-ia64-low.c (init_registers_ia64): Add prototype.
14849 (the_low_target): Add initializer for arch_setup field.
14850 * linux-m32r-low.c (init_registers_m32r): Add prototype.
14851 (the_low_target): Add initializer for arch_setup field.
14852 * linux-m68k-low.c (init_registers_m68k): Add prototype.
14853 (the_low_target): Add initializer for arch_setup field.
14854 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14855 (init_registers_mips64_linux): Likewise.
14856 (the_low_target): Add initializer for arch_setup field.
14857 * linux-ppc-low.c (init_registers_ppc): Add prototype.
14858 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14859 (the_low_target): Add initializer for arch_setup field.
14860 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14861 (init_registers_powerpc_64): Likewise.
14862 (the_low_target): Add initializer for arch_setup field.
14863 * linux-s390-low.c (init_registers_s390): Add prototype.
14864 (init_registers_s390x): Likewise.
14865 (the_low_target): Add initializer for arch_setup field.
14866 * linux-sh-low.c (init_registers_sh): Add prototype.
14867 (the_low_target): Add initializer for arch_setup field.
14868 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14869 (the_low_target): Add initializer for arch_setup field.
14870 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14871 (the_low_target): Add initializer for arch_setup field.
14873 * win32-low.h (struct win32_target_ops): Add arch_setup field.
14874 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14875 instead of init_registers ().
14876 * win32-arm-low.c (init_registers_arm): Add prototype.
14877 (the_low_target): Add initializer for arch_setup field.
14878 * win32-i386-low.c (init_registers_i386): Add prototype.
14879 (the_low_target): Add initializer for arch_setup field.
14881 * spu-low.c (init_registers_spu): Add prototype.
14882 (initialize_low): Call initialie_registers_spu () instead of
14883 initialize_registers ().
14885 2008-02-19 Pedro Alves <pedro@codesourcery.com>
14887 * server.c (handle_v_requests): When handling the vRun and vAttach
14888 packets, if already debugging a process, don't kill it. Return an
14891 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
14893 * server.c (handle_query): Correct length check.
14895 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
14897 * win32-low.c (do_initial_child_stuff): Add process handle
14898 parameter. Set current_process_handle and current_process_id from the
14899 parameters. Clear globals.
14900 (win32_create_inferior): Don't set current_process_handle and
14901 current_process_id here. Instead pass them on the call to
14902 do_initial_child_stuff.
14903 (win32_attach): Likewise.
14904 (win32_clear_inferiors): New.
14905 (win32_kill): Don't close the current process handle or the
14906 current thread handle here. Instead call win32_clear_inferiors.
14907 (win32_detach): Don't open a new handle to the process. Call
14908 win32_clear_inferiors.
14909 (win32_join): Don't rely on current_process_handle; open a new
14910 handle using the process id.
14911 (win32_wait): Call win32_clear_inferiors when the inferior process
14914 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
14916 * server.c (monitor_show_help): Add "exit".
14918 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
14920 * Makefile.in (SFILES): Add linux-xtensa-low.c.
14921 (clean): Add reg-xtensa.c.
14922 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14923 * configure.srv (xtensa*-*-linux*) New target.
14924 * linux-xtensa-low.c: New.
14925 * xtensa-xtregs.c: New.
14927 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14929 * hostio.c: Don't include errno.h.
14930 (errno_to_fileio_errno): Move to hostio-errno.
14931 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14932 error number outputting to the target->hostio_last_error callback.
14933 (hostio_packet_error): Use FILEIO_EINVAL directly.
14934 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14935 calls to hostio_error.
14936 * hostio-errno.c: New.
14937 * server.h (hostio_last_error_from_errno): Declare.
14938 * target.h (target_ops): Add hostio_last_error member.
14939 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14940 as hostio_last_error handler.
14941 * spu-low.c (spu_target_ops): Likewise.
14942 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14943 (wince_hostio_last_error): New functions.
14944 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14945 as hostio_last_error handler.
14946 (win32_target_ops) [!_WIN32_WCE]: Register
14947 hostio_last_error_from_errno as hostio_last_error handler.
14948 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14949 (hostio-errno.o): New rule.
14950 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14951 * configure.srv (srv_hostio_err_objs): New variable. Default to
14953 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14954 * configure: Regenerate.
14956 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14958 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14959 (linux_kill, linux_detach): Clean up the process list.
14960 * remote-utils.c (remote_open): Improve port number parsing.
14961 (putpkt_binary, input_interrupt): Only send interrupts if the target
14963 * server.c (extended_protocol): Make static.
14964 (attached): Define earlier.
14965 (exit_requested, response_needed, program_argv): New variables.
14966 (target_running): New.
14967 (start_inferior): Clear attached here.
14968 (attach_inferior): Set attached here.
14969 (require_running): Define.
14970 (handle_query): Use require_running and target_running. Implement
14972 (handle_v_attach, handle_v_run): New.
14973 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14974 (gdbserver_usage): Update.
14975 (main): Redo argument parsing. Handle --debug and --multi. Handle
14976 --attach along with other options or after the port. Save
14977 program_argv. Support no initial program. Resynchronize
14978 communication with GDB after an error. Handle "monitor exit".
14979 Use require_running and target_running. Always allow the extended
14980 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14981 restart in extended mode.
14982 * README: Refer to the GDB manual. Update --attach usage.
14984 2007-12-20 Andreas Schwab <schwab@suse.de>
14986 * linux-low.c (STACK_SIZE): Define.
14987 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14988 (linux_test_for_tracefork): Likewise.
14990 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14992 * linux-low.c (linux_wait_for_event): Update messages. Do not
14993 reinsert auto-delete breakpoints.
14994 * mem-break.c (struct breakpoint): Change return type of handler to
14996 (set_breakpoint_at): Update handler type.
14997 (reinsert_breakpoint_handler): Return 1 instead of calling
14999 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15001 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15002 * mem-break.h (set_breakpoint_at): Update handler type.
15003 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15004 * win32-low.c (auto_delete_breakpoint): New.
15005 (get_child_debug_event): Use it.
15007 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15009 * configure.ac: Check for pread and pwrite.
15010 * hostio.c (handle_pread): Fall back to lseek and read.
15011 (handle_pwrite): Fall back to lseek and write.
15012 * config.in, configure: Regenerated.
15014 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15016 * server.c (myresume): Add own_buf argument.
15017 (main): Update calls.
15019 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15021 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15022 * remote-utils.c (remote_open): Do not call disable_async_io.
15023 (block_async_io): Delete.
15024 (unblock_async_io): Make static.
15025 (initialize_async_io): New.
15026 * server.c (handle_v_cont): Handle async I/O here.
15027 (myresume): Likewise. Move other common resume tasks here...
15028 (main): ... from here. Call initialize_async_io. Disable async
15029 I/O before the main loop.
15030 * server.h (initialize_async_io): Declare.
15031 (block_async_io, unblock_async_io): Delete prototypes.
15032 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15034 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15036 * remote-utils.c (readchar): Allow binary data in received messages.
15038 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15040 * win32-low.c (attaching): New global.
15041 (win32_create_inferior): Clear the `attaching' global.
15042 (win32_attach): Set the `attaching' global.
15043 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15044 attaching. Only set a breakpoint at the entry point if not
15047 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15049 * server.c (main): Don't report dll events on the initial
15050 connection on attaches.
15052 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15054 * server.c (main): Relax numerical bases supported for the pid of
15055 the --attach command line argument.
15057 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15059 * win32-low.c (win32_attach): Call OpenProcess before
15060 DebugActiveProcess, not after. Add last error output to error
15063 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15065 * win32-low.c (win32_get_thread_context)
15066 (win32_set_thread_context): New functions.
15067 (thread_rec): Use win32_get_thread_context.
15068 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15069 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15072 2007-12-03 Leo Zayas
15073 Pedro Alves <pedro_alves@portugalmail.pt>
15075 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15077 (child_add_thread): Minor cleanup.
15078 (child_continue): Resume artificially suspended threads before
15079 calling ContinueDebugEvent.
15080 (suspend_one_thread): New.
15081 (fake_breakpoint_event): New.
15082 (get_child_debug_event): Change return type to int. Check here if
15083 gdb sent an interrupt request. If a soft interrupt was requested,
15084 fake a breakpoint event. Return 0 if there is no event to handle,
15086 (win32_wait): Don't check here if gdb sent an interrupt request.
15087 Ensure there is a valid event to handle.
15088 (win32_request_interrupt): Add soft interruption method as last
15091 2007-12-03 Leo Zayas
15092 Pedro Alves <pedro_alves@portugalmail.pt>
15094 * win32-low.h (win32_thread_info): Add descriptions to the
15095 structure members. Replace `suspend_count' counter by a
15097 * win32-low.c (thread_rec): Update condition of when to get the
15098 context from the inferior. Rely on ContextFlags being set if it
15099 has already been retrieved. Only suspend the inferior thread if
15100 we haven't already. Warn if that fails.
15101 (continue_one_thread): s/suspend_count/suspended/. Only call
15102 ResumeThread once. Warn if that fails.
15104 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15106 * win32-low.c (win32_wait): Don't read from the inferior when it
15107 has already exited.
15109 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15111 * Makefile.in (win32_low_h): New variable.
15112 (win32-low.o): Add dependency on $(win32_low_h).
15113 (win32-arm-low.o, win32-i386-low.o): New rules.
15115 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15117 * hostio.c: Correct copyright year.
15119 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15121 * Makefile.in (OBS): Add hostio.o.
15122 (hostio.o): New rule.
15123 * server.h (handle_vFile): Declare.
15124 * hostio.c: New file.
15125 * server.c (handle_v_requests): Take packet_len and new_packet_len
15126 for binary packets. Call handle_vFile.
15127 (main): Update call to handle_v_requests.
15129 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15131 * linux-low.c: Include <sched.h>.
15133 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15135 * linux-low.c (linux_tracefork_grandchild): New.
15136 (linux_tracefork_child): Use clone.
15137 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15139 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15141 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15143 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15145 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15147 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15149 * inferiors.c (change_inferior_id): Delete.
15150 (add_pid_to_list, pull_pid_from_list): New.
15151 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15152 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15153 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15154 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15155 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15156 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15157 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15158 (using_threads): Always set to 1.
15159 (handle_extended_wait): New.
15160 (add_process): Do not set TID.
15161 (linux_create_inferior): Set must_set_ptrace_flags.
15162 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15163 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15164 (linux_thread_alive): Rename TID argument to LWPID.
15165 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15166 (linux_wait_for_event): Do not use TID or check using_threads. Update
15167 call to dead_thread_notify. Call handle_extended_wait.
15168 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15169 (send_sigstop): Delete sigstop_sent.
15170 (wait_for_sigstop): Avoid TID.
15171 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15172 (linux_test_for_tracefork): New.
15173 (linux_lookup_signals): Use thread_db_active and
15174 linux_supports_tracefork_flag.
15175 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15176 * linux-low.h (get_process_thread): Avoid TID.
15177 (struct process_ifo): Move thread_known and tid to the end. Remove
15179 (linux_attach_lwp, thread_db_init): Update prototypes.
15180 * server.h (change_inferior_id): Delete prototype.
15181 (add_pid_to_list, pull_pid_from_list): New prototypes.
15182 * thread-db.c (thread_db_use_events): New.
15183 (find_first_thread): Rename to...
15184 (find_one_thread): ...this. Update callers and messages. Do not
15185 call fatal. Check thread_db_use_events. Do not call
15186 change_inferior_id or new_thread_notify.
15187 (maybe_attach_thread): Update. Do not call new_thread_notify.
15188 (thread_db_init): Set thread_db_use_events. Check use_events.
15189 * utils.c (fatal, warning): Correct message prefix.
15191 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15193 * Makefile.in (clean): Remove new files.
15194 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15195 (powerpc-64.o, powerpc-64.c): New rules.
15196 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15197 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15199 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15201 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15202 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15203 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15204 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15205 (target_regsets): Add AltiVec and SPE register sets.
15206 * configure.ac: Check for AltiVec and SPE.
15207 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15208 (ppc_fill_vrregset, ppc_store_vrregset): New.
15209 (target_regsets): Add AltiVec register set.
15210 * configure: Regenerated.
15212 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15214 * linux-low.c (O_LARGEFILE): Define.
15215 (linux_read_memory): Use /proc/PID/mem.
15216 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15217 * configure, config.in: Regenerated.
15219 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15221 * linux-low.c (linux_wait_for_event): Do not pass signals while
15224 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15226 * win32-low.c (create_process): New.
15227 (win32_create_inferior): Use create_process instead of
15228 CreateProcess. If create_process failed retry appending an ".exe"
15229 suffix. Store the GetLastError result immediatelly after
15230 create_process calls and use it on the call to error.
15232 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15234 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15236 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15238 * configure.ac: Switch license to GPLv3.
15240 2007-08-01 Michael Snyder <msnyder@access-company.com>
15242 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15244 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15246 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15248 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15249 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15250 CloseToolhelp32Snapshot.
15251 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15252 CloseToolhelp32Snapshot.
15254 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15256 * server.c (main): Check for inferior exit before main loop.
15258 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15260 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15261 instead of on tmp_desc.
15263 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15264 Daniel Jacobowitz <dan@codesourcery.com>
15266 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15267 (add_thread): Minor cleanups.
15268 (clear_inferiors): Move lower in the file. Clear the DLL
15270 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15271 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15272 (xml_escape_text): New.
15273 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15275 (handle_v_cont): Report errors.
15276 (gdbserver_version): Update.
15277 (main): Correct size of own_buf. Do not report initial DLL events.
15278 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15279 (unloaded_dll, xml_escape_text): New.
15280 * win32-low.c (enum target_waitkind): Update comments.
15281 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15282 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15283 (win32_EnumProcessModules, win32_GetModuleInformation)
15284 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15285 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15286 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15287 (win32_Module32First, win32_Module32Next, load_toolhelp)
15288 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15289 (get_child_debug_event): Handle DLL events.
15290 (win32_wait): Likewise.
15292 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15294 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15295 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15297 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15299 * win32-low.c (handle_output_debug_string): Ignore event if not
15302 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15304 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15306 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15308 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15310 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15312 * inferiors.c (change_inferior_id): Add comment.
15313 * linux-low.c (check_removed_breakpoint): Add an early
15314 prototype. Improve debug output.
15315 (linux_attach): Doc update.
15316 (linux_detach_one_process, linux_detach): Clean up before releasing
15318 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15319 * linux-low.h (struct process_info): Doc improvement.
15320 * mem-break.c (delete_all_breakpoints): New.
15321 * mem-break.h (delete_all_breakpoints): New prototype.
15322 * thread-db.c (find_first_thread): New.
15323 (thread_db_create_event): Call it instead of
15324 thread_db_find_new_threads. Clean up unused variables.
15325 (maybe_attach_thread): Remove first thread handling.
15326 (thread_db_find_new_threads): Use find_first_thread.
15327 (thread_db_get_tls_address): Likewise.
15329 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15331 * thread-db.c (thread_db_find_new_threads): Add prototype.
15332 (thread_db_create_event): Check for the main thread before adding
15334 (maybe_attach_thread): Only enable event reporting if TID == 0.
15335 (thread_db_get_tls_address): Check for new threads.
15337 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15339 * linux-low.c (linux_create_inferior): Try execv before execvp.
15340 * spu-low.c (spu_create_inferior): Likewise.
15342 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15344 * linux-low.c (linux_create_inferior): Change execv to execvp.
15345 * spu-low.c (spu_create_inferior): Likewies.
15347 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15349 * Makefile.in (clean): Clean new files instead of deleted ones.
15350 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15351 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15353 * configure.srv: Specify XML files and new regformats for MIPS and
15355 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15356 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15357 an entry for the restart register.
15358 (mips_cannot_fetch_register, mips_cannot_store_register)
15359 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15360 register names to match the XML descriptions.
15361 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15362 restart register instead of $0.
15364 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15365 Markus Deuling <deuling@de.ibm.com>
15367 * remote-utils.c (decode_xfer_write): New function.
15368 * server.h (decode_xfer_write): Add prototype.
15369 * server.c (handle_query): Add PACKET_LEN argument. Support
15370 qXfer:spu:read and qXfer:spu:write packets.
15371 (main): Pass packet_len to handle_query.
15372 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15373 * target.h (target_ops): Add qxfer_spu.
15375 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15377 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15378 accessing non-seekable spufs files.
15380 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15382 * server.c (handle_query): Add reply for qC packet.
15384 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15385 Leo Zayas <lerele@champenstudios@com>
15387 * server.h (check_remote_input_interrupt_request): New function.
15388 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15389 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15390 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15391 (check_remote_input_interrupt_request): New function.
15392 * server.h (check_remote_input_interrupt_request): Declare.
15393 * win32-low.c (winapi_DebugBreakProcess,
15394 winapi_GenerateConsoleCtrlEvent): New typedefs.
15395 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15397 (win32_wait): Check for remote interrupt request
15398 with check_remote_input_interrupt_request.
15399 (win32_request_interrupt): New function.
15400 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15402 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15404 * win32-low.c (debug_registers_changed,
15405 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15406 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15407 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15408 (thread_rec): Get context using the low target.
15409 (child_add_thread): Call thread_added on the low target,
15410 which does the same thing.
15412 (do_initial_child_stuff): Remove debug registers references.
15413 Set context using the low target. Resume threads after
15414 setting the contexts.
15415 (child_continue): Remove dead variable. Remove debug
15416 registers references.
15417 (child_fetch_inferior_registers): Go through the low target.
15418 (do_child_store_inferior_registers): Remove.
15419 (child_store_inferior_registers): Go through the low target.
15420 (win32_resume): Remove debug registers references.
15421 Set context using the low target.
15422 (handle_exception): Change return type to void. Don't record
15423 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15424 first chance exception.
15425 (get_child_debug_event): Change return type to void. Remove
15426 goto loop. Always return after waiting for debug event.
15427 (win32_wait): Convert to switch statement. Handle spurious
15430 * win32-i386-low.c (debug_registers_changed,
15431 debug_registers_used): New.
15432 (initial_stuff): Rename to ...
15433 (i386_initial_stuff): ... this. Clear debug registers
15435 (store_debug_registers): Delete.
15436 (i386_get_thread_context): New.
15437 (load_debug_registers): Delete.
15438 (i386_set_thread_context): New.
15439 (i386_thread_added): New.
15440 (single_step): Rename to ...
15441 (i386_single_step): ... this.
15442 (do_fetch_inferior_registers): Rename to ...
15443 (i386_fetch_inferior_register): ... this.
15444 (i386_store_inferior_register): New.
15445 (the_low_target): Adapt to new interface.
15447 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15448 (arm_get_thread_context): New.
15449 (arm_set_thread_context): New.
15451 (do_fetch_inferior_registers): Rename to ...
15452 (arm_fetch_inferior_register): ... this.
15453 (arm_store_inferior_register): New.
15454 (arm_wince_breakpoint): Reimplement as unsigned long.
15455 (arm_wince_breakpoint_len): Define.
15456 (the_low_target): Adapt to new interface.
15458 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15459 load_debug_registers. Add get_thread_context, set_thread_context,
15460 thread_added and store_inferior_register. Rename
15461 fetch_inferior_registers to fetch_inferior_register.
15462 (regptr): Remove declaration.
15464 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15466 * linux-low.c (linux_detach): Change return type to int. Return 0.
15467 * spu-low.c (spu_detach): Likewise.
15469 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15471 * target.h (target_ops): Change return type of detach to int.
15473 (join_inferior): New.
15474 * server.c (main): Don't skip detach support on mingw32.
15475 If the inferior doesn't support detaching return error.
15476 Call join_inferior instead of using waitpid.
15477 * linux-low.c (linux_join): New.
15478 (linux_target_op): Add linux_join.
15479 * spu-low.c (spu_join): New.
15480 (spu_target_ops): Add spu_join.
15481 * win32-low.c (win32_detach): Adapt to new interface.
15482 Reopen current_process_handle before detaching. Issue a child
15483 resume before detaching.
15485 (win32_target_op): Add win32_join.
15487 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15489 * win32-low.c (win32-attach): Fix return value.
15490 * target.h (target_ops): Describe ATTACH return values.
15492 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15494 * win32-low.c (GETPROCADDRESS): Define.
15495 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15496 (winapi_DebugSetProcessKillOnExit): Likewise.
15497 (win32_create_inferior): Force usage of ansi CreateProcessA.
15498 (win32_attach): Use GETPROCADDRESS.
15499 (win32_detach): Likewise.
15501 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15503 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15505 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15507 * win32-low.c: Commit leftover changes from 2007-03-29.
15509 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15511 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15512 fields short instead of int. Add explicit padding.
15513 (i387_cache_to_fsave): Remove unnecessary casts.
15514 (i387_fsave_to_cache): Doc fix.
15515 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15517 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15519 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15520 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15522 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15524 * configure.srv (arm*-*-mingw32ce*): Move near the other
15527 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15529 * configure.ac: Add errno checking.
15530 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15531 sys/file.h and malloc.h.
15532 (AC_CHECK_DECLS): Add perror.
15533 (srv_mingwce): Handle.
15534 * configure.srv (i[34567]86-*-cygwin*): Add
15535 win32-i386-low.o to srv_tgtobj.
15536 (i[34567]86-*-mingw*): Likewise.
15537 (arm*-*-mingw32ce*): Add case.
15538 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15539 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15540 [__MINGW32CE__] (strerror): New function.
15541 [__MINGW32CE__] (errno): Define to GetLastError.
15542 [__MINGW32CE__] (COUNTOF): New macro.
15543 (remote_open): Remove extra close call.
15544 * mem-break.c (delete_breakpoint_at): New function.
15545 * mem-break.h (delete_breakpoint_at): Declare.
15546 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15547 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15548 [USE_WIN32API] (read, write): Add char* casts.
15549 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15550 * server.h: Include wincecompat.h on Windows CE.
15551 [HAVE_ERRNO_H]: Check.
15552 (perror): Declare if not declared.
15553 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15554 (perror_with_name): Remove errno declaration.
15555 * wincecompat.h: New.
15556 * wincecompat.c: New.
15557 * win32-low.h: New.
15558 * win32-arm-low.c: New.
15559 * win32-i386-low.c: New.
15560 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15561 (OUTMSG2): Make it safe.
15563 (COUNTOF): New macro.
15564 (NUM_REGS): Get it from the low target.
15565 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15566 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15567 (thread_rec): Let low target handle debug registers.
15568 (child_add_thread): Likewise.
15569 (child_init_thread_list): Likewise.
15570 (continue_one_thread): Likewise.
15572 (do_child_fetch_inferior_registers): Move to ...
15573 * win32-i386-low.c: ... here, and rename to ...
15574 (do_fetch_inferior_registers): ... this.
15575 * win32-low.c (child_fetch_inferior_registers):
15576 Go through the low target.
15577 (do_child_store_inferior_registers): Use regptr.
15578 (strwinerror): New function.
15579 (win32_create_inferior): Handle Windows CE.
15580 Use strwinerror instead of strerror on Windows error
15581 codes. Add program to the error output.
15582 Don't close the main thread handle on Windows CE.
15583 (win32_attach): Use coredll.dll on Windows CE.
15584 (win32_kill): Close current process and current
15586 (win32_detach): Use coredll.dll on Windows CE.
15587 (win32_resume): Let low target handle debug registers, and
15589 (handle_exception): Add/Remove initial breakpoint. Avoid
15590 non-existant WSTOPSIG on Windows CE.
15591 (win32_read_inferior_memory): Cast to remove warning.
15592 (win32_arch_string): Go through the low target.
15593 (initialize_low): Call set_breakpoint_data with the low
15594 target's breakpoint.
15595 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15596 FOP_REGNUM, mappings): Move to ...
15597 * win32-i386-low.c: ... here.
15598 * win32-low.c (win32_thread_info): Move to ...
15599 * win32-low.h: ... here.
15600 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15601 win32-arm-low.c and wincecompat.c.
15602 (all:): Add $EXEEXT.
15603 (install-only:): Likewise.
15604 (gdbserver:): Likewise.
15605 (gdbreplay:): Likewise.
15606 * config.in: Regenerate.
15607 * configure: Regenerate.
15609 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15611 * win32-low.c: Rename typedef thread_info to
15612 win32_thread_info throughout.
15614 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15616 * win32-i386-low.c: Rename to ...
15617 * win32-low.c: ... this.
15618 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15619 * Makefile.in: Likewise.
15621 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15623 * remote-utils.c (monitor_output): Constify msg parameter.
15624 * server.h (monitor_output): Likewise.
15625 * win32-i386-low.c (handle_output_debug_string): New.
15626 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15627 handle_output_debug_string.
15628 (get_child_debug_event): Likewise.
15630 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15632 * server.c (main): Correct strtoul check.
15634 2007-03-27 Jon Ringle <jon@ringle.org>
15636 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15638 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15640 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15642 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15644 * terminal.h: Check HAVE_SGTTY_H.
15646 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15648 * remote-utils.c (remote_open): Print out the assigned port number.
15650 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15652 * remote-utils.c (monitor_output): New function.
15653 * server.c (debug_threads): Define here.
15654 (monitor_show_help): New function.
15655 (handle_query): Handle qRcmd.
15656 (main): Do not handle 'd' packet.
15657 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15658 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15661 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15663 * Makefile.in (EXEEXT): New.
15664 (clean): Use $(EXEEXT).
15666 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15668 * target.h (target_ops): Rename send_signal to request_interrupt,
15669 and remove enum target_signal parameter.
15670 * linux-low.c (linux_request_interrupt): Rename from
15671 linux_send_signal, and always send SIGINT.
15672 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15673 and always send SIGINT.
15674 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15676 (input_interrupt): Likewise.
15678 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15680 * server.c (get_features_xml): Check if target implemented
15682 * win32-i386-low.c (win32_arch_string): New.
15683 (win32_target_ops): Add win32_arch_string as arch_string member.
15685 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15687 * spu-low.c (spu_arch_string): New.
15688 (spu_target_ops): Add spu_arch_string.
15690 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15692 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15693 * configure.ac: Do not check for terminal.h.
15694 * configure, config.in: Regenerated.
15696 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15698 * Makefile.in (OBS): Add $(XML_BUILTIN).
15699 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15701 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15702 (arm-with-iwmmxt.c): New.
15703 * config.in, configure: Regenerate.
15704 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15705 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15706 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15707 (arm*-*-linux*): Add iWMMXt and regset support.
15708 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15709 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15710 (arm_store_wmmxregset, target_regsets): New.
15711 * server.c (get_features_xml): Take annex argument. Check builtin
15713 (handle_query): Handle multiple annexes.
15715 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15717 * remote-utils.c [USE_WIN32API] (read, write): Define.
15718 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15721 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15723 * linux-i386-low.c (the_low_target): Set arch_string.
15724 * linux-x86-64-low.c (the_low_target): Likewise.
15725 * linux-low.c (linux_arch_string): New.
15726 (linux_target_ops): Add it.
15727 * linux-low.h (struct linux_target_ops): Add arch_string.
15728 * server.c (write_qxfer_response): Use const void * for DATA.
15729 (get_features_xml): New.
15730 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15731 * target.h (struct target_ops): Add arch_string method.
15733 2007-01-03 Denis Pilat <denis.pilat@st.com>
15734 Daniel Jacobowitz <dan@codesourcery.com>
15736 * linux-low.c (linux_kill): Handle being called with no threads.
15737 * win32-i386-low.c (win32_kill): Likewise.
15738 (get_child_debug_event): Clear current_process_handle.
15740 2006-12-30 Denis PILAT <denis.pilat@st.com>
15741 Daniel Jacobowitz <dan@codesourcery.com>
15743 * remote-utils.c (remote_open): Check the type of specified
15744 serial port devices before opening them.
15745 * server.c (main): Kill the inferior if an error occurs during
15746 the first remote_open.
15748 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15750 * README: Update supported targets.
15752 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15754 * Makefile.in (clean): Remove reg-mips64.c.
15755 (reg-mips64.c, reg-mips64.o): New rules.
15756 * configure.srv: Handle mips64. Include regset support for mips.
15757 * linux-mips-low.c (union mips_register): New.
15758 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15759 (mips_breakpoint, mips_breakpoint_at): Use int.
15760 (mips_collect_register, mips_supply_register)
15761 (mips_collect_register_32bit, mips_supply_register_32bit)
15762 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15763 (mips_store_fpregset, target_regsets): New.
15764 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15766 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15768 * configure.srv: Add target "spu*-*-*".
15769 * Makefile.in (clean): Remove reg-spu.c.
15770 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15771 * spu-low.c: New file.
15773 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15775 * configure.ac: Correct td_thr_tls_get_addr test.
15776 * configure: Regenerated.
15778 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15780 * linux-low.c (linux_wait_for_event): Reformat. Use the
15781 pass_signals array.
15782 * remote-utils.c (decode_address_to_semicolon): New.
15783 * server.c (pass_signals, handle_general_set): New.
15784 (handle_query): Mention QPassSignals for qSupported.
15785 (main): Call handle_general_set.
15786 * server.h (pass_signals, decode_address_to_semicolon): New.
15788 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15790 * server.c (handle_query): Correct error handling for read_auxv.
15792 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15794 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15795 and srv_linux_thread_db to yes.
15796 * linux-s390-low.c (s390_fill_gregset): New function.
15797 (target_regsets): Define data structure.
15799 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15801 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15802 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15803 * config.in, configure: Regenerated.
15804 * inferiors.c (gdb_id_to_thread): New function.
15805 (gdb_id_to_thread_id): Use it.
15806 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15807 * linux-low.h (struct process_info): Add th member.
15808 (thread_db_get_tls_address): New prototype.
15809 * remote-utils.c (decode_address): Make non-static.
15810 * server.c (handle_query): Handle qGetTLSAddr.
15811 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15812 * target.h (struct target_ops): Add get_tls_address.
15813 * thread-db.c (maybe_attach_thread): Save the thread handle.
15814 (thread_db_get_tls_address): New.
15816 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15818 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15819 (linux_resume_one_process): Take a siginfo_t *. Update all
15820 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15821 (struct pending_signals): Add a siginfo_t.
15822 (linux_wait_for_process): Always set last_status.
15823 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15824 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15825 * linux-low.h (struct process_info): Add last_status.
15827 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15829 * remote-utils.c (try_rle): New function.
15830 (putpkt_binary): Use it.
15832 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15834 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15835 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15836 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15837 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15838 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15841 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15843 * server.c (terminal_fd): New variable.
15844 (old_foreground_pgrp): Likewise.
15845 (restore_old_foreground_pgrp): New function.
15846 (start_inferior): Record the terminal file descriptor in terminal_fd
15847 and its original foreground group in old_foreground_pgrp. Register
15848 restore_old_foreground_pgrp with atexit().
15850 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
15852 * server.c (handle_query): Correct qPart to qXfer.
15854 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
15856 * configure.ac: Check for more headers which are missing on
15857 Windows. Automatically supply -lwsock32 and USE_WIN32API.
15858 * configure.srv: Add Cygwin and mingw32.
15859 * remote-utils.c: Don't include headers unconditionally which
15860 are missing on mingw32. Include <winsock.h> for mingw32.
15861 (remote_open): Adjust for mingw32 support. Flush
15862 standard error after writing to it.
15863 (remote_close, putpkt_binary, input_interrupt, block_async_io)
15864 (unblock_async_io, enable_async_io, disable_async_io)
15865 (readchar, getpkt): Update for Winsock support.
15866 (prepare_resume_reply): Expect a protocol signal number.
15867 * server.c: Disable <sys/wait.h> on mingw32.
15868 (start_inferior): Adjust for mingw32 support. Flush
15869 standard error after writing to it.
15870 (attach_inferior): Likewise. Use protocol signal
15872 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
15874 * win32-i386-low.c: New file.
15875 * Makefile.in (XM_CLIBS): Set.
15876 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15877 (win32-i386-low.o): New dependency rule.
15878 * linux-low.c (linux_wait): Use target signal numbers.
15879 * target.h (struct target_ops): Doc fix.
15880 * server.h (target_signal_to_name): New prototype.
15881 * gdbreplay.c: Don't include headers unconditionally which
15882 are missing on mingw32. Include <winsock.h> for mingw32.
15883 (remote_close, remote_open): Adjust for Winsock support.
15884 * configure, config.in: Regenerated.
15886 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15888 * server.c (decode_xfer_read, write_qxfer_response): New.
15889 (handle_query): Take a packet length argument. Handle
15890 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
15891 the qSupported response.
15892 (main): Update call to handle_query.
15894 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
15896 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15897 (putpkt_binary): Renamed from putpkt and adjusted for binary
15899 (putpkt): New wrapper for putpkt_binary.
15900 (readchar): Don't mask off the high bit.
15901 (decode_X_packet): New function.
15902 * server.c (main): Call putpkt_binary if a handler sets the packet
15903 length. Save the length of the incoming packet. Handle 'X'.
15904 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15906 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
15908 * server.c (handle_query): Handle qSupported.
15910 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15912 * remote-utils.c (all_symbols_looked_up): New variable.
15913 (look_up_one_symbol): Check it.
15914 * server.h (look_up_one_symbol): New declaration.
15915 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15917 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
15919 * Makefile.in (linux-arm-low.o): Update dependencies.
15920 * linux-arm-low.c: Include "gdb_proc_service.h".
15921 (PTRACE_GET_THREAD_AREA): Define.
15922 (ps_get_thread_area): New function.
15924 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15926 * configure.srv (m68k*-*-uclinux*): New target.
15927 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15928 (linux_resume_one_process): Remove extraneous cast.
15929 (linux_read_offsets): New.
15930 (linux_target_op): Add linux_read_offsets on mmuless systems.
15931 * server.c (handle_query): Add qOffsets logic.
15932 * target.h (struct target_ops): Add read_offsets.
15934 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15936 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15937 (PTRACE_GET_THREAD_AREA): Define.
15938 (ps_get_thread_area): New function.
15939 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15940 (linux-x86-64-low.o): Update.
15942 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15944 * configure.ac: Remove checks for prfpregset_t.
15945 * gdb_proc_service.h: New file.
15946 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15947 new "gdb_proc_service.h".
15948 * proc-service.c: Likewise.
15949 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15950 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15951 * Makefile.in (gdb_proc_service_h): Updated.
15952 * configure, config.in: Regenerated.
15954 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15956 * remote-utils.c (prepare_resume_reply): Move declaration
15957 of gdb_id_from_wait to the top of the block.
15959 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15961 * linux-low.c (regsets_store_inferior_registers): Read the regset
15962 from the target before filling it.
15964 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15966 * server.c (attach_inferior): Return SIGTRAP for a successful
15969 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15971 * Makefile.in (OBS): Add version.o.
15972 (STAGESTUFF): Delete.
15973 (version.o): Add dependencies.
15974 (version.c): Replace rule.
15975 (clean): Remove version.c.
15976 * server.c (gdbserver_version): New.
15977 (gdbserver_usage): Use printf.
15978 (main): Handle --version and --help.
15979 * server.h (version, host_name): Add declarations.
15981 2005-12-23 Eli Zaretskii <eliz@gnu.org>
15993 * linux-x86-64-low.c:
15995 * linux-s390-low.c:
15996 * linux-ppc64-low.c:
15998 * linux-mips-low.c:
15999 * linux-m68k-low.c:
16000 * linux-m32r-low.c:
16003 * linux-ia64-low.c:
16004 * linux-i386-low.c:
16005 * linux-crisv32-low.c:
16017 * gdbserver.1: Add (C) after Copyright. Update the FSF
16020 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16022 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16023 (arm_breakpoint_at): Recognize both breakpoints.
16024 (the_low_target): Use the correct breakpoint instruction.
16026 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16028 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16029 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16030 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16031 (the_low_target): Update.
16033 2005-10-25 Andreas Schwab <schwab@suse.de>
16035 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16037 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16038 (ia64_num_regs): Reduce to 462.
16040 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16042 * acinclude.m4: Correct quoting.
16043 * aclocal.m4: Regenerated.
16045 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16046 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16047 (thread_db_init): Call thread_db_err_str.
16048 * configure.ac: Check for TD_VERSION.
16049 * config.in, configure: Regenerated.
16051 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16053 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16055 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16057 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16058 is not available. Define HAVE_PTRACE_GETREGS if it is.
16059 * config.in, configure: Regenerated.
16060 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16061 * linux-i386-low.c, linux-m68k-low.c: Update to use
16062 HAVE_PTRACE_GETREGS.
16063 * linux-low.c (regsets_fetch_inferior_registers)
16064 (regsets_store_inferior_registers): Only return 0 if we processed
16066 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16067 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16069 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16071 * inferiors.c (struct thread_info): Add gdb_id.
16072 (add_thread): Add gdb_id argument.
16073 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16074 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16075 calls to add_thread.
16076 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16077 * server.c (handle_query): Use thread_to_gdb_id.
16078 (handle_v_cont, main): Use gdb_id_to_thread_id.
16079 * server.h (add_thread): Update prototype.
16080 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16083 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16085 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16086 left-padded registers.
16087 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16088 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16090 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16092 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16093 * configure: Regenerate.
16094 * config.in: Regenerate.
16095 * server.h (NEED_DECLARATION_STRERROR):
16096 Replace with !HAVE_DECL_STRERROR.
16098 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16100 * linux-low.c (linux_wait, linux_send_signal): Don't test
16101 an unsigned long variable for > 0 if it could be MAX_ULONG.
16102 * server.c (myresume): Likewise.
16103 * target.c (set_desired_inferior): Likewise.
16105 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16107 * configure.ac: Simplify and improve check for socklen_t.
16108 * configure, config.in: Regenerate.
16110 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16112 * acconfig.h: Remove.
16113 * configure.ac: Add a test for socklen_t. Use three-argument
16114 AC_DEFINE throughout.
16115 * config.in: Regenerated using autoheader 2.59.
16116 * configure: Regenerated.
16118 * gdbreplay.c (socklen_t): Provide a default.
16119 (remote_open): Use socklen_t.
16120 * remote-utils.c (socklen_t): Provide a default.
16121 (remote_open): Use socklen_t.
16122 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16125 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16127 * linux-low.c (linux_read_memory, linux_write_memory)
16128 (linux_read_auxv): Likewise.
16129 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16130 (check_mem_write): Likewise.
16131 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16133 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16134 (registers_from_string, register_data): Likewise.
16135 * server.c (handle_query, main): Likewise.
16136 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16137 (decode_M_packet): Likewise.
16138 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16139 * target.h (struct target_ops): Update read_memory, write_memory,
16141 (read_inferior_memory, write_inferior_memory): Update.
16142 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16143 to unsigned char *.
16144 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16145 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16146 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16147 linux-s390-low.c, linux-sh-low.c: Update for changes in
16148 read_inferior_memory and the_low_target->breakpoint.
16150 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16152 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16153 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16154 * configure.srv: Add powerpc64-*-linux*.
16155 * linux-ppc64-low.c: New file.
16157 2005-05-23 Orjan Friberg <orjanf@axis.com>
16159 * linux-cris-low.c: New file with support for CRIS.
16160 * linux-crisv32-low.c: Ditto for CRISv32.
16161 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16162 (clean): Add reg-cris.c and reg-crisv32.c.
16163 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16164 reg-crisv32.o, and reg-crisv32.c to make rules.
16165 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16166 recognized targets.
16168 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16170 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16171 of sizeof (PTRACE_XFER_TYPE).
16172 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16174 2005-05-12 Orjan Friberg <orjanf@axis.com>
16176 * target.h (struct target_ops): Add insert_watchpoint,
16177 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16178 pointers for hardware watchpoint support.
16179 * linux-low.h (struct linux_target_ops): Ditto.
16180 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16181 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16182 to linux_target_ops.
16183 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16185 * server.c (main): Recognize 'Z' and 'z' packets.
16187 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16189 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16190 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16191 (the_low_target): Add new members.
16193 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16195 * proc-service.c (ps_lgetregs): Search all_processes instead of
16198 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16200 * server.c (start_inferior): Change return type to int.
16201 (attach_inferior): Change sigptr to int *.
16202 (handle_v_cont, handle_v_requests): Change signal to int *.
16203 (main): Change signal to int.
16205 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16207 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16208 * configure.srv: Add m32r*-*-linux*.
16209 * linux-m32r-low.c: New file.
16211 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16213 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16215 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16217 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16218 Take unsigned long arguments for PIDs.
16219 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16220 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16221 (wait_for_sigstop, linux_resume_one_process)
16222 (regsets_fetch_inferior_registers, linux_send_signal)
16223 (linux_read_auxv): Likewise. Update the types of variables holding
16224 PIDs. Update format string specifiers.
16225 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16226 * remote-utils.c (prepare_resume_reply): Likewise.
16227 * server.c (cont_thread, general_thread, step_thread)
16228 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16230 (handle_query): Update format specifiers.
16231 (handle_v_cont, main): Use strtoul for thread IDs.
16232 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16233 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16234 (general_thread, step_thread, thread_from_wait)
16235 (old_thread_from_wait): Update.
16236 * target.h (struct thread_resume): Use unsigned long for THREAD.
16237 (struct target_ops): Use unsigned long for arguments to attach and
16240 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16242 * acinclude.m4: Include bfd/bfd.m4 directly.
16243 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16244 <agriffis@toolchain.org>.
16245 * aclocal.m4, configure: Regenerated.
16247 2005-01-07 Andrew Cagney <cagney@gnu.org>
16249 * configure.ac: Rename configure.in, require autoconf 2.59.
16250 * configure: Re-generate.
16252 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16254 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16255 LIBS when finished.
16256 * aclocal.m4: Regenerated.
16257 * configure: Regenerated.
16259 2004-11-21 Andreas Schwab <schwab@suse.de>
16261 * linux-m68k-low.c (m68k_num_gregs): Define.
16262 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16263 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16264 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16265 (m68k_breakpoint_at): New. Add to the_low_target.
16267 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16268 srv_linux_thread_db to yes.
16270 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16272 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16273 (ARCH_SET_FS): Likewise.
16274 (ARCH_GET_FS): Likewise.
16275 (ARCH_GET_GS): Likewise.
16277 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16279 * linux-i386-low.c (ps_get_thread_area): New.
16280 * linux-x86-64-low.c (ps_get_thread_area): New.
16281 * linux-low.c: Include <sys/syscall.h>.
16282 (linux_kill_one_process): Don't kill the first thread here.
16283 (linux_kill): Kill the first thread here.
16284 (kill_lwp): New function.
16285 (send_sigstop, linux_send_signal): Use it.
16286 * proc-service.c: Clean up #ifdefs.
16287 (fpregset_info): Delete.
16288 (ps_lgetregs): Update and enable implementation.
16289 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16291 * remote-utils.c (struct sym_cache, symbol_cache): New.
16292 (input_interrupt): Print a clearer message.
16293 (async_io_enabled): New variable.
16294 (enable_async_io, disable_async_io): Use it. Update comments.
16295 (look_up_one_symbol): Use the symbol cache.
16296 * thread-db.c (thread_db_look_up_symbols): New function.
16297 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16299 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16301 * configure.in: Test for -rdynamic.
16302 * configure: Regenerated.
16303 * Makefile (INTERNAL_LDFLAGS): New.
16304 (gdbserver, gdbreplay): Use it.
16306 2004-09-02 Andrew Cagney <cagney@gnu.org>
16308 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16310 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16312 * linux-low.c (linux_wait): Clear all_processes list also.
16314 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16316 * linux-low.c: Include <errno.h>. Remove extern declaration of
16319 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16321 * gdbreplay.c, server.h, utils.c: Update copyright years.
16323 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16325 * server.c (main): Print child status or termination signal from
16326 variable 'signal', not 'sig'.
16328 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16330 * linux-low.c (linux_read_memory): Change return type to
16331 int. Check for and return error from ptrace().
16332 * target.c (read_inferior_memory): Change return type to int. Pass
16333 back return status from the_target->read_memory().
16334 * target.h (struct target_ops): Adapt *read_memory() prototype.
16336 (read_inferior_memory): Adapt prototype.
16337 * server.c (main): Return an error packet if
16338 read_inferior_memory() returns an error.
16340 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16342 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16343 Unify with other clean targets.
16345 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16347 * server.c (handle_v_cont): Call set_desired_inferior.
16349 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16351 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16353 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16355 * linux-low.c (linux_wait): Unblock async I/O.
16356 (linux_resume): Block and enable async I/O.
16357 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16358 * server.h (block_async_io, unblock_async_io): Add prototypes.
16360 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16362 * remote-utils.c (remote_open): Print a status notice after
16363 opening a TCP port.
16364 * server.c (attach_inferior): Print a status notice after
16367 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16369 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16371 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16373 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16375 * server.c, target.h: Update copyright years.
16377 2004-02-25 Roland McGrath <roland@redhat.com>
16379 * target.h (struct target_ops): New member `read_auxv'.
16380 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16381 * linux-low.c (linux_read_auxv): New function.
16382 (linux_target_ops): Initialize `read_auxv' member to that.
16384 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16386 Committed by Jim Blandy <jimb@redhat.com>.
16388 * linux-s390-low.c (s390_num_regs): Update.
16389 (s390_regmap): Remove control registers. Use __s390x__ predefine
16390 instead of GPR_SIZE to distiguish s390 and s390x targets.
16392 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16394 * linux-low.c: Update copyright year.
16395 (check_removed_breakpoint): Clear pending_is_breakpoint.
16396 (linux_set_resume_request, linux_queue_one_thread)
16397 (resume_status_pending_p): New functions.
16398 (linux_continue_one_thread): Use process->resume.
16399 (linux_resume): Only resume threads if there are no pending events.
16400 * linux-low.h (struct process_info): Add resume request
16403 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16405 * regcache.c (new_register_cache): Clear the allocated register
16406 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16408 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16410 * linux-low.c (linux_resume): Take a struct thread_resume *
16412 (linux_wait): Update call.
16413 (resume_ptr): New static variable.
16414 (linux_continue_one_thread): Renamed from
16415 linux_continue_one_process. Use resume_ptr.
16416 (linux_resume): Use linux_continue_one_thread.
16417 * server.c (handle_v_cont, handle_v_requests): New functions.
16418 (myresume): New function.
16419 (main): Handle 'v' case.
16420 * target.h (struct thread_resume): New type.
16421 (struct target_ops): Change argument of "resume" to struct
16423 (myresume): Delete macro.
16425 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16427 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16428 (uninstall): Support DESTDIR.
16430 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16432 * configure.srv: Add xscale*linux copy of arm*linux entry.
16434 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16436 * linux-arm-low.c (arm_reinsert_addr): New function.
16437 (the_low_target): Add arm_reinsert_addr.
16439 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16441 * mem-break.c: Remove whitespace at end of file.
16443 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16445 * configure.in: Check whether we need to prototype strerror.
16446 * server.h: Optionally prototype strerror.
16447 * gdbreplay.c (perror_with_name): Use strerror.
16448 * linux-low.c (linux_attach_lwp): Use strerror.
16449 * utils.c (perror_with_name): Use strerror.
16450 * config.in, configure: Regenerated.
16452 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16454 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16455 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16457 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16459 * Makefile.in (SFILES): Update.
16460 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16461 low-sun3.c: Remove files.
16463 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16465 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16466 (linux_detach_one_process, linux_detach): New functions.
16467 (linux_target_ops): Add linux_detach.
16468 * server.c (main): Handle 'D' packet.
16469 * target.h (struct target_ops): Add "detach" member.
16470 (detach_inferior): Define.
16472 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16474 From Kelley Cook <kelleycook@wideopenwest.com>:
16475 * configure.srv: Accept i[34567]86 variants.
16477 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16479 * linux-low.c (linux_wait_for_event): Correct comment typos.
16480 (linux_resume_one_process): Call check_removed_breakpoint.
16481 (linux_send_signal): New function.
16482 (linux_target_ops): Add linux_send_signal.
16483 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16485 * target.h (struct target_ops): Add send_signal.
16487 2003-05-29 Jim Blandy <jimb@redhat.com>
16489 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16490 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16491 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16492 away part of the register's value.
16494 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16496 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16497 (linux_wait_for_event, linux_init_signals): Likewise.
16499 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16501 * configure.in: Check for stdlib.h.
16502 * configure: Regenerated.
16503 * config.in: Regenerated.
16505 2003-01-04 Andreas Schwab <schwab@suse.de>
16507 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16509 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16511 * Makefile.in: Remove obsolete code.
16513 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16515 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16516 defined(PT_FPR0_HI).
16518 2002-11-17 Stuart Hughes <seh@zee2.com>
16520 * linux-arm-low.c (arm_num_regs): Increase.
16521 (arm_regmap): Include status register.
16523 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16525 * linux-low.c (register_addr): Remove incorrect -1 check.
16527 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16529 * linux-low.c (linux_create_inferior): Call setpgid. Return
16531 (unstopped_p, linux_signal_pid): Remove.
16532 (linux_target_ops): Remove linux_signal_pid.
16533 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16534 global instead of target method.
16535 * target.h (struct target_ops): Remove signal_pid. Update comment
16536 for create_inferior.
16537 * server.c (signal_pid): New variable.
16538 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16539 gdbserver. Set the child to be the foreground process group.
16540 (attach_inferior): Set signal_pid.
16542 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16544 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16546 2002-08-20 Jim Blandy <jimb@redhat.com>
16548 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16551 2002-08-01 Andrew Cagney <cagney@redhat.com>
16553 * Makefile.in: Make chill references obsolete.
16555 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16557 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16558 * configure: Regenerate.
16559 * config.in: Regenerate.
16561 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16563 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16564 (perror_with_name, remote_close, remote_open, expect, play): Static.
16566 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16568 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16569 byte offsets instead of an array of indexes.
16570 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16572 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16574 * regcache.c: Add comment.
16576 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16578 * thread-db.c: New file.
16579 * proc-service.c: New file.
16580 * acinclude.m4: New file.
16581 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16582 proc-service.o, and thread-db.o.
16583 (linux-low.o): Add USE_THREAD_DB.
16584 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16585 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16586 * aclocal.m4: Regenerated.
16587 * config.in: Regenerated.
16588 * configure: Regenerated.
16589 * configure.in: Check for proc_service.h, sys/procfs.h,
16590 thread_db.h, and linux/elf.h headrs.
16591 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16592 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16593 Check for -lthread_db and thread support.
16594 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16595 PowerPC, and SuperH.
16596 * i387-fp.c: Constify arguments.
16597 * i387-fp.h: Likewise.
16598 * inferiors.c: (struct thread_info): Renamed from
16599 `struct inferior_info'. Remove PID member. Use generic inferior
16600 list header. All uses updated.
16601 (inferiors, signal_pid): Removed.
16602 (all_threads): New variable.
16603 (get_thread): Define.
16604 (add_inferior_to_list): New function.
16605 (for_each_inferior): New function.
16606 (change_inferior_id): New function.
16607 (add_inferior): Removed.
16608 (remove_inferior): New function.
16609 (add_thread): New function.
16610 (free_one_thread): New function.
16611 (remove_thread): New function.
16612 (clear_inferiors): Use for_each_inferior and free_one_thread.
16613 (find_inferior): New function.
16614 (find_inferior_id): New function.
16615 (inferior_target_data): Update argument type.
16616 (set_inferior_target_data): Likewise.
16617 (inferior_regcache_data): Likewise.
16618 (set_inferior_regcache_data): Likewise.
16619 * linux-low.c (linux_bp_reinsert): Remove.
16620 (all_processes, stopping_threads, using_thrads)
16621 (struct pending_signals, debug_threads, pid_of): New.
16622 (inferior_pid): Replace with macro.
16623 (struct inferior_linux_data): Remove.
16624 (get_stop_pc, add_process): New functions.
16625 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16626 Use add_process and add_thread.
16627 (linux_attach_lwp): New function, based on old linux_attach. Use
16628 add_process and add_thread. Set stop_expected for new threads.
16629 (linux_attach): New function.
16630 (linux_kill_one_process): New function.
16631 (linux_kill): Kill all LWPs.
16632 (linux_thread_alive): Use find_inferior_id.
16633 (check_removed_breakpoints, status_pending_p): New functions.
16634 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16635 Update. Use WNOHANG. Wait for cloned processes also. Update process
16636 struct for the found process.
16637 (linux_wait_for_event): New function.
16638 (linux_wait): Use it. Support LWPs.
16639 (send_sigstop, wait_for_sigstop, stop_all_processes)
16640 (linux_resume_one_process, linux_continue_one_process): New functions.
16641 (linux_resume): Support LWPs.
16642 (REGISTER_RAW_SIZE): Remove.
16643 (fetch_register): Use register_size instead. Call supply_register.
16644 (usr_store_inferior_registers): Likewise. Call collect_register.
16645 Fix recursive case.
16646 (regsets_fetch_inferior_registers): Improve error message.
16647 (regsets_store_inferior_registers): Add debugging.
16648 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16649 (unstopped_p, linux_signal_pid): New functions.
16650 (linux_target_ops): Add linux_signal_pid.
16651 (linux_init_signals): New function.
16652 (initialize_low): Call it. Initialize using_threads.
16653 * regcache.c (inferior_regcache_data): Add valid
16655 (get_regcache): Fetch registers lazily. Add fetch argument
16656 and update all callers.
16657 (regcache_invalidate_one, regcache_invalidate): New
16659 (new_register_cache): Renamed from create_register_cache.
16660 Return the new regcache.
16661 (free_register_cache): Change argument to a void *.
16662 (registers_to_string, registers_from_string): Call get_regcache
16663 with fetch flag set.
16664 (register_data): Make static. Pass fetch flag to get_regcache.
16665 (supply_register): Call get_regcache with fetch flag clear.
16666 (collect_register): Call get_regcache with fetch flag set.
16667 (collect_register_as_string): New function.
16668 * regcache.h: Update.
16669 * remote-utils.c (putpkt): Flush after debug output and use
16671 Handle input interrupts while waiting for an ACK.
16672 (input_interrupt): Use signal_pid method.
16673 (getpkt): Flush after debug output and use stderr.
16674 (outreg): Use collect_register_as_string.
16675 (new_thread_notify, dead_thread_notify): New functions.
16676 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16677 and general_thread.
16678 (look_up_one_symbol): Flush after debug output.
16679 * server.c (step_thread, server_waiting): New variables.
16680 (start_inferior): Don't use signal_pid. Update call to mywait.
16681 (attach_inferior): Update call to mywait.
16682 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16683 (main): Don't fetch/store registers explicitly. Use
16684 set_desired_inferior. Support proposed ``Hs'' packet. Update
16686 * server.h: Update.
16687 (struct inferior_list, struct_inferior_list_entry): New.
16688 * target.c (set_desired_inferior): New.
16689 (write_inferior_memory): Constify.
16690 (mywait): New function.
16691 * target.h: Update.
16692 (struct target_ops): New signal_pid method.
16693 (mywait): Removed macro, added prototype.
16695 * linux-low.h (regset_func): Removed.
16696 (regset_fill_func, regset_store_func): New.
16697 (enum regset_type): New.
16698 (struct regset_info): Add type field. Use new operation types.
16699 (struct linux_target_ops): stop_pc renamed to get_pc.
16700 Add decr_pc_after_break and breakpoint_at.
16701 (get_process, get_thread_proess, get_process_thread)
16702 (strut process_info, all_processes, linux_attach_lwp)
16703 (thread_db_init): New.
16705 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16706 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16707 (the_low_target): Add new members.
16708 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16709 (i386_store_fpxregset): Constify.
16710 (target_regsets): Add new kind identifier.
16711 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16712 (i386_set_pc): Add debugging.
16713 (i386_breakpoint_at): New function.
16714 (the_low_target): Add new members.
16715 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16716 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16717 (mips_breakpoint_at): New.
16718 (the_low_target): Add new members.
16719 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16720 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16721 (the_low_target): Add new members.
16722 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16723 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16724 (the_low_target): Add new members.
16725 * linux-x86-64-low.c (target_regsets): Add new kind
16728 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16730 From Martin Pool <mbp@samba.org>:
16731 * server.c (gdbserver_usage): New function.
16734 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16736 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16737 stop_at -> stop_pc.
16739 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16741 * Makefile.in: Remove obsolete code.
16743 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16745 * linux-low.c (regsets_fetch_inferior_registers),
16746 (regsets_store_inferior_registers): Removed cast to int from
16748 * regcache.h: Added declaration of struct inferior_info.
16750 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16752 * inferiors.c (struct inferior_info): Add regcache_data.
16753 (add_inferior): Call create_register_cache.
16754 (clear_inferiors): Call free_register_cache.
16755 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16756 * regcache.c (struct inferior_regcache_data): New.
16757 (registers): Remove.
16758 (get_regcache): New function.
16759 (create_register_cache, free_register_cache): New functions.
16760 (set_register_cache): Don't initialize the register cache here.
16761 (registers_to_string, registers_from_string, register_data): Call
16763 * regcache.h: Add prototypes.
16764 * server.h: Likewise.
16766 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16768 * mem-break.c: New file.
16769 * mem-break.h: New file.
16770 * Makefile.in: Add mem-break.o rule; update server.h
16772 * inferiors.c (struct inferior_info): Add target_data
16774 (clear_inferiors): Free target_data member if set.
16775 (inferior_target_data, set_inferior_target_data): New functions.
16776 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16777 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16778 * linux-low.c (linux_bp_reinsert): New variable.
16779 (struct inferior_linux_data): New.
16780 (linux_create_inferior): Use set_inferior_target_data.
16781 (linux_attach): Likewise. Call add_inferior.
16782 (linux_wait_for_one_inferior): New function.
16783 (linux_wait): Call it.
16784 (linux_write_memory): Add const.
16785 (initialize_low): Call set_breakpoint_data.
16786 * linux-low.h (struct linux_target_ops): Add breakpoint
16788 * server.c (attach_inferior): Remove extra add_inferior
16790 * server.h: Include mem-break.h. Update inferior.c
16792 * target.c (read_inferior_memory)
16793 (write_inferior_memory): New functions.
16794 * target.h (read_inferior_memory)
16795 (write_inferior_memory): Change macros to prototypes.
16796 (struct target_ops): Update comments. Add const to write_memory
16799 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16801 * linux-low.c (usr_store_inferior_registers): Support
16802 registers which are allowed to fail to store.
16803 * linux-low.h (linux_target_ops): Likewise.
16804 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16805 (ppc_cannot_store_register): FPSCR may not be storable.
16807 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16809 * server.h: Include <string.h> if HAVE_STRING_H.
16810 * ChangeLog: Correct paths in last ChangeLog entry.
16812 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16814 * linux-low.h: Remove obsolete prototypes.
16815 (struct linux_target_ops): New.
16816 (extern the_low_target): New.
16817 * linux-low.c (num_regs, regmap): Remove declarations.
16818 (register_addr): Use the_low_target explicitly.
16819 (fetch_register): Likewise.
16820 (usr_fetch_inferior_registers): Likewise.
16821 (usr_store_inferior_registers): Likewise.
16822 * linux-arm-low.c (num_regs): Remove.
16823 (arm_num_regs): Define.
16824 (arm_regmap): Renamed from regmap, made static.
16825 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16827 (arm_cannot_store_register): Renamed from cannot_store_register,
16829 (the_low_target): New.
16830 * linux-i386-low.c (num_regs): Remove.
16831 (i386_num_regs): Define.
16832 (i386_regmap): Renamed from regmap, made static.
16833 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16835 (i386_cannot_store_register): Renamed from cannot_store_register,
16837 (the_low_target): New.
16838 * linux-ia64-low.c (num_regs): Remove.
16839 (ia64_num_regs): Define.
16840 (ia64_regmap): Renamed from regmap, made static.
16841 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16843 (ia64_cannot_store_register): Renamed from cannot_store_register,
16845 (the_low_target): New.
16846 * linux-m68k-low.c (num_regs): Remove.
16847 (m68k_num_regs): Define.
16848 (m68k_regmap): Renamed from regmap, made static.
16849 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16851 (m68k_cannot_store_register): Renamed from cannot_store_register,
16853 (the_low_target): New.
16854 * linux-mips-low.c (num_regs): Remove.
16855 (mips_num_regs): Define.
16856 (mips_regmap): Renamed from regmap, made static.
16857 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16859 (mips_cannot_store_register): Renamed from cannot_store_register,
16861 (the_low_target): New.
16862 * linux-ppc-low.c (num_regs): Remove.
16863 (ppc_num_regs): Define.
16864 (ppc_regmap): Renamed from regmap, made static.
16865 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16867 (ppc_cannot_store_register): Renamed from cannot_store_register,
16869 (the_low_target): New.
16870 * linux-s390-low.c (num_regs): Remove.
16871 (s390_num_regs): Define.
16872 (s390_regmap): Renamed from regmap, made static.
16873 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16875 (s390_cannot_store_register): Renamed from cannot_store_register,
16877 (the_low_target): New.
16878 * linux-sh-low.c (num_regs): Remove.
16879 (sh_num_regs): Define.
16880 (sh_regmap): Renamed from regmap, made static.
16881 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16883 (sh_cannot_store_register): Renamed from cannot_store_register,
16885 (the_low_target): New.
16886 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16887 (the_low_target): New.
16889 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16891 * Makefile.in: Add stamp-h target.
16892 * configure.in: Create stamp-h.
16893 * configure: Regenerated.
16895 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16897 * inferiors.c: New file.
16898 * target.c: New file.
16899 * target.h: New file.
16900 * Makefile.in: Add target.o and inferiors.o. Update
16902 * linux-low.c (inferior_pid): New static variable,
16903 moved from server.c.
16904 (linux_create_inferior): Renamed from create_inferior.
16905 Call add_inferior. Return 0 on success instead of a PID.
16906 (linux_attach): Renamed from myattach.
16907 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
16908 (linux_thread_alive): Renamed from mythread_alive.
16909 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
16911 (linux_resume): Renamed from myresume. Add missing ``return 0''.
16912 (regsets_store_inferior_registers): Correct error message.
16913 Add missing ``return 0''.
16914 (linux_fetch_registers): Renamed from fetch_inferior_registers.
16915 (linux_store_registers): Renamed from store_inferior_registers.
16916 (linux_read_memory): Renamed from read_inferior_memory.
16917 (linux_write_memory): Renamed from write_inferior_memory.
16918 (linux_target_ops): New structure.
16919 (initialize_low): Call set_target_ops ().
16920 * remote-utils.c (unhexify): New function.
16921 (hexify): New function.
16922 (input_interrupt): Send signals to ``signal_pid''.
16923 * server.c (inferior_pid): Remove.
16924 (start_inferior): Update create_inferior call.
16925 (attach_inferior): Call add_inferior.
16926 (handle_query): New function.
16927 (main): Call handle_query for `q' packets.
16928 * server.h: Include "target.h". Remove obsolete prototypes.
16929 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16931 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16933 * Makefile.in: Add WARN_CFLAGS. Update configury
16935 * configure.in: Check for <string.h>
16936 * configure: Regenerate.
16937 * config.in: Regenerate.
16938 * gdbreplay.c: Include needed system headers.
16939 (remote_open): Remove strchr prototype.
16940 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16941 * regcache.c (supply_register): Change buf argument to const void *.
16942 (supply_register_by_name): Likewise.
16943 (collect_register): Change buf argument to void *.
16944 (collect_register_by_name): Likewise.
16945 * regcache.h: Add missing prototypes.
16946 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16947 * server.c (handle_query): New function.
16948 (attached): New static variable, moved out of main.
16949 (main): Quiet longjmp clobber warnings.
16950 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16951 * utils.c (error): Remove NORETURN.