1 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
3 * win32-low.c (win32_create_inferior): Set signal_pid.
5 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
6 Pedro Alves <palves@redhat.com>
8 Skip building gdbserver in a cross-configuration.
9 * configure.srv: Set $gdbserver_host depending on whether $target
10 is $host. Use $gdbserver_host instead of $host.
12 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
14 * configure: Re-generate.
16 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
18 * configure: Re-generate.
20 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
22 * acinclude.m4: Update warning.m4 path.
24 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
26 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
27 (handle_exception): Set siginfo_er.
28 (win32_xfer_siginfo): New function.
30 2020-02-07 Tom Tromey <tom@tromey.com>
31 Pedro Alves <palves@redhat.com>
33 * README: Update build documentation.
34 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
36 * configure.ac: Update paths.
38 * acinclude.m4: Update paths.
39 * Makefile.in: Update include paths.
40 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
41 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
42 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
43 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
44 (%-generated.c): Update paths.
45 * Move entire directory from ../gdb/gdbserver.
47 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
49 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
51 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
53 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
54 assignment instead of srv_linux_obj.
56 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
58 * server.c (handle_qxfer_libraries): Write segment-address with
61 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
63 * Makefile.in (install-strip): New target.
64 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
65 * aclocal.m4: Regenerate.
66 * configure: Regenerate.
67 * configure.ac: Add AM_PROG_INSTALL_STRIP.
69 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
71 * Makefile.in (SFILES): Adjust paths to point to real files.
72 (OBS): Move waitstatus.o to target/waitstatus.o.
73 (TAGS): Transform paths appropriately.
75 (nat/%.o): ... this pattern rule.
77 (target/%.o): ... this pattern rule.
78 * configure.srv: Adjust paths throughout to include nat/ prefix
79 with the revant files.
80 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
81 * configure: Regenerate.
83 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
85 * Makefile.in (TAGS): Remove config files from the recipe.
87 2020-01-14 Tom Tromey <tom@tromey.com>
90 * configure.ac: Remove any checks that were added to common.m4.
91 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
94 2020-01-14 Tom Tromey <tom@tromey.com>
96 * server.h: Include config.h.
97 * gdbreplay.c: Include config.h.
99 * configure.ac: Don't source common.host.
100 * acinclude.m4: Update path.
101 * Makefile.in (INCSUPPORT): New variable.
102 (INCLUDE_CFLAGS): Add INCSUPPORT.
103 (SFILES): Update paths.
104 (version-generated.c): Update path to create-version.sh.
105 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
107 2020-01-14 Tom Tromey <tom@tromey.com>
109 * configure.ac (LIBS): Use WIN32APILIBS.
110 (USE_WIN32API): Don't define.
111 * configure: Rebuild.
113 2020-01-14 Tom Tromey <tom@tromey.com>
115 * configure: Rebuild.
117 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
119 * Makefile.in (%-generated.c): Remove rule for files from
122 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
124 * configure: Re-generate.
126 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
128 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
130 * tracepoint.c (stop_tracing, flush_trace_buffer,
131 about_to_request_buffer_space, get_trace_state_variable_value,
132 set_trace_state_variable_value, gdb_collect): Add declaration.
134 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
136 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
137 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
138 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
139 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
140 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
143 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
145 * inferiors.c: Include gdbsupport/common-inferior.h.
147 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
149 * hostio-errno.c: Include hostio.h.
151 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
153 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
156 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
158 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
159 * linux-arm-tdesc.h: Include arch/arm.h.
161 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
163 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
165 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
167 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
168 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
170 2020-01-10 Pedro Alves <palves@redhat.com>
172 * fork-child.c (post_fork_inferior): Pass target down to
174 * inferiors.c (switch_to_thread): Add process_stratum_target
176 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
177 * nto-low.c (nto_target_ops): Now a process_stratum_target.
178 * linux-low.c (linux_target_ops): Now a process_stratum_target.
179 * remote-utils.c (prepare_resume_reply): Pass the target to
181 * target.c (the_target): Now a process_stratum_target.
182 (done_accessing_memory): Pass the target to switch_to_thread.
183 (set_target_ops): Ajust to use process_stratum_target.
184 * target.h (struct target_ops): Rename to ...
185 (struct process_stratum_target): ... this.
186 (the_target, set_target_ops): Adjust.
187 (prepare_to_access_memory): Adjust comment.
188 * win32-low.c (child_xfer_memory): Adjust to use
189 process_stratum_target.
190 (win32_target_ops): Now a process_stratum_target.
192 2020-01-06 Eli Zaretskii <eliz@gnu.org>
193 Pedro Alves <palves@redhat.com>
195 * win32-low.c (get_child_debug_event): Extract the fatal exception
196 from the exit status and convert to the equivalent Posix signal
198 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
199 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
201 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
203 * Makefile.in: Use INSTALL_PROGRAM_ENV.
205 2020-01-01 Joel Brobecker <brobecker@adacore.com>
207 * server.c (gdbserver_version): Change copyright year to 2020.
208 * gdbreplay.c (gdbreplay_version): Likewise.
210 2019-12-19 Christian Biesinger <cbiesinger@google.com>
212 * configure: Regenerate.
213 * configure.ac: Quote variable arguments of test.
215 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
217 * Makefile.in: Fix build with GNU Make 3.81
219 2019-12-16 Tom Tromey <tromey@adacore.com>
221 * server.c (get_exec_file): Constify result.
223 2019-12-10 Christian Biesinger <cbiesinger@google.com>
225 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
226 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
227 * config.in: Regenerate.
228 * configure: Regenerate.
229 * configure.ac: Don't check for strerror.
230 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
231 Call safe_strerror instead of strerror.
232 * server.h (strerror): Remove this now-unnecessary declaration.
233 * tracepoint.c (init_named_socket): Call safe_strerror instead of
235 (gdb_agent_helper_thread): Likewise.
236 * utils.c (perror_with_name): Likewise.
238 2019-11-26 Tom Tromey <tom@tromey.com>
240 * configure, config.in: Rebuild.
242 2019-11-26 Tom Tromey <tom@tromey.com>
244 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
245 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
247 * configure, config.in: Rebuild.
249 2019-11-26 Tom Tromey <tom@tromey.com>
251 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
252 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
253 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
254 * acinclude.m4: Include ax_pthread.m4.
255 * config.in, configure: Rebuild.
257 2019-11-26 Christian Biesinger <cbiesinger@google.com>
259 * debug.c (debug_set_output): Call safe_strerror instead of
261 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
262 (linux_kill_one_lwp): Likewise.
263 (linux_detach_one_lwp): Likewise.
264 (linux_wait_for_event_filtered): Likewise.
265 (store_register): Likewise.
266 * lynx-low.c (lynx_attach): Likewise.
267 * mem-break.c (insert_memory_breakpoint): Likewise.
268 (remove_memory_breakpoint): Likewise.
269 (delete_fast_tracepoint_jump): Likewise.
270 (set_fast_tracepoint_jump): Likewise.
271 (uninsert_fast_tracepoint_jumps_at): Likewise.
272 (reinsert_fast_tracepoint_jumps_at): Likewise.
273 * nto-low.c (nto_xfer_memory): Likewise.
274 (nto_resume): Likewise.
276 2019-11-20 Luis Machado <luis.machado@linaro.org>
278 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
279 instead of register count.
280 * tdesc.c (tdesc_contains_feature): New function.
281 * tdesc.h (tdesc_contains_feature): New prototype.
283 2019-11-15 Christian Biesinger <cbiesinger@google.com>
285 * Makefile.in: Add safe-strerror.c.
286 * configure: Regenerate.
287 * configure.ac: Don't source common.host.
289 2019-11-15 Christian Biesinger <cbiesinger@google.com>
291 * config.in: Regenerate.
292 * configure: Regenerate.
294 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
296 * ax.c (ax_printf): Handle size_t_arg.
298 2019-11-06 Christian Biesinger <cbiesinger@google.com>
300 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
301 * mi/mi-main.c (output_cores): Likewise.
302 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
303 (linux_xfer_osdata_modules): Likewise.
304 * remote.c (register_remote_support_xml): Likewise.
305 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
306 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
308 2019-11-01 Christian Biesinger <cbiesinger@google.com>
310 * configure: Regenerate.
311 * configure.ac: Remove check for strerror_r.
313 2019-10-31 Christian Biesinger <cbiesinger@google.com>
315 * config.in: Regenerate.
316 * configure: Regenerate.
317 * configure.ac: Also check for strerror_r.
319 2019-10-31 Christian Biesinger <cbiesinger@google.com>
321 * ax.h (debug_agent): Remove duplicate declaration.
323 2019-10-26 Tom de Vries <tdevries@suse.de>
325 * linux-aarch64-low.c: Fix typos in comments.
326 * linux-arm-low.c: Same.
328 * linux-ppc-low.c: Same.
329 * proc-service.c: Same.
332 * tracepoint.c: Same.
335 2019-10-25 Tom Tromey <tromey@adacore.com>
337 * utils.c (xstrdup): Remove.
339 2019-10-23 Tom Tromey <tom@tromey.com>
341 * configure, config.in: Rebuild.
343 2019-10-23 Tom Tromey <tom@tromey.com>
345 * configure: Rebuild.
346 * acinclude.m4: Use m4_include, not sinclude.
348 2019-10-17 Tom Tromey <tromey@adacore.com>
350 * configure: Rebuild.
351 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
352 in AC_CONFIG_FILES invocation.
353 * Makefile.in (stamp-h, Makefile): Use new-style config.status
356 2019-10-16 Christian Biesinger <cbiesinger@google.com>
358 * server.c: Include xml-builtin.h.
359 (get_xml_features): Don't declare xml_builtins here.
361 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
363 * Makefile.in: Remove references to vec-ipa.o.
365 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
367 * Makefile.in: Remove references to vec.c.
369 2019-10-02 Christian Biesinger <cbiesinger@google.com>
371 * server.c (server_waiting): Change to bool.
372 (extended_protocol): Likewise.
373 (response_needed): Likewise.
374 (exit_requested): Likewise.
375 (run_once): Likewise.
376 (report_no_resumed): Likewise.
377 (non_stop): Likewise.
378 (disable_packet_vCont): Likewise.
379 (disable_packet_Tthread): Likewise.
380 (disable_packet_qC): Likewise.
381 (disable_packet_qfThreadInfo): Likewise.
382 (handle_general_set): Update.
383 (handle_detach): Update.
384 (handle_monitor_command): Update.
385 (handle_query): Update.
386 (captured_main): Update.
387 (process_serial_event): Update.
388 * server.h (server_waiting): Change to bool.
389 (disable_packet_vCont): Likewise.
390 (disable_packet_Tthread): Likewise.
391 (disable_packet_qC): Likewise.
392 (disable_packet_qfThreadInfo): Likewise.
393 (run_once): Likewise.
394 (non_stop): Likewise.
395 * target.c (target_stop_and_wait): Update.
397 2019-10-02 Tom Tromey <tromey@adacore.com>
399 * Makefile.in (SFILES): Add common-inferior.c.
400 (OBS): Add common-inferior.o.
401 * server.c (startup_with_shell): Don't define.
403 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
405 * linux-low.c (linux_low_read_btrace): Update for change to
408 2019-09-20 Christian Biesinger <cbiesinger@google.com>
410 * debug.c (debug_threads): Remove comment in favor of the header.
411 * debug.h (using_threads): Add declaration.
412 (debug_threads): Add comment.
413 * linux-aarch64-low.c: Include debug.h and remove declaration of
415 * nto-low.c: Likewise.
416 * remote-utils.c: Likewise.
417 * thread-db.c: Likewise.
419 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
421 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
422 and powerpc-cell64l-ipa.o.
423 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
424 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
425 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
428 * spu-low.c: Remove file.
430 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
431 (parse_spufs_run): Remove.
432 (ppc_get_pc): Remove Cell/B.E. support.
433 (ppc_set_pc): Likewise.
434 (ppc_breakpoint_at): Likewise.
435 (ppc_arch_setup): Likewise.
436 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
437 tdesc_powerpc_cell32l.
438 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
439 or init_registers_powerpc_cell32l.
440 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
441 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
442 or init_registers_powerpc_cell32l.
443 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
444 (init_registers_powerpc_cell32l): Remove prototype.
445 (init_registers_powerpc_cell64l): Likewise.
447 * target.h (struct target_ops): Remove qxfer_spu member.
448 * server.c (handle_qxfer_spu): Remove.
449 (qxfer_packets): Remove entry for "spu".
450 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
451 * linux-low.c (SPUFS_MAGIC): Remove.
452 (spu_enumerate_spu_ids): Remove.
453 (linux_qxfer_spu): Remove.
454 (linux_target_ops): Remove qxfer_spu member.
455 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
456 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
457 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
459 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
461 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
462 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
463 * config.in: Regenerate.
464 * configure: Regenerate.
466 2019-08-15 Tom Tromey <tromey@adacore.com>
468 * target.c (target_write_memory): Use gdb::byte_vector.
470 2019-08-15 Tom Tromey <tromey@adacore.com>
472 * tracepoint.c (write_inferior_data_pointer)
473 (write_inferior_integer, write_inferior_int8)
474 (write_inferior_uinteger, m_tracepoint_action_download)
475 (r_tracepoint_action_download, x_tracepoint_action_download)
476 (l_tracepoint_action_download, clear_inferior_trace_buffer)
477 (download_agent_expr, download_tracepoint_1)
478 (download_trace_state_variables, upload_fast_traceframes): Update.
479 * server.c (gdb_write_memory): Update.
480 * remote-utils.c (relocate_instruction): Update.
481 * proc-service.c (ps_pdwrite): Update.
482 * mem-break.c (remove_memory_breakpoint)
483 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
484 (uninsert_fast_tracepoint_jumps_at)
485 (reinsert_fast_tracepoint_jumps_at): Update.
486 * linux-x86-low.c (append_insns)
487 (i386_install_fast_tracepoint_jump_pad)
488 (amd64_write_goto_address, i386_write_goto_address): Update.
489 * linux-s390-low.c (append_insns, s390_write_goto_address):
491 * linux-ppc-low.c (ppc_relocate_instruction)
492 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
493 (ppc_write_goto_address): Update.
494 * linux-aarch64-low.c (append_insns): Update.
495 * target.h (struct target_ops): Update.
496 (write_inferior_memory): Don't declare.
497 * target.c (target_write_memory): Rename from
498 write_inferior_memory. Remove old target_write_memory.
500 2019-08-15 Tom Tromey <tromey@adacore.com>
502 * target.c (write_inferior_memory): Use std::vector.
504 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
507 * configure.ac: Drop enable-libmcheck support.
508 * configure, config.in: Rebuild.
509 * acinclude.m4: Don't include it.
511 2019-07-19 Alan Hayward <alan.hayward@arm.com>
513 * configure.srv: Remove Arm xml files.
515 2019-07-19 Alan Hayward <alan.hayward@arm.com>
517 * configure.srv: Add new files. Remove xml generated files.
518 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
520 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
521 * linux-aarch32-tdesc.c: New file.
522 * linux-aarch32-tdesc.h: New file.
523 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
524 * linux-arm-low.c (init_registers_arm, tdesc_arm)
525 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
526 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
527 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
528 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
529 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
530 (arm_read_description): Call arm_linux_read_description.
531 (initialize_low_arch): Don't init registers.
532 * linux-arm-tdesc.c: New file.
533 * linux-arm-tdesc.h: New file.
535 2019-07-10 Alan Hayward <alan.hayward@arm.com>
537 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
538 Move counter inside for.
539 (arm_read_description): Check ptrace earlier.
540 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
542 2019-07-09 Tom Tromey <tom@tromey.com>
544 * configure: Rebuild.
545 * configure.ac: Change common to gdbsupport.
546 * acinclude.m4: Change common to gdbsupport.
547 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
548 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
549 common to gdbsupport.
550 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
551 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
552 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
553 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
554 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
555 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
556 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
557 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
558 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
559 common to gdbsupport.
561 2019-07-04 Alan Hayward <alan.hayward@arm.com>
563 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
565 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
567 2019-07-04 Alan Hayward <alan.hayward@arm.com>
569 * configure.srv: Remove legacy xml.
570 * linux-aarch64-low.c (initialize_low_arch): Remove
571 initialize_low_tdesc call.
572 * linux-aarch64-tdesc-selftest.c: Remove file.
573 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
574 * linux-x86-low.c (initialize_low_arch): Remove
575 initialize_low_tdesc call.
576 * linux-x86-tdesc-selftest.c: Remove file.
577 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
579 2019-06-20 Tom de Vries <tdevries@suse.de>
581 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
582 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
584 2019-06-19 Tom de Vries <tdevries@suse.de>
586 * debug.h (debug_write): Change return type to ssize_t.
587 * debug.c (debug_write): Same.
589 2019-06-14 Tom Tromey <tom@tromey.com>
591 * configure.ac: Use new path to gnulib.
592 * configure: Rebuild.
593 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
596 2019-06-11 Tom Tromey <tom@tromey.com>
598 * Makefile.in (SFILES): Add alloc.c.
600 (IPA_OBJS): Add alloc-ipa.o.
601 (alloc-ipa.o): New target.
602 (%.o: ../%.c): New pattern rule.
604 2019-06-10 Tom Tromey <tromey@adacore.com>
606 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
607 end warning with a newline.
608 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
610 * thread-db.c (attach_thread): Don't end warning with a newline.
611 (thread_db_notice_clone): Likewise.
612 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
614 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
615 end warning with a newline.
617 2019-06-04 Pedro Alves <palves@redhat.com>
619 * server.c (captured_main): Use make_unique_xstrdup.
621 2019-06-02 Tom Tromey <tom@tromey.com>
623 * gdbreplay.c (fromhex): Remove.
624 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
626 2019-05-29 Tom Tromey <tromey@adacore.com>
628 * configure: Rebuild.
630 2019-05-06 Kevin Buettner <kevinb@redhat.com>
632 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
633 sign extension code on 32-bit builds.
635 2019-05-03 Eli Zaretskii <eliz@gnu.org>
638 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
640 2019-04-19 Tom Tromey <tom@tromey.com>
642 * server.c (struct vstop_notif): Derive from notif_event.
644 (queue_stop_reply): Update.
645 (remove_all_on_match_ptid): Change type. Rewrite.
646 (discard_queued_stop_replies): Rewrite.
647 (in_queued_stop_replies_ptid): Change type.
648 (in_queued_stop_replies): Rewrite.
649 (notif_stop): Update.
650 (queue_stop_reply_callback): Update.
651 (captured_main): Don't call initialize_notif.
652 (push_stop_notification): Update.
653 * notif.c (notif_write_event, handle_notif_ack)
654 (notif_event_enque, notif_push): Update.
655 (notif_event_xfree, initialize_notif): Remove.
656 * notif.h (struct notif_event): Include <list>, not
658 (struct notif_server) <queue>: Now a std::list.
659 (notif_event_p): Remove typedef.
660 (initialize_notif): Don't declare.
661 (struct notif_event): Add virtual destructor.
663 2019-04-17 Alan Hayward <alan.hayward@arm.com>
665 * ax.c (ax_vdebug): Call debug_printf.
666 * debug.c (debug_write): New function.
667 * debug.h (debug_write): New declaration.
668 * linux-low.c (sigchld_handler): Call debug_write.
670 2019-04-17 Alan Hayward <alan.hayward@arm.com>
672 * debug.c (debug_set_output): New function.
673 (debug_vprintf): Send output to debug_file.
674 (debug_flush): Likewise.
675 * debug.h (debug_set_output): New declaration.
676 * server.c (handle_monitor_command): Add debug-file option.
677 (captured_main): Likewise.
679 2019-04-17 Alan Hayward <alan.hayward@arm.com>
681 * debug.c (remote_debug): Add definition.
682 * debug.h (remote_debug): Add declaration.
683 * hostio.c (remote_debug): Remove declaration.
684 * remote-utils.c (struct ui_file): Likewise.
685 (remote_debug): Likewise.
686 * remote-utils.h (remote_debug): Likewise,
687 * server.c (remote_debug): Remove definition.
689 2019-04-10 Kevin Buettner <kevinb@redhat.com>
691 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
692 when using a 64-bit gdbserver.
694 2019-04-09 Tom Tromey <tromey@adacore.com>
696 * linux-low.c (select_event_lwp): Use find_thread_in_random.
698 2019-04-08 Tom Tromey <tom@tromey.com>
700 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
702 (linux_resume_one_lwp): Likewise.
704 2019-04-08 Tom Tromey <tom@tromey.com>
706 * gdbreplay.c: Update.
707 * linux-low.c: Update.
710 2019-04-08 Tom Tromey <tom@tromey.com>
712 * server.c: Use C++ exception handling.
713 * linux-low.c: Use C++ exception handling.
714 * gdbreplay.c: Use C++ exception handling.
716 2019-04-08 Tom Tromey <tom@tromey.com>
718 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
719 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
720 (captured_main, main): Update.
721 * gdbreplay.c (main): Update.
723 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
725 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
726 value in argument pointer, return 1 if the entry is found and 0
727 otherwise. Move comment.
728 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
729 * linux-low.h (linux_get_auxv): Declare.
730 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
732 2019-04-05 Tom Tromey <tromey@adacore.com>
734 * server.c (gdbserver_usage): Use upper-case for metasyntactic
737 2019-03-28 Alan Hayward <alan.hayward@arm.com>
739 * linux-low.c (AT_HWCAP2): Add define if not already included.
741 2019-03-26 Alan Hayward <alan.hayward@arm.com>
743 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
744 (aarch64_arch_setup): Call linux_get_hwcap.
745 * linux-arm-low.c (arm_get_hwcap): Remove function.
746 (arm_read_description): Call linux_get_hwcap.
747 * linux-low.c (linux_get_auxv): New function.
748 (linux_get_hwcap): Likewise.
749 (linux_get_hwcap2): Likewise.
750 * linux-low.h (linux_get_hwcap): New declaration.
751 (linux_get_hwcap2): Likewise.
752 * linux-ppc-low.c (ppc_get_auxv): Remove function.
753 (ppc_arch_setup): Call linux_get_hwcap.
754 * linux-s390-low.c (s390_get_hwcap): Remove function.
755 (s390_arch_setup): Call linux_get_hwcap.
757 2019-03-22 Alan Hayward <alan.hayward@arm.com>
758 Jiong Wang <jiong.wang@arm.com>
760 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
761 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
763 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
765 2019-03-22 Alan Hayward <alan.hayward@arm.com>
766 Jiong Wang <jiong.wang@arm.com>
768 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
769 (aarch64_get_hwcap): New function.
770 (aarch64_arch_setup): Read APIA hwcap.
772 2019-03-22 Alan Hayward <alan.hayward@arm.com>
773 Jiong Wang <jiong.wang@arm.com>
775 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
776 (initialize_low_tracepoint): Likewise.
777 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
778 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
779 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
780 (aarch64_linux_read_description): Likewise.
781 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
783 2019-03-12 John Baldwin <jhb@FreeBSD.org>
785 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
786 i386_create_target_description for 'segments' parameter.
787 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
788 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
789 * win32-i386-low.c (i386_arch_setup): Likewise.
791 2019-03-12 Tom Tromey <tromey@adacore.com>
793 * linux-low.c (iterate_over_lwps): Update.
795 2019-03-06 Tom Tromey <tom@tromey.com>
797 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
798 (captured_main): Use SCOPE_EXIT.
800 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
802 * configure.srv: Use '$enable_unittest' instead of '$development'
803 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
806 2019-02-27 Tom Tromey <tromey@adacore.com>
808 * gdbreplay.c (logchar): Handle \r\n.
810 2019-02-07 Alan Hayward <alan.hayward@arm.com>
812 * linux-low.c (linux_attach): Add process before lwp.
813 * server.c (attach_inferior): Check if already attached.
815 2019-02-07 Tom Tromey <tom@tromey.com>
817 * x86-tdesc.h: Rename include guard.
818 * x86-low.h: Add include guard.
819 * wincecompat.h: Rename include guard.
820 * win32-low.h: Add include guard.
821 * utils.h: Rename include guard.
822 * tracepoint.h: Rename include guard.
823 * tdesc.h: Rename include guard.
824 * target.h: Rename include guard.
825 * server.h: Rename include guard.
826 * remote-utils.h: Rename include guard.
827 * regcache.h: Rename include guard.
828 * nto-low.h: Rename include guard.
829 * notif.h: Add include guard.
830 * mem-break.h: Rename include guard.
831 * lynx-low.h: Add include guard.
832 * linux-x86-tdesc.h: Add include guard.
833 * linux-s390-tdesc.h: Add include guard.
834 * linux-ppc-tdesc-init.h: Add include guard.
835 * linux-low.h: Add include guard.
836 * linux-aarch64-tdesc.h: Add include guard.
837 * linux-aarch32-low.h: Add include guard.
838 * inferiors.h: Rename include guard.
839 * i387-fp.h: Rename include guard.
840 * hostio.h: Rename include guard.
841 * gdbthread.h: Rename include guard.
842 * gdb_proc_service.h: Rename include guard.
843 * event-loop.h: Rename include guard.
844 * dll.h: Rename include guard.
845 * debug.h: Rename include guard.
846 * ax.h: Rename include guard.
848 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
851 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
852 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
854 2019-01-25 Tom Tromey <tom@tromey.com>
856 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
858 2019-01-25 Tom Tromey <tom@tromey.com>
860 * win32-low.c: Fix common/ includes.
861 * win32-i386-low.c: Fix common/ includes.
862 * tracepoint.c: Fix common/ includes.
863 * thread-db.c: Fix common/ includes.
864 * target.h: Fix common/ includes.
865 * symbol.c: Fix common/ includes.
866 * spu-low.c: Fix common/ includes.
867 * server.h: Fix common/ includes.
868 * server.c: Fix common/ includes.
869 * remote-utils.c: Fix common/ includes.
870 * regcache.h: Fix common/ includes.
871 * regcache.c: Fix common/ includes.
872 * nto-x86-low.c: Fix common/ includes.
873 * notif.h: Fix common/ includes.
874 * mem-break.h: Fix common/ includes.
875 * lynx-low.c: Fix common/ includes.
876 * lynx-i386-low.c: Fix common/ includes.
877 * linux-x86-tdesc-selftest.c: Fix common/ includes.
878 * linux-x86-low.c: Fix common/ includes.
879 * linux-low.c: Fix common/ includes.
880 * inferiors.h: Fix common/ includes.
881 * i387-fp.c: Fix common/ includes.
882 * hostio.c: Fix common/ includes.
883 * hostio-errno.c: Fix common/ includes.
884 * gdbthread.h: Fix common/ includes.
885 * gdbreplay.c: Fix common/ includes.
886 * fork-child.c: Fix common/ includes.
887 * event-loop.c: Fix common/ includes.
889 (enum gdb_agent_op): Fix common/ includes.
891 2019-01-21 Tom Tromey <tom@tromey.com>
893 * tracepoint.c: Fix includes.
894 * remote-utils.c: Fix includes.
895 * linux-x86-low.c: Fix includes.
897 2019-01-01 Joel Brobecker <brobecker@adacore.com>
899 * gdbreplay.c (gdbreplay_version): Update copyright year in
901 * server.c (gdbserver_version): Likewise.
903 2018-12-05 Alan Hayward <alan.hayward@arm.com>
905 * linux-low.c (add_lwp): Switch ordering.
907 2018-11-29 Tom Tromey <tom@tromey.com>
909 * win32-low.c (win32_join): Take pid, not process.
910 * target.h (struct target_ops) <join>: Change argument type.
911 (join_inferior): Change argument name.
912 * spu-low.c (spu_join): Take pid, not process.
913 * server.c (handle_detach): Preserve pid before destroying
915 * lynx-low.c (lynx_join): Take pid, not process.
916 * linux-low.c (linux_join): Take pid, not process.
918 2018-11-23 Alan Hayward <alan.hayward@arm.com>
920 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
921 (aarch64_cannot_fetch_register): Likewise.
922 (struct linux_target_ops): Update references.
924 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
926 * linux-ppc-low.c: Include nat/linux-ptrace.h.
928 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
930 * configure.srv (ipa_ppc_linux_regobj): Add
931 powerpc-isa207-htm-vsx32l-ipa.o and
932 powerpc-isa207-htm-vsx64l-ipa.o.
933 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
934 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
935 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
936 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
937 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
938 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
939 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
940 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
941 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
942 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
943 (init_registers_powerpc_isa207_htm_vsx32l)
944 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
945 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
946 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
947 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
948 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
949 (ppc_store_tm_ctarregset): New functions.
950 (ppc_regsets): Add entries for HTM regsets.
951 (ppc_arch_setup): Set htm in features struct when needed. Set
952 sizes for the HTM regsets.
953 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
954 (initialize_low_arch): Call
955 init_registers_powerpc_isa207_htm_vsx32l and
956 init_registers_powerpc_isa207_htm_vsx64l.
957 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
958 PPC_TDESC_ISA207_HTM_VSX.
959 (initialize_low_tracepoint): Call
960 init_registers_powerpc_isa207_htm_vsx32l and
961 init_registers_powerpc_isa207_htm_vsx64l.
963 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
965 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
966 rs6000/power-linux-pmu.xml to srv_xmlfiles.
967 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
968 (ppc_store_pmuregset): New functions.
969 (ppc_regsets): Add entries for ebb and pmu regsets.
970 (ppc_arch_setup): Set isa207 in features struct if the ebb and
971 pmu regsets are available. Set sizes for these regsets.
973 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
975 * configure.srv (ipa_ppc_linux_regobj): Add
976 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
977 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
978 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
979 rs6000/powerpc-isa207-vsx32l.xml, and
980 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
981 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
982 <PPC_TDESC_ISA207_VSX>: New enum value.
983 (init_registers_powerpc_isa207_vsx32l): Declare.
984 (init_registers_powerpc_isa207_vsx64l): Declare.
985 * linux-ppc-low.c (ppc_fill_tarregset): New function.
986 (ppc_store_tarregset): New function.
987 (ppc_regsets): Add entry for the TAR regset.
988 (ppc_arch_setup): Set isa207 in features struct when needed. Set
989 size for the TAR regsets.
990 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
991 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
992 and init_registers_powerpc_isa207_vsx64l.
993 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
994 (initialize_low_tracepoint): Call
995 init_registers_powerpc_isa207_vsx32l and
996 init_registers_powerpc_isa207_vsx64l.
998 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
999 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1001 * configure.srv (ipa_ppc_linux_regobj): Add
1002 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
1003 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1004 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1005 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1006 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1007 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1008 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1009 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1010 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1011 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1012 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1013 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1014 (ppc_hwcap): Add comment.
1015 (ppc_hwcap2): New global.
1016 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1017 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1018 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1019 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1020 when needed. Set sizes for the the DSCR and PPR regsets.
1021 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1022 (initialize_low_arch): Call
1023 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1024 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1025 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1026 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1027 (initialize_low_tracepoint): Call
1028 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1029 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1031 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1033 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1035 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1036 Simon Marchi <simark@simark.ca>
1038 * acinclude.m4: Include "../selftest.m4".
1039 * configure: Regenerate.
1040 * configure.ac: Use "GDB_AC_SELFTEST".
1041 * configure.srv: Use "$enable_unittests" instead of
1042 "$development" when checking whether unit tests have been
1044 * server.c (captured_main): Update message informing that
1045 selftests have been disabled.
1047 2018-10-04 Tom Tromey <tom@tromey.com>
1049 * configure: Rebuild.
1051 2018-10-04 Tom Tromey <tom@tromey.com>
1053 * server.c (handle_status): Rename inner "thread".
1054 (process_serial_event): Declare "res" in 'm' case.
1055 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1056 (iterate_over_lwps): Rename inner "thread".
1057 (linux_qxfer_libraries_svr4): Rename inner "len".
1058 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1060 2018-10-01 Gary Benson <gbenson@redhat.com>
1062 * gdb_proc_service.h: Moved common code to
1063 common/gdb_proc_service.h.
1065 2018-10-01 Gary Benson <gbenson@redhat.com>
1067 * gdb_proc_service.h: Synchronize comments and whitespace with
1068 GDB's version of this file.
1070 2018-09-25 Tom Tromey <tom@tromey.com>
1072 * configure: Rebuild.
1073 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1075 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1077 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1078 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1079 ($(IPA_LIB)): Sort IPA_OBJS.
1081 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1083 * Makefile.in: Remove references to $(ADD_DEPS).
1085 2018-09-16 Tom Tromey <tom@tromey.com>
1087 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1089 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1092 2018-09-05 Tom Tromey <tom@tromey.com>
1094 * configure: Rebuild.
1096 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1099 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1101 2018-08-27 Tom Tromey <tom@tromey.com>
1104 * configure: Rebuild.
1106 2018-08-27 Tom Tromey <tom@tromey.com>
1108 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1109 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1110 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1111 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1112 (s390x_emit_stack_adjust): Add casts to unsigned char.
1114 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1118 * server.h (struct client_state) <disable_randomization>:
1121 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1123 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1125 (mips_supply_ptrace_register): Likewise.
1127 2018-07-22 Tom Tromey <tom@tromey.com>
1129 * configure: Rebuild.
1131 2018-07-22 Tom Tromey <tom@tromey.com>
1133 * win32-low.c (win32_create_inferior): Remove unused variables.
1134 * gdbreplay.c (remote_open): Remove unused variable.
1135 * remote-utils.c (remote_prepare): Remove unused variable.
1136 * x86-tdesc.h (X86_TDESC_H): Define.
1137 (amd64_expedite_regs): Define conditionally.
1138 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1139 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1140 * remote-utils.c (readchar): Remove unused variable.
1142 2018-07-13 Pedro Alves <palves@redhat.com>
1144 * linux-low.c (linux_kill): Change parameter to process_info
1145 pointer instead of pid. Adjust.
1146 * lynx-low.c (lynx_kill): Likewise.
1147 * nto-low.c (nto_kill): Likewise.
1148 * spu-low.c (spu_kill): Likewise.
1149 * win32-low.c (win32_kill): Likewise.
1150 * server.c (handle_v_kill, kill_inferior_callback)
1151 (detach_or_kill_for_exit): Adjust.
1152 * target.c (kill_inferior): Change parameter to process_info
1153 pointer instead of pid. Adjust.
1154 * target.h (struct target_ops) <kill>: Change parameter to
1155 process_info pointer instead of pid. Adjust all implementations
1157 (kill_inferior): Likewise.
1159 2018-07-13 Pedro Alves <palves@redhat.com>
1161 * linux-low.c (linux_detach, linux_join): Change parameter to
1162 process_info pointer instead of pid. Adjust.
1163 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1164 * nto-low.c (nto_detach): Likewise.
1165 * spu-low.c (spu_detach, spu_join): Likewise.
1166 * win32-low.c (win32_detach, win32_join): Likewise.
1167 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1168 * target.h (struct target_ops) <detach, join>: Change parameter to
1169 process_info pointer instead of pid. Adjust all implementations
1171 (detach_inferior, join_inferior): Rename 'pid' parameter to
1174 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1175 Jan Kratochvil <jan.kratochvil@redhat.com>
1176 Paul Fertser <fercerpav@gmail.com>
1177 Tsutomu Seki <sekiriki@gmail.com>
1179 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1180 (OBS): Add 'common/netstuff.o'.
1181 (GDBREPLAY_OBS): Likewise.
1182 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1183 (remote_open): Implement support for IPv6
1185 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1187 (handle_accept_event): Accept connections from IPv6 sources.
1188 (remote_prepare): Handle IPv6-style hostnames; implement
1189 support for IPv6 connections.
1190 (remote_open): Implement support for printing connections from
1193 2018-07-11 Pedro Alves <palves@redhat.com>
1196 * mem-break.c (any_persistent_commands): Add process_info
1197 parameter and use it instead of relying on the current process.
1198 Change return type to bool.
1199 * mem-break.h (any_persistent_commands): Add process_info
1200 parameter and change return type to bool.
1201 * server.c (handle_detach): Remove require_running_or_return call.
1202 Look up the process_info for the process we're about to detach.
1203 If not found, return back error to GDB. Adjust
1204 any_persistent_commands call to pass down a process pointer.
1206 2018-07-11 Pedro Alves <palves@redhat.com>
1208 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1209 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1210 instead of collect_register_by_name.
1211 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1212 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1214 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1215 Pedro Alves <palves@redhat.com>
1217 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1219 2018-07-03 Tom Tromey <tom@tromey.com>
1221 * linux-low.c: Update.
1222 * lynx-low.c: Update.
1223 * mem-break.c: Update.
1224 * nto-low.c: Update.
1225 * remote-utils.c: Update.
1227 * spu-low.c: Update.
1229 * win32-low.c: Update.
1231 2018-07-03 Tom Tromey <tom@tromey.com>
1235 2018-07-03 Tom Tromey <tom@tromey.com>
1237 * linux-low.c: Update.
1239 2018-07-03 Tom Tromey <tom@tromey.com>
1243 2018-07-03 Tom Tromey <tom@tromey.com>
1245 * linux-low.c: Update.
1246 * linux-mips-low.c: Update.
1247 * lynx-low.c: Update.
1248 * nto-low.c: Update.
1249 * remote-utils.c: Update.
1251 * spu-low.c: Update.
1253 * thread-db.c: Update.
1255 2018-07-03 Tom Tromey <tom@tromey.com>
1257 * linux-low.c: Update.
1258 * linux-mips-low.c: Update.
1259 * lynx-low.c: Update.
1260 * mem-break.c: Update.
1261 * nto-low.c: Update.
1262 * remote-utils.c: Update.
1264 * spu-low.c: Update.
1266 * tracepoint.c: Update.
1268 2018-07-03 Tom Tromey <tom@tromey.com>
1270 * linux-low.c: Update.
1271 * linux-ppc-low.c: Update.
1272 * linux-x86-low.c: Update.
1273 * proc-service.c: Update.
1275 * spu-low.c: Update.
1276 * thread-db.c: Update.
1277 * win32-low.c: Update.
1279 2018-07-03 Tom Tromey <tom@tromey.com>
1281 * linux-low.c: Update.
1282 * lynx-low.c: Update.
1283 * nto-low.c: Update.
1284 * remote-utils.c: Update.
1285 * spu-low.c: Update.
1286 * thread-db.c: Update.
1287 * win32-low.c: Update.
1289 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1291 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1292 parameter in call to 'amd64_create_target_description'.
1294 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1296 * x86-tdesc.h: Remove executable permission flag.
1298 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1300 * configure.ac: Remove AC_PREREQ, add missing quoting.
1301 * configure: Re-generate.
1302 * config.in: Re-generate.
1303 * aclocal.m4: Re-generate.
1305 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1307 * tracepoint.h (current_traceframe): Remove declaration.
1309 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1311 * linux-aarch64-low.c (is_sve_tdesc): New function.
1312 (aarch64_sve_regs_copy_to_regcache): Likewise.
1313 (aarch64_sve_regs_copy_from_regcache): Likewise.
1314 (aarch64_regs_info): Add SVE checks.
1315 (initialize_low_arch): Initialize SVE.
1317 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1319 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1321 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1323 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1324 (initialize_low_tracepoint): Likewise
1325 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1326 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1328 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1330 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1332 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1334 * server.h (PBUFSIZ): Increase size
1336 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1338 * regcache.c (regcache::raw_compare): New function.
1339 * regcache.h (regcache::raw_compare): New declaration.
1341 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1343 * regcache.c (new_register_cache): Use new.
1344 (free_register_cache): Use delete.
1345 (register_data): Use const.
1346 (supply_register): Move body inside regcache.
1347 (regcache::raw_supply): New override function.
1348 (collect_register): Move body inside regcache.
1349 (regcache::raw_collect): New override function.
1350 (regcache::get_register_status): New override function.
1351 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1353 2018-06-09 Tom Tromey <tom@tromey.com>
1355 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1357 (event_queue): Use std::queue.
1358 (gdb_event_xfree): Remove.
1359 (initialize_event_loop, process_event, wait_for_event): Update.
1361 2018-06-08 Stan Cox <scox@redhat.com>
1363 * win32-low.c (win32_create_inferior): last_ptid and last_status
1364 moved to client_state.
1366 2018-06-08 Pedro Alves <palves@redhat.com>
1368 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1369 common/common-exceptions.o, common/common-utils.o,
1370 common/errors.o, common/print-utils.o and utils.o.
1371 * gdbreplay.c: Include "common-defs.h" instead of the two
1372 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1373 string.h or alloca.h.
1374 (perror_with_name): Delete.
1375 (remote_open): Use xstrdup instead of strdup.
1376 (main): Rename to ...
1377 (captured_main): ... this.
1380 2018-06-08 Tom Tromey <tom@tromey.com>
1382 * linux-low.c (linux_low_read_btrace): Update.
1384 2018-06-04 Stan Cox <scox@redhat.com>
1386 * server.h (struct client_state): New.
1387 * server.c (cont_thread, general_thread, multi_process)
1388 (report_fork_events, report_vfork_events, report_exec_events)
1389 (report_thread_events, swbreak_feature, hwbreak_feature)
1390 (vCont_supported, disable_randomization, pass_signals)
1391 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1392 Moved to client_state.
1393 * remote-utils.c (remote_debug, noack_mode)
1394 (transport_is_reliable): Moved to client_state.
1395 * tracepoint.c (current_traceframe): Moved to client_state.
1398 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1399 linux-low.c, remote-utils.h, target.c: Use client_state.
1401 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1403 * configure.srv: Add new c/h file.
1405 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1407 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1410 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1412 * gdb.arch/mips-fpregset-core.exp: New test.
1413 * gdb.arch/mips-fpregset-core.c: New test source.
1415 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1418 * hostio.c (require_int): Do not report overflow for integers
1419 between 0xfffffff and 0x7fffffff.
1421 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1423 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1424 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1425 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1427 (the_low_target): Wire them.
1429 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1431 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1432 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1433 mode. Call collect_register_by_name with vscr using
1434 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1435 (ppc_store_vrregset): Add and set vscr_offset variable as in
1436 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1439 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1441 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1442 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1443 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1445 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1447 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1448 (ppc_store_vsxregset): Likewise.
1449 (ppc_fill_vrregset): Likewise.
1450 (ppc_store_vrregset): Likewise.
1451 (ppc_fill_evrregset): Likewise.
1452 (ppc_store_evrregset): Likewise.
1453 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1454 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1457 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1459 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1460 wordsize of the inferior. Call ppc_linux_target_wordsize.
1462 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1464 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1465 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1466 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1467 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1468 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1469 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1470 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1471 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1472 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1473 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1474 (tdesc_powerpc_e500l): Remove.
1475 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1476 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1477 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1478 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1480 (ppc_arch_setup): Remove target description matching code. Fill a
1481 ppc_linux_features struct and call ppc_linux_match_description
1484 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1486 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1487 width of the requested register exceeds the width of the
1489 (mips_cannot_store_register): Likewise.
1491 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1493 * linux-mips-low.c (mips_fetch_register): New function. Update
1495 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1496 (the_low_target): Wire `mips_fetch_register'.
1498 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1500 * lynx-i386-low.c (LYNXOS_178): New macro.
1501 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1502 the layout on LynxOS-178.
1503 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1504 handle floating point registers that are not supported by
1507 2018-05-10 Tom Tromey <tom@tromey.com>
1509 * configure: Rebuild.
1511 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1514 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1515 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1516 Use it to set the expedite_regs field in the given tdesc.
1517 * x86-tdesc.h: New file.
1518 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1519 Adjust following the addition of the new expedite_regs parameter
1520 to init_target_desc.
1521 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1522 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1523 (i386_linux_read_description, amd64_linux_read_description):
1524 Adjust following the addition of the new expedite_regs parameter
1525 to init_target_desc.
1526 * lynx-i386-low.c: #include "x86-tdesc.h".
1527 (lynx_i386_arch_setup): Adjust following the addition of the new
1528 expedite_regs parameter to init_target_desc.
1529 * nto-x86-low.c: #include "x86-tdesc.h".
1530 (nto_x86_arch_setup): Adjust following the addition of the new
1531 expedite_regs parameter to init_target_desc.
1532 * win32-i386-low.c: #include "x86-tdesc.h".
1533 (i386_arch_setup): Adjust following the addition of the new
1534 expedite_regs parameter to init_target_desc.
1536 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1539 * win32-low.c (win32_create_inferior): Add call to my_wait
1540 setting last_status global.
1542 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1545 * win32-low.c (create_process): Only call gdb_tilde_expand if
1546 inferior_cwd is not NULL.
1548 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1550 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1551 registers to the cache if their values have changed.
1552 (i387_xsave_to_cache): Provide default values for x87 control
1553 registers when these features are available, but disabled.
1554 * regcache.c (supply_register_by_name_zeroed): New function.
1555 * regcache.h (supply_register_by_name_zeroed): Declare new
1558 2018-05-07 Tom Tromey <tom@tromey.com>
1560 * configure: Rebuild.
1562 2018-05-04 Tom Tromey <tom@tromey.com>
1564 * configure: Rebuild.
1566 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1567 Pedro Alves <palves@redhat.com>
1569 * linux-aarch64-low.c (aarch64_stopped_data_address):
1572 2018-04-27 Tom Tromey <tom@tromey.com>
1574 * configure: Rebuild.
1576 2018-04-23 Tom Tromey <tom@tromey.com>
1578 * configure: Rebuild.
1580 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1582 * Makefile.in (depcomp): Add "..".
1583 (all_deps_files): New and use it.
1585 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1587 * configure.srv (aarch64*-*-linux*): Don't include xml.
1588 (i[34567]86-*-cygwin*): Likewise.
1589 (i[34567]86-*-linux*): Likewise.
1590 (i[34567]86-*-lynxos*): Likewise.
1591 (i[34567]86-*-mingw32ce*): Likewise.
1592 (i[34567]86-*-mingw*): Likewise.
1593 (i[34567]86-*-nto*): Likewise.
1594 (tic6x-*-uclinux): Likewise.
1595 (x86_64-*-linux*): Likewise.
1596 (x86_64-*-mingw*): Likewise.
1597 (x86_64-*-cygwin*): Likewise.
1599 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1601 * tdesc.c: Remove xml parameter.
1603 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1605 * server.c (get_features_xml): Remove cast.
1606 * tdesc.c (void target_desc::accept): Fill in function.
1607 (tdesc_get_features_xml): Remove old xml creation.
1608 (print_xml_feature::visit_pre): Add xml vistor.
1609 * tdesc.h (struct target_desc): Make xmltarget mutable.
1610 (tdesc_get_features_xml): Remove declaration.
1612 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1614 * tdesc.c (tdesc_architecture_name): Add new function.
1615 (tdesc_osabi_name): Likewise.
1616 (tdesc_get_features_xml): Use new functions.
1618 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1620 * tdesc.c (tdesc_create_flags): Remove.
1621 (tdesc_add_flag): Likewise.
1622 (tdesc_named_type): Likewise.
1623 (tdesc_create_union): Likewise.
1624 (tdesc_create_struct): Likewise.
1625 (tdesc_create_vector): Likewise.
1626 (tdesc_add_bitfield): Likewise.
1627 (tdesc_add_field): Likewise.
1628 (tdesc_set_struct_size): Likewise.
1630 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1632 * tdesc.c (~target_desc): Remove implictly deleted items.
1633 (init_target_desc): Iterate all features.
1634 (tdesc_get_features_xml): Use vector.
1635 (tdesc_create_feature): Create feature.
1636 * tdesc.h (tdesc_feature) Remove
1637 (target_desc): Add features.
1639 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1641 * Makefile.in: Add common/tdesc.c
1642 * tdesc.c (init_target_desc): init all reg_defs from register
1644 (tdesc_create_reg): Create tdesc_reg.
1645 * tdesc.h (tdesc_feature): Add register vector.
1647 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1649 * tdesc.h (struct target_desc) <features>: Change type to
1650 std::vector<std::string>.
1651 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1653 (tdesc_get_features_xml): Likewise.
1654 (tdesc_create_feature): Likewise.
1656 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1658 * regcache.c (find_register_by_number): Return a ref.
1659 (find_regno): Use references.
1660 (register_size): Likewise.
1661 (register_data): Likewise.
1662 * tdesc.c (target_desc::~target_desc): Remove free calls.
1663 (target_desc::operator==): Use std::vector compare.
1664 (init_target_desc): Use reference.
1665 (tdesc_create_reg): Use reg constructors.
1666 * tdesc.h (struct target_desc): Replace pointer with object.
1668 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1670 * regcache.c (find_register_by_number): Make static.
1671 (find_regno): Use find_register_by_number
1672 * regcache.h (struct reg): Remove declaration.
1674 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1676 * tdesc.c (target_desc::~target_desc): Move to here.
1677 (target_desc::operator==): Likewise.
1678 * tdesc.h (target_desc::~target_desc): Move from here.
1679 (target_desc::operator==): Likewise.
1681 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1683 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1685 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1687 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1689 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1690 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1691 and init_registers_s390_gs_linux64.
1693 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1695 * linux-s390-low.c (s390_fill_gs): Remove function.
1696 (s390_fill_gsbc): Remove function.
1697 (s390_regsets): Set fill functions for the guarded storage regsets
1700 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1702 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1703 the word size. Add comment.
1704 (s390_get_wordsize): New function.
1705 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1706 pswm with it. Instead, use s390_get_wordsize to determine the
1707 word size first and derive the correct tdesc from that directly.
1709 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1711 * Makefile.in: Include silent-rules.mk.
1712 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1713 (COMPILE): Add ECHO_CXX.
1714 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1715 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1716 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1717 (version-generated.c): Add ECHO_GEN.
1718 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1719 (IPAGENT_COMPILE): Add ECHO_CXX.
1720 (%-generated.c): Add ECHO_REGDAT.
1722 2018-03-14 Tom Tromey <tom@tromey.com>
1725 * ax.c (ax_printf): Special case for NULL.
1727 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1729 * linux-low.c (linux_qxfer_libraries_svr4): Use
1730 xml_escape_text_append.
1732 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1734 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1736 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1738 * server.c (handle_general_set): Remove unnecessary xstrdup.
1740 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1742 * server.c (parse_debug_format_options): Adjust to
1743 delim_string_to_char_ptr_vec changes.
1744 * thread-db.c (thread_db_load_search): Adjust to
1745 dirnames_to_char_ptr_vec changes.
1747 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1749 * target.h (target_enable_btrace, target_disable_btrace)
1750 (target_read_btrace, target_read_btrace_conf): Turn macro into
1751 inline function. Throw error if target method is not defined.
1752 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1753 check for btrace target method. Be prepared to handle exceptions
1754 from btrace target methods.
1756 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1758 * server.c (captured_main): Change order of error message printed
1759 when the current working directory cannot be found.
1761 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1763 * server.c: Include "filenames.h" and "pathstuff.h".
1764 (program_name): Delete variable.
1765 (program_path): New anonymous class.
1766 (get_exec_wrapper): Use "program_path" instead of
1768 (handle_v_run): Likewise.
1769 (captured_main): Likewise.
1770 (process_serial_event): Likewise.
1772 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1774 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1775 (OBJS): Add "pathstuff.o".
1776 * server.c (current_directory): New global variable.
1777 (captured_main): Initialize "current_directory".
1779 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1781 * tdesc.c: Use common/tdesc.h.
1782 * tdesc.h: Likewise.
1784 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1785 Simon Marchi <simon.marchi@ericsson.com>
1787 * Makefile.in: Switch order of make rules.
1789 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1791 * Makefile.in: Add common directory in build.
1792 * configure.ac: Add common reference.
1793 * configure: Regenerate.
1795 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1797 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1798 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1799 * spu-low.c (spu_target_ops): Likewise.
1800 * win32-low.c (win32_target_ops): Likewise.
1801 * server.c (supported_btrace_packets): Report packets unconditionally.
1802 * target.h (target_ops) <supports_btrace>: Remove.
1803 (target_supports_btrace): Remove.
1805 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1807 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1808 (handle_btrace_disable): Change return type to void. Use exceptions
1810 (handle_btrace_general_set): Catch exception and copy message to
1813 2018-02-08 Tom Tromey <tom@tromey.com>
1815 * linux-low.c (install_software_single_step_breakpoints): Use
1816 make_scoped_restore.
1817 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1818 (do_restore_current_thread_cleanup): Remove.
1819 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1822 2018-02-08 Tom Tromey <tom@tromey.com>
1824 * mem-break.c (set_raw_breakpoint_at): Use
1825 gdb::unique_xmalloc_ptr.
1827 2018-01-30 Pedro Alves <palves@redhat.com>
1830 * target.c (target_terminal::terminal_state): Rename to ...
1831 (target_terminal::m_terminal_state): ... this.
1833 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1835 * linux-low.c (handle_extended_wait): Surround call to
1836 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1838 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1840 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1841 linux_ptrace_attach_fail_reason_string now returning an
1843 (linux_attach): Likewise.
1844 * thread-db.c (attach_thread): Likewise.
1846 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1849 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1850 checking for fs_base/gs_base fields in struct user_regs_struct.
1851 * configure: Regenerate.
1853 2018-01-16 Yao Qi <yao.qi@linaro.org>
1856 * linux-low.c (fetch_register): Call supply_register instead of
1859 2018-01-08 Yao Qi <yao.qi@linaro.org>
1860 Simon Marchi <simon.marchi@ericsson.com>
1862 * Makefile.in (OBS): Remove selftest.o.
1863 * configure.ac: Set srv_selftest_objs if $development is true.
1864 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1865 * configure: Re-generated.
1866 * server.c (captured_main): Wrap variable selftest_filter with
1869 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1871 * server.c (parse_debug_format_options): Return std::string.
1872 (handle_monitor_command, captured_main): Adjust.
1874 2018-01-05 Pedro Alves <palves@redhat.com>
1877 * server.c (captured_main): Pass quiet=false to
1878 save_original_signals_state.
1880 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1882 * gdbreplay.c (gdbreplay_version): Update copyright year in
1884 * server.c (gdbserver_version): Likewise.
1886 2017-12-08 Tom Tromey <tom@tromey.com>
1888 * ax.c (ax_printf): Update.
1890 2017-12-07 Yao Qi <yao.qi@linaro.org>
1892 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1893 aarch64_linux_read_description.
1894 * linux-amd64-ipa.c (idx2mask): New array.
1895 (get_ipa_tdesc): Move idx2mask out.
1896 (initialize_low_tracepoint): Initialize target descriptions.
1897 * linux-i386-ipa.c (idx2mask): New array.
1898 (get_ipa_tdesc): Move idx2mask out.
1899 (initialize_low_tracepoint): Initialize target descriptions.
1901 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1903 * tdesc.c (struct tdesc_type): Change return type.
1904 (tdesc_add_flag): Change parameter type.
1905 (tdesc_add_bitfield): Likewise.
1906 (tdesc_add_field): Likewise.
1907 (tdesc_set_struct_size): Likewise.
1909 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1911 * regcache.c (registers_to_string): Remove unused variable.
1913 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1915 * inferiors.c (for_each_inferior_with_data): Remove.
1916 * inferiors.h (for_each_inferior_with_data): Remove.
1917 * server.c (handle_qxfer_threads_worker): Change parameter type.
1918 (handle_qxfer_threads_proper): Use for_each_thread.
1920 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1922 * inferiors.c (for_each_inferior): Remove.
1923 (clear_inferiors): Use for_each_thread.
1924 * inferiors.h (for_each_inferior): Remove.
1925 * linux-low.c (linux_wait_for_event_filtered): Use
1927 (linux_stabilize_threads): Likewise.
1928 * regcache.c (regcache_release): Likewise.
1929 * server.c (gdb_wants_all_threads_stopped): Likewise.
1930 (clear_pending_status_callback): Remove.
1931 (handle_status): Use for_each_thread.
1932 (captured_main): Likewise.
1933 * win32-low.c (child_init_thread_list): Likewise.
1934 (win32_clear_inferiors): Likewise.
1935 (fake_breakpoint_event): Likewise.
1937 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1939 * inferiors.h (find_inferior): Remove.
1940 * inferiors.c (find_inferior): Remove.
1942 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1944 * linux-low.c (resume_status_pending_p): Update comment.
1945 (need_step_over_p): Update comment.
1947 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1949 * linux-low.c (proceed_one_lwp): Return void, change parameter
1951 (unsuspend_and_proceed_one_lwp): Likewise.
1952 (proceed_all_lwps): Use for_each_thread.
1953 (unstop_all_lwps): Likewise.
1955 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1957 * linux-low.c (linux_resume_one_thread): Return void, take
1959 (linux_resume): Use for_each_thread.
1961 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1963 * linux-low.c (send_sigstop_callback): Return void, change
1964 parameter type. Rename to...
1965 (send_sigstop): ... this.
1966 (suspend_and_send_sigstop_callback): Return void, change parameter
1968 (suspend_and_send_sigstop): ... this.
1969 (stop_all_lwps): Use for_each_thread.
1971 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1973 * linux-low.c (lwp_running): Return bool, remove unused
1975 (linux_stabilize_threads): Use find_thread.
1977 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1979 * linux-low.c (select_singlestep_lwp_callback): Remove.
1980 (count_events_callback): Remove.
1981 (select_event_lwp_callback): Remove.
1982 (select_event_lwp): Use find_thread/for_each_thread.
1984 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1986 * linux-low.c (not_stopped_callback): Return bool, take filter
1988 (linux_wait_for_event_filtered): Use find_thread.
1989 (linux_wait_1): Likewise.
1991 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1993 * linux-low.c (same_lwp): Remove.
1994 (find_lwp_pid): Use find_thread.
1996 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1998 * linux-low.c (delete_lwp_callback): Remove.
1999 (linux_mourn): Use for_each_thread.
2001 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2003 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2004 args parameter, don't check for pid.
2005 (linux_detach): Use for_each_thread.
2007 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2009 * linux-low.c (struct counter): Remove.
2010 (second_thread_of_pid_p): Remove.
2011 (last_thread_of_process_p): Use find_thread.
2013 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2015 * inferiors.c (find_inferior_in_random): Remove.
2016 * inferiors.h (find_inferior_in_random): Remove.
2017 * linux-low.c (status_pending_p_callback): Return bool, accept
2018 parameter ptid directly.
2019 (linux_wait_for_event_filtered): Use find_thread_in_random.
2020 (linux_wait_1): Likewise.
2022 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2024 * inferiors.c (find_inferior_id): Remove.
2025 (find_thread_ptid): Move implemention from find_inferior_id to
2027 * inferiors.h (find_inferior_id): Remove.
2028 * server.c (handle_status): Use find_thread_ptid.
2029 (process_serial_event): Likewise.
2030 * thread-db.c (find_one_thread): Likewise.
2031 (thread_db_thread_handle): Likewise.
2032 * win32-low.c (thread_rec): Likewise.
2033 (child_delete_thread): Likewise.
2034 (win32_thread_alive): Likewise.
2035 (get_child_debug_event): Likewise.
2037 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2039 * linux-mips-low.c (update_watch_registers_callback): Return
2040 void, remove pid_p parameter, don't check for pid.
2041 (mips_insert_point, mips_remove_point): Use for_each_thread.
2043 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2045 * lynx.low (lynx_delete_thread_callback): Remove.
2046 (lynx_mourn): Use for_each_thread.
2048 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2050 * regcache.c (regcache_invalidate_one): Remove.
2051 (regcache_invalidate_pid): use for_each_thread.
2053 2017-11-26 Tom Tromey <tom@tromey.com>
2055 * linux-low.c (linux_create_inferior): Update.
2057 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2059 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2061 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2063 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2064 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2065 * linux-aarch64-tdesc-selftest.c: New file.
2066 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2068 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2070 * configure.srv: Add new file.
2071 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2072 * linux-aarch64-tdesc-selftest.c: New file.
2073 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2075 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2077 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2078 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2079 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2081 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2083 * configure.srv: Add new files.
2084 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2085 aarch64_linux_read_description.
2086 * linux-aarch64-low.c (aarch64_linux_read_description):
2087 Merge with aarch64_arch_setup.
2088 (aarch64_arch_setup): Call aarch64_linux_read_description.
2089 * linux-aarch64-tdesc.c: New file.
2090 * linux-aarch64-tdesc.h: New file.
2092 2017-11-24 Yao Qi <yao.qi@linaro.org>
2094 * configure.srv: Set $srv_regobj for tic6x-linux.
2095 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2096 (tic6x_read_description): Move some code to tic6x_arch_setup.
2097 (tic6x_tdesc_test): New function.
2098 (initialize_low_arch): Call selftests::register_test.
2100 2017-11-22 Yao Qi <yao.qi@linaro.org>
2102 * remote-utils.c (prepare_resume_reply): Use memcpy.
2104 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2106 * linux-low.c (kill_one_lwp_callback): Return void, take
2107 argument directly, don't filter on pid.
2108 (linux_kill): Use for_each_thread.
2110 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2112 * linux-low.c (need_step_over_p): Return bool, remove dummy
2114 (linux_resume, proceed_all_lwps): Use find_thread.
2116 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2118 * linux-low.c (resume_status_pending_p): Return bool, remove
2120 (linux_resume): Use find_thread.
2122 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2124 * linux-low.c (struct thread_resume_array): Remove.
2125 (linux_set_resume_request): Return void, take arguments
2127 (linux_resume): Use for_each_thread.
2129 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2131 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2132 return bool, remove data argument.
2133 (linux_stabilize_threads): Use find_thread.
2135 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2137 * linux-low.c (unsuspend_one_lwp): Remove.
2138 (unsuspend_all_lwps): Use for_each_thread, inline code from
2141 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2143 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2144 * linux-low.c (struct iterate_over_lwps_args): Remove.
2145 (iterate_over_lwps_filter): Remove.
2146 (iterate_over_lwps): Use find_thread.
2148 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2150 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2151 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2152 code from reset_lwp_ptrace_options_callback.
2154 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2156 * linux-arm-low.c (struct update_registers_data): Remove.
2157 (update_registers_callback): Return void, take arguments
2158 directly, don't check thread's pid.
2159 (arm_insert_point, arm_remove_point): Use for_each_thread.
2161 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2163 * win32-low.c (continue_one_thread): Return void, take argument
2165 (child_continue): Use for_each_thread.
2167 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2169 * win32-i386-low.c (update_debug_registers_callback): Rename
2171 (update_debug_registers): ... this, return void, remove pid_p arg.
2172 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2174 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2176 * inferiors.h (struct process_info): Add constructor, initialize
2178 <syscalls_to_catch>: Change type to std::vector<int>.
2179 * inferiors.c (add_process): Allocate process_info with new.
2180 (remove_process): Free process_info with delete.
2181 * linux-low.c (handle_extended_wait): Adjust.
2182 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2183 * server.c (handle_general_set): Adjust.
2185 2017-11-16 Pedro Alves <palves@redhat.com>
2187 * remote-utils.c (remote_close): Block SIGIO signals instead of
2188 uninstalling the SIGIO handler.
2190 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2192 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2194 2017-11-16 Yao Qi <yao.qi@linaro.org>
2196 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2197 (tic6x_store_gregset): Likewise.
2198 (tic6x_usrregs_info): Move it up.
2200 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2202 * Makefile.in: Update arch rules.
2203 * configure.srv: Explicitly mark arch/ files.
2205 2017-11-13 Andreas Schwab <schwab@suse.de>
2207 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2209 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2211 2017-11-06 Pedro Alves <palves@redhat.com>
2213 * config.in, configure: Regenerate.
2215 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2217 * target.c (struct thread_search): Remove.
2218 (thread_search_callback): Remove.
2219 (prepare_to_access_memory): Use for_each_thread instead of
2220 find_inferior. Inline code from thread_search_callback.
2222 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2224 * server.c (struct visit_actioned_threads_data): Remove.
2225 (visit_actioned_threads): Change prototype to take arguments
2227 (resume): Use find_thread instead of find_inferior.
2229 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2231 * server.c (queue_stop_reply_callback): Change prototype, return
2233 (find_status_pending_thread_callback): Remove.
2234 (handle_status): Replace find_inferior with find_thread and
2237 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2239 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2241 (aarch64_store_gregset): Likewise.
2242 (aarch64_fill_fpregset): Likewise.
2243 (aarch64_store_fpregset): Likewise.
2245 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2247 * gdbthread.h (find_thread, for_each_thread): New functions.
2248 * inferiors.c (thread_of_pid): Remove.
2249 (find_any_thread_of_pid): Use find_thread.
2250 * linux-low.c (num_lwps): Use for_each_thread.
2252 2017-10-17 Yao Qi <yao.qi@linaro.org>
2254 * Makefile.in: Remove one rule.
2255 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2257 2017-10-17 Yao Qi <yao.qi@linaro.org>
2259 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2260 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2262 2017-10-17 Yao Qi <yao.qi@linaro.org>
2264 * configure.srv: Rename arm.o with arch/arm.o.
2266 2017-10-17 Yao Qi <yao.qi@linaro.org>
2268 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2269 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2270 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2271 (arch-i386.o, arch-amd64.o): Remove rules.
2272 (arch/%.o): New rule.
2273 Update POSTCOMPILE and COMPILE.pre.
2274 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2275 * configure: Re-generated.
2276 * configure.srv: Replace arch-i386.o with arch/i386.o.
2277 Replace arch-amd64.o with arch/amd64.o.
2279 2017-10-16 Yao Qi <yao.qi@linaro.org>
2281 * configure: Regenerated.
2283 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2285 * inferiors.h: (struct inferior_list): Remove.
2286 (struct inferior_list_entry); Remove.
2287 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2288 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2289 get_first_inferior): Remove.
2290 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2291 find_inferior_id, find_inferior_in_random): Change signature.
2292 * inferiors.c (all_threads): Change type to
2293 std::list<thread_info *>.
2294 (get_thread): Remove macro.
2295 (find_inferior, find_inferior_id): Change signature, implement
2297 (find_inferior_in_random): Change signature, implement using
2298 find_thread_in_random.
2299 (for_each_inferior, for_each_inferior_with_data): Change
2300 signature, implement using for_each_thread.
2301 (add_inferior_to_list, remove_inferior): Remove.
2302 (add_thread, get_first_thread, thread_of_pid,
2303 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2304 (get_first_inferior, one_inferior_p, clear_inferior_list):
2306 (clear_inferiors, get_thread_process): Update.
2307 * gdbthread.h: Include <list>.
2308 (struct thread_info) <entry>: Remove field.
2310 (all_threads): Change type to std::list<thread_info *>.
2311 (get_first_inferior): Add doc.
2312 (find_thread, for_each_thread, find_thread_in_random): New
2314 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2315 * linux-arm-low.c (update_registers_callback): Update.
2316 * linux-low.c (second_thread_of_pid_p): Update.
2317 (kill_one_lwp_callback, linux_detach_lwp_callback,
2318 delete_lwp_callback, status_pending_p_callback, same_lwp,
2319 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2320 iterate_over_lwps, not_stopped_callback,
2321 resume_stopped_resumed_lwps, count_events_callback,
2322 select_singlestep_lwp_callback, select_event_lwp_callback,
2323 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2324 suspend_and_send_sigstop_callback, wait_for_sigstop,
2325 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2326 lwp_running, linux_set_resume_request, resume_status_pending_p,
2327 need_step_over_p, start_step_over, linux_resume_one_thread,
2328 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2329 reset_lwp_ptrace_options_callback): Update.
2330 * linux-mips-low.c (update_watch_registers_callback): Update.
2331 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2333 (free_register_cache_thread_one): Remove.
2334 (regcache_release): Update.
2335 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2336 handle_qxfer_threads_worker): Update.
2337 (handle_query): Update, use list iterator.
2338 (visit_actioned_threads, handle_pending_status,
2339 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2340 clear_pending_status_callback, set_pending_status_callback,
2341 find_status_pending_thread_callback, handle_status,
2342 process_serial_event): Update.
2343 * target.c (thread_search_callback): Update.
2344 * thread-db.c (thread_db_get_tls_address): Update.
2345 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2347 * win32-i386-low.c (update_debug_registers_callback): Update.
2348 * win32-low.c (delete_thread_info, child_delete_thread,
2349 continue_one_thread, suspend_one_thread,
2350 get_child_debug_event): Adjust.
2352 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2354 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2355 * inferiors.h: Include <list>.
2356 (struct process_info) <entry>: Remove field.
2358 (pid_of): Change macro to function.
2359 (ptid_of, lwpid_of): Remove macro.
2360 (all_processes): Change type to std::list<process_info *>.
2361 (ALL_PROCESSES): Remove macro.
2362 (for_each_process, find_process): New function.
2363 * inferiors.c (all_processes): Change type to
2364 std::list<process_info *>.
2365 (find_thread_process): Adjust.
2366 (add_process): Likewise.
2367 (remove_process): Likewise.
2368 (find_process_pid): Likewise.
2369 (get_first_process): Likewise.
2370 (started_inferior_callback): Remove.
2371 (have_started_inferiors_p): Adjust.
2372 (attached_inferior_callback): Remove.
2373 (have_attached_inferiors_p): Adjust.
2374 * linux-low.c (check_zombie_leaders): Likewise.
2375 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2376 (x86_linux_update_xmltarget): Adjust.
2377 * server.c (handle_query): Likewise.
2378 (gdb_reattached_process): Remove.
2379 (handle_status): Adjust.
2380 (kill_inferior_callback): Likewise.
2381 (detach_or_kill_inferior): Remove.
2382 (print_started_pid): Likewise.
2383 (print_attached_pid): Likewise.
2384 (detach_or_kill_for_exit): Update.
2385 (process_serial_event): Likewise.
2386 * linux-arm-low.c (arm_new_fork): Likewise.
2388 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2390 * dll.h: Include <list>.
2391 (struct dll_info): Add constructor.
2392 <entry>: Remove field.
2393 (all_dlls): Change type to std::list<dll_info>.
2394 * dll.c: Include <algorithm>.
2395 (get_dll): Remove macro.
2396 (all_dlls): Change type to std::list<dll_info *>.
2397 (free_one_dll): Remove.
2398 (match_dll): Likewise.
2399 (loaded_dll): Adjust.
2400 (unloaded_dll): Adjust to all_dlls type change, use
2401 std::find_if. Inline code from match_dll.
2402 (clear_dlls): Adjust to all_dlls type change.
2403 * server.c (emit_dll_description): Remove.
2404 (handle_qxfer_libraries): Adjust to all_dlls type change,
2405 integrate emit_dll_description's functionality.
2407 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2409 * linux-low.h (struct linux_target_ops) <delete_process>: New
2411 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2412 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2413 (struct linux_target_ops): Add delete_process callback.
2414 * linux-arm-low.c (arm_delete_process): New.
2415 (struct linux_target_ops): Add delete_process callback.
2416 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2417 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2418 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2419 * linux-mips-low.c (mips_linux_delete_process): New.
2420 (struct linux_target_ops): Add delete_process callback.
2421 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2422 * linux-s390-low.c (struct linux_target_ops): Likewise.
2423 * linux-sh-low.c (struct linux_target_ops): Likewise.
2424 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2425 * linux-tile-low.c (struct linux_target_ops): Likewise.
2426 * linux-x86-low.c (x86_linux_delete_process): New.
2427 (struct linux_target_ops): Add delete_process callback.
2428 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2430 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2432 * linux-aarch64-low.c (the_low_target): Add thread delete
2434 * linux-arm-low.c (arm_delete_thread): New function.
2435 (the_low_target): Add thread delete callback.
2436 * linux-bfin-low.c (the_low_target): Likewise.
2437 * linux-crisv32-low.c (the_low_target): Likewise.
2438 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2440 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2442 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2443 * linux-mips-low.c (mips_linux_delete_thread): New function.
2444 (the_low_target): Add thread delete callback.
2445 * linux-ppc-low.c (the_low_target): Likewise.
2446 * linux-s390-low.c (the_low_target): Likewise.
2447 * linux-sh-low.c (the_low_target): Likewise.
2448 * linux-tic6x-low.c (the_low_target): Likewise.
2449 * linux-tile-low.c (the_low_target): Likewise.
2450 * linux-x86-low.c (the_low_target): Likewise.
2451 * linux-xtensa-low.c (the_low_target): Likewise.
2453 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2455 * win32-low.c: Include "common-inferior.h".
2457 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2459 * inferiors.c (set_inferior_cwd): New function.
2460 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2461 (handle_query): Inform that QSetWorkingDir is supported.
2462 * win32-low.c (create_process): Pass the inferior's cwd to
2465 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2467 * inferiors.c (current_inferior_cwd): New global variable.
2468 (get_inferior_cwd): New function.
2469 * inferiors.h (struct process_info) <cwd>: New field.
2471 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2473 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2474 (OBS): Add gdb_tilde_expand.o.
2476 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2478 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2479 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2481 2017-09-29 Pedro Alves <palves@redhat.com>
2483 * ax.c (gdb_parse_agent_expr): Constify.
2484 * ax.h (gdb_parse_agent_expr): Constify.
2485 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2487 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2488 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2489 * remote-utils.h (read_ptid): Constify.
2490 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2491 (process_point_options, process_serial_event): Constify.
2492 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2493 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2494 (cmd_qtbuffer): Constify.
2496 2017-09-29 Pedro Alves <palves@redhat.com>
2498 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2501 2017-09-29 Pedro Alves <palves@redhat.com>
2503 * linux-low.c (handle_extended_wait): Pass parent thread instead
2504 of process to thread_db_notice_clone.
2505 * linux-low.h (thread_db_notice_clone): Replace parent process
2506 parameter with parent thread parameter.
2507 * thread-db.c (find_one_thread): Add comment.
2508 (thread_db_notice_clone): Replace parent process parameter with
2509 parent thread parameter. Temporarily switch to the parent thread.
2511 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2513 * gdbthread.h: Include "common-gdbthread.h".
2514 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2515 "if" when validating the ptid.
2516 * remote-utils.c: Include "gdbthread.h".
2517 (prepare_resume_reply): Use "switch_to_thread".
2518 * target.c (done_accessing_memory): Likewise.
2520 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2522 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2523 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2524 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2525 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2526 s390x-gs-linux64-ipa.o to ipa_obj.
2527 * linux-s390-low.c (HWCAP_S390_GS): New define.
2528 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2530 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2531 (s390_arch_setup): Check for guarded-storage support and choose
2533 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2534 init_registers_s390x_gs_linux64.
2535 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2537 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2538 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2540 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2542 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2544 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2546 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2547 (thread_db_thread_handle): Declare.
2548 * linux-low.c (linux_target_ops): Initialize thread_handle.
2549 * server.c (handle_qxfer_threads_worker): Add support for
2551 * target.h (struct target_ops): Add new function pointer,
2553 (target_thread_handle): Define.
2554 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2556 (thread_db_thread_handle): New function.
2558 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2560 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2561 * linux-low.h (thread_db_notice_clone): Declare.
2562 * thread-db.c (thread_db_notice_clone): New function.
2564 2017-09-21 Pedro Alves <palves@redhat.com>
2566 * server.c (gdb_read_memory, handle_status, process_serial_event)
2567 (handle_serial_event, handle_target_event): Adjust to
2568 set_desired_thread prototype change.
2569 * target.c (set_desired_thread): Remove 'use_general' parameter
2571 * target.h (set_desired_thread): Remove 'use_general' parameter.
2573 2017-09-20 Tom Tromey <tom@tromey.com>
2575 * target.c (target_terminal::terminal_state): Define.
2576 (target_terminal::init): Rename from target_terminal_init.
2577 (target_terminal::inferior): Rename from
2578 target_terminal_inferior.
2579 (target_terminal::ours): Rename from target_terminal_ours.
2580 (target_terminal::ours_for_output, target_terminal::info): New.
2582 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2584 * server.c (accumulate_file_name_length): Remove.
2585 (emit_dll_description): Adjust to std::string change.
2586 (handle_qxfer_libraries): Use std::string to hold document.
2588 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2590 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2591 return type of xml_escape_text.
2592 * server.c (emit_dll_description): Likewise.
2594 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2596 * server.c (captured_main): Accept argument for --selftest.
2597 Update run_tests call.
2598 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2599 when registering selftests.
2601 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2603 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2604 instead of "VEC" for "target_desc.reg_defs".
2605 (regcache_cpy): Likewise.
2606 (registers_to_string): Likewise.
2607 (registers_from_string): Likewise.
2608 (find_regno): Likewise.
2609 (supply_regblock): Likewise.
2610 (regcache_raw_read_unsigned): Likewise.
2611 * tdesc.c (init_target_desc): Likewise.
2612 (tdesc_create_reg): Likewise.
2613 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2614 (struct target_desc) <reg_defs>: Convert to "std::vector".
2615 (target_desc): Do not initialize "reg_defs".
2616 (~target_desc): Update code to use "std::vector" instead of "VEC"
2617 for "target_desc.reg_defs".
2618 (operator==): Likewise.
2620 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2622 * inferiors.h (thread_to_gdb_id): Remove.
2623 * inferiors.c (thread_to_gdb_id): Remove.
2624 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2625 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2626 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2628 * nto-low.c (nto_fetch_registers, nto_store_registers,
2629 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2631 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2633 * inferiors.h (gdb_id_to_thread_id): Remove.
2634 * inferiors.c (gdb_id_to_thread_id): Remove.
2635 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2636 removal. Move pid declaration closer to where it's used.
2638 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2640 * server.c (handle_detach): New function.
2641 (process_serial_event): Move code out, call handle_detach.
2643 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2645 * server.c (require_running): Rename to ...
2646 (require_running_or_return): ... this ...
2647 (require_running_or_break): ... and this.
2648 (handle_query, process_serial_event): Adjust.
2650 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2652 * linux-low.c (linux_set_resume_request): Remove unused
2655 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2657 * server.c (first_thread_of): Remove.
2658 (process_serial_event): Replace usage of first_thread_of with
2659 find_any_thread_of_pid.
2660 * tracepoint.c (same_process_p): Remove.
2661 (gdb_agent_about_to_close): Replace usage of same_process_p with
2662 find_any_thread_of_pid.
2663 * linux-x86-low.c (same_process_callback): Remove.
2664 (x86_arch_setup_process_callback): Replace usage of
2665 same_process_callback with find_any_thread_of_pid.
2666 * thread-db.c (any_thread_of): Remove.
2667 (switch_to_process): Replace usage of any_thread_of with
2668 find_any_thread_of_pid.
2669 * inferiors.c (thread_pid_matches_callback): Remove.
2670 (find_thread_process): Adjust to use find_any_thread_of_pid.
2672 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2674 * regcache.c (get_thread_regcache): Guard calls to "memset"
2677 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2679 * linux-low.c (handle_extended_wait): Use
2680 "allocate_target_description" instead of "XNEW".
2681 * linux-x86-low.c (initialize_low_arch): Likewise.
2683 2017-09-05 Yao Qi <yao.qi@linaro.org>
2685 * configure.srv (srv_i386_regobj): Remove.
2686 (srv_amd64_regobj): Remove.
2687 (srv_regobj): Set it to "" for x86 non-linux targets.
2688 * linux-x86-tdesc.c (i386_linux_read_description):
2689 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2690 (init_registers_i386): Remove the declaration.
2691 (tdesc_i386): Remove the declaration.
2692 (lynx_i386_arch_setup): Call i386_create_target_description.
2693 * nto-x86-low.c: Likewise.
2694 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2695 [!__x86_64__]: include arch/i386.h.
2696 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2698 2017-09-05 Yao Qi <yao.qi@linaro.org>
2700 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2701 i386/amd64-XXX-linux from it.
2703 2017-09-05 Yao Qi <yao.qi@linaro.org>
2705 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2707 (ipa_amd64_linux_regobj): Remove.
2708 (ipa_x32_linux_regobj): Remove.
2710 2017-09-05 Yao Qi <yao.qi@linaro.org>
2712 * Makefile.in (arch-amd64.o): New rule.
2713 * configure.srv: Append arch-amd64.o.
2714 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2715 (get_ipa_tdesc): Call amd64_linux_read_description.
2716 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2717 and init_registers_amd64_XXX.
2718 * linux-x86-low.c (x86_linux_read_description): Call
2719 amd64_linux_read_description.
2720 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2721 (initialize_low_arch): Don't call init_registers_x32_XXX and
2722 init_registers_amd64_XXX.
2723 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2724 and tdesc_amd64_XXX.
2725 [__x86_64__] (amd64_tdesc_test): New function.
2726 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2727 and init_registers_amd64_XXX.
2728 * linux-x86-tdesc.c: Include arch/amd64.h.
2729 (xcr0_to_tdesc_idx): New function.
2730 (i386_linux_read_description): New function.
2731 (amd64_get_ipa_tdesc_idx): New function.
2732 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2733 (amd64_get_ipa_tdesc): Declare.
2735 2017-09-05 Yao Qi <yao.qi@linaro.org>
2737 * configure.srv (srv_i386_linux_xmlfiles): Remove
2738 i386/i386-XXX-linux.xml from it.
2740 2017-09-05 Yao Qi <yao.qi@linaro.org>
2742 * configure.srv: Set srv_i386_linux_regobj empty if $development
2744 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2745 initialize_low_tdesc.
2746 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2747 with #if initialize_low_tdesc.
2748 * linux-x86-tdesc-selftest.c: New file.
2749 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2751 2017-09-05 Yao Qi <yao.qi@linaro.org>
2753 * Makefile.in (arch-i386.o): New rule.
2754 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2755 (x86_64-*-linux*): Likewise.
2756 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2757 include arch/i386.h.
2758 (i386_linux_read_description): Remove code and call
2759 i386_create_target_description.
2760 * tdesc.c (allocate_target_description): New function.
2761 * tdesc.h (set_tdesc_architecture): Remove declaration.
2762 (set_tdesc_osabi): Likewise.
2764 2017-09-05 Yao Qi <yao.qi@linaro.org>
2766 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2767 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2768 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2770 * server.c (get_features_xml): Call tdesc_get_features_xml.
2771 * tdesc.c (set_tdesc_architecture): New function.
2772 (set_tdesc_osabi): New function.
2773 (tdesc_get_features_xml): New function.
2774 (tdesc_create_feature): Add an argument.
2775 * tdesc.h (struct target_desc) <features>: New field.
2776 <arch, osabi>: New field.
2777 (~target_desc): xfree features, arch, and osabi.
2778 (target_desc::oerator==): Don't compare .xmltarget.
2779 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2780 (set_tdesc_osabi): Likewise.
2781 (tdesc_get_features_xml): Likewise.
2783 2017-09-05 Yao Qi <yao.qi@linaro.org>
2785 * linux-x86-tdesc.c: Include selftest.h.
2786 (i386_tdesc_test): New function.
2787 (initialize_low_tdesc): Call selftests::register_test.
2788 * tdesc.h: Include regdef.h.
2789 (target_desc): Override operator == and !=.
2791 2017-09-05 Yao Qi <yao.qi@linaro.org>
2793 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2794 (ipa_obj): Likewise.
2795 * linux-i386-ipa.c: Include common/x86-xstate.h
2796 (get_ipa_tdesc): Call i386_linux_read_description.
2797 (initialize_low_tracepoint): Don't call init_registers_XXX
2798 functions, call initialize_low_tdesc instead.
2799 * linux-x86-low.c (x86_linux_read_description): Call
2800 i386_linux_read_description.
2801 (initialize_low_arch): Don't call init_registers_i386_XXX
2802 functions, call initialize_low_tdesc.
2803 * linux-x86-tdesc.c: New file.
2804 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2805 (i386_get_ipa_tdesc_idx): Declare.
2806 (i386_get_ipa_tdesc): Declare.
2807 (initialize_low_tdesc): Declare.
2809 2017-09-05 Yao Qi <yao.qi@linaro.org>
2811 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2814 2017-09-05 Yao Qi <yao.qi@linaro.org>
2816 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2817 * regcache.c (get_thread_regcache): Use VEC_length.
2818 (init_register_cache): Likewise.
2819 (regcache_cpy): Likewise.
2820 (registers_to_string): Iterate reg_defs via VEC_iterate.
2821 (find_regno): Likewise.
2822 (find_register_by_number): Use VEC_index.
2823 (register_size): Call find_register_by_number.
2824 (register_data): Call find_register_by_number.
2825 (supply_regblock): Use VEC_length.
2826 (regcache_raw_read_unsigned): Likewise.
2827 * tdesc.c (init_target_desc): Iterate reg_defs via
2829 (default_description): Update initializer.
2830 (copy_target_description): Don't update field num_registers.
2831 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2832 <num_registers>: Remove.
2834 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2836 * Makefile.in (.SECONDARY): Define target.
2838 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2840 * linux-low.c (linux_wait_1): Adjust.
2841 * server.c (queue_stop_reply_callback): Adjust.
2843 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2845 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2846 QEnvironmentUnset and QEnvironmentReset packets.
2847 (handle_query): Inform remote that QEnvironmentHexEncoded,
2848 QEnvironmentUnset and QEnvironmentReset are supported.
2850 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2852 * inferiors.h (inferior_target_data): Rename to ...
2853 (thread_target_data): ... this.
2854 (inferior_regcache_data): Rename to ...
2855 (thread_regcache_data): ... this.
2856 (set_inferior_regcache_data): Rename to ...
2857 (set_thread_regcache_data): ... this.
2858 * inferiors.c (inferior_target_data): Rename to ...
2859 (thread_target_data): ... this.
2860 (inferior_regcache_data): Rename to ...
2861 (thread_regcache_data): ... this.
2862 (set_inferior_regcache_data): Rename to ...
2863 (set_thread_regcache_data): ... this.
2864 (free_one_thread): Update.
2865 * linux-low.h (get_thread_lwp): Update.
2866 * regcache.c (get_thread_regcache): Update.
2867 (regcache_invalidate_thread): Update.
2868 (free_register_cache_thread): Update.
2869 * win32-i386-low.c (update_debug_registers_callback): Update.
2870 (win32_get_current_dr): Update.
2871 * win32-low.c (thread_rec): Update.
2872 (delete_thread_info): Update.
2873 (continue_one_thread): Update.
2874 (suspend_one_thread): Update.
2876 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2878 * inferiors.c (set_inferior_target_data): Remove.
2879 * inferiors.h (set_inferior_target_data): Remove.
2881 2017-08-18 Yao Qi <yao.qi@linaro.org>
2883 * Makefile.in (OBS): Add selftest.o.
2884 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2885 * configure, config.in: Re-generated.
2886 * server.c: Include common/sefltest.h.
2887 (captured_main): Handle option --selftest.
2889 2017-08-09 Yao Qi <yao.qi@linaro.org>
2891 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2892 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2893 i386-avx-mpx.o and i386-mmx.o.
2894 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2895 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2896 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2897 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2898 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2899 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2900 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2901 i386/amd64-avx-mpx.xml.
2903 2017-08-09 Yao Qi <yao.qi@linaro.org>
2905 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2906 and x32-avx-avx512.o.
2907 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2908 i386/x32-avx-avx512.xml.
2910 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2912 * tracepoint.h (enum class fast_tpoint_collect_result): New
2914 (fast_tracepoint_collecting): Change return type to
2915 fast_tpoint_collect_result.
2916 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2917 * linux-low.h: Include tracepoint.h.
2918 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2919 fast_tpoint_collect_result.
2920 * linux-low.c (handle_tracepoints): Adjust.
2921 (linux_fast_tracepoint_collecting): Change return type to
2922 fast_tpoint_collect_result.
2923 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2924 linux_wait_1, stuck_in_jump_pad_callback,
2925 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2926 proceed_one_lwp): Adjust to type change.
2928 2017-07-10 Yao Qi <yao.qi@linaro.org>
2930 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2932 2017-06-29 Yao Qi <yao.qi@linaro.org>
2934 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2936 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2938 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2940 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2942 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2944 * linux-low.c (linux_create_inferior): Adjust code to access the
2945 environment information via 'gdb_environ' class.
2946 * lynx-low.c (lynx_create_inferior): Likewise.
2947 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2948 (get_environ): Return a pointer to 'our_environ'.
2949 (captured_main): Initialize 'our_environ'.
2950 * server.h (get_environ): Adjust prototype.
2951 * spu-low.c (spu_create_inferior): Adjust code to access the
2952 environment information via 'gdb_environ' class.
2954 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2956 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2957 usage of "register" keyword.
2959 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2961 * configure: Re-generate.
2963 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2965 * configure: Re-generate.
2967 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2969 * Makefile.in (COMPILE.pre): Add "-x c++".
2971 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2973 * fork-child.c: Conditionally include <signal.h>.
2975 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2977 * server.c (handle_general_set): Handle new packet
2978 "QStartupWithShell".
2979 (handle_query): Add "QStartupWithShell" to the list of supported
2981 (gdbserver_usage): Add help text explaining the
2982 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2984 (captured_main): Recognize and act upon the presence of the new
2987 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2988 Pedro Alves <palves@redhat.com>
2990 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2991 * configure: Regenerate.
2992 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2994 (i[34567]86-*-lynxos*): Likewise.
2995 (spu*-*-*): Likewise.
2996 * fork-child.c: New file.
2997 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2999 (linux_ptrace_fun): New function.
3000 (linux_create_inferior): Adjust function prototype to reflect
3001 change on "target.h". Adjust function code to use
3003 (linux_request_interrupt): Delete "signal_pid".
3004 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3005 (lynx_ptrace_fun): New function.
3006 (lynx_create_inferior): Adjust function prototype to reflect
3007 change on "target.h". Adjust function code to use
3009 * nto-low.c (nto_create_inferior): Adjust function prototype and
3010 code to reflect change on "target.h". Update comments.
3011 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3012 "common-terminal.h" and "environ.h".
3013 (terminal_fd): Moved to fork-child.c.
3014 (old_foreground_pgrp): Likewise.
3015 (restore_old_foreground_pgrp): Likewise.
3016 (last_status): Make it global.
3017 (last_ptid): Likewise.
3018 (our_environ): New variable.
3019 (startup_with_shell): Likewise.
3020 (program_name): Likewise.
3021 (program_argv): Rename to...
3022 (program_args): ...this.
3023 (wrapper_argv): New variable.
3024 (start_inferior): Delete function.
3025 (get_exec_wrapper): New function.
3026 (get_exec_file): Likewise.
3027 (get_environ): Likewise.
3028 (prefork_hook): Likewise.
3029 (post_fork_inferior): Likewise.
3030 (postfork_hook): Likewise.
3031 (postfork_child_hook): Likewise.
3032 (handle_v_run): Update code to deal with arguments coming from the
3033 remote host. Update calls from "start_inferior" to
3035 (captured_main): Likewise. Initialize environment variable. Call
3037 * server.h (post_fork_inferior): New prototype.
3038 (get_environ): Likewise.
3039 (last_status): Declare.
3040 (last_ptid): Likewise.
3041 (signal_pid): Likewise.
3042 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3043 (spu_ptrace_fun): New function.
3044 (spu_create_inferior): Adjust function prototype to reflect change
3045 on "target.h". Adjust function code to use "fork_inferior".
3046 * target.c (target_terminal_init): New function.
3047 (target_terminal_inferior): Likewise.
3048 (target_terminal_ours): Likewise.
3049 * target.h: Include <vector>.
3050 (struct target_ops) <create_inferior>: Update prototype.
3051 (create_inferior): Update macro.
3052 * utils.c (gdb_flush_out_err): New function.
3053 * win32-low.c (win32_create_inferior): Adjust function prototype
3054 and code to reflect change on "target.h".
3056 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3058 * inferiors.c (switch_to_thread): New function.
3060 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3062 * Makefile.in (SFILE): Add "common/job-control.c".
3063 (OBS): Add "job-control.o".
3065 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3067 * Makefile: Remove "@host_makefile_frag@".
3069 2017-05-05 Pedro Alves <palves@redhat.com>
3071 * configure: Regenerate.
3073 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3075 * configure: Regenerate.
3077 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3079 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3080 software_single_step change of return type to
3081 std::vector<CORE_ADDR>.
3082 * linux-low.c (install_software_single_step_breakpoints):
3084 * linux-low.h (install_software_single_step_breakpoints):
3087 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3089 * remote-utils.c: Include "gdb_termios.h" instead of
3091 * terminal.h: Delete file.
3093 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3095 * server.c: Include <vector>.
3096 <program_argv, wrapper_argv>: Convert to std::vector.
3097 (start_inferior): Rewrite function to use C++.
3098 (handle_v_run): Likewise. Update code that calculates the argv
3099 based on the vRun packet; use C++.
3100 (captured_main): Likewise.
3102 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3104 * server.c (handle_v_cont): Initialize thread_resume::thread
3107 2017-04-05 Pedro Alves <palves@redhat.com>
3109 * configure: Regenerate.
3111 2017-04-05 Pedro Alves <palves@redhat.com>
3113 * gdbreplay.c (sync_error): Constify.
3114 * linux-x86-low.c (push_opcode): Constify.
3116 2017-04-05 Pedro Alves <palves@redhat.com>
3118 * win32-low.c (get_child_debug_event)
3119 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3120 Report TARGET_WAITKIND_SPURIOUS instead.
3122 2017-04-05 Pedro Alves <palves@redhat.com>
3124 * remote-utils.c (remote_prepare, remote_open): Constify.
3125 * remote-utils.h (remote_prepare, remote_open): Constify.
3126 * server.c (captured_main): Constify 'port' handling.
3128 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3130 * Makefile.in (clean): Clear .deps.
3132 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3134 * .gitignore: Remove generated files, replace with wildcard.
3135 * (clean): Replace removal of generated files with wildcard.
3136 (version.c): Replace with...
3137 (version-generated.c): ...this.
3138 (xml-builtin.c): Replace with...
3139 (xml-builtin-generated.c): ...this.
3140 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3141 (%.c: *regformats*): Replace with...
3142 (%-generated.c: *regformats*): ...this.
3144 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3146 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3147 (xtensa_fill_gregset): Call collect_register_by_name for
3149 (xtensa_store_gregset): Call supply_register_by_name for
3152 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3154 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3155 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3156 (xtensa_store_gregset): Call supply_register for all registers in
3157 a0_regnum..a0_regnum + C0_NREGS range.
3159 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3161 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3162 (ax-ipa.o: ax.c): Remove.
3163 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3164 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3165 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3166 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3167 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3169 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3171 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3172 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3173 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3174 (errors-ipa.o: ../common/errors.c): Remove.
3175 (format-ipa.o: ../common/format.c): Remove.
3176 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3178 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3180 * Makefile.in (%-ipa.o: %.c): New rule.
3181 (tracepoint-ipa.o: tracepoint.c): Remove.
3182 (utils-ipa.o: utils.c): Remove.
3183 (remote-utils-ipa.o: remote-utils.c): Remove.
3184 (regcache-ipa.o: regcache.c): Remove.
3185 (i386-linux-ipa.o: i386-linux.c): Remove.
3186 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3187 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3188 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3189 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3190 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3191 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3192 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3193 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3194 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3195 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3196 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3197 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3198 (aarch64-ipa.o: aarch64.c): Remove.
3199 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3200 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3201 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3202 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3203 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3204 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3205 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3206 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3207 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3208 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3209 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3210 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3211 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3212 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3213 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3214 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3215 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3216 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3217 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3218 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3219 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3220 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3221 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3222 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3223 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3224 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3225 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3226 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3227 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3228 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3229 (tdesc-ipa.o: tdesc.c): Remove.
3230 (x32-linux-ipa.o: x32-linux.c): Remove.
3231 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3232 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3234 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3236 * Makefile.in (%.o: ../arch/%.c): New rule.
3237 (arm.o: ../arch/arm.c): Remove.
3238 (arm-linux.o: ../arch/arm-linux.c): Remove.
3239 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3240 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3242 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3244 * Makefile.in (%.o: ../nat/%.c): New rule.
3245 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3246 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3247 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3248 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3249 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3250 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3251 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3252 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3253 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3254 (linux-personality.o: ../nat/linux-personality.c): Remove.
3255 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3256 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3257 (x86-linux.o: ../nat/x86-linux.c): Remove.
3258 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3259 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3261 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3263 * Makefile.in (%.o: ../common/%.c): New rule.
3264 (signals.o: ../common/signals.c): Remove.
3265 (print-utils.o: ../common/print-utils.c): Remove.
3266 (rsp-low.o: ../common/rsp-low.c): Remove.
3267 (common-utils.o: ../common/common-utils.c): Remove.
3268 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3269 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3270 (vec.o: ../common/vec.c): Remove.
3271 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3272 (xml-utils.o: ../common/xml-utils.c): Remove.
3273 (ptid.o: ../common/ptid.c): Remove.
3274 (buffer.o: ../common/buffer.c): Remove.
3275 (format.o: ../common/format.c): Remove.
3276 (filestuff.o: ../common/filestuff.c): Remove.
3277 (agent.o: ../common/agent.c): Remove.
3278 (errors.o: ../common/errors.c): Remove.
3279 (environ.o: ../common/environ.c): Remove.
3280 (common-debug.o: ../common/common-debug.c): Remove.
3281 (cleanups.o: ../common/cleanups.c): Remove.
3282 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3283 (fileio.o: ../common/fileio.c): Remove.
3284 (common-regcache.o: ../common/common-regcache.c): Remove.
3285 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3286 (new-op.o: ../common/new-op.c): Remove.
3287 (btrace-common.o: ../common/btrace-common.c): Remove.
3289 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3291 * Makefile.in (%.o: ../target/%.c): New rule.
3292 (waitstatus.o: ../target/waitstatus.c): Remove.
3294 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3297 (%.c: ../regformats/%.dat,
3298 (%.c: ../regformats/arm/%.dat,
3299 (%.c: ../regformats/i386/%.dat,
3300 (%.c: ../regformats/rs6000/%.dat): New rules.
3301 (aarch64.c): Remove.
3302 (reg-arm.c): Remove.
3303 (arm-with-iwmmxt.c): Remove.
3304 (arm-with-vfpv2.c): Remove.
3305 (arm-with-vfpv3.c): Remove.
3306 (arm-with-neon.c): Remove.
3307 (reg-bfin.c): Remove.
3308 (reg-cris.c): Remove.
3309 (reg-crisv32.c): Remove.
3311 (i386-linux.c): Remove.
3312 (i386-avx.c): Remove.
3313 (i386-avx-linux.c): Remove.
3314 (i386-avx-avx512.c): Remove.
3315 (i386-avx-avx512-linux.c): Remove.
3316 (i386-mpx.c): Remove.
3317 (i386-mpx-linux.c): Remove.
3318 (i386-avx-mpx-avx512-pku.c): Remove.
3319 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3320 (i386-avx-mpx.c): Remove.
3321 (i386-avx-mpx-linux.c): Remove.
3322 (i386-mmx.c): Remove.
3323 (i386-mmx-linux.c): Remove.
3324 (reg-ia64.c): Remove.
3325 (reg-m32r.c): Remove.
3326 (reg-m68k.c): Remove.
3328 (mips-linux.c): Remove.
3329 (mips-dsp-linux.c): Remove.
3330 (mips64-linux.c): Remove.
3331 (mips64-dsp-linux.c): Remove.
3332 (nios2-linux.c): Remove.
3333 (powerpc-32.c): Remove.
3334 (powerpc-32l.c): Remove.
3335 (powerpc-altivec32l.c): Remove.
3336 (powerpc-cell32l.c): Remove.
3337 (powerpc-vsx32l.c): Remove.
3338 (powerpc-isa205-32l.c): Remove.
3339 (powerpc-isa205-altivec32l.c): Remove.
3340 (powerpc-isa205-vsx32l.c): Remove.
3341 (powerpc-e500l.c): Remove.
3342 (powerpc-64l.c): Remove.
3343 (powerpc-altivec64l.c): Remove.
3344 (powerpc-cell64l.c): Remove.
3345 (powerpc-vsx64l.c): Remove.
3346 (powerpc-isa205-64l.c): Remove.
3347 (powerpc-isa205-altivec64l.c): Remove.
3348 (powerpc-isa205-vsx64l.c): Remove.
3349 (s390-linux32.c): Remove.
3350 (s390-linux32v1.c): Remove.
3351 (s390-linux32v2.c): Remove.
3352 (s390-linux64.c): Remove.
3353 (s390-linux64v1.c): Remove.
3354 (s390-linux64v2.c): Remove.
3355 (s390-te-linux64.c): Remove.
3356 (s390-vx-linux64.c): Remove.
3357 (s390-tevx-linux64.c): Remove.
3358 (s390x-linux64.c): Remove.
3359 (s390x-linux64v1.c): Remove.
3360 (s390x-linux64v2.c): Remove.
3361 (s390x-te-linux64.c): Remove.
3362 (s390x-vx-linux64.c): Remove.
3363 (s390x-tevx-linux64.c): Remove.
3364 (tic6x-c64xp-linux.c): Remove.
3365 (tic6x-c64x-linux.c): Remove.
3366 (tic6x-c62x-linux.c): Remove.
3368 (reg-sparc64.c): Remove.
3369 (reg-spu.c): Remove.
3371 (amd64-linux.c): Remove.
3372 (amd64-avx.c): Remove.
3373 (amd64-avx-linux.c): Remove.
3374 (amd64-avx-avx512.c): Remove.
3375 (amd64-avx-avx512-linux.c): Remove.
3376 (amd64-mpx.c): Remove.
3377 (amd64-mpx-linux.c): Remove.
3378 (amd64-avx-mpx-avx512-pku.c): Remove.
3379 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3380 (amd64-avx-mpx.c): Remove.
3381 (amd64-avx-mpx-linux.c): Remove.
3383 (x32-linux.c): Remove.
3384 (x32-avx.c): Remove.
3385 (x32-avx-linux.c): Remove.
3386 (x32-avx-avx512.c): Remove.
3387 (x32-avx-avx512-linux.c): Remove.
3388 (reg-xtensa.c): Remove.
3389 (reg-tilegx.c): Remove.
3390 (reg-tilegx32.c): Remove.
3392 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3394 * Makefile.in (SFILES): Add "common/environ.c".
3395 (OBJS): Add "common/environ.h".
3397 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3399 * configure.ac: Check if the fs_base and gs_base members of
3400 `struct user_regs_struct' exist.
3401 * config.in: Regenerated.
3402 * configure: Likewise.
3404 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3406 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3408 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3409 (get_next_pcs_syscall_next_pc): Likewise.
3411 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3413 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3414 * nto-x86-low.c: Likewise.
3416 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3418 * Makefile.in: Include disable-implicit-rules.mk.
3420 2016-11-23 Pedro Alves <palves@redhat.com>
3422 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3423 (debug_vprintf): Use std::chrono::steady_clock instead of
3424 gettimeofday. Use '.' instead of ':'.
3425 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3426 (get_timestamp): Use std::chrono::steady_clock instead of
3429 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3431 * Makefile.in: Fix whitespace formatting.
3433 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3435 * Makefile.in (SFILES, OBS): Flatten list and order
3438 2016-11-23 Pedro Alves <palves@redhat.com>
3440 * event-loop.c (handle_file_event): Use warning.
3441 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3442 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3445 2016-11-23 Pedro Alves <palves@redhat.com>
3447 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3449 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3450 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3451 debug_printf and debug_flush for debug output.
3452 * server.c (handle_general_set): Likewise.
3453 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3456 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3458 * Makefile.in (.c.o): Replace rule with ...
3459 (%.o: %.c): ... this one.
3461 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3463 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3464 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3466 * configure.ac: Remove checks for the make program.
3467 * configure: Re-generate.
3469 2016-10-28 Pedro Alves <palves@redhat.com>
3471 * Makefile.in (CXX_DIALECT): Get from configure.
3472 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3473 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3474 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3475 * config.in: Regenerate.
3476 * configure: Regenerate.
3478 2016-10-27 Yao Qi <yao.qi@linaro.org>
3480 * linux-low.c (linux_supports_range_stepping): Return true if
3481 can_software_single_step return true.
3483 2016-10-27 Yao Qi <yao.qi@linaro.org>
3485 * inferiors.c (find_inferior_in_random): New function.
3486 * inferiors.h (find_inferior_in_random): Declare.
3487 * linux-low.c (linux_wait_for_event_filtered): Call
3488 find_inferior_in_random instead of find_inferior.
3490 2016-10-27 Yao Qi <yao.qi@linaro.org>
3492 * linux-low.c (linux_wait_1): If single-step breakpoints are
3493 inserted, remove them.
3495 2016-10-26 Pedro Alves <palves@redhat.com>
3497 * linux-low.c (handle_extended_wait): Link parent/child fork
3499 (linux_wait_1): Unlink them.
3500 (linux_set_resume_request): Ignore resume requests for
3501 already-resumed and unhandled fork child threads.
3502 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3503 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3505 (handle_v_requests) <vCont>: Don't call require_running.
3506 * server.h (in_queued_stop_replies): New declaration.
3508 2016-10-24 Yao Qi <yao.qi@linaro.org>
3511 * linux-aarch64-low.c (append_insns): Cast the return value to
3514 2016-10-10 Yao Qi <yao.qi@linaro.org>
3516 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3518 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3520 * target.c (target_supports_multi_process): New function, moved
3522 * target.h (target_supports_multi_process): ... here. Remove
3525 2016-10-05 Tom Tromey <tom@tromey.com>
3528 * tracepoint.c (handle_tracepoint_bkpts): Check
3529 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3531 2016-10-05 Yao Qi <yao.qi@linaro.org>
3533 * configure.srv: Update the path of arm-*.xml files.
3535 2016-10-05 Terry Guo <terry.guo@arm.com>
3536 Yao Qi <yao.qi@linaro.org>
3538 * Makefile.in: Adjust the path of rules.
3539 * configure.srv: Update the path of xml files.
3540 * regformats/arm-with-iwmmxt.dat: Regenerated.
3541 * regformats/arm-with-neon.dat: Likewise.
3542 * regformats/arm-with-vfpv2.dat: Likewise.
3543 * regformats/arm-with-vfpv3.dat Likewise.
3545 2016-09-30 Yao Qi <yao.qi@linaro.org>
3548 * target.c (target_stop_and_wait): Don't call
3549 target_continue_no_signal, use resume_stop instead.
3551 2016-09-26 Yao Qi <yao.qi@linaro.org>
3553 * linux-low.c (linux_wait_1): Call debug_exit.
3555 2016-09-23 Pedro Alves <palves@redhat.com>
3557 * Makefile.in (SFILES): Add common/new-op.c.
3558 (OBS): Add common/new-op.o.
3559 (new-op.o): New rule.
3561 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3563 * .gitinore: Ignore more files.
3565 2016-09-21 Yao Qi <yao.qi@linaro.org>
3567 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3570 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3572 * server.c (start_inferior): Call target_mourn_inferior instead of
3573 mourn_inferior; pass ptid_t argument to it.
3575 (handle_target_event): Likewise.
3576 * target.c (target_mourn_inferior): New function.
3577 * target.h (mourn_inferior): Delete macro.
3579 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3581 * linux-low.c (lwp_is_stepping): New function.
3583 2016-09-06 Carl Love <cel@us.ibm.com>
3585 * server.c (start_inferior): Fixed comment, requested comment change
3586 didn't get updated correctly. Removed reference to ptrace () call as
3587 it is only true on Linux systems.
3589 2016-09-06 Carl Love <cel@us.ibm.com>
3591 * server.c (start_inferior): Do not call
3592 function target_post_create_inferior () if the
3593 inferior process has already exited.
3595 2016-09-05 Pedro Alves <palves@redhat.com>
3597 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3598 (COMPILE.pre, CC_LD): Use CXX directly.
3599 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3600 * acinclude.m4: Don't include build-with-cxx.m4.
3601 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3602 * configure: Regenerate.
3604 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3607 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3608 call writing data to own_buf.
3610 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3612 * target.c (mywait): Call target_wait instead of
3614 (target_wait): New function.
3616 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3618 * server.c (start_inferior): New variable 'ptid'. Replace calls
3619 to the_target->resume by target_continue{,_no_signal}, depending
3621 * target.c (target_stop_and_wait): Call target_continue_no_signal
3622 instead of the_target->resume.
3623 (target_continue): New function.
3625 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3627 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3629 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3632 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3634 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3635 * linux-arm-low.c (ps_get_thread_area): Likewise.
3636 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3637 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3638 * linux-mips-low.c (ps_get_thread_area): Likewise.
3639 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3640 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3641 * linux-x86-low.c (ps_get_thread_area): Likewise.
3642 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3644 2016-08-19 Pedro Alves <palves@redhat.com>
3646 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3648 2016-08-19 Pedro Alves <palves@redhat.com>
3650 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3651 comment. Use memcpy instead of casting through unsigned long.
3653 2016-08-19 Pedro Alves <palves@redhat.com>
3655 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3656 allocating around 0x80000000.
3658 2016-08-19 Pedro Alves <palves@redhat.com>
3661 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3662 (x32-avx512-linux-ipa.o): New rules.
3663 * configure.ac (x86_64-*-linux*): New x32 check.
3664 * configure.srv (ipa_x32_linux_regobj): New.
3665 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3666 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3668 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3670 * configure: Regenerate.
3672 2016-08-09 Pedro Alves <palves@redhat.com>
3675 * Makefile.in (OBS): Add signals-state-save-restore.o.
3676 (signals-state-save-restore.o): New rule.
3677 * config.in: Regenerate.
3678 * configure: Regenerate.
3679 * linux-low.c: Include "signals-state-save-restore.h".
3680 (linux_create_inferior): Call
3681 restore_original_signals_state.
3682 * server.c: Include "dispositions-save-restore.h".
3683 (captured_main): Call save_original_signals_state.
3685 2016-08-05 Pedro Alves <palves@redhat.com>
3687 * configure: Regenerate.
3689 2016-08-04 Yao Qi <yao.qi@linaro.org>
3691 * linux-low.c (regsets_fetch_inferior_registers): Check
3692 errno is ESRCH or not.
3694 2016-08-02 Yao Qi <yao.qi@linaro.org>
3696 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3697 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3698 (thread_db_load_search): Update.
3699 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3700 td_ta_set_event and td_ta_event_getmsg.
3702 2016-07-26 Pedro Alves <palves@redhat.com>
3705 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3706 of unsigned long for 64-bit registers and use uint32_t instead of
3707 unsigned int for 32-bit registers.
3709 2016-07-26 Pedro Alves <palves@redhat.com>
3711 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3714 2016-07-21 Tom Tromey <tom@tromey.com>
3716 * configure: Rebuild.
3718 2016-07-21 Yao Qi <yao.qi@linaro.org>
3720 * mem-break.c (find_gdb_breakpoint): Cast bp to
3721 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3723 2016-07-21 Yao Qi <yao.qi@linaro.org>
3725 * server.c (handle_v_requests): Support s and S actions
3726 if target_supports_software_single_step return true.
3728 2016-07-21 Yao Qi <yao.qi@linaro.org>
3730 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3731 is resume_step, call maybe_hw_step.
3732 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3734 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3736 (proceed_one_lwp): If resume request is resume_step, install
3737 reinsert breakpoints and call maybe_hw_step.
3739 2016-07-21 Yao Qi <yao.qi@linaro.org>
3741 * linux-low.c (proceed_one_lwp): Declare.
3742 (linux_resume_one_thread): Remove local variable 'step'.
3743 Lift code enqueue signal. Call proceed_one_lwp instead of
3744 linux_resume_one_lwp.
3746 2016-07-21 Yao Qi <yao.qi@linaro.org>
3748 * linux-low.c (linux_resume_one_thread): Call
3749 enqueue_pending_signal.
3751 2016-07-21 Yao Qi <yao.qi@linaro.org>
3753 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3754 * inferiors.c (do_restore_current_thread_cleanup): New function.
3755 (make_cleanup_restore_current_thread): Likewise.
3756 * linux-low.c (install_software_single_step_breakpoints): Call
3757 make_cleanup_restore_current_thread. Switch current_thread to
3760 2016-07-21 Yao Qi <yao.qi@linaro.org>
3762 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3763 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3764 (clone_one_breakpoint): Likewise.
3765 (delete_reinsert_breakpoints): Change parameter to thread.
3767 (has_reinsert_breakpoints): Likewise.
3768 (uninsert_reinsert_breakpoints): Likewise.
3769 (reinsert_reinsert_breakpoints): Likewise.
3770 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3771 (delete_reinsert_breakpoints): Likewise.
3772 (reinsert_reinsert_breakpoints): Likewise.
3773 (uninsert_reinsert_breakpoints): Likewise.
3774 (has_reinsert_breakpoints): Likewise.
3776 2016-07-21 Yao Qi <yao.qi@linaro.org>
3778 * inferiors.c (get_thread_process): Make parameter const.
3779 * inferiors.h (get_thread_process): Update declaration.
3780 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3781 Add new parameters child_thread and parent_thread. Callers
3783 * mem-break.h (clone_all_breakpoints): Update declaration.
3785 2016-07-21 Yao Qi <yao.qi@linaro.org>
3787 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3788 <command_list, handler>: Remove.
3789 (struct gdb_breakpoint): New.
3790 (struct other_breakpoint): New.
3791 (struct reinsert_breakpoint): New.
3792 (is_gdb_breakpoint): New function.
3793 (any_persistent_commands): Update command_list if
3794 is_gdb_breakpoint returns true.
3795 (set_breakpoint): Create breakpoints according to their types.
3796 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3797 (set_gdb_breakpoint_1): Likewise.
3798 (set_gdb_breakpoint): Likewise.
3799 (clear_breakpoint_conditions): Change parameter type to
3800 'struct gdb_breakpoint *'.
3801 (clear_breakpoint_commands): Likewise.
3802 (clear_breakpoint_conditions_and_commands): Likewise.
3803 (add_condition_to_breakpoint): Likewise.
3804 (add_breakpoint_condition): Likewise.
3805 (add_commands_to_breakpoint): Likewise.
3806 (check_breakpoints): Check other_breakpoint.
3807 (clone_one_breakpoint): Clone breakpopint according to its type.
3808 * mem-break.h (struct gdb_breakpoint): Declare.
3809 (set_gdb_breakpoint): Update declaration.
3810 (clear_breakpoint_conditions_and_commands): Likewise.
3811 (add_breakpoint_condition): Likewise.
3812 (add_breakpoint_commands): Likewise.
3813 * server.c (process_point_options): Change parameter type to
3814 'struct gdb_breakpoint *'.
3816 2016-07-21 Yao Qi <yao.qi@linaro.org>
3818 * mem-break.c (set_breakpoint_at): Rename it to ...
3819 (set_breakpoint_type_at): ... it.
3820 (set_breakpoint_at): Call set_breakpoint_type_at.
3821 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3822 * mem-break.h (set_breakpoint_at): Update comments.
3824 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3826 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3828 (nios2_store_gregset): Likewise.
3830 2016-07-01 Pedro Alves <palves@redhat.com>
3831 Antoine Tremblay <antoine.tremblay@ericsson.com>
3833 * linux-low.c: Change interface to take the target lwp_info
3834 pointer directly and return void. Handle detaching from a zombie
3836 (linux_detach_lwp_callback): New function.
3837 (linux_detach): Detach from the leader thread after detaching from
3840 2016-06-28 Yao Qi <yao.qi@linaro.org>
3842 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3843 for variable new_offset.
3844 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3845 (aarch64_ftrace_insn_reloc_cb): Likewise.
3846 (aarch64_ftrace_insn_reloc_tb): Likewise.
3847 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3848 PRIx64 instead of PRIx32.
3850 2016-06-28 Yao Qi <yao.qi@linaro.org>
3852 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3853 (the_low_target): Install arm_get_syscall_trapinfo.
3855 2016-06-28 Yao Qi <yao.qi@linaro.org>
3857 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3859 (the_low_target): Install aarch64_get_syscall_trapinfo.
3861 2016-06-28 Yao Qi <yao.qi@linaro.org>
3863 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3865 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3866 Remove parameter sysno.
3867 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3870 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3872 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3873 (s390_emit_ne_goto): Likewise.
3874 (s390_emit_lt_goto): Likewise.
3875 (s390_emit_le_goto): Likewise.
3876 (s390_emit_gt_goto): Likewise.
3877 (s390_emit_ge_goto): Likewise.
3878 (s390x_emit_eq_goto): Likewise.
3879 (s390x_emit_ne_goto): Likewise.
3880 (s390x_emit_lt_goto): Likewise.
3881 (s390x_emit_le_goto): Likewise.
3882 (s390x_emit_gt_goto): Likewise.
3883 (s390x_emit_ge_goto): Likewise.
3884 (s390_emit_ops_impl): Mark variable static.
3885 (s390x_emit_ops): Likewise.
3887 2016-06-17 Yao Qi <yao.qi@linaro.org>
3889 * linux-low.c (handle_extended_wait): Call
3890 uninsert_reinsert_breakpoints for the parent process. Remove
3891 reinsert breakpoints from the child process. Reinsert them to
3892 the parent process when vfork is done.
3893 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3894 (reinsert_reinsert_breakpoints): New function.
3895 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3896 (reinsert_reinsert_breakpoints): Declare.
3898 2016-06-17 Yao Qi <yao.qi@linaro.org>
3900 * linux-low.c (handle_extended_wait): If the parent is doing
3901 step-over, remove the reinsert breakpoints from the forked child.
3903 2016-06-17 Yao Qi <yao.qi@linaro.org>
3905 * linux-low.c (unsuspend_all_lwps): Declare.
3906 (linux_low_filter_event): If thread exited, call finish_step_over.
3907 If step-over is finished, unsuspend other threads.
3909 2016-06-17 Yao Qi <yao.qi@linaro.org>
3911 * linux-low.c (linux_resume_one_lwp_throw): Assert
3912 has_reinsert_breakpoints returns false.
3913 * mem-break.c (delete_disabled_breakpoints): Assert
3914 bp type isn't reinsert_breakpoint.
3916 2016-06-17 Yao Qi <yao.qi@linaro.org>
3918 * linux-low.c (maybe_hw_step): New function.
3919 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3920 (finish_step_over): Switch current_thread to lwp temporarily,
3921 and assert has_reinsert_breakpoints returns true.
3922 (proceed_one_lwp): Call maybe_hw_step.
3923 * mem-break.c (has_reinsert_breakpoints): New function.
3924 * mem-break.h (has_reinsert_breakpoints): Declare.
3926 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3928 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3930 2016-05-17 Yao Qi <yao.qi@linaro.org>
3932 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3933 instead of find_inferior.
3935 2016-05-05 Yao Qi <yao.qi@linaro.org>
3937 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3938 Initialize res to zero.
3940 2016-05-05 Yao Qi <yao.qi@linaro.org>
3942 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3945 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3947 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3948 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3949 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3951 2016-04-28 Par Olsson <par.olsson@windriver.com>
3952 Simon Marchi <simon.marchi@ericsson.com>
3954 * tracepoint.c (write_inferior_int8): New function.
3955 (cmd_qtenable_disable): Write enable flag using
3956 write_inferior_int8.
3958 2016-04-25 Yao Qi <yao.qi@linaro.org>
3960 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3961 (need_step_over_p): Return zero if the LWP has pending signals
3962 can be delivered on software single step target.
3964 2016-04-25 Yao Qi <yao.qi@linaro.org>
3966 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3967 return instead of error.
3969 2016-04-22 Yao Qi <yao.qi@linaro.org>
3971 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3974 2016-04-22 Yao Qi <yao.qi@linaro.org>
3976 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3977 signal when stepping over breakpoint with software single
3980 2016-04-21 Pedro Alves <palves@redhat.com>
3982 * linux-s390-low.c (s390_collect_ptrace_register)
3983 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3985 (s390_check_regset): Use void * instead of gdb_byte *.
3987 2016-04-20 Pedro Alves <palves@redhat.com>
3989 * configure: Renegerate.
3991 2016-04-20 Yao Qi <yao.qi@linaro.org>
3993 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3994 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3996 (arm_store_gregset): Likewise.
3998 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
4000 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
4001 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
4002 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
4003 (amd64-avx-mpx-linux.c): New rules.
4004 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4005 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4006 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4007 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4008 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4009 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4010 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4011 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4012 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4013 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4014 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4015 * linux-x86-low.c (x86_linux_read_description): Add case for
4016 X86_XSTATE_AVX_MPX_MASK.
4017 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4018 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4019 init_registers_i386_avx_mpx_linux.
4020 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4021 (initialize_low_tracepoint): Call
4022 init_registers_i386_avx_mpx_linux.
4023 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4024 (initialize_low_tracepoint): Call
4025 init_registers_amd64_avx_mpx_linux.
4026 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4027 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4028 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4031 2016-04-18 Pedro Alves <palves@redhat.com>
4033 * configure: Regenerate.
4035 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4037 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4038 (aarch64_emit_sub): Likewise.
4040 2016-04-12 Pedro Alves <palves@redhat.com>
4042 * utils.c (prepare_to_throw_exception): Delete.
4044 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4046 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4048 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4050 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4052 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4054 * linux-aarch64-ipa.c: Add <elf.h> include.
4055 * linux-ppc-ipa.c: Add <elf.h> include.
4056 * linux-s390-ipa.c: Add <elf.h> include.
4058 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4060 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4061 (get_raw_reg_ptr): Likewise.
4062 (get_trace_state_variable_value_ptr): Likewise.
4063 (set_trace_state_variable_value_ptr): Likewise.
4064 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4067 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4068 Marcin Kościelnicki <koriakin@0x04.net>
4071 * linux-ppc-low.c (emit_insns): New function.
4072 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4073 (ppc_emit_prologue): New function.
4074 (ppc_emit_epilogue): New function.
4075 (ppc_emit_add): New function.
4076 (ppc_emit_sub): New function.
4077 (ppc_emit_mul): New function.
4078 (ppc_emit_lsh): New function.
4079 (ppc_emit_rsh_signed): New function.
4080 (ppc_emit_rsh_unsigned): New function.
4081 (ppc_emit_ext): New function.
4082 (ppc_emit_zero_ext): New function.
4083 (ppc_emit_log_not): New function.
4084 (ppc_emit_bit_and): New function.
4085 (ppc_emit_bit_or): New function.
4086 (ppc_emit_bit_xor): New function.
4087 (ppc_emit_bit_not): New function.
4088 (ppc_emit_equal): New function.
4089 (ppc_emit_less_signed): New function.
4090 (ppc_emit_less_unsigned): New function.
4091 (ppc_emit_ref): New function.
4092 (ppc_emit_const): New function.
4093 (ppc_emit_reg): New function.
4094 (ppc_emit_pop): New function.
4095 (ppc_emit_stack_flush): New function.
4096 (ppc_emit_swap): New function.
4097 (ppc_emit_stack_adjust): New function.
4098 (ppc_emit_call): New function.
4099 (ppc_emit_int_call_1): New function.
4100 (ppc_emit_void_call_2): New function.
4101 (ppc_emit_if_goto): New function.
4102 (ppc_emit_goto): New function.
4103 (ppc_emit_eq_goto): New function.
4104 (ppc_emit_ne_goto): New function.
4105 (ppc_emit_lt_goto): New function.
4106 (ppc_emit_le_goto): New function.
4107 (ppc_emit_gt_goto): New function.
4108 (ppc_emit_ge_goto): New function.
4109 (ppc_write_goto_address): New function.
4110 (ppc_emit_ops_impl): New static variable.
4111 (ppc64v1_emit_prologue): New function.
4112 (ppc64v2_emit_prologue): New function.
4113 (ppc64_emit_epilogue): New function.
4114 (ppc64_emit_add): New function.
4115 (ppc64_emit_sub): New function.
4116 (ppc64_emit_mul): New function.
4117 (ppc64_emit_lsh): New function.
4118 (ppc64_emit_rsh_signed): New function.
4119 (ppc64_emit_rsh_unsigned): New function.
4120 (ppc64_emit_ext): New function.
4121 (ppc64_emit_zero_ext): New function.
4122 (ppc64_emit_log_not): New function.
4123 (ppc64_emit_bit_and): New function.
4124 (ppc64_emit_bit_or): New function.
4125 (ppc64_emit_bit_xor): New function.
4126 (ppc64_emit_bit_not): New function.
4127 (ppc64_emit_equal): New function.
4128 (ppc64_emit_less_signed): New function.
4129 (ppc64_emit_less_unsigned): New function.
4130 (ppc64_emit_ref): New function.
4131 (ppc64_emit_const): New function.
4132 (ppc64v1_emit_reg): New function.
4133 (ppc64v2_emit_reg): New function.
4134 (ppc64_emit_pop): New function.
4135 (ppc64_emit_stack_flush): New function.
4136 (ppc64_emit_swap): New function.
4137 (ppc64v1_emit_call): New function.
4138 (ppc64v2_emit_call): New function.
4139 (ppc64v1_emit_int_call_1): New function.
4140 (ppc64v2_emit_int_call_1): New function.
4141 (ppc64v1_emit_void_call_2): New function.
4142 (ppc64v2_emit_void_call_2): New function.
4143 (ppc64_emit_if_goto): New function.
4144 (ppc64_emit_eq_goto): New function.
4145 (ppc64_emit_ne_goto): New function.
4146 (ppc64_emit_lt_goto): New function.
4147 (ppc64_emit_le_goto): New function.
4148 (ppc64_emit_gt_goto): New function.
4149 (ppc64_emit_ge_goto): New function.
4150 (ppc64v1_emit_ops_impl): New static variable.
4151 (ppc64v2_emit_ops_impl): New static variable.
4152 (ppc_emit_ops): New function.
4153 (linux_low_target): Wire in ppc_emit_ops.
4155 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4156 Marcin Kościelnicki <koriakin@0x04.net>
4159 * Makefile.in: Add powerpc-*-ipa.o
4160 * configure.srv: Add ipa_obj for powerpc*-linux.
4161 * linux-ppc-ipa.c: New file.
4162 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4164 (PPC_FIELD): New macro.
4165 (PPC_SEXT): New macro.
4166 (PPC_OP6): New macro.
4167 (PPC_BO): New macro.
4168 (PPC_LI): New macro.
4169 (PPC_BD): New macro.
4170 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4171 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4172 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4173 (ppc_get_thread_area): New function.
4174 (is_elfv2_inferior): New function.
4175 (gen_ds_form): New function.
4176 (GEN_STD): New macro.
4177 (GEN_STDU): New macro.
4178 (GEN_LD): New macro.
4179 (GEN_LDU): New macro.
4180 (gen_d_form): New function.
4181 (GEN_ADDI): New macro.
4182 (GEN_ADDIS): New macro.
4183 (GEN_LI): New macro.
4184 (GEN_LIS): New macro.
4185 (GEN_ORI): New macro.
4186 (GEN_ORIS): New macro.
4187 (GEN_LWZ): New macro.
4188 (GEN_STW): New macro.
4189 (GEN_STWU): New macro.
4190 (gen_xfx_form): New function.
4191 (GEN_MFSPR): New macro.
4192 (GEN_MTSPR): New macro.
4193 (GEN_MFCR): New macro.
4194 (GEN_MTCR): New macro.
4195 (GEN_SYNC): New macro.
4196 (GEN_LWSYNC): New macro.
4197 (gen_x_form): New function.
4198 (GEN_OR): New macro.
4199 (GEN_MR): New macro.
4200 (GEN_LWARX): New macro.
4201 (GEN_STWCX): New macro.
4202 (GEN_CMPW): New macro.
4203 (gen_md_form): New function.
4204 (GEN_RLDICL): New macro.
4205 (GEN_RLDICR): New macro.
4206 (gen_i_form): New function.
4208 (GEN_BL): New macro.
4209 (gen_b_form): New function.
4210 (GEN_BNE): New macro.
4211 (GEN_LOAD): New macro.
4212 (GEN_STORE): New macro.
4213 (gen_limm): New function.
4214 (gen_atomic_xchg): New function.
4215 (gen_call): New function.
4216 (ppc_relocate_instruction): New function.
4217 (ppc_install_fast_tracepoint_jump_pad): New function.
4218 (ppc_get_min_fast_tracepoint_insn_len): New function.
4219 (ppc_get_ipa_tdesc_idx): New function.
4220 (the_low_target): Wire in the new functions.
4221 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4223 * linux-ppc-tdesc.h: New file.
4225 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4227 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4228 (alloc_jump_pad_buffer): New function.
4229 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4230 (alloc_jump_pad_buffer): New function.
4231 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4232 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4233 (alloc_jump_pad_buffer): New function.
4234 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4235 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4236 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4237 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4239 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4241 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4242 * linux-amd64-ipa.c: Likewise.
4243 * linux-i386-ipa.c: Likewise.
4244 * linux-s390-ipa.c: Likewise.
4245 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4246 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4247 set_trace_state_variable_value_ptr.
4248 (struct ipa_sym_addresses): Likewise.
4249 (symbol_list): Likewise.
4250 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4251 accessing gdb_collect directly.
4252 (gdb_collect_ptr_type): New typedef.
4253 (get_raw_reg_ptr_type): New typedef.
4254 (get_trace_state_variable_value_ptr_type): New typedef.
4255 (set_trace_state_variable_value_ptr_type): New typedef.
4256 (gdb_collect_ptr): New global.
4257 (get_raw_reg_ptr): New global.
4258 (get_trace_state_variable_value_ptr): New global.
4259 (set_trace_state_variable_value_ptr): New global.
4260 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4261 accessing get_raw_reg directly.
4262 (get_get_tsv_func_addr): Likewise for
4263 get_trace_state_variable_value_ptr.
4264 (get_set_tsv_func_addr): Likewise for
4265 set_trace_state_variable_value_ptr.
4266 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4268 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4270 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4272 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4274 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4276 (relocate_instruction): Remove own_buf.
4277 * server.c (own_buf): Make global.
4278 (handle_v_requests): Make global.
4279 * server.h (own_buf): New declaration.
4280 (handle_v_requests): New prototype.
4282 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4285 * linux-s390-low.c (add_insns): New function.
4286 (s390_emit_prologue): New function.
4287 (s390_emit_epilogue): New function.
4288 (s390_emit_add): New function.
4289 (s390_emit_sub): New function.
4290 (s390_emit_mul): New function.
4291 (s390_emit_lsh): New function.
4292 (s390_emit_rsh_signed): New function.
4293 (s390_emit_rsh_unsigned): New function.
4294 (s390_emit_ext): New function.
4295 (s390_emit_log_not): New function.
4296 (s390_emit_bit_and): New function.
4297 (s390_emit_bit_or): New function.
4298 (s390_emit_bit_xor): New function.
4299 (s390_emit_bit_not): New function.
4300 (s390_emit_equal): New function.
4301 (s390_emit_less_signed): New function.
4302 (s390_emit_less_unsigned): New function.
4303 (s390_emit_ref): New function.
4304 (s390_emit_if_goto): New function.
4305 (s390_emit_goto): New function.
4306 (s390_write_goto_address): New function.
4307 (s390_emit_litpool): New function.
4308 (s390_emit_const): New function.
4309 (s390_emit_call): New function.
4310 (s390_emit_reg): New function.
4311 (s390_emit_pop): New function.
4312 (s390_emit_stack_flush): New function.
4313 (s390_emit_zero_ext): New function.
4314 (s390_emit_swap): New function.
4315 (s390_emit_stack_adjust): New function.
4316 (s390_emit_set_r2): New function.
4317 (s390_emit_int_call_1): New function.
4318 (s390_emit_void_call_2): New function.
4319 (s390_emit_eq_goto): New function.
4320 (s390_emit_ne_goto): New function.
4321 (s390_emit_lt_goto): New function.
4322 (s390_emit_le_goto): New function.
4323 (s390_emit_gt_goto): New function.
4324 (s390_emit_ge_goto): New function.
4325 (s390x_emit_prologue): New function.
4326 (s390x_emit_epilogue): New function.
4327 (s390x_emit_add): New function.
4328 (s390x_emit_sub): New function.
4329 (s390x_emit_mul): New function.
4330 (s390x_emit_lsh): New function.
4331 (s390x_emit_rsh_signed): New function.
4332 (s390x_emit_rsh_unsigned): New function.
4333 (s390x_emit_ext): New function.
4334 (s390x_emit_log_not): New function.
4335 (s390x_emit_bit_and): New function.
4336 (s390x_emit_bit_or): New function.
4337 (s390x_emit_bit_xor): New function.
4338 (s390x_emit_bit_not): New function.
4339 (s390x_emit_equal): New function.
4340 (s390x_emit_less_signed): New function.
4341 (s390x_emit_less_unsigned): New function.
4342 (s390x_emit_ref): New function.
4343 (s390x_emit_if_goto): New function.
4344 (s390x_emit_const): New function.
4345 (s390x_emit_call): New function.
4346 (s390x_emit_reg): New function.
4347 (s390x_emit_pop): New function.
4348 (s390x_emit_stack_flush): New function.
4349 (s390x_emit_zero_ext): New function.
4350 (s390x_emit_swap): New function.
4351 (s390x_emit_stack_adjust): New function.
4352 (s390x_emit_int_call_1): New function.
4353 (s390x_emit_void_call_2): New function.
4354 (s390x_emit_eq_goto): New function.
4355 (s390x_emit_ne_goto): New function.
4356 (s390x_emit_lt_goto): New function.
4357 (s390x_emit_le_goto): New function.
4358 (s390x_emit_gt_goto): New function.
4359 (s390x_emit_ge_goto): New function.
4360 (s390_emit_ops): New function.
4361 (struct linux_target_ops): Fill in emit_ops hook.
4363 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4366 * Makefile.in: Add s390 IPA files.
4367 * configure.srv: Build IPA for s390.
4368 * linux-s390-ipa.c: New file.
4369 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4370 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4371 (tdesc_s390_linux32): Likewise.
4372 (init_registers_s390_linux32v1): Likewise.
4373 (tdesc_s390_linux32v1): Likewise.
4374 (init_registers_s390_linux32v2): Likewise.
4375 (tdesc_s390_linux32v2): Likewise.
4376 (init_registers_s390_linux64): Likewise.
4377 (tdesc_s390_linux64): Likewise.
4378 (init_registers_s390_linux64v1): Likewise.
4379 (tdesc_s390_linux64v1): Likewise.
4380 (init_registers_s390_linux64v2): Likewise.
4381 (tdesc_s390_linux64v2): Likewise.
4382 (init_registers_s390_te_linux64): Likewise.
4383 (tdesc_s390_te_linux64): Likewise.
4384 (init_registers_s390_vx_linux64): Likewise.
4385 (tdesc_s390_vx_linux64): Likewise.
4386 (init_registers_s390_tevx_linux64): Likewise.
4387 (tdesc_s390_tevx_linux64): Likewise.
4388 (init_registers_s390x_linux64): Likewise.
4389 (tdesc_s390x_linux64): Likewise.
4390 (init_registers_s390x_linux64v1): Likewise.
4391 (tdesc_s390x_linux64v1): Likewise.
4392 (init_registers_s390x_linux64v2): Likewise.
4393 (tdesc_s390x_linux64v2): Likewise.
4394 (init_registers_s390x_te_linux64): Likewise.
4395 (tdesc_s390x_te_linux64): Likewise.
4396 (init_registers_s390x_vx_linux64): Likewise.
4397 (tdesc_s390x_vx_linux64): Likewise.
4398 (init_registers_s390x_tevx_linux64): Likewise.
4399 (tdesc_s390x_tevx_linux64): Likewise.
4400 (have_hwcap_s390_vx): New static variable.
4401 (s390_arch_setup): Fill have_hwcap_s390_vx.
4402 (s390_get_thread_area): New function.
4403 (s390_ft_entry_gpr_esa): New const.
4404 (s390_ft_entry_gpr_zarch): New const.
4405 (s390_ft_entry_misc): New const.
4406 (s390_ft_entry_fr): New const.
4407 (s390_ft_entry_vr): New const.
4408 (s390_ft_main_31): New const.
4409 (s390_ft_main_64): New const.
4410 (s390_ft_exit_fr): New const.
4411 (s390_ft_exit_vr): New const.
4412 (s390_ft_exit_misc): New const.
4413 (s390_ft_exit_gpr_esa): New const.
4414 (s390_ft_exit_gpr_zarch): New const.
4415 (append_insns): New function.
4416 (s390_relocate_instruction): New function.
4417 (s390_install_fast_tracepoint_jump_pad): New function.
4418 (s390_get_min_fast_tracepoint_insn_len): New function.
4419 (s390_get_ipa_tdesc_idx): New function.
4420 (struct linux_target_ops): Wire in the above functions.
4421 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4422 * linux-s390-tdesc.h: New file.
4424 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4426 * linux-s390-low.c (s390_supports_tracepoints): New function.
4427 (struct linux_target_ops): Fill supports_tracepoints hook.
4429 2016-03-18 Yao Qi <yao.qi@linaro.org>
4431 * linux-low.c (lwp_signal_can_be_delivered): New function.
4432 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4434 2016-03-18 Yao Qi <yao.qi@linaro.org>
4436 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4437 0 if signal is enqueued. Remove 'signal' from one debugging
4438 message. Move one debugging message to some lines below.
4439 Remove code setting 'signal' to 0.
4441 2016-03-18 Yao Qi <yao.qi@linaro.org>
4443 * linux-low.c (linux_low_filter_event): Remove redundant
4444 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4446 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4448 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4449 (struct linux_target_ops): Wire in the above.
4451 2016-03-03 Yao Qi <yao.qi@linaro.org>
4453 * linux-low.c: Update comments to start_step_over.
4455 2016-03-03 Yao Qi <yao.qi@linaro.org>
4458 * linux-low.c (handle_extended_wait): Set child suspended
4459 if event_lwp->bp_reinsert isn't zero.
4461 2016-03-02 Yao Qi <yao.qi@linaro.org>
4463 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4464 enqueue_pending_signal.
4466 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4468 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4471 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4473 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4474 (s390_regmap_3264) [!__s390x__]: New global.
4475 (s390_collect_ptrace_register): Skip map entries containing -1.
4476 (s390_supply_ptrace_register): Ditto.
4477 (s390_fill_gprs_high): New function.
4478 (s390_store_gprs_high): New function.
4479 (s390_regsets): Add NT_S390_HIGH_GPRS.
4480 (s390_get_hwcap): Enable on 31-bit.
4481 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4482 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4483 Detect NT_S390_HIGH_GPRS.
4484 (s390_usrregs_info_3264): Enable on 31-bit.
4485 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4486 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4488 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4491 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4492 * configure.srv: Ditto.
4493 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4494 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4495 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4496 (init_registers_amd64_linux): Remove prototype.
4497 (tdesc_amd64_linux): Remove declaration.
4498 (get_ipa_tdesc): New function.
4499 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4500 initialize remaining tdescs.
4501 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4502 (init_registers_i386_linux): Remove prototype.
4503 (tdesc_i386_linux): Remove declaration.
4504 (get_ipa_tdesc): New function.
4505 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4506 initialize remaining tdescs.
4507 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4508 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4509 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4510 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4511 (x86_get_ipa_tdesc_idx): New function.
4512 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4513 * linux-x86-tdesc.h: New file.
4514 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4515 (target_get_ipa_tdesc_idx): New macro.
4516 * tracepoint.c (ipa_tdesc_idx): New macro.
4517 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4518 (symbol_list): Add ipa_tdesc_idx.
4519 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4520 (ipa_tdesc): Remove.
4521 (ipa_tdesc_idx): New variable.
4522 (get_context_regcache): Use get_ipa_tdesc.
4523 (gdb_collect): Ditto.
4525 * tracepoint.h (get_ipa_tdesc): New prototype.
4526 (ipa_tdesc): Remove.
4528 2016-02-24 Pedro Alves <palves@redhat.com>
4530 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4531 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4532 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4533 Factor out common code between the USE_SIGTRAP_SIGINFO and
4534 !USE_SIGTRAP_SIGINFO blocks.
4535 (linux_low_filter_event): Call save_stop_reason instead of
4536 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4538 (linux_wait_1): Update comments.
4540 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4542 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4543 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4544 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4545 ppc_insert_point, ppc_remove_point.
4547 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4549 * linux-s390-low.c (s390_supports_z_point_type): New function.
4550 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4552 2016-02-16 Yao Qi <yao.qi@linaro.org>
4554 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4555 PC. Get pc from regcache_read_pc.
4557 2016-02-12 Yao Qi <yao.qi@linaro.org>
4559 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4560 or linux_get_pc_32bit.
4561 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4563 2016-02-12 Yao Qi <yao.qi@linaro.org>
4565 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4566 arm_linux_get_next_pcs_fixup.
4568 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4570 * tracepoint.c (x_tracepoint_action_download): Change
4571 write_inferior_data_ptr to write_inferior_data_pointer.
4572 (cmd_qtstart): Likewise.
4573 (write_inferior_data_ptr): Remove.
4574 (download_agent_expr): Change write_inferior_data_ptr to
4575 write_inferior_data_pointer.
4576 (download_tracepoint_1): Likewise.
4577 (download_tracepoint): Likewise.
4578 (download_trace_state_variables): Likewise.
4580 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4581 Marcin Kościelnicki <koriakin@0x04.net>
4583 * tracepoint.c (struct tracepoint_action_ops): Remove.
4584 (struct tracepoint_action): Remove ops.
4585 (m_tracepoint_action_download, r_tracepoint_action_download)
4586 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4587 size and offset accordingly.
4588 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4589 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4590 (tracepoint_action_send, tracepoint_action_download): New functions.
4591 Helpers for trace action handlers.
4592 (add_tracepoint_action): Remove setup actions ops.
4593 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4595 2016-02-10 Yao Qi <yao.qi@linaro.org>
4597 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4599 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4601 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4603 * configure: Regenerate.
4605 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4607 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4608 void * to gdb_byte *.
4609 * linux-low.c (siginfo_fixup): Likewise.
4610 (linux_xfer_siginfo): Likewise.
4611 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4613 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4615 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4617 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4619 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4621 * linux-x86-low.c [__x86_64__]: Include
4622 "nat/amd64-linux-siginfo.h".
4623 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4624 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4625 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4626 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4627 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4628 (cpt_si_fd, si_timerid, si_overrun): Move from
4629 nat/amd64-linux-siginfo.c.
4630 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4632 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4634 * server.c (skip_to_semicolon): Remove.
4635 (process_point_options): Use strchrnul instead of
4638 2016-01-26 Yao Qi <yao.qi@linaro.org>
4640 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4641 * linux-low.c (install_software_single_step_breakpoints): Don't
4642 call regcache_read_pc.
4643 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4646 2016-01-26 Yao Qi <yao.qi@linaro.org>
4648 * linux-low.c (install_software_single_step_breakpoints): Call
4649 regcache_read_pc instead of get_pc.
4651 2016-01-26 Yao Qi <yao.qi@linaro.org>
4653 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4654 (unblock_async_io): Rename to ...
4655 (block_unblock_async_io): ... it. New function.
4656 (enable_async_io): Don't install SIGIO handler. Unblock it
4658 (disable_async_io): Don't ignore SIGIO. Block it instead.
4659 (initialize_async_io): Install SIGIO handler. Don't call
4662 2016-01-26 Yao Qi <yao.qi@linaro.org>
4664 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4665 first character is '\003', call *the_target->request_interrupt.
4667 2016-01-25 Yao Qi <yao.qi@linaro.org>
4669 * remote-utils.c (new_thread_notify): Remove.
4670 (dead_thread_notify): Likewise.
4671 * remote-utils.h (new_thread_notify): Remove declaration.
4672 (dead_thread_notify): Likewise.
4674 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4676 * gdb.trace/pending.exp: Fix expected message on continue.
4678 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4680 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4681 it works properly on big-endian machines where sizeof (CORE_ADDR)
4684 2016-01-21 Pedro Alves <palves@redhat.com>
4686 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4687 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4688 * configure: Regenerate.
4690 2016-01-21 Yao Qi <yao.qi@linaro.org>
4692 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4693 is_thumb and set it according to CPSR saved on the stack.
4694 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4695 arm_sigreturn_next_pc.
4697 2016-01-18 Yao Qi <yao.qi@linaro.org>
4699 * linux-low.c (linux_set_pc_64bit): New function.
4700 (linux_get_pc_64bit): New function.
4701 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4703 * linux-sparc-low.c (debug_threads): Remove declaration.
4704 (sparc_get_pc): Remove.
4705 (the_low_target): Use linux_get_pc_64bit instead of
4707 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4708 (the_low_target): Use linux_get_pc_64bit and
4711 2016-01-18 Yao Qi <yao.qi@linaro.org>
4713 * linux-arm-low.c (debug_threads): Remove declaration.
4714 (arm_get_pc, arm_set_pc): Remove.
4715 (the_low_target): Use linux_get_pc_32bit and
4717 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4718 (the_low_target): Use linux_get_pc_32bit and
4720 * linux-cris-low.c (debug_threads): Remove declaration.
4721 (cris_get_pc, cris_set_pc,): Remove.
4722 (the_low_target): Use linux_get_pc_32bit and
4724 * linux-crisv32-low.c (debug_threads): Remove declaration.
4725 (cris_get_pc, cris_set_pc): Remove.
4726 (the_low_target): Use linux_get_pc_32bit and
4728 * linux-low.c: Include inttypes.h.
4729 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4730 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4731 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4732 (the_low_target): Use linux_get_pc_32bit and
4734 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4735 (the_low_target): Use linux_get_pc_32bit and
4737 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4738 (the_low_target): Use linux_get_pc_32bit and
4740 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4741 (the_low_target): Use linux_get_pc_32bit and
4743 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4744 (the_low_target): Use linux_get_pc_32bit and
4747 2016-01-18 Gary Benson <gbenson@redhat.com>
4749 * configure.ac (AC_FUNC_FORK): New check.
4750 * config.in: Regenerate.
4751 * configure: Likewise.
4753 2016-01-14 Yao Qi <yao.qi@linaro.org>
4755 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4756 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4757 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4758 arm_get_next_pcs_ctor.
4760 2016-01-12 Josh Stone <jistone@redhat.com>
4761 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4763 * inferiors.h: Include "gdb_vecs.h".
4764 (struct process_info): Add syscalls_to_catch.
4765 * inferiors.c (remove_process): Free syscalls_to_catch.
4766 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4767 syscall_return stops.
4768 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4769 * server.c (handle_general_set): Handle QCatchSyscalls.
4770 (handle_query): Report support for QCatchSyscalls.
4771 * target.h (struct target_ops): Add supports_catch_syscall.
4772 (target_supports_catch_syscall): New macro.
4773 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4774 (struct lwp_info): Add syscall_state.
4775 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4776 Maintain syscall_state and syscalls_to_catch across exec.
4777 (get_syscall_trapinfo): New function, proxy to the_low_target.
4778 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4779 (linux_low_filter_event): Toggle syscall_state entry/return for
4780 syscall traps, and set it ignored for all others.
4781 (gdb_catching_syscalls_p): New function.
4782 (gdb_catch_this_syscall_p): New function.
4783 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4784 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4785 (linux_supports_catch_syscall): New function.
4786 (linux_target_ops): Install it.
4787 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4788 (the_low_target): Install it.
4790 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4792 * acinclude.m4: Include new ../warning.m4 file.
4793 * configure: Regenerated.
4794 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4796 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4798 * ax.c (is_goto_target): Mark static.
4799 * linux-low.c (register_addr): Likewise.
4800 (linux_fetch_registers, linux_store_registers): Likewise.
4801 * mem-break.c (any_persistent_commands): Fix old prototype.
4802 (add_commands_to_breakpoint): Mark static.
4803 * regcache.c (find_register_by_name): Delete unused func.
4804 * remote-utils.c (hex_or_minus_one): Mark static.
4805 * server.c (monitor_show_help): Mark static.
4806 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4807 handle_v_requests): Likewise.
4809 2016-01-12 Pedro Alves <palves@redhat.com>
4811 Remove use of the registered trademark symbol throughout.
4813 2016-01-08 Yao Qi <yao.qi@linaro.org>
4815 * remote-utils.c (getpkt): If c is '\003', call target hook
4818 2016-01-06 Yao Qi <yao.qi@linaro.org>
4820 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4821 linux-aarch32-low.c.
4822 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4823 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4824 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4825 (thumb2_breakpoint): Declare.
4826 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4827 linux-aarch32-low.h.
4828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4829 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4830 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4832 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4834 * gdbreplay.c (gdbreplay_version): Change copyright year in
4836 * server.c (gdbserver_version): Likewise.
4838 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4840 * server.c (crc32_table): Delete.
4841 (crc32): Use libiberty's xcrc32 function.
4843 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4845 * lynx-low.c (lynx_delete_thread_callback): New function.
4846 (lynx_mourn): Properly delete our process and all of its
4847 threads. Remove call to clear_inferiors.
4849 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4851 * target.c (thread_search_callback): Add check that
4852 the thread_stopped target callback is not NULL before
4855 2015-12-21 Yao Qi <yao.qi@linaro.org>
4857 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4860 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4862 * server.c (handle_query): Call target_supports_software_single_step.
4864 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4866 * linux-low.c (single_step): New function.
4867 (linux_resume_one_lwp_throw): Call single_step.
4868 (start_step_over): Likewise.
4870 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4872 * Makefile.in (SFILES): Append arch/arm-linux.c,
4873 arch/arm-get-next-pcs.c.
4874 (arm-linux.o): New rule.
4875 (arm-get-next-pcs.o): New rule.
4876 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4878 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4879 to linux-aarch32-low.c.
4880 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4881 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4882 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4883 (thumb2_breakpoint_len): Likewise.
4884 (arm_is_thumb_mode): Make non-static.
4885 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4886 from linux-aarch32-low.c.
4887 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4888 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4889 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4890 (thumb2_breakpoint_len): Likewise.
4891 (arm_is_thumb_mode): New declaration.
4892 * linux-arm-low.c: Include arch/arm-linux.h
4893 aarch/arm-get-next-pcs.h, sys/syscall.h.
4894 (get_next_pcs_ops): New struct.
4895 (get_next_pcs_addr_bits_remove): New function.
4896 (get_next_pcs_is_thumb): New function.
4897 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4898 (arm_sigreturn_next_pc): Likewise.
4899 (get_next_pcs_syscall_next_pc): Likewise.
4900 (arm_gdbserver_get_next_pcs): Likewise.
4901 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4903 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4904 * server.h: Include gdb_vecs.h.
4906 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4908 * Makefile.in (SFILES): Append common/common-regcache.c.
4909 (OBS): Append common-regcache.o.
4910 (common-regcache.o): New rule.
4911 * regcache.c (init_register_cache): Initialize cache to
4913 (regcache_raw_read_unsigned): New function.
4914 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4915 register_status enum.
4917 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4919 * linux-aarch64-low.c (the_low_targets): Rename
4920 breakpoint_reinsert_addr to get_next_pcs.
4921 * linux-arm-low.c (the_low_targets): Likewise.
4922 * linux-bfin-low.c (the_low_targets): Likewise.
4923 * linux-cris-low.c (the_low_targets): Likewise.
4924 * linux-crisv32-low.c (the_low_targets): Likewise.
4925 * linux-low.c (can_software_single_step): Likewise.
4926 (install_software_single_step_breakpoints): New function.
4927 (start_step_over): Use install_software_single_step_breakpoints.
4928 * linux-low.h: New CORE_ADDR vector.
4929 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4931 * linux-mips-low.c (the_low_targets): Likewise.
4932 * linux-nios2-low.c (the_low_targets): Likewise.
4933 * linux-sparc-low.c (the_low_targets): Likewise.
4935 2015-12-17 Pedro Alves <palves@redhat.com>
4937 * linux-low.c (linux_kill_one_lwp): Remove references to
4939 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4941 (linux_init_signals): Delete.
4942 (initialize_low): Adjust.
4943 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4945 2015-12-16 Pedro Alves <palves@redhat.com>
4947 * configure.ac (compiler warning flags): When testing a
4948 -Wno-foo option, check whether -Wfoo works instead.
4949 * configure: Regenerate.
4951 2015-12-11 Don Breazeal <donb@codesourcery.com>
4953 * server.c (process_serial_event): Don't exit from gdbserver
4954 in remote mode if there are still active inferiors.
4956 2015-12-11 Yao Qi <yao.qi@linaro.org>
4958 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4959 arm_breakpoint_at if the process is 32-bit.
4961 2015-12-11 Yao Qi <yao.qi@linaro.org>
4963 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4966 2015-12-07 Yao Qi <yao.qi@linaro.org>
4968 * configure.srv: Append arm.o to srv_tgtobj for
4969 aarch64*-*-linux* target.
4970 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4971 from linux-arm-low.c.
4972 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4973 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4974 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4975 (thumb2_breakpoint_len): Likewise.
4976 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4977 (arm_breakpoint_kinds): Likewise.
4978 (arm_breakpoint_kind_from_pc): Likewise.
4979 (arm_sw_breakpoint_from_kind): Likewise.
4980 (arm_breakpoint_kind_from_current_state): Likewise.
4981 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4982 (arm_sw_breakpoint_from_kind): Declare.
4983 (arm_breakpoint_kind_from_current_state): Declare.
4984 (arm_breakpoint_at): Declare.
4985 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4986 arm_sw_breakpoint_from_kind if process is 32-bit.
4987 (aarch64_breakpoint_kind_from_pc): New function.
4988 (aarch64_breakpoint_kind_from_current_state): New function.
4989 (the_low_target): Initialize fields breakpoint_kind_from_pc
4990 and breakpoint_kind_from_current_state.
4991 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4992 linux-aarch32-low.c.
4993 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4994 (arm_breakpoint, arm_breakpoint_len): Likewise.
4995 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4996 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4997 (arm_is_thumb_mode): Likewise.
4998 (arm_breakpoint_at): Likewise.
4999 (arm_breakpoint_kind_from_pc): Likewise.
5000 (arm_sw_breakpoint_from_kind): Likewise.
5001 (arm_breakpoint_kind_from_current_state): Likewise.
5004 2015-08-04 Yao Qi <yao.qi@linaro.org>
5006 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5007 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5008 * server.c (extended_protocol): Remove "static".
5009 * server.h (extended_protocol): Declare it.
5011 2015-12-04 Josh Stone <jistone@redhat.com>
5013 * target.h (struct target_ops) <arch_setup>: Rename to ...
5014 (struct target_ops) <post_create_inferior>: ... this.
5015 (target_arch_setup): Rename to ...
5016 (target_post_create_inferior): ... this, calling post_create_inferior.
5017 * server.c (start_inferior): Update target_arch_setup calls to
5018 target_post_create_inferior.
5019 * linux-low.c (linux_low_ptrace_options): Forward declare.
5020 (linux_arch_setup): Update its comment for general use.
5021 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5022 (struct linux_target_ops): Use linux_post_create_inferior.
5023 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5024 to post_create_inferior.
5025 * nto-low.c (struct nto_target_ops): Likewise.
5026 * spu-low.c (struct spu_target_ops): Likewise.
5027 * win32-low.c (struct win32_target_ops): Likewise.
5029 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5031 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5033 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5035 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5036 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5037 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5038 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5039 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5040 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5041 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5042 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5043 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5044 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5045 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5046 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5048 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5050 * linux-low.c (linux_look_up_symbols): Don't call
5051 linux_supports_traceclone.
5052 * linux-low.h (thread_db_init): Remove use_events argument.
5053 * thread-db.c (thread_db_use_event): Remove global variable.
5054 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5055 (struct thread_db) <td_create_bp>: Remove field.
5056 (thread_db_create_event): Remove function.
5057 (thread_db_enable_reporting): Likewise.
5058 (find_one_thread): Don't check for thread_db_use_events.
5059 (attach_thread): Likewise.
5060 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5061 (try_thread_db_load_1): Don't check for thread_db_use_events.
5062 (thread_db_init): Remove use_events argument and thread events
5064 (remove_thread_event_breakpoints): Remove function.
5065 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5067 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5069 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5071 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5072 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5073 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5074 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5075 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5077 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5079 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5080 * linux-low.c (can_hardware_single_step): Use
5081 supports_hardware_single_step.
5082 (can_software_single_step): New function.
5083 (start_step_over): Call can_software_single_step.
5084 (linux_supports_hardware_single_step): New function.
5085 (struct target_ops) <supports_software_single_step>: Initialize.
5086 * linux-low.h (struct linux_target_ops)
5087 <supports_hardware_single_step>: Initialize.
5088 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5089 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5090 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5091 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5092 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5093 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5094 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5095 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5096 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5097 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5099 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5100 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5102 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5104 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5107 * target.h (struct target_ops): <supports_software_single_step>:
5109 (target_supports_software_single_step): New macro.
5111 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5113 * linux-low.c (linux_wait_1): Fix pc advance condition.
5114 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5115 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5117 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5119 * linux-arm-low.c (arm_is_thumb_mode): New function.
5120 (arm_breakpoint_at): Use arm_is_thumb_mode.
5121 (arm_breakpoint_kind_from_current_state): New function.
5122 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5124 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5125 (linux_breakpoint_kind_from_current_state): New function.
5126 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5127 * linux-low.h (struct linux_target_ops)
5128 <breakpoint_kind_from_current_state>: New field.
5129 * target.h (struct target_ops): Likewise.
5130 (target_breakpoint_kind_from_current_state): New macro.
5132 2015-11-30 Pedro Alves <palves@redhat.com>
5134 * linux-low.c (linux_resume): Wake up the event loop before
5137 2015-11-30 Pedro Alves <palves@redhat.com>
5139 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5141 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5143 * target.c (struct thread_search): New structure.
5144 (thread_search_callback): New function.
5145 (prev_general_thread): New global.
5146 (prepare_to_access_memory, done_accessing_memory): New functions.
5147 * target.h (prepare_to_access_memory, done_accessing_memory):
5148 Replace macros with function declarations.
5150 2015-11-30 Pedro Alves <palves@redhat.com>
5153 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5154 report TARGET_WAITKIND_NO_RESUMED.
5155 * remote-utils.c (prepare_resume_reply): Handle
5156 TARGET_WAITKIND_NO_RESUMED.
5157 * server.c (report_no_resumed): New global.
5158 (handle_query) <qSupported>: Handle "no-resumed+". Report
5159 "no-resumed+" support.
5160 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5161 return error if the client doesn't support no-resumed events.
5162 (push_stop_notification): New function.
5163 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5164 events if the client supports them.
5166 2015-11-30 Pedro Alves <palves@redhat.com>
5168 * linux-low.c (thread_still_has_status_pending_p): Don't check
5170 (lwp_resumed): New function.
5171 (status_pending_p_callback): Return early if the LWP is not
5172 supposed to be resumed.
5174 2015-11-30 Pedro Alves <palves@redhat.com>
5176 * linux-low.c (handle_extended_wait): Assert that the LWP's
5177 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5178 thread create events, leave the new child's status pending.
5179 (linux_low_filter_event): If GDB wants to hear about thread exit
5180 events, leave the LWP marked dead and don't delete it.
5181 (linux_wait_for_event_filtered): Don't check for thread exit.
5182 (filter_exit_event): New function.
5183 (linux_wait_1): Use it, when returning an exit event.
5184 (linux_resume_one_lwp_throw): Assert that the LWP's
5185 waitstatus is TARGET_WAITKIND_IGNORE.
5186 * remote-utils.c (prepare_resume_reply): Handle
5187 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5188 * server.c (report_thread_events): New global.
5189 (handle_general_set): Handle QThreadEvents.
5190 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5191 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5192 TARGET_WAITKIND_THREAD_EXITED.
5193 * server.h (report_thread_events): Declare.
5195 2015-11-30 Pedro Alves <palves@redhat.com>
5197 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5198 the thread's last_resume_kind was resume_stop.
5200 2015-11-30 Pedro Alves <palves@redhat.com>
5202 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5205 2015-11-30 Pedro Alves <palves@redhat.com>
5207 * server.c (handle_v_requests): Handle vCtrlC.
5209 2015-11-30 Pedro Alves <palves@redhat.com>
5211 * gdbthread.h (find_any_thread_of_pid): Declare.
5212 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5214 * server.c (handle_query): If current_thread is NULL, look for
5215 another thread of the selected process.
5217 2015-11-26 Daniel Colascione <dancol@dancol.org>
5218 Simon Marchi <simon.marchi@ericsson.com>
5220 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5221 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5223 * target.h (struct target_ops) <thread_name>: New field.
5224 (target_thread_name): New macro.
5226 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5228 * regcache.h (regcache_invalidate_pid): Add declaration.
5229 * regcache.c (regcache_invalidate_pid): New function, extracted
5230 from regcache_invalidate.
5231 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5232 Add trivial documentation comment.
5233 * lynx-low.c: Use regcache_invalidate_pid instead of
5234 regcache_invalidate.
5236 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5238 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5239 and Elf64_auxv_t if the target is Android.
5241 2015-11-22 Doug Evans <xdje42@gmail.com>
5243 * target.h: #include <sys/types.h>.
5245 2015-11-19 Pedro Alves <palves@redhat.com>
5247 * linux-low.c (linux_process_qsupported): Change prototype.
5249 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5251 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5252 and adjust to loop over all features.
5253 * server.c (handle_query) <qSupported>: Adjust to call
5254 target_process_qsupported once, passing it a vector of unprocessed
5256 * target.h (struct target_ops) <process_qsupported>: Change
5258 (target_process_qsupported): Adjust.
5260 2015-11-19 Pedro Alves <palves@redhat.com>
5262 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5264 * configure: Regenerate.
5266 2015-11-19 Pedro Alves <palves@redhat.com>
5268 * configure: Regenerate.
5270 2015-11-19 Yao Qi <yao.qi@linaro.org>
5272 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5275 2015-11-19 Yao Qi <yao.qi@linaro.org>
5277 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5278 (struct aarch64_operand): Move enum out.
5280 2015-11-19 Yao Qi <yao.qi@linaro.org>
5282 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5283 struct user_fpsimd_state *.
5284 (aarch64_store_fpregset): Likewise.
5286 2015-11-19 Yao Qi <yao.qi@linaro.org>
5288 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5289 struct user_pt_regs *.
5290 (aarch64_store_gregset): Likewise.
5292 2015-11-18 Pedro Alves <palves@redhat.com>
5294 * Makefile.in (all_object_files): Add $IPA_OBJS.
5296 2015-11-17 Pedro Alves <palves@redhat.com>
5298 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5299 GDB_SIGNAL_0 and gdb_signal_to_string.
5301 2015-11-17 Pedro Alves <palves@redhat.com>
5303 * win32-low.c (handle_output_debug_string): Remove parameter.
5304 (win32_kill): Remove our_status local and adjust call to
5305 handle_output_debug_string.
5306 (get_child_debug_event): Adjust call to
5307 handle_output_debug_string.
5309 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5311 * linux-mips-low.c (mips_fill_gregset): Add cast.
5312 (mips_store_gregset): Likewise.
5313 (mips_fill_fpregset): Likewise.
5314 (mips_store_fpregset): Likewise.
5316 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5318 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5321 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5323 * linux-mips-low.c (mips_linux_new_thread): Change type of
5324 watch_type to enum target_hw_bp_type.
5326 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5328 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5329 Change return type to arm_hwbp_type.
5331 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5333 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5334 (arm_store_gregset): Likewise.
5335 * linux-arm-low.c (arm_get_hwcap): Likewise.
5336 (arm_read_description): Likewise.
5338 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5340 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5342 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5344 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5345 (ppc_fill_vsxregset): Likewise.
5346 (ppc_store_vsxregset): Likewise.
5347 (ppc_fill_vrregset): Likewise.
5348 (ppc_store_vrregset): Likewise.
5349 (ppc_fill_evrregset): Likewise.
5350 (ppc_store_evrregset): Likewise.
5352 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5354 * linux-ppc-low.c (ppc_usrregs_info): Remove
5355 forward-declaration.
5356 (ppc_arch_setup): Move lower in file.
5358 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5360 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5361 (ps_pdwrite): Likewise.
5363 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5365 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5366 to after assert checks.
5368 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5370 * proc-service.c (ps_pdread): Add/adjust casts.
5371 (ps_pdwrite): Add/adjust casts.
5373 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5375 * server.c (handle_search_memory_1): Cast return value of
5378 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5380 * server.c (write_qxfer_response): Change type of data to
5383 2015-10-29 Pedro Alves <palves@redhat.com>
5385 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5387 2015-10-29 Pedro Alves <palves@redhat.com>
5389 * tracepoint.c (clear_installed_tracepoints): Add casts.
5391 2015-10-29 Pedro Alves <palves@redhat.com>
5393 * server.c (handle_v_cont, process_serial_event): Add enum
5394 gdb_signal casts to signal parsing code.
5396 2015-10-29 Pedro Alves <palves@redhat.com>
5398 * linux-low.h (NULL_REGSET): Define.
5399 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5400 * linux-arm-low.c (arm_regsets): Likewise.
5401 * linux-crisv32-low.c (cris_regsets): Likewise.
5402 * linux-m68k-low.c (m68k_regsets): Likewise.
5403 * linux-mips-low.c (mips_regsets): Likewise.
5404 * linux-nios2-low.c (nios2_regsets): Likewise.
5405 * linux-ppc-low.c (ppc_regsets): Likewise.
5406 * linux-s390-low.c (s390_regsets): Likewise.
5407 * linux-sh-low.c (sh_regsets): Likewise.
5408 * linux-sparc-low.c (sparc_regsets): Likewise.
5409 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5410 * linux-tile-low.c (tile_regsets): Likewise.
5411 * linux-x86-low.c (x86_regsets): Likewise.
5412 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5414 2015-10-29 Pedro Alves <palves@redhat.com>
5416 * linux-low.h (NULL_REGSET): Define.
5417 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5418 * linux-arm-low.c (arm_regsets): Likewise.
5419 * linux-crisv32-low.c (cris_regsets): Likewise.
5420 * linux-m68k-low.c (m68k_regsets): Likewise.
5421 * linux-mips-low.c (mips_regsets): Likewise.
5422 * linux-nios2-low.c (nios2_regsets): Likewise.
5423 * linux-ppc-low.c (ppc_regsets): Likewise.
5424 * linux-s390-low.c (s390_regsets): Likewise.
5425 * linux-sh-low.c (sh_regsets): Likewise.
5426 * linux-sparc-low.c (sparc_regsets): Likewise.
5427 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5428 * linux-tile-low.c (tile_regsets): Likewise.
5429 * linux-x86-low.c (x86_regsets): Likewise.
5430 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5432 2015-10-26 Doug Evans <dje@google.com>
5434 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5436 2015-10-26 Doug Evans <dje@google.com>
5438 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5440 2015-10-26 Doug Evans <dje@google.com>
5442 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5444 (attach_thread, find_new_threads_callback): Ditto.
5446 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5448 * mem-break.h (set_breakpoint_data): Remove.
5450 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5452 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5453 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5454 (initialize_low): Remove set_breakpoint_data call.
5455 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5456 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5457 (initialize_low): Remove set_breakpoint_data call.
5458 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5459 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5460 (initialize_low): Remove set_breakpoint_data call.
5462 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5464 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5465 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5466 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5467 * target.h (target_breakpoint_kind_from_pc): New macro.
5469 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5471 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5472 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5473 the default breakpoint kind.
5475 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5477 * linux-arm-low.c (arm_supports_z_point_type): Add software
5480 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5482 * linux-arm-low.c: Refactor breakpoint definitions.
5483 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5484 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5486 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5488 * Makefile.in: Add arm.c/o.
5489 * configure.srv: Likewise.
5490 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5491 (arm_breakpoint_kind_from_pc): New function.
5492 (arm_sw_breakpoint_from_kind): Return proper kind.
5493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5495 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5497 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5499 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5500 (struct raw_breakpoint) <size>: Remove.
5501 (struct raw_breakpoint) <kind>: Add.
5502 (bp_size): New function.
5503 (bp_opcode): Likewise.
5504 (find_raw_breakpoint_at): Adjust for kind.
5505 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5506 (remove_memory_breakpoint): Adjust for kind call bp_size.
5507 (set_raw_breakpoint_at): Adjust for kind.
5508 (set_breakpoint): Likewise.
5509 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5510 (delete_raw_breakpoint): Adjust for kind.
5511 (delete_breakpoint): Likewise.
5512 (find_gdb_breakpoint): Likewise.
5513 (set_gdb_breakpoint_1): Likewise.
5514 (set_gdb_breakpoint): Likewise.
5515 (delete_gdb_breakpoint_1): Likewise.
5516 (delete_gdb_breakpoint): Likewise.
5517 (uninsert_raw_breakpoint): Likewise.
5518 (reinsert_raw_breakpoint): Likewise.
5519 (set_breakpoint_data): Remove.
5520 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5521 (check_mem_read): Adjust for kind call bp_size.
5522 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5523 (clone_one_breakpoint): Adjust for kind.
5524 * mem-break.h (set_gdb_breakpoint): Likewise.
5525 (delete_gdb_breakpoint): Likewise.
5526 * server.c (process_serial_event): Likewise.
5528 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5530 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5531 (struct linux_target_ops) <breakpoint>: Remove.
5532 (struct linux_target_ops) <breakpoint_len>: Remove.
5533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5535 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5536 (arm_sw_breakpoint_from_kind): New function.
5537 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5538 (struct linux_target_ops) <breakpoint>: Remove.
5539 (struct linux_target_ops) <breakpoint_len>: Remove.
5540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5542 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5543 (struct linux_target_ops) <breakpoint>: Remove.
5544 (struct linux_target_ops) <breakpoint_len>: Remove.
5545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5547 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5548 (struct linux_target_ops) <breakpoint>: Remove.
5549 (struct linux_target_ops) <breakpoint_len>: Remove.
5550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5552 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5553 and sw_breakpoint_from_kind to increment the pc.
5554 (linux_breakpoint_kind_from_pc): New function.
5555 (linux_sw_breakpoint_from_kind): New function.
5556 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5557 (initialize_low): Call breakpoint_kind_from_pc and
5558 sw_breakpoint_from_kind to replace breakpoint_data/len.
5559 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5562 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5563 (struct linux_target_ops) <breakpoint>: Remove.
5564 (struct linux_target_ops) <breakpoint_len>: Remove.
5565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5567 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5568 (struct linux_target_ops) <breakpoint>: Remove.
5569 (struct linux_target_ops) <breakpoint_len>: Remove.
5570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5572 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5573 (struct linux_target_ops) <breakpoint>: Remove.
5574 (struct linux_target_ops) <breakpoint_len>: Remove.
5575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5577 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5578 (struct linux_target_ops) <breakpoint>: Remove.
5579 (struct linux_target_ops) <breakpoint_len>: Remove.
5580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5582 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5583 (struct linux_target_ops) <breakpoint>: Remove.
5584 (struct linux_target_ops) <breakpoint_len>: Remove.
5585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5587 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5588 (struct linux_target_ops) <breakpoint>: Remove.
5589 (struct linux_target_ops) <breakpoint_len>: Remove.
5590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5592 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5593 (struct linux_target_ops) <breakpoint>: Remove.
5594 (struct linux_target_ops) <breakpoint_len>: Remove.
5595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5597 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5598 (struct linux_target_ops) <breakpoint>: Remove.
5599 (struct linux_target_ops) <breakpoint_len>: Remove.
5600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5602 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5603 (struct linux_target_ops) <breakpoint>: Remove.
5604 (struct linux_target_ops) <breakpoint_len>: Remove.
5605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5607 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5608 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5609 (struct linux_target_ops) <breakpoint>: Remove.
5610 (struct linux_target_ops) <breakpoint_len>: Remove.
5611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5613 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5614 (struct linux_target_ops) <breakpoint>: Remove.
5615 (struct linux_target_ops) <breakpoint_len>: Remove.
5616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5619 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5621 * linux-cris-low.c (cris_get_pc): Remove void arg.
5623 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5625 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5628 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5630 * inferiors.c (thread_pid_matches_callback): New function.
5631 (find_thread_process): New function.
5632 (remove_thread): Reset current_thread.
5633 (remove_process): Assert threads have been removed first.
5635 2015-10-15 Yao Qi <yao.qi@linaro.org>
5637 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5639 (aarch64_remove_point): Likewise.
5640 * regcache.c (regcache_register_size): New function.
5642 2015-10-12 Yao Qi <yao.qi@linaro.org>
5644 * linux-aarch64-low.c: Update all callers as emit_load_store
5645 is renamed to aarch64_emit_load_store.
5647 2015-10-12 Yao Qi <yao.qi@linaro.org>
5649 * linux-aarch64-low.c: Update all callers of function renaming
5650 from emit_insn to aarch64_emit_insn.
5652 2015-10-12 Yao Qi <yao.qi@linaro.org>
5654 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5655 arch/aarch64-insn.h.
5656 (struct aarch64_memory_operand): Likewise.
5658 (emit_insn): Move to arch/aarch64-insn.c.
5659 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5660 (emit_load_store): Move to arch/aarch64-insn.c.
5661 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5662 (can_encode_int32): Remove.
5664 2015-10-12 Yao Qi <yao.qi@linaro.org>
5666 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5667 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5668 (aarch64_relocate_instruction): Likewise.
5669 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5670 (struct aarch64_insn_visitor): Likewise.
5672 2015-10-12 Yao Qi <yao.qi@linaro.org>
5674 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5675 (struct aarch64_insn_visitor): New.
5676 (struct aarch64_insn_relocation_data): New.
5677 (aarch64_ftrace_insn_reloc_b): New function.
5678 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5679 (aarch64_ftrace_insn_reloc_cb): Likewise.
5680 (aarch64_ftrace_insn_reloc_tb): Likewise.
5681 (aarch64_ftrace_insn_reloc_adr): Likewise.
5682 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5683 (aarch64_ftrace_insn_reloc_others): Likewise.
5685 (aarch64_relocate_instruction): Use visitor.
5687 2015-10-12 Yao Qi <yao.qi@linaro.org>
5689 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5690 int. Add argument buf.
5691 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5692 aarch64_relocate_instruction.
5694 2015-10-12 Yao Qi <yao.qi@linaro.org>
5696 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5697 argument insn. Remove local variable insn. Don't call
5699 (aarch64_install_fast_tracepoint_jump_pad): Call
5702 2015-09-30 Yao Qi <yao.qi@linaro.org>
5704 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5705 (emit_load_store_pair): Likewise.
5707 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5709 * dll.c (match_dll): Add cast(s).
5710 (unloaded_dll): Likewise.
5711 * linux-low.c (second_thread_of_pid_p): Likewise.
5712 (delete_lwp_callback): Likewise.
5713 (count_events_callback): Likewise.
5714 (select_event_lwp_callback): Likewise.
5715 (linux_set_resume_request): Likewise.
5716 * server.c (accumulate_file_name_length): Likewise.
5717 (emit_dll_description): Likewise.
5718 (handle_qxfer_threads_worker): Likewise.
5719 (visit_actioned_threads): Likewise.
5720 * thread-db.c (any_thread_of): Likewise.
5721 * tracepoint.c (same_process_p): Likewise.
5722 (match_blocktype): Likewise.
5723 (build_traceframe_info_xml): Likewise.
5725 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5727 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5729 (gdb_unparse_agent_expr): Likewise.
5730 * hostio.c (require_data): Likewise.
5731 (handle_pread): Likewise.
5732 * linux-low.c (disable_regset): Likewise.
5733 (fetch_register): Likewise.
5734 (store_register): Likewise.
5735 (get_dynamic): Likewise.
5736 (linux_qxfer_libraries_svr4): Likewise.
5737 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5738 (set_fast_tracepoint_jump): Likewise.
5739 (uninsert_fast_tracepoint_jumps_at): Likewise.
5740 (reinsert_fast_tracepoint_jumps_at): Likewise.
5741 (validate_inserted_breakpoint): Likewise.
5742 (clone_agent_expr): Likewise.
5743 * regcache.c (init_register_cache): Likewise.
5744 * remote-utils.c (putpkt_binary_1): Likewise.
5745 (decode_M_packet): Likewise.
5746 (decode_X_packet): Likewise.
5747 (look_up_one_symbol): Likewise.
5748 (relocate_instruction): Likewise.
5749 (monitor_output): Likewise.
5750 * server.c (handle_search_memory): Likewise.
5751 (handle_qxfer_exec_file): Likewise.
5752 (handle_qxfer_libraries): Likewise.
5753 (handle_qxfer): Likewise.
5754 (handle_query): Likewise.
5755 (handle_v_cont): Likewise.
5756 (handle_v_run): Likewise.
5757 (captured_main): Likewise.
5758 * target.c (write_inferior_memory): Likewise.
5759 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5760 * tracepoint.c (init_trace_buffer): Likewise.
5761 (add_tracepoint_action): Likewise.
5762 (add_traceframe): Likewise.
5763 (add_traceframe_block): Likewise.
5764 (cmd_qtdpsrc): Likewise.
5765 (cmd_qtdv): Likewise.
5766 (cmd_qtstatus): Likewise.
5767 (response_source): Likewise.
5768 (response_tsv): Likewise.
5769 (cmd_qtnotes): Likewise.
5770 (gdb_collect): Likewise.
5771 (initialize_tracepoint): Likewise.
5773 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5775 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5776 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5777 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5779 (enum aarch64_condition_codes): New enum.
5780 (w0): New static global.
5783 (struct aarch64_memory_operand) <type>: New
5784 MEMORY_OPERAND_POSTINDEX type.
5785 (postindex_memory_operand): New helper function.
5786 (emit_ret): New function.
5787 (emit_load_store_pair): New function, factored out of emit_stp
5788 with support for MEMORY_OPERAND_POSTINDEX.
5789 (emit_stp): Rewrite using emit_load_store_pair.
5790 (emit_ldp): New function.
5791 (emit_load_store): Likewise.
5792 (emit_ldr): Mention post-index instruction in comment.
5793 (emit_ldrh): New function.
5794 (emit_ldrb): New function.
5795 (emit_ldrsw): Mention post-index instruction in comment.
5796 (emit_str): Likewise.
5797 (emit_subs): New function.
5798 (emit_cmp): Likewise.
5799 (emit_and): Likewise.
5800 (emit_orr): Likewise.
5801 (emit_orn): Likewise.
5802 (emit_eor): Likewise.
5803 (emit_mvn): Likewise.
5804 (emit_lslv): Likewise.
5805 (emit_lsrv): Likewise.
5806 (emit_asrv): Likewise.
5807 (emit_mul): Likewise.
5808 (emit_sbfm): Likewise.
5809 (emit_sbfx): Likewise.
5810 (emit_ubfm): Likewise.
5811 (emit_ubfx): Likewise.
5812 (emit_csinc): Likewise.
5813 (emit_cset): Likewise.
5814 (emit_nop): Likewise.
5815 (emit_ops_insns): New helper function.
5816 (emit_pop): Likewise.
5817 (emit_push): Likewise.
5818 (aarch64_emit_prologue): New function.
5819 (aarch64_emit_epilogue): Likewise.
5820 (aarch64_emit_add): Likewise.
5821 (aarch64_emit_sub): Likewise.
5822 (aarch64_emit_mul): Likewise.
5823 (aarch64_emit_lsh): Likewise.
5824 (aarch64_emit_rsh_signed): Likewise.
5825 (aarch64_emit_rsh_unsigned): Likewise.
5826 (aarch64_emit_ext): Likewise.
5827 (aarch64_emit_log_not): Likewise.
5828 (aarch64_emit_bit_and): Likewise.
5829 (aarch64_emit_bit_or): Likewise.
5830 (aarch64_emit_bit_xor): Likewise.
5831 (aarch64_emit_bit_not): Likewise.
5832 (aarch64_emit_equal): Likewise.
5833 (aarch64_emit_less_signed): Likewise.
5834 (aarch64_emit_less_unsigned): Likewise.
5835 (aarch64_emit_ref): Likewise.
5836 (aarch64_emit_if_goto): Likewise.
5837 (aarch64_emit_goto): Likewise.
5838 (aarch64_write_goto_address): Likewise.
5839 (aarch64_emit_const): Likewise.
5840 (aarch64_emit_call): Likewise.
5841 (aarch64_emit_reg): Likewise.
5842 (aarch64_emit_pop): Likewise.
5843 (aarch64_emit_stack_flush): Likewise.
5844 (aarch64_emit_zero_ext): Likewise.
5845 (aarch64_emit_swap): Likewise.
5846 (aarch64_emit_stack_adjust): Likewise.
5847 (aarch64_emit_int_call_1): Likewise.
5848 (aarch64_emit_void_call_2): Likewise.
5849 (aarch64_emit_eq_goto): Likewise.
5850 (aarch64_emit_ne_goto): Likewise.
5851 (aarch64_emit_lt_goto): Likewise.
5852 (aarch64_emit_le_goto): Likewise.
5853 (aarch64_emit_gt_goto): Likewise.
5854 (aarch64_emit_ge_got): Likewise.
5855 (aarch64_emit_ops_impl): New static global variable.
5856 (aarch64_emit_ops): New target function, return
5857 &aarch64_emit_ops_impl.
5858 (struct linux_target_ops): Install it.
5860 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5862 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5863 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5865 * linux-aarch64-ipa.c: New file.
5866 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5868 (aarch64_get_thread_area): New target method.
5869 (extract_signed_bitfield): New helper function.
5870 (aarch64_decode_ldr_literal): New function.
5871 (enum aarch64_opcodes): New enum.
5872 (struct aarch64_register): New struct.
5873 (struct aarch64_operand): New struct.
5874 (x0): New static global.
5883 (aarch64_register): New helper function.
5884 (register_operand): Likewise.
5885 (immediate_operand): Likewise.
5886 (struct aarch64_memory_operand): New struct.
5887 (offset_memory_operand): New helper function.
5888 (preindex_memory_operand): Likewise.
5889 (enum aarch64_system_control_registers): New enum.
5890 (ENCODE): New macro.
5891 (emit_insn): New helper function.
5892 (emit_b): New function.
5893 (emit_bcond): Likewise.
5894 (emit_cb): Likewise.
5895 (emit_tb): Likewise.
5896 (emit_blr): Likewise.
5897 (emit_stp): Likewise.
5898 (emit_ldp_q_offset): Likewise.
5899 (emit_stp_q_offset): Likewise.
5900 (emit_load_store): Likewise.
5901 (emit_ldr): Likewise.
5902 (emit_ldrsw): Likewise.
5903 (emit_str): Likewise.
5904 (emit_ldaxr): Likewise.
5905 (emit_stxr): Likewise.
5906 (emit_stlr): Likewise.
5907 (emit_data_processing_reg): Likewise.
5908 (emit_data_processing): Likewise.
5909 (emit_add): Likewise.
5910 (emit_sub): Likewise.
5911 (emit_mov): Likewise.
5912 (emit_movk): Likewise.
5913 (emit_mov_addr): Likewise.
5914 (emit_mrs): Likewise.
5915 (emit_msr): Likewise.
5916 (emit_sevl): Likewise.
5917 (emit_wfe): Likewise.
5918 (append_insns): Likewise.
5919 (can_encode_int32_in): New helper function.
5920 (aarch64_relocate_instruction): New function.
5921 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5922 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5923 (struct linux_target_ops): Install aarch64_get_thread_area,
5924 aarch64_install_fast_tracepoint_jump_pad and
5925 aarch64_get_min_fast_tracepoint_insn_len.
5927 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5929 * Makefile.in (aarch64-insn.o): New rule.
5930 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5932 2015-09-21 Yao Qi <yao.qi@linaro.org>
5934 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5936 2015-09-21 Yao Qi <yao.qi@linaro.org>
5938 * tracepoint.c (max_jump_pad_size): Remove.
5940 2015-09-18 Yao Qi <yao.qi@linaro.org>
5942 * linux-aarch64-low.c: Don't include sys/uio.h.
5943 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5945 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5947 * tracepoint.c (eval_result_type): Change prototype.
5948 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5950 2015-09-15 Pedro Alves <palves@redhat.com>
5952 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5953 Check whether to report exec events instead of checking whether
5954 multiprocess is enabled.
5956 2015-09-15 Pedro Alves <palves@redhat.com>
5959 * remote-utils.c (prepare_resume_reply): Merge
5960 TARGET_WAITKIND_VFORK_DONE switch case with the
5961 TARGET_WAITKIND_FORKED case.
5963 2015-09-15 Yao Qi <yao.qi@linaro.org>
5965 * server.c (handle_query): Check string comparison using
5966 "else if" instead of "if".
5968 2015-09-15 Yao Qi <yao.qi@linaro.org>
5970 * server.c (vCont_supported): New global variable.
5971 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5972 matches. Append ";vContSupported+" to own_buf.
5973 (handle_v_requests): Append ";s;S" to own_buf if target supports
5974 hardware single step or vCont_supported is false.
5975 (capture_main): Set vCont_supported to zero.
5977 2015-09-15 Yao Qi <yao.qi@linaro.org>
5979 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5981 (linux_supports_hardware_single_step): ... New function.
5982 (linux_target_ops): Update.
5983 * lynx-low.c (lynx_target_ops): Set field
5984 supports_hardware_single_step to target_can_do_hardware_single_step.
5985 * nto-low.c (nto_target_ops): Likewise.
5986 * spu-low.c (spu_target_ops): Likewise.
5987 * win32-low.c (win32_target_ops): Likewise.
5988 * target.c (target_can_do_hardware_single_step): New function.
5989 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5990 Remove. <supports_hardware_single_step>: New field.
5991 (target_supports_conditional_breakpoints): Remove.
5992 (target_supports_hardware_single_step): New macro.
5993 (target_can_do_hardware_single_step): Declare.
5994 * server.c (handle_query): Use target_supports_hardware_single_step
5995 instead of target_supports_conditional_breakpoints.
5997 2015-09-15 Yao Qi <yao.qi@linaro.org>
5999 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
6001 (struct linux_target_ops the_low_target): Install
6002 aarch64_linux_siginfo_fixup.
6004 2015-09-11 Don Breazeal <donb@codesourcery.com>
6005 Luis Machado <lgustavo@codesourcery.com>
6007 * linux-low.c (linux_mourn): Static declaration.
6008 (linux_arch_setup): Move in front of
6009 handle_extended_wait.
6010 (linux_arch_setup_thread): New function.
6011 (handle_extended_wait): Handle exec events. Call
6012 linux_arch_setup_thread. Make event_lwp argument a
6013 pointer-to-a-pointer.
6014 (check_zombie_leaders): Do not check stopped threads.
6015 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6016 (linux_low_filter_event): Add lwp and thread for exec'ing
6017 non-leader thread if leader thread has been deleted.
6018 Refactor code into linux_arch_setup_thread and call it.
6019 Pass child lwp pointer by reference to handle_extended_wait.
6020 (linux_wait_for_event_filtered): Update comment.
6021 (linux_wait_1): Prevent clobbering exec event status.
6022 (linux_supports_exec_events): New function.
6023 (linux_target_ops) <supports_exec_events>: Initialize new member.
6024 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6026 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6027 * server.c (report_exec_events): New global variable.
6028 (handle_query): Handle qSupported query for exec-events feature.
6029 (captured_main): Initialize report_exec_events.
6030 * server.h (report_exec_events): Declare new global variable.
6031 * target.h (struct target_ops) <supports_exec_events>: New
6033 (target_supports_exec_events): New macro.
6034 * win32-low.c (win32_target_ops) <supports_exec_events>:
6035 Initialize new member.
6037 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6039 * linux-low.c (linux_low_enable_btrace): Remove.
6040 (linux_target_ops): Replace linux_low_enable_btrace with
6041 linux_enable_btrace.
6043 2015-09-03 Yao Qi <yao.qi@linaro.org>
6045 * linux-aarch64-low.c (aarch64_insert_point): Call
6046 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6049 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6051 * linux-low.c (check_stopped_by_breakpoint): Use
6052 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6054 2015-08-27 Pedro Alves <palves@redhat.com>
6056 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6058 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6060 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6061 the XNEW-family equivalent.
6062 (compile_bytecodes): Likewise.
6063 * dll.c (loaded_dll): Likewise.
6064 * event-loop.c (append_callback_event): Likewise.
6065 (create_file_handler): Likewise.
6066 (create_file_event): Likewise.
6067 * hostio.c (handle_open): Likewise.
6068 * inferiors.c (add_thread): Likewise.
6069 (add_process): Likewise.
6070 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6071 * linux-arm-low.c (arm_new_process): Likewise.
6072 (arm_new_thread): Likewise.
6073 * linux-low.c (add_to_pid_list): Likewise.
6074 (linux_add_process): Likewise.
6075 (handle_extended_wait): Likewise.
6076 (add_lwp): Likewise.
6077 (enqueue_one_deferred_signal): Likewise.
6078 (enqueue_pending_signal): Likewise.
6079 (linux_resume_one_lwp_throw): Likewise.
6080 (linux_resume_one_thread): Likewise.
6081 (linux_read_memory): Likewise.
6082 (linux_write_memory): Likewise.
6083 * linux-mips-low.c (mips_linux_new_process): Likewise.
6084 (mips_linux_new_thread): Likewise.
6085 (mips_add_watchpoint): Likewise.
6086 * linux-x86-low.c (initialize_low_arch): Likewise.
6087 * lynx-low.c (lynx_add_process): Likewise.
6088 * mem-break.c (set_raw_breakpoint_at): Likewise.
6089 (set_breakpoint): Likewise.
6090 (add_condition_to_breakpoint): Likewise.
6091 (add_commands_to_breakpoint): Likewise.
6092 (clone_agent_expr): Likewise.
6093 (clone_one_breakpoint): Likewise.
6094 * regcache.c (new_register_cache): Likewise.
6095 * remote-utils.c (look_up_one_symbol): Likewise.
6096 * server.c (queue_stop_reply): Likewise.
6097 (start_inferior): Likewise.
6098 (queue_stop_reply_callback): Likewise.
6099 (handle_target_event): Likewise.
6100 * spu-low.c (fetch_ppc_memory): Likewise.
6101 (store_ppc_memory): Likewise.
6102 * target.c (set_target_ops): Likewise.
6103 * thread-db.c (thread_db_load_search): Likewise.
6104 (try_thread_db_load_1): Likewise.
6105 * tracepoint.c (add_tracepoint): Likewise.
6106 (add_tracepoint_action): Likewise.
6107 (create_trace_state_variable): Likewise.
6108 (cmd_qtdpsrc): Likewise.
6109 (cmd_qtro): Likewise.
6110 (add_while_stepping_state): Likewise.
6111 * win32-low.c (child_add_thread): Likewise.
6112 (get_image_name): Likewise.
6114 2015-08-25 Yao Qi <yao.qi@linaro.org>
6116 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6118 2015-08-25 Yao Qi <yao.qi@linaro.org>
6120 * Makefile.in (aarch64-linux.o): New rule.
6121 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6123 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6124 (aarch64_init_debug_reg_state): Make it extern.
6125 (aarch64_linux_prepare_to_resume): Remove.
6127 2015-08-25 Yao Qi <yao.qi@linaro.org>
6129 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6130 lwp_arch_private_info and ptid_of_lwp.
6132 2015-08-25 Yao Qi <yao.qi@linaro.org>
6134 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6135 Find proc_info by find_process_pid. All callers updated.
6137 2015-08-25 Yao Qi <yao.qi@linaro.org>
6139 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6141 (debug_reg_change_callback): Remove.
6142 (aarch64_notify_debug_reg_change): Remove.
6144 2015-08-25 Yao Qi <yao.qi@linaro.org>
6146 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6147 Call current_lwp_ptid.
6149 2015-08-25 Yao Qi <yao.qi@linaro.org>
6151 * linux-aarch64-low.c (debug_reg_change_callback): Use
6154 2015-08-25 Yao Qi <yao.qi@linaro.org>
6156 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6158 2015-08-25 Yao Qi <yao.qi@linaro.org>
6160 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6162 2015-08-25 Yao Qi <yao.qi@linaro.org>
6164 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6167 2015-08-25 Yao Qi <yao.qi@linaro.org>
6169 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6171 (debug_reg_change_callback): Remove argument entry and add argument
6172 lwp. Remove local variable thread. Don't print thread id in the
6173 debugging output. Don't check whether pid of thread equals to pid.
6174 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6175 iterate_over_lwps instead find_inferior.
6177 2015-08-24 Pedro Alves <palves@redhat.com>
6179 * inferiors.c (get_first_process): New function.
6180 * inferiors.h (get_first_process): New declaration.
6181 * remote-utils.c (read_ptid): Default to the first process in the
6182 list, instead of to the current thread's process.
6184 2015-08-24 Pedro Alves <palves@redhat.com>
6186 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6187 * event-loop.c: Likewise.
6188 * remote-utils.c: Likewise.
6189 * tracepoint.c: Likewise.
6191 2015-08-24 Pedro Alves <palves@redhat.com>
6193 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6196 2015-08-21 Pedro Alves <palves@redhat.com>
6198 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6199 instead of literal 1.
6201 2015-08-21 Pedro Alves <palves@redhat.com>
6203 * tdesc.c (default_description): Explicitly zero-initialize.
6205 2015-08-21 Pedro Alves <palves@redhat.com>
6208 * inferiors.c (remove_thread): Discard any pending stop reply for
6210 * server.c (remove_all_on_match_pid): Rename to ...
6211 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6213 (discard_queued_stop_replies): Change parameter to a ptid. Now
6215 (handle_v_kill, kill_inferior_callback, captured_main)
6216 (process_serial_event): Adjust.
6217 * server.h (discard_queued_stop_replies): Declare.
6219 2015-08-21 Pedro Alves <palves@redhat.com>
6221 * linux-low.c (wait_for_sigstop): Always switch to no thread
6222 selected if the previously current thread dies.
6223 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6224 process instead of the current thread's.
6225 * remote-utils.c (input_interrupt): Don't check if there's no
6227 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6228 current thread to the general thread fails, error out.
6229 (handle_qxfer_auxv, handle_qxfer_libraries)
6230 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6231 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6232 (handle_query): Check if there's a thread selected instead of
6233 checking whether there's any thread in the thread list.
6234 (handle_qxfer_threads, handle_qxfer_btrace)
6235 (handle_qxfer_btrace_conf): Don't error out early if there's no
6236 thread in the thread list.
6237 (handle_v_cont, myresume): Don't set the current thread to the
6239 (process_serial_event) <Hg handling>: Also set thread_id if the
6240 previous general thread is still alive.
6241 (process_serial_event) <g/G handling>: If setting the current
6242 thread to the general thread fails, error out.
6243 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6244 thread's lwp instead of the current thread's.
6245 * target.c (set_desired_thread): If the desired thread was not
6246 found, leave the current thread pointing to NULL. Return an int
6247 (boolean) indicating success.
6248 * target.h (set_desired_thread): Change return type to int.
6250 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6252 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6253 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6255 (ps_get_thread_area): New function.
6257 2015-08-19 Gary Benson <gbenson@redhat.com>
6259 * hostio.c (handle_pread): Do not attempt to read more data
6260 than hostio_reply_with_data can fit in a packet.
6262 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6264 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6266 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6268 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6270 2015-08-06 Pedro Alves <palves@redhat.com>
6272 * tracepoint.c (expr_eval_result): Now an int.
6274 2015-08-06 Pedro Alves <palves@redhat.com>
6276 * gdbthread.h (struct regcache): Forward declare.
6277 (struct thread_info) <regcache_data>: Now a struct regcache
6279 * inferiors.c (inferior_regcache_data)
6280 (set_inferior_regcache_data): Now work with struct regcache
6282 * inferiors.h (struct regcache): Forward declare.
6283 (inferior_regcache_data, set_inferior_regcache_data): Now work
6284 with struct regcache pointers.
6285 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6286 (free_register_cache_thread): Remove struct regcache pointer
6289 2015-08-06 Pedro Alves <palves@redhat.com>
6291 * server.c (captured_main): On error, print the exception message
6292 to stderr, and if run_once is set, throw a quit.
6294 2015-08-06 Pedro Alves <palves@redhat.com>
6296 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6299 2015-08-06 Pedro Alves <palves@redhat.com>
6301 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6302 reading beyond the passed in buffer length.
6304 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6306 * tracepoint.c (symbol_list) <required>: Remove.
6308 2015-08-06 Pedro Alves <palves@redhat.com>
6310 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6311 count if stopping and suspending threads.
6312 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6313 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6314 (linux_detach): Complete an ongoing step-over.
6315 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6317 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6318 (linux_wait_1): If passing a signal to the inferior after
6319 finishing a step-over, unsuspend and re-resume all lwps. If we
6320 see a single-step event but the thread should be continuing, don't
6321 pass the trap to gdb.
6322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6323 internal_error instead of gdb_assert.
6324 (enqueue_pending_signal): New function.
6325 (check_ptrace_stopped_lwp_gone): Add debug output.
6326 (start_step_over): Use internal_error instead of gdb_assert.
6327 (complete_ongoing_step_over): New function.
6328 (linux_resume_one_thread): Don't resume a suspended thread.
6329 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6332 2015-08-06 Pedro Alves <palves@redhat.com>
6334 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6335 (linux_thread_alive): Use lwp_is_marked_dead.
6336 (extended_event_reported): Delete.
6337 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6338 instead of extended_event_reported.
6339 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6341 (lwp_is_marked_dead): New function.
6342 (lwp_running): Use lwp_is_marked_dead.
6343 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6346 2015-08-06 Pedro Alves <palves@redhat.com>
6348 * linux-low.c (linux_wait_1): Move fork event output out of the
6349 !report_to_gdb check. Pass event_child->waitstatus to
6350 target_waitstatus_to_string instead of ourstatus.
6352 2015-08-04 Yao Qi <yao.qi@linaro.org>
6354 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6355 if current_thread is 32 bit.
6357 2015-08-04 Yao Qi <yao.qi@linaro.org>
6359 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6360 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6361 * server.c (extended_protocol): Remove "static".
6362 * server.h (extended_protocol): Declare it.
6364 2015-08-04 Yao Qi <yao.qi@linaro.org>
6366 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6367 both aarch64 and aarch32.
6368 (aarch64_set_pc): Likewise.
6370 2015-08-04 Yao Qi <yao.qi@linaro.org>
6372 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6373 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6374 arm-with-neon.xml to srv_xmlfiles.
6375 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6376 (is_64bit_tdesc): New function.
6377 (aarch64_linux_read_description): New function.
6378 (aarch64_arch_setup): Call aarch64_linux_read_description.
6379 (regs_info): Rename to regs_info_aarch64.
6380 (aarch64_regs_info): Return right regs_info.
6381 (initialize_low_arch): Call initialize_low_arch_aarch32.
6383 2015-08-04 Yao Qi <yao.qi@linaro.org>
6385 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6386 * linux-aarch32-low.c: New file.
6387 * linux-aarch32-low.h: New file.
6388 * linux-arm-low.c (arm_fill_gregset): Move it to
6389 linux-aarch32-low.c.
6390 (arm_store_gregset): Likewise.
6391 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6392 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6393 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6394 (regs_info): Rename to regs_info_arm.
6395 (arm_regs_info): Return regs_info_aarch32 if
6396 have_ptrace_getregset is 1 and target description is
6397 arm_with_neon or arm_with_vfpv3.
6398 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6399 Call initialize_low_arch_aarch32 instead.
6401 2015-08-04 Yao Qi <yao.qi@linaro.org>
6403 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6404 * linux-low.c: ... here.
6405 * linux-low.h (have_ptrace_getregset): Declare it.
6407 2015-08-04 Pedro Alves <palves@redhat.com>
6409 * thread-db.c (struct thread_db): Use new typedefs.
6410 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6412 (disable_thread_event_reporting): Cast result of dlsym to
6413 destination function pointer type.
6414 (thread_db_mourn): Use td_ta_delete_ftype.
6416 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6418 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6420 (CDX_BREAKPOINT): Define for R2.
6421 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6422 (the_low_target): Add comments.
6424 2015-07-30 Yao Qi <yao.qi@linaro.org>
6426 * linux-arm-low.c (arm_hwcap): Remove it.
6427 (arm_read_description): New local variable arm_hwcap. Don't
6428 set arm_hwcap to zero.
6430 2015-07-30 Yao Qi <yao.qi@linaro.org>
6432 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6433 Use regcache->tdesc instead.
6434 (arm_store_wmmxregset): Likewise.
6435 (arm_fill_vfpregset): Likewise.
6436 (arm_store_vfpregset): Likewise.
6438 2015-07-30 Yao Qi <yao.qi@linaro.org>
6440 * linux-arm-low.c: Include arch/arm.h.
6441 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6442 (arm_store_gregset): Likewise.
6444 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6446 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6447 ptrace's 4th parameter.
6449 2015-07-27 Yao Qi <yao.qi@linaro.org>
6451 * configure.srv (case aarch64*-*-linux*): Don't set
6454 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6456 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6458 * linux-arm-low.c: Likewise.
6459 * linux-cris-low.c: Likewise.
6460 * linux-crisv32-low.c: Likewise.
6461 * linux-low.c: Likewise.
6462 * linux-m68k-low.c: Likewise.
6463 * linux-mips-low.c: Likewise.
6464 * linux-nios2-low.c: Likewise.
6465 * linux-s390-low.c: Likewise.
6466 * linux-sparc-low.c: Likewise.
6467 * linux-tic6x-low.c: Likewise.
6468 * linux-tile-low.c: Likewise.
6469 * linux-x86-low.c: Likewise.
6471 2015-07-24 Pedro Alves <palves@redhat.com>
6473 * config.in: Regenerate.
6474 * configure: Regenerate.
6476 2015-07-24 Pedro Alves <palves@redhat.com>
6478 * acinclude.m4: Include ../ptrace.m4.
6479 * configure.ac: Call GDB_AC_PTRACE.
6480 * config.in, configure: Regenerate.
6482 2015-07-24 Yao Qi <yao.qi@linaro.org>
6484 * linux-low.c (linux_create_inferior): Remove setting to
6485 proc->priv->new_inferior.
6486 (linux_attach): Likewise.
6487 (linux_low_filter_event): Likewise.
6488 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6490 2015-07-24 Yao Qi <yao.qi@linaro.org>
6492 * linux-low.c (linux_arch_setup): New function.
6493 (linux_low_filter_event): If proc->tdesc is NULL and
6494 proc->attached is true, call the_low_target.arch_setup.
6495 Otherwise, keep status pending, and return.
6496 (linux_resume_one_lwp_throw): Don't call get_pc if
6497 thread->while_stepping isn't NULL. Don't call
6498 get_thread_regcache if proc->tdesc is NULL.
6499 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6500 (linux_target_ops): Install arch_setup.
6501 * server.c (start_inferior): Call the_target->arch_setup.
6502 * target.h (struct target_ops) <arch_setup>: New field.
6503 (target_arch_setup): New marco.
6504 * lynx-low.c (lynx_target_ops): Update.
6505 * nto-low.c (nto_target_ops): Update.
6506 * spu-low.c (spu_target_ops): Update.
6507 * win32-low.c (win32_target_ops): Update.
6509 2015-07-24 Yao Qi <yao.qi@linaro.org>
6511 * linux-low.c (linux_add_process): Don't set
6512 proc->priv->new_inferior.
6513 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6514 (linux_attach): Likewise.
6516 2015-07-24 Yao Qi <yao.qi@linaro.org>
6518 * server.c (start_inferior): Code refactor.
6520 2015-07-24 Yao Qi <yao.qi@linaro.org>
6522 * server.c (process_serial_event): Set general_thread.
6524 2015-07-21 Yao Qi <yao.qi@linaro.org>
6526 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6527 aarch64_linux_get_debug_reg_capacity.
6529 2015-07-17 Yao Qi <yao.qi@linaro.org>
6531 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6532 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6533 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6534 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6535 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6536 (AARCH64_HWP_ALIGNMENT): Likewise.
6537 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6538 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6539 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6540 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6541 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6542 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6543 (struct aarch64_debug_reg_state): Likewise.
6544 (struct arch_lwp_info): Likewise.
6545 (aarch64_align_watchpoint): Likewise.
6546 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6547 (aarch64_watchpoint_length): Likewise.
6548 (aarch64_point_encode_ctrl_reg): Likewise
6549 (aarch64_point_is_aligned): Likewise.
6550 (aarch64_align_watchpoint): Likewise.
6551 (aarch64_linux_set_debug_regs):
6552 (aarch64_dr_state_insert_one_point): Likewise.
6553 (aarch64_dr_state_remove_one_point): Likewise.
6554 (aarch64_handle_breakpoint): Likewise.
6555 (aarch64_handle_aligned_watchpoint): Likewise.
6556 (aarch64_handle_unaligned_watchpoint): Likewise.
6557 (aarch64_handle_watchpoint): Likewise.
6559 2015-07-17 Yao Qi <yao.qi@linaro.org>
6561 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6562 and don't aarch64_get_debug_reg_state. All callers update.
6563 (aarch64_handle_aligned_watchpoint): Likewise.
6564 (aarch64_handle_unaligned_watchpoint): Likewise.
6565 (aarch64_handle_watchpoint): Likewise.
6566 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6567 (aarch64_remove_point): Likewise.
6569 2015-07-17 Yao Qi <yao.qi@linaro.org>
6571 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6573 (aarch64_handle_unaligned_watchpoint): Likewise.
6575 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6577 Revert the previous 3 commits:
6578 Move gdb_regex* to common/
6579 Move linux_find_memory_regions_full & co.
6580 gdbserver build-id attribute generator
6582 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6583 Jan Kratochvil <jan.kratochvil@redhat.com>
6585 gdbserver build-id attribute generator.
6586 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6587 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6588 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6590 (get_dynamic): Use find_pdhr to traverse program headers.
6591 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6592 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6593 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6594 (get_hex_build_id): New.
6595 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6596 to reply XML document.
6598 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6599 Jan Kratochvil <jan.kratochvil@redhat.com>
6601 * target.c: Include target/target-utils.h and fcntl.h.
6602 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6603 (target_fileio_read_stralloc): New functions.
6605 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6607 * Makefile.in (OBS): Add gdb_regex.o.
6609 * config.in: Rebuilt.
6610 * configure: Rebuilt.
6612 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6613 Jan Kratochvil <jan.kratochvil@redhat.com>
6615 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6616 * Makefile.in (OBS): Add target-utils.o.
6617 (linux-maps.o, target-utils.o): New.
6618 * configure.srv (srv_linux_obj): Add linux-maps.o.
6620 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6622 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6624 (the_low_target): Install it.
6626 2015-07-14 Pedro Alves <palves@redhat.com>
6628 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6629 Instead, ignore ECHILD, and throw an error for other errnos.
6631 2015-07-10 Pedro Alves <palves@redhat.com>
6633 * event-loop.c (struct callback_event) <data>: Change type to
6634 gdb_client_data instance instead of gdb_client_data pointer.
6635 (append_callback_event): Adjust.
6637 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6639 * linux-aarch64-low.c: Add comments for each linux_target_ops
6640 method. Remove comments already covered in target_ops and
6641 linux_target_ops definitions.
6642 (the_low_target): Add comments for each unimplemented method.
6644 2015-07-09 Yao Qi <yao.qi@linaro.org>
6646 * linux-aarch64-low.c (aarch64_regmap): Remove.
6647 (aarch64_usrregs_info): Remove.
6648 (regs_info): Set field usrregs to NULL.
6650 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6652 * linux-low.c: Include "rsp-low.h"
6653 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6654 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6655 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6656 (handle_btrace_enable_pt): New.
6657 (handle_btrace_general_set): Support "pt".
6658 (handle_btrace_conf_general_set): Support "pt:size".
6660 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6662 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6665 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6667 * linux-aarch64-low.c: Remove comment about endianness.
6668 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6669 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6672 2015-06-24 Gary Benson <gbenson@redhat.com>
6674 * linux-i386-ipa.c (stdint.h): Do not include.
6675 * lynx-i386-low.c (stdint.h): Likewise.
6676 * lynx-ppc-low.c (stdint.h): Likewise.
6677 * mem-break.c (stdint.h): Likewise.
6678 * thread-db.c (stdint.h): Likewise.
6679 * tracepoint.c (stdint.h): Likewise.
6680 * win32-low.c (stdint.h): Likewise.
6682 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6684 * server.c (write_qxfer_response): Update call to
6685 remote_escape_output.
6687 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6688 Jan Kratochvil <jan.kratochvil@redhat.com>
6690 Merge multiple hex conversions.
6691 * gdbreplay.c (tohex): Rename to 'fromhex'.
6692 (logchar): Use fromhex.
6694 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6696 * server.c (handle_qxfer_libraries): Set `version' attribute for
6699 2015-06-10 Gary Benson <gbenson@redhat.com>
6701 * target.h (struct target_ops) <multifs_open>: New field.
6702 <multifs_unlink>: Likewise.
6703 <multifs_readlink>: Likewise.
6704 * linux-low.c (nat/linux-namespaces.h): New include.
6705 (linux_target_ops): Initialize the_target->multifs_open,
6706 the_target->multifs_unlink and the_target->multifs_readlink.
6707 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6708 * hostio.c (hostio_fs_pid): New static variable.
6709 (hostio_handle_new_gdb_connection): New function.
6710 (handle_setfs): Likewise.
6711 (handle_open): Use the_target->multifs_open as appropriate.
6712 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6713 (handle_readlink): Use the_target->multifs_readlink as
6715 (handle_vFile): Handle vFile:setfs packets.
6716 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6717 after target_handle_new_gdb_connection.
6719 2015-06-10 Gary Benson <gbenson@redhat.com>
6721 * configure.ac (AC_CHECK_FUNCS): Add setns.
6722 * config.in: Regenerate.
6723 * configure: Likewise.
6724 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6725 (linux-namespaces.o): New rule.
6726 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6728 2015-06-09 Gary Benson <gbenson@redhat.com>
6730 * hostio.c (handle_open): Process mode argument with
6731 fileio_to_host_mode.
6733 2015-06-01 Yao Qi <yao.qi@linaro.org>
6735 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6736 * linux-x86-low.c: Likewise.
6738 2015-05-28 Don Breazeal <donb@codesourcery.com>
6740 * linux-low.c (handle_extended_wait): Initialize
6741 thread_info.last_resume_kind for new fork children.
6743 2015-05-15 Pedro Alves <palves@redhat.com>
6745 * target.h (target_handle_new_gdb_connection): Rewrite using if
6746 wrapped in do/while.
6748 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6750 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6751 * configure, config.in: Regenerate.
6752 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6755 2015-05-12 Don Breazeal <donb@codesourcery.com>
6757 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6758 PTRACE_EVENT_VFORK_DONE.
6759 (linux_low_ptrace_options, extended_event_reported): Add vfork
6761 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6762 and "vforkdone" for RSP 'T' Stop Reply Packet.
6763 * server.h (report_vfork_events): Declare
6766 2015-05-12 Don Breazeal <donb@codesourcery.com>
6768 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6769 (the_low_target) <new_fork>: Initialize new member.
6770 * linux-arm-low.c (arm_new_fork): New function.
6771 (the_low_target) <new_fork>: Initialize new member.
6772 * linux-low.c (handle_extended_wait): Call new target function
6774 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6775 * linux-mips-low.c (mips_add_watchpoint): New function
6776 extracted from mips_insert_point.
6777 (the_low_target) <new_fork>: Initialize new member.
6778 (mips_linux_new_fork): New function.
6779 (mips_insert_point): Call mips_add_watchpoint.
6780 * linux-x86-low.c (x86_linux_new_fork): New function.
6781 (the_low_target) <new_fork>: Initialize new member.
6783 2015-05-12 Don Breazeal <donb@codesourcery.com>
6785 * linux-low.c (handle_extended_wait): Implement return value,
6786 rename argument 'event_child' to 'event_lwp', handle
6787 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6788 (linux_low_ptrace_options): New function.
6789 (linux_low_filter_event): Call linux_low_ptrace_options,
6790 use different argument fo linux_enable_event_reporting,
6791 use return value from handle_extended_wait.
6792 (extended_event_reported): New function.
6793 (linux_wait_1): Call extended_event_reported and set
6794 status to report fork events.
6795 (linux_write_memory): Add pid to debug message.
6796 (reset_lwp_ptrace_options_callback): New function.
6797 (linux_handle_new_gdb_connection): New function.
6798 (linux_target_ops): Initialize new structure member.
6799 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6800 * lynx-low.c: Initialize new structure member.
6801 * remote-utils.c (prepare_resume_reply): Implement stop reason
6802 "fork" for "T" stop message.
6803 * server.c (handle_query): Call handle_new_gdb_connection.
6804 * server.h (report_fork_events): Declare global flag.
6805 * target.h (struct target_ops) <handle_new_gdb_connection>:
6807 (target_handle_new_gdb_connection): New macro.
6808 * win32-low.c: Initialize new structure member.
6810 2015-05-12 Don Breazeal <donb@codesourcery.com>
6812 * mem-break.c (APPEND_TO_LIST): Define macro.
6813 (clone_agent_expr): New function.
6814 (clone_one_breakpoint): New function.
6815 (clone_all_breakpoints): New function.
6816 * mem-break.h: Declare new functions.
6818 2015-05-12 Don Breazeal <donb@codesourcery.com>
6820 * linux-low.c (linux_supports_fork_events): New function.
6821 (linux_supports_vfork_events): New function.
6822 (linux_target_ops): Initialize new structure members.
6823 (initialize_low): Call linux_check_ptrace_features.
6824 * lynx-low.c (lynx_target_ops): Initialize new structure
6826 * server.c (report_fork_events, report_vfork_events):
6828 (handle_query): Add new features to qSupported packet and
6830 (captured_main): Initialize new global variables.
6831 * target.h (struct target_ops) <supports_fork_events>:
6833 <supports_vfork_events>: New member.
6834 (target_supports_fork_events): New macro.
6835 (target_supports_vfork_events): New macro.
6836 * win32-low.c (win32_target_ops): Initialize new structure
6839 2015-05-12 Gary Benson <gbenson@redhat.com>
6841 * server.c (handle_qxfer_exec_file): Use current process
6844 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6846 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6847 Remove HAVE_PTRACE_GETREGS conditionals.
6848 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6849 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6851 2015-05-08 Yao Qi <yao.qi@linaro.org>
6853 * linux-low.c (linux_supports_conditional_breakpoints): New
6855 (linux_target_ops): Install new target method.
6856 * lynx-low.c (lynx_target_ops): Install NULL hook for
6857 supports_conditional_breakpoints.
6858 * nto-low.c (nto_target_ops): Likewise.
6859 * spu-low.c (spu_target_ops): Likewise.
6860 * win32-low.c (win32_target_ops): Likewise.
6861 * server.c (handle_query): Check
6862 target_supports_conditional_breakpoints.
6863 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6865 (target_supports_conditional_breakpoints): New macro.
6867 2015-05-06 Pedro Alves <palves@redhat.com>
6870 * server.c (start_inferior): If the process exits, mourn it.
6872 2015-04-21 Gary Benson <gbenson@redhat.com>
6874 * hostio.c (fileio_open_flags_to_host): Factored out to
6875 fileio_to_host_openflags in common/fileio.c. Single use
6878 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6880 * linux-xtensa-low.c (xtensa_fill_gregset)
6881 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6884 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6886 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6887 (regs_info): Replace usrregs pointer with NULL.
6889 2015-04-17 Gary Benson <gbenson@redhat.com>
6891 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6892 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6893 * server.c (handle_qxfer_exec_file): New function.
6894 (qxfer_packets): Add exec-file entry.
6895 (handle_query): Report qXfer:exec-file:read as supported packet.
6897 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6899 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6901 2015-04-09 Gary Benson <gbenson@redhat.com>
6903 * hostio-errno.c (errno_to_fileio_error): Remove function.
6904 Update caller to use remote_fileio_to_fio_error.
6906 2015-04-09 Yao Qi <yao.qi@linaro.org>
6908 * linux-low.c (linux_insert_point): Call
6909 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6910 (linux_remove_point): Call remove_memory_breakpoint if type is
6912 * linux-x86-low.c (x86_insert_point): Don't call
6913 insert_memory_breakpoint.
6914 (x86_remove_point): Don't call remove_memory_breakpoint.
6916 2015-04-01 Pedro Alves <palves@redhat.com>
6917 Cleber Rosa <crosa@redhat.com>
6919 * server.c (gdbserver_usage): Reorganize and extend the usage
6922 2015-03-24 Pedro Alves <palves@redhat.com>
6924 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6925 output. Also dump TRAP_TRACE.
6926 (linux_low_filter_event): In debug output, distinguish a
6927 resume_stop SIGSTOP from a delayed SIGSTOP.
6929 2015-03-24 Gary Benson <gbenson@redhat.com>
6931 * linux-x86-low.c (x86_linux_new_thread): Moved to
6933 (x86_linux_prepare_to_resume): Likewise.
6935 2015-03-24 Gary Benson <gbenson@redhat.com>
6937 * Makefile.in (x86-linux-dregs.o): New rule.
6938 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6939 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6940 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6941 (x86_linux_dr_get): Likewise.
6942 (x86_linux_dr_set): Likewise.
6943 (update_debug_registers_callback): Likewise.
6944 (x86_linux_dr_set_addr): Likewise.
6945 (x86_linux_dr_get_addr): Likewise.
6946 (x86_linux_dr_set_control): Likewise.
6947 (x86_linux_dr_get_control): Likewise.
6948 (x86_linux_dr_get_status): Likewise.
6949 (x86_linux_update_debug_registers): Likewise.
6951 2015-03-24 Gary Benson <gbenson@redhat.com>
6953 * linux-x86-low.c (x86_linux_update_debug_registers):
6954 New function, factored out from...
6955 (x86_linux_prepare_to_resume): ...this.
6957 2015-03-24 Gary Benson <gbenson@redhat.com>
6959 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6960 (x86_linux_dr_set): Likewise.
6961 (update_debug_registers_callback): Likewise.
6962 (x86_linux_dr_set_addr): Likewise.
6963 (x86_linux_dr_get_addr): Likewise.
6964 (x86_linux_dr_set_control): Likewise.
6965 (x86_linux_dr_get_control): Likewise.
6966 (x86_linux_dr_get_status): Likewise.
6967 (x86_linux_prepare_to_resume): Likewise.
6969 2015-03-24 Gary Benson <gbenson@redhat.com>
6971 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6972 Use perror_with_name. Pass string through gettext.
6973 (x86_linux_dr_set): Likewise.
6975 2015-03-24 Gary Benson <gbenson@redhat.com>
6977 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6978 (x86_linux_dr_set_addr): ...this.
6979 (x86_dr_low_get_addr): Rename to...
6980 (x86_linux_dr_get_addr): ...this.
6981 (x86_dr_low_set_control): Rename to...
6982 (x86_linux_dr_set_control): ...this.
6983 (x86_dr_low_get_control): Rename to...
6984 (x86_linux_dr_get_control): ...this.
6985 (x86_dr_low_get_status): Rename to...
6986 (x86_linux_dr_get_status): ...this.
6987 (x86_dr_low): Update with new function names.
6989 2015-03-24 Gary Benson <gbenson@redhat.com>
6991 * Makefile.in (x86-linux.o): New rule.
6992 * configure.srv: Add x86-linux.o to relevant targets.
6993 * linux-low.c (lwp_set_arch_private_info): New function.
6994 (lwp_arch_private_info): Likewise.
6995 * linux-x86-low.c: Include nat/x86-linux.h.
6996 (arch_lwp_info): Removed structure.
6997 (update_debug_registers_callback):
6998 Use lwp_set_debug_registers_changed.
6999 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
7000 and lwp_set_debug_registers_changed.
7001 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
7003 2015-03-24 Gary Benson <gbenson@redhat.com>
7005 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7006 * linux-arm-low.c (arm_new_thread): Likewise.
7007 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7008 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7009 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7010 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7012 2015-03-24 Gary Benson <gbenson@redhat.com>
7014 * linux-low.c (ptid_of_lwp): New function.
7015 (lwp_is_stopped): Likewise.
7016 (lwp_stop_reason): Likewise.
7017 * linux-x86-low.c (update_debug_registers_callback):
7019 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7022 2015-03-24 Gary Benson <gbenson@redhat.com>
7024 * linux-low.h (linux_stop_lwp): Remove declaration.
7026 2015-03-24 Gary Benson <gbenson@redhat.com>
7028 * linux-low.h: Include nat/linux-nat.h.
7029 * linux-low.c (iterate_over_lwps_args): New structure.
7030 (iterate_over_lwps_filter): New function.
7031 (iterate_over_lwps): Likewise.
7032 * linux-x86-low.c (update_debug_registers_callback):
7033 Update signature to what iterate_over_lwps expects.
7034 Remove PID check that iterate_over_lwps now performs.
7035 (x86_dr_low_set_addr): Use iterate_over_lwps.
7036 (x86_dr_low_set_control): Likewise.
7038 2015-03-24 Gary Benson <gbenson@redhat.com>
7040 * linux-x86-low.c (x86_debug_reg_state): New function.
7041 (x86_linux_prepare_to_resume): Use the above.
7043 2015-03-24 Gary Benson <gbenson@redhat.com>
7045 * linux-low.c (current_lwp_ptid): New function.
7046 * linux-x86-low.c: Include nat/linux-nat.h.
7047 (x86_dr_low_get_addr): Use current_lwp_ptid.
7048 (x86_dr_low_get_control): Likewise.
7049 (x86_dr_low_get_status): Likewise.
7051 2015-03-20 Pedro Alves <palves@redhat.com>
7053 * tracepoint.c (cmd_qtstatus): Make "str" const.
7055 2015-03-20 Pedro Alves <palves@redhat.com>
7057 * server.c (handle_general_set): Make "req_str" const.
7059 2015-03-19 Pedro Alves <palves@redhat.com>
7061 * linux-low.c (linux_resume_one_lwp): Rename to ...
7062 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7063 instead call perror_with_name.
7064 (check_ptrace_stopped_lwp_gone): New function.
7065 (linux_resume_one_lwp): Reimplement as wrapper around
7066 linux_resume_one_lwp_throw that swallows errors if the LWP is
7069 2015-03-19 Pedro Alves <palves@redhat.com>
7071 * linux-low.c (count_events_callback, select_event_lwp_callback):
7072 No longer check whether the thread has resume_stop as last resume
7075 2015-03-19 Pedro Alves <palves@redhat.com>
7077 * linux-low.c (count_events_callback, select_event_lwp_callback):
7078 Use the lwp's status_pending_p field, not the thread's.
7080 2015-03-19 Pedro Alves <palves@redhat.com>
7082 * linux-low.c (select_event_lwp_callback): Update comments to
7083 no longer mention SIGTRAP.
7085 2015-03-18 Gary Benson <gbenson@redhat.com>
7087 * server.c (handle_query): Do not report vFile:fstat as supported.
7089 2015-03-11 Gary Benson <gbenson@redhat.com>
7091 * hostio.c (sys/types.h): New include.
7092 (sys/stat.h): Likewise.
7093 (common-remote-fileio.h): Likewise.
7094 (handle_fstat): New function.
7095 (handle_vFile): Handle vFile:fstat packets.
7097 2015-03-11 Gary Benson <gbenson@redhat.com>
7099 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7100 struct stat.st_blocks and struct stat.st_blksize.
7101 * configure: Regenerate.
7102 * config.in: Likewise.
7103 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7104 (OBS): Add common-remote-fileio.o.
7105 (common-remote-fileio.o): New rule.
7107 2015-03-09 Pedro Alves <palves@redhat.com>
7109 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7110 'struct sockaddr' pointer in 'accept' call.
7112 2015-03-09 Pedro Alves <palves@redhat.com>
7115 2015-03-07 Pedro Alves <palves@redhat.com>
7116 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7117 or <winsock2.h> here. Instead include "gdb_socket.h".
7118 (remote_open): Use union gdb_sockaddr_u.
7119 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7120 or <winsock2.h> here. Instead include "gdb_socket.h".
7121 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7122 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7124 (init_named_socket, gdb_agent_helper_thread): Use union
7127 2015-03-07 Pedro Alves <palves@redhat.com>
7129 * configure.ac (build_warnings): Move
7130 -Wdeclaration-after-statement to the C-specific set.
7131 * configure: Regenerate.
7133 2015-03-07 Pedro Alves <palves@redhat.com>
7135 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7136 or <winsock2.h> here. Instead include "gdb_socket.h".
7137 (remote_open): Use union gdb_sockaddr_u.
7138 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7139 or <winsock2.h> here. Instead include "gdb_socket.h".
7140 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7141 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7143 (init_named_socket, gdb_agent_helper_thread): Use union
7146 2015-03-07 Pedro Alves <palves@redhat.com>
7148 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7151 2015-03-06 Yao Qi <yao.qi@linaro.org>
7153 * linux-aarch64-low.c (aarch64_insert_point): Use
7154 show_debug_regs as a boolean.
7155 (aarch64_remove_point): Likewise.
7157 2015-03-05 Pedro Alves <palves@redhat.com>
7159 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7160 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7161 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7162 * nto-low.c (nto_target_ops): Likewise.
7163 * spu-low.c (spu_target_ops): Likewise.
7164 * win32-low.c (win32_target_ops): Likewise.
7166 2015-03-04 Pedro Alves <palves@redhat.com>
7168 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7169 Decide whether a breakpoint triggered based on the SIGTRAP's
7171 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7172 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7173 (linux_low_filter_event): Check for breakpoints before checking
7175 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7177 (linux_stopped_by_sw_breakpoint)
7178 (linux_supports_stopped_by_sw_breakpoint)
7179 (linux_stopped_by_hw_breakpoint)
7180 (linux_supports_stopped_by_hw_breakpoint): New functions.
7181 (linux_target_ops): Install new target methods.
7183 2015-03-04 Pedro Alves <palves@redhat.com>
7185 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7186 * server.c (swbreak_feature, hwbreak_feature): New globals.
7187 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7188 (captured_main): Clear swbreak_feature and hwbreak_feature.
7189 * server.h (swbreak_feature, hwbreak_feature): Declare.
7190 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7191 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7192 supports_stopped_by_hw_breakpoint>: New fields.
7193 (target_supports_stopped_by_sw_breakpoint)
7194 (target_stopped_by_sw_breakpoint)
7195 (target_supports_stopped_by_hw_breakpoint)
7196 (target_stopped_by_hw_breakpoint): Declare.
7198 2015-03-04 Pedro Alves <palves@redhat.com>
7200 enum lwp_stop_reason -> enum target_stop_reason
7201 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7202 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7203 (linux_wait_1, stuck_in_jump_pad_callback)
7204 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7205 (linux_stopped_by_watchpoint):
7206 * linux-low.h (enum lwp_stop_reason): Delete.
7207 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7208 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7210 2015-03-04 Yao Qi <yao.qi@linaro.org>
7212 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7214 2015-03-03 Gary Benson <gbenson@redhat.com>
7216 * hostio.c (handle_vFile): Fix prefix lengths.
7218 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7220 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7223 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7225 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7226 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7227 (clean): Add "rm -f" for above C files.
7228 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7229 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7230 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7231 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7232 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7233 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7234 (init_registers_s390x_vx_linux64)
7235 (init_registers_s390x_tevx_linux64)
7236 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7237 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7239 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7240 (s390_store_vxrs_high): New functions.
7241 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7243 (s390_arch_setup): Add logic for selecting one of the new target
7244 descriptions. Activate the new vector regsets if applicable.
7245 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7246 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7247 and init_registers_s390x_tevx_linux64.
7249 2015-03-01 Pedro Alves <palves@redhat.com>
7251 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7254 2015-02-27 Pedro Alves <palves@redhat.com>
7256 * linux-x86-low.c (u_debugreg_offset): New function.
7257 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7259 2015-02-27 Pedro Alves <palves@redhat.com>
7261 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7262 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7263 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7264 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7265 (ps_lsetfpregs, ps_getpid)
7266 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7267 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7268 (ps_lsetxregs, ps_plog): Declare.
7270 2015-02-27 Pedro Alves <palves@redhat.com>
7272 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7273 IP_AGENT_EXPORT_FUNC.
7274 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7275 IP_AGENT_EXPORT_FUNC.
7276 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7277 (IP_AGENT_EXPORT): Delete.
7278 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7279 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7280 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7281 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7282 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7283 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7284 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7285 (traceframe_read_count, traceframe_write_count)
7286 (traceframes_created, trace_state_variables, get_raw_reg)
7287 (get_trace_state_variable_value, set_trace_state_variable_value)
7288 (ust_loaded, helper_thread_id, cmd_buf): Use
7289 IPA_SYM_EXPORTED_NAME.
7290 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7291 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7292 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7293 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7294 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7295 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7296 EXTERN_C_PUSH/EXTERN_C_POP.
7297 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7298 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7299 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7300 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7301 (traceframe_write_count, traceframe_read_count)
7302 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7303 (about_to_request_buffer_space, get_trace_state_variable_value)
7304 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7305 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7306 EXTERN_C_PUSH/EXTERN_C_POP.
7307 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7308 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7309 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7310 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7311 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7312 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7313 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7314 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7316 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7317 (IP_AGENT_EXPORT_VAR_DECL): Define.
7319 (gdb_agent_get_raw_reg): Declare.
7321 2015-02-27 Tom Tromey <tromey@redhat.com>
7322 Pedro Alves <palves@redhat.com>
7324 Rename symbols whose names are reserved C++ keywords throughout.
7326 2015-02-27 Pedro Alves <palves@redhat.com>
7328 * Makefile.in (COMPILER): New, get it from autoconf.
7329 (CXX): Get from autoconf instead.
7330 (COMPILE.pre): Use COMPILER.
7331 (CC-LD): Rename to ...
7332 (CC_LD): ... this. Use COMPILER.
7333 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7334 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7335 * acinclude.m4: Include build-with-cxx.m4.
7336 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7337 Disable -Werror by default if building in C++ mode.
7338 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7339 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7340 the C++ compiler. Save/restore CXXFLAGS too.
7341 * configure: Regenerate.
7343 2015-02-27 Pedro Alves <palves@redhat.com>
7345 * acinclude.m4: Include libiberty.m4.
7346 * configure.ac: Call libiberty_INIT.
7347 * config.in, configure: Regenerate.
7349 2015-02-26 Pedro Alves <palves@redhat.com>
7351 * linux-low.c (linux_wait_1): When incrementing the PC past a
7352 program breakpoint always use the_low_target.breakpoint_len as
7353 increment, rather than the maximum between that and
7354 the_low_target.decr_pc_after_break.
7356 2015-02-23 Pedro Alves <palves@redhat.com>
7358 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7359 thread was doing a step-over; always adjust the PC if
7360 we stepped over a permanent breakpoint.
7361 (linux_wait_1): If we stepped over breakpoint that was on top of a
7362 permanent breakpoint, manually advance the PC past it.
7364 2015-02-23 Pedro Alves <palves@redhat.com>
7366 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7368 (x86_fill_gregset, x86_store_gregset): Use it when handling
7371 2015-02-20 Pedro Alves <palves@redhat.com>
7373 * thread-db.c: Include "nat/linux-procfs.h".
7374 (thread_db_init): Skip listing new threads if the kernel supports
7375 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7377 2015-02-20 Pedro Alves <palves@redhat.com>
7379 * linux-low.c (status_pending_p_callback): Use ptid_match.
7381 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7383 PR breakpoints/16812
7384 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7385 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7386 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7388 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7390 PR breakpoints/15956
7391 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7393 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7395 * linux-low.c (linux_low_btrace_conf): Print size.
7396 * server.c (handle_btrace_conf_general_set): New.
7397 (hanle_general_set): Call handle_btrace_conf_general_set.
7398 (handle_query): Report Qbtrace-conf:bts:size as supported.
7400 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7402 * linux-low.c (linux_low_enable_btrace): Update parameters.
7403 (linux_low_btrace_conf): New.
7404 (linux_target_ops)<to_btrace_conf>: Initialize.
7405 * server.c (current_btrace_conf): New.
7406 (handle_btrace_enable): Rename to ...
7407 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7408 to target_enable_btrace. Update comment. Update users.
7409 (handle_qxfer_btrace_conf): New.
7410 (qxfer_packets): Add btrace-conf entry.
7411 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7412 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7413 (target_ops)<read_btrace_conf>: New.
7414 (target_enable_btrace): Update parameters.
7415 (target_read_btrace_conf): New.
7417 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7419 * server.c (handle_btrace_general_set): Remove call to
7420 target_supports_btrace.
7421 (supported_btrace_packets): New.
7422 (handle_query): Call supported_btrace_packets.
7423 * target.h: include btrace-common.h.
7424 (btrace_target_info): Removed.
7425 (supports_btrace, target_supports_btrace): Update parameters.
7427 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7429 * Makefile.in (SFILES): Add common/btrace-common.c.
7430 (OBS): Add common/btrace-common.o.
7431 (btrace-common.o): Add build rules.
7432 * linux-low: Include btrace-common.h.
7433 (linux_low_read_btrace): Use struct btrace_data. Call
7434 btrace_data_init and btrace_data_fini.
7436 2015-02-06 Pedro Alves <palves@redhat.com>
7438 * thread-db.c (find_new_threads_callback): Add debug output.
7440 2015-02-04 Pedro Alves <palves@redhat.com>
7442 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7443 (resume_stopped_resumed_lwps): New function.
7444 (linux_wait_for_event_filtered): Use it.
7446 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7448 * Makefile.in (SFILES): Add linux-personality.c.
7449 (linux-personality.o): New rule.
7450 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7451 list of objects to be built.
7452 * linux-low.c: Include nat/linux-personality.h.
7453 (linux_create_inferior): Remove code to disable address space
7454 randomization (moved to ../nat/linux-personality.c). Create
7455 cleanup to disable address space randomization.
7457 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7459 * Makefile.in (posix-strerror.o): New rule.
7460 (mingw-strerror.o): Likewise.
7461 * configure: Regenerated.
7462 * configure.ac: Source file ../common/common.host. Initialize new
7463 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7465 2015-01-14 Yao Qi <yao@codesourcery.com>
7467 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7468 (ppc-linux.o): New rule.
7469 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7470 * configure.ac: AC_CHECK_FUNCS(getauxval).
7471 * config.in: Re-generated.
7472 * configure: Re-generated.
7473 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7474 ppc64_64bit_inferior_p
7476 2015-01-14 Yao Qi <yao@codesourcery.com>
7478 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7479 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7480 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7481 (PT_ORIG_R3, PT_TRAP): Likewise.
7482 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7483 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7484 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7486 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7488 * i387-fp.c (i387_cache_to_xsave): In look over
7489 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7490 zmmh_low_space field by use of zmmh_high_space.
7492 2015-01-09 Pedro Alves <palves@redhat.com>
7494 * linux-low.c (step_over_bkpt): Move higher up in the file.
7495 (handle_extended_wait): Don't store the stop_pc here.
7496 (get_stop_pc): Adjust comments and rename to ...
7497 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7498 stopped for a software breakpoint or hardware breakpoint.
7499 (thread_still_has_status_pending_p): New function.
7500 (status_pending_p_callback): Use
7501 thread_still_has_status_pending_p. If the event is no longer
7502 interesting, resume the LWP.
7503 (handle_tracepoints): Add assert.
7504 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7505 (wstatus_maybe_breakpoint): New function.
7506 (cancel_breakpoint): Delete function.
7507 (check_stopped_by_watchpoint): New function, factored out from
7508 linux_low_filter_event.
7509 (lp_status_maybe_breakpoint): Delete function.
7510 (linux_low_filter_event): Remove filter_ptid argument.
7511 Leave thread group exits pending here. Store the LWP's stop PC.
7512 Always leave events pending.
7513 (linux_wait_for_event_filtered): Pull all events out of the
7514 kernel, and leave them all pending.
7515 (count_events_callback, select_event_lwp_callback): Consider all
7517 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7518 (select_event_lwp): Only give preference to the stepping LWP in
7519 all-stop mode. Adjust comments.
7520 (ignore_event): New function.
7521 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7522 references to cancel_breakpoints. Adjust to renames. Also give
7523 equal priority to all LWPs that have had events in non-stop mode.
7524 If reporting a software breakpoint event, unadjust the LWP's PC.
7525 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7526 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7528 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7529 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7530 (linux_stopped_by_watchpoint): Adjust.
7531 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7532 * linux-low.h (enum lwp_stop_reason): New.
7533 (struct lwp_info) <stop_pc>: Adjust comment.
7534 <stopped_by_watchpoint>: Delete field.
7535 <stop_reason>: New field.
7536 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7537 * mem-break.c (software_breakpoint_inserted_here)
7538 (hardware_breakpoint_inserted_here): New function.
7539 * mem-break.h (software_breakpoint_inserted_here)
7540 (hardware_breakpoint_inserted_here): Declare.
7541 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7542 (cancel_breakpoints): Delete.
7543 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7544 (upload_fast_traceframes): Remove references to
7547 2015-01-09 Pedro Alves <palves@redhat.com>
7549 * thread-db.c (find_new_threads_callback): Ignore thread if the
7550 kernel thread ID is -1.
7552 2015-01-09 Pedro Alves <palves@redhat.com>
7554 * linux-low.c (linux_attach_fail_reason_string): Move to
7555 nat/linux-ptrace.c, and rename.
7556 (linux_attach_lwp): Update comment.
7557 (attach_proc_task_lwp_callback): New function.
7558 (linux_attach): Adjust to rename and use
7559 linux_proc_attach_tgid_threads.
7560 (linux_attach_fail_reason_string): Delete declaration.
7562 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7564 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7565 * server.c (gdbserver_version): Likewise.
7567 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7569 * remote-utils.c: Include ctype.h.
7570 (input_interrupt): Explicitly handle the case when the char
7571 received is the NUL byte. Improve the printing of non-ASCII
7574 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7576 * linux-low.c (linux_low_filter_event): Update call to
7577 linux_enable_event_reporting following the addition of
7578 a new parameter to that function.
7580 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7583 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7584 (AARCH64_FPCR_REGNO): Likewise.
7585 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7586 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7587 (aarch64_store_fpregset): Likewise.
7589 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7591 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7592 Remove FIXME comment about assumption about N.
7594 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7596 * configure.ac: If large-file support is disabled in GDBserver,
7597 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7598 * configure: Regenerate.
7600 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7602 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7603 warning upon ENODATA from ptrace.
7604 * linux-s390-low.c (s390_store_tdb): New.
7605 (s390_regsets): Add regset for NT_S390_TDB.
7607 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7609 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7610 without a fill_function.
7611 * linux-s390-low.c (s390_fill_last_break): Remove.
7612 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7613 (s390_arch_setup): Use regset's size instead of fill_function for
7616 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7618 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7619 the regset's store function when ptrace returned an error.
7620 * regcache.c (get_thread_regcache): Invalidate register cache
7621 before fetching inferior's registers.
7623 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7625 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7626 while-loop as for-loop.
7627 (regsets_store_inferior_registers): Likewise.
7629 2014-11-28 Yao Qi <yao@codesourcery.com>
7631 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7632 * config.in, configure: Re-generate.
7633 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7636 2014-11-21 Yao Qi <yao@codesourcery.com>
7638 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7639 (AC_CHECK_HEADERS): Remove malloc.h.
7640 * configure: Re-generated.
7641 * config.in: Re-generated.
7642 * server.h: Don't include alloca.h and malloc.h.
7643 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7644 Don't include malloc.h.
7646 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7648 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7649 corresponding ERRNO check in same block.
7651 2014-11-12 Pedro Alves <palves@redhat.com>
7653 * server.c (cont_thread): Update comment.
7654 (start_inferior, attach_inferior): No longer clear cont_thread.
7655 (handle_v_cont): No longer set cont_thread.
7656 (captured_main): Clear cont_thread each time a GDB connects.
7658 2014-11-12 Pedro Alves <palves@redhat.com>
7660 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7661 thread, and don't resume all threads if the Hc thread has exited.
7663 2014-11-12 Pedro Alves <palves@redhat.com>
7665 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7666 the process group instead of to a specific LWP.
7668 2014-10-15 Pedro Alves <palves@redhat.com>
7671 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7673 (arm_set_thread_context): Delete.
7674 (the_low_target): Adjust.
7675 * win32-i386-low.c (debug_registers_changed)
7676 (debug_registers_used): Delete.
7677 (update_debug_registers_callback): New function.
7678 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7679 needing to update their debug registers.
7680 (win32_get_current_dr): New function.
7681 (x86_dr_low_get_addr, x86_dr_low_get_control)
7682 (x86_dr_low_get_status): Fetch the debug register from the thread
7684 (i386_initial_stuff): Adjust.
7685 (i386_get_thread_context): Remove current_event parameter. Don't
7686 clear debug_registers_changed nor copy DR values to
7688 (i386_set_thread_context): Delete.
7689 (i386_prepare_to_resume): New function.
7690 (i386_thread_added): Mark the thread as needing to update irs
7692 (the_low_target): Remove i386_set_thread_context and install
7693 i386_prepare_to_resume.
7694 * win32-low.c (win32_get_thread_context): Adjust.
7695 (win32_set_thread_context): Use SetThreadContext
7697 (win32_prepare_to_resume): New function.
7698 (win32_require_context): New function, factored out from ...
7699 (thread_rec): ... this.
7700 (continue_one_thread): Call win32_prepare_to_resume on each thread
7701 we're about to continue.
7702 (win32_resume): Call win32_prepare_to_resume on the event thread.
7703 * win32-low.h (struct win32_thread_info)
7704 <debug_registers_changed>: New field.
7705 (struct win32_target_ops): Change prototype of set_thread_context,
7706 delete set_thread_context and add prepare_to_resume.
7707 (win32_require_context): New declaration.
7709 2014-10-08 Gary Benson <gbenson@redhat.com>
7711 * server.h: Do not include common-exceptions.h.
7713 2014-10-08 Gary Benson <gbenson@redhat.com>
7715 * server.h: Do not include cleanups.h.
7717 2014-09-30 James Hogan <james.hogan@imgtec.com>
7719 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7722 2014-09-23 Yao Qi <yao@codesourcery.com>
7724 * linux-low.c (lp_status_maybe_breakpoint): New function.
7725 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7726 (count_events_callback): Likewise.
7727 (select_event_lwp_callback): Likewise.
7728 (cancel_breakpoints_callback): Likewise.
7730 2014-09-19 Don Breazeal <donb@codesourcery.com>
7732 * linux-low.c (handle_extended_wait): Call
7733 linux_ptrace_get_extended_event.
7734 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7735 linux_is_extended_waitstatus.
7737 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7739 * Makefile.in (CPPFLAGS): Define.
7740 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7741 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7743 2014-09-16 Gary Benson <gbenson@redhat.com>
7745 * inferiors.h (current_inferior): Renamed as...
7746 (current_thread): New variable. All uses updated.
7747 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7748 (maybe_move_out_of_jump_pad): Likewise.
7749 (cancel_breakpoint): Likewise.
7750 (linux_low_filter_event): Likewise.
7751 (wait_for_sigstop): Likewise.
7752 (linux_resume_one_lwp): Likewise.
7753 (need_step_over_p): Likewise.
7754 (start_step_over): Likewise.
7755 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7756 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7757 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7758 and save_inferior as saved_thread.
7759 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7761 (regcache_invalidate_thread): Likewise.
7762 * remote-utils.c (prepare_resume_reply): Likewise.
7763 * thread-db.c (thread_db_get_tls_address): Likewise.
7764 (disable_thread_event_reporting): Likewise.
7765 (remove_thread_event_breakpoints): Likewise.
7766 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7768 * target.h (set_desired_inferior): Renamed as...
7769 (set_desired_thread): New declaration. All uses updated.
7770 * server.c (myresume): Updated comment to reference thread instead
7772 (handle_serial_event): Likewise.
7773 (handle_target_event): Likewise.
7775 2014-09-12 Tom Tromey <tromey@redhat.com>
7776 Gary Benson <gbenson@redhat.com>
7778 * regcache.h: Include common-regcache.h.
7779 (regcache_read_pc): Don't declare.
7780 * regcache.c (get_thread_regcache_for_ptid): New function.
7782 2014-09-11 Tom Tromey <tromey@redhat.com>
7783 Gary Benson <gbenson@redhat.com>
7785 * symbol.c: New file.
7786 * Makefile.in (SFILES): Add symbol.c.
7787 (OBS): Add symbol.o.
7789 2014-09-11 Gary Benson <gbenson@redhat.com>
7791 * target.c (target_stop_ptid, target_continue_ptid): New
7794 2014-09-11 Tom Tromey <tromey@redhat.com>
7795 Gary Benson <gbenson@redhat.com>
7797 * target.h: Include target/target.h.
7798 * target.c (target_read_memory, target_read_uint32)
7799 (target_write_memory): New functions.
7801 2014-09-11 Gary Benson <gbenson@redhat.com>
7803 * server.h (debug_hw_points): Don't declare.
7804 * server.c (debug_hw_points): Don't define. Replace all uses
7805 with show_debug_regs.
7806 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7807 all uses with show_debug_regs.
7809 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7811 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7812 endianness into account.
7813 (ppc_supply_ptrace_register): Likewise.
7815 2014-09-03 James Hogan <james.hogan@imgtec.com>
7817 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7818 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7820 2014-09-03 Gary Benson <gbenson@redhat.com>
7822 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7823 ALL_DEBUG_ADDRESS_REGISTERS.
7825 2014-09-02 Gary Benson <gbenson@redhat.com>
7827 * i386-low.h: Renamed as...
7828 * x86-low.h: New file. All type, function and variable name
7829 prefixes changed from "i386_" to "x86_". All references updated.
7830 * i386-low.c: Renamed as...
7831 * x86-low.c: New file. All type, function and variable name
7832 prefixes changed from "i386_" to "x86_". All references updated.
7834 2014-09-02 Gary Benson <gbenson@redhat.com>
7836 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7837 (x86_linux_new_thread): Likewise.
7839 2014-08-29 Gary Benson <gbenson@redhat.com>
7841 * server.h (setjmp.h): Do not include.
7842 (toplevel): Do not declare.
7843 (common-exceptions.h): Include.
7844 (cleanups.h): Likewise.
7845 * server.c (toplevel): Do not define.
7846 (exit_code): New static global.
7847 (detach_or_kill_for_exit_cleanup): New function.
7848 (main): New function. Original main renamed to...
7849 (captured_main): New function.
7850 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7852 2014-08-29 Gary Benson <gbenson@redhat.com>
7854 * Makefile.in (SFILES): Add common/common-exceptions.c.
7855 (OBS): Add common-exceptions.o.
7856 (common-exceptions.o): New rule.
7857 * utils.c (prepare_to_throw_exception): New function.
7859 2014-08-29 Gary Benson <gbenson@redhat.com>
7861 * config.in: Regenerate.
7862 * configure: Likewise.
7864 2014-08-29 Gary Benson <gbenson@redhat.com>
7866 * Makefile.in (SFILES): Add common/cleanups.c.
7868 (cleanups.o): New rule.
7870 2014-08-29 Gary Benson <gbenson@redhat.com>
7872 * utils.c (internal_vwarning): New function.
7874 2014-08-28 Gary Benson <gbenson@redhat.com>
7876 * utils.h (fatal): Remove declaration.
7877 * utils.c (fatal): Remove function.
7879 2014-08-28 Gary Benson <gbenson@redhat.com>
7881 * tracepoint.c (gdb_agent_init): Replace fatal with
7883 (initialize_tracepoint): Likewise.
7885 2014-08-28 Gary Benson <gbenson@redhat.com>
7887 * remote-utils.c (remote_prepare): Replace fatal with error.
7889 2014-08-28 Gary Benson <gbenson@redhat.com>
7891 * linux-low.c (linux_async): Replace fatal with warning.
7893 (linux_start_non_stop): Return -1 if linux_async failed.
7895 2014-08-28 Gary Benson <gbenson@redhat.com>
7897 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7899 (i386_dr_low_get_addr): Remove vague comment.
7900 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7903 2014-08-28 Gary Benson <gbenson@redhat.com>
7905 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7906 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7908 (linux_resume_one_lwp): Likewise.
7909 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7911 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7912 with internal_error.
7913 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7914 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7915 (find_register_by_name): Replace fatal with internal_error.
7916 (find_regno): Likewise.
7917 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7918 * thread-db.c (thread_db_create_event): Likewise.
7919 (thread_db_load_search): Likewise.
7920 (try_thread_db_load_1): Likewise.
7921 * tracepoint.c (get_jump_space_head): Replace fatal with
7923 (claim_trampoline_space): Likewise.
7924 (have_fast_tracepoint_trampoline_buffer): Likewise.
7925 (cmd_qtstart): Likewise.
7926 (stop_tracing): Likewise.
7927 (fast_tracepoint_collecting): Likewise.
7928 (target_malloc): Likewise.
7929 (download_tracepoint): Likewise.
7930 (download_trace_state_variables): Replace check with gdb_assert.
7931 (upload_fast_traceframes): Replace fatal with internal_error.
7933 2014-08-19 Tom Tromey <tromey@redhat.com>
7934 Gary Benson <gbenson@redhat.com>
7936 * Makefile.in (SFILES): Add common/common-debug.c.
7937 (OBS): Add common-debug.o.
7938 (common-debug.o): New rule.
7939 * debug.h (debug_printf): Don't declare.
7940 * debug.c (debug_printf): Renamed and rewritten as...
7941 (debug_vprintf): New function.
7943 2014-08-19 Gary Benson <gbenson@redhat.com>
7945 * utils.h: Do not include print-utils.h.
7947 2014-08-19 Tom Tromey <tromey@redhat.com>
7948 Gary Benson <gbenson@redhat.com>
7950 * server.h: Add static assertion.
7951 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7953 2014-08-19 Tom Tromey <tromey@redhat.com>
7954 Gary Benson <gbenson@redhat.com>
7956 * Makefile.in (SFILES): Add common/errors.c.
7957 (OBS): Add errors.o.
7958 (IPA_OBS): Add errors-ipa.o.
7959 (errors.o): New rule.
7960 (errors-ipa.o): Likewise.
7961 * utils.h (perror_with_name, error, warning): Don't declare.
7962 * utils.c (warning): Renamed and rewritten as...
7963 (vwarning): New function.
7964 (error): Renamed and rewritten as...
7965 (verror): New function.
7966 (internal_error): Renamed and rewritten as...
7967 (internal_verror): New function.
7969 2014-08-07 Gary Benson <gbenson@redhat.com>
7971 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7972 * configure: Regenerate.
7973 * config.in: Likewise.
7974 * server.h: Do not include errno.h.
7975 * event-loop.c: Likewise.
7976 * hostio-errno.c: Likewise.
7977 * linux-low.c: Likewise.
7978 * remote-utils.c: Likewise.
7979 * spu-low.c: Likewise.
7980 * utils.c: Likewise.
7981 * gdbreplay.c: Unconditionally include errno.h.
7983 2014-08-07 Gary Benson <gbenson@redhat.com>
7985 * server.h: Do not include string.h.
7986 * event-loop.c: Likewise.
7987 * linux-low.c: Likewise.
7988 * regcache.c: Likewise.
7989 * remote-utils.c: Likewise.
7990 * spu-low.c: Likewise.
7991 * utils.c: Likewise.
7993 2014-08-07 Gary Benson <gbenson@redhat.com>
7995 * server.h: Do not include gdb_assert.h.
7997 2014-08-07 Gary Benson <gbenson@redhat.com>
7999 * server.h: Do not include common-utils.h.
8001 2014-08-07 Gary Benson <gbenson@redhat.com>
8003 * server.h: Do not include ptid.h.
8004 * notif.h: Likewise.
8006 2014-08-07 Gary Benson <gbenson@redhat.com>
8008 * server.h: Do not include gdb_locale.h.
8010 2014-08-07 Gary Benson <gbenson@redhat.com>
8012 * server.h: Do not include gdb/signals.h.
8013 * win32-low.c: Likewise.
8015 2014-08-07 Gary Benson <gbenson@redhat.com>
8017 * server.h: Do not include pathmax.h.
8019 2014-08-07 Gary Benson <gbenson@redhat.com>
8021 * server.h: Do not include libiberty.h.
8022 * linux-bfin-low.c: Likewise.
8024 2014-08-07 Gary Benson <gbenson@redhat.com>
8026 * server.h: Do not include ansidecl.h.
8028 2014-08-07 Gary Benson <gbenson@redhat.com>
8030 * linux-x86-low.c: Do not include stddef.h.
8031 * lynx-ppc-low.c: Likewise.
8032 * tracepoint.c: Likewise.
8034 2014-08-07 Gary Benson <gbenson@redhat.com>
8036 * server.h: Do not include stdarg.h.
8037 * nto-low.c: Likewise.
8039 2014-08-07 Gary Benson <gbenson@redhat.com>
8041 * server.h: Do not include stdlib.h.
8042 * inferiors.c: Likewise.
8043 * linux-low.c: Likewise.
8044 * regcache.c: Likewise.
8045 * spu-low.c: Likewise.
8046 * tracepoint.c: Likewise.
8047 * utils.c: Likewise.
8049 2014-08-07 Gary Benson <gbenson@redhat.com>
8051 * server.h: Do not include stdio.h.
8052 * linux-low.c: Likewise.
8053 * remote-utils.c: Likewise.
8054 * spu-low.c: Likewise.
8055 * utils.c: Likewise.
8056 * wincecompat.c: Likewise.
8058 2014-08-06 Gary Benson <gbenson@redhat.com>
8060 * regcache.c (init_register_cache): Move conditionals inside if.
8062 2014-08-06 Gary Benson <gbenson@redhat.com>
8064 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8066 2014-07-31 Gary Benson <gbenson@redhat.com>
8068 * ax.h: Do not include server.h.
8069 * gdbthread.h: Likewise.
8070 * lynx-low.h: Likewise.
8071 * notif.h: Likewise.
8073 2014-07-30 Gary Benson <gbenson@redhat.com>
8075 * server.h: Include common-defs.h.
8076 Do not include config.h or build-gnulib-gdbserver/config.h.
8078 2014-07-30 Gary Benson <gbenson@redhat.com>
8080 * hostio-errno.c: Move server.h to top of includes list.
8081 * inferiors.c: Likewise.
8082 * linux-x86-low.c: Likewise.
8083 * notif.c: Include server.h.
8085 2014-07-24 Tom Tromey <tromey@redhat.com>
8086 Gary Benson <gbenson@redhat.com>
8088 * server.h (CORE_ADDR): Now unsigned.
8090 2014-07-16 Pedro Alves <palves@redhat.com>
8092 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8094 2014-07-15 Pedro Alves <palves@redhat.com>
8096 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8099 2014-07-11 Pedro Alves <palves@redhat.com>
8101 * linux-low.c (kill_wait_lwp): New function, based on
8102 kill_one_lwp_callback, but use my_waitpid directly.
8103 (kill_one_lwp_callback, linux_kill): Use it.
8105 2014-06-23 Pedro Alves <palves@redhat.com>
8107 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8108 before setting DR0..DR3.
8110 2014-06-20 Gary Benson <gbenson@redhat.com>
8112 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8113 * configure: Regenerated.
8114 * config.in: Likewise.
8116 2014-06-20 Gary Benson <gbenson@redhat.com>
8118 * Makefile.in (SFILES): Update locations for files moved
8120 (object file files): Reordered.
8122 2014-06-20 Gary Benson <gbenson@redhat.com>
8124 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8125 (i386_dr_low_set_addr): Likewise.
8126 (i386_dr_low_get_addr): Likewise.
8127 (i386_dr_low_can_set_control): Likewise.
8128 (i386_dr_low_set_control): Likewise.
8129 (i386_dr_low_get_control): Likewise.
8130 (i386_dr_low_get_status): Likewise.
8131 (i386_get_debug_register_length): Likewise.
8132 * linux-x86-low.c (i386_dr_low_set_addr):
8133 Changed signature. Made static.
8134 (i386_dr_low_get_addr): Likewise.
8135 (i386_dr_low_set_control): Likewise.
8136 (i386_dr_low_get_control): Likewise.
8137 (i386_dr_low_get_status): Likewise.
8138 (i386_dr_low): New global variable.
8139 * win32-i386-low.c (i386_dr_low_set_addr):
8140 Changed signature. Made static.
8141 (i386_dr_low_get_addr): Likewise.
8142 (i386_dr_low_set_control): Likewise.
8143 (i386_dr_low_get_control): Likewise.
8144 (i386_dr_low_get_status): Likewise.
8145 (i386_dr_low): New global variable.
8147 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8149 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8150 * Makefile.in (AR, AR_FLAGS): Define.
8151 * configure: Regenerate.
8153 2014-06-19 Gary Benson <gbenson@redhat.com>
8155 * Makefile.in (i386-dregs.o): New rule.
8156 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8157 * i386-low.c (target.h): Remove include.
8158 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8159 (DR_CONTROL_SHIFT): Likewise.
8160 (DR_CONTROL_SIZE): Likewise.
8161 (DR_RW_EXECUTE): Likewise.
8162 (DR_RW_WRITE): Likewise.
8163 (DR_RW_READ): Likewise.
8164 (DR_RW_IORW): Likewise.
8165 (DR_LEN_1): Likewise.
8166 (DR_LEN_2): Likewise.
8167 (DR_LEN_4): Likewise.
8168 (DR_LEN_8): Likewise.
8169 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8170 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8171 (DR_ENABLE_SIZE): Likewise.
8172 (DR_LOCAL_SLOWDOWN): Likewise.
8173 (DR_GLOBAL_SLOWDOWN): Likewise.
8174 (DR_CONTROL_RESERVED): Likewise.
8175 (I386_DR_CONTROL_MASK): Likewise.
8176 (I386_DR_VACANT): Likewise.
8177 (I386_DR_LOCAL_ENABLE): Likewise.
8178 (I386_DR_GLOBAL_ENABLE): Likewise.
8179 (I386_DR_DISABLE): Likewise.
8180 (I386_DR_SET_RW_LEN): Likewise.
8181 (I386_DR_GET_RW_LEN): Likewise.
8182 (I386_DR_WATCH_HIT): Likewise.
8183 (i386_wp_op_t): Likewise.
8184 (i386_show_dr): Likewise.
8185 (i386_length_and_rw_bits): Likewise.
8186 (i386_insert_aligned_watchpoint): Likewise.
8187 (i386_remove_aligned_watchpoint): Likewise.
8188 (i386_handle_nonaligned_watchpoint): Likewise.
8189 i386_update_inferior_debug_regs(): Likewise.
8190 (i386_dr_insert_watchpoint): Likewise.
8191 (i386_dr_remove_watchpoint): Likewise.
8192 (i386_dr_region_ok_for_watchpoint): Likewise.
8193 (i386_dr_stopped_data_address): Likewise.
8194 (i386_dr_stopped_by_watchpoint): Likewise.
8196 2014-06-19 Gary Benson <gbenson@redhat.com>
8198 * i386-low.c (i386_dr_show): Renamed to
8199 i386_show_dr and made static. All uses updated.
8200 (i386_dr_length_and_rw_bits): Renamed to
8201 i386_length_and_rw_bits and made static.
8203 (i386_dr_insert_aligned_watchpoint): Renamed to
8204 i386_insert_aligned_watchpoint and made static.
8206 (i386_dr_remove_aligned_watchpoint): Renamed to
8207 i386_remove_aligned_watchpoint and made static.
8209 (i386_dr_update_inferior_debug_regs): Renamed to
8210 i386_update_inferior_debug_regs and made static.
8213 2014-06-18 Gary Benson <gbenson@redhat.com>
8215 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8216 (i386_dr_low_can_set_control): Likewise.
8217 (i386_get_debug_register_length): Likewise.
8218 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8219 (i386_dr_low_can_set_control): Likewise.
8220 (i386_get_debug_register_length): Likewise.
8222 2014-06-17 Gary Benson <gbenson@redhat.com>
8224 * i386-low.h (i386-dregs.h): New include.
8225 (DR_FIRSTADDR): Now in i386-dregs.h.
8226 (DR_LASTADDR): Likewise.
8227 (DR_NADDR): Likewise.
8228 (DR_STATUS): Likewise.
8229 (DR_CONTROL): Likewise.
8230 (i386_debug_reg_state): Likewise.
8231 (i386_dr_insert_watchpoint): Likewise.
8232 (i386_dr_remove_watchpoint): Likewise.
8233 (i386_dr_region_ok_for_watchpoint): Likewise.
8234 (i386_dr_stopped_data_address): Likewise.
8235 (i386_dr_stopped_by_watchpoint): Likewise.
8236 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8238 2014-06-18 Gary Benson <gbenson@redhat.com>
8240 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8241 i386_dr_insert_watchpoint.
8242 (i386_low_remove_watchpoint): Renamed to
8243 i386_dr_remove_watchpoint.
8244 (i386_low_region_ok_for_watchpoint): Renamed to
8245 i386_dr_region_ok_for_watchpoint.
8246 (i386_low_stopped_data_address): Renamed to
8247 i386_dr_stopped_data_address.
8248 (i386_low_stopped_by_watchpoint): Renamed to
8249 i386_dr_stopped_by_watchpoint.
8250 * i386-low.c (i386_show_dr): Renamed to
8251 i386_dr_show and made nonstatic. All uses updated.
8252 (i386_length_and_rw_bits): Renamed to
8253 i386_dr_length_and_rw_bits and made nonstatic.
8255 (i386_insert_aligned_watchpoint): Renamed to
8256 i386_dr_insert_aligned_watchpoint and made nonstatic.
8258 (i386_remove_aligned_watchpoint): Renamed to
8259 i386_dr_remove_aligned_watchpoint and made nonstatic.
8261 (i386_update_inferior_debug_regs): Renamed to
8262 i386_dr_update_inferior_debug_regs and made nonstatic.
8264 (i386_low_insert_watchpoint): Renamed to
8265 i386_dr_insert_watchpoint. All uses updated.
8266 (i386_low_remove_watchpoint): Renamed to
8267 i386_dr_remove_watchpoint. All uses updated.
8268 (i386_low_region_ok_for_watchpoint): Renamed to
8269 i386_dr_region_ok_for_watchpoint. All uses updated.
8270 (i386_low_stopped_data_address): Renamed to
8271 i386_dr_stopped_data_address. All uses updated.
8272 (i386_low_stopped_by_watchpoint): Renamed to
8273 i386_dr_stopped_by_watchpoint. All uses updated.
8275 2014-06-18 Gary Benson <gbenson@redhat.com>
8277 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8278 (i386_dr_low_can_set_control): Likewise.
8279 (i386_insert_aligned_watchpoint): New check.
8281 2014-06-18 Gary Benson <gbenson@redhat.com>
8283 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8286 2014-06-18 Gary Benson <gbenson@redhat.com>
8288 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8289 instead of fatal and error.
8290 (i386_handle_nonaligned_watchpoint): Likewise.
8292 2014-06-18 Gary Benson <gbenson@redhat.com>
8294 * i386-low.c (i386_get_debug_register_length): New macro.
8295 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8296 (i386_show_dr): Use debug_printf instead of fprintf. Use
8297 phex to format values.
8299 2014-06-18 Gary Benson <gbenson@redhat.com>
8301 * i386-low.h: Comment changes.
8302 * i386-low.c: Likewise.
8304 2014-06-18 Gary Benson <gbenson@redhat.com>
8306 * i386-low.c: Whitespace changes.
8308 2014-06-12 Tom Tromey <tromey@redhat.com>
8310 * utils.c (freeargv): Remove.
8312 2014-06-12 Tom Tromey <tromey@redhat.com>
8314 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8315 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8316 (parse_debug_format_options): Likewise.
8317 (gdbserver_usage): Likewise.
8318 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8319 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8320 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8322 ($(LIBGNU)): Depend on libiberty.
8323 (all-lib): Recurse into all subdirs.
8324 (install-only): Invoke "install" target in subdirs.
8325 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8327 * configure: Rebuild.
8328 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8329 for vasprintf, vsnprintf, or gettimeofday.
8330 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8333 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8335 * development.sh: Delete.
8336 * Makefile.in (config.status): Adjust dependency on development.sh.
8337 * configure.ac: Adjust development.sh source call.
8338 * configure: Regenerate.
8340 2014-06-02 Pedro Alves <palves@redhat.com>
8342 * ax.c (gdb_free_agent_expr): New function.
8343 * ax.h (gdb_free_agent_expr): New declaration.
8344 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8346 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8348 (clear_breakpoint_conditions_and_commands): New function.
8349 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8350 (clear_breakpoint_conditions_and_commands): New declaration.
8352 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8354 * linux-aarch64-low.c (asm/ptrace.h): Include.
8356 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8358 Fix TLS access for -static -pthread.
8359 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8360 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8361 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8363 2014-05-20 Pedro Alves <palves@redhat.com>
8365 * linux-aarch64-low.c (aarch64_insert_point)
8366 (aarch64_remove_point): No longer check whether the type is
8367 supported here. Adjust to new interface.
8368 (the_low_target): Install aarch64_supports_z_point_type as
8369 supports_z_point_type method.
8370 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8371 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8372 instead of a Z packet char. Adjust.
8373 (arm_supports_z_point_type): New function.
8374 (arm_insert_point, arm_remove_point): Adjust to new interface.
8375 (the_low_target): Install arm_supports_z_point_type.
8376 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8377 (cris_insert_point, cris_remove_point): Adjust to new interface.
8378 Don't check whether the type is supported here.
8379 (the_low_target): Install cris_supports_z_point_type.
8380 * linux-low.c (linux_supports_z_point_type): New function.
8381 (linux_insert_point, linux_remove_point): Adjust to new interface.
8382 * linux-low.h (struct linux_target_ops) <insert_point,
8383 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8384 raw_breakpoint pointer parameter.
8385 <supports_z_point_type>: New method.
8386 * linux-mips-low.c (mips_supports_z_point_type): New function.
8387 (mips_insert_point, mips_remove_point): Adjust to new interface.
8388 Use mips_supports_z_point_type.
8389 (the_low_target): Install mips_supports_z_point_type.
8390 * linux-ppc-low.c (the_low_target): Install NULL as
8391 supports_z_point_type method.
8392 * linux-s390-low.c (the_low_target): Install NULL as
8393 supports_z_point_type method.
8394 * linux-sparc-low.c (the_low_target): Install NULL as
8395 supports_z_point_type method.
8396 * linux-x86-low.c (x86_supports_z_point_type): New function.
8397 (x86_insert_point): Adjust to new insert_point interface. Use
8398 insert_memory_breakpoint. Adjust to new
8399 i386_low_insert_watchpoint interface.
8400 (x86_remove_point): Adjust to remove_point interface. Use
8401 remove_memory_breakpoint. Adjust to new
8402 i386_low_remove_watchpoint interface.
8403 (the_low_target): Install x86_supports_z_point_type.
8404 * lynx-low.c (lynx_target_ops): Install NULL as
8405 supports_z_point_type callback.
8406 * nto-low.c (nto_supports_z_point_type): New.
8407 (nto_insert_point, nto_remove_point): Adjust to new interface.
8408 (nto_target_ops): Install nto_supports_z_point_type.
8409 * mem-break.c: Adjust intro comment.
8410 (struct raw_breakpoint) <raw_type, size>: New fields.
8411 <inserted>: Update comment.
8412 <shlib_disabled>: Delete field.
8413 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8414 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8415 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8416 (raw_bkpt_type_to_target_hw_bp_type): New function.
8417 (find_enabled_raw_code_breakpoint_at): New function.
8418 (find_raw_breakpoint_at): New type and size parameters. Use them.
8419 (insert_memory_breakpoint): New function, based off
8420 set_raw_breakpoint_at.
8421 (remove_memory_breakpoint): New function.
8422 (set_raw_breakpoint_at): Reimplement.
8423 (set_breakpoint): New, based on set_breakpoint_at.
8424 (set_breakpoint_at): Reimplement.
8425 (delete_raw_breakpoint): Go through the_target->remove_point
8426 instead of assuming memory breakpoints.
8427 (find_gdb_breakpoint_at): Delete.
8428 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8429 (find_gdb_breakpoint): New function.
8430 (set_gdb_breakpoint_at): Delete.
8431 (z_type_supported): New function.
8432 (set_gdb_breakpoint_1): New function, loosely based off
8433 set_gdb_breakpoint_at.
8434 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8435 (delete_gdb_breakpoint_at): Delete.
8436 (delete_gdb_breakpoint_1): New function, loosely based off
8437 delete_gdb_breakpoint_at.
8438 (delete_gdb_breakpoint): New function.
8439 (clear_gdb_breakpoint_conditions): Rename to ...
8440 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8442 (add_condition_to_breakpoint): Make static.
8443 (add_breakpoint_condition): Take a struct breakpoint pointer
8444 instead of an address. Adjust.
8445 (gdb_condition_true_at_breakpoint): Rename to ...
8446 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8448 (gdb_condition_true_at_breakpoint): Reimplement.
8449 (add_breakpoint_commands): Take a struct breakpoint pointer
8450 instead of an address. Adjust.
8451 (gdb_no_commands_at_breakpoint): Rename to ...
8452 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8453 parameter. Return true if no breakpoint was found. Change debug
8455 (gdb_no_commands_at_breakpoint): Reimplement.
8456 (run_breakpoint_commands): Rename to ...
8457 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8458 and change return type to boolean.
8459 (run_breakpoint_commands): New function.
8460 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8461 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8462 breakpoint. Go through the_target->remove_point instead of
8463 assuming memory breakpoint.
8464 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8465 software and hardware breakpoints.
8466 (reinsert_raw_breakpoint): Go through the_target->insert_point
8467 instead of assuming memory breakpoint.
8468 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8469 software and hardware breakpoints.
8470 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8471 Check both software and hardware breakpoints.
8472 (validate_inserted_breakpoint): Assert the breakpoint is a
8473 software breakpoint. Set the inserted flag to -1 instead of
8474 setting shlib_disabled.
8475 (delete_disabled_breakpoints): Adjust.
8476 (validate_breakpoints): Only validate software breakpoints.
8477 Adjust to inserted flag change.
8478 (check_mem_read, check_mem_write): Skip breakpoint types other
8479 than software breakpoints. Adjust to inserted flag change.
8480 * mem-break.h (enum raw_bkpt_type): New enum.
8481 (raw_breakpoint, struct process_info): Forward declare.
8482 (Z_packet_to_target_hw_bp_type): Delete declaration.
8483 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8484 (set_gdb_breakpoint, delete_gdb_breakpoint)
8485 (clear_breakpoint_conditions): New declarations.
8486 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8487 (breakpoint_inserted_here): Update comment.
8488 (add_breakpoint_condition, add_breakpoint_commands): Replace
8489 address parameter with a breakpoint pointer parameter.
8490 (gdb_breakpoint_here): Update comment.
8491 (delete_gdb_breakpoint_at): Delete.
8492 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8493 * server.c (process_point_options): Take a struct breakpoint
8494 pointer instead of an address. Adjust.
8495 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8496 delete_gdb_breakpoint.
8497 * spu-low.c (spu_target_ops): Install NULL as
8498 supports_z_point_type method.
8499 * target.h: Include mem-break.h.
8500 (struct target_ops) <prepare_to_access_memory>: Update comment.
8501 <supports_z_point_type>: New field.
8502 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8503 instead of a char. Also take a raw breakpoint pointer.
8504 * win32-arm-low.c (the_low_target): Install NULL as
8505 supports_z_point_type.
8506 * win32-i386-low.c (i386_supports_z_point_type): New function.
8507 (i386_insert_point, i386_remove_point): Adjust to new interface.
8508 (the_low_target): Install i386_supports_z_point_type.
8509 * win32-low.c (win32_supports_z_point_type): New function.
8510 (win32_insert_point, win32_remove_point): Adjust to new interface.
8511 (win32_target_ops): Install win32_supports_z_point_type.
8512 * win32-low.h (struct win32_target_ops):
8513 <supports_z_point_type>: New method.
8514 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8515 instead of a char. Also take a raw breakpoint pointer.
8517 2014-05-20 Pedro Alves <palves@redhat.com>
8519 * mem-break.h: Include break-common.h.
8520 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8521 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8522 (Z_packet_to_target_hw_bp_type): New declaration.
8523 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8524 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8525 (Z_PACKET_ACCESS_WP): Delete macros.
8526 (Z_packet_to_hw_type): Delete function.
8527 * i386-low.h: Don't include break-common.h here.
8528 (Z_packet_to_hw_type): Delete declaration.
8529 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8530 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8531 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8532 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8533 * linux-aarch64-low.c: Don't include break-common.h here.
8534 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8535 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8536 (Z_packet_to_target_hw_bp_type): Delete function.
8537 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8539 (mips_insert_point, mips_remove_point): Use
8540 Z_packet_to_target_hw_bp_type.
8542 2014-05-20 Pedro Alves <palves@redhat.com>
8544 * linux-aarch64-low.c: Include break-common.h.
8545 (enum target_point_type): Delete.
8546 (Z_packet_to_point_type): Rename to ...
8547 (Z_packet_to_target_hw_bp_type): ... this, and return a
8548 target_hw_bp_type instead.
8549 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8550 instead of an enum target_point_type.
8551 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8553 (aarch64_dr_state_insert_one_point)
8554 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8555 (aarch64_handle_aligned_watchpoint)
8556 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8557 Take an enum target_hw_bp_type instead of an enum
8559 (aarch64_supports_z_point_type): New function.
8560 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8561 use Z_packet_to_target_hw_bp_type.
8563 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8565 * configure.ac: Only use -Werror by default when DEVELOPMENT
8567 * configure: Regenerate.
8569 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8571 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8572 * linux-x86-low.c (X86_64_USER_REGS): New.
8573 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8575 2014-04-28 Yao Qi <yao@codesourcery.com>
8577 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8580 2014-04-25 Pedro Alves <palves@redhat.com>
8583 * linux-low.c (linux_attach_fail_reason_string): New function.
8584 (linux_attach_lwp): Delete.
8585 (linux_attach_lwp_1): Rename to ...
8586 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8587 argument. Remove "initial" parameter. Return int instead of
8588 void. Don't error or warn here.
8589 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8590 failure to attach to the tgid. Call warning when failing to
8592 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8593 argument. Remove "initial" parameter. Return int instead of
8594 void. Don't error or warn here.
8595 (linux_attach_fail_reason_string): New declaration.
8596 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8597 interface change. Use linux_attach_fail_reason_string.
8599 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8600 Walfred Tedeschi <walfred.tedeschi@intel.com>
8602 * Makefile.in: Added rules to handle new files
8603 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8604 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8605 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8606 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8607 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8608 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8610 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8611 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8612 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8613 i386/x32-avx512.xml.
8614 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8615 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8616 i386/x32-avx512-linux.xml.
8617 * i387-fp.c (num_avx512_k_registers): New constant for number
8619 (num_avx512_zmmh_low_registers): New constant for number of
8620 lower ZMM registers (0-15).
8621 (num_avx512_zmmh_high_registers): New constant for number of
8622 higher ZMM registers (16-31).
8623 (num_avx512_ymmh_registers): New contant for number of higher
8624 YMM registers (ymm16-31 added by avx521 on x86_64).
8625 (num_avx512_xmm_registers): New constant for number of higher
8626 XMM registers (xmm16-31 added by AVX512 on x86_64).
8627 (struct i387_xsave): Add space for AVX512 registers.
8628 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8629 Add code to handle AVX512 registers.
8630 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8631 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8632 prototypei from generated file.
8633 (tdesc_amd64_avx512_linux): Likewise.
8634 (init_registers_x32_avx512_linux): Likewise.
8635 (tdesc_x32_avx512_linux): Likewise.
8636 (init_registers_i386_avx512_linux): Likewise.
8637 (tdesc_i386_avx512_linux): Likewise.
8638 (x86_64_regmap): Add AVX512 registers.
8639 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8641 (initialize_low_arch): Add code to initialize AVX512 registers.
8643 2014-04-23 Pedro Alves <palves@redhat.com>
8645 * mem-break.c (find_gdb_breakpoint_at): Make static.
8646 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8648 2014-04-23 Pedro Alves <palves@redhat.com>
8650 * i386-low.c: Don't include break-common.h here.
8651 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8652 prototype to take target_hw_bp_type as argument instead of a Z
8654 * i386-low.h: Include break-common.h here.
8655 (Z_packet_to_hw_type): Declare.
8656 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8658 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8659 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8660 (x86_remove_point): Convert the packet number to a
8661 target_hw_bp_type before calling i386_low_remove_watchpoint.
8662 * win32-i386-low.c (i386_insert_point): Convert the packet number
8663 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8664 (i386_remove_point): Convert the packet number to a
8665 target_hw_bp_type before calling i386_low_remove_watchpoint.
8667 2014-04-23 Pedro Alves <palves@redhat.com>
8669 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8671 2014-04-10 Pedro Alves <palves@redhat.com>
8673 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8674 Check if the condition or command is NULL before checking if the
8675 breakpoint is known. On success, return true.
8676 * mem-break.h (add_breakpoint_condition): Document return.
8677 (add_breakpoint_commands): Add describing comment.
8678 * server.c (skip_to_semicolon): New function.
8679 (process_point_options): Use it.
8681 2014-04-09 Pedro Alves <palves@redhat.com>
8683 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8686 2014-02-27 Pedro Alves <palves@redhat.com>
8689 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8691 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8693 (last_thread_of_process_p): Take a PID argument instead of a
8695 (linux_wait_for_lwp): Delete.
8696 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8698 (linux_low_filter_event): New function, party factored out from
8699 linux_wait_for_event.
8700 (linux_wait_for_event): Rename to ...
8701 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8702 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8703 sigsuspend. Check for zombie leaders.
8704 (linux_wait_for_event): Reimplement as wrapper around
8705 linux_wait_for_event_filtered.
8706 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8707 a normal or signal exit is seen, it's the whole process exiting.
8708 (wait_for_sigstop): No longer a for_each_inferior callback.
8709 Rewrite on top of linux_wait_for_event_filtered.
8710 (stop_all_lwps): Call wait_for_sigstop directly.
8711 * server.c (resume, handle_target_event): Handle
8712 TARGET_WAITKIND_NO_RESUMED.
8714 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8716 * win32-low.c (psapi_get_dll_name,
8717 * win32_CreateToolhelp32Snapshot): Delete.
8718 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8719 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8721 (handle_load_dll): Add function description.
8722 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8724 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8726 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8728 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8729 base address when calling win32_add_one_solib.
8730 (handle_load_dll): Delete local variable load_addr.
8731 Remove 0x1000 offset applied to DLL base address when calling
8732 win32_add_one_solib.
8733 (handle_unload_dll): Add comment.
8735 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8737 * win32-low.c (win32_add_all_dlls): Renames
8738 win32_ensure_ntdll_loaded. Rewrite function documentation.
8739 Adjust implementation to always load all DLLs.
8740 Add 0x1000 offset to DLL base address when calling
8741 win32_add_one_solib.
8742 (child_initialization_done): New static global.
8743 (do_initial_child_stuff): Set child_initialization_done to
8744 zero during child initialization, and 1 after. Replace call
8745 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8747 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8748 (handle_unload_dll): Add function documentation.
8749 (get_child_debug_event): Ignore load and unload DLL events
8750 during child initialization.
8752 2014-02-20 Doug Evans <dje@google.com>
8754 Remove global all_lwps.
8755 * inferiors.h (ptid_of): Move here from linux-low.h.
8756 (pid_of, lwpid_of): Ditto.
8757 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8758 parameter is a struct thread_info * now.
8759 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8760 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8761 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8763 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8764 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8765 * linux-arm-low.c (update_registers_callback): Update, "entry"
8766 parameter is a struct thread_info * now.
8767 Fetch lwpid from current_inferior directly.
8768 (arm_insert_point): Pass &all_threads to find_inferior instead of
8770 (arm_remove_point): Ditto.
8771 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8772 (arm_prepare_to_resume): Fetch pid from thread.
8773 (arm_read_description): Fetch lwpid from current_inferior directly.
8774 * linux-low.c (all_lwps): Delete.
8775 (delete_lwp): Delete call to remove_inferior.
8776 (handle_extended_wait): Fetch lwpid from thread.
8777 (add_lwp): Don't set lwp->entry.id. Remove call to
8778 add_inferior_to_list.
8779 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8780 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8781 (kill_one_lwp_callback): Ditto.
8782 (linux_kill): Don't dereference NULL pointer.
8783 Fetch ptid,lwpid from thread.
8784 (get_detach_signal): Fetch ptid from thread.
8785 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8786 Simplify call to regcache_invalidate_thread.
8787 (delete_lwp_callback): Update, "entry" parameter is a
8788 struct thread_info * now. Fetch pid from thread.
8789 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8790 (status_pending_p_callback): Update, "entry" parameter is a
8791 struct thread_info * now. Fetch ptid from thread.
8792 (find_lwp_pid): Update, "entry" parameter is a
8793 struct thread_info * now.
8794 (linux_wait_for_lwp): Fetch pid from thread.
8795 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8796 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8797 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8798 (dequeue_one_deferred_signal): Ditto.
8799 (cancel_breakpoint): Fetch ptid from current_inferior.
8800 (linux_wait_for_event): Pass &all_threads to find_inferior,
8801 not &all_lwps. Fetch ptid, lwpid from thread.
8802 (count_events_callback): Update, "entry" parameter is a
8803 struct thread_info * now.
8804 (select_singlestep_lwp_callback): Ditto.
8805 (select_event_lwp_callback): Ditto.
8806 (cancel_breakpoints_callback): Ditto.
8807 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8809 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8810 (unsuspend_one_lwp): Update, "entry" parameter is a
8811 struct thread_info * now.
8812 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8814 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8815 Fetch lwpid from thread, not lwp.
8816 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8817 Pass &all_threads to find_inferior, not &all_lwps.
8818 (send_sigstop): Fetch lwpid from thread, not lwp.
8819 (send_sigstop_callback): Update, "entry" parameter is a
8820 struct thread_info * now.
8821 (suspend_and_send_sigstop_callback): Ditto.
8822 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8823 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8824 struct thread_info * now.
8825 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8827 (lwp_running): Update, "entry" parameter is a
8828 struct thread_info * now.
8829 (stop_all_lwps): Fetch ptid from thread.
8830 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8831 (linux_resume_one_lwp): Fetch lwpid from thread.
8832 (linux_set_resume_request): Update, "entry" parameter is a
8833 struct thread_info * now. Fetch pid, lwpid from thread.
8834 (resume_status_pending_p): Update, "entry" parameter is a
8835 struct thread_info * now.
8836 (need_step_over_p): Ditto. Fetch lwpid from thread.
8837 (start_step_over): Fetch lwpid from thread.
8838 (linux_resume_one_thread): Update, "entry" parameter is a
8839 struct thread_info * now. Fetch lwpid from thread.
8840 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8841 (proceed_one_lwp): Update, "entry" parameter is a
8842 struct thread_info * now. Fetch lwpid from thread.
8843 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8844 struct thread_info * now.
8845 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8846 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8847 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8849 (regsets_store_inferior_registers): Ditto.
8850 (fetch_register, store_register): Ditto.
8851 (linux_read_memory, linux_write_memory): Ditto.
8852 (linux_request_interrupt): Ditto.
8853 (linux_read_auxv): Ditto.
8854 (linux_xfer_siginfo): Ditto.
8855 (linux_qxfer_spu): Ditto.
8856 (linux_qxfer_libraries_svr4): Ditto.
8857 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8858 moved to inferiors.h.
8860 (get_thread_lwp): Update.
8861 (struct lwp_info): Delete member "entry". Simplify comment for
8864 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8865 current_inferior directly.
8866 (update_watch_registers_callback): Update, "entry" parameter is a
8867 struct thread_info * now. Fetch pid from thread.
8868 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8869 (mips_insert_point): Fetch lwpid from current_inferior.
8870 Pass &all_threads to find_inferior, not &all_lwps.
8871 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8872 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8874 (mips_stopped_data_address): Ditto.
8875 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8877 * linux-tile-low.c (tile_arch_setup): Ditto.
8878 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8879 (update_debug_registers_callback): Update, "entry" parameter is a
8880 struct thread_info * now. Fetch pid from thread.
8881 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8882 Pass &all_threads to find_inferior, not &all_lwps.
8883 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8884 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8885 Pass &all_threads to find_inferior, not &all_lwps.
8886 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8887 (i386_dr_low_get_status): Ditto.
8888 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8889 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8890 (x86_linux_read_description): Ditto.
8891 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8893 2014-02-20 Doug Evans <dje@google.com>
8895 * inferiors.c (get_first_inferior): Fix buglet.
8897 2014-02-19 Doug Evans <dje@google.com>
8899 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8900 * inferiors.c (add_thread): Change result type to struct thread_info *.
8901 All callers updated.
8902 (add_lwp): Call add_thread here instead of in callers.
8903 All callers updated.
8904 * linux-low.h (get_lwp_thread): Rewrite.
8905 (struct lwp_info): New member "thread".
8907 2014-02-19 Doug Evans <dje@google.com>
8909 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8910 All callers updated.
8912 2014-02-19 Doug Evans <dje@google.com>
8914 * inferiors.c (add_thread): Fix whitespace.
8916 2014-02-19 Doug Evans <dje@google.com>
8918 * dll.c (clear_dlls): Replace accessing list implemention details
8920 * gdbthread.h (get_first_thread): Declare.
8921 * inferiors.c (for_each_inferior_with_data): New function.
8922 (get_first_thread): New function.
8923 (find_thread_ptid): Simplify.
8924 (get_first_inferior): New function.
8925 (clear_list): Delete.
8926 (one_inferior_p): New function.
8927 (clear_inferior_list): New function.
8928 (clear_inferiors): Update.
8929 * inferiors.h (for_each_inferior_with_data): Declare.
8930 (clear_inferior_list): Declare.
8931 (one_inferior_p): Declare.
8932 (get_first_inferior): Declare.
8933 * linux-low.c (linux_wait_for_event): Replace accessing list
8934 implemention details with API function.
8935 * server.c (target_running): Ditto.
8936 (accumulate_file_name_length): New function.
8937 (emit_dll_description): New function.
8938 (handle_qxfer_libraries): Replace accessing list implemention
8939 details with API function.
8940 (handle_qxfer_threads_worker): New function.
8941 (handle_qxfer_threads_proper): Replace accessing list implemention
8942 details with API function.
8943 (handle_query): Ditto.
8944 (visit_actioned_threads_callback_ftype): New typedef.
8945 (visit_actioned_threads_data): New struct.
8946 (visit_actioned_threads): Rewrite to be find_inferior callback.
8947 (resume): Call find_inferior.
8948 (handle_status): Replace accessing list implemention
8949 details with API function.
8950 (process_serial_event): Replace accessing list implemention details
8952 * target.c (set_desired_inferior): Replace accessing list implemention
8953 details with API function.
8954 * tracepoint.c (same_process_p): New function.
8955 (gdb_agent_about_to_close): Replace accessing list implemention
8956 details with API function.
8957 * win32-low.c (child_delete_thread): Replace accessing list
8958 implemention details with API function.
8959 (match_dll_by_basename): New function.
8960 (dll_is_loaded_by_basename): New function.
8961 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8962 details call to dll_is_loaded_by_basename.
8964 2014-02-19 Doug Evans <dje@google.com>
8966 * dll.h (struct dll_info): Add comment.
8967 * gdbthread.h (struct thread_info): Add comment.
8968 (current_ptid): Simplify.
8969 * inferiors.c (add_process): Update.
8970 (remove_process): Update.
8971 * inferiors.h (struct process_info): Rename member "head" to "entry".
8972 * linux-low.c (delete_lwp): Update.
8974 (last_thread_of_process_p): Update.
8975 (kill_one_lwp_callback, linux_kill): Update.
8976 (status_pending_p_callback): Update.
8977 (wait_for_sigstop): Update. Simplify read of ptid.
8978 (start_step_over): Update.
8979 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8980 (get_lwp_thread): Update.
8981 (struct lwp_info): Rename member "head" to "entry".
8982 * regcache.h (inferior_list_entry): Delete.
8983 * server.c (kill_inferior_callback): Update.
8984 (detach_or_kill_inferior_callback): Update.
8985 (print_started_pid): Update.
8986 (print_attached_pid): Update.
8987 (process_serial_event): Simplify read of ptid.
8988 * thread-db.c (thread_db_create_event): Update.
8989 (thread_db_get_tls_address): Update.
8990 * win32-low.c (current_inferior_ptid): Simplify.
8992 2014-02-19 Tom Tromey <tromey@redhat.com>
8994 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8996 (target_supports_btrace): Update.
8998 2014-02-14 Yao Qi <yao@codesourcery.com>
9000 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
9001 (rsp-low-ipa.o): New target.
9003 2014-02-12 Tom Tromey <tromey@redhat.com>
9005 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9006 convert_ascii_to_int.
9007 * regcache.c (registers_to_string): Likewise.
9008 * remote-utils.c (decode_M_packet): Likewise.
9009 * server.c (process_serial_event): Likewise.
9011 2014-02-12 Tom Tromey <tromey@redhat.com>
9013 * server.c (handle_query, handle_v_run): Use hex2bin, not
9015 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9017 2014-02-12 Tom Tromey <tromey@redhat.com>
9019 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9020 convert_int_to_ascii.
9021 * regcache.c (registers_to_string, collect_register_as_string):
9023 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9025 * server.c (process_serial_event): Likewise.
9026 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9027 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9029 2014-02-12 Tom Tromey <tromey@redhat.com>
9031 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9032 bin2hex, not hexify.
9033 * tracepoint.c (cmd_qtstatus): Likewise.
9035 2014-02-12 Tom Tromey <tromey@redhat.com>
9037 * remote-utils.c (monitor_output): Pass explicit length to
9040 2014-02-12 Tom Tromey <tromey@redhat.com>
9042 * tracepoint.c: Include rsp-low.h.
9043 * server.c: Include rsp-low.h.
9044 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9045 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9047 * remote-utils.c: Include rsp-low.h.
9048 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9049 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9050 (convert_int_to_ascii, convert_ascii_to_int): Move to
9052 * regcache.c: Include rsp-low.h.
9053 * ax.c: Include rsp-low.h.
9054 * Makefile.in (SFILES): Add common/rsp-low.c.
9055 (OBS): Add rsp-low.o.
9056 (rsp-low.o): New target.
9058 2014-02-12 Tom Tromey <tromey@redhat.com>
9060 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9061 Include print-utils.h.
9062 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9063 (plongest, thirty_two, phex_nz): Remove.
9064 * Makefile.in (SFILES): Add common/print-utils.c.
9065 (OBS): Add print-utils.o.
9066 (print-utils-ipa.o): New target.
9067 (print-utils.o): New target.
9068 (IPA_OBJS): Add print-utils-ipa.o.
9070 2014-02-06 Tom Tromey <tromey@redhat.com>
9072 * Makefile.in (SFILES): Fix indentation.
9074 2014-02-05 Doug Evans <dje@google.com>
9076 * linux-low.c (linux_wait_for_event): Improve comment.
9077 (linux_wait_1): Keep current_inferior in sync with event_child.
9079 2014-01-22 Doug Evans <dje@google.com>
9081 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9083 2014-01-22 Doug Evans <dje@google.com>
9085 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9086 * configure: Regenerate.
9087 * config.in: Regenerate.
9088 * Makefile.in (SFILES): Add debug.c.
9090 * debug.c: New file.
9091 * debug.h: New file.
9092 * linux-aarch64-low.c (*): Update all debugging printfs to use
9093 debug_printf instead of fprintf.
9094 * linux-arm-low.c (*): Ditto.
9095 * linux-cris-low.c (*): Ditto.
9096 * linux-crisv32-low.c (*): Ditto.
9097 * linux-m32r-low.c (*): Ditto.
9098 * linux-sparc-low.c (*): Ditto.
9099 * linux-x86.c (*): Ditto.
9100 * linux-low.c (*): Ditto.
9101 (linux_wait_1): Add calls to debug_enter, debug_exit.
9102 (linux_wait): Remove redundant debugging printf.
9103 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9104 (linux_resume, unstop_all_lwps): Ditto.
9105 * mem-break.c (*): Update all debugging printfs to use
9106 debug_printf instead of fprintf.
9107 * remote-utils.c (*): Ditto.
9108 * thread-db.c (*): Ditto.
9109 * server.c #include <ctype.h>, "gdb_vecs.h".
9110 (debug_threads): Moved to debug.c.
9111 (*): Update all debugging printfs to use debug_printf instead of
9113 (start_inferior): Replace call to fflush with call to debug_flush.
9114 (monitor_show_help): Mention set debug-format.
9115 (parse_debug_format_options): New function.
9116 (handle_monitor_command): Handle "monitor set debug-format".
9117 (gdbserver_usage): Mention --debug-format.
9118 (main): Parse --debug-format.
9119 * server.h (debug_threads): Declaration moved to debug.h.
9121 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9122 trace_debug_1 that uses debug_printf.
9123 (tracepoint_look_up_symbols): Update all debugging printfs to use
9124 debug_printf instead of fprintf.
9126 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9128 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9131 2014-01-17 Pedro Alves <palves@redhat.com>
9134 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9135 defined after including gdb_proc_service.h.
9137 2014-01-16 Doug Evans <dje@google.com>
9139 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9140 (match_dll): Use it.
9142 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9144 * target.h (target_ops) <read_btrace>: Change parameters and
9145 return type to allow error reporting.
9146 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9147 trace reading errors on.
9148 * linux-low.c (linux_low_read_btrace): Pass trace reading
9150 (linux_low_disable_btrace): New.
9152 2014-01-15 Doug Evans <dje@google.com>
9154 * inferiors.c (thread_id_to_gdb_id): Delete.
9155 * inferiors.h (thread_id_to_gdb_id): Delete.
9157 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9159 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9160 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9163 2014-01-08 Pedro Alves <palves@redhat.com>
9165 * server.c (handle_status): Don't discard previous queued stop
9166 replies or thread's pending status here.
9167 (main) <disconnection>: Do it here instead.
9169 2014-01-08 Pedro Alves <palves@redhat.com>
9171 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9172 * server.c (visit_actioned_threads, handle_pending_status): New
9174 (handle_v_cont): Factor out parts to ...
9175 (resume): ... this new function. If in all-stop, and a thread
9176 being resumed has a pending status, report it without actually
9178 (myresume): Adjust to use the new 'resume' function.
9179 (clear_pending_status_callback, set_pending_status_callback)
9180 (find_status_pending_thread_callback): New functions.
9181 (handle_status): Handle the case of multiple threads having
9182 interesting statuses to report. Report threads' real last signal
9183 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9184 with an interesting thread to report the status for, instead of
9185 always reporting the status of the first thread.
9187 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9189 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9190 * gdbreplay.c (gdbreplay_version): Likewise.
9192 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9194 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9195 iov.iov_len with the real length in use.
9197 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9199 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9200 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9201 for all targets that use win32-low.c.
9202 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9203 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9205 2013-12-13 Pedro Alves <palves@redhat.com>
9207 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9208 if equal to TARGET_WAITKIND_LOADED.
9209 * win32-low.c (cached_status): New static global.
9210 (win32_wait): Add declaration.
9211 (do_initial_child_stuff): Flush all initial pending debug events
9212 up to the initial breakpoint.
9213 (win32_wait): If CACHED_STATUS was set, return that instead
9214 of doing a real wait. Remove the code resuming the execution
9215 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9216 during the initial phase. Also remove the code changing
9217 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9218 TARGET_WAITKIND_STOPPED.
9220 2013-12-11 Yao Qi <yao@codesourcery.com>
9222 * notif.c (handle_notif_ack): Return 0 if no notification
9225 2013-11-20 Doug Evans <dje@google.com>
9227 * linux-low.c (linux_set_resume_request): Fix comment.
9229 2013-11-20 Doug Evans <dje@google.com>
9231 * linux-low.c (resume_status_pending_p): Tweak comment.
9233 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9235 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9236 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9237 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9238 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9239 (srv_amd64_regobj): Add amd64-mpx.o.
9240 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9241 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9242 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9243 * i387-fp.c (num_pl_bnd_register) Added constant.
9244 (num_pl_bnd_cfg_registers) Added constant.
9245 (struct i387_xsave) Added reserved area and MPX fields.
9246 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9247 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9249 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9250 (init_registers_amd64_mpx_linux): Declare new function.
9251 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9252 (x86_64_regmap): Add MPX registers.
9253 (x86_linux_read_description): Add MPX case.
9254 (initialize_low_arch): Initialize MPX targets.
9256 2013-11-18 Tom Tromey <tromey@redhat.com>
9258 * configure: Rebuild.
9259 * configure.ac: Don't check for stdlib.h.
9260 * gdbreplay.c: Unconditionally include stdlib.h.
9262 2013-11-18 Tom Tromey <tromey@redhat.com>
9264 * config.in: Rebuild.
9265 * configure: Rebuild.
9266 * configure.ac: Don't use AC_HEADER_DIRENT.
9268 2013-11-18 Tom Tromey <tromey@redhat.com>
9270 * server.h: Don't check HAVE_STRING_H.
9271 * gdbreplay.c: Don't check HAVE_STRING_H.
9272 * configure: Rebuild.
9274 2013-11-18 Tom Tromey <tromey@redhat.com>
9276 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9279 2013-11-08 Tom Tromey <tromey@redhat.com>
9281 * configure, config.in: Rebuild.
9282 * configure.ac: Remove unused configury.
9284 2013-11-08 Tom Tromey <tromey@redhat.com>
9286 * acinclude.m4: Include common.m4, codeset.m4.
9287 * configure, config.in: Rebuild.
9288 * configure.ac: Use GDB_AC_COMMON.
9290 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9292 * linux-s390-low.c (HWCAP_S390_TE): New define.
9293 (s390_arch_setup): Consider the TE field in the HWCAP for
9294 determining 'have_regset_tdb'.
9296 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9299 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9302 2013-10-02 Pedro Alves <palves@redhat.com>
9304 * server.c (process_serial_event): Don't output "GDBserver
9305 exiting" if GDB is connected through stdio.
9306 * target.c (mywait): Likewise, be silent if GDB is connected
9309 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9311 * lynx-low.c (lynx_add_threads_after_attach): New function.
9312 (lynx_attach): Remove call to add_thread. Add call to
9313 lynx_add_threads_after_attach instead.
9315 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9317 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9318 * config.in, configure: Regenerated.
9320 2013-09-18 Yao Qi <yao@codesourcery.com>
9323 * server.c (start_inferior): Clear 'resume_info'.
9325 2013-09-16 Jiong Wang <jiwang@tilera.com>
9327 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9330 2013-09-16 Jiong Wang <jiwang@tilera.com>
9332 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9333 linux-tile-low.o to srv_tgtobj.
9335 2013-09-16 Will Newton <will.newton@linaro.org>
9337 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9340 2013-09-06 Pedro Alves <palves@redhat.com>
9342 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9343 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9344 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9345 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9346 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9347 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9349 2013-09-06 Pedro Alves <palves@redhat.com>
9351 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9352 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9354 2013-09-06 Pedro Alves <palves@redhat.com>
9356 * linux-amd64-ipa.c: Include tracepoint.h.
9357 * linux-i386-ipa.c: Include tracepoint.h.
9359 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9361 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9362 (ps_get_thread_area): New function.
9364 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9366 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9367 (initialize_low_arch): Call init_registers_crisv32 rather than
9368 init_register_crisv32.
9370 2013-09-05 Pedro Alves <palves@redhat.com>
9372 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9374 * hostio.h: ... this new file.
9375 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9376 win32-low.c: Include hostio.h.
9378 2013-09-05 Pedro Alves <palves@redhat.com>
9380 * server.h (gdb_client_data, handler_func, callback_handler_func)
9381 (delete_file_handler, add_file_handler, append_callback_event)
9382 (delete_callback_event, start_event_loop, initialize_event_loop):
9383 Move to event-loop.h and include it.
9384 * event-loop.h: New file.
9386 2013-09-05 Pedro Alves <palves@redhat.com>
9388 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9389 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9390 (loaded_dll, unloaded_dll): Move to ...
9391 * dll.h: ... this new file.
9392 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9394 2013-09-05 Pedro Alves <palves@redhat.com>
9396 * server.h (current_process, get_thread_process, all_processes)
9397 (add_inferior_to_list, for_each_inferior, current_inferior)
9398 (remove_inferior, add_process, remove_process, find_process_pid)
9399 (have_started_inferiors_p, have_attached_inferiors_p)
9400 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9401 (clear_inferiors, find_inferior, find_inferior_id)
9402 (inferior_target_data, set_inferior_target_data)
9403 (inferior_regcache_data, set_inferior_regcache_data): Move to
9404 inferiors.h, and include it.
9405 * inferiors.h: New file.
9407 2013-09-05 Pedro Alves <palves@redhat.com>
9409 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9413 2013-09-05 Pedro Alves <palves@redhat.com>
9415 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9417 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9418 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9419 (handle_tracepoint_general_set, handle_tracepoint_query)
9420 (tracepoint_finished_step, tracepoint_was_hit)
9421 (release_while_stepping_state_list, current_traceframe)
9422 (in_readonly_region, traceframe_read_mem)
9423 (fetch_traceframe_registers, traceframe_read_sdata)
9424 (traceframe_read_info, struct fast_tpoint_collect_status)
9425 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9426 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9427 (supply_fast_tracepoint_registers)
9428 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9429 (ipa_tdesc, claim_trampoline_space)
9430 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9431 (agent_mem_read, agent_get_trace_state_variable_value)
9432 (agent_set_trace_state_variable_value, agent_tsv_read)
9433 (agent_mem_read_string, get_raw_reg_func_addr)
9434 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9435 * tracepoint.h: ... this new file.
9437 2013-09-05 Pedro Alves <palves@redhat.com>
9439 * server.h (perror_with_name, error, fatal, warning, paddress)
9440 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9442 * utils.h: New file.
9444 2013-09-05 Pedro Alves <palves@redhat.com>
9446 * server.h (remote_debug, noack_mode, transport_is_reliable)
9447 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9448 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9449 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9450 (write_enn, initialize_async_io, enable_async_io)
9451 (disable_async_io, check_remote_input_interrupt_request)
9452 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9453 (dead_thread_notify, prepare_resume_reply)
9454 (decode_address_to_semicolon, decode_address, decode_m_packet)
9455 (decode_M_packet, decode_X_packet, decode_xfer_write)
9456 (decode_search_memory_packet, unhexify, hexify)
9457 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9458 (look_up_one_symbol, relocate_instruction)
9459 (monitor_output): Move to remote-utils.h, and include it.
9460 * remote-utils.h: New file.
9462 2013-09-05 Pedro Alves <palves@redhat.com>
9464 * server.h (_): Delete.
9466 2013-09-02 Pedro Alves <palves@redhat.com>
9468 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9469 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9471 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9473 2013-09-02 Pierre Muller <muller@sourceware.org>
9475 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9476 or WriteProcessMemory complete successfully and handle
9477 ERROR_PARTIAL_COPY error.
9479 2013-09-02 Pedro Alves <palves@redhat.com>
9481 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9482 error instead of EIO.
9484 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9487 * linux-low.c: Include filestuff.h.
9488 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9489 * lynx-low.c: Include filestuff.h.
9490 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9491 * server.c: Include filestuff.h.
9492 (main): Call notice_open_fds.
9493 * spu-low.c: Include filestuff.h.
9494 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9496 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9498 * Makefile.in: Explain why ../target and ../nat are not
9499 listed as include file search paths.
9500 (linux-waitpid.o): New object file rule.
9501 * configure.srv (srv_native_linux_obj): New variable.
9502 Replace all occurrences of linux native object files with
9503 $srv_native_linux_obj.
9504 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9505 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9506 (linux_enable_event_reporting): Remove declaration.
9507 (my_waitpid): Moved to common/linux-waitpid.c.
9508 (linux_wait_for_event): Pass ptid when calling
9509 linux_enable_event_reporting.
9510 (linux_supports_tracefork_flag): Remove.
9511 (linux_enable_event_reporting): Likewise.
9512 (linux_tracefork_grandchild): Remove.
9513 (STACK_SIZE): Moved to common/linux-ptrace.c.
9514 (linux_tracefork_child): Remove.
9515 (linux_test_for_tracefork): Remove.
9516 (linux_look_up_symbols): Call linux_supports_traceclone.
9517 (initialize_low): Remove call to linux_test_for_tracefork.
9518 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9519 common/linux-ptrace.h.
9520 (PTRACE_TYPE_ARG4): Likewise.
9521 Include linux-ptrace.h.
9523 2013-08-21 Pedro Alves <palves@redhat.com>
9525 * config.in: Renegerate.
9527 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9529 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9530 (SFILES): Remove $(srcdir)/common/target-common.c and
9531 add $(srcdir)/target/waitstatus.c.
9532 (OBS): Remove target-common.o and add waitstatus.o.
9533 (server_h): Remove $(srcdir)/../common/target-common.h and
9534 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9535 and $(srcdir)/../target/waitstatus.h.
9536 (target-common.o): Remove.
9537 (waitstatus.o): New target object file.
9538 * target.h: Do not include target-common.h and
9539 include target/resume.h, target/wait.h and
9540 target/waitstatus.h.
9542 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9544 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9545 to PTRACE_TYPE_ARG3.
9546 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9547 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9549 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9550 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9552 2013-07-27 Jie Zhang <jie@codesourcery.com>
9553 Daniel Jacobowitz <dan@codesourcery.com>
9554 Yao Qi <yao@codesourcery.com>
9556 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9557 (mips-linux-watch.o): New rule.
9558 (mips_linux_watch_h): New variable.
9559 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9561 * linux-mips-low.c: Include mips-linux-watch.h.
9562 (struct arch_process_info, struct arch_lwp_info): New.
9563 (update_watch_registers_callback): New function.
9564 (mips_linux_new_process, mips_linux_new_thread) New functions.
9565 (mips_linux_prepare_to_resume, mips_insert_point): New
9567 (mips_remove_point, mips_stopped_by_watchpoint): New
9569 (rsp_bp_type_to_target_hw_bp_type): New function.
9570 (mips_stopped_data_address): New function.
9571 (the_low_target): Add watchpoint support functions.
9573 2013-07-27 Yao Qi <yao@codesourcery.com>
9575 * i386-low.c: Include break-common.h.
9576 (enum target_hw_bp_type): Remove.
9578 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9580 * Makefile.in (SFILES): /common/target-common.c.
9581 (OBS): Add target-common.o.
9582 (server_h): Add $(srcdir)/../common/target-common.h.
9583 (target-common.o): New target.
9584 * server.c (queue_stop_reply_callback): Free
9585 status string after use.
9586 * target.c (target_waitstatus_to_string): Remove.
9587 * target.h: Include target-common.h.
9588 (resume_kind): Likewise.
9589 (target_waitkind): Likewise.
9590 (target_waitstatus): Likewise.
9591 (TARGET_WNOHANG): Likewise.
9593 2013-07-04 Yao Qi <yao@codesourcery.com>
9595 * Makefile.in (host_alias): Use @host_noncanonical@.
9596 (target_alias): Use @target_noncanonical@.
9597 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9598 ACX_NONCANONICAL_HOST.
9599 * configure: Regenerated.
9602 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9604 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9605 * configure: Rebuild.
9606 * Makefile.in (version_host, version_target): Get from configure.
9607 (version.c): Use $(version_host) and $(version_target).
9609 2013-07-03 Pedro Alves <palves@redhat.com>
9611 * Makefile.in (config.status): Depend on development.sh.
9612 * acinclude.m4: Include libmcheck.m4.
9613 * configure: Regenerate.
9615 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9617 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9618 attribute inside the parentheses.
9619 (winapi_DebugSetProcessKillOnExit): Ditto.
9620 (winapi_DebugBreakProcess): Ditto.
9621 (winapi_GenerateConsoleCtrlEvent): Ditto.
9623 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9625 * notif.h (notif_event): Add a dummy member to avoid compiler
9628 2013-07-01 Pedro Alves <palves@redhat.com>
9630 * hostio.c (HOSTIO_PATH_MAX): Define.
9631 (require_filename, handle_open, handle_unlink, handle_readlink):
9634 2013-07-01 Pedro Alves <palves@redhat.com>
9636 * server.h: Include "pathmax.h".
9637 * linux-low.c: Don't include sys/param.h.
9638 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9640 * win32-low.c: Don't include sys/param.h.
9641 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9643 2013-07-01 Pedro Alves <palves@redhat.com>
9645 * event-loop.c: Don't check HAVE_UNISTD_H before including
9647 * gdbreplay.c: Likewise.
9648 * remote-utils.c: Likewise.
9649 * server.c: Likewise.
9650 * configure.ac: Don't check for unistd.h.
9651 * configure: Regenerate.
9653 2013-06-28 Tom Tromey <tromey@redhat.com>
9655 * Makefile.in (version.c): Use version.in, not
9658 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9660 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9661 * configure: Rebuild.
9662 * Makefile.in (version_host, version_target): Get from configure.
9663 (version.c): Use $(version_host) and $(version_target).
9665 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9667 Fix trace-status to output user name without trailing colon.
9668 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9670 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9672 Fix trace-status to output proper start-time and stop-time.
9673 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9674 output start time and stop time in hex as gdb expects.
9676 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9678 * tracepoint.c (build_traceframe_info_xml): Output trace state
9679 variables present in the trace buffer.
9681 2013-06-24 Tom Tromey <tromey@redhat.com>
9683 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9685 (version.o): Remove.
9686 * gdbreplay.c: Include version.h.
9687 (version, host_name): Don't declare.
9688 * server.h: Include version.h.
9689 (version, host_name): Don't declare.
9691 2013-06-12 Pedro Alves <palves@redhat.com>
9693 * linux-x86-low.c (linux_is_elf64): Delete global.
9694 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9695 with local linux_pid_exe_is_elf_64_file use.
9697 2013-06-11 Pedro Alves <palves@redhat.com>
9699 * linux-low.c (regset_disabled, disable_regset): New functions.
9700 (regsets_fetch_inferior_registers)
9701 (regsets_store_inferior_registers): Use them.
9702 (initialize_regsets_info); Don't allocate the disabled_regsets
9704 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9707 2013-06-11 Pedro Alves <palves@redhat.com>
9709 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9712 2013-06-11 Pedro Alves <palves@redhat.com>
9714 * linux-x86-low.c (initialize_low_arch): Call
9715 init_registers_x32_avx_linux.
9717 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9719 Fix compatibility with Android Bionic.
9720 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9723 2013-06-07 Pedro Alves <palves@redhat.com>
9726 * Makefile.in (OBS): Add tdesc.o.
9727 (IPA_OBJS): Add tdesc-ipa.o.
9728 (tdesc-ipa.o): New rule.
9729 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9731 * linux-low.c (new_inferior): Delete.
9732 (disabled_regsets, num_regsets): Delete.
9733 (linux_add_process): Adjust to set the new per-process
9735 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9736 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9737 was a stop. When calling arch_setup, switch the current inferior
9738 to the thread that got an event.
9739 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9740 (regsets_fetch_inferior_registers)
9741 (regsets_store_inferior_registers): New regsets_info parameter.
9743 (linux_register_in_regsets): New regs_info parameter. Adjust to
9745 (register_addr, fetch_register, store_register): New usrregs_info
9746 parameter. Adjust to use it.
9747 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9748 parameter regs_info. Adjust to use it.
9749 (linux_fetch_registers): Get the current inferior's regs_info, and
9751 (linux_store_registers): Ditto.
9752 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9753 (initialize_low): Don't initialize the target_regsets here. Call
9754 initialize_low_arch.
9755 * linux-low.h (target_regsets): Delete declaration.
9756 (struct regsets_info): New.
9757 (struct usrregs_info): New.
9758 (struct regs_info): New.
9759 (struct process_info_private) <new_inferior>: New field.
9760 (struct linux_target_ops): Delete the num_regs, regmap, and
9761 regset_bitmap fields. New field regs_info.
9762 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9763 * i387-fp.c (num_xmm_registers): Delete.
9764 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9765 calls to new interface.
9766 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9767 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9768 Infer the number of xmm registers from the regcache's target
9770 * i387-fp.h (num_xmm_registers): Delete.
9771 * inferiors.c (add_thread): Don't install the thread's regcache
9773 * proc-service.c (gregset_info): Fetch the current inferior's
9774 regs_info. Adjust to use it.
9775 * regcache.c: Include tdesc.h.
9776 (register_bytes, reg_defs, num_registers)
9777 (gdbserver_expedite_regs): Delete.
9778 (get_thread_regcache): If the thread doesn't have a regcache yet,
9779 create one, instead of aborting gdbserver.
9780 (regcache_invalidate_one): Rename to ...
9781 (regcache_invalidate_thread): ... this.
9782 (regcache_invalidate_one): New.
9783 (regcache_invalidate): Only invalidate registers of the current
9785 (init_register_cache): Add target_desc parameter, and use it.
9786 (new_register_cache): Ditto. Assert the target description has a
9787 non zero registers_size.
9788 (regcache_cpy): Add assertions. Adjust.
9789 (realloc_register_cache, set_register_cache): Delete.
9790 (registers_to_string, registers_from_string): Adjust.
9791 (find_register_by_name, find_regno, find_register_by_number)
9792 (register_cache_size): Add target_desc parameter, and use it.
9793 (free_register_cache_thread, free_register_cache_thread_one)
9794 (regcache_release, register_cache_size): New.
9795 (register_size): Add target_desc parameter, and use it.
9796 (register_data, supply_register, supply_register_zeroed)
9797 (supply_regblock, supply_register_by_name, collect_register)
9798 (collect_register_as_string, collect_register_by_name): Adjust.
9799 * regcache.h (struct target_desc): Forward declare.
9800 (struct regcache) <tdesc>: New field.
9801 (init_register_cache, new_register_cache): Add target_desc
9803 (regcache_invalidate_thread): Declare.
9804 (regcache_invalidate_one): Delete declaration.
9805 (regcache_release): Declare.
9806 (find_register_by_number, register_cache_size, register_size)
9807 (find_regno): Add target_desc parameter.
9808 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9810 * remote-utils.c: Include tdesc.h.
9811 (outreg, prepare_resume_reply): Adjust.
9812 * server.c: Include tdesc.h.
9813 (gdbserver_xmltarget): Delete declaration.
9814 (get_features_xml, process_serial_event): Adjust.
9815 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9817 (struct process_info) <tdesc>: New field.
9818 (ipa_tdesc): Declare.
9819 * tdesc.c: New file.
9820 * tdesc.h: New file.
9821 * tracepoint.c: Include tdesc.h.
9822 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9823 (get_context_regcache): Adjust to pass ipa_tdesc down.
9824 (do_action_at_tracepoint): Adjust to get the register cache size
9825 from the context regcache's description.
9826 (traceframe_walk_blocks): Adjust to get the register cache size
9827 from the current trace frame's description.
9828 (traceframe_get_pc): Adjust to get current trace frame's
9829 description and pass it down.
9830 (gdb_collect): Adjust to get the register cache size from the
9832 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9833 (gdbserver_xmltarget): Delete.
9834 (initialize_low_tracepoint): Set the ipa's target description.
9835 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9836 (initialize_low_tracepoint): Set the ipa's target description.
9837 * linux-x86-low.c: Include tdesc.h.
9838 [__x86_64__] (is_64bit_tdesc): New.
9839 (ps_get_thread_area, x86_get_thread_area): Use it.
9840 (i386_cannot_store_register): Rename to ...
9841 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9842 (i386_cannot_fetch_register): Rename to ...
9843 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9844 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9846 (target_regsets): Rename to ...
9847 (x86_regsets): ... this.
9848 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9850 (x86_siginfo_fixup): Use is_64bit_tdesc.
9851 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9852 (tdesc_x32_avx_linux, tdesc_x32_linux)
9853 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9855 (x86_linux_update_xmltarget): Delete.
9856 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9857 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9858 (AMD64_LINUX_USER64_CS): New.
9859 (x86_linux_read_description): New, based on
9860 x86_linux_update_xmltarget.
9861 (same_process_callback): New.
9862 (x86_arch_setup_process_callback): New.
9863 (x86_linux_update_xmltarget): New.
9864 (x86_regsets_info): New.
9865 (amd64_linux_regs_info): New.
9866 (i386_linux_usrregs_info): New.
9867 (i386_linux_regs_info): New.
9868 (x86_linux_regs_info): New.
9869 (x86_arch_setup): Reimplement.
9870 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9871 (x86_emit_ops): Ditto.
9872 (the_low_target): Adjust. Install x86_linux_regs_info,
9873 x86_cannot_fetch_register, and x86_cannot_store_register.
9874 (initialize_low_arch): New.
9875 * linux-ia64-low.c (tdesc_ia64): Declare.
9876 (ia64_fetch_register): Adjust.
9877 (ia64_usrregs_info, regs_info): New globals.
9878 (ia64_regs_info): New function.
9879 (the_low_target): Adjust.
9880 (initialize_low_arch): New function.
9881 * linux-sparc-low.c (tdesc_sparc64): Declare.
9882 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9884 (sparc_arch_setup): New function.
9885 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9886 (the_low_target): Adjust.
9887 (initialize_low_arch): New function.
9888 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9889 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9890 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9891 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9892 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9893 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9894 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9895 (tdesc_powerpc_isa205_vsx64l): Declare.
9896 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9897 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9898 (ppc_set_pc, ppc_get_hwcap): Adjust.
9899 (ppc_usrregs_info): Forward declare.
9900 (!__powerpc64__) ppc_regmap_adjusted: New global.
9901 (ppc_arch_setup): Adjust to the current process'es target
9903 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9904 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9905 (ppc_store_evrregset): Adjust.
9906 (target_regsets): Rename to ...
9907 (ppc_regsets): ... this, and make static.
9908 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9909 (ppc_regs_info): New function.
9910 (the_low_target): Adjust.
9911 (initialize_low_arch): New function.
9912 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9913 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9914 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9915 (tdesc_s390x_linux64v2): Declare.
9916 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9917 (s390_fill_gregset, s390_store_last_break): Adjust.
9918 (target_regsets): Rename to ...
9919 (s390_regsets): ... this, and make static.
9920 (s390_get_pc, s390_set_pc): Adjust.
9921 (s390_get_hwcap): New target_desc parameter, and use it.
9922 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9923 (s390_arch_setup): Adjust to set the current process'es target
9924 description. Don't adjust the regmap.
9925 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9926 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9927 (regs_info_3264): New globals.
9928 (s390_regs_info): New function.
9929 (the_low_target): Adjust.
9930 (initialize_low_arch): New function.
9931 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9932 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9933 [__mips64] (init_registers_mips_linux)
9934 (init_registers_mips_dsp_linux): Delete defines.
9935 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9936 (have_dsp): New global.
9937 (mips_read_description): New, based on mips_arch_setup.
9938 (mips_arch_setup): Reimplement.
9939 (get_usrregs_info): New function.
9940 (mips_cannot_fetch_register, mips_cannot_store_register)
9941 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9942 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9943 (target_regsets): Rename to ...
9944 (mips_regsets): ... this, and make static.
9945 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9946 (dsp_regs_info, regs_info): New globals.
9947 (mips_regs_info): New function.
9948 (the_low_target): Adjust.
9949 (initialize_low_arch): New function.
9950 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9951 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9953 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9954 (arm_read_description): New, with bits factored from
9956 (arm_arch_setup): Reimplement.
9957 (target_regsets): Rename to ...
9958 (arm_regsets): ... this, and make static.
9959 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9960 (arm_regs_info): New function.
9961 (the_low_target): Adjust.
9962 (initialize_low_arch): New function.
9963 * linux-m68k-low.c (tdesc_m68k): Declare.
9964 (target_regsets): Rename to ...
9965 (m68k_regsets): ... this, and make static.
9966 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9967 (m68k_regs_info): New function.
9968 (m68k_arch_setup): New function.
9969 (the_low_target): Adjust.
9970 (initialize_low_arch): New function.
9971 * linux-sh-low.c (tdesc_sharch): Declare.
9972 (target_regsets): Rename to ...
9973 (sh_regsets): ... this, and make static.
9974 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9975 (sh_regs_info, sh_arch_setup): New functions.
9976 (the_low_target): Adjust.
9977 (initialize_low_arch): New function.
9978 * linux-bfin-low.c (tdesc_bfin): Declare.
9979 (bfin_arch_setup): New function.
9980 (bfin_usrregs_info, regs_info): New globals.
9981 (bfin_regs_info): New function.
9982 (the_low_target): Adjust.
9983 (initialize_low_arch): New function.
9984 * linux-cris-low.c (tdesc_cris): Declare.
9985 (cris_arch_setup): New function.
9986 (cris_usrregs_info, regs_info): New globals.
9987 (cris_regs_info): New function.
9988 (the_low_target): Adjust.
9989 (initialize_low_arch): New function.
9990 * linux-cris-low.c (tdesc_crisv32): Declare.
9991 (cris_arch_setup): New function.
9992 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9993 (cris_regs_info): New function.
9994 (the_low_target): Adjust.
9995 (initialize_low_arch): New function.
9996 * linux-m32r-low.c (tdesc_m32r): Declare.
9997 (m32r_arch_setup): New function.
9998 (m32r_usrregs_info, regs_info): New globals.
9999 (m32r_regs_info): Adjust.
10000 (initialize_low_arch): New function.
10001 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
10002 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
10003 (tic6x_usrregs_info): Forward declare.
10004 (tic6x_read_description): New function, based on ...
10005 (tic6x_arch_setup): ... this. Reimplement.
10006 (target_regsets): Rename to ...
10007 (tic6x_regsets): ... this, and make static.
10008 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10009 (tic6x_regs_info): New function.
10010 (the_low_target): Adjust.
10011 (initialize_low_arch): New function.
10012 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10013 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10014 (target_regsets): Rename to ...
10015 (xtensa_regsets): ... this, and make static.
10016 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10018 (xtensa_arch_setup, xtensa_regs_info): New functions.
10019 (the_low_target): Adjust.
10020 (initialize_low_arch): New function.
10021 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10022 (nios2_arch_setup): Set the current process'es tdesc.
10023 (target_regsets): Rename to ...
10024 (nios2_regsets): ... this.
10025 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10026 (nios2_regs_info): New function.
10027 (the_low_target): Adjust.
10028 (initialize_low_arch): New function.
10029 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10030 (aarch64_arch_setup): Set the current process'es tdesc.
10031 (target_regsets): Rename to ...
10032 (aarch64_regsets): ... this.
10033 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10034 (aarch64_regs_info): New function.
10035 (the_low_target): Adjust.
10036 (initialize_low_arch): New function.
10037 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10039 (target_regsets): Rename to ...
10040 (tile_regsets): ... this.
10041 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10042 (tile_regs_info): New function.
10043 (tile_arch_setup): Set the current process'es tdesc.
10044 (the_low_target): Adjust.
10045 (initialize_low_arch): New function.
10046 * spu-low.c (tdesc_spu): Declare.
10047 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10048 * win32-arm-low.c (tdesc_arm): Declare.
10049 (arm_arch_setup): New function.
10050 (the_low_target): Install arm_arch_setup instead of
10051 init_registers_arm.
10052 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10053 (init_windows_x86): Rename to ...
10054 (i386_arch_setup): ... this. Set `win32_tdesc'.
10055 (the_low_target): Adjust.
10056 * win32-low.c (win32_tdesc): New global.
10057 (child_add_thread): Don't create the thread cache here.
10058 (do_initial_child_stuff): Set the new process'es tdesc.
10059 * win32-low.h (struct target_desc): Forward declare.
10060 (win32_tdesc): Declare.
10061 * lynx-i386-low.c (tdesc_i386): Declare global.
10062 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10063 * lynx-low.c (lynx_tdesc): New global.
10064 (lynx_add_process): Set the new process'es tdesc.
10065 * lynx-low.h (struct target_desc): Forward declare.
10066 (lynx_tdesc): Declare global.
10067 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10068 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10069 * nto-low.c (nto_tdesc): New global.
10070 (do_attach): Set the new process'es tdesc.
10071 * nto-low.h (struct target_desc): Forward declare.
10072 (nto_tdesc): Declare.
10073 * nto-x86-low.c (tdesc_i386): Declare.
10074 (nto_x86_arch_setup): Set `nto_tdesc'.
10076 2013-06-04 Gary Benson <gbenson@redhat.com>
10078 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10079 to qSupported response when appropriate.
10080 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10081 with nonzero-length annex.
10082 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10083 arguments supplied in annex.
10085 2013-05-31 Doug Evans <dje@google.com>
10088 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10089 64 bits in 64-cross-32 environment.
10091 2013-05-28 Pedro Alves <palves@redhat.com>
10093 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10094 (aarch64-without-fpu.c): Delete rule.
10095 * configure.srv (aarch64*-*-linux*): Remove references to
10096 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10097 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10100 2013-05-24 Pedro Alves <palves@redhat.com>
10102 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10103 instead of strchr/decode_address. Error if the range isn't split
10104 with a ','. Don't assume there's be a ':' in the action.
10106 2013-05-23 Yao Qi <yao@codesourcery.com>
10107 Pedro Alves <palves@redhat.com>
10109 * linux-low.c (lwp_in_step_range): New function.
10110 (linux_wait_1): If the thread was range stepping and stopped
10111 outside the stepping range, report the stop to GDB. Otherwise,
10112 continue stepping. Add range stepping debug output.
10113 (linux_set_resume_request): Copy the step range from the resume
10114 request to the lwp.
10115 (linux_supports_range_stepping): New.
10116 (linux_target_ops) <supports_range_stepping>: Set to
10117 linux_supports_range_stepping.
10118 * linux-low.h (struct linux_target_ops)
10119 <supports_range_stepping>: New field.
10120 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10121 * linux-x86-low.c (x86_supports_range_stepping): New.
10122 (the_low_target) <supports_range_stepping>: Set to
10123 x86_supports_range_stepping.
10124 * server.c (handle_v_cont): Handle 'r' action.
10125 (handle_v_requests): Append ";r" if the target supports range
10127 * target.h (struct thread_resume) <step_range_start,
10128 step_range_end>: New fields.
10129 (struct target_ops) <supports_range_stepping>:
10131 (target_supports_range_stepping): New macro.
10133 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10135 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10136 confusion in comment.
10138 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10140 * lynx-low.c (struct process_info_private): New type.
10141 (lynx_add_process): New function.
10142 (lynx_create_inferior, lynx_attach): Replace calls to
10143 add_process by calls to lynx_add_process.
10144 (lynx_resume): If PTID is null, then try using
10145 current_process()->private->last_wait_event_ptid.
10147 (lynx_clear_inferiors): Delete. The contents of that function
10148 has been inlined in lynx_mourn;
10149 (lynx_wait_1): Save the ptid in the process's private data.
10150 (lynx_mourn): Free the process' private data. Replace call
10151 to lynx_clear_inferiors by call to clear_inferiors.
10153 2013-05-17 Yao Qi <yao@codesourcery.com>
10155 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10158 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10160 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10161 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10162 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10163 PT_TEXT_END_ADDR guards. Update comments.
10164 (linux_target_op) <read_offsets>: Conditionally define to
10165 linux_read_offsets if the target is UCLIBC and if it defines
10166 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10168 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10169 Andrew Jenner <andrew@codesourcery.com>
10171 * Makefile.in (SFILES): Add linux-nios2-low.c.
10172 (clean): Add action to delete nios2-linux.c.
10173 (nios2-linux.c): New rule.
10174 * configure.srv: Add nios2*-*-linux*.
10175 * linux-nios2-low.c: New.
10177 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10179 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10181 2013-04-25 Hui Zhu <hui@codesourcery.com>
10184 * ax.c (ax_printf): Add fflush.
10186 2013-04-22 Tom Tromey <tromey@redhat.com>
10188 * Makefile.in (SFILES): Add filestuff.c.
10189 (OBS): Add filestuff.o.
10190 (filestuff.o): New target.
10191 * config.in, configure: Rebuild.
10192 * configure.ac: Check for fdwalk, pipe2.
10194 2013-04-17 Pedro Alves <palves@redhat.com>
10196 * configure.ac (USE_THREAD_DB): Delete variable.
10197 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10198 Don't AC_SUBST USE_THREAD_DB.
10199 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10200 * config.in, configure: Regenerate.
10202 2013-04-16 Pedro Alves <palves@redhat.com>
10204 * linux-low.h (struct lwp_info) <thread_known>: Move under
10205 the USE_THREAD_DB #ifdef.
10207 2013-04-16 Pedro Alves <palves@redhat.com>
10209 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10210 (linux-low.o): Delete rule.
10211 * linux-low.h: Always include "gdb_thread_db.h" instead of
10212 conditionally including thread_db.h.
10213 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10216 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10218 * Makefile.in (install-only): Fix make install regression.
10220 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10222 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10223 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10225 * gdbserver.1: Remove.
10227 2013-03-22 Pedro Alves <palves@redhat.com>
10229 * linux-low.c (handle_extended_wait): Don't call
10230 linux_enable_event_reporting.
10232 2013-03-15 Tony Theodore <tonyt@logyst.com>
10235 * Makefile.in (SHELL): Use @SHELL@.
10237 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10239 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10242 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10244 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10245 Remove extraneous NULL element.
10247 2013-03-13 Yao Qi <yao@codesourcery.com>
10249 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10250 'V' block in trace frame.
10252 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10254 * target.h (struct target_ops): Add btrace ops.
10255 (target_supports_btrace): New macro.
10256 (target_enable_btrace): New macro.
10257 (target_disable_btrace): New macro.
10258 (target_read_btrace): New macro.
10259 * gdbthread.h (struct thread_info): Add btrace field.
10260 * server.c: Include btrace-common.h.
10261 (handle_btrace_general_set): New function.
10262 (handle_btrace_enable): New function.
10263 (handle_btrace_disable): New function.
10264 (handle_general_set): Call handle_btrace_general_set.
10265 (handle_qxfer_btrace): New function.
10266 (struct qxfer qxfer_packets[]): Add btrace entry.
10267 * inferiors.c (remove_thread): Disable btrace.
10268 * linux-low: Include linux-btrace.h.
10269 (linux_low_enable_btrace): New function.
10270 (linux_low_read_btrace): New function.
10271 (linux_target_ops): Add btrace ops.
10272 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10273 Add srv_linux_btrace=yes.
10274 (x86_64-*-linux*): Add linux-btrace.o.
10275 Add srv_linux_btrace=yes.
10276 * configure.ac: Define HAVE_LINUX_BTRACE.
10277 * config.in: Regenerated.
10278 * configure: Regenerated.
10280 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10282 * server.c (handle_qxfer): Preserve error message if -3 is
10284 (qxfer): Document the -3 return value.
10286 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10288 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10289 (linux_btrace_h): New variable.
10290 (linux-btrace.o): New rule.
10292 2013-03-08 Stan Shebs <stan@codesourcery.com>
10293 Hafiz Abid Qadeer <abidh@codesourcery.com>
10295 * tracepoint.c (trace_buffer_size): New global.
10296 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10297 (init_trace_buffer): Change to one-argument function. Allocate
10298 trace buffer memory.
10299 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10300 handle QTBuffer:size packet.
10301 (cmd_bigqtbuffer_size): New function.
10302 (initialize_tracepoint): Call init_trace_buffer with
10303 DEFAULT_TRACE_BUFFER_SIZE.
10304 * server.c (handle_query): Add QTBuffer:size in the
10307 2013-03-07 Yao Qi <yao@codesourcery.com>
10309 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10310 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10312 (cmd_qtsp): Adjust condition. Do post increment.
10313 Set cur_action and cur_step_action back to 0.
10315 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10318 * linux-low.c (linux_write_memory): Return early success if LEN is
10321 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10323 * configure.srv: Add x86_64-*-cygwin* as target.
10325 2013-02-28 Tom Tromey <tromey@redhat.com>
10327 * configure.ac: Invoke AC_SYS_LARGEFILE.
10328 * configure, config.in: Rebuild.
10330 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10332 * win32-low.c: Throughout, fix format strings and casts of
10333 printf-like functions to avoid type related warnings on all
10335 (get_child_debug_event): Print dwDebugEventCode as hex since
10336 that's how it's usually documented.
10338 2013-02-28 Yao Qi <yao@codesourcery.com>
10340 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10343 2013-02-27 Jiong Wang <jiwang@tilera.com>
10345 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10346 (reg-tilegx32.c): New rule.
10347 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10348 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10349 different register info initializer according to elf class.
10350 (init_registers_tilgx32): New function. The tilegx32 register info
10352 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10353 (tile_store_gregset): Likewise.
10355 2013-02-27 Yao Qi <yao@codesourcery.com>
10357 * server.c (process_point_options): Print debug message when
10358 debug_threads is true.
10360 2013-02-26 Yao Qi <yao@codesourcery.com>
10362 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10364 2013-02-19 Pedro Alves <palves@redhat.com>
10365 Kai Tietz <ktietz@redhat.com>
10369 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10370 instead of strtoul to extract address from packet.
10371 (process_serial_event) <'z'>: Likewise.
10373 2013-02-18 Yao Qi <yao@codesourcery.com>
10375 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10377 2013-02-14 Pedro Alves <palves@redhat.com>
10381 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10382 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10384 2013-02-14 Pedro Alves <palves@redhat.com>
10386 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10388 2013-02-14 Pedro Alves <palves@redhat.com>
10390 * tracepoint.c (save_string): Delete.
10391 (add_tracepoint_action): Use savestring instead of save_string.
10393 2013-02-12 Pedro Alves <palves@redhat.com>
10395 * linux-xtensa-low.c: Ditto.
10396 * xtensa-xtregs.c: Ditto.
10398 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10400 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10403 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10405 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10406 aarch64_num_wp_regs and aarch64_num_bp_regs to
10407 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10409 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10411 * linux-aarch64-low.c (ps_get_thread_area): Replace
10412 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10414 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10415 Marcus Shawcroft <marcus.shawcroft@arm.com>
10416 Nigel Stephens <nigel.stephens@arm.com>
10417 Yufeng Zhang <yufeng.zhang@arm.com>
10419 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10420 (aarch64.c, aarch64-without-fpu.c): New targets.
10421 * configure.srv (aarch64*-*-linux*): New.
10422 * linux-aarch64-low.c: New file.
10424 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10426 * linux-low.c (handle_extended_wait, linux_create_inferior)
10427 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10428 (dequeue_one_deferred_signal, linux_resume_one_thread)
10429 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10430 (linux_tracefork_grandchild, linux_test_for_tracefork)
10431 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10432 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10433 where the argument is 0.
10435 2013-01-25 Yao Qi <yao@codesourcery.com>
10437 * event-loop.c: Include "queue.h".
10438 (gdb_event_p): New typedef.
10439 (struct gdb_event) <next_event>: Remove.
10440 (event_queue): Change to QUEUE(gdb_event_p).
10441 (async_queue_event): Remove.
10442 (gdb_event_xfree): New.
10443 (initialize_event_loop): New.
10444 (process_event): Use API from QUEUE.
10445 (wait_for_event): Likewise.
10446 * server.c (main): Call initialize_event_loop.
10447 * server.h (initialize_event_loop): Declare.
10449 2013-01-18 Yao Qi <yao@codesourcery.com>
10451 * ax.h (struct eval_agent_expr_context): New.
10452 (gdb_eval_agent_expr): Update declaration.
10453 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10454 TFRAME. Add new argument CTX.
10455 * server.h (struct eval_agent_expr_context): Declare.
10456 (agent_mem_read, agent_tsv_read): Update declaration.
10457 (agent_mem_read_string): Likewise.
10458 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10459 (add_traceframe_block): Add new argument TPOINT.
10460 Increase TPOINT->traceframe_usage.
10461 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10462 eval_tracepoint_agent_expr.
10463 (condition_true_at_tracepoint): Likewise.
10464 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10465 (agent_mem_read_string, agent_tsv_read): Likewise.
10467 2013-01-16 Yao Qi <yao@codesourcery.com>
10469 * linux-low.c (linux_resume_one_lwp): Don't check
10470 'lwp->bp_reinsert != 0'.
10472 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10473 Pedro Alves <palves@redhat.com>
10475 * lynx-low.c (ptrace_request_to_str): Define a temporary
10476 macro and use it to simplify this function's implementation.
10478 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10480 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10483 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10485 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10487 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10489 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10491 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10493 * lynx-low.c (lynx_resume): Use the resume_info parameter
10494 to determine the ptid for the lynx_ptrace call, unless
10495 it is equal to minus_one_ptid, in which case we use the
10496 ptid of the current_inferior.
10497 (lynx_wait_1): After having received a thread create/exit
10498 event, resume the inferior's execution using the signaling
10499 thread's ptid, rather than the old ptid.
10501 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10503 * lynx-low.c (lynx_resume): Delete variable ret.
10505 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10507 * gdbreplay.c (gdbreplay_version): Update copyright year.
10508 * server.c (gdbserver_version): Likewise.
10510 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10512 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10515 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10517 * lynx-low.c (ptrace_request_to_str): Add handling for
10518 PTRACE_GETTRACESIG.
10520 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10522 * lynx-low.c (lynx_attach): Delete variable new_process.
10524 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10526 * lynx-low.c (lynx_create_inferior): Delete variable
10529 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10531 * lynx-low.c (ptrace_request_to_str): Do not handle
10532 PTRACE_GETTHREADLIST if this macro does not exist.
10534 2012-12-15 Yao Qi <yao@codesourcery.com>
10536 * Makefile.in (OBS): Add notif.o.
10537 * notif.c, notif.h: New.
10538 * server.c: Include "notif.h".
10539 (struct vstop_notif) <next>: Remove.
10541 (queue_stop_reply): Update.
10542 (push_event, send_next_stop_reply): Remove.
10543 (discard_queued_stop_replies): Update.
10544 (notif_stop): New variable.
10545 (handle_v_stopped): Remove.
10546 (handle_v_requests): Don't call handle_v_stopped. Call
10547 handle_ack_notif instead.
10548 (queue_stop_reply_callback): Call notif_event_enque instead
10549 of queue_stop_reply.
10550 (handle_status): Don't call send_next_stop_reply, call
10551 notif_write_event instead.
10552 (kill_inferior_callback): Likewise.
10553 (detach_or_kill_inferior_callback): Likewise.
10554 (main): Call initialize_notif.
10555 (process_serial_event): Call QUEUE_is_empty.
10556 (handle_target_event): Call notif_push instead of push event.
10557 * server.h (push_event): Remove declaration.
10559 2012-12-10 Tom Tromey <tromey@redhat.com>
10561 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10562 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10565 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10566 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10567 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10568 (amd64-linux-ipa.o, ax.o): Rewrite.
10569 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10570 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10571 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10572 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10573 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10574 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10575 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10576 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10577 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10578 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10579 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10580 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10581 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10582 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10583 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10584 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10585 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10586 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10587 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10588 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10589 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10590 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10591 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10592 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10593 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10594 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10595 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10596 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10597 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10598 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10599 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10600 (reg-tilegx.o): Remove.
10601 (all_object_files): New macro.
10602 Include .deps files.
10603 * aclocal.m4, configure: Rebuild.
10604 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10605 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10606 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10608 2012-12-05 Tom Tromey <tromey@redhat.com>
10611 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10613 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10615 * configure.ac: Check for linux/perf_event.h.
10616 * config.in: Regenerated.
10617 * configure: Regenerated.
10619 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10621 * hostio.c (handle_readlink): Decrease buffer size
10622 parameter passed to readlink by one byte.
10624 2012-11-26 Yao Qi <yao@codesourcery.com>
10626 * configure.ac (build_warnings): Append '-Wempty-body'.
10627 * configure: Regenerated.
10628 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10631 2012-11-15 Pierre Muller <muller@sourceware.org>
10633 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10634 * config.in: Regenerate.
10635 * configure: Regenerate.
10636 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10637 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10638 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10639 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10641 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10642 instead of <sys/wait.h> header.
10643 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10645 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10647 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10648 (various make rules): Remove -DGDBSERVER
10650 2012-11-09 Yao Qi <yao@codesourcery.com>
10652 * spu-low.c (current_ptid): Move it to ..
10653 * gdbthread.h: ... here. New.
10654 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10655 * server.c (myresume, process_serial_event): Likewise.
10656 * thread-db.c (thread_db_find_new_threads): Likewise.
10657 * tracepoint.c (run_inferior_command): Likewise.
10659 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10661 * server.c (handle_search_memory_1): Include access length in
10664 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10666 * linux-crisv32-low.c: Fix compile errors.
10668 2012-09-04 Yao Qi <yao@codesourcery.com>
10670 * tracepoint.c (cmd_qtsv): Adjust debug message.
10671 Don't check CUR_TPOINT.
10673 2012-08-28 Yao Qi <yao@codesourcery.com>
10675 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10676 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10677 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10678 Remove declarations of xmalloc, xreallloc, xstrdup and
10680 * Makefile.in (libiberty_h): New.
10681 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10682 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10684 2012-08-23 Yao Qi <yao@codesourcery.com>
10686 * server.h: Remove declaration of 'xsnprintf'.
10688 2012-08-22 Keith Seitz <keiths@redhat.com>
10690 * server.h: Include build-gnulib-gbserver/config.h.
10691 * gdbreplay.c: Likewise.
10693 2012-08-08 Doug Evans <dje@google.com>
10695 * Makefile.in (SFILES): Add gdb_vecs.c.
10696 (OBS): Add gdb_vecs.o.
10697 (gdb_vecs_h, host_defs_h): New variables.
10698 (thread-db.o): Add $(gdb_vecs_h) dependency.
10699 (gdb_vecs.o): New rule.
10700 * thread-db.c: #include "gdb_vecs.h".
10701 (thread_db_load_search): Use a vector to iterate over path elements.
10702 Handle text appearing after "$pdir".
10704 * configure.ac: Add check for strstr.
10705 * config.in: Regenerate.
10706 * configure: Regenerate.
10708 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10710 * hostio.c (handle_pread): If pread fails, fall back to attempting
10712 (handle_pwrite): Likewise for pwrite.
10714 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10716 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10717 between unsupported TYPE and unimplementable ADDR/LEN combination.
10718 (arm_insert_point): Act on new return value.
10720 2012-07-31 Pedro Alves <palves@redhat.com>
10722 * server.c (process_point_options): Only skip tokens if we find
10723 one that is unrecognized. Don't treat 'X' specially while
10724 skipping unrecognized tokens.
10726 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10728 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10729 to 4-byte-align HW breakpoint addresses for Thumb.
10731 2012-07-27 Yao Qi <yao@codesourcery.com>
10735 * server.h: Declare gdb_agent_about_to_close.
10736 * target.c (kill_inferior): Include "agent.h".
10737 New. Send command 'kill'.
10738 * target.h (kill_inferior): Removed macro.
10739 * tracepoint.c (gdb_agent_about_to_close): New.
10740 (gdb_agent_helper_thread): Handle command 'close'.
10741 Wait endlessly until the inferior stops.
10742 Install gdb_agent_remove_socket to atexit hook.
10743 (agent_socket_name): New static variable.
10744 (gdb_agent_socket_init): Replace local variable 'name' with
10745 'agent_socket_name'.
10746 (gdb_agent_remove_socket): New.
10748 2012-07-27 Yao Qi <yao@codesourcery.com>
10750 * server.c (process_point_options): Stop at 'X' when parsing.
10752 2012-07-19 Michael Eager <eager@eagercon.com>
10754 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10756 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10757 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10758 hardware breakpoint.
10760 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10762 * gdbserver/linux-low.c (initialize_low): Call
10763 linux_ptrace_init_warnings.
10765 2012-07-02 Doug Evans <dje@google.com>
10767 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10770 2012-07-02 Stan Shebs <stan@codesourcery.com>
10772 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10773 (ax.o): Add it to build rule.
10775 (OBS): Add format.o.
10776 (IPA_OBS): Add format.o.
10777 * server.c (handle_query): Claim support for breakpoint commands.
10778 (process_point_options): Add command case.
10779 (process_serial_event): Leave running if there are printfs in
10781 * mem-break.h (any_persistent_commands): Declare.
10782 (add_breakpoint_commands): Declare.
10783 (gdb_no_commands_at_breakpoint): Declare.
10784 (run_breakpoint_commands): Declare.
10785 * mem-break.c (struct point_command_list): New struct.
10786 (struct breakpoint): New field command_list.
10787 (any_persistent_commands): New function.
10788 (add_commands_to_breakpoint): New function.
10789 (add_breakpoint_commands): New function.
10790 (gdb_no_commands_at_breakpoint): New function.
10791 (run_breakpoint_commands): New function.
10792 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10794 * ax.c: Include format.h.
10795 (ax_printf): New function.
10796 (gdb_eval_agent_expr): Add printf opcode.
10798 2012-06-13 Yao Qi <yao@codesourcery.com>
10800 * server.c (start_inferior): Remove duplicated writes to fields
10801 'last_resume_kind' and 'last_status' of 'current_inferior'.
10803 2012-06-12 Yao Qi <yao@codesourcery.com>
10804 Pedro Alves <palves@redhat.com>
10806 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10808 * server.c (handle_v_cont): Extend comment.
10810 2012-06-11 Yao Qi <yao@codesourcery.com>
10812 * linux-low.c (linux_attach): Add 'static'.
10814 2012-06-06 Yao Qi <yao@codesourcery.com>
10816 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10818 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10820 Fix gcc -flto compilation warning.
10821 * server.c (main): Make variable multi_mode and attach volatile.
10823 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10825 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10826 if the platform doesn't know about it.
10828 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10830 * Makefile.in (SFILES): Add linux-tile-low.c.
10831 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10832 * configure.srv: Handle tilegx-*-linux*.
10833 * linux-tile-low.c: New file.
10835 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10837 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10839 2012-05-24 Pedro Alves <palves@redhat.com>
10843 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10845 2012-05-24 Pedro Alves <palves@redhat.com>
10849 Replace target_signal with gdb_signal throughout.
10851 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10853 * linux-low.c (linux_store_registers): Avoid the copying sequence
10854 when no data has been retrieved by ptrace.
10856 2012-05-22 Will Deacon <will.deacon@arm.com>
10858 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10859 Include asm/ptrace.h.
10860 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10863 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10865 * linux-low.c (linux_store_registers): Don't re-retrieve data
10866 with ptrace that has already been obtained from /proc. Always
10867 copy any data retrieved with ptrace to the buffer supplied.
10869 2012-05-11 Yao Qi <yao@codesourcery.com>
10870 Pedro Alves <palves@redhat.com>
10872 * linux-low.c (enum stopping_threads_kind): New.
10873 (stopping_threads): Change type to `enum stopping_threads_kind'.
10874 (handle_extended_wait): If stopping and suspending threads, leave
10875 the new_lwp suspended too.
10876 (linux_wait_for_event): Adjust.
10877 (stop_all_lwps): Set `stopping_threads' to
10878 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10879 whether we're suspending threads or just stopping them. Assert no
10882 2012-04-29 Yao Qi <yao@codesourcery.com>
10884 * server.h: Move some code to ...
10885 * gdbthread.h: ... here. New.
10886 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10887 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10888 (nto-low.o, win32-low.o): Likewise.
10889 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10890 * regcache.c, remote-utils.c, server.c: Likewise.
10891 * target.c, tracepoint.c, win32-low.c: Likewise.
10893 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10895 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10896 (PTRACE_ARG4_TYPE): Likewise.
10897 (PTRACE_XFER_TYPE): Likewise.
10898 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10899 ptrace to PTRACE_ARG3_TYPE.
10900 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10901 (PTRACE_ARG4_TYPE): Likewise.
10902 (PTRACE_XFER_TYPE): Likewise.
10903 (linux_detach_one_lwp): Cast fourth argument of
10904 ptrace to long then PTRACE_ARG4_TYPE.
10905 (regsets_fetch_inferior_registers): Cast third argument of
10906 ptrace to long then PTRACE_ARG3_TYPE.
10907 (regsets_store_inferior_registers): Likewise.
10909 2012-04-20 Pedro Alves <palves@redhat.com>
10911 * configure: Regenerate.
10913 2012-04-19 Pedro Alves <palves@redhat.com>
10915 * Makefile.in (GNULIB_BUILDDIR): New.
10916 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10917 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10918 (all, install-only, uninstall, clean-info, all-lib, clean): No
10919 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10920 (maintainer-clean realclean distclean): Use subdir_do.
10922 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10923 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10924 * acinclude.m4: Include acx_configure_dir.m4.
10925 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10926 calls. Call AC_PROG_RANLIB. Configure gnulib using
10929 (GNULIB_STDINT_H): Adjust.
10930 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10931 * gdbreplay.c: Include build-gnulib/config.h.
10932 * server.h: Likewise.
10933 * aclocal.m4: Regenerate.
10934 * config.in: Regenerate.
10935 * configure: Regenerate.
10937 2012-04-19 Pedro Alves <palves@redhat.com>
10939 * Makefile.in (LIBGNU, INCGNU): Adjust.
10940 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10941 (all, install-only, uninstall, clean-info, all-lib, clean)
10942 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10943 * configure.ac: Adjust AC_OUTPUT output.
10944 * aclocal.m4: Regenerate.
10945 * configure: Regenerate.
10947 2012-04-19 Pedro Alves <palves@redhat.com>
10949 * Makefile.in (generated_files): New.
10950 (server_h): Remove the explicit dependency on config.h, and depend
10951 on $generated_files.
10953 2012-04-19 Pedro Alves <palves@redhat.com>
10955 * Makefile.in (INCGNU): Add -Ignulib.
10957 2012-04-19 Pedro Alves <palves@redhat.com>
10959 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10960 (INCGNU): ... this, and spell out -I here.
10961 (GNULIB_LIB): Rename to ...
10962 (LIBGNU): ... this.
10963 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10965 2012-04-19 Pedro Alves <palves@redhat.com>
10967 * config.in: Regenerate.
10969 2012-04-19 Pedro Alves <palves@redhat.com>
10971 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10972 * server.h (memmem): Remove declaration.
10973 * config.in: Regenerate.
10974 * configure: Regenerate.
10976 2012-04-19 Yao Qi <yao@codesourcery.com>
10978 * Makefile.in (SFILES): Add common/vec.c.
10982 2012-04-19 Yao Qi <yao@codesourcery.com>
10984 * remote-utils.c (prepare_resume_reply): Replace with macro
10985 target_core_of_thread.
10986 * server.c (handle_qxfer_threads_proper): Likewise.
10987 * target.h (traget_core_of_thread): New macro.
10989 2012-04-18 Pedro Alves <palves@redhat.com>
10991 * aclocal.m4: Regenerate.
10992 * configure: Regenerate.
10994 2012-04-16 Yao Qi <yao@codesourcery.com>
10996 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10997 duplicated on address.
10999 2012-04-16 Yao Qi <yao@codesourcery.com>
11001 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
11002 (struct tracepoint_action_ops) <send>: New field.
11003 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11004 (agent_expr_send, x_tracepoint_action_send): New.
11005 (l_tracepoint_action_send): New.
11006 (cmd_qtdp): Download and install tracepoint
11007 according to `use_agent'.
11008 (run_inferior_command): Add one more parameter `len'.
11010 (tracepoint_send_agent): New.
11011 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11013 2012-04-16 Yao Qi <yao@codesourcery.com>
11015 * tracepoint.c (download_tracepoints): Moved to ...
11016 (cmd_qtstart): ... here.
11018 2012-04-14 Yao Qi <yao@codesourcery.com>
11020 * tracepoint.c: Include inttypes.h.
11021 (struct collect_memory_action): Use sized types.
11022 (struct tracepoint): Likewise.
11023 (cmd_qtdp, stop_tracing): Update print specifiers.
11024 (cmd_qtp, response_tracepoint): Likewise.
11025 (collect_data_at_tracepoint): Likewise.
11026 (collect_data_at_step): Likewise.
11028 2012-04-14 Yao Qi <yao@codesourcery.com>
11030 Import gnulib module inttypes.
11031 * aclocal.m4, config.in, configure: Regenerated.
11033 2012-04-14 Yao Qi <yao@codesourcery.com>
11035 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11036 Makefile and config.status at last.
11038 2012-04-13 Yao Qi <yao@codesourcery.com>
11040 * tracepoint.c: Include stdint.h unconditionally.
11042 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11044 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11045 on BFD_HAVE_SYS_PROCFS_TYPE.
11046 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11047 * configure: Regenerate.
11048 * config.in: Likewise.
11050 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11052 * Makefile.in (clean): Also remove x32.c x32-linux.c
11053 x32-avx.c x32-avx-linux.c.
11054 (x32.o): New target.
11056 (x32-linux.o): Likewise.
11057 (x32-linux.c): Likewise.
11058 (x32-avx.o): Likewise.
11059 (x32-avx.c): Likewise.
11060 (x32-avx-linux.o): Likewise.
11061 (x32-avx-linux.c): Likewise.
11063 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11064 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11065 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11066 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11067 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11068 i386/x32-avx-linux.xml.
11070 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11071 (init_registers_x32_avx_linux): Likwise.
11072 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11073 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11075 2012-04-13 Pedro Alves <palves@redhat.com>
11077 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11078 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11079 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11080 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11083 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11085 * linux-x86-low.c (compat_x32_clock_t): New.
11086 (compat_x32_siginfo_t): Likewise.
11087 (compat_x32_siginfo_from_siginfo): Likewise.
11088 (siginfo_from_compat_x32_siginfo): Likewise.
11089 (linux_is_elf64): Likewise.
11090 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11091 and siginfo_from_compat_x32_siginfo for x32.
11092 (x86_arch_setup): Set linux_is_elf64.
11094 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11097 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11099 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11100 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11101 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11102 compatible with process.
11104 2012-04-12 Yao Qi <yao@codesourcery.com>
11106 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11107 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11108 (install-only, install-info, clean): Handle sub dir gnulib.
11109 (all-lib, am--refresh): New targets.
11110 (memmem.o): Remove target.
11111 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11112 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11113 (AC_REPLACE_FUNCS): Remove memmem.
11114 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11115 (AC_OUTPUT): Generate Makefile in gnulib/.
11116 * aclocal.m4, config.in, configure: Regenerated.
11118 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11120 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11122 2012-04-05 Pedro Alves <palves@redhat.com>
11124 -Werror=strict-aliasing
11126 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11129 2012-04-04 Pedro Alves <palves@redhat.com>
11131 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11132 (sparc_store_gregset_from_stack, sparc_store_gregset)
11133 (sparc_breakpoint_at): Fix formatting.
11135 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11137 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11139 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11140 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11141 * config.in: Regenerate.
11142 * configure: Likewise.
11144 2012-03-29 Pedro Alves <palves@redhat.com>
11146 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11147 Correct ptrace arguments.
11149 2012-03-28 Pedro Alves <palves@redhat.com>
11151 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11152 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11153 (IA64_FR1_REGNUM): New defines.
11154 (ia64_fetch_register): New.
11155 (the_low_target): Install it.
11156 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11158 * linux-low.c (linux_fetch_registers): Try the
11159 the_low_target.fetch_register hook first.
11161 * linux-arm-low.c (the_low_target): Adjust.
11162 * linux-bfin-low.c (the_low_target): Adjust.
11163 * linux-cris-low.c (the_low_target): Adjust.
11164 * linux-crisv32-low.c (the_low_target): Adjust.
11165 * linux-m32r-low.c (the_low_target): Adjust.
11166 * linux-m68k-low.c (the_low_target): Adjust.
11167 * linux-mips-low.c (the_low_target): Adjust.
11168 * linux-ppc-low.c (the_low_target): Adjust.
11169 * linux-s390-low.c (the_low_target): Adjust.
11170 * linux-sh-low.c (the_low_target): Adjust.
11171 * linux-sparc-low.c (the_low_target): Adjust.
11172 * linux-tic6x-low.c (the_low_target): Adjust.
11173 * linux-x86-low.c (the_low_target): Adjust.
11174 * linux-xtensa-low.c (the_low_target): Adjust.
11176 2012-03-26 Pedro Alves <palves@redhat.com>
11178 * server.c (handle_qxfer_libraries): Don't bail early if
11179 the_target->qxfer_libraries_svr4 is not NULL.
11181 2012-03-26 Pedro Alves <palves@redhat.com>
11183 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11185 2012-03-23 Pedro Alves <palves@redhat.com>
11187 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11188 "library-list-svr4" element's start tag when the the DSO list is
11191 2012-03-23 Pedro Alves <palves@redhat.com>
11193 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11194 a variable whose type size is the same as the inferior's pointer
11197 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11199 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11201 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11202 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11203 * linux-low.h: Include <signal.h>.
11204 (struct siginfo): Remove forward declaration.
11205 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11208 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11210 * .gitignore: Ignore more files.
11212 2012-03-19 Pedro Alves <palves@redhat.com>
11213 Jan Kratochvil <jan.kratochvil@redhat.com>
11215 * server.c (cont_thread, general_thread): Add describing comments.
11216 (start_inferior): Clear `cont_thread'.
11217 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11220 2012-03-15 Yao Qi <yao@codesourcery.com>
11222 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11224 (cmd_qtdp): ... here.
11226 2012-03-15 Yao Qi <yao@codesourcery.com>
11228 * tracepoint.c (struct tracepoint_action_ops): New.
11229 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11230 (m_tracepoint_action_download): New.
11231 (r_tracepoint_action_download): New.
11232 (x_tracepoint_action_download): New.
11233 (l_tracepoint_action_download): New.
11234 (add_tracepoint_action): Install `action->ops' according type.
11235 (download_tracepoint_1): Move code `download' function pointer
11236 of various tracepoint_action_ops.
11238 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11240 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11241 linux_ptrace_attach_warnings.
11243 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11245 * Makefile.in (linux-ptrace.o): New.
11246 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11247 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11248 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11249 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11250 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11252 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11254 2012-03-08 Yao Qi <yao@codesourcery.com>
11255 Pedro Alves <palves@redhat.com>
11257 Fix PR server/13392.
11258 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11259 offset of JMP insn.
11260 * tracepoint.c (remove_tracepoint): New.
11261 (cmd_qtdp): Call remove_tracepoint when failed to install.
11263 2012-03-07 Pedro Alves <palves@redhat.com>
11265 * linux-low.c (get_detach_signal): New.
11266 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11267 Pass on pending signals to PTRACE_DETACH. Check the result of the
11269 * server.c (program_signals, program_signals_p): New.
11270 (handle_general_set): Handle QProgramSignals.
11271 * server.h (program_signals, program_signals_p): Declare.
11273 2012-03-05 Pedro Alves <palves@redhat.com>
11274 Jan Kratochvil <jan.kratochvil@redhat.com>
11276 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11279 2012-03-03 Yao Qi <yao@codesourcery.com>
11281 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11282 agent_look_up_symbols.
11284 2012-03-03 Yao Qi <yao@codesourcery.com>
11286 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11287 (linux-x86-low.o): Likewise.
11288 * server.h: Remove in_process_agent_loaded.
11289 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11293 2012-03-03 Yao Qi <yao@codesourcery.com>
11295 * tracepoint.c (gdb_agent_capability): New global.
11296 (in_process_agent_loaded_ust): Renamed to
11297 `in_process_agent_supports_ust'.
11299 (in_process_agent_supports_ust): Call agent_capability_check.
11300 (clear_installed_tracepoints): Assert that agent supports
11303 2012-03-03 Yao Qi <yao@codesourcery.com>
11305 * linux-low.c (linux_supports_agent): New.
11306 (linux_target_ops): Initialize field `supports_agent' with
11307 linux_supports_agent.
11308 * target.h (struct target_ops) <supports_agent>: New.
11309 (target_supports_agent): New macro.
11310 * server.c (handle_general_set): Handle packet 'QAgent'.
11311 (handle_query): Send `QAgent+'.
11312 * Makefile.in (server.o): Depends on agent.h.
11314 2012-03-03 Yao Qi <yao@codesourcery.com>
11316 * Makefile.in (OBS): Add agent.o.
11317 Add new rule for agent.o.
11318 Track dependence of tracepoint.c on agent.h.
11319 * tracepoint.c (run_inferior_command_1):
11320 (run_inferior_command): Call agent_run_command.
11321 (gdb_ust_connect_sync_socket): Deleted. Move it to
11323 (resume_thread, stop_thread): Likewise.
11324 (gdb_ust_socket_init): Renamed to ...
11325 (gdb_agent_socket_init): ... New.
11326 (gdb_ust_thread): Renamed to ...
11327 (gdb_agent_helper_thread): ... New.
11328 (gdb_ust_init): Move some code to ...
11329 (gdb_agent_init): ... here. New.
11330 [HAVE_UST]: Call gdb_ust_init.
11331 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11332 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11333 * config.in, configure: Regenerated.
11335 2012-03-02 Pedro Alves <palves@redhat.com>
11337 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11338 * linux-low.c (struct simple_pid_list): New.
11339 (stopped_pids): New a struct simple_pid_list pointer.
11340 (add_to_pid_list, pull_pid_from_list): New.
11341 (handle_extended_wait): Don't assume the first signal new children
11342 report is SIGSTOP. Adjust call to pull_pid_from_list.
11343 (linux_wait_for_lwp): Adjust.
11345 2012-03-02 Yao Qi <yao@codesourcery.com>
11347 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11350 2012-03-02 Yao Qi <yao@codesourcery.com>
11352 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11353 `stop_pc' and `tpoint'. Update caller.
11355 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11357 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11358 * linux-low.c (use_linux_regsets): New macro.
11359 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11360 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11361 (linux_register_in_regsets): New function.
11362 (usr_fetch_inferior_registers): Skip registers covered by
11364 (usr_store_inferior_registers): Likewise.
11365 (usr_fetch_inferior_registers): New macro.
11366 (usr_store_inferior_registers): Likewise.
11367 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11368 (linux_store_registers): Likewise.
11369 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11371 (init_registers_mips64_dsp_linux): Likewise.
11372 (init_registers_mips_linux): New macro.
11373 (init_registers_mips_dsp_linux): Likewise.
11374 (mips_dsp_num_regs): Likewise.
11375 (DSP_BASE, DSP_CONTROL): New fallback macros.
11376 (mips_base_regs): New macro.
11377 (mips_regmap): Use it. Fix the size.
11378 (mips_dsp_regmap): New variable.
11379 (mips_dsp_regset_bitmap): Likewise.
11380 (mips_arch_setup): New function.
11381 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11383 (mips_cannot_store_register): Likewise.
11384 (the_low_target): Update .arch_setup, .num_regs and .regmap
11385 initializers. Add .regset_bitmap initializer.
11386 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11388 * linux-bfin-low.c (the_low_target): Likewise.
11389 * linux-cris-low.c (the_low_target): Likewise.
11390 * linux-crisv32-low.c (the_low_target): Likewise.
11391 * linux-ia64-low.c (the_low_target): Likewise.
11392 * linux-m32r-low.c (the_low_target): Likewise.
11393 * linux-m68k-low.c (the_low_target): Likewise.
11394 * linux-ppc-low.c (the_low_target): Likewise.
11395 * linux-s390-low.c (the_low_target): Likewise.
11396 * linux-sh-low.c (the_low_target): Likewise.
11397 * linux-sparc-low.c (the_low_target): Likewise.
11398 * linux-tic6x-low.c (the_low_target): Likewise.
11399 * linux-x86-low.c (the_low_target): Likewise.
11400 * linux-xtensa-low.c (the_low_target): Likewise.
11401 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11402 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11403 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11405 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11406 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11408 2012-02-29 Yao Qi <yao@codesourcery.com>
11409 Pedro Alves <palves@redhat.com>
11411 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11412 `step_over_finished' is true.
11414 2012-02-27 Pedro Alves <palves@redhat.com>
11416 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11417 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11419 2012-02-27 Pedro Alves <palves@redhat.com>
11422 * linux-low.c (pid_is_stopped): New.
11423 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11425 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11427 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11430 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11432 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11434 2012-02-24 Luis Machado <lgustavo@codesourcery>
11436 * server.c (handle_query): Advertise support for target-side
11437 breakpoint condition evaluation.
11438 (process_point_options): New function.
11439 (process_serial_event): When inserting a breakpoint, check for
11440 a target-side condition that should be evaluated.
11442 * mem-break.c: Include regcache.h and ax.h.
11443 (point_cond_list_t): New data structure.
11444 (breakpoint) <cond_list>: New field.
11445 (find_gdb_breakpoint_at): Make non-static.
11446 (delete_gdb_breakpoint_at): Clear any target-side
11448 (clear_gdb_breakpoint_conditions): New function.
11449 (add_condition_to_breakpoint): Likewise.
11450 (add_breakpoint_condition): Likewise.
11451 (gdb_condition_true_at_breakpoint): Likewise.
11452 (gdb_breakpoint_here): Return result directly instead
11453 of going through a local variable.
11455 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11456 (clear_gdb_breakpoint_conditions): Likewise.
11457 (add_breakpoint_condition): Likewise.
11458 (gdb_condition_true_at_breakpoint): Likewise.
11460 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11461 (need_step_over_p): Take target-side breakpoint condition into
11464 2012-02-24 Luis Machado <lgustavo@codesourcery>
11466 * server.h: Include tracepoint.h.
11467 (agent_mem_read, agent_get_trace_state_variable_value,
11468 agent_set_trace_state_variable_value,
11469 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11470 get_set_tsv_func_addr): New prototypes.
11472 * ax.h: New include file.
11473 * ax.c: New source file.
11475 * tracepoint.c: Include ax.h.
11476 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11477 agent_expr, eval_result_type): Move to ax.h.
11478 (parse_agent_expr): Rename to ...
11479 (gdb_parse_agent_expr): ... this, make it non-static and move
11481 (unparse_agent_expr) Rename to ...
11482 (gdb_unparse_agent_expr): ... this, make it non-static and move
11484 (eval_agent_expr): Rename to ...
11485 (eval_tracepoint_agent_expr): ... this.
11486 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11487 forward declarations.
11488 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11489 (agent_get_trace_state_variable_value): New function.
11490 (agent_set_trace_state_variable_value): New function.
11491 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11492 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11493 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11494 (condition_true_at_tracepoint): Likewise.
11495 (parse_agent_expr): Rename to ...
11496 (gdb_parse_agent_expr): ... this and move to ax.c.
11497 (unparse_agent_expr): Rename to ...
11498 (gdb_unparse_agent_expr): ... this and move to ax.c.
11499 (gdb_agent_op_name): Move to ax.c.
11500 (eval_agent_expr): Rename to ...
11501 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11503 (eval_tracepoint_agent_expr): New function.
11504 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11506 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11508 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11509 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11510 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11511 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11512 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11513 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11514 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11515 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11516 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11517 (compile_bytecodes): Remove forward declaration.
11518 (is_goto_target): Move to ax.c.
11519 (compile_bytecodes): Move to ax.c and call
11520 agent_get_trace_state_variable_value (...) and
11521 agent_set_trace_state_variable_value (...).
11523 * Makefile.in: Update ax.c and IPA dependencies.
11525 2012-02-24 Pedro Alves <palves@redhat.com>
11527 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11528 (cmd_bigqtbuffer_circular): ... this. Only handle
11529 'QTBuffer:circular:'.
11530 (handle_tracepoint_general_set): Adjust.
11532 2012-02-16 Yao Qi <yao@codesourcery.com>
11534 * inferiors.c: Move code to ...
11535 * dll.c: .... here. New.
11536 * server.h: Declare clear_dlls.
11537 * Makefile.in (SFILES): Add dll.c.
11541 2012-02-11 Yao Qi <yao@codesourcery.com>
11543 * server.c: (handle_monitor_command): Add a new parameter
11545 (handle_query): Update caller.
11547 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11549 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11550 * configure, config.in: Regenerate.
11551 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11554 2012-02-02 Pedro Alves <palves@redhat.com>
11556 Try SIGKILL first, then PTRACE_KILL.
11557 * linux-low.c (linux_kill_one_lwp): New.
11558 (linux_kill_one_lwp): Rename to ...
11559 (kill_one_lwp_callback): ... this. Use the new
11560 linux_kill_one_lwp.
11562 2012-02-02 Pedro Alves <palves@redhat.com>
11564 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11567 2012-01-27 Pedro Alves <palves@redhat.com>
11569 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11570 (elf_64_file_p): Make static.
11571 (linux_pid_exe_is_elf_64_file): New.
11572 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11573 Delete declarations.
11574 (linux_pid_exe_is_elf_64_file): Declare.
11575 * linux-x86-low.c (x86_arch_setup): Use
11576 linux_pid_exe_is_elf_64_file.
11578 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11580 * linux-low.c (linux_wait_for_event_1): Rename to ...
11581 (linux_wait_for_event): ... here and merge it with former
11582 linux_wait_for_event - new variable wait_ptid, use it.
11583 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11585 2012-01-23 Pedro Alves <palves@redhat.com>
11587 * server.c (main): Avoid yet another case of infinite loop while
11588 detaching/killing after a longjmp.
11590 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11593 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11595 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11597 * hostio.c (handle_readlink): New function.
11598 (handle_vFile): Call it to handle "vFile:readlink" packets.
11600 2012-01-20 Pedro Alves <palves@redhat.com>
11601 Ulrich Weigand <ulrich.weigand@linaro.org>
11603 * server.c (handle_v_requests): Only support vAttach and vRun to
11604 start multiple processes when in extended protocol mode.
11606 2012-01-17 Pedro Alves <palves@redhat.com>
11608 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11609 memalign plus mprotect to allocate the scratch buffer.
11611 2012-01-13 Pedro Alves <palves@redhat.com>
11613 * server.c (attach_inferior): Clear `cont_thread'.
11615 2012-01-13 Pedro Alves <palves@redhat.com>
11617 * server.c (main): Avoid infinite loop while detaching/killing
11620 2012-01-09 Doug Evans <dje@google.com>
11622 * server.c (start_inferior): Set last_ptid in --wrapper case.
11624 2012-01-06 Yao Qi <yao@codesourcery.com>
11626 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11628 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11630 2012-01-04 Yao Qi <yao@codesourcery.com>
11632 * tracepoint.c (cmd_qtdp): Print debug message
11633 for static tracepoint.
11635 2012-01-04 Yao Qi <yao@codesourcery.com>
11637 * tracepoint.c (trace_vdebug): Differentiate debug message
11638 between gdbserver and IPA.
11640 2012-01-03 Yao Qi <yao@codesourcery.com>
11642 * tracepoint.c (tracepoint_was_hit): Don't collect for
11645 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11647 * terminal.h: Reformat copyright header.
11649 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11651 * server.c (gdbserver_version): Update copyright year.
11652 * gdbreplay.c (gdbreplay_version): Likewise.
11654 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11656 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11659 2011-12-18 Hui Zhu <teawater@gmail.com>
11660 * linux-low.c (linux_create_inferior): Save return value to ret.
11662 2011-12-18 Hui Zhu <teawater@gmail.com>
11664 * linux-low.c (linux_create_inferior): Save return value to ret.
11666 2011-12-16 Doug Evans <dje@google.com>
11668 * linux-low.c (linux_create_inferior): If stdio connection,
11669 redirect stdin from /dev/null, stdout to stderr.
11670 * remote-utils.c (remote_is_stdio): New static global.
11671 (remote_connection_is_stdio): New function.
11672 (remote_prepare): Handle stdio connection.
11673 (remote_open): Ditto.
11674 (remote_close): Don't close stdin for stdio connections.
11675 (read_prim,write_prim): New functions. Replace all calls to
11676 read/write to these.
11677 * server.c (main): Watch for "-" argument. Move call to
11678 remote_prepare before start_inferior.
11679 * server.h (STDIO_CONNECTION_NAME): New macro.
11680 (remote_connection_is_stdio): Declare.
11682 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11683 in debugging output.
11685 2011-12-15 Yao Qi <yao@codesourcery.com>
11687 * tracepoint.c: Include sys/syscall.h.
11688 (gdb_ust_thread): Remove preprocessor conditional.
11690 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11692 * linux-low.c (linux_detach_one_lwp): Call
11693 the_low_target.prepare_to_resume before detaching.
11695 2011-12-14 Yao Qi <yao@codesourcery.com>
11697 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11700 2011-12-14 Yao Qi <yao@codesourcery.com>
11702 * i386-low.c (i386_low_stopped_data_address): Initialize local
11703 variable `control'.
11705 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11709 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11710 DR_CONTROL unless necessary. Extend comments.
11711 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11712 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11714 2011-12-13 Yao Qi <yao@codesourcery.com>
11716 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11718 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11720 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11722 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11723 Print new debug message for such case.
11725 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11727 Fix overlapping memcpy.
11728 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11729 the read_inferior_memory transfer.
11730 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11731 write_inferior_memory transfer.
11732 (set_fast_tracepoint_jump): New variable buf. Use it for the
11733 read_inferior_memory and write_inferior_memory transfers.
11734 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11735 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11736 Use it for the write_inferior_memory transfer.
11737 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11740 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11742 * linux-low.c (fetch_register, store_register): Make code
11743 consistent, fix formatting.
11745 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11747 * linux-low.c (usr_store_inferior_registers): Factor out code
11748 to handle individual registers into...
11749 (store_register): ... this new function.
11751 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11753 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11754 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11755 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11756 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11757 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11758 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11759 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11760 (srv_xmlfiles): Add new XML files.
11762 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11764 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11765 (init_registers_s390_linux32v1): Add prototype.
11766 (init_registers_s390_linux32v2): Likewise.
11767 (init_registers_s390_linux64v1): Likewise.
11768 (init_registers_s390_linux64v2): Likewise.
11769 (init_registers_s390x_linux64v1): Likewise.
11770 (init_registers_s390x_linux64v2): Likewise.
11771 (s390_num_regs): Increment to 52.
11772 (s390_regmap): Add orig_r2 register.
11773 (s390_num_regs_3264): Increment to 68.
11774 (s390_regmap_3264): Add orig_r2 register.
11775 (s390_collect_ptrace_register): Handle orig_r2 register.
11776 (s390_supply_ptrace_register): Likewise.
11777 (s390_fill_last_break): New function.
11778 (s390_store_last_break): Likewise.
11779 (s390_fill_system_call): New function.
11780 (s390_store_system_call): Likewise.
11781 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11783 (s390_check_regset): New function.
11784 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11785 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11786 Update target_regsets for available register sets.
11788 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11789 Jan Kratochvil <jan.kratochvil@redhat.com>
11791 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11792 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11794 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11795 * linux-low.h (struct process_info_private): New member r_debug.
11796 * server.c (handle_qxfer_libraries): Call
11797 the_target->qxfer_libraries_svr4.
11798 (handle_qxfer_libraries_svr4): New function.
11799 (qxfer_packets): New entry "libraries-svr4".
11800 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11801 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11802 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11803 PACKET_qXfer_libraries_svr4.
11805 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11807 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11808 PSW address/mask between 8-byte and 16-byte formats.
11809 (s390_supply_ptrace_register): Likewise.
11810 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11811 basic addressing mode bit.
11813 2011-11-24 Stan Shebs <stan@codesourcery.com>
11815 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11817 2011-11-17 Stan Shebs <stan@codesourcery.com>
11819 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11820 (tracing_start_time): New global.
11821 (tracing_stop_time): New global.
11822 (tracing_user_name): New global.
11823 (tracing_notes): New global.
11824 (tracing_stop_note): New global.
11825 (cmd_qtstart): Set traceframe_usage, start_time.
11826 (stop_tracing): Set stop_time.
11827 (cmd_qtstatus): Report additional status.
11828 (cmd_qtp): New function.
11829 (handle_tracepoint_query): Call it.
11830 (cmd_qtnotes): New function.
11831 (handle_tracepoint_general_set): Call it.
11832 (get_timestamp): Rename from tsv_get_timestamp.
11834 2011-11-14 Stan Shebs <stan@codesourcery.com>
11835 Kwok Cheung Yeung <kcy@codesourcery.com>
11837 * linux-x86-low.c (small_jump_insn): New.
11838 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11839 trampoline and error message, build a trampoline and issue a small
11840 jump instruction to it.
11841 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11842 trampoline and error message.
11843 (x86_get_min_fast_tracepoint_insn_len): New.
11844 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11845 * linux-low.h (struct linux_target_ops): Add arguments to
11846 install_fast_tracepoint_jump_pad operation, add new operation.
11847 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11849 (linux_get_min_fast_tracepoint_insn_len): New function.
11850 (linux_target_op): Add new operation.
11851 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11852 (gdb_trampoline_buffer_end): Ditto.
11853 (gdb_trampoline_buffer_error): Ditto.
11854 (struct ipa_sym_addresses): Add fields for new IPA variables.
11855 (symbol_list): Add entries for new IPA variables.
11856 (struct tracepoint): Add fields to hold the address range of the
11857 trampoline used by the tracepoint.
11858 (trampoline_buffer_head): New static variable.
11859 (trampoline_buffer_tail): Ditto.
11860 (claim_trampoline_space): New function.
11861 (have_fast_tracepoint_trampoline_buffer): New function.
11862 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11864 (install_fast_tracepoint): Ditto, also add error buffer argument.
11865 (cmd_qtminftpilen): New function.
11866 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11867 (fast_tracepoint_from_trampoline_address): New function.
11868 (fast_tracepoint_collecting): Handle trampoline as part of jump
11870 (set_trampoline_buffer_space): New function.
11871 (initialize_tracepoint): Initialize new IPA variables.
11872 * target.h (struct target_ops): Add arguments to
11873 install_fast_tracepoint_jump_pad operation, add new
11874 get_min_fast_tracepoint_insn_len operation.
11875 (target_get_min_fast_tracepoint_insn_len): New.
11876 (install_fast_tracepoint_jump_pad): Add arguments.
11877 * server.h (IPA_BUFSIZ): Define.
11878 * linux-i386-ipa.c: Include extra header files.
11879 (initialize_fast_tracepoint_trampoline_buffer): New function.
11880 (initialize_low_tracepoint): Call it.
11881 * server.h (set_trampoline_buffer_space): Declare.
11882 (claim_trampoline_space): Ditto.
11883 (have_fast_tracepoint_trampoline_buffer): Ditto.
11885 2011-11-14 Yao Qi <yao@codesourcery.com>
11887 * server.c (handle_query): Handle InstallInTrace for qSupported.
11888 * tracepoint.c (add_tracepoint): Sort list.
11889 (install_tracepoint, download_tracepoint): New.
11890 (cmd_qtdp): Call them to install and download tracepoints.
11891 (sort_tracepoints): Removed.
11892 (cmd_qtstart): Update.
11894 2011-11-14 Yao Qi <yao@codesourcery.com>
11896 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11897 * mem-break.h: Declare.
11898 * tracepoint.c (cmd_qtstart): Move some code to ...
11899 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11901 (download_tracepoints): Move some code to ...
11902 (download_tracepoint_1): ... here. New.
11904 2011-11-08 Yao Qi <yao@codesourcery.com>
11906 * remote-utils.c (relocate_instruction): A comment fix.
11908 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11910 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11911 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11912 dr_status_mirror and dr_control_mirror from debug_reg_state.
11913 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11914 (i386_initial_stuff): Remove use of deleted globals.
11915 (i386_get_thread_context, i386_set_thread_context,
11916 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11917 from debug_reg_state.
11919 2011-11-05 Yao Qi <yao@codesourcery.com>
11921 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11922 address as TPOINT's.
11924 2011-11-02 Stan Shebs <stan@codesourcery.com>
11926 * tracepoint.c (agent_mem_read_string): New function.
11927 (eval_agent_expr): Call it for tracenz.
11928 * server.c (handle_query): Report support for tracenz.
11930 2011-11-02 Yao Qi <yao@codesourcery.com>
11932 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11934 2011-11-02 Yao Qi <yao@codesourcery.com>
11936 * target.h: Fix a typo in comment.
11938 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11940 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11941 clobber the breakpoints' shadows with fast tracepoint jumps.
11942 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11943 * target.c (write_inferior_memory): Also pass MYADDR down to
11946 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11948 * configure.ac: Check support for personality routine.
11949 * configure: Regenerate.
11950 * config.in: Likewise.
11951 * linux-low.c: Include <sys/personality.h>.
11952 Define ADDR_NO_RANDOMIZE if necessary.
11953 (linux_create_inferior): Disable address space randomization when
11954 forking inferior, if requested.
11955 (linux_supports_disable_randomization): New function.
11956 (linux_target_ops): Install it.
11957 * server.h (disable_randomization): Declare.
11958 * server.c (disable_randomization): New global variable.
11959 (handle_general_set): Handle QDisableRandomization.
11960 (handle_query): Likewise for qSupported.
11961 (main): Support --disable-randomization and --no-disable-randomization
11962 command line arguments.
11963 * target.h (struct target_ops): Add supports_disable_randomization.
11964 (target_supports_disable_randomization): New macro.
11966 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11968 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11970 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11971 [!PT_GETDSBT] (target_loadmap): New definition.
11972 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11973 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11974 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11975 and PT_GETDSBT to LINUX_LOADMAP.
11976 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11977 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11979 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11981 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11982 (arm_linux_hwbp_cap): New static variable.
11983 (arm_linux_get_hwbp_cap): Replace by ...
11984 (arm_linux_init_hwbp_cap): ... this new function.
11985 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11986 (arm_linux_get_hw_watchpoint_count): Likewise.
11987 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11988 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11989 (arm_prepare_to_resume): Use perror_with_name instead of error.
11991 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11993 * linux-arm-low.c: Include <signal.h>.
11994 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11995 (struct arm_linux_hwbp_cap): New data type.
11996 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11997 (struct arm_linux_hw_breakpoint): New data type.
11998 (MAX_BPTS, MAX_WPTS): Define.
11999 (struct arch_process_info, struct arch_lwp_info): New data types.
12000 (arm_linux_get_hwbp_cap): New function.
12001 (arm_linux_get_hw_breakpoint_count): Likewise.
12002 (arm_linux_get_hw_watchpoint_count): Likewise.
12003 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12004 (arm_hwbp_control_initialize): Likewise.
12005 (arm_hwbp_control_is_enabled): Likewise.
12006 (arm_hwbp_control_is_initialized): Likewise.
12007 (arm_hwbp_control_disable): Likewise.
12008 (arm_linux_hw_breakpoint_equal): Likewise.
12009 (arm_linux_hw_point_initialize): Likewise.
12010 (struct update_registers_data): New data structure.
12011 (update_registers_callback: New function.
12012 (arm_insert_point): Likewise.
12013 (arm_remove_point): Likewise.
12014 (arm_stopped_by_watchpoint): Likewise.
12015 (arm_stopped_data_address): Likewise.
12016 (arm_new_process): Likewise.
12017 (arm_new_thread): Likewise.
12018 (arm_prepare_to_resume): Likewise.
12019 (the_low_target): Register arm_insert_point, arm_remove_point,
12020 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12021 arm_new_thread, and arm_prepare_to_resume.
12023 2011-09-15 Stan Shebs <stan@codesourcery.com>
12025 * server.h (struct emit_ops): Add compare-goto fields.
12026 * tracepoint.c (gdb_agent_op_sizes): New table.
12027 (emit_eq_goto): New function.
12028 (emit_ne_goto): New function.
12029 (emit_lt_goto): New function.
12030 (emit_le_goto): New function.
12031 (emit_gt_goto): New function.
12032 (emit_ge_goto): New function.
12033 (is_goto_target): New function.
12034 (compile_bytecodes): Recognize special cases of compare-goto
12035 combinations and call specialized emitters for them.
12036 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12037 (amd64_emit_ne_goto): New function.
12038 (amd64_emit_lt_goto): New function.
12039 (amd64_emit_le_goto): New function.
12040 (amd64_emit_gt_goto): New function.
12041 (amd64_emit_ge_goto): New function.
12042 (amd64_emit_ops): Add the new functions.
12043 (i386_emit_eq_goto): New function.
12044 (i386_emit_ne_goto): New function.
12045 (i386_emit_lt_goto): New function.
12046 (i386_emit_le_goto): New function.
12047 (i386_emit_gt_goto): New function.
12048 (i386_emit_ge_goto): New function.
12049 (i386_emit_ops): Add the new functions.
12051 2011-09-08 Stan Shebs <stan@codesourcery.com>
12053 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12054 (i386_emit_epilogue): Restore %ebx.
12056 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12058 * server.c (step_thread): Remove definition.
12059 (process_serial_event): Don't handle Hs.
12060 * server.h (step_thread): Remove declaration.
12061 * target.c (set_desired_inferior): Remove use of step_thread.
12063 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12065 * linux-low.c: Include linux-procfs.h.
12066 (linux_attach_lwp_1): Update comments.
12067 (linux_attach): Scan for existing threads when attaching to a
12068 process that is the tgid.
12069 * Makefile.in: Update dependencies.
12071 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12073 * configure.srv: Add linux-procfs.o dependencies.
12075 2011-08-14 Yao Qi <yao@codesourcery.com>
12077 * target.h (struct target_ops): Fix indent.
12078 * win32-low.c (win32_target_ops): Fix comment.
12080 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12081 Yao Qi <yao@codesourcery.com>
12083 * Makefile.in (clean): Remove tic6x-*.c files.
12084 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12085 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12086 (tic6x-c64xp-linux.c): Likewise.
12087 * configure.srv: Add support for tic6x-*-uclinux.
12088 * linux-tic6x-low.c: New.
12089 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12091 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12092 Yao Qi <yao@codesourcery.com>
12094 * target.h (struct target_ops): Add read_loadmap.
12095 * linux-low.c (struct target_loadseg): New type.
12096 (struct target_loadmap): New type.
12097 (linux_read_loadmap): New function.
12098 (linux_target_ops): Add linux_read_loadmap.
12099 * server.c (handle_query): Support qXfer:fdpic:read packet.
12100 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12103 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12105 * win32-low.c: Include <stdint.h>.
12107 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12109 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12110 to the inferior here.
12111 (i386_remove_aligned_watchpoint): Ditto.
12112 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12113 fit part of the watchpoint in the debug registers.
12114 (i386_update_inferior_debug_regs): New.
12115 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12116 registers, and only update the inferior on success.
12117 (i386_low_remove_watchpoint): Ditto.
12119 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12121 * linux-low.c (compare_ints, unique, list_threads, show_process,
12122 linux_core_of_thread): Delete.
12123 (linux_target_ops): Change linux_core_of_thread to
12124 linux_common_core_of_thread.
12125 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12126 * utils.c (malloc_failure): Change type of argument.
12127 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12128 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12129 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12130 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12131 (IPA_OBJS): Add common-utils-ipa.o.
12132 (ptid_h, linux_osdata_h): New macros.
12133 (server_h): Add common/common-utils.h, common/xml-utils.h,
12134 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12136 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12137 ptid.o, buffer.o): New rules.
12138 (linux-low.o): Add common/linux-osdata.h as a dependency.
12139 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12140 * configure.ac: Add AC_HEADER_DIRENT check.
12141 * config.in: Regenerate.
12142 * configure: Regenerate.
12143 * remote-utils.c (xml_escape_text): Delete.
12144 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12145 buffer_xml_printf): Move to common/buffer.c.
12146 * server.c (main): Remove call to initialize_inferiors.
12147 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12148 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12149 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12150 internal_error, gdb_assert, gdb_assert_fail): Delete.
12151 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12152 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12154 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12155 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12156 initialize_inferiors): Delete.
12158 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12160 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12163 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12165 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12167 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12169 2011-05-26 Yao Qi <yao@codesourcery.com>
12171 * Makefile.in (thread-db.o): Track dependence to
12172 common/gdb_thread_db.h.
12173 * thread-db.c: include gdb_thread_db.h from right place.
12175 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12177 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12178 __FILE__ and __LINE__ to internal_error.
12180 2011-05-13 Doug Evans <dje@google.com>
12182 * thread-db.c (try_thread_db_load_from_sdir): New function.
12183 (try_thread_db_load_from_dir): New function.
12184 (thread_db_load_search): Handle $sdir, ignore $pdir.
12185 Remove trying of system directories if search of
12186 libthread-db-search-path fails, that is now done via $sdir.
12188 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12190 * server.c (handle_query): Add EnableDisableTracepoints to the list
12191 of supported features.
12192 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12194 (cmd_qtenable_disable): New.
12195 (cmd_qtstart): Install tracepoints even if disabled.
12196 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12197 receiving a QTEnable or QTDisable packet.
12198 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12199 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12201 (gdb_probe): Skip data collection if static tracepoint is disabled.
12203 2011-05-10 Doug Evans <dje@google.com>
12205 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12207 2011-05-04 Doug Evans <dje@google.com>
12209 * linux-low.c (linux_join): Skip process lookup.
12210 * spu-low.c (spu_join): Ditto.
12211 * server.c (join_inferiors_callback): Delete.
12212 (process_serial_event): For 'D' packet (detach) call join_inferior
12215 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12217 * README: Don't mention xscale*-*-linux*.
12218 * configure.srv (xscale*-*-linux*): Don't handle target.
12220 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12222 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12224 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12225 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12226 (i386_emit_void_call_2): Likewise.
12228 2011-04-26 Yao Qi <yao@codesourcery.com>
12230 * linux-low.c: Move common macros to linux-ptrace.h.
12231 Include linux-ptrace.h.
12232 * Makefile.in (linux_ptrace_h): New.
12233 (linux-low.o): Depends on linux-ptrace.h.
12235 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12237 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12238 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12239 (remote_prepare): New function with most of the TCP code from ...
12240 (remote_open): ... here. Detect PORT here unconditionally. Move also
12241 setting transport_is_reliable.
12242 * server.c (run_once): New variable.
12243 (gdbserver_usage): Document it.
12244 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12245 the first run if RUN_ONCE.
12246 * server.h (run_once, remote_prepare): New declarations.
12248 2011-04-19 Tom Tromey <tromey@redhat.com>
12250 * win32-low.c (handle_load_dll): Remove duplicate "the".
12252 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12254 Remove support for old Cygwin 1.5 versions.
12255 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12256 function to avoid warning.
12257 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12260 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12262 * gdbserver/server.h (Macro _): Define it if not available.
12264 2011-03-14 Michael Snyder <msnyder@vmware.com>
12266 * hostio.c (handle_close): Remove unnecessary null test.
12268 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12270 * Makefile.in (maintainer-clean realclean distclean): Remove
12271 "make ... subdir_do" command.
12273 2011-03-10 Michael Snyder <msnyder@vmware.com>
12275 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12277 * server.c (handle_v_run): Free alloced buffer on early return.
12279 2011-03-09 Yao Qi <yao@codesourcery.com>
12282 2011-03-04 Yao Qi <yao@codesourcery.com>
12284 * Makefile.in: Remove GNU make feature --directory.
12286 2011-03-05 Yao Qi <yao@codesourcery.com>
12288 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12289 (subdir_do): New make target. Copied from gdb/Makefile.
12290 (maintainer-clean, realclean, distclean, clean): Call corresponding
12291 make targets in common/Makefile.
12293 2011-02-11 Yao Qi <yao@codesourcery.com>
12295 * configure.ac: Call AC_PROG_RANLIB.
12296 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12297 * configure: Regenerate.
12299 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12301 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12303 2011-03-06 Yao Qi <yao@codesourcery.com>
12305 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12307 2011-03-05 Yao Qi <yao@codesourcery.com>
12309 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12310 (subdir_do): New make target. Copied from gdb/Makefile.
12311 (maintainer-clean, realclean, distclean, clean): Call corresponding
12312 make targets in common/Makefile.
12314 2011-03-04 Yao Qi <yao@codesourcery.com>
12316 * Makefile.in: Remove GNU make feature --directory.
12318 2011-03-04 Michael Snyder <msnyder@vmware.com>
12320 * server.c (queue_stop_reply): Call xmalloc not malloc.
12322 2011-03-02 Michael Snyder <msnyder@vmware.com>
12324 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12326 2011-02-28 Michael Snyder <msnyder@vmware.com>
12328 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12329 (cmd_qtframe): Ditto.
12330 (cmd_qtbuffer): Ditto.
12331 (cmd_bigqtbuffer): Ditto.
12333 * utils.c (decimal2str): Initialize 'width' to nine, then
12334 don't mess with it.
12336 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12338 * hostio.c (require_data): Free *data, not data.
12340 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12342 * hostio.c (require_data): Use free, not xfree.
12344 2011-02-27 Michael Snyder <msnyder@vmware.com>
12346 * server.c (handle_query): Discard unused value.
12348 * hostio.c (require_data): Free malloc memory before returning
12351 2011-02-26 Michael Snyder <msnyder@vmware.com>
12353 * linux-low.c (list_threads): Call closedir for dirent.
12355 2011-02-27 Michael Snyder <msnyder@vmware.com>
12357 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12358 a case statement falls through.
12360 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12362 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12365 2011-02-26 Michael Snyder <msnyder@vmware.com>
12367 * utils.c (decimal2str): Eliminate dead code and dead param.
12368 (pulongest): Drop dead param from call to decimal2str.
12371 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12373 Revert the following patch (not approved yet):
12374 2011-02-21 Hui Zhu <teawater@gmail.com>
12375 * tracepoint.c (tp_printf): New function.
12376 (eval_agent_expr): Handle gdb_agent_op_printf.
12378 2011-02-21 Hui Zhu <teawater@gmail.com>
12380 * tracepoint.c (tp_printf): New function.
12381 (eval_agent_expr): Handle gdb_agent_op_printf.
12383 2011-02-18 Tom Tromey <tromey@redhat.com>
12385 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12386 (tracepoint.o): Likewise.
12387 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12388 (gdb_agent_op_names): Likewise.
12390 2011-02-18 Tom Tromey <tromey@redhat.com>
12392 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12393 gdb_agent_op_rot>: New constants.
12394 (gdb_agent_op_names): Add pick and roll.
12395 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12398 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12400 * aclocal.m4: Regenerated with aclocal-1.11.1.
12402 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12404 * server.c (handle_qxfer_traceframe_info): New.
12405 (qxfer_packets): Register "traceframe-info".
12406 (handle_query): Report support for qXfer:traceframe-info:read+.
12407 * tracepoint.c (match_blocktype): New.
12408 (traceframe_find_block_type): Rename to ...
12409 (traceframe_walk_blocks): ... this. Add callback filter argument,
12411 (traceframe_find_block_type): New, reimplemented on top of
12412 traceframe_walk_blocks.
12413 (build_traceframe_info_xml): New.
12414 (traceframe_read_info): New.
12415 * server.h (traceframe_read_info): Declare.
12417 2011-02-11 Yao Qi <yao@codesourcery.com>
12419 * configure.ac: Call AC_PROG_RANLIB.
12420 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12421 * configure: Regenerate.
12423 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12425 * server.c (gdb_read_memory): Change return semantics to allow
12427 (handle_search_memory_1): Adjust.
12428 (process_serial_event) <'m' packet>: Handle partial transfers.
12429 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12431 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12433 * regcache.c (init_register_cache): Initialize
12434 regcache->register_status.
12435 (free_register_cache): Release regcache->register_status.
12436 (regcache_cpy): Copy register_status.
12437 (registers_to_string): Print 'x's for unavailable registers.
12438 (supply_register): Mark the register's status valid or
12439 unavailable, depending on whether a buffer was passed in or not.
12440 (supply_register_zeroed): New.
12441 (supply_regblock): Mark the registers' status valid or
12442 unavailable, depending on whether a buffer was passed in or not.
12443 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12444 (struct regcache): New `register_status' field.
12445 (supply_register_zeroed): Declare.
12446 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12447 supply_register_zeroed, rather than passing a NULL buffer to
12449 * tracepoint.c (fetch_traceframe_registers): Update comment.
12451 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12453 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12456 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12458 * server.h (decode_xfer_write): Change prototype.
12459 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12460 and don't extract the annex here.
12461 * server.c (decode_xfer_read): Remove `annex' parameter,
12462 and don't extract the annex here.
12463 (decode_xfer): New.
12464 (struct qxfer): New.
12465 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12466 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12467 (handle_qxfer_statictrace): New functions, abstracted out from
12468 handle_query, and made to use the struct qxfer interface.
12469 (handle_threads_qxfer_proper): Rename to ...
12470 (handle_qxfer_threads_proper): ... this.
12471 (handle_threads_qxfer): Rename to ...
12472 (handle_qxfer_threads): ... this. Adjust.
12473 (qxfer_packets): New array.
12474 (handle_qxfer): New function.
12475 (handle_query): Use handle_qxfer.
12477 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12479 * gdbreplay.c: Shorten lines of >= 80 columns.
12480 * linux-low.c: Ditto.
12481 * linux-ppc-low.c: Ditto.
12482 * linux-s390-low.c: Ditto.
12483 * linux-sparc-low.c: Ditto.
12484 * linux-x86-low.c: Ditto.
12485 * linux-xtensa-low.c: Ditto.
12486 * mem-break.c: Ditto.
12487 * nto-low.c: Ditto.
12488 * regcache.h: Ditto.
12489 * remote-utils.c: Ditto.
12492 * thread-db.c: Ditto.
12493 * tracepoint.c: Ditto.
12495 * win32-low.h: Ditto.
12497 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12499 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12502 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12504 * server.c (gdbserver_version): Update copyright year in version
12506 * gdbreplay.c (gdbreplay_version): Ditto.
12508 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12510 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12511 * linux-bfin-low.c: New file.
12512 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12513 PT_DATA_ADDR for BFIN targets.
12514 * Makefile.in (SFILES): Add linux-bfin-low.c.
12515 (clean): Remove reg-bfin.c.
12516 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12517 * README: Mention supported Blackfin targets.
12519 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12521 * .gitignore: New file.
12523 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12525 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12527 2010-10-22 Jie Zhang <jie@codesourcery.com>
12529 * Makefile.in: Add FLAGS_TO_PASS variable.
12530 (install): Remove dependency of install-only and recursively
12531 invoke make for install-only.
12533 2010-10-04 Doug Evans <dje@google.com>
12535 * Makefile.in (uninstall): Use $(DESTDIR).
12537 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12541 * linux-x86-low.c (compat_siginfo_from_siginfo)
12542 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12543 si_code is < 0. Check for si_code == SI_TIMER before checking for
12546 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12548 * lynx-i386-low.c: New file.
12549 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12551 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12553 * lynx-low.c (ptrace_request_to_str): Remove handling for
12554 request values that have been removed in LynxOS 5.x.
12556 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12558 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12561 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12563 * configure.ac: Add --enable-inprocess-agent option.
12564 * configure: Rebuilt.
12566 2010-09-06 Yao Qi <yao@codesourcery.com>
12568 * linux-low.c (linux_kill): Remove unused variable.
12569 (linux_stabilize_threads): Likewise.
12570 * server.c (start_inferior): Likewise.
12571 (queue_stop_reply_callback): Likewise.
12572 * tracepoint.c (do_action_at_tracepoint): Likewise.
12574 2010-09-06 Yao Qi <yao@codesourcery.com>
12576 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12579 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12581 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12583 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12585 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12588 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12590 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12591 gdbserver/lynx-ppc-low.c: New files.
12592 * Makefile.in (lynx_low_h): New variable.
12593 (lynx-low.o, lynx-ppc-low.o): New rules.
12594 * configure.ac: On LynxOS, link with -lnetinet.
12595 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12596 * configure: regenerate.
12598 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12600 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12601 * configure.ac: Add check for vasprintf and vsnprintf.
12602 * configure, config.in: Regenerate.
12603 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12605 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12607 * gdbreplay.c: Move include of alloca.h up, next to include of
12609 * server.h: Add include of malloc.h.
12610 * mem-break.c: Remove include of malloc.h.
12611 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12613 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12615 * Makefile.in (memmem.o): Build with -Wno-error.
12617 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12619 * utils.c (xsnprintf): Make non-static.
12620 * server.h: Add xsnprintf declaration.
12621 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12622 replace calls to snprintf by calls to xsnprintf throughout.
12624 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12626 * configure.ac: Add configure check for alloca.
12627 * configure, config.in: Regenerate.
12628 * server.h: Include alloca.h if it exists.
12629 * gdbreplay.c: Include alloca.h if it exists.
12631 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12633 * linux-low.c (__SIGRTMIN): Define if not already defined.
12634 (linux_create_inferior): Check for __ANDROID__ rather than
12636 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12637 are already deferred.
12638 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12639 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12640 stopped and already has a pending signal to report.
12641 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12642 a pending signal to report or is moving out of a jump pad.
12643 (linux_init_signals): Check for __ANDROID__ rather than
12646 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12648 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12649 debug_threads check. Avoid a linear search when not doing debug
12652 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12654 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12655 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12656 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12657 (process_event): Change local fd's type to gdb_fildes_t.
12658 (create_file_handler): Adjust prototype.
12659 (delete_file_handler): Adjust prototype.
12660 (handle_file_event): Adjust prototype. Use pfildes.
12661 (create_file_event): Adjsut prototype.
12662 * remote-utils.c (remote_desc, listen_desc): Change type to
12664 * server.h: New gdb_fildes_t typedef.
12665 [USE_WIN32API]: Include winsock2.h.
12666 (delete_file_handler, add_file_handler): Adjust prototypes.
12667 (pfildes): Declare.
12668 * utils.c (pfildes): New.
12670 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12672 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12673 * configure: Regenerate.
12675 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12677 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12678 (linux_done_accessing_memory): ... this.
12679 (linux_target_ops): Adjust.
12680 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12681 * nto-low.c (nto_target_ops): Adjust comment.
12682 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12683 * spu-low.c (spu_target_ops): Adjust comment.
12684 * target.h (target_ops): Rename unprepare_to_access_memory field
12685 to done_accessing_memory.
12686 (unprepare_to_access_memory): Rename to ...
12687 (done_accessing_memory): ... this.
12689 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12691 * linux-low.c (linux_prepare_to_access_memory): New.
12692 (linux_unprepare_to_access_memory): New.
12693 (linux_target_ops): Install them.
12694 * server.c (read_memory): Rename to ...
12695 (gdb_read_memory): ... this. Use
12696 prepare_to_access_memory/prepare_to_access_memory.
12697 (write_memory): Rename to ...
12698 (gdb_write_memory): ... this. Use
12699 prepare_to_access_memory/prepare_to_access_memory.
12700 (handle_search_memory_1): Adjust.
12701 (process_serial_event): Adjust.
12702 * target.h (struct target_ops): New fields
12703 prepare_to_access_memory and unprepare_to_access_memory.
12704 (prepare_to_access_memory, unprepare_to_access_memory): New.
12705 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12706 prepare_to_access_memory/prepare_to_access_memory.
12707 * nto-low.c (nto_target_ops): Adjust.
12708 * spu-low.c (spu_target_ops): Adjust.
12709 * win32-low.c (win32_target_ops): Adjust.
12711 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12713 * Makefile.in (WARN_CFLAGS): Get it from configure.
12714 (WERROR_CFLAGS): New.
12715 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12716 * configure.ac: Introduce --enable-werror, which adds -Werror to
12717 the compiler command line. Enabled by default. Disable with
12718 --disable-werror. Add -Wdeclaration-after-statement
12719 Wpointer-arith and -Wformat-nonliteral to warning flags.
12720 * configure: Regenerate.
12722 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12724 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12726 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12728 * gdbreplay.c (remote_error): New.
12730 (expect): Use gdbchar. Check for error reading from GDB.
12731 Clarify sync error output.
12732 (play): Check for errors writing to GDB.
12733 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12734 * remote-utils.c (getpkt): Check for errors writing to the remote
12737 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12739 * linux-low.c (linux_wait_1): Move non-debugging code out of
12740 `debug_threads' control.
12742 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12744 * linux-low.c (linux_wait_1): Don't set last_status here.
12745 * server.c (push_event, queue_stop_reply_callback): Assert we're
12746 not pushing a TARGET_WAITKIND_IGNORE event.
12747 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12748 (myresume, handle_target_event): Set the thread's last_resume_kind
12749 and last_status from the target returned status.
12751 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12755 * linux-x86-low.c (update_debug_registers_callback): New.
12756 (i386_dr_low_set_addr): Use it.
12757 (i386_dr_low_get_addr): New.
12758 (i386_dr_low_set_control): Use update_debug_registers_callback.
12759 (i386_dr_low_get_control): New.
12760 (i386_dr_low_get_status): Adjust.
12761 * linux-low.c (linux_stop_lwp): New.
12762 * linux-low.h (linux_stop_lwp): Declare.
12764 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12765 argument instead of a i386_debug_reg_state.
12766 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12767 a i386_debug_reg_state.
12768 (i386_insert_aligned_watchpoint): Adjust.
12769 (i386_remove_aligned_watchpoint): Adjust.
12770 (i386_low_stopped_data_address): Read the debug registers from the
12771 inferior instead of from the mirrors.
12772 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12773 (i386_dr_low_get_addr): Declare.
12774 (i386_dr_low_get_control): Declare.
12775 (i386_dr_low_get_status): Change prototype.
12777 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12778 (i386_dr_low_get_addr): New.
12779 (i386_dr_low_get_control): New.
12780 (i386_dr_low_get_status): Adjust prototype. Return
12782 (i386_initial_stuff): Clear dr_status_mirror and
12784 (i386_get_thread_context): Adjust.
12785 (i386_set_thread_context): Adjust.
12786 (i386_thread_added): Adjust.
12788 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12790 * linux-low.h (linux_thread_area): Delete declaration.
12792 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12794 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12795 after its termination.
12797 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12799 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12800 (gdb_wants_all_stopped): Delete.
12801 (linux_wait_1): Don't call them.
12802 * server.c (handle_v_cont): Tag all threads as want-stopped.
12803 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12804 stopped as "client-wants-stopped".
12806 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12808 * Makefile.in (signals_h): New.
12809 (server_h): Depend on it.
12810 (server.o): Don't depend on $(signals_def).
12811 (signals.o): Depend on $(signals_def).
12813 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12815 * Makefile.in (signals_def): New.
12816 (server_h): Append include/gdb/signals.h and signals_def.
12817 (server.o): Append signals_def.
12819 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12821 * server.c (handle_target_event): Use target_signal_to_host for
12822 resume_info.sig initialization.
12823 * target.h (struct thread_resume) <sig>: New comment.
12825 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12827 * server.c (handle_query): strcpy() the returned string from paddress()
12828 instead of sprintf().
12829 * utils.c (paddress): Return phex_nz().
12831 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12833 * server.c (handle_v_cont): Call mourn_inferior if process
12835 (myresume): Likewise.
12837 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12839 Static tracepoints, and integration with UST.
12841 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12842 * mem-break.c (uninsert_all_breakpoints)
12843 (reinsert_all_breakpoints): New.
12844 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12845 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12846 (gdb_agent_ust_loaded, helper_thread_id)
12847 (gdb_agent_helper_thread_id): New macros.
12848 (struct ipa_sym_addresses): Add addr_ust_loaded,
12849 addr_helper_thread_id, addr_cmd_buf.
12850 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12851 (in_process_agent_loaded_ust): New.
12852 (write_e_ust_not_loaded): New.
12853 (maybe_write_ipa_ust_not_loaded): New.
12854 (struct collect_static_trace_data_action): New.
12855 (enum tracepoint_type) <static_tracepoint>: New.
12856 (struct tracepoint) <handle>: Mention static tracepoints.
12857 (struct static_tracepoint_ctx): New.
12858 (CMD_BUF_SIZE): New.
12859 (add_tracepoint_action): Handle static tracepoint actions.
12860 (unprobe_marker_at): New.
12861 (clear_installed_tracepoints): Handle static tracepoints.
12862 (cmd_qtdp): Handle static tracepoints.
12863 (probe_marker_at): New.
12864 (cmd_qtstart): Handle static tracepoints.
12865 (response_tracepoint): Handle static tracepoints.
12866 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12867 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12868 (get_context_regcache): Handle static tracepoints.
12869 (do_action_at_tracepoint): Handle static tracepoint actions.
12870 (traceframe_find_block_type): Handle static trace data blocks.
12871 (traceframe_read_sdata): New.
12872 (download_tracepoints): Download static tracepoint actions.
12873 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12874 (GDB_PROBE_NAME): New.
12876 (GET_UST_SYM): New.
12879 (ust_marker_to_static_tracepoint): New.
12881 (collect_ust_data_at_tracepoint): New.
12882 (gdb_ust_probe): New.
12883 (UNIX_PATH_MAX, SOCK_DIR): New.
12884 (gdb_ust_connect_sync_socket): New.
12885 (resume_thread, stop_thread): New.
12886 (run_inferior_command): New.
12887 (init_named_socket): New.
12888 (gdb_ust_socket_init): New.
12889 (cstr_to_hexstr): New.
12891 (first_marker, next_marker): New.
12892 (response_ust_marker): New.
12893 (cmd_qtfstm, cmd_qtsstm): New.
12894 (unprobe_marker_at, probe_marker_at): New.
12895 (cmd_qtstmat, gdb_ust_thread): New.
12896 (gdb_ust_init): New.
12897 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12898 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12899 (ST_REGENTRY): New.
12900 (x86_64_st_collect_regmap): New.
12901 (X86_64_NUM_ST_COLLECT_GREGS): New.
12902 (AMD64_RIP_REGNUM): New.
12903 (supply_static_tracepoint_registers): New.
12904 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12905 (ST_REGENTRY): New.
12906 (i386_st_collect_regmap): New.
12907 (i386_NUM_ST_COLLECT_GREGS): New.
12908 (supply_static_tracepoint_registers): New.
12909 * server.c (handle_query): Handle qXfer:statictrace:read.
12910 <qSupported>: Report support for StaticTracepoints, and
12911 qXfer:statictrace:read features.
12912 * server.h (traceframe_read_sdata)
12913 (supply_static_tracepoint_registers): Declare.
12914 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12915 (unpack_varlen_hex): Include in IPA build.
12916 * Makefile.in (ustlibs, ustinc): New.
12917 (IPA_OBJS): Add remote-utils-ipa.o.
12918 ($(IPA_LIB)): Link -ldl and -lpthread.
12920 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12921 * config.in, configure: Regenerate.
12923 2010-06-20 Ian Lance Taylor <iant@google.com>
12924 Pedro Alves <pedro@codesourcery.com>
12926 * linux-x86-low.c (always_true): Delete.
12927 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12928 trying to fool the compiler with always_true.
12930 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12932 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12933 conditions in gdbserver.
12935 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12937 * spu-low.c (spu_read_memory): Wrap around local store limit.
12938 (spu_write_memory): Likewise.
12940 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12942 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12943 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12945 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12947 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12948 uses with LONGEST uses.
12950 2010-06-14 Stan Shebs <stan@codesourcery.com>
12951 Pedro Alves <pedro@codesourcery.com>
12955 * linux-x86-low.c: Include limits.h.
12957 (always_true): New.
12960 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12961 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12962 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12963 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12964 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12965 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12966 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12967 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12968 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12969 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12970 (amd64_emit_void_call_2): New.
12971 (amd64_emit_ops): New.
12972 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12973 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12974 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12975 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12976 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12977 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12978 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12979 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12980 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12981 (i386_emit_stack_adjust, i386_emit_int_call_1)
12982 (i386_emit_void_call_2): New.
12983 (i386_emit_ops): New.
12984 (x86_emit_ops): New.
12985 (the_low_target): Install x86_emit_ops.
12986 * server.h (struct emit_ops): New.
12987 (get_raw_reg_func_addr): Declare.
12988 (current_insn_ptr, emit_error): Declare.
12989 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12990 (set_trace_state_variable_value): New defines.
12991 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12992 addr_get_trace_state_variable_value and
12993 addr_set_trace_state_variable_value.
12994 (symbol_list): New fields for get_raw_reg,
12995 get_trace_state_variable_value and set_trace_state_variable_value.
12996 (condfn): New typedef.
12997 (struct tracepoint): New field `compiled_cond'.
12998 (do_action_at_tracepoint): Clear compiled_cond.
12999 (get_trace_state_variable_value, set_trace_state_variable_value):
13001 (condition_true_at_tracepoint): If there's a compiled condition,
13003 (current_insn_ptr, emit_error): New globals.
13004 (struct bytecode_address): New.
13005 (get_raw_reg_func_addr): New.
13006 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13007 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13008 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13009 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13010 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13011 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13012 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13013 (compile_tracepoint_condition, compile_bytecodes): New.
13014 * target.h (emit_ops): Forward declare.
13015 (struct target_ops): New field emit_ops.
13016 (target_emit_ops): New.
13017 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13018 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13019 * linux-low.c (linux_emit_ops): New.
13020 (linux_target_ops): Install it.
13021 * linux-low.h (struct linux_target_ops): New field emit_ops.
13023 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13025 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13026 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13028 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13029 Stan Shebs <stan@codesourcery.com>
13031 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13032 (all): Depend on $(extra_libraries).
13033 (install-only): Install the IPA.
13034 (IPA_OBJS, IPA_LIB): New.
13035 (clean): Remove the IPA lib.
13036 (IPAGENT_CFLAGS): New.
13037 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13038 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13039 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13040 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13041 * configure.ac: Check for atomic builtins support in the compiler.
13042 (IPA_DEPFILES, extra_libraries): Define.
13043 * configure.srv (ipa_obj): Add description.
13044 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13045 (i[34567]86-*-linux*): Set ipa_obj.
13046 (x86_64-*-linux*): Set ipa_obj.
13047 * linux-low.c (stabilizing_threads): New.
13048 (supports_fast_tracepoints): New.
13049 (linux_detach): Stabilize threads before detaching.
13050 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13051 the lwp is either not stabilizing, or is moving out of a jump pad.
13052 (linux_fast_tracepoint_collecting): New.
13053 (maybe_move_out_of_jump_pad): New.
13054 (enqueue_one_deferred_signal): New.
13055 (dequeue_one_deferred_signal): New.
13056 (linux_wait_for_event_1): If moving out of a jump pad, defer
13057 pending signals to later.
13058 (linux_stabilize_threads): New.
13059 (linux_wait_1): Check if threads need moving out of jump pads, and
13061 (stuck_in_jump_pad_callback): New.
13062 (move_out_of_jump_pad_callback): New.
13063 (lwp_running): New.
13064 (linux_resume_one_lwp): Handle moving out of jump pads.
13065 (linux_set_resume_request): Dequeue deferred signals.
13066 (need_step_over_p): Also step over fast tracepoint jumps.
13067 (start_step_over): Also uninsert fast tracepoint jumps.
13068 (finish_step_over): Also reinsert fast tracepoint jumps.
13069 (linux_install_fast_tracepoint_jump): New.
13070 (linux_target_ops): Install linux_stabilize_threads and
13071 linux_install_fast_tracepoint_jump_pad.
13072 * linux-low.h (linux_target_ops) <get_thread_area,
13073 install_fast_tracepoint_jump_pad>: New fields.
13074 (struct lwp_info) <collecting_fast_tracepoint,
13075 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13076 (linux_get_thread_area): Declare.
13077 * linux-x86-low.c (jump_insn): New.
13078 (x86_get_thread_area): New.
13079 (append_insns): New.
13080 (push_opcode): New.
13081 (amd64_install_fast_tracepoint_jump_pad): New.
13082 (i386_install_fast_tracepoint_jump_pad): New.
13083 (x86_install_fast_tracepoint_jump_pad): New.
13084 (the_low_target): Install x86_get_thread_area and
13085 x86_install_fast_tracepoint_jump_pad.
13086 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13087 (struct fast_tracepoint_jump): New.
13088 (fast_tracepoint_jump_insn): New.
13089 (fast_tracepoint_jump_shadow): New.
13090 (find_fast_tracepoint_jump_at): New.
13091 (fast_tracepoint_jump_here): New.
13092 (delete_fast_tracepoint_jump): New.
13093 (set_fast_tracepoint_jump): New.
13094 (uninsert_fast_tracepoint_jumps_at): New.
13095 (reinsert_fast_tracepoint_jumps_at): New.
13096 (set_breakpoint_at): Use write_inferior_memory.
13097 (uninsert_raw_breakpoint): Use write_inferior_memory.
13098 (check_mem_read): Mask out fast tracepoint jumps.
13099 (check_mem_write): Mask out fast tracepoint jumps.
13100 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13101 (set_fast_tracepoint_jump): Declare.
13102 (delete_fast_tracepoint_jump)
13103 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13104 (reinsert_fast_tracepoint_jumps_at): Declare.
13105 * regcache.c: Don't compile many functions when building the
13106 in-process agent library.
13107 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13108 the register buffer in the heap.
13109 (free_register_cache): If the register buffer isn't owned by the
13110 regcache, don't free it.
13111 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13112 pre-existing register caches.
13113 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13115 (convert_ascii_to_int): : Constify `from' parameter type.
13116 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13117 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13118 the needed buffer in-place.
13119 (relocate_instruction): New.
13120 * server.c (handle_query) <qSymbols>: If the target supports
13121 tracepoints, give it a chance of looking up symbols. Report
13122 support for fast tracepoints.
13123 (handle_status): Stabilize threads.
13124 (process_serial_event): Adjust.
13125 * server.h (struct fast_tracepoint_jump): Forward declare.
13126 (struct process_info) <fast_tracepoint_jumps>: New field.
13127 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13128 (decode_X_packet, decode_M_packet): Adjust.
13129 (relocate_instruction): Declare.
13130 (in_process_agent_loaded): Declare.
13131 (tracepoint_look_up_symbols): Declare.
13132 (struct fast_tpoint_collect_status): Declare.
13133 (fast_tracepoint_collecting): Declare.
13134 (force_unlock_trace_buffer): Declare.
13135 (handle_tracepoint_bkpts): Declare.
13136 (initialize_low_tracepoint)
13137 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13138 * target.h (struct target_ops) <stabilize_threads,
13139 install_fast_tracepoint_jump_pad>: New fields.
13140 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13141 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13142 [HAVE_STDINT_H]: Include stdint.h.
13143 (trace_debug_1): Rename to ...
13144 (trace_vdebug): ... this.
13145 (trace_debug): Rename to ...
13146 (trace_debug_1): ... this. Add `level' parameter.
13147 (trace_debug): New.
13148 (ATTR_USED, ATTR_NOINLINE): New.
13149 (IP_AGENT_EXPORT): New.
13150 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13151 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13152 (about_to_request_buffer_space, trace_buffer_is_full)
13153 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13154 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13155 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13156 (traceframe_write_count, traceframes_created)
13157 (trace_state_variables)
13158 New renaming defines.
13159 (struct ipa_sym_addresses): New.
13160 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13161 (symbol_list): New.
13162 (ipa_sym_addrs): New.
13163 (all_tracepoint_symbols_looked_up): New.
13164 (in_process_agent_loaded): New.
13165 (write_e_ipa_not_loaded): New.
13166 (maybe_write_ipa_not_loaded): New.
13167 (tracepoint_look_up_symbols): New.
13168 (debug_threads) [IN_PROCESS_AGENT]: New.
13169 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13170 (UNKNOWN_SIDE_EFFECTS): New.
13171 (stop_tracing): New.
13172 (flush_trace_buffer): New.
13173 (stop_tracing_bkpt): New.
13174 (flush_trace_buffer_bkpt): New.
13175 (read_inferior_integer): New.
13176 (read_inferior_uinteger): New.
13177 (read_inferior_data_pointer): New.
13178 (write_inferior_data_pointer): New.
13179 (write_inferior_integer): New.
13180 (write_inferior_uinteger): New.
13181 (struct collect_static_trace_data_action): Delete.
13182 (enum tracepoint_type): New.
13183 (struct tracepoint) <type>: New field `type'.
13184 <actions_str, step_actions, step_actions_str>: Only include in
13186 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13187 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13188 (tracepoints): Use IP_AGENT_EXPORT.
13189 (last_tracepoint): Don't include in the IPA.
13190 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13191 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13192 (alloced_trace_state_variables): New.
13193 (trace_state_variables): Use IP_AGENT_EXPORT.
13194 (traceframe_t): Delete unused variable.
13195 (circular_trace_buffer): Don't include in the IPA.
13196 (trace_buffer_start): Delete.
13197 (struct trace_buffer_control): New.
13198 (trace_buffer_free): Delete.
13199 (struct ipa_trace_buffer_control): New.
13200 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13201 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13203 (trace_buffer_ctrl): New.
13204 (TRACE_BUFFER_CTRL_CURR): New.
13205 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13206 Reimplement as macros.
13207 (trace_buffer_wrap): Delete.
13208 (traceframe_write_count, traceframe_read_count)
13209 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13210 (struct tracepoint_hit_ctx) <type>: New field.
13211 (struct fast_tracepoint_ctx): New.
13212 (memory_barrier): New.
13214 (record_tracepoint_error): Update atomically in the IPA.
13215 (clear_inferior_trace_buffer): New.
13216 (about_to_request_buffer_space): New.
13217 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13218 updating the same buffer.
13219 (add_tracepoint): Default the tracepoint's type to trap
13220 tracepoint, and orig_size to -1.
13221 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13222 internal variables.
13223 (create_trace_state_variable): New parameter `gdb'. Handle it.
13224 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13225 (cmd_qtdp): Handle fast tracepoints.
13226 (cmd_qtdv): Adjust.
13227 (max_jump_pad_size): New.
13228 (gdb_jump_pad_head): New.
13229 (get_jump_space_head): New.
13230 (claim_jump_space): New.
13231 (sort_tracepoints): New.
13232 (MAX_JUMP_SIZE): New.
13233 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13235 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13236 support. Upload fast traceframes, and delete internal IPA
13238 (stop_tracing_handler): New.
13239 (flush_trace_buffer_handler): New.
13240 (cmd_qtstop): Upload fast tracepoints.
13241 (response_tracepoint): Handle fast tracepoints.
13242 (tracepoint_finished_step): Upload fast traceframes. Set the
13243 tracepoint hit context's tracepoint type.
13244 (handle_tracepoint_bkpts): New.
13245 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13246 type. Add comment about fast tracepoints.
13247 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13248 non-existing action_str field.
13249 (get_context_regcache): Handle fast tracepoints.
13250 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13252 (fast_tracepoint_from_jump_pad_address): New.
13253 (fast_tracepoint_from_ipa_tpoint_address): New.
13254 (collecting_t): New.
13255 (force_unlock_trace_buffer): New.
13256 (fast_tracepoint_collecting): New.
13258 (gdb_collect): New.
13259 (write_inferior_data_ptr): New.
13260 (target_tp_heap): New.
13261 (target_malloc): New.
13262 (download_agent_expr): New.
13264 (download_tracepoints): New.
13265 (download_trace_state_variables): New.
13266 (upload_fast_traceframes): New.
13267 (IPA_FIRST_TRACEFRAME): New.
13268 (IPA_NEXT_TRACEFRAME_1): New.
13269 (IPA_NEXT_TRACEFRAME): New.
13270 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13271 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13272 (gdb_jump_pad_buffer_end): New.
13273 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13274 (initialize_tracepoint): Adjust.
13275 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13276 buffer. Initialize the low module.
13277 * utils.c (PREFIX, TOOLNAME): New.
13278 (malloc_failure): Use PREFIX.
13279 (error): In the IPA, an error causes an exit.
13280 (fatal, warning): Use PREFIX.
13281 (internal_error): Use TOOLNAME.
13282 (NUMCELLS): Increase to 10.
13283 * configure, config.in: Regenerate.
13285 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13287 * server.c (handle_query) <qSupported>: Do two passes over the
13288 qSupported string to avoid nesting strtok.
13290 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13292 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13294 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13295 -Wl,--dynamic-list.
13296 * configure: Regenerate.
13297 * proc-service.list: New.
13299 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13301 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13304 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13306 * gdbreplay.c (remote_open): Check error return from socket() call by
13307 its equality to -1 not by it being negative.
13308 * remote-utils.c (remote_open): Likewise.
13310 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13312 * config.h: Regenerate.
13314 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13316 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13317 doesn't provide PTRACE_GET_THREAD_AREA.
13319 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13321 * linux-m68k-low.c: Include <asm/ptrace.h>
13322 (ps_get_thread_area): Implement.
13324 2010-05-03 Doug Evans <dje@google.com>
13326 * event-loop.c (struct callback_event): New struct.
13327 (callback_list): New global.
13328 (append_callback_event, delete_callback_event): New functions.
13329 (process_callback): New function.
13330 (start_event_loop): Call it.
13331 * remote-utils.c (NOT_SCHEDULED): Define.
13332 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13333 moved out of readchar.
13334 (readchar): Rewrite. Call reschedule before returning.
13335 (reset_readchar): New function.
13336 (remote_close): Call it.
13337 (process_remaining, reschedule): New functions.
13338 * server.h (callback_handler_func): New typedef.
13339 (append_callback_event, delete_callback_event): Declare.
13341 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13343 * proc-service.c (ps_pglobal_lookup): Use
13344 thread_db_look_up_one_symbol.
13345 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13346 parameter. Use it instead of all_symbols_looked_up.
13347 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13349 (all_symbols_looked_up): Don't declare.
13350 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13351 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13353 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13354 Set all_symbols_looked_up here.
13355 (thread_db_look_up_one_symbol): New.
13356 (thread_db_get_tls_address): Adjust.
13357 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13358 thread_db object on the heap, and tentatively set it in the
13360 (thread_db_init): Don't set all_symbols_looked_up here.
13361 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13363 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13365 * linux-low.c (linux_kill, linux_detach): Adjust.
13366 (status_pending_p_callback): Remove redundant statement. Check
13367 for !TARGET_WAITIKIND_IGNORE, instead of
13368 TARGET_WAITKIND_STOPPED.
13369 (handle_tracepoints): Make sure LWP is locked. Adjust.
13370 (linux_wait_for_event_1): Adjust.
13371 (linux_cancel_breakpoints): New.
13372 (unsuspend_one_lwp): New.
13373 (unsuspend_all_lwps): New.
13374 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13375 (send_sigstop_callback): Change return type to int, add new
13376 `except' parameter and handle it.
13377 (suspend_and_send_sigstop_callback): New.
13378 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13379 pass them down. If SUSPEND, also increment the lwp's suspend
13381 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13382 (need_step_over_p): Don't consider suspended LWPs.
13383 (start_step_over): Adjust.
13384 (proceed_one_lwp): Change return type to int, add new `except'
13385 parameter and handle it.
13386 (unsuspend_and_proceed_one_lwp): New.
13387 (proceed_all_lwps): Use find_inferior instead of
13389 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13390 also decrement the suspend count of LWPs. Pass `except' down,
13391 instead of hacking its suspend count.
13392 (linux_pause_all): Add `freeze' parameter. Adjust.
13393 (linux_unpause_all): New.
13394 (linux_target_ops): Install linux_unpause_all.
13395 * server.c (handle_status): Adjust.
13396 * target.h (struct target_ops): New fields `unpause_all' and
13397 `cancel_breakpoints'. Add new parameter to `pause_all'.
13398 (pause_all): Add new `freeze' parameter.
13399 (unpause_all): New.
13400 (cancel_breakpoints): New.
13401 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13402 cancel breakpoints.
13403 (cmd_qtstart): Pause threads.
13404 (stop_tracing): Pause threads, and cancel breakpoints.
13405 * win32-low.c (win32_target_ops): Adjust.
13407 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13409 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13410 the inferior right away from here...
13411 (linux_wait_1): ... to here, and adjust to check the thread's
13412 last_resume_kind instead of the lwp's step or stop_expected flags.
13414 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13416 * README: Use consistent `GDB' and `GDBserver' spellings.
13418 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13420 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13421 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13422 (linux_detach_one_lwp): Assume the lwp is stopped.
13423 (any_thread_of): Delete.
13424 (linux_detach): Stop all lwps here. Don't blindly delete all
13426 (delete_lwp_callback): New.
13427 (linux_mourn): Delete all lwps of the process that is gone.
13428 (linux_wait_1): Don't delete the last lwp of the process here.
13429 * mem-break.h (mark_breakpoints_out): Declare.
13430 * mem-break.c (mark_breakpoints_out): New.
13431 (free_all_breakpoints): Use it.
13432 * server.c (handle_target_event): If the process is gone, mark
13434 * thread-db.c (struct thread_db) <create_bp>: New field.
13435 (thread_db_enable_reporting): Fix prototype. Store a thread event
13436 breakpoint reference in the thread_db struct.
13437 (thread_db_load_search): Clear the thread_db object.
13438 (try_thread_db_load_1): Ditto.
13439 (switch_to_process): New.
13440 (disable_thread_event_reporting): Use it.
13441 (remove_thread_event_breakpoints): New.
13442 (thread_db_detach, thread_db_mourn): Use it.
13444 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13446 * linux-low.c (linux_enable_event_reporting): New.
13447 (linux_wait_for_event_1, handle_extended_wait): Use it.
13449 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13451 * linux-low.c (linux_kill_one_lwp, linux_kill)
13452 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13453 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13454 SIGSTOP even if the LWP is stopped.
13455 (send_sigstop_callback): New.
13456 (stop_all_lwps): Use send_sigstop_callback instead.
13457 (linux_resume_one_thread): Adjust.
13458 (proceed_one_lwp): Still proceed an LWP that the client has
13459 requested to stop, if we haven't reported it as stopped yet. Make
13460 sure that LWPs the client want stopped, have a pending SIGSTOP.
13462 2010-04-26 Doug Evans <dje@google.com>
13464 * server.c (handle_general_set): Make static.
13466 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13467 Print received char after testing for error/eof instead of before.
13468 (input_interrupt): Tweak comment.
13470 2010-04-23 Doug Evans <dje@google.com>
13472 * server.c (start_inferior): Print inferior argv if --debug.
13474 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13476 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13477 * nto-x86-low.c: Include server.h
13479 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13481 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13482 be consistent with other sources of this directory.
13483 (init_registers_amd64): Correct name of source file of this function
13486 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13488 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13489 64-bit executables.
13491 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13493 * win32-i386-low.c: Add 64-bit support.
13494 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13495 (init_registers_amd64): Declare.
13496 (mappings): Add 64-bit version of array.
13497 (init_windows_x86): New function.
13498 (the_low_target): Change init_arch field to init_windows_x86.
13500 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13502 * win32-low.c: Adapt to support also 64-bit architecture.
13503 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13504 (get_image_name): Use SIZE_T type for local variable `done'.
13505 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13506 (toolhelp_get_dll_name): Idem.
13507 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13508 Use uintptr_t typecast to avoid warning.
13509 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13510 (handle_exception): Use phex_nz to avoid warning.
13511 (win32_wait): Remove unused local variable `process'.
13513 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13515 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13518 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13520 * configure.ac: Use `ws2_32' library for srv_mingw.
13521 * configure: Regenerate.
13522 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13523 * remote-utils.c: Likewise.
13525 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13527 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13528 if __x86_64__ is defined.
13530 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13532 * configure: Regenerate.
13534 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13536 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13537 * target.h (target_ops): New get_tib_address field.
13538 * win32-low.h (win32_thread_info): Add thread_local_base field.
13539 * win32-low.c (child_add_thread): Add tlb argument.
13540 Set thread_local_base field to TLB.
13541 (get_child_debug_event): Adapt to child_add_thread change.
13542 (win32_get_tib_address): New function.
13543 (win32_target_ops): Set get_tib_address field to
13544 win32_get_tib_address.
13545 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13547 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13549 * linux-low.c (linux_mourn): Also remove the process.
13550 * server.c (handle_target_event): Don't remove the process here.
13551 * nto-low.c (nto_mourn): New.
13552 (nto_target_ops): Install it.
13553 * spu-low.c (spu_mourn): New.
13554 (spu_target_ops): Install it.
13555 * win32-low.c (win32_mourn): New.
13556 (win32_target_ops): Install it.
13558 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13560 * server.h (buffer_xml_printf): Remove redundant `;'.
13562 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13564 * regcache.c (set_register_cache): Invalidate regcaches before
13565 changing the register cache layout.
13566 (regcache_invalidate_one): Allow a NULL regcache.
13567 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13568 regcaches before changing the register cache layout or the target
13571 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13573 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13574 variable warning on Linux/x86-64.
13576 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13578 GDBserver disconnected tracing support.
13580 * linux-low.c (linux_remove_process): Delete.
13581 (add_lwp): Don't set last_resume_kind here.
13582 (linux_kill): Use `mourn'.
13583 (linux_detach): Use `thread_db_detach', and `mourn'.
13584 (linux_mourn): New.
13585 (linux_attach_lwp_1): Adjust comment.
13586 (linux_attach): last_resume_kind moved the thread_info; adjust.
13587 (status_pending_p_callback): Adjust.
13588 (linux_wait_for_event_1): Adjust.
13589 (count_events_callback, select_singlestep_lwp_callback)
13590 (select_event_lwp_callback, cancel_breakpoints_callback)
13591 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13592 (proceed_one_lwp): Adjust.
13593 (linux_async): Add debug output.
13594 (linux_thread_stopped): New.
13595 (linux_pause_all): New.
13596 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13598 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13599 (thread_db_free): Delete declaration.
13600 (thread_db_detach, thread_db_mourn): Declare.
13601 * thread-db.c (thread_db_init): Use thread_db_mourn.
13602 (thread_db_free): Delete, split in two.
13603 (disable_thread_event_reporting): New.
13604 (thread_db_detach): New.
13605 (thread_db_mourn): New.
13607 * server.h (struct thread_info) <last_resume_kind>: New field.
13608 <attached>: Add comment.
13609 <gdb_detached>: New field.
13610 (handler_func): Change return type to int.
13611 (handle_serial_event, handle_target_event): Ditto.
13612 (gdb_connected): Declare.
13614 (disconnected_tracing): Declare.
13615 (stop_tracing): Declare.
13617 * server.c (handle_query) <qSupported>: Report support for
13618 disconnected tracing.
13619 (queue_stop_reply_callback): Account for running threads.
13620 (gdb_wants_thread_stopped): New.
13621 (gdb_wants_all_threads_stopped): New.
13622 (gdb_reattached_process): New.
13623 (handle_status): Clear the `gdb_detached' flag of all processes.
13624 In all-stop, stop all threads.
13625 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13626 (process_serial_event): If the remote connection breaks, or if an
13627 exit was forced with "monitor exit", force an event loop exit.
13628 Handle disconnected tracing on detach.
13629 (handle_serial_event): Adjust.
13630 (handle_target_event): If GDB isn't connected, forward events back
13631 to the inferior, unless the last process exited, in which case,
13632 exit gdbserver. Adjust interface.
13634 * remote-utils.c (remote_open): Don't block in accept. Instead
13635 register an event loop source on the listen socket file
13636 descriptor. Refactor bits into ...
13637 (listen_desc): ... this new global.
13638 (gdb_connected): ... this new function.
13639 (enable_async_notification): ... this new function.
13640 (handle_accept_event): ... this new function.
13641 (remote_close): Clear remote_desc.
13643 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13645 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13647 (mourn_inferior): Define.
13648 (target_process_qsupported): Avoid the dangling else problem.
13649 (thread_stopped): Define.
13650 (pause_all): Define.
13651 (target_waitstatus_to_string): Declare.
13652 * target.c (target_waitstatus_to_string): New.
13654 * tracepoint.c (tracing): Make extern.
13655 (disconnected_tracing): New.
13656 (stop_tracing): Make extern. Handle tracing stops due to GDB
13658 (cmd_qtdisconnected): New.
13659 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13660 (handle_tracepoint_general_set): Handle QTDisconnected.
13662 * event-loop.c (event_handler_func): Change return type to int.
13663 (process_event): Bail out if the event handler wants the event
13665 (handle_file_event): Ditto.
13666 (start_event_loop): Bail out if the event handler wants the event
13669 * nto-low.c (nto_target_ops): Adjust.
13670 * spu-low.c (spu_wait): Don't remove the process here.
13671 (spu_target_ops): Adjust.
13672 * win32-low.c (win32_wait): Don't remove the process here.
13673 (win32_target_ops): Adjust.
13675 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13677 * regcache.c (realloc_register_cache): Invalidate inferior's
13678 regcache before recreating it.
13680 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13682 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13684 2010-04-09 Stan Shebs <stan@codesourcery.com>
13685 Pedro Alves <pedro@codesourcery.com>
13687 * server.h (LONGEST): New.
13688 (struct thread_info) <while_stepping>: New field.
13689 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13691 (initialize_tracepoint, handle_tracepoint_general_set)
13692 (handle_tracepoint_query, tracepoint_finished_step)
13693 (tracepoint_was_hit, release_while_stepping_state_list):
13694 (current_traceframe): Declare.
13695 * server.c (handle_general_set): Handle tracepoint packets.
13696 (read_memory): New.
13697 (write_memory): New.
13698 (handle_search_memory_1): Use read_memory.
13699 (handle_query): Report support for conditional tracepoints, trace
13700 state variables, and tracepoint sources. Handle tracepoint
13702 (main): Initialize the tracepoints module.
13703 (process_serial_event): Handle traceframe reads/writes.
13705 * linux-low.c (handle_tracepoints): New.
13706 (linux_wait_1): Call it.
13707 (linux_resume_one_lwp): Handle while-stepping.
13708 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13709 (linux_target_ops): Install them.
13710 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13712 * linux-x86-low.c (x86_supports_tracepoints): New.
13713 (the_low_target). Install it.
13715 * mem-break.h (delete_breakpoint): Declare.
13716 * mem-break.c (delete_breakpoint): Make external.
13718 * target.h (struct target_ops): Add `supports_tracepoints',
13719 `read_pc', and `write_pc' fields.
13720 (target_supports_tracepoints): Define.
13721 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13724 * regcache.h (struct regcache) <registers_owned>: New field.
13725 (init_register_cache, regcache_cpy): Declare.
13726 (regcache_read_pc, regcache_write_pc): Declare.
13727 (register_cache_size): Declare.
13728 (supply_regblock): Declare.
13729 * regcache.c (init_register_cache): New.
13730 (new_register_cache): Use it.
13731 (regcache_cpy): New.
13732 (register_cache_size): New.
13733 (supply_regblock): New.
13734 (regcache_read_pc, regcache_write_pc): New.
13736 * tracepoint.c: New.
13738 * Makefile.in (OBS): Add tracepoint.o.
13739 (tracepoint.o): New rule.
13741 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13743 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13745 (i386-mmx.c): Likewise.
13746 (i386-mmx-linux.o): Likewise.
13747 (i386-mmx-linux.c): Likewise.
13749 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13750 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13751 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13752 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13754 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13755 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13756 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13758 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13760 * Makefile.in (clean): Updated.
13762 (i386-avx.c): Likewise.
13763 (i386-avx-linux.o): Likewise.
13764 (i386-avx-linux.c): Likewise.
13765 (amd64-avx.o): Likewise.
13766 (amd64-avx.c): Likewise.
13767 (amd64-avx-linux.o): Likewise.
13768 (amd64-avx-linux.c): Likewise.
13770 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13771 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13772 (srv_amd64_regobj): Add amd64-avx.o.
13773 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13774 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13775 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13776 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13777 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13778 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13779 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13781 * i387-fp.c: Include "i386-xstate.h".
13783 (i387_cache_to_xsave): Likewise.
13784 (i387_xsave_to_cache): Likewise.
13785 (x86_xcr0): Likewise.
13787 * i387-fp.h (i387_cache_to_xsave): Likewise.
13788 (i387_xsave_to_cache): Likewise.
13789 (x86_xcr0): Likewise.
13791 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13792 * linux-crisv32-low.c (target_regsets): Likewise.
13793 * linux-m68k-low.c (target_regsets): Likewise.
13794 * linux-mips-low.c (target_regsets): Likewise.
13795 * linux-ppc-low.c (target_regsets): Likewise.
13796 * linux-s390-low.c (target_regsets): Likewise.
13797 * linux-sh-low.c (target_regsets): Likewise.
13798 * linux-sparc-low.c (target_regsets): Likewise.
13799 * linux-xtensa-low.c (target_regsets): Likewise.
13801 * linux-low.c: Include <sys/uio.h>.
13802 (regsets_fetch_inferior_registers): Support nt_type.
13803 (regsets_store_inferior_registers): Likewise.
13804 (linux_process_qsupported): New.
13805 (linux_target_ops): Add linux_process_qsupported.
13807 * linux-low.h (regset_info): Add nt_type.
13808 (linux_target_ops): Add process_qsupported.
13810 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13812 (init_registers_i386_avx_linux): New.
13813 (init_registers_amd64_avx_linux): Likewise.
13814 (xmltarget_i386_linux_no_xml): Likewise.
13815 (xmltarget_amd64_linux_no_xml): Likewise.
13816 (PTRACE_GETREGSET): Likewise.
13817 (PTRACE_SETREGSET): Likewise.
13818 (x86_fill_xstateregset): Likewise.
13819 (x86_store_xstateregset): Likewise.
13820 (use_xml): Likewise.
13821 (x86_linux_update_xmltarget): Likewise.
13822 (x86_linux_process_qsupported): Likewise.
13823 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13824 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13825 init_registers_i386_linux here. Call
13826 x86_linux_update_xmltarget.
13827 (the_low_target): Add x86_linux_process_qsupported.
13829 * server.c (handle_query): Call target_process_qsupported.
13831 * target.h (target_ops): Add process_qsupported.
13832 (target_process_qsupported): New.
13834 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13836 * inferiors.c (add_thread): Set last_status kind to
13837 TARGET_WAITKIND_IGNORE.
13838 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13839 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13840 (linux_wait_1): Move `thread' local definition to block that uses
13841 it. Don't NULL initialize `event_child'.
13842 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13843 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13844 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13846 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13848 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13849 an extended waitstatus, or by a watchpoint.
13850 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13851 thread was stepping or has been stopped by a watchpoint.
13853 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13855 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13856 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13857 of another, then delete the previous, and validate all
13859 (validate_inserted_breakpoint): New.
13860 (delete_disabled_breakpoints): New.
13861 (validate_breakpoints): New.
13862 (check_mem_read): Validate breakpoints before trusting their
13863 shadow. Delete disabled breakpoints.
13864 (check_mem_write): Validate breakpoints before trusting they
13865 should be inserted. Delete disabled breakpoints.
13866 * mem-break.h (validate_breakpoints):
13867 * server.c (handle_query): Validate breakpoints when we see a
13870 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13872 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13873 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13874 if we could tell there's a GDB breakpoint at stop_pc.
13875 (need_step_over_p): Don't do a step over if we find a GDB
13876 breakpoint at the resume PC.
13878 * mem-break.c (struct raw_breakpoint): New.
13879 (enum bkpt_type): New type `gdb_breakpoint'.
13880 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13881 fields. New field `raw'.
13882 (find_raw_breakpoint_at): New.
13883 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13884 breakpoint instead.
13885 (set_breakpoint_at): Adjust.
13886 (delete_raw_breakpoint): New.
13887 (release_breakpoint): New.
13888 (delete_breakpoint): Rename to...
13889 (delete_breakpoint_1): ... this. Add proc parameter. Use
13890 release_breakpoint. Return ENOENT.
13891 (delete_breakpoint): Reimplement.
13892 (find_breakpoint_at): Delete.
13893 (find_gdb_breakpoint_at): New.
13894 (delete_breakpoint_at): Delete.
13895 (set_gdb_breakpoint_at): New.
13896 (delete_gdb_breakpoint_at): New.
13897 (gdb_breakpoint_here): New.
13898 (set_reinsert_breakpoint): Use release_breakpoint.
13899 (uninsert_breakpoint): Rename to ...
13900 (uninsert_raw_breakpoint): ... this.
13901 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13902 (reinsert_raw_breakpoint): Change parameter type to
13904 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13906 (check_breakpoints): Adjust. Use release_breakpoint.
13907 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13908 (breakpoint_inserted_here): Ditto.
13909 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13910 Don't trust the breakpoint's shadow if it is not inserted.
13911 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13912 (delete_all_breakpoints): Adjust.
13913 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13914 use delete_breakpoint_1.
13916 * mem-break.h (breakpoints_supported): Delete declaration.
13917 (set_gdb_breakpoint_at): Declare.
13918 (gdb_breakpoint_here): Declare.
13919 (delete_breakpoint_at): Delete.
13920 (delete_gdb_breakpoint_at): Declare.
13922 * server.h (struct raw_breakpoint): Forward declare.
13923 (struct process_info): New field `raw_breakpoints'.
13925 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13928 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13930 * linux-low.c (status_pending_p_callback): Fix comment.
13931 (linux_wait_for_event_1): Move most of the internal breakpoint
13932 handling from here...
13933 (linux_wait_1): ... to here.
13934 (count_events_callback): New.
13935 (select_singlestep_lwp_callback): New.
13936 (select_event_lwp_callback): New.
13937 (cancel_breakpoints_callback): New.
13938 (select_event_lwp): New.
13939 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13940 priority to all LWPs that have had events that should be reported
13941 to the client. Cancel breakpoints when about to reporting the
13942 event to the client, not while stopping lwps. No longer cancel
13943 finished single-steps here.
13944 (cancel_finished_single_step): Delete.
13945 (cancel_finished_single_steps): Delete.
13947 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13949 * mem-break.c (enum bkpt_type): New.
13950 (struct breakpoint): New field `type'.
13951 (set_breakpoint_at): Change return type to struct breakpoint
13952 pointer. Set type to `other_breakpoint' by default.
13953 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13954 in the breakpoint list.
13955 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13956 (reinsert_breakpoint): Rename to ...
13957 (reinsert_raw_breakpoint): ... this.
13958 (reinsert_breakpoints_at): Adjust.
13959 * mem-break.h (struct breakpoint): Declare.
13960 (set_breakpoint_at): Change return type to struct breakpoint
13963 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13965 * server.c (handle_query): Assign, not compare.
13967 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13969 Teach linux gdbserver to step-over-breakpoints.
13971 * linux-low.c (can_hardware_single_step): New.
13972 (supports_breakpoints): New.
13973 (handle_extended_wait): If stopping threads, read the stop pc of
13974 the new cloned LWP.
13976 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13977 low target doesn't support retrieving the PC.
13978 (add_lwp): Set last_resume_kind to resume_continue.
13979 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13980 (linux_attach): Don't clear stop_expected. Set the lwp's
13981 last_resume_kind to resume_stop.
13982 (linux_detach_one_lwp): Don't check for removed breakpoints.
13983 (check_removed_breakpoint): Delete.
13984 (status_pending_p): Rename to ...
13985 (status_pending_p_callback): ... this. Don't check for removed
13986 breakpoints. Don't consider threads that are stopped from GDB's
13988 (linux_wait_for_lwp): Always read the stop_pc here.
13989 (cancel_breakpoint): New.
13990 (step_over_bkpt): New global.
13991 (linux_wait_for_event_1): Implement stepping over breakpoints.
13992 (gdb_wants_lwp_stopped): New.
13993 (gdb_wants_all_stopped): New.
13994 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13995 single-step traps here. Store the thread's last reported target
13997 (send_sigstop): Don't clear stop_expected. Always set it,
13999 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
14000 (cancel_finished_single_step): New.
14001 (cancel_finished_single_steps): New.
14002 (wait_for_sigstop): Don't cancel finished single-step traps here.
14003 (linux_resume_one_lwp): Don't check for removed breakpoints.
14004 Don't set `step' on non-hardware step archs.
14005 (linux_set_resume_request): Ignore resume_stop requests if already
14006 stopping or stopped. Set the lwp's last_resume_kind.
14007 (resume_status_pending_p): Don't check for removed breakpoints.
14008 (need_step_over_p): New.
14009 (start_step_over): New.
14010 (finish_step_over): New.
14011 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14012 requests. Clear the thread's last reported target waitstatus.
14013 Don't use the `suspended' flag. Don't consider pending breakpoints.
14014 (linux_resume): Start a step-over if necessary.
14015 (proceed_one_lwp): New.
14016 (proceed_all_lwps): New.
14017 (unstop_all_lwps): New.
14018 * linux-low.h (struct lwp_info): Rewrite comment for the
14019 `suspended' flag. Add the `stop_pc' field. Delete the
14020 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14021 Add `'last_resume_kind' and `need_step_over' fields.
14022 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14023 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14024 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14025 (set_raw_breakpoint_at): New.
14026 (set_breakpoint_at): Rewrite to use it.
14027 (reinsert_breakpoint_handler): Delete.
14028 (set_reinsert_breakpoint): New.
14029 (reinsert_breakpoint_by_bp): Delete.
14030 (delete_reinsert_breakpoints): New.
14031 (uninsert_breakpoint): Rewrite.
14032 (uninsert_breakpoints_at): New.
14033 (reinsert_breakpoint): Rewrite.
14034 (reinsert_breakpoints_at): New.
14035 (check_breakpoints): Rewrite.
14036 (breakpoint_here): New.
14037 (breakpoint_inserted_here): New.
14038 (check_mem_read): Adjust.
14039 * mem-break.h (breakpoints_supported, breakpoint_here)
14040 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14041 (reinsert_breakpoint_by_bp): Delete declaration.
14042 (delete_reinsert_breakpoints): Declare.
14043 (reinsert_breakpoint): Delete declaration.
14044 (reinsert_breakpoints_at): Declare.
14045 (uninsert_breakpoint): Delete declaration.
14046 (uninsert_breakpoints_at): Declare.
14047 (check_breakpoints): Adjust prototype.
14048 * server.h: Adjust include order.
14049 (struct thread_info): Declare here. Add a `last_status' field.
14051 2010-03-23 Michael Snyder <msnyder@vmware.com>
14053 * server.c (crc32): New function.
14054 (handle_query): Add handling for 'qCRC:' request.
14056 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14058 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14059 lwp had been stopped by a watchpoint.
14061 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14063 * server.h (internal_error): Declare.
14064 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14065 * utils.c (internal_error): New function.
14067 2010-03-15 Andreas Schwab <schwab@redhat.com>
14069 * configure.srv: Fix typo setting srv_regobj.
14071 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14073 * linux-low.c (fetch_register): Avoid passing a non string literal
14075 (usr_store_inferior_registers): Ditto.
14077 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14079 * linux-low.c (linux_write_memory): Bail out early if peeking
14082 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14084 * linux-low.h (struct lwp_info): New fields
14085 `stopped_by_watchpoint' and `stopped_data_address'.
14086 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14087 here, and cache them in the lwp object.
14088 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14090 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14092 (linux_stopped_by_watchpoint): Rewrite.
14093 (linux_stopped_data_address): Rewrite.
14095 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14097 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14098 switching the current inferior, not before.
14100 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14102 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14103 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14104 i386-linux.c and amd64-linux.c.
14105 (reg-i386.o): Removed.
14106 (reg-i386.c): Likewise.
14107 (reg-i386-linux.o): Likewise.
14108 (reg-i386-linux.c): Likewise.
14109 (reg-x86-64.o): Likewise.
14110 (reg-x86-64.c): Likewise.
14111 (reg-x86-64-linux.o): Likewise.
14112 (reg-x86-64-linux.c): Likewise.
14114 (i386.c): Likewise.
14115 (i386-linux.o): Likewise.
14116 (i386-linux.c): Likewise.
14117 (amd64.o): Likewise.
14118 (amd64.c): Likewise.
14119 (amd64-linux.o): Likewise.
14120 (amd64-linux.c): Likewise.
14122 * configure.srv (srv_i386_regobj): New.
14123 (srv_i386_linux_regobj): Likewise.
14124 (srv_amd64_regobj): Likewise.
14125 (srv_amd64_linux_regobj): Likewise.
14126 (srv_i386_32bit_xmlfiles): Likewise.
14127 (srv_i386_64bit_xmlfiles): Likewise.
14128 (srv_i386_xmlfiles): Likewise.
14129 (srv_amd64_xmlfiles): Likewise.
14130 (srv_i386_linux_xmlfiles): Likewise.
14131 (srv_amd64_linux_xmlfiles): Likewise.
14132 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14133 srv_xmlfiles to $srv_i386_xmlfiles.
14134 (i[34567]86-*-mingw32ce*): Likewise.
14135 (i[34567]86-*-mingw*): Likewise.
14136 (i[34567]86-*-nto*): Likewise.
14137 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14138 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14139 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14140 (x86_64-*-linux*): Likewise.
14142 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14143 (init_registers_amd64_linux): New.
14144 (x86_arch_setup): Replace init_registers_x86_64_linux with
14145 init_registers_amd64_linux.
14147 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14149 * configure.ac: Check for libdl. If it is not available link against
14150 static libthread_db.
14151 * configure: Regenerate.
14153 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14157 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14158 handing a read watchpoint.
14159 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14161 2010-02-12 Doug Evans <dje@google.com>
14163 * linux-low.c (linux_supports_tracefork_flag): Document.
14164 (linux_look_up_symbols): Add comment.
14166 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14168 * regcache.c (supply_register): Clear regcache if buf is NULL.
14170 2010-02-02 Nicolas Roche <roche@sourceware.org>
14171 Joel Brobecker <brobecker@adacore.com>
14173 * inferiors.c (find_inferior): Add function documentation.
14174 (unloaded_dll): Handle the case where the unloaded dll has not
14175 been previously registered in the dll list.
14177 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14179 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14180 (thumb2_breakpoint): New.
14181 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14183 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14185 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14186 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14189 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14191 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14193 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14195 * linux-s390-low.c (s390_collect_ptrace_register)
14196 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14198 2010-01-21 Doug Evans <dje@google.com>
14200 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14201 (PTRACE_ARG4_TYPE): New macro.
14202 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14203 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14204 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14205 (usr_store_inferior_registers): Ditto.
14206 (linux_read_memory, linux_write_memory): Ditto.
14207 (linux_test_for_tracefork): Ditto.
14209 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14210 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14212 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14214 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14217 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14219 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14220 prototype to take a regcache. Adjust.
14222 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14224 * regcache.h (struct thread_info): Forward declare.
14225 (struct regcache): New.
14226 (new_register_cache): Adjust prototype.
14227 (get_thread_regcache): Declare.
14228 (free_register_cache): Adjust prototype.
14229 (registers_to_string, registers_from_string): Ditto.
14230 (supply_register, supply_register_by_name, collect_register)
14231 (collect_register_as_string, collect_register_by_name): Ditto.
14232 * regcache.c (struct inferior_regcache_data): Delete.
14233 (get_regcache): Rename to ...
14234 (get_thread_regcache): ... this. Adjust. Switch inferior before
14235 fetching registers.
14236 (regcache_invalidate_one): Adjust.
14237 (regcache_invalidate): Fix prototype.
14238 (new_register_cache): Return the new register cache.
14239 (free_register_cache): Change prototype.
14240 (realloc_register_cache): Adjust.
14241 (registers_to_string): Change prototype to take a regcache. Adjust.
14242 (registers_from_string): Ditto.
14243 (register_data): Ditto.
14244 (supply_register): Ditto.
14245 (supply_register_by_name): Ditto.
14246 (collect_register): Ditto.
14247 (collect_register_as_string): Ditto.
14248 (collect_register_by_name): Ditto.
14249 * server.c (process_serial_event): Adjust.
14250 * linux-low.h (regset_fill_func, regset_store_func): Change
14252 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14254 * linux-low.c (get_stop_pc): Adjust.
14255 (check_removed_breakpoint): Adjust.
14256 (linux_wait_for_event): Adjust.
14257 (linux_resume_one_lwp): Adjust.
14258 (fetch_register): Add regcache parameter. Adjust.
14259 (usr_store_inferior_registers): Ditto.
14260 (regsets_fetch_inferior_registers): Ditto.
14261 (regsets_store_inferior_registers): Ditto.
14262 (linux_fetch_registers, linux_store_registers): Ditto.
14263 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14265 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14267 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14268 prototype to take a regcache.
14269 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14270 * remote-utils.c (convert_ascii_to_int, outreg)
14271 (prepare_resume_reply): Change prototype to take a regcache.
14273 * target.h (struct target_ops) <fetch_registers, store_registers>:
14274 Change prototype to take a regcache.
14275 (fetch_inferior_registers, store_inferior_registers): Change
14276 prototype to take a regcache. Adjust.
14277 * proc-service.c (ps_lgetregs): Adjust.
14278 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14279 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14280 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14281 take a regcache. Adjust.
14282 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14283 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14284 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14285 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14286 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14287 (cris_cannot_fetch_register):
14288 (cris_breakpoint_at): Change prototype to take a regcache.
14290 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14291 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14292 to take a regcache. Adjust.
14293 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14295 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14296 take a regcache. Adjust.
14297 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14298 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14299 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14300 * linux-mips-low.c (mips_get_pc):
14301 (mips_set_pc): Change prototype to take a regcache. Adjust.
14302 (mips_reinsert_addr): Adjust.
14303 (mips_collect_register): Change prototype to take a regcache.
14305 (mips_supply_register):
14306 (mips_collect_register_32bit, mips_supply_register_32bit)
14307 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14308 (mips_store_fpregset): Ditto.
14309 * linux-ppc-low.c (ppc_supply_ptrace_register)
14310 (ppc_supply_ptrace_register): Ditto.
14311 (parse_spufs_run): Adjust.
14312 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14313 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14314 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14315 take a regcache. Adjust.
14316 * linux-s390-low.c (s390_collect_ptrace_register)
14317 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14318 (s390_set_pc): Change prototype to take a regcache. Adjust.
14319 (s390_arch_setup): Adjust.
14320 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14321 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14322 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14323 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14324 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14326 (sparc_breakpoint_at): Adjust.
14327 * linux-xtensa-low.c (xtensa_fill_gregset):
14328 (xtensa_store_gregset):
14329 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14330 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14331 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14332 prototype to take a regcache. Adjust.
14333 * win32-arm-low.c (arm_fetch_inferior_register)
14334 (arm_store_inferior_register): Change prototype to take a
14336 * win32-i386-low.c (i386_fetch_inferior_register)
14337 (i386_store_inferior_register): Change prototype to take a
14339 * win32-low.c (child_fetch_inferior_registers)
14340 (child_store_inferior_registers): Change prototype to take a
14342 (win32_wait): Adjust.
14343 (win32_fetch_inferior_registers): Change prototype to take a
14345 (win32_store_inferior_registers): Adjust.
14346 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14347 store_inferior_register>: Change prototype to take a regcache.
14349 2010-01-20 Doug Evans <dje@google.com>
14351 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14353 (linux_wait_for_event1, linux_init_signals): Ditto.
14354 (W_STOPCODE): Provide definition if missing.
14356 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14358 * linux-low.c (linux_core_of_thread): New.
14359 (compare_ints, show_process, list_threads): New.
14360 (linux_qxfer_osdata): Report threads and cores.
14361 (linux_target_op): Register linux_core_of_thread.
14362 * remote-utils.c (prepare_resume_reply): Report the core.
14363 (buffer_xml_printf): Support %d specifier.
14364 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14366 (handle_query): Handle qXfer:threads. Announce availability
14368 * target.h (struct target_ops): New field core_of_thread.
14370 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14372 * Makefile.in (clean): Remove new generated files.
14373 (reg-s390.o, reg-s390.c): Remove rules.
14374 (reg-s390x.o, reg-s390x.c): Likewise.
14375 (s390-linux32.o, s390-linux32.c): Add rules.
14376 (s390-linux64.o, s390-linux64.c): Likewise.
14377 (s390x-linux64.o, s390x-linux64.c): Likewise.
14378 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14379 * linux-s390-low.c: Include <elf.h>.
14380 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14381 (init_registers_s390): Remove prototype.
14382 (init_registers_s390x): Likewise.
14383 (init_registers_s390_linux32): Add prototype.
14384 (init_registers_s390_linux64): Likewise.
14385 (init_registers_s390x_linux64): Likewise.
14386 (s390_num_regs_3264): New define.
14387 (s390_regmap_3264): New global variable.
14388 (s390_cannot_fetch_register): Remove obsolete check.
14389 (s390_cannot_store_register): Likewise.
14390 (s390_collect_ptrace_register): Handle upper/lower register halves.
14391 (s390_supply_ptrace_register): Likewise.
14392 (s390_fill_gregset): Update to register number changes.
14393 (s390_get_hwcap): New routine.
14394 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14395 Install appropriate regmap and register set.
14397 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14399 * server.c (gdbserver_version): Update copyright year to 2010.
14400 * gdbreplay.c (gdbreplay_version): Likewise.
14402 2009-12-28 Doug Evans <dje@google.com>
14404 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14405 elf/external.h. Include <elf.h> instead but only if necessary.
14407 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14409 * linux-low.c (linux_remove_process): Remove `detaching'
14410 parameter. Don't release/detach from thread_db here.
14411 (linux_kill): Release/detach from thread_db here, ...
14412 (linux_detach): ... and here, before actually detaching.
14413 (linux_wait_1): ... and here, when a process exits.
14414 * thread-db.c (any_thread_of): New.
14415 (thread_db_free): Switch the current inferior to a thread of the
14418 2009-12-21 Doug Evans <dje@google.com>
14420 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14422 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14423 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14424 warning ifndef __NR_tkill. Move setting of errno there too.
14425 Delete unnecessary resetting of errno after syscall.
14426 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14428 * configure.ac: Check for dladdr.
14429 * config.in: Regenerate.
14430 * configure: Regenerate.
14431 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14432 (try_thread_db_load): Update.
14434 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14436 2009-12-18 Doug Evans <dje@google.com>
14438 * event-loop.c: Include unistd.h if it exists.
14440 * linux-low.c (my_waitpid): Move definition away from being in
14441 between linux_tracefork_child/linux_test_for_tracefork.
14443 * gdb_proc_service.h (psaddr_t): Fix type.
14444 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14445 signature to match glibc.
14447 2009-12-16 Doug Evans <dje@google.com>
14449 * linux-low.c (linux_read_memory): Fix argument to read.
14451 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14453 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14454 events, don't leave current_inferior pointing at null.
14456 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14458 * win32-low.c (LOG): Delete.
14459 (OUTMSG): Output to stderr.
14460 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14461 on compile time LOG macro.
14462 (win32_wait): Fix debug output.
14464 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14466 * win32-low.c (win32_add_one_solib): If the dll name is
14467 "ntdll.dll", prepend the system directory to the dll path.
14469 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14471 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14473 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14474 Vladimir Prus <vladimir@codesourcery.com>
14476 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14477 * configure.ac: Check for __mcoldfire__ and set
14478 gdb_cv_m68k_is_coldfire.
14479 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14480 reg-cf.o and reg-m68k.o.
14481 * configure: Regenerated.
14483 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14485 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14486 Pass it to thread_db_free.
14487 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14488 proper `detaching' argument to linux_remove_process.
14489 * linux-low.h (thread_db_free): Add `detaching' parameter.
14490 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14492 (thread_db_free): Add `detaching' parameter. Only
14493 call td_ta_clear_event if detaching from process.
14495 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14497 * thread-db.c (thread_db_free): Fix typo.
14499 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14502 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14504 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14506 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14507 with an i686 compiler.
14508 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14510 * configure: Rebuilt.
14512 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14516 * server.c (handle_search_memory_1): Correct read_addr initialization
14517 in loop for searching subsequent chunks.
14519 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14521 * configure.ac: New --with-libthread-db option.
14522 * thread-db.c: Allow direct dependence on libthread_db.
14523 (thread_db_free): Adjust.
14524 * config.in: Regenerate.
14525 * configure: Likewise.
14527 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14530 * thread-db.c (attach_thread): New function.
14531 (maybe_attach_thread): Return success/failure.
14532 (find_new_threads_callback): Adjust.
14533 (thread_db_find_new_threads): Loop until no new threads.
14535 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14537 * proc-service.c (ps_lgetregs): Formatting.
14539 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14541 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14542 * configure.ac: Adjust.
14543 * linux-low.h (struct process_info_private): Move members to struct
14545 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14546 * linux-low.c (linux_remove_process): Adjust.
14547 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14548 * server.c (handle_query): Move code ...
14549 (handle_monitor_command): ... here. New function.
14550 * target.h (struct target_ops): New member.
14551 * thread-db.c (struct thread_db): New.
14552 (libthread_db_search_path): New variable.
14553 (thread_db_create_event, thread_db_enable_reporting)
14554 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14555 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14556 (try_thread_db_load_1, dladdr_to_soname): New functions.
14557 (try_thread_db_load, thread_db_load_search): New functions.
14558 (thread_db_init): Search for libthread_db.
14559 (thread_db_free): New function.
14560 (thread_db_handle_monitor_command): Likewise.
14561 * config.in: Regenerate.
14562 * configure: Regenerate.
14564 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14566 * spu-low.c (spu_kill): Wait for inferior to terminate.
14567 Call clear_inferiors.
14568 (spu_detach): Call clear_inferiors.
14570 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14572 * aclocal.m4: Regenerate.
14573 * config.in: Likewise.
14574 * configure: Likewise.
14576 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14578 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14579 (parse_spufs_run): New function.
14580 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14581 (ppc_breakpoint_at): Handle SPU breakpoints.
14583 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14585 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14586 (SPUFS_MAGIC): Define.
14587 (spu_enumerate_spu_ids): New function.
14588 (linux_qxfer_spu): New function.
14589 (linux_target_ops): Install linux_qxfer_spu.
14591 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14593 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14594 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14595 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14596 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14597 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14598 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14599 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14600 (init_registers_powerpc_cell32l): Add prototype.
14601 (init_registers_powerpc_cell64l): Likewise.
14602 (ppc_arch_setup): Detect Cell/B.E. architecture.
14604 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14606 * Makefile.in (datarootdir): New variable.
14608 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14610 * linux-low.c (linux_write_memory): Update debugging output.
14611 * Makefile.in (clean): Add new descriptions.
14612 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14613 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14614 * configure.srv: Add new files for arm*-*-linux*.
14615 * linux-arm-low.c: Add new declarations.
14616 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14617 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14618 (HWCAP_VFPv3D16): New.
14619 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14620 instead of __IWMMXT__.
14621 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14622 (arm_arch_setup): New.
14623 (target_regsets): Remove #ifdef. Add VFP regset.
14624 (the_low_target): Use arm_arch_setup.
14626 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14628 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14629 the main thread again.
14631 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14633 Adding Neutrino gdbserver.
14634 * configure: Regenerated.
14635 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14636 * configure.srv (i[34567]86-*-nto*): New target.
14637 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14638 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14639 (nto_comctrl) [__QNX__]: New function.
14640 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14642 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14644 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14647 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14648 Pedro Alves <pedro@codesourcery.com>
14650 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14651 don't support CONTEXT_EXTENDED_REGISTERS.
14652 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14653 (the_low_target): Install them.
14654 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14655 failing with ERROR_PIPE_NOT_CONNECTED.
14657 2009-06-30 Doug Evans <dje@google.com>
14658 Pierre Muller <muller@ics.u-strasbg.fr>
14660 Add h/w watchpoint support to x86-linux, win32-i386.
14661 * Makefile.in (SFILES): Add i386-low.c
14662 (i386_low_h): Define.
14663 (i386-low.o): Add dependencies.
14664 (linux-x86-low.o): Add i386-low.h dependency.
14665 (win32-i386-low.o): Ditto.
14666 * i386-low.c: New file.
14667 * i386-low.h: New file.
14668 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14669 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14670 * linux-low.c (linux_add_process): Initialize arch_private.
14671 (linux_remove_process): Free arch_private.
14672 (add_lwp): Initialize arch_private.
14673 (delete_lwp): Free arch_private.
14674 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14676 * linux-low.h (process_info_private): New member arch_private.
14677 (lwp_info): New member arch_private.
14678 (linux_target_ops): New members new_process, new_thread,
14680 (ptid_of): New macro.
14681 * linux-x86-low.c: Include stddef.h, i386-low.h.
14682 (arch_process_info): New struct.
14683 (arch_lwp_info): New struct.
14684 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14685 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14686 (i386_dr_low_get_status): New function.
14687 (x86_insert_point, x86_remove_point): New functions.
14688 (x86_stopped_by_watchpoint): New function.
14689 (x86_stopped_data_address): New function.
14690 (x86_linux_new_process, x86_linux_new_thread): New functions.
14691 (x86_linux_prepare_to_resume): New function.
14692 (the_low_target): Add entries for insert_point, remove_point,
14693 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14695 * server.c (debug_hw_points): New global.
14696 (monitor_show_help): Document set debug-hw-points.
14697 (handle_query): Process "set debug-hw-points".
14698 * server.h (debug_hw_points): Declare.
14699 (paddress): Declare.
14700 * utils.c (NUMCELLS, CELLSIZE): New macros.
14701 (get_sell, xsnprintf, paddress): New functions.
14702 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14703 remove_point, stopped_by_watchpoint, stopped_data_address.
14704 * win32-i386-low.c: Include i386-low.h.
14705 (debug_reg_state): Replaces dr.
14706 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14707 (i386_dr_low_get_status): New function.
14708 (i386_insert_point, i386_remove_point): New functions.
14709 (i386_stopped_by_watchpoint): New function.
14710 (i386_stopped_data_address): New function.
14711 (i386_initial_stuff): Update.
14712 (get_thread_context,set_thread_context,i386_thread_added): Update.
14713 (the_low_target): Add entries for insert_point,
14714 remove_point, stopped_by_watchpoint, stopped_data_address.
14715 * win32-low.c (win32_insert_watchpoint): New function.
14716 (win32_remove_watchpoint): New function.
14717 (win32_stopped_by_watchpoint): New function.
14718 (win32_stopped_data_address): New function.
14719 (win32_target_ops): Add entries for insert_watchpoint,
14720 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14721 * win32-low.h (win32_target_ops): New members insert_point,
14722 remove_point, stopped_by_watchpoint, stopped_data_address.
14724 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14726 * server.c (process_serial_event): Re-return unsupported, not
14727 error, if the type isn't recognized. Re-allow supporting only
14728 insert or remove packets. Also call require_running for
14729 breakpoints. Add missing break statement to default case. Tidy.
14730 * target.h (struct target_ops): Rename insert_watchpoint to
14731 insert_point, and remove_watchpoint to remove_point.
14733 * linux-low.h (struct linux_target_ops): Likewise.
14734 * linux-low.c (linux_insert_watchpoint): Rename to ...
14735 (linux_insert_point): ... this. Adjust.
14736 (linux_remove_watchpoint): Rename to ...
14737 (linux_remove_point): ... this. Adjust.
14738 (linux_target_ops): Adjust.
14739 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14740 (cris_insert_point): ... this.
14741 (cris_remove_watchpoint): Rename to ...
14742 (cris_remove_point): ... this.
14743 (the_low_target): Adjust.
14745 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14747 * server.c (handle_v_kill): Pass signal_pid to
14748 kill_inferior if multi_process is zero.
14750 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14752 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14753 * target.h (target_ops): Comment for *_watchpoint to make it clear
14754 the functions can get types '0' and '1'.
14756 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14758 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14759 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14760 * regcache.c (get_regcache): Likewise.
14761 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14762 * win32-low.c (child_fetch_inferior_registers): Remove check for
14765 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14766 Pedro Alves <pedro@codesourcery.com>
14768 * target.h (struct target_ops) <supports_multi_process>: New
14770 (target_supports_multi_process): New.
14771 * server.c (handle_query): Even if GDB reports support, only
14772 enable multi-process if the target also supports it. Report
14773 multi-process support only if the target backend supports it.
14774 * linux-low.c (linux_supports_multi_process): New function.
14775 (linux_target_ops): Install it as target_supports_multi_process
14778 2009-05-24 Doug Evans <dje@google.com>
14780 Global renaming of find_thread_pid to find_thread_ptid.
14781 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14782 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14783 All callers updated.
14785 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14786 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14789 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14790 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14791 (linux_resume_one_lwp): Ditto.
14793 2009-05-23 Doug Evans <dje@google.com>
14795 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14796 from struct inferior_list_entry * to struct lwp_info *.
14797 All callers updated.
14799 2009-05-13 Doug Evans <dje@google.com>
14801 * linux-x86-low.c: Don't include assert.h.
14802 (x86_siginfo_fixup): Use fatal, not assert.
14803 (x86_arch_setup): Fix comment.
14805 2009-05-12 Doug Evans <dje@google.com>
14807 Biarch support for i386/amd64 gdbserver.
14808 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14809 Add linux-x86-low.c.
14810 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14811 (linux-x86-low.o): Add.
14812 * linux-x86-64-low.c: Delete.
14813 * linux-i386-low.c: Delete.
14814 * linux-x86-low.c: New file.
14815 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14817 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14819 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14820 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14821 (linux_child_pid_to_exec_file): New function.
14822 (elf_64_header_p, elf_64_file_p): New functions.
14823 (siginfo_fixup): New function.
14824 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14825 give target a chance to convert layout.
14826 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14827 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14829 2009-05-07 Doug Evans <dje@google.com>
14831 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14832 (regsets_store_inferior_registers): Ditto.
14834 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14838 * linux-low.c (must_set_ptrace_flags): Delete.
14839 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14841 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14842 `lwp->must_set_ptrace_flags' instead.
14843 (linux_wait_for_event_1): Set ptrace options here.
14844 (linux_wait_1): ... not here.
14846 2009-04-30 Doug Evans <dje@google.com>
14848 * inferiors.c (started_inferior_callback): New function.
14849 (attached_inferior_callback): New function.
14850 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14851 * server.c (print_started_pid, print_attached_pid): New functions.
14852 (detach_or_kill_for_exit): New function.
14853 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14854 * server.h (have_started_inferiors_p): Declare.
14855 (have_attached_inferiors_p): Declare.
14857 * inferiors.c (remove_process): Fix memory leak, free process.
14858 * linux-low.c (linux_remove_process): New function.
14859 (linux_kill): Call it instead of remove_process.
14860 (linux_detach, linux_wait_1): Ditto.
14862 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14864 * configure.srv: Add x86 Windows CE target.
14866 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14868 * inferiors.c (get_thread_process): Make global.
14869 * server.h (get_thread_process): Add prototype.
14870 * thread-db.c (find_one_thread): Use get_thread_process
14871 instead of current_process.
14872 (thread_db_get_tls_address): Do not crash if called when
14873 thread layer is not yet initialized.
14875 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14877 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14878 * spu-low.c (current_tid): Rename to ...
14879 (current_ptid): ... this.
14880 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14881 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14882 ptid_get_lwp (current_ptid) instead of current_tid.
14883 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14884 instead of current_tid. Use find_process_pid to verify pid
14885 argument is valid. Pass proper argument to remove_process.
14886 (spu_thread_alive): Compare current_ptid instead of current_tid.
14887 (spu_resume): Likewise.
14889 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14891 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14894 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14896 Implement the multiprocess extensions, and add linux multiprocess
14899 * server.h (ULONGEST): Declare.
14900 (struct ptid, ptid_t): New.
14901 (minus_one_ptid, null_ptid): Declare.
14902 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14903 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14904 (struct inferior_list_entry): Change `id' type from unsigned from
14906 (struct sym_cache, struct breakpoint, struct
14907 process_info_private): Forward declare.
14908 (struct process_info): Declare.
14909 (current_process): Declare.
14910 (all_processes): Declare.
14911 (initialize_inferiors): Declare.
14912 (add_thread): Adjust to use ptid_t.
14913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14914 (add_process, remove_process, find_thread_pid): Declare.
14915 (find_inferior_id): Adjust to use ptid_t.
14916 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14917 (multi_process): Declare.
14918 (push_event): Adjust to use ptid_t.
14919 (read_ptid, write_ptid): Declare.
14920 (prepare_resume_reply): Adjust to use ptid_t.
14921 (clear_symbol_cache): Declare.
14922 * inferiors.c (all_processes): New.
14923 (null_ptid, minus_one_ptid): New.
14924 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14925 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14926 (add_thread): Change unsigned long to ptid. Remove gdb_id
14928 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14929 (gdb_id_to_thread): Rename to ...
14930 (find_thread_pid): ... this. Change unsigned long to ptid.
14931 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14932 (loaded_dll, pull_pid_from_list): Adjust.
14933 (add_process, remove_process, find_process_pid)
14934 (get_thread_process, current_process, initialize_inferiors): New.
14935 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14936 (struct target_waitstatus) <related_pid>: Ditto.
14937 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14938 return type to int.
14939 (struct target_ops) <join>: Add `pid' argument.
14940 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14941 (struct target_ops) <wait>: Add `ptid' field. Change return type
14943 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14944 (mywait): Add `ptid' argument. Change return type to ptid_t.
14945 (target_pid_to_str): Declare.
14946 * target.c (set_desired_inferior): Adjust to use ptids.
14947 (mywait): Add new `ptid' argument. Adjust.
14948 (target_pid_to_str): New.
14949 * mem-break.h (free_all_breakpoints): Declare.
14950 * mem-break.c (breakpoints): Delelete.
14951 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14952 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14953 to use per-process breakpoint list.
14954 (free_all_breakpoints): New.
14955 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14956 (symbol_cache, all_symbols_looked_up): Delete.
14958 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14960 (prepare_resume_reply): Change ptid argument's type from unsigned
14961 long to ptid_t. Adjust. Implement W;process and X;process.
14962 (free_sym_cache, clear_symbol_cache): New.
14963 (look_up_one_symbol): Adjust to per-process symbol cache. *
14964 * server.c (cont_thread, general_thread, step_thread): Change type
14966 (attached): Delete.
14967 (multi_process): New.
14968 (last_ptid): Change type to ptid_t.
14969 (struct vstop_notif) <ptid>: Change type to ptid_t.
14970 (queue_stop_reply, push_event): Change `ptid' argument's type to
14972 (discard_queued_stop_replies): Add `pid' argument.
14973 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14974 changes. Don't reference the `attached' global.
14975 (attach_inferior): Adjust to mywait interface changes.
14976 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14977 features. Handle and report "multiprocess+". Handle
14979 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14981 (handle_v_kill): New.
14982 (handle_v_stopped): Adjust to use target_pid_to_str.
14983 (handle_v_requests): Allow multiple attaches and runs when
14984 multiprocess extensions are in effect. Handle "vKill".
14985 (myresume): Adjust to use ptids.
14986 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14987 (handle_status): Adjust to discard_queued_stop_replies interface
14989 (first_thread_of, kill_inferior_callback)
14990 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14991 (main): Call initialize_inferiors. Adjust to use ptids, killing
14992 and detaching from all inferiors. Handle multiprocess packet
14994 * linux-low.h: Include gdb_proc_service.h.
14995 (struct process_info_private): New.
14996 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14997 <lwpid_of>: Use ptid_get_lwp.
14998 (get_lwp_thread): Adjust.
14999 (struct lwp_info): Add `dead' member.
15000 (find_lwp_pid): Declare.
15001 * linux-low.c (thread_db_active): Delete.
15002 (new_inferior): Adjust comment.
15003 (inferior_pid): Delete.
15004 (linux_add_process): New.
15005 (handle_extended_wait): Adjust.
15006 (add_lwp): Change unsigned long to ptid.
15007 (linux_create_inferior): Add process to processes table. Adjust
15008 to use ptids. Don't set new_inferior here.
15009 (linux_attach_lwp): Rename to ...
15010 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15011 it. Adjust to use ptids.
15012 (linux_attach_lwp): New.
15013 (linux_attach): Add process to processes table. Don't set
15015 (struct counter): New.
15016 (second_thread_of_pid_p, last_thread_of_process_p): New.
15017 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15018 multiple processes.
15019 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15020 processes. Remove process from process table.
15021 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15022 to multiple processes.
15023 (any_thread_of): New.
15024 (linux_detach): Add `pid' argument, and handle it. Remove process
15025 from processes table.
15026 (linux_join): Add `pid' argument. Handle it.
15027 (linux_thread_alive): Change unsighed long argument to ptid_t.
15028 Consider dead lwps as not being alive.
15029 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15030 threads we're not interested in.
15031 (same_lwp, find_lwp_pid): New.
15032 (linux_wait_for_lwp): Change `pid' argument's type from int to
15034 (linux_wait_for_event): Rename to ...
15035 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15036 from int to ptid_t. Adjust.
15037 (linux_wait_for_event): New.
15038 (linux_wait_1): Add `ptid' argument. Change return type to
15039 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15040 that exit from the process table.
15041 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15043 (mark_lwp_dead): New.
15044 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15045 stopping all threads, mark its main lwp as dead.
15046 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15048 (fetch_register, usr_store_inferior_registers)
15049 (regsets_fetch_inferior_registers)
15050 (regsets_store_inferior_registers, linux_read_memory)
15051 (linux_write_memory): Inline `inferior_pid'.
15052 (linux_look_up_symbols): Adjust to use per-process
15053 `thread_db_active'.
15054 (linux_request_interrupt): Adjust to use ptids.
15055 (linux_read_auxv): Inline `inferior_pid'.
15056 (initialize_low): Don't reference thread_db_active.
15057 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15058 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15059 (ps_getpid): Return the pid of the current inferior.
15060 * thread-db.c (proc_handle, thread_agent): Delete.
15061 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15063 (find_one_thread): Change argument type to ptid_t. Adjust to
15065 (maybe_attach_thread): Adjust to per-process data and ptids.
15066 (thread_db_find_new_threads): Ditto.
15067 (thread_db_init): Ditto.
15068 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15069 processes table. Adjust to use ptids.
15070 (spu_kill, spu_detach): Adjust interface. Remove process from
15072 (spu_join, spu_thread_alive): Adjust interface.
15073 (spu_wait): Adjust interface. Remove process from processes
15074 table. Adjust to use ptids.
15075 * win32-low.c (current_inferior_tid): Delete.
15076 (current_inferior_ptid): New.
15077 (debug_event_ptid): New.
15078 (thread_rec): Take a ptid. Adjust.
15079 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15080 (child_delete_thread): Ditto.
15081 (do_initial_child_stuff): Add `attached' argument. Add process to
15083 (child_fetch_inferior_registers, child_store_inferior_registers):
15085 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15086 (win32_attach): Pass 1 to do_initial_child_stuff.
15087 (win32_kill): Adjust interface. Remove process from processes
15089 (win32_detach): Ditto.
15090 (win32_join): Adjust interface.
15091 (win32_thread_alive): Take a ptid.
15092 (win32_resume): Adjust to use ptids.
15093 (get_child_debug_event): Ditto.
15094 (win32_wait): Adjust interface. Remove exiting process from
15097 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15099 Non-stop mode support.
15101 * server.h (non_stop): Declare.
15102 (gdb_client_data, handler_func): Declare.
15103 (delete_file_handler, add_file_handler, start_event_loop):
15105 (handle_serial_event, handle_target_event, push_event)
15106 (putpkt_notif): Declare.
15107 * target.h (enum resume_kind): New.
15108 (struct thread_resume): Replace `step' field by `kind' field.
15109 (TARGET_WNOHANG): Define.
15110 (struct target_ops) <wait>: Add `options' argument.
15111 <supports_non_stop, async, start_non_stop>: New fields.
15112 (target_supports_non_stop, target_async): New.
15113 (start_non_stop): Declare.
15114 (mywait): Add `options' argument.
15115 * target.c (mywait): Add `options' argument. Print child exit
15116 notifications here.
15117 (start_non_stop): New.
15118 * server.c (non_stop, own_buf, mem_buf): New globals.
15119 (struct vstop_notif): New.
15120 (notif_queue): New global.
15121 (queue_stop_reply, push_event, discard_queued_stop_replies)
15122 (send_next_stop_reply): New.
15123 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15125 (attach_inferior): In non-stop mode, don't wait for the target
15127 (handle_general_set): Handle QNonStop.
15128 (handle_query): When handling qC, return the current general
15129 thread, instead of the first thread of the list.
15130 (handle_query): If the backend supports non-stop mode, include
15131 QNonStop+ in the qSupported query response.
15132 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15134 (handle_v_attach, handle_v_run): Handle non-stop mode.
15135 (handle_v_stopped): New.
15136 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15137 (myresume): Adjust to use resume_kind. Handle non-stop.
15138 (queue_stop_reply_callback): New.
15139 (handle_status): Handle non-stop mode.
15140 (main): Clear non_stop flag on reconnection. Use the event-loop.
15141 Refactor serial protocol handling from here ...
15142 (process_serial_event): ... to this new function. When GDB
15143 selects any thread, select one here. In non-stop mode, wait until
15144 GDB acks all pending events before exiting.
15145 (handle_serial_event, handle_target_event): New.
15146 * remote-utils.c (remote_open): Install remote_desc in the event
15148 (remote_close): Remove remote_desc from the event loop.
15149 (putpkt_binary): Rename to...
15150 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15151 (putpkt_binary): New as wrapper around putpkt_binary_1.
15152 (putpkt_notif): New.
15153 (prepare_resume_reply): In non-stop mode, don't change the
15155 * event-loop.c: New.
15156 * Makefile.in (OBJ): Add event-loop.o.
15157 (event-loop.o): New rule.
15159 * linux-low.h (pid_of): Moved here.
15161 (get_lwp_thread): Use lwpid_of.
15162 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15163 * linux-low.c (pid_of): Delete.
15164 (inferior_pid): Use lwpid_of.
15165 (linux_event_pipe): New.
15166 (target_is_async_p): New.
15168 (handle_extended_wait): Use lwpid_of.
15169 (add_lwp): Don't set lwpid field.
15170 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15171 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15172 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15173 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15174 first. Adjust to linux_wait_for_event interface changes. Use
15176 (linux_detach): Don't delete the main lwp here.
15177 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15178 (status_pending_p): Don't consider explicitly suspended lwps.
15179 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15180 pointer. Add OPTIONS argument. Change return type to int. Use
15181 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15182 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15183 pointer. Add status pointer argument. Return a pid instead of a
15184 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15185 changes. In non-stop mode, don't switch to a random thread.
15186 (linux_wait): Rename to...
15187 (linux_wait_1): ... this. Add target_options argument, and handle
15188 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15189 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15190 clean exit and signal exit code. Don't stop all threads in
15191 non-stop mode. In all-stop mode, only stop all threads when
15192 reporting a stop to GDB. Handle explicit thread stop requests.
15193 (async_file_flush, async_file_mark): New.
15195 (send_sigstop): Use lwpid_of.
15196 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15197 interface changes. In non-stop mode, don't switch to a random
15199 (linux_resume_one_lwp): Use lwpid_of.
15200 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15201 (linux_resume_one_thread): ... this. Handle resume_stop. In
15202 non-stop mode, don't look for pending flag in all threads.
15203 (resume_status_pending_p): Don't consider explicitly suspended
15205 (my_waitpid): Reimplement. Emulate __WALL.
15206 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15208 (sigchld_handler, linux_supports_non_stop, linux_async)
15209 (linux_start_non_stop): New.
15210 (linux_target_ops): Register linux_supports_non_stop, linux_async
15211 and linux_start_non_stop.
15212 (initialize_low): Install SIGCHLD handler.
15213 * thread-db.c (thread_db_create_event, find_one_thread)
15214 (thread_db_get_tls_address): Use lwpid_of.
15215 * win32-low.c (win32_detach): Adjust to use resume_kind.
15216 (win32_wait): Add `options' argument.
15217 * spu-low.c (spu_resume): Adjust to use resume_kind.
15218 (spu_wait): Add `options' argument.
15220 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15222 Decouple target code from remote protocol.
15224 * target.h (enum target_waitkind): New.
15225 (struct target_waitstatus): New.
15226 (struct target_ops) <wait>: Return an unsigned long. Take a
15227 target_waitstatus pointer instead of a char pointer.
15228 (mywait): Likewise.
15229 * target.c (mywait): Change prototype to return an unsigned long.
15230 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15231 * server.h (thread_from_wait, old_thread_from_wait): Delete
15233 (prepare_resume_reply): Change prototype to take a
15235 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15236 (last_status, last_ptid): New.
15237 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15238 pid instead of a signal.
15239 (attach_inferior): Remove "status" and "signal" parameters.
15241 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15243 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15244 (handle_v_requests, myresume): Remove "status" and "signal"
15245 parameters. Adjust.
15246 (handle_status): New.
15247 (main): Delete local `status'. Adjust.
15248 * remote-utils.c: Include target.h.
15249 (prepare_resume_reply): Change prototype to take a
15250 target_waitstatus. Adjust.
15252 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15254 * spu-low.c (spu_wait): Adjust.
15255 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15257 (win32_wait): Adjust.
15259 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15261 * target.h (struct thread_resume): Delete leave_stopped member.
15262 (struct target_ops): Add a `n' argument to the `resume' callback.
15263 * server.c (start_inferior): Adjust.
15264 (handle_v_cont, myresume): Adjust.
15265 * linux-low.c (check_removed_breakpoint): Adjust to resume
15266 interface change, and to removed leave_stopped field.
15267 (resume_ptr): Delete.
15268 (struct thread_resume_array): New.
15269 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15270 resume interface change.
15271 (linux_continue_one_thread, linux_queue_one_thread)
15272 (resume_status_pending_p): Check if the resume field is NULL
15273 instead of checking the leave_stopped member.
15274 (linux_resume): Adjust to the target resume interface change.
15275 * spu-low.c (spu_resume): Adjust to the target resume interface
15277 * win32-low.c (win32_detach, win32_resume): Ditto.
15279 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15281 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15283 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15285 (linux_continue_one_thread): Only preserve the stepping flag if
15286 there's a pending breakpoint.
15288 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15290 * server.c (main): After the inferior having exited, call
15291 remote_close before exiting gdbserver.
15293 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15295 Fix size of FPSCR in Power 7 processors.
15296 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15297 (PPC_FEATURE_HAS_DFP): New #define.
15298 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15301 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15303 * server.c (handle_query) Whitespace and formatting.
15305 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15307 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15308 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15309 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15310 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15311 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15312 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15313 Makefile.in, configure.ac: Fix whitespace throughout.
15314 * configure: Regenerate.
15316 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15318 * inferiors.c (find_inferior): Make it safe for the callback
15319 function to delete the currently iterated inferior.
15321 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15323 * Makefile.in (linuw_low_h): Move higher.
15324 (thread-db.o): Depend on $(linux_low_h).
15326 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15328 Rename "process" to "lwp" throughout.
15330 * linux-low.c (all_processes): Rename to...
15331 (all_lwps): ... this.
15332 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15333 (add_process): Rename to ...
15334 (add_lwp): ... this. Adjust.
15335 (linux_create_inferior): Adjust.
15336 (linux_attach_lwp): Adjust.
15337 (linux_attach): Adjust.
15338 (linux_kill_one_process): Rename to ...
15339 (linux_kill_one_lwp): ... this. Adjust.
15340 (linux_kill): Adjust.
15341 (linux_detach_one_process): Rename to ...
15342 (linux_detach_one_lwp): ... this. Adjust.
15343 (linux_detach): Adjust.
15344 (check_removed_breakpoint): Adjust.
15345 (status_pending_p): Adjust.
15346 (linux_wait_for_process): Rename to ...
15347 (linux_wait_for_lwp): ... this. Adjust.
15348 (linux_wait_for_event): Adjust.
15349 (send_sigstop): Adjust.
15350 (wait_for_sigstop): Adjust.
15351 (stop_all_processes): Rename to ...
15352 (stop_all_lwps): ... this.
15353 (linux_resume_one_process): Rename to ...
15354 (linux_resume_one_lwp): ... this. Adjust.
15355 (linux_set_resume_request, linux_continue_one_thread)
15356 (linux_queue_one_thread, resume_status_pending_p)
15357 (usr_store_inferior_registers, regsets_store_inferior_registers)
15358 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15360 * linux-low.h (get_process): Rename to ...
15361 (get_lwp): ... this. Adjust.
15362 (get_thread_process): Rename to ...
15363 (get_thread_lwp): ... this. Adjust.
15364 (get_process_thread): Rename to ...
15365 (get_lwp_thread): ... this. Adjust.
15366 (struct process_info): Rename to ...
15367 (struct lwp_info): ... this.
15368 (all_processes): Rename to ...
15369 (all_lwps): ... this.
15370 * proc-service.c (ps_lgetregs): Adjust.
15371 * thread-db.c (thread_db_create_event, find_one_thread)
15372 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15374 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15376 * server.c (handle_query): Handle "qAttached".
15378 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15380 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15381 GPLv3, update license URL.
15383 2009-03-01 Doug Evans <dje@google.com>
15385 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15386 (server_h): Add gdb_signals.h.
15387 (signals.o): Update.
15388 * server.h (target_signal_from_host,target_signal_to_host_p)
15389 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15391 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15393 * remote-utils.c (getpkt): Also generate remote-debug
15394 information if noack_mode is set.
15396 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15398 * server.c (handle_query): Report qXfer:siginfo:read and
15399 qXfer:siginfo:write as supported and handle them.
15400 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15401 * linux-low.c (linux_xfer_siginfo): New.
15402 (linux_target_ops): Set it.
15404 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15406 * server.c (gdbserver_usage): Mention --remote-debug.
15407 (main): Accept '--remote-debug' switch.
15409 2009-01-18 Doug Evans <dje@google.com>
15411 * regcache.c (new_register_cache): No need to check result of xcalloc.
15412 * server.c (handle_search_memory): Back out calls to xmalloc,
15413 result is checked and error is returned to user upon failure.
15414 (handle_query): Ditto. Add more checks for result of malloc.
15415 (handle_v_cont): Check result of malloc, report error back to
15417 (handle_v_run): Ditto. Call freeargv.
15418 * server.h (freeargv): Declare.
15419 * utils.c (freeargv): New fn.
15421 2009-01-15 Doug Evans <dje@google.com>
15423 * gdbreplay.c (perror_with_name): Make arg const char *.
15424 * server.h (target_signal_to_name): Make return type const char *.
15425 * thread-db.c (thread_db_err_str): Make return type const char *.
15426 * utils.c (perror_with_name): Make arg const char *.
15428 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15430 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15431 when handling a EXIT_PROCESS_DEBUG_EVENT.
15433 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15435 * gdbreplay.c (gdbreplay_version): Update copyright year.
15436 * server.c (gdbserver_version): Likewise.
15438 2009-01-05 Doug Evans <dje@google.com>
15440 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15441 (handle_extended_wait): Improve comment.
15443 2008-12-13 Doug Evans <dje@google.com>
15445 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15446 * server.h (ATTR_MALLOC): New macro.
15447 (xmalloc,xcalloc,xstrdup): Declare.
15448 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15449 * inferiors.c: Ditto.
15450 * linux-low.c: Ditto.
15451 * mem-break.c: Ditto.
15452 * regcache.c: Ditto.
15453 * remote-utils.c: Ditto.
15456 * win32-low.c: Ditto.
15458 2008-12-12 Doug Evans <dje@google.com>
15460 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15461 in debugging printf.
15463 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15465 2008-12-09 Doug Evans <dje@google.com>
15467 * linux-low.h (struct process_info): Delete member tid, unused.
15468 * thread-db.c (find_one_thread): Update.
15469 (maybe_attach_thread): Update.
15471 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15473 * target.h (struct target_ops): Add qxfer_osdata member.
15474 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15476 (linux_qxfer_osdata): New functions.
15477 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15479 * server.c (handle_query): Handle "qXfer:osdata:read:".
15480 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15481 (buffer_xml_printf): New functions.
15482 * server.h (struct buffer): New.
15483 (buffer_grow_str, buffer_grow_str0): New macros.
15484 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15485 (buffer_xml_printf): Declare.
15487 2008-11-24 Doug Evans <dje@google.com>
15489 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15491 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15493 * server.c (handle_v_run): Always use the supplied argument list.
15495 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15497 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15498 (xtensa_regmap_table): Add entry for scompare1.
15500 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15502 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15503 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15504 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15505 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15506 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15507 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15508 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15509 XML target descriptions.
15510 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15511 when inferior is running on an ISA 2.05 or later processor. Add
15512 special case to return offset for full 64-bit slot of FPSCR when
15515 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15517 * Makefile.in (SFILES, clean): Added sparc64 files.
15518 (reg-sparc64.o, reg-sparc64.c): New.
15519 * configure.srv (sparc*-*-linux*): New configuration.
15520 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15521 syscall arguments for SPARC.
15522 (regsets_store_inferior_registers): Likewise.
15523 * linux-sparc-low.c: New file.
15525 2008-10-21 Doug Evans <dje@google.com>
15527 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15528 (READLINE_DIR,READLINE_DEP): Delete.
15529 (INTERNAL_CFLAGS): Update.
15530 (LINTFLAGS): Update.
15532 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15534 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15535 whole argv from the last run, not just argv[0].
15537 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15539 * regcache.c (new_register_cache): Return NULL if the register
15540 cache size isn't known yet.
15541 (free_register_cache): Avoid dereferencing a NULL regcache.
15543 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15545 * configure.srv: Merge MIPS and MIPS64.
15547 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15549 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15551 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15553 * Makefile.in: Add required vsx dependencies.
15555 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15556 Declare init_registers_powerpc_vsx32l.
15557 Declare init_registers_powerpc_vsx64l.
15558 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15559 (ppc_arch_setup): Check for VSX in hwcap.
15560 (ppc_fill_vsxregset): New function.
15561 (ppc_store_vsxregset): New function.
15562 Add new VSX entry in regset_info target_regsets.
15564 * configure.srv: Add new VSX dependencies.
15566 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15568 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15569 (remote_open): Set or clear transport_is_reliable.
15570 (putpkt_binary): Don't expect acks in noack mode.
15571 (getpkt): Don't send ack/nac in noack mode.
15572 * server.c (handle_general_set): Handle QStartNoAckMode.
15573 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15575 (main): Reset noack_mode on every connection.
15576 * server.h (noack_mode): Declare.
15578 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15580 * Makefile.in (GDBREPLAY_OBS): New variable.
15581 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15583 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15584 Daniel Jacobowitz <dan@codesourcery.com>
15586 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15587 (usr_store_inferior_registers): Likewise.
15588 (regsets_store_inferior_registers): Likewise.
15590 2008-07-31 Rolf Jansen <rj@surtec.com>
15591 Pedro Alves <pedro@codesourcery.com>
15593 * configure.ac: Check for memmem declaration.
15594 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15595 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15596 (disable_packet_qfThreadInfo): Unconditionally compile.
15597 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15598 * configure, config.in: Regenerate.
15600 2008-07-28 Doug Kwan <dougkwan@google.com>
15602 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15603 (linux_write_memory): Remove declaration of errno.
15605 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15607 * linux-low.c (handle_extended_wait): Do not use "status"
15608 variable uninitialized.
15610 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15612 * server.c (handle_v_attach): Inhibit reporting dll changes.
15614 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15616 * remote-utils.c (prepare_resume_reply): If requested, don't
15617 output "thread:TID" in the T stop reply.
15619 * server.c (disable_packet_vCont, disable_packet_Tthread)
15620 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15621 (handle_query): If requested, disable support for qC, qfThreadInfo
15623 (handle_v_requests): If requested, disable support for vCont.
15624 (gdbserver_show_disableable): New.
15625 (main): Handle --disable-packet and --disable-packet=LIST.
15627 * server.h (disable_packet_vCont, disable_packet_Tthread)
15628 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15630 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15632 * server.c (gdbserver_usage): Mention --version.
15634 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15636 * Makefile.in (gdbreplay.o): New rule.
15638 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15640 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15641 message, not gdbserver.
15643 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15644 Nathan Sidwell <nathan@codesourcery.com>
15645 Joseph Myers <joseph@codesourcery.com>
15647 * acinclude.m4: Include ../../config/acx.m4.
15648 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15649 * configure, config.in: Regenerate.
15650 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15651 * server.c (gdbserver_version): Print PKGVERSION.
15652 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15653 (main): Adjust gdbserver_usage calls.
15654 * gdbreplay.c (version, host_name): Add declarations.
15655 (gdbreplay_version, gdbreplay_usage): New.
15656 (main): Accept --version and --help options.
15658 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15660 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15661 (arm_breakpoint_at): Handle Thumb.
15662 (the_low_target): Add comment.
15664 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15666 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15668 2008-05-09 Doug Evans <dje@google.com>
15670 * server.h (decode_search_memory_packet): Declare.
15671 * remote-utils.c (decode_search_memory_packet): New fn.
15672 * server.c (handle_search_memory_1): New fn.
15673 (handle_search_memory): New fn.
15674 (handle_query): Process qSearch:memory packets.
15676 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15678 * regcache.c (registers_length): Remove.
15679 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15680 full register packet.
15681 * regcache.h (registers_length): Remove prototype.
15682 * server.h (PBUFSIZ): Define to 16384.
15684 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15686 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15687 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15688 powerpc-64l.o, and powerpc-altivec64l.o.
15689 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15690 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15691 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15692 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15693 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15696 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15697 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15698 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15699 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15700 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15701 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15702 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15703 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15704 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15705 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15708 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15709 (init_registers_powerpc_32l): ... this new prototype.
15710 (init_registers_powerpc_32): Remove, replace by ...
15711 (init_registers_powerpc_altivec32l): ... this new prototype.
15712 (init_registers_powerpc_e500): Remove, replace by ...
15713 (init_registers_powerpc_e500l): ... this new prototype.
15714 (init_registers_ppc64): Remove, replace by ...
15715 (init_registers_powerpc_64l): ... this new prototype.
15716 (init_registers_powerpc_64): Remove, replace by ...
15717 (init_registers_powerpc_altivec64l): ... this new prototype.
15718 (ppc_num_regs): Set to 73.
15719 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15720 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15721 (ppc_cannot_store_register): Handle orig_r3 and trap.
15722 (ppc_arch_setup): Update init_registers_... calls.
15723 (ppc_fill_gregset): Handle orig_r3 and trap.
15725 * inferiors.c (clear_inferiors): Reset current_inferior.
15727 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15729 * acinclude.m4: Add override.m4.
15730 * configure: Regenerate.
15732 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15734 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15735 initial call to init_register_ppc64.
15737 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15739 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15740 single powerpc*-*-linux* case.
15741 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15743 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15745 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15746 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15748 * linux-ppc-low.c: Include <elf.h>.
15749 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15750 (ppc_hwcap): New global variable.
15751 (ppc_regmap): Remove __SPE__ #ifdef sections.
15752 (ppc_regmap_e500): New global variable.
15753 (ppc_cannot_store_register): Update __SPE__ special case.
15754 (ppc_get_hwcap): New function.
15755 (ppc_arch_setup): Use it to determine whether inferior supports
15756 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15757 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15758 Do not access registers if target does not support AltiVec.
15759 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15760 Do not access registers if target does not support SPE.
15761 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15763 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15765 * linux-low.c (disabled_regsets, num_regsets): New.
15766 (use_regsets_p): Delete.
15767 (linux_wait_for_process): Clear disabled_regsets.
15768 (regsets_fetch_inferior_registers): Check and set it.
15769 (regsets_store_inferior_registers): Likewise.
15770 (linux_fetch_registers, linux_store_registers): Do not use
15772 (initialize_low): Allocate disabled_regsets.
15774 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15776 * Makefile.in (LIBOBJS): New.
15777 (OBS): Use LIBOBJS.
15778 (memmem.o): New rule.
15779 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15780 * configure: Regenerated.
15782 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15784 * server.c (handle_query): Never return "unsupported" for
15785 qXfer:features:read queries.
15787 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15789 * server.c (get_features_xml): Fix inverted condition.
15790 (handle_query): Always support qXfer:feature:read.
15792 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15794 * server.c (wrapper_argv): New.
15795 (start_inferior): Handle wrapper_argv. If set, expect an extra
15797 (gdbserver_usage): Document --wrapper.
15798 (main): Parse --wrapper.
15800 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15802 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15803 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15804 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15805 (ppc_set_pc): Likewise.
15806 (ppc_arch_setup): New function.
15807 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15808 of collect_register.
15809 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15811 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15813 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15814 instead of linux-ppc64-low.o.
15815 * linux-ppc64-low.c: Remove file.
15816 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15817 (linux-ppc64-low.o): Remove rule.
15819 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15820 (init_registers_powerpc_64): Likewise.
15821 (ppc_regmap): Conditionally define depending on __powerpc64__.
15822 (ppc_cannot_store_register): Do not special-case "fpscr" when
15823 compiled on __powerpc64__.
15824 (ppc_collect_ptrace_register): New function.
15825 (ppc_supply_ptrace_register): New function.
15826 (ppc_breakpoint): Change type to "unsigned int".
15827 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15828 (the_low_target): Conditionally provide initializers for the
15829 arch_setup member depending on __powerpc64__. Install
15830 collect_ptrace_register and supply_ptrace_register members.
15832 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15834 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15835 * server.c (gdbserver_xmltarget): Define.
15836 (get_features_xml): Use it to replace "target.xml" and arch_string.
15838 * configure.srv: Remove srv_xmltarget. Add XML files that were
15839 mentioned there to srv_xmlfiles instead. Remove conditional tests
15840 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15841 srv_xmlfiles and srv_regobj to include all possible choices.
15842 * configure.ac (srv_xmltarget): Remove.
15843 (srv_xmlfiles): Do not add "target.xml".
15844 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15845 checks for supplementary target information.
15846 * configure: Regenerate.
15847 * Makefile.in (XML_TARGET): Remove.
15848 (target.xml): Remove rule.
15849 (clean): Do not clean up target.xml.
15850 (.PRECIOUS): Do not mention target.xml.
15852 * target.h (struct target_ops): Remove arch_string member.
15853 * linux-low.c (linux_arch_string): Remove.
15854 (linux_target_ops): Remove arch_string initializer.
15855 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15856 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15857 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15858 * spu-low.c (spu_arch_string): Remove.
15859 (spu_target_ops): Remove arch_string initializer.
15860 * win32-low.c (win32_arch_string): Remove.
15861 (win32_target_ops): Remove arch_string initializer.
15862 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15863 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15864 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15866 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15868 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15869 by collect_ptrace_register and supply_ptrace_register hooks.
15870 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15871 instead of checking for the_low_target.left_pad_xfer.
15872 (usr_store_inferior_registers): Use collect_ptrace_register callback
15873 instead of checking for the_low_target.left_pad_xfer.
15875 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15876 (s390_supply_ptrace_register): Likewise.
15877 (s390_fill_gregset): Call s390_collect_ptrace_register.
15878 (the_low_target): Update.
15880 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15881 (ppc_supply_ptrace_register): Likewise.
15882 (the_low_target): Update.
15884 * linux-i386-low.c (the_low_target): Update.
15885 * linux-x86-64-low.c (the_low_target): Update.
15887 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15889 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15890 reg-s390.o and reg-s390x.o.
15892 * linux-low.c (new_inferior): New global variable.
15893 (linux_create_inferior, linux_attach): Set it.
15894 (linux_wait_for_process): Call the_low_target.arch_setup after the
15895 target has stopped for the first time.
15896 (initialize_low): Do not call the_low_target.arch_setup.
15898 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15899 (s390_set_pc): Likewise.
15900 (s390_arch_setup): New function.
15901 (the_low_target): Use s390_arch_setup as arch_setup routine.
15903 * regcache.c (realloc_register_cache): New function.
15904 (set_register_cache): Call it for each existing regcache.
15906 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15908 * server.h (init_registers): Remove prototype.
15910 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15911 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15912 instead of init_registers ().
15913 * linux-arm-low.c (init_registers_arm): Add prototype.
15914 (init_registers_arm_with_iwmmxt): Likewise.
15915 (the_low_target): Add initializer for arch_setup field.
15916 * linux-cris-low.c (init_registers_cris): Add prototype.
15917 (the_low_target): Add initializer for arch_setup field.
15918 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15919 (the_low_target): Add initializer for arch_setup field.
15920 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15921 (the_low_target): Add initializer for arch_setup field.
15922 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15923 (the_low_target): Add initializer for arch_setup field.
15924 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15925 (the_low_target): Add initializer for arch_setup field.
15926 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15927 (the_low_target): Add initializer for arch_setup field.
15928 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15929 (init_registers_mips64_linux): Likewise.
15930 (the_low_target): Add initializer for arch_setup field.
15931 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15932 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15933 (the_low_target): Add initializer for arch_setup field.
15934 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15935 (init_registers_powerpc_64): Likewise.
15936 (the_low_target): Add initializer for arch_setup field.
15937 * linux-s390-low.c (init_registers_s390): Add prototype.
15938 (init_registers_s390x): Likewise.
15939 (the_low_target): Add initializer for arch_setup field.
15940 * linux-sh-low.c (init_registers_sh): Add prototype.
15941 (the_low_target): Add initializer for arch_setup field.
15942 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15943 (the_low_target): Add initializer for arch_setup field.
15944 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15945 (the_low_target): Add initializer for arch_setup field.
15947 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15948 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15949 instead of init_registers ().
15950 * win32-arm-low.c (init_registers_arm): Add prototype.
15951 (the_low_target): Add initializer for arch_setup field.
15952 * win32-i386-low.c (init_registers_i386): Add prototype.
15953 (the_low_target): Add initializer for arch_setup field.
15955 * spu-low.c (init_registers_spu): Add prototype.
15956 (initialize_low): Call initialie_registers_spu () instead of
15957 initialize_registers ().
15959 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15961 * server.c (handle_v_requests): When handling the vRun and vAttach
15962 packets, if already debugging a process, don't kill it. Return an
15965 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15967 * server.c (handle_query): Correct length check.
15969 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15971 * win32-low.c (do_initial_child_stuff): Add process handle
15972 parameter. Set current_process_handle and current_process_id from the
15973 parameters. Clear globals.
15974 (win32_create_inferior): Don't set current_process_handle and
15975 current_process_id here. Instead pass them on the call to
15976 do_initial_child_stuff.
15977 (win32_attach): Likewise.
15978 (win32_clear_inferiors): New.
15979 (win32_kill): Don't close the current process handle or the
15980 current thread handle here. Instead call win32_clear_inferiors.
15981 (win32_detach): Don't open a new handle to the process. Call
15982 win32_clear_inferiors.
15983 (win32_join): Don't rely on current_process_handle; open a new
15984 handle using the process id.
15985 (win32_wait): Call win32_clear_inferiors when the inferior process
15988 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15990 * server.c (monitor_show_help): Add "exit".
15992 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15994 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15995 (clean): Add reg-xtensa.c.
15996 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15997 * configure.srv (xtensa*-*-linux*) New target.
15998 * linux-xtensa-low.c: New.
15999 * xtensa-xtregs.c: New.
16001 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
16003 * hostio.c: Don't include errno.h.
16004 (errno_to_fileio_errno): Move to hostio-errno.
16005 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16006 error number outputting to the target->hostio_last_error callback.
16007 (hostio_packet_error): Use FILEIO_EINVAL directly.
16008 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16009 calls to hostio_error.
16010 * hostio-errno.c: New.
16011 * server.h (hostio_last_error_from_errno): Declare.
16012 * target.h (target_ops): Add hostio_last_error member.
16013 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16014 as hostio_last_error handler.
16015 * spu-low.c (spu_target_ops): Likewise.
16016 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16017 (wince_hostio_last_error): New functions.
16018 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16019 as hostio_last_error handler.
16020 (win32_target_ops) [!_WIN32_WCE]: Register
16021 hostio_last_error_from_errno as hostio_last_error handler.
16022 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16023 (hostio-errno.o): New rule.
16024 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16025 * configure.srv (srv_hostio_err_objs): New variable. Default to
16027 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16028 * configure: Regenerate.
16030 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16032 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16033 (linux_kill, linux_detach): Clean up the process list.
16034 * remote-utils.c (remote_open): Improve port number parsing.
16035 (putpkt_binary, input_interrupt): Only send interrupts if the target
16037 * server.c (extended_protocol): Make static.
16038 (attached): Define earlier.
16039 (exit_requested, response_needed, program_argv): New variables.
16040 (target_running): New.
16041 (start_inferior): Clear attached here.
16042 (attach_inferior): Set attached here.
16043 (require_running): Define.
16044 (handle_query): Use require_running and target_running. Implement
16046 (handle_v_attach, handle_v_run): New.
16047 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16048 (gdbserver_usage): Update.
16049 (main): Redo argument parsing. Handle --debug and --multi. Handle
16050 --attach along with other options or after the port. Save
16051 program_argv. Support no initial program. Resynchronize
16052 communication with GDB after an error. Handle "monitor exit".
16053 Use require_running and target_running. Always allow the extended
16054 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16055 restart in extended mode.
16056 * README: Refer to the GDB manual. Update --attach usage.
16058 2007-12-20 Andreas Schwab <schwab@suse.de>
16060 * linux-low.c (STACK_SIZE): Define.
16061 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16062 (linux_test_for_tracefork): Likewise.
16064 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16066 * linux-low.c (linux_wait_for_event): Update messages. Do not
16067 reinsert auto-delete breakpoints.
16068 * mem-break.c (struct breakpoint): Change return type of handler to
16070 (set_breakpoint_at): Update handler type.
16071 (reinsert_breakpoint_handler): Return 1 instead of calling
16073 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16075 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16076 * mem-break.h (set_breakpoint_at): Update handler type.
16077 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16078 * win32-low.c (auto_delete_breakpoint): New.
16079 (get_child_debug_event): Use it.
16081 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16083 * configure.ac: Check for pread and pwrite.
16084 * hostio.c (handle_pread): Fall back to lseek and read.
16085 (handle_pwrite): Fall back to lseek and write.
16086 * config.in, configure: Regenerated.
16088 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16090 * server.c (myresume): Add own_buf argument.
16091 (main): Update calls.
16093 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16095 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16096 * remote-utils.c (remote_open): Do not call disable_async_io.
16097 (block_async_io): Delete.
16098 (unblock_async_io): Make static.
16099 (initialize_async_io): New.
16100 * server.c (handle_v_cont): Handle async I/O here.
16101 (myresume): Likewise. Move other common resume tasks here...
16102 (main): ... from here. Call initialize_async_io. Disable async
16103 I/O before the main loop.
16104 * server.h (initialize_async_io): Declare.
16105 (block_async_io, unblock_async_io): Delete prototypes.
16106 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16108 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16110 * remote-utils.c (readchar): Allow binary data in received messages.
16112 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16114 * win32-low.c (attaching): New global.
16115 (win32_create_inferior): Clear the `attaching' global.
16116 (win32_attach): Set the `attaching' global.
16117 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16118 attaching. Only set a breakpoint at the entry point if not
16121 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16123 * server.c (main): Don't report dll events on the initial
16124 connection on attaches.
16126 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16128 * server.c (main): Relax numerical bases supported for the pid of
16129 the --attach command line argument.
16131 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16133 * win32-low.c (win32_attach): Call OpenProcess before
16134 DebugActiveProcess, not after. Add last error output to error
16137 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16139 * win32-low.c (win32_get_thread_context)
16140 (win32_set_thread_context): New functions.
16141 (thread_rec): Use win32_get_thread_context.
16142 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16143 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16146 2007-12-03 Leo Zayas
16147 Pedro Alves <pedro_alves@portugalmail.pt>
16149 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16151 (child_add_thread): Minor cleanup.
16152 (child_continue): Resume artificially suspended threads before
16153 calling ContinueDebugEvent.
16154 (suspend_one_thread): New.
16155 (fake_breakpoint_event): New.
16156 (get_child_debug_event): Change return type to int. Check here if
16157 gdb sent an interrupt request. If a soft interrupt was requested,
16158 fake a breakpoint event. Return 0 if there is no event to handle,
16160 (win32_wait): Don't check here if gdb sent an interrupt request.
16161 Ensure there is a valid event to handle.
16162 (win32_request_interrupt): Add soft interruption method as last
16165 2007-12-03 Leo Zayas
16166 Pedro Alves <pedro_alves@portugalmail.pt>
16168 * win32-low.h (win32_thread_info): Add descriptions to the
16169 structure members. Replace `suspend_count' counter by a
16171 * win32-low.c (thread_rec): Update condition of when to get the
16172 context from the inferior. Rely on ContextFlags being set if it
16173 has already been retrieved. Only suspend the inferior thread if
16174 we haven't already. Warn if that fails.
16175 (continue_one_thread): s/suspend_count/suspended/. Only call
16176 ResumeThread once. Warn if that fails.
16178 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16180 * win32-low.c (win32_wait): Don't read from the inferior when it
16181 has already exited.
16183 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16185 * Makefile.in (win32_low_h): New variable.
16186 (win32-low.o): Add dependency on $(win32_low_h).
16187 (win32-arm-low.o, win32-i386-low.o): New rules.
16189 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16191 * hostio.c: Correct copyright year.
16193 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16195 * Makefile.in (OBS): Add hostio.o.
16196 (hostio.o): New rule.
16197 * server.h (handle_vFile): Declare.
16198 * hostio.c: New file.
16199 * server.c (handle_v_requests): Take packet_len and new_packet_len
16200 for binary packets. Call handle_vFile.
16201 (main): Update call to handle_v_requests.
16203 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16205 * linux-low.c: Include <sched.h>.
16207 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16209 * linux-low.c (linux_tracefork_grandchild): New.
16210 (linux_tracefork_child): Use clone.
16211 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16213 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16215 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16217 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16219 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16221 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16223 * inferiors.c (change_inferior_id): Delete.
16224 (add_pid_to_list, pull_pid_from_list): New.
16225 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16226 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16227 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16228 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16229 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16230 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16231 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16232 (using_threads): Always set to 1.
16233 (handle_extended_wait): New.
16234 (add_process): Do not set TID.
16235 (linux_create_inferior): Set must_set_ptrace_flags.
16236 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16237 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16238 (linux_thread_alive): Rename TID argument to LWPID.
16239 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16240 (linux_wait_for_event): Do not use TID or check using_threads. Update
16241 call to dead_thread_notify. Call handle_extended_wait.
16242 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16243 (send_sigstop): Delete sigstop_sent.
16244 (wait_for_sigstop): Avoid TID.
16245 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16246 (linux_test_for_tracefork): New.
16247 (linux_lookup_signals): Use thread_db_active and
16248 linux_supports_tracefork_flag.
16249 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16250 * linux-low.h (get_process_thread): Avoid TID.
16251 (struct process_ifo): Move thread_known and tid to the end. Remove
16253 (linux_attach_lwp, thread_db_init): Update prototypes.
16254 * server.h (change_inferior_id): Delete prototype.
16255 (add_pid_to_list, pull_pid_from_list): New prototypes.
16256 * thread-db.c (thread_db_use_events): New.
16257 (find_first_thread): Rename to...
16258 (find_one_thread): ...this. Update callers and messages. Do not
16259 call fatal. Check thread_db_use_events. Do not call
16260 change_inferior_id or new_thread_notify.
16261 (maybe_attach_thread): Update. Do not call new_thread_notify.
16262 (thread_db_init): Set thread_db_use_events. Check use_events.
16263 * utils.c (fatal, warning): Correct message prefix.
16265 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16267 * Makefile.in (clean): Remove new files.
16268 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16269 (powerpc-64.o, powerpc-64.c): New rules.
16270 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16271 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16273 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16275 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16276 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16277 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16278 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16279 (target_regsets): Add AltiVec and SPE register sets.
16280 * configure.ac: Check for AltiVec and SPE.
16281 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16282 (ppc_fill_vrregset, ppc_store_vrregset): New.
16283 (target_regsets): Add AltiVec register set.
16284 * configure: Regenerated.
16286 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16288 * linux-low.c (O_LARGEFILE): Define.
16289 (linux_read_memory): Use /proc/PID/mem.
16290 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16291 * configure, config.in: Regenerated.
16293 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16295 * linux-low.c (linux_wait_for_event): Do not pass signals while
16298 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16300 * win32-low.c (create_process): New.
16301 (win32_create_inferior): Use create_process instead of
16302 CreateProcess. If create_process failed retry appending an ".exe"
16303 suffix. Store the GetLastError result immediatelly after
16304 create_process calls and use it on the call to error.
16306 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16308 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16310 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16312 * configure.ac: Switch license to GPLv3.
16314 2007-08-01 Michael Snyder <msnyder@access-company.com>
16316 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16318 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16320 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16322 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16323 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16324 CloseToolhelp32Snapshot.
16325 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16326 CloseToolhelp32Snapshot.
16328 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16330 * server.c (main): Check for inferior exit before main loop.
16332 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16334 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16335 instead of on tmp_desc.
16337 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16338 Daniel Jacobowitz <dan@codesourcery.com>
16340 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16341 (add_thread): Minor cleanups.
16342 (clear_inferiors): Move lower in the file. Clear the DLL
16344 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16345 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16346 (xml_escape_text): New.
16347 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16349 (handle_v_cont): Report errors.
16350 (gdbserver_version): Update.
16351 (main): Correct size of own_buf. Do not report initial DLL events.
16352 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16353 (unloaded_dll, xml_escape_text): New.
16354 * win32-low.c (enum target_waitkind): Update comments.
16355 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16356 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16357 (win32_EnumProcessModules, win32_GetModuleInformation)
16358 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16359 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16360 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16361 (win32_Module32First, win32_Module32Next, load_toolhelp)
16362 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16363 (get_child_debug_event): Handle DLL events.
16364 (win32_wait): Likewise.
16366 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16368 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16369 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16371 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16373 * win32-low.c (handle_output_debug_string): Ignore event if not
16376 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16378 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16380 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16382 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16384 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16386 * inferiors.c (change_inferior_id): Add comment.
16387 * linux-low.c (check_removed_breakpoint): Add an early
16388 prototype. Improve debug output.
16389 (linux_attach): Doc update.
16390 (linux_detach_one_process, linux_detach): Clean up before releasing
16392 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16393 * linux-low.h (struct process_info): Doc improvement.
16394 * mem-break.c (delete_all_breakpoints): New.
16395 * mem-break.h (delete_all_breakpoints): New prototype.
16396 * thread-db.c (find_first_thread): New.
16397 (thread_db_create_event): Call it instead of
16398 thread_db_find_new_threads. Clean up unused variables.
16399 (maybe_attach_thread): Remove first thread handling.
16400 (thread_db_find_new_threads): Use find_first_thread.
16401 (thread_db_get_tls_address): Likewise.
16403 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16405 * thread-db.c (thread_db_find_new_threads): Add prototype.
16406 (thread_db_create_event): Check for the main thread before adding
16408 (maybe_attach_thread): Only enable event reporting if TID == 0.
16409 (thread_db_get_tls_address): Check for new threads.
16411 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16413 * linux-low.c (linux_create_inferior): Try execv before execvp.
16414 * spu-low.c (spu_create_inferior): Likewise.
16416 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16418 * linux-low.c (linux_create_inferior): Change execv to execvp.
16419 * spu-low.c (spu_create_inferior): Likewies.
16421 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16423 * Makefile.in (clean): Clean new files instead of deleted ones.
16424 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16425 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16427 * configure.srv: Specify XML files and new regformats for MIPS and
16429 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16430 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16431 an entry for the restart register.
16432 (mips_cannot_fetch_register, mips_cannot_store_register)
16433 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16434 register names to match the XML descriptions.
16435 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16436 restart register instead of $0.
16438 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16439 Markus Deuling <deuling@de.ibm.com>
16441 * remote-utils.c (decode_xfer_write): New function.
16442 * server.h (decode_xfer_write): Add prototype.
16443 * server.c (handle_query): Add PACKET_LEN argument. Support
16444 qXfer:spu:read and qXfer:spu:write packets.
16445 (main): Pass packet_len to handle_query.
16446 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16447 * target.h (target_ops): Add qxfer_spu.
16449 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16451 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16452 accessing non-seekable spufs files.
16454 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16456 * server.c (handle_query): Add reply for qC packet.
16458 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16459 Leo Zayas <lerele@champenstudios@com>
16461 * server.h (check_remote_input_interrupt_request): New function.
16462 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16463 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16464 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16465 (check_remote_input_interrupt_request): New function.
16466 * server.h (check_remote_input_interrupt_request): Declare.
16467 * win32-low.c (winapi_DebugBreakProcess,
16468 winapi_GenerateConsoleCtrlEvent): New typedefs.
16469 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16471 (win32_wait): Check for remote interrupt request
16472 with check_remote_input_interrupt_request.
16473 (win32_request_interrupt): New function.
16474 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16476 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16478 * win32-low.c (debug_registers_changed,
16479 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16480 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16481 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16482 (thread_rec): Get context using the low target.
16483 (child_add_thread): Call thread_added on the low target,
16484 which does the same thing.
16486 (do_initial_child_stuff): Remove debug registers references.
16487 Set context using the low target. Resume threads after
16488 setting the contexts.
16489 (child_continue): Remove dead variable. Remove debug
16490 registers references.
16491 (child_fetch_inferior_registers): Go through the low target.
16492 (do_child_store_inferior_registers): Remove.
16493 (child_store_inferior_registers): Go through the low target.
16494 (win32_resume): Remove debug registers references.
16495 Set context using the low target.
16496 (handle_exception): Change return type to void. Don't record
16497 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16498 first chance exception.
16499 (get_child_debug_event): Change return type to void. Remove
16500 goto loop. Always return after waiting for debug event.
16501 (win32_wait): Convert to switch statement. Handle spurious
16504 * win32-i386-low.c (debug_registers_changed,
16505 debug_registers_used): New.
16506 (initial_stuff): Rename to ...
16507 (i386_initial_stuff): ... this. Clear debug registers
16509 (store_debug_registers): Delete.
16510 (i386_get_thread_context): New.
16511 (load_debug_registers): Delete.
16512 (i386_set_thread_context): New.
16513 (i386_thread_added): New.
16514 (single_step): Rename to ...
16515 (i386_single_step): ... this.
16516 (do_fetch_inferior_registers): Rename to ...
16517 (i386_fetch_inferior_register): ... this.
16518 (i386_store_inferior_register): New.
16519 (the_low_target): Adapt to new interface.
16521 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16522 (arm_get_thread_context): New.
16523 (arm_set_thread_context): New.
16525 (do_fetch_inferior_registers): Rename to ...
16526 (arm_fetch_inferior_register): ... this.
16527 (arm_store_inferior_register): New.
16528 (arm_wince_breakpoint): Reimplement as unsigned long.
16529 (arm_wince_breakpoint_len): Define.
16530 (the_low_target): Adapt to new interface.
16532 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16533 load_debug_registers. Add get_thread_context, set_thread_context,
16534 thread_added and store_inferior_register. Rename
16535 fetch_inferior_registers to fetch_inferior_register.
16536 (regptr): Remove declaration.
16538 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16540 * linux-low.c (linux_detach): Change return type to int. Return 0.
16541 * spu-low.c (spu_detach): Likewise.
16543 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16545 * target.h (target_ops): Change return type of detach to int.
16547 (join_inferior): New.
16548 * server.c (main): Don't skip detach support on mingw32.
16549 If the inferior doesn't support detaching return error.
16550 Call join_inferior instead of using waitpid.
16551 * linux-low.c (linux_join): New.
16552 (linux_target_op): Add linux_join.
16553 * spu-low.c (spu_join): New.
16554 (spu_target_ops): Add spu_join.
16555 * win32-low.c (win32_detach): Adapt to new interface.
16556 Reopen current_process_handle before detaching. Issue a child
16557 resume before detaching.
16559 (win32_target_op): Add win32_join.
16561 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16563 * win32-low.c (win32-attach): Fix return value.
16564 * target.h (target_ops): Describe ATTACH return values.
16566 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16568 * win32-low.c (GETPROCADDRESS): Define.
16569 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16570 (winapi_DebugSetProcessKillOnExit): Likewise.
16571 (win32_create_inferior): Force usage of ansi CreateProcessA.
16572 (win32_attach): Use GETPROCADDRESS.
16573 (win32_detach): Likewise.
16575 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16577 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16579 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16581 * win32-low.c: Commit leftover changes from 2007-03-29.
16583 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16585 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16586 fields short instead of int. Add explicit padding.
16587 (i387_cache_to_fsave): Remove unnecessary casts.
16588 (i387_fsave_to_cache): Doc fix.
16589 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16591 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16593 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16594 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16596 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16598 * configure.srv (arm*-*-mingw32ce*): Move near the other
16601 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16603 * configure.ac: Add errno checking.
16604 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16605 sys/file.h and malloc.h.
16606 (AC_CHECK_DECLS): Add perror.
16607 (srv_mingwce): Handle.
16608 * configure.srv (i[34567]86-*-cygwin*): Add
16609 win32-i386-low.o to srv_tgtobj.
16610 (i[34567]86-*-mingw*): Likewise.
16611 (arm*-*-mingw32ce*): Add case.
16612 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16613 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16614 [__MINGW32CE__] (strerror): New function.
16615 [__MINGW32CE__] (errno): Define to GetLastError.
16616 [__MINGW32CE__] (COUNTOF): New macro.
16617 (remote_open): Remove extra close call.
16618 * mem-break.c (delete_breakpoint_at): New function.
16619 * mem-break.h (delete_breakpoint_at): Declare.
16620 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16621 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16622 [USE_WIN32API] (read, write): Add char* casts.
16623 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16624 * server.h: Include wincecompat.h on Windows CE.
16625 [HAVE_ERRNO_H]: Check.
16626 (perror): Declare if not declared.
16627 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16628 (perror_with_name): Remove errno declaration.
16629 * wincecompat.h: New.
16630 * wincecompat.c: New.
16631 * win32-low.h: New.
16632 * win32-arm-low.c: New.
16633 * win32-i386-low.c: New.
16634 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16635 (OUTMSG2): Make it safe.
16637 (COUNTOF): New macro.
16638 (NUM_REGS): Get it from the low target.
16639 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16640 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16641 (thread_rec): Let low target handle debug registers.
16642 (child_add_thread): Likewise.
16643 (child_init_thread_list): Likewise.
16644 (continue_one_thread): Likewise.
16646 (do_child_fetch_inferior_registers): Move to ...
16647 * win32-i386-low.c: ... here, and rename to ...
16648 (do_fetch_inferior_registers): ... this.
16649 * win32-low.c (child_fetch_inferior_registers):
16650 Go through the low target.
16651 (do_child_store_inferior_registers): Use regptr.
16652 (strwinerror): New function.
16653 (win32_create_inferior): Handle Windows CE.
16654 Use strwinerror instead of strerror on Windows error
16655 codes. Add program to the error output.
16656 Don't close the main thread handle on Windows CE.
16657 (win32_attach): Use coredll.dll on Windows CE.
16658 (win32_kill): Close current process and current
16660 (win32_detach): Use coredll.dll on Windows CE.
16661 (win32_resume): Let low target handle debug registers, and
16663 (handle_exception): Add/Remove initial breakpoint. Avoid
16664 non-existant WSTOPSIG on Windows CE.
16665 (win32_read_inferior_memory): Cast to remove warning.
16666 (win32_arch_string): Go through the low target.
16667 (initialize_low): Call set_breakpoint_data with the low
16668 target's breakpoint.
16669 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16670 FOP_REGNUM, mappings): Move to ...
16671 * win32-i386-low.c: ... here.
16672 * win32-low.c (win32_thread_info): Move to ...
16673 * win32-low.h: ... here.
16674 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16675 win32-arm-low.c and wincecompat.c.
16676 (all:): Add $EXEEXT.
16677 (install-only:): Likewise.
16678 (gdbserver:): Likewise.
16679 (gdbreplay:): Likewise.
16680 * config.in: Regenerate.
16681 * configure: Regenerate.
16683 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16685 * win32-low.c: Rename typedef thread_info to
16686 win32_thread_info throughout.
16688 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16690 * win32-i386-low.c: Rename to ...
16691 * win32-low.c: ... this.
16692 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16693 * Makefile.in: Likewise.
16695 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16697 * remote-utils.c (monitor_output): Constify msg parameter.
16698 * server.h (monitor_output): Likewise.
16699 * win32-i386-low.c (handle_output_debug_string): New.
16700 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16701 handle_output_debug_string.
16702 (get_child_debug_event): Likewise.
16704 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16706 * server.c (main): Correct strtoul check.
16708 2007-03-27 Jon Ringle <jon@ringle.org>
16710 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16712 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16714 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16716 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16718 * terminal.h: Check HAVE_SGTTY_H.
16720 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16722 * remote-utils.c (remote_open): Print out the assigned port number.
16724 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16726 * remote-utils.c (monitor_output): New function.
16727 * server.c (debug_threads): Define here.
16728 (monitor_show_help): New function.
16729 (handle_query): Handle qRcmd.
16730 (main): Do not handle 'd' packet.
16731 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16732 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16735 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16737 * Makefile.in (EXEEXT): New.
16738 (clean): Use $(EXEEXT).
16740 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16742 * target.h (target_ops): Rename send_signal to request_interrupt,
16743 and remove enum target_signal parameter.
16744 * linux-low.c (linux_request_interrupt): Rename from
16745 linux_send_signal, and always send SIGINT.
16746 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16747 and always send SIGINT.
16748 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16750 (input_interrupt): Likewise.
16752 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16754 * server.c (get_features_xml): Check if target implemented
16756 * win32-i386-low.c (win32_arch_string): New.
16757 (win32_target_ops): Add win32_arch_string as arch_string member.
16759 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16761 * spu-low.c (spu_arch_string): New.
16762 (spu_target_ops): Add spu_arch_string.
16764 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16766 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16767 * configure.ac: Do not check for terminal.h.
16768 * configure, config.in: Regenerated.
16770 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16772 * Makefile.in (OBS): Add $(XML_BUILTIN).
16773 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16775 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16776 (arm-with-iwmmxt.c): New.
16777 * config.in, configure: Regenerate.
16778 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16779 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16780 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16781 (arm*-*-linux*): Add iWMMXt and regset support.
16782 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16783 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16784 (arm_store_wmmxregset, target_regsets): New.
16785 * server.c (get_features_xml): Take annex argument. Check builtin
16787 (handle_query): Handle multiple annexes.
16789 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16791 * remote-utils.c [USE_WIN32API] (read, write): Define.
16792 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16795 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16797 * linux-i386-low.c (the_low_target): Set arch_string.
16798 * linux-x86-64-low.c (the_low_target): Likewise.
16799 * linux-low.c (linux_arch_string): New.
16800 (linux_target_ops): Add it.
16801 * linux-low.h (struct linux_target_ops): Add arch_string.
16802 * server.c (write_qxfer_response): Use const void * for DATA.
16803 (get_features_xml): New.
16804 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16805 * target.h (struct target_ops): Add arch_string method.
16807 2007-01-03 Denis Pilat <denis.pilat@st.com>
16808 Daniel Jacobowitz <dan@codesourcery.com>
16810 * linux-low.c (linux_kill): Handle being called with no threads.
16811 * win32-i386-low.c (win32_kill): Likewise.
16812 (get_child_debug_event): Clear current_process_handle.
16814 2006-12-30 Denis PILAT <denis.pilat@st.com>
16815 Daniel Jacobowitz <dan@codesourcery.com>
16817 * remote-utils.c (remote_open): Check the type of specified
16818 serial port devices before opening them.
16819 * server.c (main): Kill the inferior if an error occurs during
16820 the first remote_open.
16822 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16824 * README: Update supported targets.
16826 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16828 * Makefile.in (clean): Remove reg-mips64.c.
16829 (reg-mips64.c, reg-mips64.o): New rules.
16830 * configure.srv: Handle mips64. Include regset support for mips.
16831 * linux-mips-low.c (union mips_register): New.
16832 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16833 (mips_breakpoint, mips_breakpoint_at): Use int.
16834 (mips_collect_register, mips_supply_register)
16835 (mips_collect_register_32bit, mips_supply_register_32bit)
16836 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16837 (mips_store_fpregset, target_regsets): New.
16838 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16840 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16842 * configure.srv: Add target "spu*-*-*".
16843 * Makefile.in (clean): Remove reg-spu.c.
16844 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16845 * spu-low.c: New file.
16847 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16849 * configure.ac: Correct td_thr_tls_get_addr test.
16850 * configure: Regenerated.
16852 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16854 * linux-low.c (linux_wait_for_event): Reformat. Use the
16855 pass_signals array.
16856 * remote-utils.c (decode_address_to_semicolon): New.
16857 * server.c (pass_signals, handle_general_set): New.
16858 (handle_query): Mention QPassSignals for qSupported.
16859 (main): Call handle_general_set.
16860 * server.h (pass_signals, decode_address_to_semicolon): New.
16862 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16864 * server.c (handle_query): Correct error handling for read_auxv.
16866 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16868 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16869 and srv_linux_thread_db to yes.
16870 * linux-s390-low.c (s390_fill_gregset): New function.
16871 (target_regsets): Define data structure.
16873 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16875 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16876 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16877 * config.in, configure: Regenerated.
16878 * inferiors.c (gdb_id_to_thread): New function.
16879 (gdb_id_to_thread_id): Use it.
16880 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16881 * linux-low.h (struct process_info): Add th member.
16882 (thread_db_get_tls_address): New prototype.
16883 * remote-utils.c (decode_address): Make non-static.
16884 * server.c (handle_query): Handle qGetTLSAddr.
16885 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16886 * target.h (struct target_ops): Add get_tls_address.
16887 * thread-db.c (maybe_attach_thread): Save the thread handle.
16888 (thread_db_get_tls_address): New.
16890 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16892 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16893 (linux_resume_one_process): Take a siginfo_t *. Update all
16894 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16895 (struct pending_signals): Add a siginfo_t.
16896 (linux_wait_for_process): Always set last_status.
16897 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16898 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16899 * linux-low.h (struct process_info): Add last_status.
16901 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16903 * remote-utils.c (try_rle): New function.
16904 (putpkt_binary): Use it.
16906 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16908 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16909 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16910 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16911 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16912 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16915 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16917 * server.c (terminal_fd): New variable.
16918 (old_foreground_pgrp): Likewise.
16919 (restore_old_foreground_pgrp): New function.
16920 (start_inferior): Record the terminal file descriptor in terminal_fd
16921 and its original foreground group in old_foreground_pgrp. Register
16922 restore_old_foreground_pgrp with atexit().
16924 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16926 * server.c (handle_query): Correct qPart to qXfer.
16928 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16930 * configure.ac: Check for more headers which are missing on
16931 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16932 * configure.srv: Add Cygwin and mingw32.
16933 * remote-utils.c: Don't include headers unconditionally which
16934 are missing on mingw32. Include <winsock.h> for mingw32.
16935 (remote_open): Adjust for mingw32 support. Flush
16936 standard error after writing to it.
16937 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16938 (unblock_async_io, enable_async_io, disable_async_io)
16939 (readchar, getpkt): Update for Winsock support.
16940 (prepare_resume_reply): Expect a protocol signal number.
16941 * server.c: Disable <sys/wait.h> on mingw32.
16942 (start_inferior): Adjust for mingw32 support. Flush
16943 standard error after writing to it.
16944 (attach_inferior): Likewise. Use protocol signal
16946 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16948 * win32-i386-low.c: New file.
16949 * Makefile.in (XM_CLIBS): Set.
16950 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16951 (win32-i386-low.o): New dependency rule.
16952 * linux-low.c (linux_wait): Use target signal numbers.
16953 * target.h (struct target_ops): Doc fix.
16954 * server.h (target_signal_to_name): New prototype.
16955 * gdbreplay.c: Don't include headers unconditionally which
16956 are missing on mingw32. Include <winsock.h> for mingw32.
16957 (remote_close, remote_open): Adjust for Winsock support.
16958 * configure, config.in: Regenerated.
16960 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16962 * server.c (decode_xfer_read, write_qxfer_response): New.
16963 (handle_query): Take a packet length argument. Handle
16964 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16965 the qSupported response.
16966 (main): Update call to handle_query.
16968 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16970 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16971 (putpkt_binary): Renamed from putpkt and adjusted for binary
16973 (putpkt): New wrapper for putpkt_binary.
16974 (readchar): Don't mask off the high bit.
16975 (decode_X_packet): New function.
16976 * server.c (main): Call putpkt_binary if a handler sets the packet
16977 length. Save the length of the incoming packet. Handle 'X'.
16978 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16980 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16982 * server.c (handle_query): Handle qSupported.
16984 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16986 * remote-utils.c (all_symbols_looked_up): New variable.
16987 (look_up_one_symbol): Check it.
16988 * server.h (look_up_one_symbol): New declaration.
16989 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16991 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16993 * Makefile.in (linux-arm-low.o): Update dependencies.
16994 * linux-arm-low.c: Include "gdb_proc_service.h".
16995 (PTRACE_GET_THREAD_AREA): Define.
16996 (ps_get_thread_area): New function.
16998 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
17000 * configure.srv (m68k*-*-uclinux*): New target.
17001 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
17002 (linux_resume_one_process): Remove extraneous cast.
17003 (linux_read_offsets): New.
17004 (linux_target_op): Add linux_read_offsets on mmuless systems.
17005 * server.c (handle_query): Add qOffsets logic.
17006 * target.h (struct target_ops): Add read_offsets.
17008 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17010 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17011 (PTRACE_GET_THREAD_AREA): Define.
17012 (ps_get_thread_area): New function.
17013 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17014 (linux-x86-64-low.o): Update.
17016 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17018 * configure.ac: Remove checks for prfpregset_t.
17019 * gdb_proc_service.h: New file.
17020 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17021 new "gdb_proc_service.h".
17022 * proc-service.c: Likewise.
17023 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17024 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17025 * Makefile.in (gdb_proc_service_h): Updated.
17026 * configure, config.in: Regenerated.
17028 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17030 * remote-utils.c (prepare_resume_reply): Move declaration
17031 of gdb_id_from_wait to the top of the block.
17033 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17035 * linux-low.c (regsets_store_inferior_registers): Read the regset
17036 from the target before filling it.
17038 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17040 * server.c (attach_inferior): Return SIGTRAP for a successful
17043 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17045 * Makefile.in (OBS): Add version.o.
17046 (STAGESTUFF): Delete.
17047 (version.o): Add dependencies.
17048 (version.c): Replace rule.
17049 (clean): Remove version.c.
17050 * server.c (gdbserver_version): New.
17051 (gdbserver_usage): Use printf.
17052 (main): Handle --version and --help.
17053 * server.h (version, host_name): Add declarations.
17055 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17067 * linux-x86-64-low.c:
17069 * linux-s390-low.c:
17070 * linux-ppc64-low.c:
17072 * linux-mips-low.c:
17073 * linux-m68k-low.c:
17074 * linux-m32r-low.c:
17077 * linux-ia64-low.c:
17078 * linux-i386-low.c:
17079 * linux-crisv32-low.c:
17091 * gdbserver.1: Add (C) after Copyright. Update the FSF
17094 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17096 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17097 (arm_breakpoint_at): Recognize both breakpoints.
17098 (the_low_target): Use the correct breakpoint instruction.
17100 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17102 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17103 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17104 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17105 (the_low_target): Update.
17107 2005-10-25 Andreas Schwab <schwab@suse.de>
17109 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17111 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17112 (ia64_num_regs): Reduce to 462.
17114 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17116 * acinclude.m4: Correct quoting.
17117 * aclocal.m4: Regenerated.
17119 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17120 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17121 (thread_db_init): Call thread_db_err_str.
17122 * configure.ac: Check for TD_VERSION.
17123 * config.in, configure: Regenerated.
17125 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17127 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17129 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17131 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17132 is not available. Define HAVE_PTRACE_GETREGS if it is.
17133 * config.in, configure: Regenerated.
17134 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17135 * linux-i386-low.c, linux-m68k-low.c: Update to use
17136 HAVE_PTRACE_GETREGS.
17137 * linux-low.c (regsets_fetch_inferior_registers)
17138 (regsets_store_inferior_registers): Only return 0 if we processed
17140 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17141 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17143 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17145 * inferiors.c (struct thread_info): Add gdb_id.
17146 (add_thread): Add gdb_id argument.
17147 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17148 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17149 calls to add_thread.
17150 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17151 * server.c (handle_query): Use thread_to_gdb_id.
17152 (handle_v_cont, main): Use gdb_id_to_thread_id.
17153 * server.h (add_thread): Update prototype.
17154 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17157 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17159 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17160 left-padded registers.
17161 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17162 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17164 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17166 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17167 * configure: Regenerate.
17168 * config.in: Regenerate.
17169 * server.h (NEED_DECLARATION_STRERROR):
17170 Replace with !HAVE_DECL_STRERROR.
17172 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17174 * linux-low.c (linux_wait, linux_send_signal): Don't test
17175 an unsigned long variable for > 0 if it could be MAX_ULONG.
17176 * server.c (myresume): Likewise.
17177 * target.c (set_desired_inferior): Likewise.
17179 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17181 * configure.ac: Simplify and improve check for socklen_t.
17182 * configure, config.in: Regenerate.
17184 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17186 * acconfig.h: Remove.
17187 * configure.ac: Add a test for socklen_t. Use three-argument
17188 AC_DEFINE throughout.
17189 * config.in: Regenerated using autoheader 2.59.
17190 * configure: Regenerated.
17192 * gdbreplay.c (socklen_t): Provide a default.
17193 (remote_open): Use socklen_t.
17194 * remote-utils.c (socklen_t): Provide a default.
17195 (remote_open): Use socklen_t.
17196 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17199 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17201 * linux-low.c (linux_read_memory, linux_write_memory)
17202 (linux_read_auxv): Likewise.
17203 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17204 (check_mem_write): Likewise.
17205 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17207 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17208 (registers_from_string, register_data): Likewise.
17209 * server.c (handle_query, main): Likewise.
17210 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17211 (decode_M_packet): Likewise.
17212 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17213 * target.h (struct target_ops): Update read_memory, write_memory,
17215 (read_inferior_memory, write_inferior_memory): Update.
17216 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17217 to unsigned char *.
17218 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17219 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17220 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17221 linux-s390-low.c, linux-sh-low.c: Update for changes in
17222 read_inferior_memory and the_low_target->breakpoint.
17224 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17226 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17227 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17228 * configure.srv: Add powerpc64-*-linux*.
17229 * linux-ppc64-low.c: New file.
17231 2005-05-23 Orjan Friberg <orjanf@axis.com>
17233 * linux-cris-low.c: New file with support for CRIS.
17234 * linux-crisv32-low.c: Ditto for CRISv32.
17235 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17236 (clean): Add reg-cris.c and reg-crisv32.c.
17237 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17238 reg-crisv32.o, and reg-crisv32.c to make rules.
17239 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17240 recognized targets.
17242 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17244 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17245 of sizeof (PTRACE_XFER_TYPE).
17246 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17248 2005-05-12 Orjan Friberg <orjanf@axis.com>
17250 * target.h (struct target_ops): Add insert_watchpoint,
17251 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17252 pointers for hardware watchpoint support.
17253 * linux-low.h (struct linux_target_ops): Ditto.
17254 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17255 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17256 to linux_target_ops.
17257 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17259 * server.c (main): Recognize 'Z' and 'z' packets.
17261 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17263 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17264 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17265 (the_low_target): Add new members.
17267 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17269 * proc-service.c (ps_lgetregs): Search all_processes instead of
17272 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17274 * server.c (start_inferior): Change return type to int.
17275 (attach_inferior): Change sigptr to int *.
17276 (handle_v_cont, handle_v_requests): Change signal to int *.
17277 (main): Change signal to int.
17279 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17281 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17282 * configure.srv: Add m32r*-*-linux*.
17283 * linux-m32r-low.c: New file.
17285 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17287 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17289 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17291 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17292 Take unsigned long arguments for PIDs.
17293 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17294 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17295 (wait_for_sigstop, linux_resume_one_process)
17296 (regsets_fetch_inferior_registers, linux_send_signal)
17297 (linux_read_auxv): Likewise. Update the types of variables holding
17298 PIDs. Update format string specifiers.
17299 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17300 * remote-utils.c (prepare_resume_reply): Likewise.
17301 * server.c (cont_thread, general_thread, step_thread)
17302 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17304 (handle_query): Update format specifiers.
17305 (handle_v_cont, main): Use strtoul for thread IDs.
17306 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17307 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17308 (general_thread, step_thread, thread_from_wait)
17309 (old_thread_from_wait): Update.
17310 * target.h (struct thread_resume): Use unsigned long for THREAD.
17311 (struct target_ops): Use unsigned long for arguments to attach and
17314 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17316 * acinclude.m4: Include bfd/bfd.m4 directly.
17317 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17318 <agriffis@toolchain.org>.
17319 * aclocal.m4, configure: Regenerated.
17321 2005-01-07 Andrew Cagney <cagney@gnu.org>
17323 * configure.ac: Rename configure.in, require autoconf 2.59.
17324 * configure: Re-generate.
17326 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17328 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17329 LIBS when finished.
17330 * aclocal.m4: Regenerated.
17331 * configure: Regenerated.
17333 2004-11-21 Andreas Schwab <schwab@suse.de>
17335 * linux-m68k-low.c (m68k_num_gregs): Define.
17336 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17337 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17338 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17339 (m68k_breakpoint_at): New. Add to the_low_target.
17341 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17342 srv_linux_thread_db to yes.
17344 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17346 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17347 (ARCH_SET_FS): Likewise.
17348 (ARCH_GET_FS): Likewise.
17349 (ARCH_GET_GS): Likewise.
17351 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17353 * linux-i386-low.c (ps_get_thread_area): New.
17354 * linux-x86-64-low.c (ps_get_thread_area): New.
17355 * linux-low.c: Include <sys/syscall.h>.
17356 (linux_kill_one_process): Don't kill the first thread here.
17357 (linux_kill): Kill the first thread here.
17358 (kill_lwp): New function.
17359 (send_sigstop, linux_send_signal): Use it.
17360 * proc-service.c: Clean up #ifdefs.
17361 (fpregset_info): Delete.
17362 (ps_lgetregs): Update and enable implementation.
17363 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17365 * remote-utils.c (struct sym_cache, symbol_cache): New.
17366 (input_interrupt): Print a clearer message.
17367 (async_io_enabled): New variable.
17368 (enable_async_io, disable_async_io): Use it. Update comments.
17369 (look_up_one_symbol): Use the symbol cache.
17370 * thread-db.c (thread_db_look_up_symbols): New function.
17371 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17373 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17375 * configure.in: Test for -rdynamic.
17376 * configure: Regenerated.
17377 * Makefile (INTERNAL_LDFLAGS): New.
17378 (gdbserver, gdbreplay): Use it.
17380 2004-09-02 Andrew Cagney <cagney@gnu.org>
17382 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17384 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17386 * linux-low.c (linux_wait): Clear all_processes list also.
17388 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17390 * linux-low.c: Include <errno.h>. Remove extern declaration of
17393 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17395 * gdbreplay.c, server.h, utils.c: Update copyright years.
17397 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17399 * server.c (main): Print child status or termination signal from
17400 variable 'signal', not 'sig'.
17402 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17404 * linux-low.c (linux_read_memory): Change return type to
17405 int. Check for and return error from ptrace().
17406 * target.c (read_inferior_memory): Change return type to int. Pass
17407 back return status from the_target->read_memory().
17408 * target.h (struct target_ops): Adapt *read_memory() prototype.
17410 (read_inferior_memory): Adapt prototype.
17411 * server.c (main): Return an error packet if
17412 read_inferior_memory() returns an error.
17414 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17416 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17417 Unify with other clean targets.
17419 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17421 * server.c (handle_v_cont): Call set_desired_inferior.
17423 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17425 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17427 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17429 * linux-low.c (linux_wait): Unblock async I/O.
17430 (linux_resume): Block and enable async I/O.
17431 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17432 * server.h (block_async_io, unblock_async_io): Add prototypes.
17434 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17436 * remote-utils.c (remote_open): Print a status notice after
17437 opening a TCP port.
17438 * server.c (attach_inferior): Print a status notice after
17441 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17443 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17445 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17447 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17449 * server.c, target.h: Update copyright years.
17451 2004-02-25 Roland McGrath <roland@redhat.com>
17453 * target.h (struct target_ops): New member `read_auxv'.
17454 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17455 * linux-low.c (linux_read_auxv): New function.
17456 (linux_target_ops): Initialize `read_auxv' member to that.
17458 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17460 Committed by Jim Blandy <jimb@redhat.com>.
17462 * linux-s390-low.c (s390_num_regs): Update.
17463 (s390_regmap): Remove control registers. Use __s390x__ predefine
17464 instead of GPR_SIZE to distiguish s390 and s390x targets.
17466 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17468 * linux-low.c: Update copyright year.
17469 (check_removed_breakpoint): Clear pending_is_breakpoint.
17470 (linux_set_resume_request, linux_queue_one_thread)
17471 (resume_status_pending_p): New functions.
17472 (linux_continue_one_thread): Use process->resume.
17473 (linux_resume): Only resume threads if there are no pending events.
17474 * linux-low.h (struct process_info): Add resume request
17477 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17479 * regcache.c (new_register_cache): Clear the allocated register
17480 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17482 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17484 * linux-low.c (linux_resume): Take a struct thread_resume *
17486 (linux_wait): Update call.
17487 (resume_ptr): New static variable.
17488 (linux_continue_one_thread): Renamed from
17489 linux_continue_one_process. Use resume_ptr.
17490 (linux_resume): Use linux_continue_one_thread.
17491 * server.c (handle_v_cont, handle_v_requests): New functions.
17492 (myresume): New function.
17493 (main): Handle 'v' case.
17494 * target.h (struct thread_resume): New type.
17495 (struct target_ops): Change argument of "resume" to struct
17497 (myresume): Delete macro.
17499 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17501 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17502 (uninstall): Support DESTDIR.
17504 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17506 * configure.srv: Add xscale*linux copy of arm*linux entry.
17508 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17510 * linux-arm-low.c (arm_reinsert_addr): New function.
17511 (the_low_target): Add arm_reinsert_addr.
17513 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17515 * mem-break.c: Remove whitespace at end of file.
17517 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17519 * configure.in: Check whether we need to prototype strerror.
17520 * server.h: Optionally prototype strerror.
17521 * gdbreplay.c (perror_with_name): Use strerror.
17522 * linux-low.c (linux_attach_lwp): Use strerror.
17523 * utils.c (perror_with_name): Use strerror.
17524 * config.in, configure: Regenerated.
17526 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17528 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17529 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17531 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17533 * Makefile.in (SFILES): Update.
17534 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17535 low-sun3.c: Remove files.
17537 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17539 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17540 (linux_detach_one_process, linux_detach): New functions.
17541 (linux_target_ops): Add linux_detach.
17542 * server.c (main): Handle 'D' packet.
17543 * target.h (struct target_ops): Add "detach" member.
17544 (detach_inferior): Define.
17546 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17548 From Kelley Cook <kelleycook@wideopenwest.com>:
17549 * configure.srv: Accept i[34567]86 variants.
17551 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17553 * linux-low.c (linux_wait_for_event): Correct comment typos.
17554 (linux_resume_one_process): Call check_removed_breakpoint.
17555 (linux_send_signal): New function.
17556 (linux_target_ops): Add linux_send_signal.
17557 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17559 * target.h (struct target_ops): Add send_signal.
17561 2003-05-29 Jim Blandy <jimb@redhat.com>
17563 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17564 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17565 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17566 away part of the register's value.
17568 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17570 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17571 (linux_wait_for_event, linux_init_signals): Likewise.
17573 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17575 * configure.in: Check for stdlib.h.
17576 * configure: Regenerated.
17577 * config.in: Regenerated.
17579 2003-01-04 Andreas Schwab <schwab@suse.de>
17581 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17583 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17585 * Makefile.in: Remove obsolete code.
17587 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17589 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17590 defined(PT_FPR0_HI).
17592 2002-11-17 Stuart Hughes <seh@zee2.com>
17594 * linux-arm-low.c (arm_num_regs): Increase.
17595 (arm_regmap): Include status register.
17597 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17599 * linux-low.c (register_addr): Remove incorrect -1 check.
17601 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17603 * linux-low.c (linux_create_inferior): Call setpgid. Return
17605 (unstopped_p, linux_signal_pid): Remove.
17606 (linux_target_ops): Remove linux_signal_pid.
17607 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17608 global instead of target method.
17609 * target.h (struct target_ops): Remove signal_pid. Update comment
17610 for create_inferior.
17611 * server.c (signal_pid): New variable.
17612 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17613 gdbserver. Set the child to be the foreground process group.
17614 (attach_inferior): Set signal_pid.
17616 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17618 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17620 2002-08-20 Jim Blandy <jimb@redhat.com>
17622 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17625 2002-08-01 Andrew Cagney <cagney@redhat.com>
17627 * Makefile.in: Make chill references obsolete.
17629 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17631 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17632 * configure: Regenerate.
17633 * config.in: Regenerate.
17635 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17637 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17638 (perror_with_name, remote_close, remote_open, expect, play): Static.
17640 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17642 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17643 byte offsets instead of an array of indexes.
17644 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17646 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17648 * regcache.c: Add comment.
17650 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17652 * thread-db.c: New file.
17653 * proc-service.c: New file.
17654 * acinclude.m4: New file.
17655 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17656 proc-service.o, and thread-db.o.
17657 (linux-low.o): Add USE_THREAD_DB.
17658 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17659 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17660 * aclocal.m4: Regenerated.
17661 * config.in: Regenerated.
17662 * configure: Regenerated.
17663 * configure.in: Check for proc_service.h, sys/procfs.h,
17664 thread_db.h, and linux/elf.h headrs.
17665 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17666 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17667 Check for -lthread_db and thread support.
17668 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17669 PowerPC, and SuperH.
17670 * i387-fp.c: Constify arguments.
17671 * i387-fp.h: Likewise.
17672 * inferiors.c: (struct thread_info): Renamed from
17673 `struct inferior_info'. Remove PID member. Use generic inferior
17674 list header. All uses updated.
17675 (inferiors, signal_pid): Removed.
17676 (all_threads): New variable.
17677 (get_thread): Define.
17678 (add_inferior_to_list): New function.
17679 (for_each_inferior): New function.
17680 (change_inferior_id): New function.
17681 (add_inferior): Removed.
17682 (remove_inferior): New function.
17683 (add_thread): New function.
17684 (free_one_thread): New function.
17685 (remove_thread): New function.
17686 (clear_inferiors): Use for_each_inferior and free_one_thread.
17687 (find_inferior): New function.
17688 (find_inferior_id): New function.
17689 (inferior_target_data): Update argument type.
17690 (set_inferior_target_data): Likewise.
17691 (inferior_regcache_data): Likewise.
17692 (set_inferior_regcache_data): Likewise.
17693 * linux-low.c (linux_bp_reinsert): Remove.
17694 (all_processes, stopping_threads, using_thrads)
17695 (struct pending_signals, debug_threads, pid_of): New.
17696 (inferior_pid): Replace with macro.
17697 (struct inferior_linux_data): Remove.
17698 (get_stop_pc, add_process): New functions.
17699 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17700 Use add_process and add_thread.
17701 (linux_attach_lwp): New function, based on old linux_attach. Use
17702 add_process and add_thread. Set stop_expected for new threads.
17703 (linux_attach): New function.
17704 (linux_kill_one_process): New function.
17705 (linux_kill): Kill all LWPs.
17706 (linux_thread_alive): Use find_inferior_id.
17707 (check_removed_breakpoints, status_pending_p): New functions.
17708 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17709 Update. Use WNOHANG. Wait for cloned processes also. Update process
17710 struct for the found process.
17711 (linux_wait_for_event): New function.
17712 (linux_wait): Use it. Support LWPs.
17713 (send_sigstop, wait_for_sigstop, stop_all_processes)
17714 (linux_resume_one_process, linux_continue_one_process): New functions.
17715 (linux_resume): Support LWPs.
17716 (REGISTER_RAW_SIZE): Remove.
17717 (fetch_register): Use register_size instead. Call supply_register.
17718 (usr_store_inferior_registers): Likewise. Call collect_register.
17719 Fix recursive case.
17720 (regsets_fetch_inferior_registers): Improve error message.
17721 (regsets_store_inferior_registers): Add debugging.
17722 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17723 (unstopped_p, linux_signal_pid): New functions.
17724 (linux_target_ops): Add linux_signal_pid.
17725 (linux_init_signals): New function.
17726 (initialize_low): Call it. Initialize using_threads.
17727 * regcache.c (inferior_regcache_data): Add valid
17729 (get_regcache): Fetch registers lazily. Add fetch argument
17730 and update all callers.
17731 (regcache_invalidate_one, regcache_invalidate): New
17733 (new_register_cache): Renamed from create_register_cache.
17734 Return the new regcache.
17735 (free_register_cache): Change argument to a void *.
17736 (registers_to_string, registers_from_string): Call get_regcache
17737 with fetch flag set.
17738 (register_data): Make static. Pass fetch flag to get_regcache.
17739 (supply_register): Call get_regcache with fetch flag clear.
17740 (collect_register): Call get_regcache with fetch flag set.
17741 (collect_register_as_string): New function.
17742 * regcache.h: Update.
17743 * remote-utils.c (putpkt): Flush after debug output and use
17745 Handle input interrupts while waiting for an ACK.
17746 (input_interrupt): Use signal_pid method.
17747 (getpkt): Flush after debug output and use stderr.
17748 (outreg): Use collect_register_as_string.
17749 (new_thread_notify, dead_thread_notify): New functions.
17750 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17751 and general_thread.
17752 (look_up_one_symbol): Flush after debug output.
17753 * server.c (step_thread, server_waiting): New variables.
17754 (start_inferior): Don't use signal_pid. Update call to mywait.
17755 (attach_inferior): Update call to mywait.
17756 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17757 (main): Don't fetch/store registers explicitly. Use
17758 set_desired_inferior. Support proposed ``Hs'' packet. Update
17760 * server.h: Update.
17761 (struct inferior_list, struct_inferior_list_entry): New.
17762 * target.c (set_desired_inferior): New.
17763 (write_inferior_memory): Constify.
17764 (mywait): New function.
17765 * target.h: Update.
17766 (struct target_ops): New signal_pid method.
17767 (mywait): Removed macro, added prototype.
17769 * linux-low.h (regset_func): Removed.
17770 (regset_fill_func, regset_store_func): New.
17771 (enum regset_type): New.
17772 (struct regset_info): Add type field. Use new operation types.
17773 (struct linux_target_ops): stop_pc renamed to get_pc.
17774 Add decr_pc_after_break and breakpoint_at.
17775 (get_process, get_thread_proess, get_process_thread)
17776 (strut process_info, all_processes, linux_attach_lwp)
17777 (thread_db_init): New.
17779 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17780 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17781 (the_low_target): Add new members.
17782 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17783 (i386_store_fpxregset): Constify.
17784 (target_regsets): Add new kind identifier.
17785 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17786 (i386_set_pc): Add debugging.
17787 (i386_breakpoint_at): New function.
17788 (the_low_target): Add new members.
17789 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17790 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17791 (mips_breakpoint_at): New.
17792 (the_low_target): Add new members.
17793 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17794 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17795 (the_low_target): Add new members.
17796 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17797 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17798 (the_low_target): Add new members.
17799 * linux-x86-64-low.c (target_regsets): Add new kind
17802 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17804 From Martin Pool <mbp@samba.org>:
17805 * server.c (gdbserver_usage): New function.
17808 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17810 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17811 stop_at -> stop_pc.
17813 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17815 * Makefile.in: Remove obsolete code.
17817 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17819 * linux-low.c (regsets_fetch_inferior_registers),
17820 (regsets_store_inferior_registers): Removed cast to int from
17822 * regcache.h: Added declaration of struct inferior_info.
17824 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17826 * inferiors.c (struct inferior_info): Add regcache_data.
17827 (add_inferior): Call create_register_cache.
17828 (clear_inferiors): Call free_register_cache.
17829 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17830 * regcache.c (struct inferior_regcache_data): New.
17831 (registers): Remove.
17832 (get_regcache): New function.
17833 (create_register_cache, free_register_cache): New functions.
17834 (set_register_cache): Don't initialize the register cache here.
17835 (registers_to_string, registers_from_string, register_data): Call
17837 * regcache.h: Add prototypes.
17838 * server.h: Likewise.
17840 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17842 * mem-break.c: New file.
17843 * mem-break.h: New file.
17844 * Makefile.in: Add mem-break.o rule; update server.h
17846 * inferiors.c (struct inferior_info): Add target_data
17848 (clear_inferiors): Free target_data member if set.
17849 (inferior_target_data, set_inferior_target_data): New functions.
17850 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17851 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17852 * linux-low.c (linux_bp_reinsert): New variable.
17853 (struct inferior_linux_data): New.
17854 (linux_create_inferior): Use set_inferior_target_data.
17855 (linux_attach): Likewise. Call add_inferior.
17856 (linux_wait_for_one_inferior): New function.
17857 (linux_wait): Call it.
17858 (linux_write_memory): Add const.
17859 (initialize_low): Call set_breakpoint_data.
17860 * linux-low.h (struct linux_target_ops): Add breakpoint
17862 * server.c (attach_inferior): Remove extra add_inferior
17864 * server.h: Include mem-break.h. Update inferior.c
17866 * target.c (read_inferior_memory)
17867 (write_inferior_memory): New functions.
17868 * target.h (read_inferior_memory)
17869 (write_inferior_memory): Change macros to prototypes.
17870 (struct target_ops): Update comments. Add const to write_memory
17873 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17875 * linux-low.c (usr_store_inferior_registers): Support
17876 registers which are allowed to fail to store.
17877 * linux-low.h (linux_target_ops): Likewise.
17878 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17879 (ppc_cannot_store_register): FPSCR may not be storable.
17881 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17883 * server.h: Include <string.h> if HAVE_STRING_H.
17884 * ChangeLog: Correct paths in last ChangeLog entry.
17886 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17888 * linux-low.h: Remove obsolete prototypes.
17889 (struct linux_target_ops): New.
17890 (extern the_low_target): New.
17891 * linux-low.c (num_regs, regmap): Remove declarations.
17892 (register_addr): Use the_low_target explicitly.
17893 (fetch_register): Likewise.
17894 (usr_fetch_inferior_registers): Likewise.
17895 (usr_store_inferior_registers): Likewise.
17896 * linux-arm-low.c (num_regs): Remove.
17897 (arm_num_regs): Define.
17898 (arm_regmap): Renamed from regmap, made static.
17899 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17901 (arm_cannot_store_register): Renamed from cannot_store_register,
17903 (the_low_target): New.
17904 * linux-i386-low.c (num_regs): Remove.
17905 (i386_num_regs): Define.
17906 (i386_regmap): Renamed from regmap, made static.
17907 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17909 (i386_cannot_store_register): Renamed from cannot_store_register,
17911 (the_low_target): New.
17912 * linux-ia64-low.c (num_regs): Remove.
17913 (ia64_num_regs): Define.
17914 (ia64_regmap): Renamed from regmap, made static.
17915 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17917 (ia64_cannot_store_register): Renamed from cannot_store_register,
17919 (the_low_target): New.
17920 * linux-m68k-low.c (num_regs): Remove.
17921 (m68k_num_regs): Define.
17922 (m68k_regmap): Renamed from regmap, made static.
17923 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17925 (m68k_cannot_store_register): Renamed from cannot_store_register,
17927 (the_low_target): New.
17928 * linux-mips-low.c (num_regs): Remove.
17929 (mips_num_regs): Define.
17930 (mips_regmap): Renamed from regmap, made static.
17931 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17933 (mips_cannot_store_register): Renamed from cannot_store_register,
17935 (the_low_target): New.
17936 * linux-ppc-low.c (num_regs): Remove.
17937 (ppc_num_regs): Define.
17938 (ppc_regmap): Renamed from regmap, made static.
17939 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17941 (ppc_cannot_store_register): Renamed from cannot_store_register,
17943 (the_low_target): New.
17944 * linux-s390-low.c (num_regs): Remove.
17945 (s390_num_regs): Define.
17946 (s390_regmap): Renamed from regmap, made static.
17947 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17949 (s390_cannot_store_register): Renamed from cannot_store_register,
17951 (the_low_target): New.
17952 * linux-sh-low.c (num_regs): Remove.
17953 (sh_num_regs): Define.
17954 (sh_regmap): Renamed from regmap, made static.
17955 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17957 (sh_cannot_store_register): Renamed from cannot_store_register,
17959 (the_low_target): New.
17960 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17961 (the_low_target): New.
17963 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17965 * Makefile.in: Add stamp-h target.
17966 * configure.in: Create stamp-h.
17967 * configure: Regenerated.
17969 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17971 * inferiors.c: New file.
17972 * target.c: New file.
17973 * target.h: New file.
17974 * Makefile.in: Add target.o and inferiors.o. Update
17976 * linux-low.c (inferior_pid): New static variable,
17977 moved from server.c.
17978 (linux_create_inferior): Renamed from create_inferior.
17979 Call add_inferior. Return 0 on success instead of a PID.
17980 (linux_attach): Renamed from myattach.
17981 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17982 (linux_thread_alive): Renamed from mythread_alive.
17983 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17985 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17986 (regsets_store_inferior_registers): Correct error message.
17987 Add missing ``return 0''.
17988 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17989 (linux_store_registers): Renamed from store_inferior_registers.
17990 (linux_read_memory): Renamed from read_inferior_memory.
17991 (linux_write_memory): Renamed from write_inferior_memory.
17992 (linux_target_ops): New structure.
17993 (initialize_low): Call set_target_ops ().
17994 * remote-utils.c (unhexify): New function.
17995 (hexify): New function.
17996 (input_interrupt): Send signals to ``signal_pid''.
17997 * server.c (inferior_pid): Remove.
17998 (start_inferior): Update create_inferior call.
17999 (attach_inferior): Call add_inferior.
18000 (handle_query): New function.
18001 (main): Call handle_query for `q' packets.
18002 * server.h: Include "target.h". Remove obsolete prototypes.
18003 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18005 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18007 * Makefile.in: Add WARN_CFLAGS. Update configury
18009 * configure.in: Check for <string.h>
18010 * configure: Regenerate.
18011 * config.in: Regenerate.
18012 * gdbreplay.c: Include needed system headers.
18013 (remote_open): Remove strchr prototype.
18014 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18015 * regcache.c (supply_register): Change buf argument to const void *.
18016 (supply_register_by_name): Likewise.
18017 (collect_register): Change buf argument to void *.
18018 (collect_register_by_name): Likewise.
18019 * regcache.h: Add missing prototypes.
18020 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18021 * server.c (handle_query): New function.
18022 (attached): New static variable, moved out of main.
18023 (main): Quiet longjmp clobber warnings.
18024 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18025 * utils.c (error): Remove NORETURN.