1 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
2 Pedro Alves <palves@redhat.com>
4 Skip building gdbserver in a cross-configuration.
5 * configure.srv: Set $gdbserver_host depending on whether $target
6 is $host. Use $gdbserver_host instead of $host.
8 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
10 * configure: Re-generate.
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 * acinclude.m4: Update warning.m4 path.
20 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
22 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
23 (handle_exception): Set siginfo_er.
24 (win32_xfer_siginfo): New function.
26 2020-02-07 Tom Tromey <tom@tromey.com>
27 Pedro Alves <palves@redhat.com>
29 * README: Update build documentation.
30 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
32 * configure.ac: Update paths.
34 * acinclude.m4: Update paths.
35 * Makefile.in: Update include paths.
36 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
37 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
38 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
39 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
40 (%-generated.c): Update paths.
41 * Move entire directory from ../gdb/gdbserver.
43 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
45 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
47 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
49 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
50 assignment instead of srv_linux_obj.
52 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
54 * server.c (handle_qxfer_libraries): Write segment-address with
57 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
59 * Makefile.in (install-strip): New target.
60 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
61 * aclocal.m4: Regenerate.
62 * configure: Regenerate.
63 * configure.ac: Add AM_PROG_INSTALL_STRIP.
65 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
67 * Makefile.in (SFILES): Adjust paths to point to real files.
68 (OBS): Move waitstatus.o to target/waitstatus.o.
69 (TAGS): Transform paths appropriately.
71 (nat/%.o): ... this pattern rule.
73 (target/%.o): ... this pattern rule.
74 * configure.srv: Adjust paths throughout to include nat/ prefix
75 with the revant files.
76 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
77 * configure: Regenerate.
79 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
81 * Makefile.in (TAGS): Remove config files from the recipe.
83 2020-01-14 Tom Tromey <tom@tromey.com>
86 * configure.ac: Remove any checks that were added to common.m4.
87 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
90 2020-01-14 Tom Tromey <tom@tromey.com>
92 * server.h: Include config.h.
93 * gdbreplay.c: Include config.h.
95 * configure.ac: Don't source common.host.
96 * acinclude.m4: Update path.
97 * Makefile.in (INCSUPPORT): New variable.
98 (INCLUDE_CFLAGS): Add INCSUPPORT.
99 (SFILES): Update paths.
100 (version-generated.c): Update path to create-version.sh.
101 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
103 2020-01-14 Tom Tromey <tom@tromey.com>
105 * configure.ac (LIBS): Use WIN32APILIBS.
106 (USE_WIN32API): Don't define.
107 * configure: Rebuild.
109 2020-01-14 Tom Tromey <tom@tromey.com>
111 * configure: Rebuild.
113 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
115 * Makefile.in (%-generated.c): Remove rule for files from
118 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
120 * configure: Re-generate.
122 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
124 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
126 * tracepoint.c (stop_tracing, flush_trace_buffer,
127 about_to_request_buffer_space, get_trace_state_variable_value,
128 set_trace_state_variable_value, gdb_collect): Add declaration.
130 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
132 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
133 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
134 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
135 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
136 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
139 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
141 * inferiors.c: Include gdbsupport/common-inferior.h.
143 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
145 * hostio-errno.c: Include hostio.h.
147 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
149 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
152 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
154 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
155 * linux-arm-tdesc.h: Include arch/arm.h.
157 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
159 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
161 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
163 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
164 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
166 2020-01-10 Pedro Alves <palves@redhat.com>
168 * fork-child.c (post_fork_inferior): Pass target down to
170 * inferiors.c (switch_to_thread): Add process_stratum_target
172 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
173 * nto-low.c (nto_target_ops): Now a process_stratum_target.
174 * linux-low.c (linux_target_ops): Now a process_stratum_target.
175 * remote-utils.c (prepare_resume_reply): Pass the target to
177 * target.c (the_target): Now a process_stratum_target.
178 (done_accessing_memory): Pass the target to switch_to_thread.
179 (set_target_ops): Ajust to use process_stratum_target.
180 * target.h (struct target_ops): Rename to ...
181 (struct process_stratum_target): ... this.
182 (the_target, set_target_ops): Adjust.
183 (prepare_to_access_memory): Adjust comment.
184 * win32-low.c (child_xfer_memory): Adjust to use
185 process_stratum_target.
186 (win32_target_ops): Now a process_stratum_target.
188 2020-01-06 Eli Zaretskii <eliz@gnu.org>
189 Pedro Alves <palves@redhat.com>
191 * win32-low.c (get_child_debug_event): Extract the fatal exception
192 from the exit status and convert to the equivalent Posix signal
194 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
195 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
197 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
199 * Makefile.in: Use INSTALL_PROGRAM_ENV.
201 2020-01-01 Joel Brobecker <brobecker@adacore.com>
203 * server.c (gdbserver_version): Change copyright year to 2020.
204 * gdbreplay.c (gdbreplay_version): Likewise.
206 2019-12-19 Christian Biesinger <cbiesinger@google.com>
208 * configure: Regenerate.
209 * configure.ac: Quote variable arguments of test.
211 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
213 * Makefile.in: Fix build with GNU Make 3.81
215 2019-12-16 Tom Tromey <tromey@adacore.com>
217 * server.c (get_exec_file): Constify result.
219 2019-12-10 Christian Biesinger <cbiesinger@google.com>
221 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
222 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
223 * config.in: Regenerate.
224 * configure: Regenerate.
225 * configure.ac: Don't check for strerror.
226 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
227 Call safe_strerror instead of strerror.
228 * server.h (strerror): Remove this now-unnecessary declaration.
229 * tracepoint.c (init_named_socket): Call safe_strerror instead of
231 (gdb_agent_helper_thread): Likewise.
232 * utils.c (perror_with_name): Likewise.
234 2019-11-26 Tom Tromey <tom@tromey.com>
236 * configure, config.in: Rebuild.
238 2019-11-26 Tom Tromey <tom@tromey.com>
240 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
241 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
243 * configure, config.in: Rebuild.
245 2019-11-26 Tom Tromey <tom@tromey.com>
247 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
248 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
249 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
250 * acinclude.m4: Include ax_pthread.m4.
251 * config.in, configure: Rebuild.
253 2019-11-26 Christian Biesinger <cbiesinger@google.com>
255 * debug.c (debug_set_output): Call safe_strerror instead of
257 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
258 (linux_kill_one_lwp): Likewise.
259 (linux_detach_one_lwp): Likewise.
260 (linux_wait_for_event_filtered): Likewise.
261 (store_register): Likewise.
262 * lynx-low.c (lynx_attach): Likewise.
263 * mem-break.c (insert_memory_breakpoint): Likewise.
264 (remove_memory_breakpoint): Likewise.
265 (delete_fast_tracepoint_jump): Likewise.
266 (set_fast_tracepoint_jump): Likewise.
267 (uninsert_fast_tracepoint_jumps_at): Likewise.
268 (reinsert_fast_tracepoint_jumps_at): Likewise.
269 * nto-low.c (nto_xfer_memory): Likewise.
270 (nto_resume): Likewise.
272 2019-11-20 Luis Machado <luis.machado@linaro.org>
274 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
275 instead of register count.
276 * tdesc.c (tdesc_contains_feature): New function.
277 * tdesc.h (tdesc_contains_feature): New prototype.
279 2019-11-15 Christian Biesinger <cbiesinger@google.com>
281 * Makefile.in: Add safe-strerror.c.
282 * configure: Regenerate.
283 * configure.ac: Don't source common.host.
285 2019-11-15 Christian Biesinger <cbiesinger@google.com>
287 * config.in: Regenerate.
288 * configure: Regenerate.
290 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
292 * ax.c (ax_printf): Handle size_t_arg.
294 2019-11-06 Christian Biesinger <cbiesinger@google.com>
296 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
297 * mi/mi-main.c (output_cores): Likewise.
298 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
299 (linux_xfer_osdata_modules): Likewise.
300 * remote.c (register_remote_support_xml): Likewise.
301 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
302 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
304 2019-11-01 Christian Biesinger <cbiesinger@google.com>
306 * configure: Regenerate.
307 * configure.ac: Remove check for strerror_r.
309 2019-10-31 Christian Biesinger <cbiesinger@google.com>
311 * config.in: Regenerate.
312 * configure: Regenerate.
313 * configure.ac: Also check for strerror_r.
315 2019-10-31 Christian Biesinger <cbiesinger@google.com>
317 * ax.h (debug_agent): Remove duplicate declaration.
319 2019-10-26 Tom de Vries <tdevries@suse.de>
321 * linux-aarch64-low.c: Fix typos in comments.
322 * linux-arm-low.c: Same.
324 * linux-ppc-low.c: Same.
325 * proc-service.c: Same.
328 * tracepoint.c: Same.
331 2019-10-25 Tom Tromey <tromey@adacore.com>
333 * utils.c (xstrdup): Remove.
335 2019-10-23 Tom Tromey <tom@tromey.com>
337 * configure, config.in: Rebuild.
339 2019-10-23 Tom Tromey <tom@tromey.com>
341 * configure: Rebuild.
342 * acinclude.m4: Use m4_include, not sinclude.
344 2019-10-17 Tom Tromey <tromey@adacore.com>
346 * configure: Rebuild.
347 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
348 in AC_CONFIG_FILES invocation.
349 * Makefile.in (stamp-h, Makefile): Use new-style config.status
352 2019-10-16 Christian Biesinger <cbiesinger@google.com>
354 * server.c: Include xml-builtin.h.
355 (get_xml_features): Don't declare xml_builtins here.
357 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
359 * Makefile.in: Remove references to vec-ipa.o.
361 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
363 * Makefile.in: Remove references to vec.c.
365 2019-10-02 Christian Biesinger <cbiesinger@google.com>
367 * server.c (server_waiting): Change to bool.
368 (extended_protocol): Likewise.
369 (response_needed): Likewise.
370 (exit_requested): Likewise.
371 (run_once): Likewise.
372 (report_no_resumed): Likewise.
373 (non_stop): Likewise.
374 (disable_packet_vCont): Likewise.
375 (disable_packet_Tthread): Likewise.
376 (disable_packet_qC): Likewise.
377 (disable_packet_qfThreadInfo): Likewise.
378 (handle_general_set): Update.
379 (handle_detach): Update.
380 (handle_monitor_command): Update.
381 (handle_query): Update.
382 (captured_main): Update.
383 (process_serial_event): Update.
384 * server.h (server_waiting): Change to bool.
385 (disable_packet_vCont): Likewise.
386 (disable_packet_Tthread): Likewise.
387 (disable_packet_qC): Likewise.
388 (disable_packet_qfThreadInfo): Likewise.
389 (run_once): Likewise.
390 (non_stop): Likewise.
391 * target.c (target_stop_and_wait): Update.
393 2019-10-02 Tom Tromey <tromey@adacore.com>
395 * Makefile.in (SFILES): Add common-inferior.c.
396 (OBS): Add common-inferior.o.
397 * server.c (startup_with_shell): Don't define.
399 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
401 * linux-low.c (linux_low_read_btrace): Update for change to
404 2019-09-20 Christian Biesinger <cbiesinger@google.com>
406 * debug.c (debug_threads): Remove comment in favor of the header.
407 * debug.h (using_threads): Add declaration.
408 (debug_threads): Add comment.
409 * linux-aarch64-low.c: Include debug.h and remove declaration of
411 * nto-low.c: Likewise.
412 * remote-utils.c: Likewise.
413 * thread-db.c: Likewise.
415 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
417 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
418 and powerpc-cell64l-ipa.o.
419 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
420 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
421 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
424 * spu-low.c: Remove file.
426 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
427 (parse_spufs_run): Remove.
428 (ppc_get_pc): Remove Cell/B.E. support.
429 (ppc_set_pc): Likewise.
430 (ppc_breakpoint_at): Likewise.
431 (ppc_arch_setup): Likewise.
432 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
433 tdesc_powerpc_cell32l.
434 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
435 or init_registers_powerpc_cell32l.
436 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
437 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
438 or init_registers_powerpc_cell32l.
439 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
440 (init_registers_powerpc_cell32l): Remove prototype.
441 (init_registers_powerpc_cell64l): Likewise.
443 * target.h (struct target_ops): Remove qxfer_spu member.
444 * server.c (handle_qxfer_spu): Remove.
445 (qxfer_packets): Remove entry for "spu".
446 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
447 * linux-low.c (SPUFS_MAGIC): Remove.
448 (spu_enumerate_spu_ids): Remove.
449 (linux_qxfer_spu): Remove.
450 (linux_target_ops): Remove qxfer_spu member.
451 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
452 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
453 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
455 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
457 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
458 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
459 * config.in: Regenerate.
460 * configure: Regenerate.
462 2019-08-15 Tom Tromey <tromey@adacore.com>
464 * target.c (target_write_memory): Use gdb::byte_vector.
466 2019-08-15 Tom Tromey <tromey@adacore.com>
468 * tracepoint.c (write_inferior_data_pointer)
469 (write_inferior_integer, write_inferior_int8)
470 (write_inferior_uinteger, m_tracepoint_action_download)
471 (r_tracepoint_action_download, x_tracepoint_action_download)
472 (l_tracepoint_action_download, clear_inferior_trace_buffer)
473 (download_agent_expr, download_tracepoint_1)
474 (download_trace_state_variables, upload_fast_traceframes): Update.
475 * server.c (gdb_write_memory): Update.
476 * remote-utils.c (relocate_instruction): Update.
477 * proc-service.c (ps_pdwrite): Update.
478 * mem-break.c (remove_memory_breakpoint)
479 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
480 (uninsert_fast_tracepoint_jumps_at)
481 (reinsert_fast_tracepoint_jumps_at): Update.
482 * linux-x86-low.c (append_insns)
483 (i386_install_fast_tracepoint_jump_pad)
484 (amd64_write_goto_address, i386_write_goto_address): Update.
485 * linux-s390-low.c (append_insns, s390_write_goto_address):
487 * linux-ppc-low.c (ppc_relocate_instruction)
488 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
489 (ppc_write_goto_address): Update.
490 * linux-aarch64-low.c (append_insns): Update.
491 * target.h (struct target_ops): Update.
492 (write_inferior_memory): Don't declare.
493 * target.c (target_write_memory): Rename from
494 write_inferior_memory. Remove old target_write_memory.
496 2019-08-15 Tom Tromey <tromey@adacore.com>
498 * target.c (write_inferior_memory): Use std::vector.
500 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
503 * configure.ac: Drop enable-libmcheck support.
504 * configure, config.in: Rebuild.
505 * acinclude.m4: Don't include it.
507 2019-07-19 Alan Hayward <alan.hayward@arm.com>
509 * configure.srv: Remove Arm xml files.
511 2019-07-19 Alan Hayward <alan.hayward@arm.com>
513 * configure.srv: Add new files. Remove xml generated files.
514 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
516 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
517 * linux-aarch32-tdesc.c: New file.
518 * linux-aarch32-tdesc.h: New file.
519 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
520 * linux-arm-low.c (init_registers_arm, tdesc_arm)
521 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
522 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
523 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
524 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
525 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
526 (arm_read_description): Call arm_linux_read_description.
527 (initialize_low_arch): Don't init registers.
528 * linux-arm-tdesc.c: New file.
529 * linux-arm-tdesc.h: New file.
531 2019-07-10 Alan Hayward <alan.hayward@arm.com>
533 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
534 Move counter inside for.
535 (arm_read_description): Check ptrace earlier.
536 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
538 2019-07-09 Tom Tromey <tom@tromey.com>
540 * configure: Rebuild.
541 * configure.ac: Change common to gdbsupport.
542 * acinclude.m4: Change common to gdbsupport.
543 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
544 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
545 common to gdbsupport.
546 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
547 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
548 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
549 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
550 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
551 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
552 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
553 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
554 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
555 common to gdbsupport.
557 2019-07-04 Alan Hayward <alan.hayward@arm.com>
559 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
561 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
563 2019-07-04 Alan Hayward <alan.hayward@arm.com>
565 * configure.srv: Remove legacy xml.
566 * linux-aarch64-low.c (initialize_low_arch): Remove
567 initialize_low_tdesc call.
568 * linux-aarch64-tdesc-selftest.c: Remove file.
569 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
570 * linux-x86-low.c (initialize_low_arch): Remove
571 initialize_low_tdesc call.
572 * linux-x86-tdesc-selftest.c: Remove file.
573 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
575 2019-06-20 Tom de Vries <tdevries@suse.de>
577 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
578 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
580 2019-06-19 Tom de Vries <tdevries@suse.de>
582 * debug.h (debug_write): Change return type to ssize_t.
583 * debug.c (debug_write): Same.
585 2019-06-14 Tom Tromey <tom@tromey.com>
587 * configure.ac: Use new path to gnulib.
588 * configure: Rebuild.
589 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
592 2019-06-11 Tom Tromey <tom@tromey.com>
594 * Makefile.in (SFILES): Add alloc.c.
596 (IPA_OBJS): Add alloc-ipa.o.
597 (alloc-ipa.o): New target.
598 (%.o: ../%.c): New pattern rule.
600 2019-06-10 Tom Tromey <tromey@adacore.com>
602 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
603 end warning with a newline.
604 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
606 * thread-db.c (attach_thread): Don't end warning with a newline.
607 (thread_db_notice_clone): Likewise.
608 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
610 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
611 end warning with a newline.
613 2019-06-04 Pedro Alves <palves@redhat.com>
615 * server.c (captured_main): Use make_unique_xstrdup.
617 2019-06-02 Tom Tromey <tom@tromey.com>
619 * gdbreplay.c (fromhex): Remove.
620 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
622 2019-05-29 Tom Tromey <tromey@adacore.com>
624 * configure: Rebuild.
626 2019-05-06 Kevin Buettner <kevinb@redhat.com>
628 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
629 sign extension code on 32-bit builds.
631 2019-05-03 Eli Zaretskii <eliz@gnu.org>
634 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
636 2019-04-19 Tom Tromey <tom@tromey.com>
638 * server.c (struct vstop_notif): Derive from notif_event.
640 (queue_stop_reply): Update.
641 (remove_all_on_match_ptid): Change type. Rewrite.
642 (discard_queued_stop_replies): Rewrite.
643 (in_queued_stop_replies_ptid): Change type.
644 (in_queued_stop_replies): Rewrite.
645 (notif_stop): Update.
646 (queue_stop_reply_callback): Update.
647 (captured_main): Don't call initialize_notif.
648 (push_stop_notification): Update.
649 * notif.c (notif_write_event, handle_notif_ack)
650 (notif_event_enque, notif_push): Update.
651 (notif_event_xfree, initialize_notif): Remove.
652 * notif.h (struct notif_event): Include <list>, not
654 (struct notif_server) <queue>: Now a std::list.
655 (notif_event_p): Remove typedef.
656 (initialize_notif): Don't declare.
657 (struct notif_event): Add virtual destructor.
659 2019-04-17 Alan Hayward <alan.hayward@arm.com>
661 * ax.c (ax_vdebug): Call debug_printf.
662 * debug.c (debug_write): New function.
663 * debug.h (debug_write): New declaration.
664 * linux-low.c (sigchld_handler): Call debug_write.
666 2019-04-17 Alan Hayward <alan.hayward@arm.com>
668 * debug.c (debug_set_output): New function.
669 (debug_vprintf): Send output to debug_file.
670 (debug_flush): Likewise.
671 * debug.h (debug_set_output): New declaration.
672 * server.c (handle_monitor_command): Add debug-file option.
673 (captured_main): Likewise.
675 2019-04-17 Alan Hayward <alan.hayward@arm.com>
677 * debug.c (remote_debug): Add definition.
678 * debug.h (remote_debug): Add declaration.
679 * hostio.c (remote_debug): Remove declaration.
680 * remote-utils.c (struct ui_file): Likewise.
681 (remote_debug): Likewise.
682 * remote-utils.h (remote_debug): Likewise,
683 * server.c (remote_debug): Remove definition.
685 2019-04-10 Kevin Buettner <kevinb@redhat.com>
687 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
688 when using a 64-bit gdbserver.
690 2019-04-09 Tom Tromey <tromey@adacore.com>
692 * linux-low.c (select_event_lwp): Use find_thread_in_random.
694 2019-04-08 Tom Tromey <tom@tromey.com>
696 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
698 (linux_resume_one_lwp): Likewise.
700 2019-04-08 Tom Tromey <tom@tromey.com>
702 * gdbreplay.c: Update.
703 * linux-low.c: Update.
706 2019-04-08 Tom Tromey <tom@tromey.com>
708 * server.c: Use C++ exception handling.
709 * linux-low.c: Use C++ exception handling.
710 * gdbreplay.c: Use C++ exception handling.
712 2019-04-08 Tom Tromey <tom@tromey.com>
714 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
715 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
716 (captured_main, main): Update.
717 * gdbreplay.c (main): Update.
719 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
721 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
722 value in argument pointer, return 1 if the entry is found and 0
723 otherwise. Move comment.
724 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
725 * linux-low.h (linux_get_auxv): Declare.
726 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
728 2019-04-05 Tom Tromey <tromey@adacore.com>
730 * server.c (gdbserver_usage): Use upper-case for metasyntactic
733 2019-03-28 Alan Hayward <alan.hayward@arm.com>
735 * linux-low.c (AT_HWCAP2): Add define if not already included.
737 2019-03-26 Alan Hayward <alan.hayward@arm.com>
739 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
740 (aarch64_arch_setup): Call linux_get_hwcap.
741 * linux-arm-low.c (arm_get_hwcap): Remove function.
742 (arm_read_description): Call linux_get_hwcap.
743 * linux-low.c (linux_get_auxv): New function.
744 (linux_get_hwcap): Likewise.
745 (linux_get_hwcap2): Likewise.
746 * linux-low.h (linux_get_hwcap): New declaration.
747 (linux_get_hwcap2): Likewise.
748 * linux-ppc-low.c (ppc_get_auxv): Remove function.
749 (ppc_arch_setup): Call linux_get_hwcap.
750 * linux-s390-low.c (s390_get_hwcap): Remove function.
751 (s390_arch_setup): Call linux_get_hwcap.
753 2019-03-22 Alan Hayward <alan.hayward@arm.com>
754 Jiong Wang <jiong.wang@arm.com>
756 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
757 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
759 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
761 2019-03-22 Alan Hayward <alan.hayward@arm.com>
762 Jiong Wang <jiong.wang@arm.com>
764 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
765 (aarch64_get_hwcap): New function.
766 (aarch64_arch_setup): Read APIA hwcap.
768 2019-03-22 Alan Hayward <alan.hayward@arm.com>
769 Jiong Wang <jiong.wang@arm.com>
771 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
772 (initialize_low_tracepoint): Likewise.
773 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
774 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
775 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
776 (aarch64_linux_read_description): Likewise.
777 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
779 2019-03-12 John Baldwin <jhb@FreeBSD.org>
781 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
782 i386_create_target_description for 'segments' parameter.
783 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
784 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
785 * win32-i386-low.c (i386_arch_setup): Likewise.
787 2019-03-12 Tom Tromey <tromey@adacore.com>
789 * linux-low.c (iterate_over_lwps): Update.
791 2019-03-06 Tom Tromey <tom@tromey.com>
793 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
794 (captured_main): Use SCOPE_EXIT.
796 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
798 * configure.srv: Use '$enable_unittest' instead of '$development'
799 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
802 2019-02-27 Tom Tromey <tromey@adacore.com>
804 * gdbreplay.c (logchar): Handle \r\n.
806 2019-02-07 Alan Hayward <alan.hayward@arm.com>
808 * linux-low.c (linux_attach): Add process before lwp.
809 * server.c (attach_inferior): Check if already attached.
811 2019-02-07 Tom Tromey <tom@tromey.com>
813 * x86-tdesc.h: Rename include guard.
814 * x86-low.h: Add include guard.
815 * wincecompat.h: Rename include guard.
816 * win32-low.h: Add include guard.
817 * utils.h: Rename include guard.
818 * tracepoint.h: Rename include guard.
819 * tdesc.h: Rename include guard.
820 * target.h: Rename include guard.
821 * server.h: Rename include guard.
822 * remote-utils.h: Rename include guard.
823 * regcache.h: Rename include guard.
824 * nto-low.h: Rename include guard.
825 * notif.h: Add include guard.
826 * mem-break.h: Rename include guard.
827 * lynx-low.h: Add include guard.
828 * linux-x86-tdesc.h: Add include guard.
829 * linux-s390-tdesc.h: Add include guard.
830 * linux-ppc-tdesc-init.h: Add include guard.
831 * linux-low.h: Add include guard.
832 * linux-aarch64-tdesc.h: Add include guard.
833 * linux-aarch32-low.h: Add include guard.
834 * inferiors.h: Rename include guard.
835 * i387-fp.h: Rename include guard.
836 * hostio.h: Rename include guard.
837 * gdbthread.h: Rename include guard.
838 * gdb_proc_service.h: Rename include guard.
839 * event-loop.h: Rename include guard.
840 * dll.h: Rename include guard.
841 * debug.h: Rename include guard.
842 * ax.h: Rename include guard.
844 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
847 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
848 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
850 2019-01-25 Tom Tromey <tom@tromey.com>
852 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
854 2019-01-25 Tom Tromey <tom@tromey.com>
856 * win32-low.c: Fix common/ includes.
857 * win32-i386-low.c: Fix common/ includes.
858 * tracepoint.c: Fix common/ includes.
859 * thread-db.c: Fix common/ includes.
860 * target.h: Fix common/ includes.
861 * symbol.c: Fix common/ includes.
862 * spu-low.c: Fix common/ includes.
863 * server.h: Fix common/ includes.
864 * server.c: Fix common/ includes.
865 * remote-utils.c: Fix common/ includes.
866 * regcache.h: Fix common/ includes.
867 * regcache.c: Fix common/ includes.
868 * nto-x86-low.c: Fix common/ includes.
869 * notif.h: Fix common/ includes.
870 * mem-break.h: Fix common/ includes.
871 * lynx-low.c: Fix common/ includes.
872 * lynx-i386-low.c: Fix common/ includes.
873 * linux-x86-tdesc-selftest.c: Fix common/ includes.
874 * linux-x86-low.c: Fix common/ includes.
875 * linux-low.c: Fix common/ includes.
876 * inferiors.h: Fix common/ includes.
877 * i387-fp.c: Fix common/ includes.
878 * hostio.c: Fix common/ includes.
879 * hostio-errno.c: Fix common/ includes.
880 * gdbthread.h: Fix common/ includes.
881 * gdbreplay.c: Fix common/ includes.
882 * fork-child.c: Fix common/ includes.
883 * event-loop.c: Fix common/ includes.
885 (enum gdb_agent_op): Fix common/ includes.
887 2019-01-21 Tom Tromey <tom@tromey.com>
889 * tracepoint.c: Fix includes.
890 * remote-utils.c: Fix includes.
891 * linux-x86-low.c: Fix includes.
893 2019-01-01 Joel Brobecker <brobecker@adacore.com>
895 * gdbreplay.c (gdbreplay_version): Update copyright year in
897 * server.c (gdbserver_version): Likewise.
899 2018-12-05 Alan Hayward <alan.hayward@arm.com>
901 * linux-low.c (add_lwp): Switch ordering.
903 2018-11-29 Tom Tromey <tom@tromey.com>
905 * win32-low.c (win32_join): Take pid, not process.
906 * target.h (struct target_ops) <join>: Change argument type.
907 (join_inferior): Change argument name.
908 * spu-low.c (spu_join): Take pid, not process.
909 * server.c (handle_detach): Preserve pid before destroying
911 * lynx-low.c (lynx_join): Take pid, not process.
912 * linux-low.c (linux_join): Take pid, not process.
914 2018-11-23 Alan Hayward <alan.hayward@arm.com>
916 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
917 (aarch64_cannot_fetch_register): Likewise.
918 (struct linux_target_ops): Update references.
920 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
922 * linux-ppc-low.c: Include nat/linux-ptrace.h.
924 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
926 * configure.srv (ipa_ppc_linux_regobj): Add
927 powerpc-isa207-htm-vsx32l-ipa.o and
928 powerpc-isa207-htm-vsx64l-ipa.o.
929 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
930 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
931 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
932 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
933 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
934 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
935 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
936 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
937 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
938 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
939 (init_registers_powerpc_isa207_htm_vsx32l)
940 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
941 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
942 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
943 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
944 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
945 (ppc_store_tm_ctarregset): New functions.
946 (ppc_regsets): Add entries for HTM regsets.
947 (ppc_arch_setup): Set htm in features struct when needed. Set
948 sizes for the HTM regsets.
949 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
950 (initialize_low_arch): Call
951 init_registers_powerpc_isa207_htm_vsx32l and
952 init_registers_powerpc_isa207_htm_vsx64l.
953 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
954 PPC_TDESC_ISA207_HTM_VSX.
955 (initialize_low_tracepoint): Call
956 init_registers_powerpc_isa207_htm_vsx32l and
957 init_registers_powerpc_isa207_htm_vsx64l.
959 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
961 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
962 rs6000/power-linux-pmu.xml to srv_xmlfiles.
963 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
964 (ppc_store_pmuregset): New functions.
965 (ppc_regsets): Add entries for ebb and pmu regsets.
966 (ppc_arch_setup): Set isa207 in features struct if the ebb and
967 pmu regsets are available. Set sizes for these regsets.
969 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
971 * configure.srv (ipa_ppc_linux_regobj): Add
972 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
973 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
974 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
975 rs6000/powerpc-isa207-vsx32l.xml, and
976 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
977 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
978 <PPC_TDESC_ISA207_VSX>: New enum value.
979 (init_registers_powerpc_isa207_vsx32l): Declare.
980 (init_registers_powerpc_isa207_vsx64l): Declare.
981 * linux-ppc-low.c (ppc_fill_tarregset): New function.
982 (ppc_store_tarregset): New function.
983 (ppc_regsets): Add entry for the TAR regset.
984 (ppc_arch_setup): Set isa207 in features struct when needed. Set
985 size for the TAR regsets.
986 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
987 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
988 and init_registers_powerpc_isa207_vsx64l.
989 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
990 (initialize_low_tracepoint): Call
991 init_registers_powerpc_isa207_vsx32l and
992 init_registers_powerpc_isa207_vsx64l.
994 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
995 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
997 * configure.srv (ipa_ppc_linux_regobj): Add
998 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
999 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
1000 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
1001 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
1002 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
1003 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
1004 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
1005 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
1006 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
1007 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
1008 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
1009 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
1010 (ppc_hwcap): Add comment.
1011 (ppc_hwcap2): New global.
1012 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
1013 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
1014 (ppc_regsets): Add entries for the DSCR and PPR regsets.
1015 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
1016 when needed. Set sizes for the the DSCR and PPR regsets.
1017 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
1018 (initialize_low_arch): Call
1019 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1020 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1021 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
1022 PPC_TDESC_ISA205_PPR_DSCR_VSX.
1023 (initialize_low_tracepoint): Call
1024 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
1025 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
1027 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1029 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
1031 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
1032 Simon Marchi <simark@simark.ca>
1034 * acinclude.m4: Include "../selftest.m4".
1035 * configure: Regenerate.
1036 * configure.ac: Use "GDB_AC_SELFTEST".
1037 * configure.srv: Use "$enable_unittests" instead of
1038 "$development" when checking whether unit tests have been
1040 * server.c (captured_main): Update message informing that
1041 selftests have been disabled.
1043 2018-10-04 Tom Tromey <tom@tromey.com>
1045 * configure: Rebuild.
1047 2018-10-04 Tom Tromey <tom@tromey.com>
1049 * server.c (handle_status): Rename inner "thread".
1050 (process_serial_event): Declare "res" in 'm' case.
1051 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
1052 (iterate_over_lwps): Rename inner "thread".
1053 (linux_qxfer_libraries_svr4): Rename inner "len".
1054 * gdbthread.h (find_thread_in_random): Rename inner "thread".
1056 2018-10-01 Gary Benson <gbenson@redhat.com>
1058 * gdb_proc_service.h: Moved common code to
1059 common/gdb_proc_service.h.
1061 2018-10-01 Gary Benson <gbenson@redhat.com>
1063 * gdb_proc_service.h: Synchronize comments and whitespace with
1064 GDB's version of this file.
1066 2018-09-25 Tom Tromey <tom@tromey.com>
1068 * configure: Rebuild.
1069 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
1071 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1073 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
1074 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
1075 ($(IPA_LIB)): Sort IPA_OBJS.
1077 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
1079 * Makefile.in: Remove references to $(ADD_DEPS).
1081 2018-09-16 Tom Tromey <tom@tromey.com>
1083 * remote-utils.c (remote_open): Use GNU style for metasyntactic
1085 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
1088 2018-09-05 Tom Tromey <tom@tromey.com>
1090 * configure: Rebuild.
1092 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
1095 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
1097 2018-08-27 Tom Tromey <tom@tromey.com>
1100 * configure: Rebuild.
1102 2018-08-27 Tom Tromey <tom@tromey.com>
1104 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
1105 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
1106 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
1107 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
1108 (s390x_emit_stack_adjust): Add casts to unsigned char.
1110 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
1114 * server.h (struct client_state) <disable_randomization>:
1117 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1119 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
1121 (mips_supply_ptrace_register): Likewise.
1123 2018-07-22 Tom Tromey <tom@tromey.com>
1125 * configure: Rebuild.
1127 2018-07-22 Tom Tromey <tom@tromey.com>
1129 * win32-low.c (win32_create_inferior): Remove unused variables.
1130 * gdbreplay.c (remote_open): Remove unused variable.
1131 * remote-utils.c (remote_prepare): Remove unused variable.
1132 * x86-tdesc.h (X86_TDESC_H): Define.
1133 (amd64_expedite_regs): Define conditionally.
1134 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
1135 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
1136 * remote-utils.c (readchar): Remove unused variable.
1138 2018-07-13 Pedro Alves <palves@redhat.com>
1140 * linux-low.c (linux_kill): Change parameter to process_info
1141 pointer instead of pid. Adjust.
1142 * lynx-low.c (lynx_kill): Likewise.
1143 * nto-low.c (nto_kill): Likewise.
1144 * spu-low.c (spu_kill): Likewise.
1145 * win32-low.c (win32_kill): Likewise.
1146 * server.c (handle_v_kill, kill_inferior_callback)
1147 (detach_or_kill_for_exit): Adjust.
1148 * target.c (kill_inferior): Change parameter to process_info
1149 pointer instead of pid. Adjust.
1150 * target.h (struct target_ops) <kill>: Change parameter to
1151 process_info pointer instead of pid. Adjust all implementations
1153 (kill_inferior): Likewise.
1155 2018-07-13 Pedro Alves <palves@redhat.com>
1157 * linux-low.c (linux_detach, linux_join): Change parameter to
1158 process_info pointer instead of pid. Adjust.
1159 * lynx-low.c (lynx_detach, lynx_join): Likewise.
1160 * nto-low.c (nto_detach): Likewise.
1161 * spu-low.c (spu_detach, spu_join): Likewise.
1162 * win32-low.c (win32_detach, win32_join): Likewise.
1163 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
1164 * target.h (struct target_ops) <detach, join>: Change parameter to
1165 process_info pointer instead of pid. Adjust all implementations
1167 (detach_inferior, join_inferior): Rename 'pid' parameter to
1170 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1171 Jan Kratochvil <jan.kratochvil@redhat.com>
1172 Paul Fertser <fercerpav@gmail.com>
1173 Tsutomu Seki <sekiriki@gmail.com>
1175 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
1176 (OBS): Add 'common/netstuff.o'.
1177 (GDBREPLAY_OBS): Likewise.
1178 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
1179 (remote_open): Implement support for IPv6
1181 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
1183 (handle_accept_event): Accept connections from IPv6 sources.
1184 (remote_prepare): Handle IPv6-style hostnames; implement
1185 support for IPv6 connections.
1186 (remote_open): Implement support for printing connections from
1189 2018-07-11 Pedro Alves <palves@redhat.com>
1192 * mem-break.c (any_persistent_commands): Add process_info
1193 parameter and use it instead of relying on the current process.
1194 Change return type to bool.
1195 * mem-break.h (any_persistent_commands): Add process_info
1196 parameter and change return type to bool.
1197 * server.c (handle_detach): Remove require_running_or_return call.
1198 Look up the process_info for the process we're about to detach.
1199 If not found, return back error to GDB. Adjust
1200 any_persistent_commands call to pass down a process pointer.
1202 2018-07-11 Pedro Alves <palves@redhat.com>
1204 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1205 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1206 instead of collect_register_by_name.
1207 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1208 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1210 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1211 Pedro Alves <palves@redhat.com>
1213 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1215 2018-07-03 Tom Tromey <tom@tromey.com>
1217 * linux-low.c: Update.
1218 * lynx-low.c: Update.
1219 * mem-break.c: Update.
1220 * nto-low.c: Update.
1221 * remote-utils.c: Update.
1223 * spu-low.c: Update.
1225 * win32-low.c: Update.
1227 2018-07-03 Tom Tromey <tom@tromey.com>
1231 2018-07-03 Tom Tromey <tom@tromey.com>
1233 * linux-low.c: Update.
1235 2018-07-03 Tom Tromey <tom@tromey.com>
1239 2018-07-03 Tom Tromey <tom@tromey.com>
1241 * linux-low.c: Update.
1242 * linux-mips-low.c: Update.
1243 * lynx-low.c: Update.
1244 * nto-low.c: Update.
1245 * remote-utils.c: Update.
1247 * spu-low.c: Update.
1249 * thread-db.c: Update.
1251 2018-07-03 Tom Tromey <tom@tromey.com>
1253 * linux-low.c: Update.
1254 * linux-mips-low.c: Update.
1255 * lynx-low.c: Update.
1256 * mem-break.c: Update.
1257 * nto-low.c: Update.
1258 * remote-utils.c: Update.
1260 * spu-low.c: Update.
1262 * tracepoint.c: Update.
1264 2018-07-03 Tom Tromey <tom@tromey.com>
1266 * linux-low.c: Update.
1267 * linux-ppc-low.c: Update.
1268 * linux-x86-low.c: Update.
1269 * proc-service.c: Update.
1271 * spu-low.c: Update.
1272 * thread-db.c: Update.
1273 * win32-low.c: Update.
1275 2018-07-03 Tom Tromey <tom@tromey.com>
1277 * linux-low.c: Update.
1278 * lynx-low.c: Update.
1279 * nto-low.c: Update.
1280 * remote-utils.c: Update.
1281 * spu-low.c: Update.
1282 * thread-db.c: Update.
1283 * win32-low.c: Update.
1285 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1287 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1288 parameter in call to 'amd64_create_target_description'.
1290 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1292 * x86-tdesc.h: Remove executable permission flag.
1294 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1296 * configure.ac: Remove AC_PREREQ, add missing quoting.
1297 * configure: Re-generate.
1298 * config.in: Re-generate.
1299 * aclocal.m4: Re-generate.
1301 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1303 * tracepoint.h (current_traceframe): Remove declaration.
1305 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1307 * linux-aarch64-low.c (is_sve_tdesc): New function.
1308 (aarch64_sve_regs_copy_to_regcache): Likewise.
1309 (aarch64_sve_regs_copy_from_regcache): Likewise.
1310 (aarch64_regs_info): Add SVE checks.
1311 (initialize_low_arch): Initialize SVE.
1313 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1315 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1317 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1319 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1320 (initialize_low_tracepoint): Likewise
1321 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1322 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1324 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1326 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1328 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1330 * server.h (PBUFSIZ): Increase size
1332 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1334 * regcache.c (regcache::raw_compare): New function.
1335 * regcache.h (regcache::raw_compare): New declaration.
1337 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1339 * regcache.c (new_register_cache): Use new.
1340 (free_register_cache): Use delete.
1341 (register_data): Use const.
1342 (supply_register): Move body inside regcache.
1343 (regcache::raw_supply): New override function.
1344 (collect_register): Move body inside regcache.
1345 (regcache::raw_collect): New override function.
1346 (regcache::get_register_status): New override function.
1347 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1349 2018-06-09 Tom Tromey <tom@tromey.com>
1351 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1353 (event_queue): Use std::queue.
1354 (gdb_event_xfree): Remove.
1355 (initialize_event_loop, process_event, wait_for_event): Update.
1357 2018-06-08 Stan Cox <scox@redhat.com>
1359 * win32-low.c (win32_create_inferior): last_ptid and last_status
1360 moved to client_state.
1362 2018-06-08 Pedro Alves <palves@redhat.com>
1364 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1365 common/common-exceptions.o, common/common-utils.o,
1366 common/errors.o, common/print-utils.o and utils.o.
1367 * gdbreplay.c: Include "common-defs.h" instead of the two
1368 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1369 string.h or alloca.h.
1370 (perror_with_name): Delete.
1371 (remote_open): Use xstrdup instead of strdup.
1372 (main): Rename to ...
1373 (captured_main): ... this.
1376 2018-06-08 Tom Tromey <tom@tromey.com>
1378 * linux-low.c (linux_low_read_btrace): Update.
1380 2018-06-04 Stan Cox <scox@redhat.com>
1382 * server.h (struct client_state): New.
1383 * server.c (cont_thread, general_thread, multi_process)
1384 (report_fork_events, report_vfork_events, report_exec_events)
1385 (report_thread_events, swbreak_feature, hwbreak_feature)
1386 (vCont_supported, disable_randomization, pass_signals)
1387 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1388 Moved to client_state.
1389 * remote-utils.c (remote_debug, noack_mode)
1390 (transport_is_reliable): Moved to client_state.
1391 * tracepoint.c (current_traceframe): Moved to client_state.
1394 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1395 linux-low.c, remote-utils.h, target.c: Use client_state.
1397 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1399 * configure.srv: Add new c/h file.
1401 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1403 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1406 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1408 * gdb.arch/mips-fpregset-core.exp: New test.
1409 * gdb.arch/mips-fpregset-core.c: New test source.
1411 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1414 * hostio.c (require_int): Do not report overflow for integers
1415 between 0xfffffff and 0x7fffffff.
1417 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1419 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1420 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1421 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1423 (the_low_target): Wire them.
1425 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1427 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1428 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1429 mode. Call collect_register_by_name with vscr using
1430 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1431 (ppc_store_vrregset): Add and set vscr_offset variable as in
1432 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1435 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1437 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1438 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1439 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1441 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1443 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1444 (ppc_store_vsxregset): Likewise.
1445 (ppc_fill_vrregset): Likewise.
1446 (ppc_store_vrregset): Likewise.
1447 (ppc_fill_evrregset): Likewise.
1448 (ppc_store_evrregset): Likewise.
1449 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1450 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1453 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1455 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1456 wordsize of the inferior. Call ppc_linux_target_wordsize.
1458 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1460 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1461 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1462 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1463 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1464 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1465 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1466 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1467 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1468 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1469 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1470 (tdesc_powerpc_e500l): Remove.
1471 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1472 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1473 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1474 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1476 (ppc_arch_setup): Remove target description matching code. Fill a
1477 ppc_linux_features struct and call ppc_linux_match_description
1480 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1482 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1483 width of the requested register exceeds the width of the
1485 (mips_cannot_store_register): Likewise.
1487 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1489 * linux-mips-low.c (mips_fetch_register): New function. Update
1491 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1492 (the_low_target): Wire `mips_fetch_register'.
1494 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1496 * lynx-i386-low.c (LYNXOS_178): New macro.
1497 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1498 the layout on LynxOS-178.
1499 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1500 handle floating point registers that are not supported by
1503 2018-05-10 Tom Tromey <tom@tromey.com>
1505 * configure: Rebuild.
1507 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1510 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1511 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1512 Use it to set the expedite_regs field in the given tdesc.
1513 * x86-tdesc.h: New file.
1514 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1515 Adjust following the addition of the new expedite_regs parameter
1516 to init_target_desc.
1517 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1518 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1519 (i386_linux_read_description, amd64_linux_read_description):
1520 Adjust following the addition of the new expedite_regs parameter
1521 to init_target_desc.
1522 * lynx-i386-low.c: #include "x86-tdesc.h".
1523 (lynx_i386_arch_setup): Adjust following the addition of the new
1524 expedite_regs parameter to init_target_desc.
1525 * nto-x86-low.c: #include "x86-tdesc.h".
1526 (nto_x86_arch_setup): Adjust following the addition of the new
1527 expedite_regs parameter to init_target_desc.
1528 * win32-i386-low.c: #include "x86-tdesc.h".
1529 (i386_arch_setup): Adjust following the addition of the new
1530 expedite_regs parameter to init_target_desc.
1532 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1535 * win32-low.c (win32_create_inferior): Add call to my_wait
1536 setting last_status global.
1538 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1541 * win32-low.c (create_process): Only call gdb_tilde_expand if
1542 inferior_cwd is not NULL.
1544 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1546 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1547 registers to the cache if their values have changed.
1548 (i387_xsave_to_cache): Provide default values for x87 control
1549 registers when these features are available, but disabled.
1550 * regcache.c (supply_register_by_name_zeroed): New function.
1551 * regcache.h (supply_register_by_name_zeroed): Declare new
1554 2018-05-07 Tom Tromey <tom@tromey.com>
1556 * configure: Rebuild.
1558 2018-05-04 Tom Tromey <tom@tromey.com>
1560 * configure: Rebuild.
1562 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1563 Pedro Alves <palves@redhat.com>
1565 * linux-aarch64-low.c (aarch64_stopped_data_address):
1568 2018-04-27 Tom Tromey <tom@tromey.com>
1570 * configure: Rebuild.
1572 2018-04-23 Tom Tromey <tom@tromey.com>
1574 * configure: Rebuild.
1576 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1578 * Makefile.in (depcomp): Add "..".
1579 (all_deps_files): New and use it.
1581 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1583 * configure.srv (aarch64*-*-linux*): Don't include xml.
1584 (i[34567]86-*-cygwin*): Likewise.
1585 (i[34567]86-*-linux*): Likewise.
1586 (i[34567]86-*-lynxos*): Likewise.
1587 (i[34567]86-*-mingw32ce*): Likewise.
1588 (i[34567]86-*-mingw*): Likewise.
1589 (i[34567]86-*-nto*): Likewise.
1590 (tic6x-*-uclinux): Likewise.
1591 (x86_64-*-linux*): Likewise.
1592 (x86_64-*-mingw*): Likewise.
1593 (x86_64-*-cygwin*): Likewise.
1595 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1597 * tdesc.c: Remove xml parameter.
1599 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1601 * server.c (get_features_xml): Remove cast.
1602 * tdesc.c (void target_desc::accept): Fill in function.
1603 (tdesc_get_features_xml): Remove old xml creation.
1604 (print_xml_feature::visit_pre): Add xml vistor.
1605 * tdesc.h (struct target_desc): Make xmltarget mutable.
1606 (tdesc_get_features_xml): Remove declaration.
1608 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1610 * tdesc.c (tdesc_architecture_name): Add new function.
1611 (tdesc_osabi_name): Likewise.
1612 (tdesc_get_features_xml): Use new functions.
1614 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1616 * tdesc.c (tdesc_create_flags): Remove.
1617 (tdesc_add_flag): Likewise.
1618 (tdesc_named_type): Likewise.
1619 (tdesc_create_union): Likewise.
1620 (tdesc_create_struct): Likewise.
1621 (tdesc_create_vector): Likewise.
1622 (tdesc_add_bitfield): Likewise.
1623 (tdesc_add_field): Likewise.
1624 (tdesc_set_struct_size): Likewise.
1626 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1628 * tdesc.c (~target_desc): Remove implictly deleted items.
1629 (init_target_desc): Iterate all features.
1630 (tdesc_get_features_xml): Use vector.
1631 (tdesc_create_feature): Create feature.
1632 * tdesc.h (tdesc_feature) Remove
1633 (target_desc): Add features.
1635 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1637 * Makefile.in: Add common/tdesc.c
1638 * tdesc.c (init_target_desc): init all reg_defs from register
1640 (tdesc_create_reg): Create tdesc_reg.
1641 * tdesc.h (tdesc_feature): Add register vector.
1643 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1645 * tdesc.h (struct target_desc) <features>: Change type to
1646 std::vector<std::string>.
1647 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1649 (tdesc_get_features_xml): Likewise.
1650 (tdesc_create_feature): Likewise.
1652 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1654 * regcache.c (find_register_by_number): Return a ref.
1655 (find_regno): Use references.
1656 (register_size): Likewise.
1657 (register_data): Likewise.
1658 * tdesc.c (target_desc::~target_desc): Remove free calls.
1659 (target_desc::operator==): Use std::vector compare.
1660 (init_target_desc): Use reference.
1661 (tdesc_create_reg): Use reg constructors.
1662 * tdesc.h (struct target_desc): Replace pointer with object.
1664 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1666 * regcache.c (find_register_by_number): Make static.
1667 (find_regno): Use find_register_by_number
1668 * regcache.h (struct reg): Remove declaration.
1670 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1672 * tdesc.c (target_desc::~target_desc): Move to here.
1673 (target_desc::operator==): Likewise.
1674 * tdesc.h (target_desc::~target_desc): Move from here.
1675 (target_desc::operator==): Likewise.
1677 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1679 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1681 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1683 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1685 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1686 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1687 and init_registers_s390_gs_linux64.
1689 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1691 * linux-s390-low.c (s390_fill_gs): Remove function.
1692 (s390_fill_gsbc): Remove function.
1693 (s390_regsets): Set fill functions for the guarded storage regsets
1696 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1698 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1699 the word size. Add comment.
1700 (s390_get_wordsize): New function.
1701 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1702 pswm with it. Instead, use s390_get_wordsize to determine the
1703 word size first and derive the correct tdesc from that directly.
1705 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1707 * Makefile.in: Include silent-rules.mk.
1708 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1709 (COMPILE): Add ECHO_CXX.
1710 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1711 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1712 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1713 (version-generated.c): Add ECHO_GEN.
1714 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1715 (IPAGENT_COMPILE): Add ECHO_CXX.
1716 (%-generated.c): Add ECHO_REGDAT.
1718 2018-03-14 Tom Tromey <tom@tromey.com>
1721 * ax.c (ax_printf): Special case for NULL.
1723 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1725 * linux-low.c (linux_qxfer_libraries_svr4): Use
1726 xml_escape_text_append.
1728 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1730 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1732 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1734 * server.c (handle_general_set): Remove unnecessary xstrdup.
1736 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1738 * server.c (parse_debug_format_options): Adjust to
1739 delim_string_to_char_ptr_vec changes.
1740 * thread-db.c (thread_db_load_search): Adjust to
1741 dirnames_to_char_ptr_vec changes.
1743 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1745 * target.h (target_enable_btrace, target_disable_btrace)
1746 (target_read_btrace, target_read_btrace_conf): Turn macro into
1747 inline function. Throw error if target method is not defined.
1748 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1749 check for btrace target method. Be prepared to handle exceptions
1750 from btrace target methods.
1752 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1754 * server.c (captured_main): Change order of error message printed
1755 when the current working directory cannot be found.
1757 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1759 * server.c: Include "filenames.h" and "pathstuff.h".
1760 (program_name): Delete variable.
1761 (program_path): New anonymous class.
1762 (get_exec_wrapper): Use "program_path" instead of
1764 (handle_v_run): Likewise.
1765 (captured_main): Likewise.
1766 (process_serial_event): Likewise.
1768 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1770 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1771 (OBJS): Add "pathstuff.o".
1772 * server.c (current_directory): New global variable.
1773 (captured_main): Initialize "current_directory".
1775 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1777 * tdesc.c: Use common/tdesc.h.
1778 * tdesc.h: Likewise.
1780 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1781 Simon Marchi <simon.marchi@ericsson.com>
1783 * Makefile.in: Switch order of make rules.
1785 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1787 * Makefile.in: Add common directory in build.
1788 * configure.ac: Add common reference.
1789 * configure: Regenerate.
1791 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1793 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1794 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1795 * spu-low.c (spu_target_ops): Likewise.
1796 * win32-low.c (win32_target_ops): Likewise.
1797 * server.c (supported_btrace_packets): Report packets unconditionally.
1798 * target.h (target_ops) <supports_btrace>: Remove.
1799 (target_supports_btrace): Remove.
1801 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1803 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1804 (handle_btrace_disable): Change return type to void. Use exceptions
1806 (handle_btrace_general_set): Catch exception and copy message to
1809 2018-02-08 Tom Tromey <tom@tromey.com>
1811 * linux-low.c (install_software_single_step_breakpoints): Use
1812 make_scoped_restore.
1813 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1814 (do_restore_current_thread_cleanup): Remove.
1815 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1818 2018-02-08 Tom Tromey <tom@tromey.com>
1820 * mem-break.c (set_raw_breakpoint_at): Use
1821 gdb::unique_xmalloc_ptr.
1823 2018-01-30 Pedro Alves <palves@redhat.com>
1826 * target.c (target_terminal::terminal_state): Rename to ...
1827 (target_terminal::m_terminal_state): ... this.
1829 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1831 * linux-low.c (handle_extended_wait): Surround call to
1832 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1834 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1836 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1837 linux_ptrace_attach_fail_reason_string now returning an
1839 (linux_attach): Likewise.
1840 * thread-db.c (attach_thread): Likewise.
1842 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1845 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1846 checking for fs_base/gs_base fields in struct user_regs_struct.
1847 * configure: Regenerate.
1849 2018-01-16 Yao Qi <yao.qi@linaro.org>
1852 * linux-low.c (fetch_register): Call supply_register instead of
1855 2018-01-08 Yao Qi <yao.qi@linaro.org>
1856 Simon Marchi <simon.marchi@ericsson.com>
1858 * Makefile.in (OBS): Remove selftest.o.
1859 * configure.ac: Set srv_selftest_objs if $development is true.
1860 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1861 * configure: Re-generated.
1862 * server.c (captured_main): Wrap variable selftest_filter with
1865 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1867 * server.c (parse_debug_format_options): Return std::string.
1868 (handle_monitor_command, captured_main): Adjust.
1870 2018-01-05 Pedro Alves <palves@redhat.com>
1873 * server.c (captured_main): Pass quiet=false to
1874 save_original_signals_state.
1876 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1878 * gdbreplay.c (gdbreplay_version): Update copyright year in
1880 * server.c (gdbserver_version): Likewise.
1882 2017-12-08 Tom Tromey <tom@tromey.com>
1884 * ax.c (ax_printf): Update.
1886 2017-12-07 Yao Qi <yao.qi@linaro.org>
1888 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1889 aarch64_linux_read_description.
1890 * linux-amd64-ipa.c (idx2mask): New array.
1891 (get_ipa_tdesc): Move idx2mask out.
1892 (initialize_low_tracepoint): Initialize target descriptions.
1893 * linux-i386-ipa.c (idx2mask): New array.
1894 (get_ipa_tdesc): Move idx2mask out.
1895 (initialize_low_tracepoint): Initialize target descriptions.
1897 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1899 * tdesc.c (struct tdesc_type): Change return type.
1900 (tdesc_add_flag): Change parameter type.
1901 (tdesc_add_bitfield): Likewise.
1902 (tdesc_add_field): Likewise.
1903 (tdesc_set_struct_size): Likewise.
1905 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1907 * regcache.c (registers_to_string): Remove unused variable.
1909 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1911 * inferiors.c (for_each_inferior_with_data): Remove.
1912 * inferiors.h (for_each_inferior_with_data): Remove.
1913 * server.c (handle_qxfer_threads_worker): Change parameter type.
1914 (handle_qxfer_threads_proper): Use for_each_thread.
1916 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1918 * inferiors.c (for_each_inferior): Remove.
1919 (clear_inferiors): Use for_each_thread.
1920 * inferiors.h (for_each_inferior): Remove.
1921 * linux-low.c (linux_wait_for_event_filtered): Use
1923 (linux_stabilize_threads): Likewise.
1924 * regcache.c (regcache_release): Likewise.
1925 * server.c (gdb_wants_all_threads_stopped): Likewise.
1926 (clear_pending_status_callback): Remove.
1927 (handle_status): Use for_each_thread.
1928 (captured_main): Likewise.
1929 * win32-low.c (child_init_thread_list): Likewise.
1930 (win32_clear_inferiors): Likewise.
1931 (fake_breakpoint_event): Likewise.
1933 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1935 * inferiors.h (find_inferior): Remove.
1936 * inferiors.c (find_inferior): Remove.
1938 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1940 * linux-low.c (resume_status_pending_p): Update comment.
1941 (need_step_over_p): Update comment.
1943 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1945 * linux-low.c (proceed_one_lwp): Return void, change parameter
1947 (unsuspend_and_proceed_one_lwp): Likewise.
1948 (proceed_all_lwps): Use for_each_thread.
1949 (unstop_all_lwps): Likewise.
1951 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1953 * linux-low.c (linux_resume_one_thread): Return void, take
1955 (linux_resume): Use for_each_thread.
1957 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1959 * linux-low.c (send_sigstop_callback): Return void, change
1960 parameter type. Rename to...
1961 (send_sigstop): ... this.
1962 (suspend_and_send_sigstop_callback): Return void, change parameter
1964 (suspend_and_send_sigstop): ... this.
1965 (stop_all_lwps): Use for_each_thread.
1967 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1969 * linux-low.c (lwp_running): Return bool, remove unused
1971 (linux_stabilize_threads): Use find_thread.
1973 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1975 * linux-low.c (select_singlestep_lwp_callback): Remove.
1976 (count_events_callback): Remove.
1977 (select_event_lwp_callback): Remove.
1978 (select_event_lwp): Use find_thread/for_each_thread.
1980 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1982 * linux-low.c (not_stopped_callback): Return bool, take filter
1984 (linux_wait_for_event_filtered): Use find_thread.
1985 (linux_wait_1): Likewise.
1987 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1989 * linux-low.c (same_lwp): Remove.
1990 (find_lwp_pid): Use find_thread.
1992 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1994 * linux-low.c (delete_lwp_callback): Remove.
1995 (linux_mourn): Use for_each_thread.
1997 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1999 * linux-low.c (linux_detach_lwp_callback): Return void, remove
2000 args parameter, don't check for pid.
2001 (linux_detach): Use for_each_thread.
2003 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2005 * linux-low.c (struct counter): Remove.
2006 (second_thread_of_pid_p): Remove.
2007 (last_thread_of_process_p): Use find_thread.
2009 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2011 * inferiors.c (find_inferior_in_random): Remove.
2012 * inferiors.h (find_inferior_in_random): Remove.
2013 * linux-low.c (status_pending_p_callback): Return bool, accept
2014 parameter ptid directly.
2015 (linux_wait_for_event_filtered): Use find_thread_in_random.
2016 (linux_wait_1): Likewise.
2018 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2020 * inferiors.c (find_inferior_id): Remove.
2021 (find_thread_ptid): Move implemention from find_inferior_id to
2023 * inferiors.h (find_inferior_id): Remove.
2024 * server.c (handle_status): Use find_thread_ptid.
2025 (process_serial_event): Likewise.
2026 * thread-db.c (find_one_thread): Likewise.
2027 (thread_db_thread_handle): Likewise.
2028 * win32-low.c (thread_rec): Likewise.
2029 (child_delete_thread): Likewise.
2030 (win32_thread_alive): Likewise.
2031 (get_child_debug_event): Likewise.
2033 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2035 * linux-mips-low.c (update_watch_registers_callback): Return
2036 void, remove pid_p parameter, don't check for pid.
2037 (mips_insert_point, mips_remove_point): Use for_each_thread.
2039 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2041 * lynx.low (lynx_delete_thread_callback): Remove.
2042 (lynx_mourn): Use for_each_thread.
2044 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2046 * regcache.c (regcache_invalidate_one): Remove.
2047 (regcache_invalidate_pid): use for_each_thread.
2049 2017-11-26 Tom Tromey <tom@tromey.com>
2051 * linux-low.c (linux_create_inferior): Update.
2053 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2055 * spu-low.c (spu_create_inferior): Fix typo in argument name.
2057 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2059 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
2060 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2061 * linux-aarch64-tdesc-selftest.c: New file.
2062 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2064 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2066 * configure.srv: Add new file.
2067 * linux-aarch64-low.c (initialize_low_arch): Call init func.
2068 * linux-aarch64-tdesc-selftest.c: New file.
2069 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
2071 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2073 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
2074 * linux-aarch64-low.c (initialize_low_arch): Remove init.
2075 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
2077 2017-11-24 Alan Hayward <alan.hayward@arm.com>
2079 * configure.srv: Add new files.
2080 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
2081 aarch64_linux_read_description.
2082 * linux-aarch64-low.c (aarch64_linux_read_description):
2083 Merge with aarch64_arch_setup.
2084 (aarch64_arch_setup): Call aarch64_linux_read_description.
2085 * linux-aarch64-tdesc.c: New file.
2086 * linux-aarch64-tdesc.h: New file.
2088 2017-11-24 Yao Qi <yao.qi@linaro.org>
2090 * configure.srv: Set $srv_regobj for tic6x-linux.
2091 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
2092 (tic6x_read_description): Move some code to tic6x_arch_setup.
2093 (tic6x_tdesc_test): New function.
2094 (initialize_low_arch): Call selftests::register_test.
2096 2017-11-22 Yao Qi <yao.qi@linaro.org>
2098 * remote-utils.c (prepare_resume_reply): Use memcpy.
2100 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2102 * linux-low.c (kill_one_lwp_callback): Return void, take
2103 argument directly, don't filter on pid.
2104 (linux_kill): Use for_each_thread.
2106 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2108 * linux-low.c (need_step_over_p): Return bool, remove dummy
2110 (linux_resume, proceed_all_lwps): Use find_thread.
2112 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2114 * linux-low.c (resume_status_pending_p): Return bool, remove
2116 (linux_resume): Use find_thread.
2118 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2120 * linux-low.c (struct thread_resume_array): Remove.
2121 (linux_set_resume_request): Return void, take arguments
2123 (linux_resume): Use for_each_thread.
2125 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2127 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
2128 return bool, remove data argument.
2129 (linux_stabilize_threads): Use find_thread.
2131 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2133 * linux-low.c (unsuspend_one_lwp): Remove.
2134 (unsuspend_all_lwps): Use for_each_thread, inline code from
2137 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2139 * gdbthread.h (find_thread): Add overload with ptid_t filter.
2140 * linux-low.c (struct iterate_over_lwps_args): Remove.
2141 (iterate_over_lwps_filter): Remove.
2142 (iterate_over_lwps): Use find_thread.
2144 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2146 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
2147 (linux_handle_new_gdb_connection): Use for_each_thread, inline
2148 code from reset_lwp_ptrace_options_callback.
2150 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2152 * linux-arm-low.c (struct update_registers_data): Remove.
2153 (update_registers_callback): Return void, take arguments
2154 directly, don't check thread's pid.
2155 (arm_insert_point, arm_remove_point): Use for_each_thread.
2157 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2159 * win32-low.c (continue_one_thread): Return void, take argument
2161 (child_continue): Use for_each_thread.
2163 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2165 * win32-i386-low.c (update_debug_registers_callback): Rename
2167 (update_debug_registers): ... this, return void, remove pid_p arg.
2168 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
2170 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2172 * inferiors.h (struct process_info): Add constructor, initialize
2174 <syscalls_to_catch>: Change type to std::vector<int>.
2175 * inferiors.c (add_process): Allocate process_info with new.
2176 (remove_process): Free process_info with delete.
2177 * linux-low.c (handle_extended_wait): Adjust.
2178 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
2179 * server.c (handle_general_set): Adjust.
2181 2017-11-16 Pedro Alves <palves@redhat.com>
2183 * remote-utils.c (remote_close): Block SIGIO signals instead of
2184 uninstalling the SIGIO handler.
2186 2017-11-16 Alan Hayward <alan.hayward@arm.com>
2188 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
2190 2017-11-16 Yao Qi <yao.qi@linaro.org>
2192 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
2193 (tic6x_store_gregset): Likewise.
2194 (tic6x_usrregs_info): Move it up.
2196 2017-11-15 Alan Hayward <alan.hayward@arm.com>
2198 * Makefile.in: Update arch rules.
2199 * configure.srv: Explicitly mark arch/ files.
2201 2017-11-13 Andreas Schwab <schwab@suse.de>
2203 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2205 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2207 2017-11-06 Pedro Alves <palves@redhat.com>
2209 * config.in, configure: Regenerate.
2211 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2213 * target.c (struct thread_search): Remove.
2214 (thread_search_callback): Remove.
2215 (prepare_to_access_memory): Use for_each_thread instead of
2216 find_inferior. Inline code from thread_search_callback.
2218 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2220 * server.c (struct visit_actioned_threads_data): Remove.
2221 (visit_actioned_threads): Change prototype to take arguments
2223 (resume): Use find_thread instead of find_inferior.
2225 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2227 * server.c (queue_stop_reply_callback): Change prototype, return
2229 (find_status_pending_thread_callback): Remove.
2230 (handle_status): Replace find_inferior with find_thread and
2233 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2235 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2237 (aarch64_store_gregset): Likewise.
2238 (aarch64_fill_fpregset): Likewise.
2239 (aarch64_store_fpregset): Likewise.
2241 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2243 * gdbthread.h (find_thread, for_each_thread): New functions.
2244 * inferiors.c (thread_of_pid): Remove.
2245 (find_any_thread_of_pid): Use find_thread.
2246 * linux-low.c (num_lwps): Use for_each_thread.
2248 2017-10-17 Yao Qi <yao.qi@linaro.org>
2250 * Makefile.in: Remove one rule.
2251 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2253 2017-10-17 Yao Qi <yao.qi@linaro.org>
2255 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2256 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2258 2017-10-17 Yao Qi <yao.qi@linaro.org>
2260 * configure.srv: Rename arm.o with arch/arm.o.
2262 2017-10-17 Yao Qi <yao.qi@linaro.org>
2264 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2265 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2266 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2267 (arch-i386.o, arch-amd64.o): Remove rules.
2268 (arch/%.o): New rule.
2269 Update POSTCOMPILE and COMPILE.pre.
2270 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2271 * configure: Re-generated.
2272 * configure.srv: Replace arch-i386.o with arch/i386.o.
2273 Replace arch-amd64.o with arch/amd64.o.
2275 2017-10-16 Yao Qi <yao.qi@linaro.org>
2277 * configure: Regenerated.
2279 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2281 * inferiors.h: (struct inferior_list): Remove.
2282 (struct inferior_list_entry); Remove.
2283 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2284 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2285 get_first_inferior): Remove.
2286 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2287 find_inferior_id, find_inferior_in_random): Change signature.
2288 * inferiors.c (all_threads): Change type to
2289 std::list<thread_info *>.
2290 (get_thread): Remove macro.
2291 (find_inferior, find_inferior_id): Change signature, implement
2293 (find_inferior_in_random): Change signature, implement using
2294 find_thread_in_random.
2295 (for_each_inferior, for_each_inferior_with_data): Change
2296 signature, implement using for_each_thread.
2297 (add_inferior_to_list, remove_inferior): Remove.
2298 (add_thread, get_first_thread, thread_of_pid,
2299 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2300 (get_first_inferior, one_inferior_p, clear_inferior_list):
2302 (clear_inferiors, get_thread_process): Update.
2303 * gdbthread.h: Include <list>.
2304 (struct thread_info) <entry>: Remove field.
2306 (all_threads): Change type to std::list<thread_info *>.
2307 (get_first_inferior): Add doc.
2308 (find_thread, for_each_thread, find_thread_in_random): New
2310 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2311 * linux-arm-low.c (update_registers_callback): Update.
2312 * linux-low.c (second_thread_of_pid_p): Update.
2313 (kill_one_lwp_callback, linux_detach_lwp_callback,
2314 delete_lwp_callback, status_pending_p_callback, same_lwp,
2315 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2316 iterate_over_lwps, not_stopped_callback,
2317 resume_stopped_resumed_lwps, count_events_callback,
2318 select_singlestep_lwp_callback, select_event_lwp_callback,
2319 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2320 suspend_and_send_sigstop_callback, wait_for_sigstop,
2321 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2322 lwp_running, linux_set_resume_request, resume_status_pending_p,
2323 need_step_over_p, start_step_over, linux_resume_one_thread,
2324 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2325 reset_lwp_ptrace_options_callback): Update.
2326 * linux-mips-low.c (update_watch_registers_callback): Update.
2327 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2329 (free_register_cache_thread_one): Remove.
2330 (regcache_release): Update.
2331 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2332 handle_qxfer_threads_worker): Update.
2333 (handle_query): Update, use list iterator.
2334 (visit_actioned_threads, handle_pending_status,
2335 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2336 clear_pending_status_callback, set_pending_status_callback,
2337 find_status_pending_thread_callback, handle_status,
2338 process_serial_event): Update.
2339 * target.c (thread_search_callback): Update.
2340 * thread-db.c (thread_db_get_tls_address): Update.
2341 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2343 * win32-i386-low.c (update_debug_registers_callback): Update.
2344 * win32-low.c (delete_thread_info, child_delete_thread,
2345 continue_one_thread, suspend_one_thread,
2346 get_child_debug_event): Adjust.
2348 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2350 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2351 * inferiors.h: Include <list>.
2352 (struct process_info) <entry>: Remove field.
2354 (pid_of): Change macro to function.
2355 (ptid_of, lwpid_of): Remove macro.
2356 (all_processes): Change type to std::list<process_info *>.
2357 (ALL_PROCESSES): Remove macro.
2358 (for_each_process, find_process): New function.
2359 * inferiors.c (all_processes): Change type to
2360 std::list<process_info *>.
2361 (find_thread_process): Adjust.
2362 (add_process): Likewise.
2363 (remove_process): Likewise.
2364 (find_process_pid): Likewise.
2365 (get_first_process): Likewise.
2366 (started_inferior_callback): Remove.
2367 (have_started_inferiors_p): Adjust.
2368 (attached_inferior_callback): Remove.
2369 (have_attached_inferiors_p): Adjust.
2370 * linux-low.c (check_zombie_leaders): Likewise.
2371 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2372 (x86_linux_update_xmltarget): Adjust.
2373 * server.c (handle_query): Likewise.
2374 (gdb_reattached_process): Remove.
2375 (handle_status): Adjust.
2376 (kill_inferior_callback): Likewise.
2377 (detach_or_kill_inferior): Remove.
2378 (print_started_pid): Likewise.
2379 (print_attached_pid): Likewise.
2380 (detach_or_kill_for_exit): Update.
2381 (process_serial_event): Likewise.
2382 * linux-arm-low.c (arm_new_fork): Likewise.
2384 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2386 * dll.h: Include <list>.
2387 (struct dll_info): Add constructor.
2388 <entry>: Remove field.
2389 (all_dlls): Change type to std::list<dll_info>.
2390 * dll.c: Include <algorithm>.
2391 (get_dll): Remove macro.
2392 (all_dlls): Change type to std::list<dll_info *>.
2393 (free_one_dll): Remove.
2394 (match_dll): Likewise.
2395 (loaded_dll): Adjust.
2396 (unloaded_dll): Adjust to all_dlls type change, use
2397 std::find_if. Inline code from match_dll.
2398 (clear_dlls): Adjust to all_dlls type change.
2399 * server.c (emit_dll_description): Remove.
2400 (handle_qxfer_libraries): Adjust to all_dlls type change,
2401 integrate emit_dll_description's functionality.
2403 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2405 * linux-low.h (struct linux_target_ops) <delete_process>: New
2407 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2408 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2409 (struct linux_target_ops): Add delete_process callback.
2410 * linux-arm-low.c (arm_delete_process): New.
2411 (struct linux_target_ops): Add delete_process callback.
2412 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2413 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2414 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2415 * linux-mips-low.c (mips_linux_delete_process): New.
2416 (struct linux_target_ops): Add delete_process callback.
2417 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2418 * linux-s390-low.c (struct linux_target_ops): Likewise.
2419 * linux-sh-low.c (struct linux_target_ops): Likewise.
2420 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2421 * linux-tile-low.c (struct linux_target_ops): Likewise.
2422 * linux-x86-low.c (x86_linux_delete_process): New.
2423 (struct linux_target_ops): Add delete_process callback.
2424 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2426 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2428 * linux-aarch64-low.c (the_low_target): Add thread delete
2430 * linux-arm-low.c (arm_delete_thread): New function.
2431 (the_low_target): Add thread delete callback.
2432 * linux-bfin-low.c (the_low_target): Likewise.
2433 * linux-crisv32-low.c (the_low_target): Likewise.
2434 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2436 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2438 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2439 * linux-mips-low.c (mips_linux_delete_thread): New function.
2440 (the_low_target): Add thread delete callback.
2441 * linux-ppc-low.c (the_low_target): Likewise.
2442 * linux-s390-low.c (the_low_target): Likewise.
2443 * linux-sh-low.c (the_low_target): Likewise.
2444 * linux-tic6x-low.c (the_low_target): Likewise.
2445 * linux-tile-low.c (the_low_target): Likewise.
2446 * linux-x86-low.c (the_low_target): Likewise.
2447 * linux-xtensa-low.c (the_low_target): Likewise.
2449 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2451 * win32-low.c: Include "common-inferior.h".
2453 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2455 * inferiors.c (set_inferior_cwd): New function.
2456 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2457 (handle_query): Inform that QSetWorkingDir is supported.
2458 * win32-low.c (create_process): Pass the inferior's cwd to
2461 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2463 * inferiors.c (current_inferior_cwd): New global variable.
2464 (get_inferior_cwd): New function.
2465 * inferiors.h (struct process_info) <cwd>: New field.
2467 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2469 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2470 (OBS): Add gdb_tilde_expand.o.
2472 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2474 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2475 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2477 2017-09-29 Pedro Alves <palves@redhat.com>
2479 * ax.c (gdb_parse_agent_expr): Constify.
2480 * ax.h (gdb_parse_agent_expr): Constify.
2481 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2483 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2484 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2485 * remote-utils.h (read_ptid): Constify.
2486 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2487 (process_point_options, process_serial_event): Constify.
2488 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2489 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2490 (cmd_qtbuffer): Constify.
2492 2017-09-29 Pedro Alves <palves@redhat.com>
2494 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2497 2017-09-29 Pedro Alves <palves@redhat.com>
2499 * linux-low.c (handle_extended_wait): Pass parent thread instead
2500 of process to thread_db_notice_clone.
2501 * linux-low.h (thread_db_notice_clone): Replace parent process
2502 parameter with parent thread parameter.
2503 * thread-db.c (find_one_thread): Add comment.
2504 (thread_db_notice_clone): Replace parent process parameter with
2505 parent thread parameter. Temporarily switch to the parent thread.
2507 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2509 * gdbthread.h: Include "common-gdbthread.h".
2510 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2511 "if" when validating the ptid.
2512 * remote-utils.c: Include "gdbthread.h".
2513 (prepare_resume_reply): Use "switch_to_thread".
2514 * target.c (done_accessing_memory): Likewise.
2516 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2518 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2519 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2520 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2521 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2522 s390x-gs-linux64-ipa.o to ipa_obj.
2523 * linux-s390-low.c (HWCAP_S390_GS): New define.
2524 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2526 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2527 (s390_arch_setup): Check for guarded-storage support and choose
2529 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2530 init_registers_s390x_gs_linux64.
2531 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2533 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2534 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2536 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2538 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2540 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2542 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2543 (thread_db_thread_handle): Declare.
2544 * linux-low.c (linux_target_ops): Initialize thread_handle.
2545 * server.c (handle_qxfer_threads_worker): Add support for
2547 * target.h (struct target_ops): Add new function pointer,
2549 (target_thread_handle): Define.
2550 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2552 (thread_db_thread_handle): New function.
2554 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2556 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2557 * linux-low.h (thread_db_notice_clone): Declare.
2558 * thread-db.c (thread_db_notice_clone): New function.
2560 2017-09-21 Pedro Alves <palves@redhat.com>
2562 * server.c (gdb_read_memory, handle_status, process_serial_event)
2563 (handle_serial_event, handle_target_event): Adjust to
2564 set_desired_thread prototype change.
2565 * target.c (set_desired_thread): Remove 'use_general' parameter
2567 * target.h (set_desired_thread): Remove 'use_general' parameter.
2569 2017-09-20 Tom Tromey <tom@tromey.com>
2571 * target.c (target_terminal::terminal_state): Define.
2572 (target_terminal::init): Rename from target_terminal_init.
2573 (target_terminal::inferior): Rename from
2574 target_terminal_inferior.
2575 (target_terminal::ours): Rename from target_terminal_ours.
2576 (target_terminal::ours_for_output, target_terminal::info): New.
2578 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2580 * server.c (accumulate_file_name_length): Remove.
2581 (emit_dll_description): Adjust to std::string change.
2582 (handle_qxfer_libraries): Use std::string to hold document.
2584 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2586 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2587 return type of xml_escape_text.
2588 * server.c (emit_dll_description): Likewise.
2590 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2592 * server.c (captured_main): Accept argument for --selftest.
2593 Update run_tests call.
2594 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2595 when registering selftests.
2597 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2599 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2600 instead of "VEC" for "target_desc.reg_defs".
2601 (regcache_cpy): Likewise.
2602 (registers_to_string): Likewise.
2603 (registers_from_string): Likewise.
2604 (find_regno): Likewise.
2605 (supply_regblock): Likewise.
2606 (regcache_raw_read_unsigned): Likewise.
2607 * tdesc.c (init_target_desc): Likewise.
2608 (tdesc_create_reg): Likewise.
2609 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2610 (struct target_desc) <reg_defs>: Convert to "std::vector".
2611 (target_desc): Do not initialize "reg_defs".
2612 (~target_desc): Update code to use "std::vector" instead of "VEC"
2613 for "target_desc.reg_defs".
2614 (operator==): Likewise.
2616 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2618 * inferiors.h (thread_to_gdb_id): Remove.
2619 * inferiors.c (thread_to_gdb_id): Remove.
2620 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2621 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2622 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2624 * nto-low.c (nto_fetch_registers, nto_store_registers,
2625 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2627 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2629 * inferiors.h (gdb_id_to_thread_id): Remove.
2630 * inferiors.c (gdb_id_to_thread_id): Remove.
2631 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2632 removal. Move pid declaration closer to where it's used.
2634 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2636 * server.c (handle_detach): New function.
2637 (process_serial_event): Move code out, call handle_detach.
2639 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2641 * server.c (require_running): Rename to ...
2642 (require_running_or_return): ... this ...
2643 (require_running_or_break): ... and this.
2644 (handle_query, process_serial_event): Adjust.
2646 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2648 * linux-low.c (linux_set_resume_request): Remove unused
2651 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2653 * server.c (first_thread_of): Remove.
2654 (process_serial_event): Replace usage of first_thread_of with
2655 find_any_thread_of_pid.
2656 * tracepoint.c (same_process_p): Remove.
2657 (gdb_agent_about_to_close): Replace usage of same_process_p with
2658 find_any_thread_of_pid.
2659 * linux-x86-low.c (same_process_callback): Remove.
2660 (x86_arch_setup_process_callback): Replace usage of
2661 same_process_callback with find_any_thread_of_pid.
2662 * thread-db.c (any_thread_of): Remove.
2663 (switch_to_process): Replace usage of any_thread_of with
2664 find_any_thread_of_pid.
2665 * inferiors.c (thread_pid_matches_callback): Remove.
2666 (find_thread_process): Adjust to use find_any_thread_of_pid.
2668 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2670 * regcache.c (get_thread_regcache): Guard calls to "memset"
2673 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2675 * linux-low.c (handle_extended_wait): Use
2676 "allocate_target_description" instead of "XNEW".
2677 * linux-x86-low.c (initialize_low_arch): Likewise.
2679 2017-09-05 Yao Qi <yao.qi@linaro.org>
2681 * configure.srv (srv_i386_regobj): Remove.
2682 (srv_amd64_regobj): Remove.
2683 (srv_regobj): Set it to "" for x86 non-linux targets.
2684 * linux-x86-tdesc.c (i386_linux_read_description):
2685 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2686 (init_registers_i386): Remove the declaration.
2687 (tdesc_i386): Remove the declaration.
2688 (lynx_i386_arch_setup): Call i386_create_target_description.
2689 * nto-x86-low.c: Likewise.
2690 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2691 [!__x86_64__]: include arch/i386.h.
2692 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2694 2017-09-05 Yao Qi <yao.qi@linaro.org>
2696 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2697 i386/amd64-XXX-linux from it.
2699 2017-09-05 Yao Qi <yao.qi@linaro.org>
2701 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2703 (ipa_amd64_linux_regobj): Remove.
2704 (ipa_x32_linux_regobj): Remove.
2706 2017-09-05 Yao Qi <yao.qi@linaro.org>
2708 * Makefile.in (arch-amd64.o): New rule.
2709 * configure.srv: Append arch-amd64.o.
2710 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2711 (get_ipa_tdesc): Call amd64_linux_read_description.
2712 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2713 and init_registers_amd64_XXX.
2714 * linux-x86-low.c (x86_linux_read_description): Call
2715 amd64_linux_read_description.
2716 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2717 (initialize_low_arch): Don't call init_registers_x32_XXX and
2718 init_registers_amd64_XXX.
2719 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2720 and tdesc_amd64_XXX.
2721 [__x86_64__] (amd64_tdesc_test): New function.
2722 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2723 and init_registers_amd64_XXX.
2724 * linux-x86-tdesc.c: Include arch/amd64.h.
2725 (xcr0_to_tdesc_idx): New function.
2726 (i386_linux_read_description): New function.
2727 (amd64_get_ipa_tdesc_idx): New function.
2728 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2729 (amd64_get_ipa_tdesc): Declare.
2731 2017-09-05 Yao Qi <yao.qi@linaro.org>
2733 * configure.srv (srv_i386_linux_xmlfiles): Remove
2734 i386/i386-XXX-linux.xml from it.
2736 2017-09-05 Yao Qi <yao.qi@linaro.org>
2738 * configure.srv: Set srv_i386_linux_regobj empty if $development
2740 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2741 initialize_low_tdesc.
2742 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2743 with #if initialize_low_tdesc.
2744 * linux-x86-tdesc-selftest.c: New file.
2745 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2747 2017-09-05 Yao Qi <yao.qi@linaro.org>
2749 * Makefile.in (arch-i386.o): New rule.
2750 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2751 (x86_64-*-linux*): Likewise.
2752 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2753 include arch/i386.h.
2754 (i386_linux_read_description): Remove code and call
2755 i386_create_target_description.
2756 * tdesc.c (allocate_target_description): New function.
2757 * tdesc.h (set_tdesc_architecture): Remove declaration.
2758 (set_tdesc_osabi): Likewise.
2760 2017-09-05 Yao Qi <yao.qi@linaro.org>
2762 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2763 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2764 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2766 * server.c (get_features_xml): Call tdesc_get_features_xml.
2767 * tdesc.c (set_tdesc_architecture): New function.
2768 (set_tdesc_osabi): New function.
2769 (tdesc_get_features_xml): New function.
2770 (tdesc_create_feature): Add an argument.
2771 * tdesc.h (struct target_desc) <features>: New field.
2772 <arch, osabi>: New field.
2773 (~target_desc): xfree features, arch, and osabi.
2774 (target_desc::oerator==): Don't compare .xmltarget.
2775 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2776 (set_tdesc_osabi): Likewise.
2777 (tdesc_get_features_xml): Likewise.
2779 2017-09-05 Yao Qi <yao.qi@linaro.org>
2781 * linux-x86-tdesc.c: Include selftest.h.
2782 (i386_tdesc_test): New function.
2783 (initialize_low_tdesc): Call selftests::register_test.
2784 * tdesc.h: Include regdef.h.
2785 (target_desc): Override operator == and !=.
2787 2017-09-05 Yao Qi <yao.qi@linaro.org>
2789 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2790 (ipa_obj): Likewise.
2791 * linux-i386-ipa.c: Include common/x86-xstate.h
2792 (get_ipa_tdesc): Call i386_linux_read_description.
2793 (initialize_low_tracepoint): Don't call init_registers_XXX
2794 functions, call initialize_low_tdesc instead.
2795 * linux-x86-low.c (x86_linux_read_description): Call
2796 i386_linux_read_description.
2797 (initialize_low_arch): Don't call init_registers_i386_XXX
2798 functions, call initialize_low_tdesc.
2799 * linux-x86-tdesc.c: New file.
2800 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2801 (i386_get_ipa_tdesc_idx): Declare.
2802 (i386_get_ipa_tdesc): Declare.
2803 (initialize_low_tdesc): Declare.
2805 2017-09-05 Yao Qi <yao.qi@linaro.org>
2807 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2810 2017-09-05 Yao Qi <yao.qi@linaro.org>
2812 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2813 * regcache.c (get_thread_regcache): Use VEC_length.
2814 (init_register_cache): Likewise.
2815 (regcache_cpy): Likewise.
2816 (registers_to_string): Iterate reg_defs via VEC_iterate.
2817 (find_regno): Likewise.
2818 (find_register_by_number): Use VEC_index.
2819 (register_size): Call find_register_by_number.
2820 (register_data): Call find_register_by_number.
2821 (supply_regblock): Use VEC_length.
2822 (regcache_raw_read_unsigned): Likewise.
2823 * tdesc.c (init_target_desc): Iterate reg_defs via
2825 (default_description): Update initializer.
2826 (copy_target_description): Don't update field num_registers.
2827 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2828 <num_registers>: Remove.
2830 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2832 * Makefile.in (.SECONDARY): Define target.
2834 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2836 * linux-low.c (linux_wait_1): Adjust.
2837 * server.c (queue_stop_reply_callback): Adjust.
2839 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2841 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2842 QEnvironmentUnset and QEnvironmentReset packets.
2843 (handle_query): Inform remote that QEnvironmentHexEncoded,
2844 QEnvironmentUnset and QEnvironmentReset are supported.
2846 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2848 * inferiors.h (inferior_target_data): Rename to ...
2849 (thread_target_data): ... this.
2850 (inferior_regcache_data): Rename to ...
2851 (thread_regcache_data): ... this.
2852 (set_inferior_regcache_data): Rename to ...
2853 (set_thread_regcache_data): ... this.
2854 * inferiors.c (inferior_target_data): Rename to ...
2855 (thread_target_data): ... this.
2856 (inferior_regcache_data): Rename to ...
2857 (thread_regcache_data): ... this.
2858 (set_inferior_regcache_data): Rename to ...
2859 (set_thread_regcache_data): ... this.
2860 (free_one_thread): Update.
2861 * linux-low.h (get_thread_lwp): Update.
2862 * regcache.c (get_thread_regcache): Update.
2863 (regcache_invalidate_thread): Update.
2864 (free_register_cache_thread): Update.
2865 * win32-i386-low.c (update_debug_registers_callback): Update.
2866 (win32_get_current_dr): Update.
2867 * win32-low.c (thread_rec): Update.
2868 (delete_thread_info): Update.
2869 (continue_one_thread): Update.
2870 (suspend_one_thread): Update.
2872 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2874 * inferiors.c (set_inferior_target_data): Remove.
2875 * inferiors.h (set_inferior_target_data): Remove.
2877 2017-08-18 Yao Qi <yao.qi@linaro.org>
2879 * Makefile.in (OBS): Add selftest.o.
2880 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2881 * configure, config.in: Re-generated.
2882 * server.c: Include common/sefltest.h.
2883 (captured_main): Handle option --selftest.
2885 2017-08-09 Yao Qi <yao.qi@linaro.org>
2887 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2888 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2889 i386-avx-mpx.o and i386-mmx.o.
2890 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2891 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2892 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2893 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2894 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2895 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2896 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2897 i386/amd64-avx-mpx.xml.
2899 2017-08-09 Yao Qi <yao.qi@linaro.org>
2901 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2902 and x32-avx-avx512.o.
2903 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2904 i386/x32-avx-avx512.xml.
2906 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2908 * tracepoint.h (enum class fast_tpoint_collect_result): New
2910 (fast_tracepoint_collecting): Change return type to
2911 fast_tpoint_collect_result.
2912 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2913 * linux-low.h: Include tracepoint.h.
2914 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2915 fast_tpoint_collect_result.
2916 * linux-low.c (handle_tracepoints): Adjust.
2917 (linux_fast_tracepoint_collecting): Change return type to
2918 fast_tpoint_collect_result.
2919 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2920 linux_wait_1, stuck_in_jump_pad_callback,
2921 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2922 proceed_one_lwp): Adjust to type change.
2924 2017-07-10 Yao Qi <yao.qi@linaro.org>
2926 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2928 2017-06-29 Yao Qi <yao.qi@linaro.org>
2930 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2932 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2934 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2936 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2938 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2940 * linux-low.c (linux_create_inferior): Adjust code to access the
2941 environment information via 'gdb_environ' class.
2942 * lynx-low.c (lynx_create_inferior): Likewise.
2943 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2944 (get_environ): Return a pointer to 'our_environ'.
2945 (captured_main): Initialize 'our_environ'.
2946 * server.h (get_environ): Adjust prototype.
2947 * spu-low.c (spu_create_inferior): Adjust code to access the
2948 environment information via 'gdb_environ' class.
2950 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2952 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2953 usage of "register" keyword.
2955 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2957 * configure: Re-generate.
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 * Makefile.in (COMPILE.pre): Add "-x c++".
2967 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2969 * fork-child.c: Conditionally include <signal.h>.
2971 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2973 * server.c (handle_general_set): Handle new packet
2974 "QStartupWithShell".
2975 (handle_query): Add "QStartupWithShell" to the list of supported
2977 (gdbserver_usage): Add help text explaining the
2978 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2980 (captured_main): Recognize and act upon the presence of the new
2983 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2984 Pedro Alves <palves@redhat.com>
2986 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2987 * configure: Regenerate.
2988 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2990 (i[34567]86-*-lynxos*): Likewise.
2991 (spu*-*-*): Likewise.
2992 * fork-child.c: New file.
2993 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2995 (linux_ptrace_fun): New function.
2996 (linux_create_inferior): Adjust function prototype to reflect
2997 change on "target.h". Adjust function code to use
2999 (linux_request_interrupt): Delete "signal_pid".
3000 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3001 (lynx_ptrace_fun): New function.
3002 (lynx_create_inferior): Adjust function prototype to reflect
3003 change on "target.h". Adjust function code to use
3005 * nto-low.c (nto_create_inferior): Adjust function prototype and
3006 code to reflect change on "target.h". Update comments.
3007 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
3008 "common-terminal.h" and "environ.h".
3009 (terminal_fd): Moved to fork-child.c.
3010 (old_foreground_pgrp): Likewise.
3011 (restore_old_foreground_pgrp): Likewise.
3012 (last_status): Make it global.
3013 (last_ptid): Likewise.
3014 (our_environ): New variable.
3015 (startup_with_shell): Likewise.
3016 (program_name): Likewise.
3017 (program_argv): Rename to...
3018 (program_args): ...this.
3019 (wrapper_argv): New variable.
3020 (start_inferior): Delete function.
3021 (get_exec_wrapper): New function.
3022 (get_exec_file): Likewise.
3023 (get_environ): Likewise.
3024 (prefork_hook): Likewise.
3025 (post_fork_inferior): Likewise.
3026 (postfork_hook): Likewise.
3027 (postfork_child_hook): Likewise.
3028 (handle_v_run): Update code to deal with arguments coming from the
3029 remote host. Update calls from "start_inferior" to
3031 (captured_main): Likewise. Initialize environment variable. Call
3033 * server.h (post_fork_inferior): New prototype.
3034 (get_environ): Likewise.
3035 (last_status): Declare.
3036 (last_ptid): Likewise.
3037 (signal_pid): Likewise.
3038 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
3039 (spu_ptrace_fun): New function.
3040 (spu_create_inferior): Adjust function prototype to reflect change
3041 on "target.h". Adjust function code to use "fork_inferior".
3042 * target.c (target_terminal_init): New function.
3043 (target_terminal_inferior): Likewise.
3044 (target_terminal_ours): Likewise.
3045 * target.h: Include <vector>.
3046 (struct target_ops) <create_inferior>: Update prototype.
3047 (create_inferior): Update macro.
3048 * utils.c (gdb_flush_out_err): New function.
3049 * win32-low.c (win32_create_inferior): Adjust function prototype
3050 and code to reflect change on "target.h".
3052 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3054 * inferiors.c (switch_to_thread): New function.
3056 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
3058 * Makefile.in (SFILE): Add "common/job-control.c".
3059 (OBS): Add "job-control.o".
3061 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3063 * Makefile: Remove "@host_makefile_frag@".
3065 2017-05-05 Pedro Alves <palves@redhat.com>
3067 * configure: Regenerate.
3069 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3071 * configure: Regenerate.
3073 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3075 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
3076 software_single_step change of return type to
3077 std::vector<CORE_ADDR>.
3078 * linux-low.c (install_software_single_step_breakpoints):
3080 * linux-low.h (install_software_single_step_breakpoints):
3083 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3085 * remote-utils.c: Include "gdb_termios.h" instead of
3087 * terminal.h: Delete file.
3089 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
3091 * server.c: Include <vector>.
3092 <program_argv, wrapper_argv>: Convert to std::vector.
3093 (start_inferior): Rewrite function to use C++.
3094 (handle_v_run): Likewise. Update code that calculates the argv
3095 based on the vRun packet; use C++.
3096 (captured_main): Likewise.
3098 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
3100 * server.c (handle_v_cont): Initialize thread_resume::thread
3103 2017-04-05 Pedro Alves <palves@redhat.com>
3105 * configure: Regenerate.
3107 2017-04-05 Pedro Alves <palves@redhat.com>
3109 * gdbreplay.c (sync_error): Constify.
3110 * linux-x86-low.c (push_opcode): Constify.
3112 2017-04-05 Pedro Alves <palves@redhat.com>
3114 * win32-low.c (get_child_debug_event)
3115 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
3116 Report TARGET_WAITKIND_SPURIOUS instead.
3118 2017-04-05 Pedro Alves <palves@redhat.com>
3120 * remote-utils.c (remote_prepare, remote_open): Constify.
3121 * remote-utils.h (remote_prepare, remote_open): Constify.
3122 * server.c (captured_main): Constify 'port' handling.
3124 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
3126 * Makefile.in (clean): Clear .deps.
3128 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
3130 * .gitignore: Remove generated files, replace with wildcard.
3131 * (clean): Replace removal of generated files with wildcard.
3132 (version.c): Replace with...
3133 (version-generated.c): ...this.
3134 (xml-builtin.c): Replace with...
3135 (xml-builtin-generated.c): ...this.
3136 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
3137 (%.c: *regformats*): Replace with...
3138 (%-generated.c: *regformats*): ...this.
3140 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3142 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
3143 (xtensa_fill_gregset): Call collect_register_by_name for
3145 (xtensa_store_gregset): Call supply_register_by_name for
3148 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
3150 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
3151 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
3152 (xtensa_store_gregset): Call supply_register for all registers in
3153 a0_regnum..a0_regnum + C0_NREGS range.
3155 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3157 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
3158 (ax-ipa.o: ax.c): Remove.
3159 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
3160 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
3161 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
3162 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
3163 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
3165 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3167 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
3168 (print-utils-ipa.o: ../common/print-utils.c): Remove.
3169 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
3170 (errors-ipa.o: ../common/errors.c): Remove.
3171 (format-ipa.o: ../common/format.c): Remove.
3172 (common-utils-ipa.o: ../common/common-utils.c): Remove.
3174 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3176 * Makefile.in (%-ipa.o: %.c): New rule.
3177 (tracepoint-ipa.o: tracepoint.c): Remove.
3178 (utils-ipa.o: utils.c): Remove.
3179 (remote-utils-ipa.o: remote-utils.c): Remove.
3180 (regcache-ipa.o: regcache.c): Remove.
3181 (i386-linux-ipa.o: i386-linux.c): Remove.
3182 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
3183 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
3184 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
3185 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
3186 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
3187 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
3188 (amd64-linux-ipa.o: amd64-linux.c): Remove.
3189 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
3190 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
3191 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
3192 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
3193 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
3194 (aarch64-ipa.o: aarch64.c): Remove.
3195 (s390-linux32-ipa.o: s390-linux32.c): Remove.
3196 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
3197 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
3198 (s390-linux64-ipa.o: s390-linux64.c): Remove.
3199 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3200 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3201 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3202 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3203 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3204 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3205 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3206 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3207 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3208 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3209 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3210 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3211 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3212 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3213 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3214 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3215 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3216 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3217 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3218 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3219 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3220 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3221 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3222 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3223 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3224 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3225 (tdesc-ipa.o: tdesc.c): Remove.
3226 (x32-linux-ipa.o: x32-linux.c): Remove.
3227 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3228 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3230 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3232 * Makefile.in (%.o: ../arch/%.c): New rule.
3233 (arm.o: ../arch/arm.c): Remove.
3234 (arm-linux.o: ../arch/arm-linux.c): Remove.
3235 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3236 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3238 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3240 * Makefile.in (%.o: ../nat/%.c): New rule.
3241 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3242 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3243 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3244 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3245 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3246 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3247 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3248 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3249 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3250 (linux-personality.o: ../nat/linux-personality.c): Remove.
3251 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3252 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3253 (x86-linux.o: ../nat/x86-linux.c): Remove.
3254 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3255 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3257 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3259 * Makefile.in (%.o: ../common/%.c): New rule.
3260 (signals.o: ../common/signals.c): Remove.
3261 (print-utils.o: ../common/print-utils.c): Remove.
3262 (rsp-low.o: ../common/rsp-low.c): Remove.
3263 (common-utils.o: ../common/common-utils.c): Remove.
3264 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3265 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3266 (vec.o: ../common/vec.c): Remove.
3267 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3268 (xml-utils.o: ../common/xml-utils.c): Remove.
3269 (ptid.o: ../common/ptid.c): Remove.
3270 (buffer.o: ../common/buffer.c): Remove.
3271 (format.o: ../common/format.c): Remove.
3272 (filestuff.o: ../common/filestuff.c): Remove.
3273 (agent.o: ../common/agent.c): Remove.
3274 (errors.o: ../common/errors.c): Remove.
3275 (environ.o: ../common/environ.c): Remove.
3276 (common-debug.o: ../common/common-debug.c): Remove.
3277 (cleanups.o: ../common/cleanups.c): Remove.
3278 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3279 (fileio.o: ../common/fileio.c): Remove.
3280 (common-regcache.o: ../common/common-regcache.c): Remove.
3281 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3282 (new-op.o: ../common/new-op.c): Remove.
3283 (btrace-common.o: ../common/btrace-common.c): Remove.
3285 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3287 * Makefile.in (%.o: ../target/%.c): New rule.
3288 (waitstatus.o: ../target/waitstatus.c): Remove.
3290 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3293 (%.c: ../regformats/%.dat,
3294 (%.c: ../regformats/arm/%.dat,
3295 (%.c: ../regformats/i386/%.dat,
3296 (%.c: ../regformats/rs6000/%.dat): New rules.
3297 (aarch64.c): Remove.
3298 (reg-arm.c): Remove.
3299 (arm-with-iwmmxt.c): Remove.
3300 (arm-with-vfpv2.c): Remove.
3301 (arm-with-vfpv3.c): Remove.
3302 (arm-with-neon.c): Remove.
3303 (reg-bfin.c): Remove.
3304 (reg-cris.c): Remove.
3305 (reg-crisv32.c): Remove.
3307 (i386-linux.c): Remove.
3308 (i386-avx.c): Remove.
3309 (i386-avx-linux.c): Remove.
3310 (i386-avx-avx512.c): Remove.
3311 (i386-avx-avx512-linux.c): Remove.
3312 (i386-mpx.c): Remove.
3313 (i386-mpx-linux.c): Remove.
3314 (i386-avx-mpx-avx512-pku.c): Remove.
3315 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3316 (i386-avx-mpx.c): Remove.
3317 (i386-avx-mpx-linux.c): Remove.
3318 (i386-mmx.c): Remove.
3319 (i386-mmx-linux.c): Remove.
3320 (reg-ia64.c): Remove.
3321 (reg-m32r.c): Remove.
3322 (reg-m68k.c): Remove.
3324 (mips-linux.c): Remove.
3325 (mips-dsp-linux.c): Remove.
3326 (mips64-linux.c): Remove.
3327 (mips64-dsp-linux.c): Remove.
3328 (nios2-linux.c): Remove.
3329 (powerpc-32.c): Remove.
3330 (powerpc-32l.c): Remove.
3331 (powerpc-altivec32l.c): Remove.
3332 (powerpc-cell32l.c): Remove.
3333 (powerpc-vsx32l.c): Remove.
3334 (powerpc-isa205-32l.c): Remove.
3335 (powerpc-isa205-altivec32l.c): Remove.
3336 (powerpc-isa205-vsx32l.c): Remove.
3337 (powerpc-e500l.c): Remove.
3338 (powerpc-64l.c): Remove.
3339 (powerpc-altivec64l.c): Remove.
3340 (powerpc-cell64l.c): Remove.
3341 (powerpc-vsx64l.c): Remove.
3342 (powerpc-isa205-64l.c): Remove.
3343 (powerpc-isa205-altivec64l.c): Remove.
3344 (powerpc-isa205-vsx64l.c): Remove.
3345 (s390-linux32.c): Remove.
3346 (s390-linux32v1.c): Remove.
3347 (s390-linux32v2.c): Remove.
3348 (s390-linux64.c): Remove.
3349 (s390-linux64v1.c): Remove.
3350 (s390-linux64v2.c): Remove.
3351 (s390-te-linux64.c): Remove.
3352 (s390-vx-linux64.c): Remove.
3353 (s390-tevx-linux64.c): Remove.
3354 (s390x-linux64.c): Remove.
3355 (s390x-linux64v1.c): Remove.
3356 (s390x-linux64v2.c): Remove.
3357 (s390x-te-linux64.c): Remove.
3358 (s390x-vx-linux64.c): Remove.
3359 (s390x-tevx-linux64.c): Remove.
3360 (tic6x-c64xp-linux.c): Remove.
3361 (tic6x-c64x-linux.c): Remove.
3362 (tic6x-c62x-linux.c): Remove.
3364 (reg-sparc64.c): Remove.
3365 (reg-spu.c): Remove.
3367 (amd64-linux.c): Remove.
3368 (amd64-avx.c): Remove.
3369 (amd64-avx-linux.c): Remove.
3370 (amd64-avx-avx512.c): Remove.
3371 (amd64-avx-avx512-linux.c): Remove.
3372 (amd64-mpx.c): Remove.
3373 (amd64-mpx-linux.c): Remove.
3374 (amd64-avx-mpx-avx512-pku.c): Remove.
3375 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3376 (amd64-avx-mpx.c): Remove.
3377 (amd64-avx-mpx-linux.c): Remove.
3379 (x32-linux.c): Remove.
3380 (x32-avx.c): Remove.
3381 (x32-avx-linux.c): Remove.
3382 (x32-avx-avx512.c): Remove.
3383 (x32-avx-avx512-linux.c): Remove.
3384 (reg-xtensa.c): Remove.
3385 (reg-tilegx.c): Remove.
3386 (reg-tilegx32.c): Remove.
3388 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3390 * Makefile.in (SFILES): Add "common/environ.c".
3391 (OBJS): Add "common/environ.h".
3393 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3395 * configure.ac: Check if the fs_base and gs_base members of
3396 `struct user_regs_struct' exist.
3397 * config.in: Regenerated.
3398 * configure: Likewise.
3400 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3402 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3404 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3405 (get_next_pcs_syscall_next_pc): Likewise.
3407 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3409 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3410 * nto-x86-low.c: Likewise.
3412 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3414 * Makefile.in: Include disable-implicit-rules.mk.
3416 2016-11-23 Pedro Alves <palves@redhat.com>
3418 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3419 (debug_vprintf): Use std::chrono::steady_clock instead of
3420 gettimeofday. Use '.' instead of ':'.
3421 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3422 (get_timestamp): Use std::chrono::steady_clock instead of
3425 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3427 * Makefile.in: Fix whitespace formatting.
3429 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3431 * Makefile.in (SFILES, OBS): Flatten list and order
3434 2016-11-23 Pedro Alves <palves@redhat.com>
3436 * event-loop.c (handle_file_event): Use warning.
3437 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3438 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3441 2016-11-23 Pedro Alves <palves@redhat.com>
3443 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3445 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3446 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3447 debug_printf and debug_flush for debug output.
3448 * server.c (handle_general_set): Likewise.
3449 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3452 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3454 * Makefile.in (.c.o): Replace rule with ...
3455 (%.o: %.c): ... this one.
3457 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3459 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3460 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3462 * configure.ac: Remove checks for the make program.
3463 * configure: Re-generate.
3465 2016-10-28 Pedro Alves <palves@redhat.com>
3467 * Makefile.in (CXX_DIALECT): Get from configure.
3468 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3469 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3470 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3471 * config.in: Regenerate.
3472 * configure: Regenerate.
3474 2016-10-27 Yao Qi <yao.qi@linaro.org>
3476 * linux-low.c (linux_supports_range_stepping): Return true if
3477 can_software_single_step return true.
3479 2016-10-27 Yao Qi <yao.qi@linaro.org>
3481 * inferiors.c (find_inferior_in_random): New function.
3482 * inferiors.h (find_inferior_in_random): Declare.
3483 * linux-low.c (linux_wait_for_event_filtered): Call
3484 find_inferior_in_random instead of find_inferior.
3486 2016-10-27 Yao Qi <yao.qi@linaro.org>
3488 * linux-low.c (linux_wait_1): If single-step breakpoints are
3489 inserted, remove them.
3491 2016-10-26 Pedro Alves <palves@redhat.com>
3493 * linux-low.c (handle_extended_wait): Link parent/child fork
3495 (linux_wait_1): Unlink them.
3496 (linux_set_resume_request): Ignore resume requests for
3497 already-resumed and unhandled fork child threads.
3498 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3499 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3501 (handle_v_requests) <vCont>: Don't call require_running.
3502 * server.h (in_queued_stop_replies): New declaration.
3504 2016-10-24 Yao Qi <yao.qi@linaro.org>
3507 * linux-aarch64-low.c (append_insns): Cast the return value to
3510 2016-10-10 Yao Qi <yao.qi@linaro.org>
3512 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3514 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3516 * target.c (target_supports_multi_process): New function, moved
3518 * target.h (target_supports_multi_process): ... here. Remove
3521 2016-10-05 Tom Tromey <tom@tromey.com>
3524 * tracepoint.c (handle_tracepoint_bkpts): Check
3525 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3527 2016-10-05 Yao Qi <yao.qi@linaro.org>
3529 * configure.srv: Update the path of arm-*.xml files.
3531 2016-10-05 Terry Guo <terry.guo@arm.com>
3532 Yao Qi <yao.qi@linaro.org>
3534 * Makefile.in: Adjust the path of rules.
3535 * configure.srv: Update the path of xml files.
3536 * regformats/arm-with-iwmmxt.dat: Regenerated.
3537 * regformats/arm-with-neon.dat: Likewise.
3538 * regformats/arm-with-vfpv2.dat: Likewise.
3539 * regformats/arm-with-vfpv3.dat Likewise.
3541 2016-09-30 Yao Qi <yao.qi@linaro.org>
3544 * target.c (target_stop_and_wait): Don't call
3545 target_continue_no_signal, use resume_stop instead.
3547 2016-09-26 Yao Qi <yao.qi@linaro.org>
3549 * linux-low.c (linux_wait_1): Call debug_exit.
3551 2016-09-23 Pedro Alves <palves@redhat.com>
3553 * Makefile.in (SFILES): Add common/new-op.c.
3554 (OBS): Add common/new-op.o.
3555 (new-op.o): New rule.
3557 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3559 * .gitinore: Ignore more files.
3561 2016-09-21 Yao Qi <yao.qi@linaro.org>
3563 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3566 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3568 * server.c (start_inferior): Call target_mourn_inferior instead of
3569 mourn_inferior; pass ptid_t argument to it.
3571 (handle_target_event): Likewise.
3572 * target.c (target_mourn_inferior): New function.
3573 * target.h (mourn_inferior): Delete macro.
3575 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3577 * linux-low.c (lwp_is_stepping): New function.
3579 2016-09-06 Carl Love <cel@us.ibm.com>
3581 * server.c (start_inferior): Fixed comment, requested comment change
3582 didn't get updated correctly. Removed reference to ptrace () call as
3583 it is only true on Linux systems.
3585 2016-09-06 Carl Love <cel@us.ibm.com>
3587 * server.c (start_inferior): Do not call
3588 function target_post_create_inferior () if the
3589 inferior process has already exited.
3591 2016-09-05 Pedro Alves <palves@redhat.com>
3593 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3594 (COMPILE.pre, CC_LD): Use CXX directly.
3595 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3596 * acinclude.m4: Don't include build-with-cxx.m4.
3597 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3598 * configure: Regenerate.
3600 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3603 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3604 call writing data to own_buf.
3606 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3608 * target.c (mywait): Call target_wait instead of
3610 (target_wait): New function.
3612 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3614 * server.c (start_inferior): New variable 'ptid'. Replace calls
3615 to the_target->resume by target_continue{,_no_signal}, depending
3617 * target.c (target_stop_and_wait): Call target_continue_no_signal
3618 instead of the_target->resume.
3619 (target_continue): New function.
3621 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3623 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3625 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3628 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3630 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3631 * linux-arm-low.c (ps_get_thread_area): Likewise.
3632 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3633 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3634 * linux-mips-low.c (ps_get_thread_area): Likewise.
3635 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3636 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3637 * linux-x86-low.c (ps_get_thread_area): Likewise.
3638 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3640 2016-08-19 Pedro Alves <palves@redhat.com>
3642 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3644 2016-08-19 Pedro Alves <palves@redhat.com>
3646 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3647 comment. Use memcpy instead of casting through unsigned long.
3649 2016-08-19 Pedro Alves <palves@redhat.com>
3651 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3652 allocating around 0x80000000.
3654 2016-08-19 Pedro Alves <palves@redhat.com>
3657 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3658 (x32-avx512-linux-ipa.o): New rules.
3659 * configure.ac (x86_64-*-linux*): New x32 check.
3660 * configure.srv (ipa_x32_linux_regobj): New.
3661 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3662 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3664 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3666 * configure: Regenerate.
3668 2016-08-09 Pedro Alves <palves@redhat.com>
3671 * Makefile.in (OBS): Add signals-state-save-restore.o.
3672 (signals-state-save-restore.o): New rule.
3673 * config.in: Regenerate.
3674 * configure: Regenerate.
3675 * linux-low.c: Include "signals-state-save-restore.h".
3676 (linux_create_inferior): Call
3677 restore_original_signals_state.
3678 * server.c: Include "dispositions-save-restore.h".
3679 (captured_main): Call save_original_signals_state.
3681 2016-08-05 Pedro Alves <palves@redhat.com>
3683 * configure: Regenerate.
3685 2016-08-04 Yao Qi <yao.qi@linaro.org>
3687 * linux-low.c (regsets_fetch_inferior_registers): Check
3688 errno is ESRCH or not.
3690 2016-08-02 Yao Qi <yao.qi@linaro.org>
3692 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3693 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3694 (thread_db_load_search): Update.
3695 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3696 td_ta_set_event and td_ta_event_getmsg.
3698 2016-07-26 Pedro Alves <palves@redhat.com>
3701 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3702 of unsigned long for 64-bit registers and use uint32_t instead of
3703 unsigned int for 32-bit registers.
3705 2016-07-26 Pedro Alves <palves@redhat.com>
3707 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3710 2016-07-21 Tom Tromey <tom@tromey.com>
3712 * configure: Rebuild.
3714 2016-07-21 Yao Qi <yao.qi@linaro.org>
3716 * mem-break.c (find_gdb_breakpoint): Cast bp to
3717 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3719 2016-07-21 Yao Qi <yao.qi@linaro.org>
3721 * server.c (handle_v_requests): Support s and S actions
3722 if target_supports_software_single_step return true.
3724 2016-07-21 Yao Qi <yao.qi@linaro.org>
3726 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3727 is resume_step, call maybe_hw_step.
3728 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3730 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3732 (proceed_one_lwp): If resume request is resume_step, install
3733 reinsert breakpoints and call maybe_hw_step.
3735 2016-07-21 Yao Qi <yao.qi@linaro.org>
3737 * linux-low.c (proceed_one_lwp): Declare.
3738 (linux_resume_one_thread): Remove local variable 'step'.
3739 Lift code enqueue signal. Call proceed_one_lwp instead of
3740 linux_resume_one_lwp.
3742 2016-07-21 Yao Qi <yao.qi@linaro.org>
3744 * linux-low.c (linux_resume_one_thread): Call
3745 enqueue_pending_signal.
3747 2016-07-21 Yao Qi <yao.qi@linaro.org>
3749 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3750 * inferiors.c (do_restore_current_thread_cleanup): New function.
3751 (make_cleanup_restore_current_thread): Likewise.
3752 * linux-low.c (install_software_single_step_breakpoints): Call
3753 make_cleanup_restore_current_thread. Switch current_thread to
3756 2016-07-21 Yao Qi <yao.qi@linaro.org>
3758 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3759 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3760 (clone_one_breakpoint): Likewise.
3761 (delete_reinsert_breakpoints): Change parameter to thread.
3763 (has_reinsert_breakpoints): Likewise.
3764 (uninsert_reinsert_breakpoints): Likewise.
3765 (reinsert_reinsert_breakpoints): Likewise.
3766 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3767 (delete_reinsert_breakpoints): Likewise.
3768 (reinsert_reinsert_breakpoints): Likewise.
3769 (uninsert_reinsert_breakpoints): Likewise.
3770 (has_reinsert_breakpoints): Likewise.
3772 2016-07-21 Yao Qi <yao.qi@linaro.org>
3774 * inferiors.c (get_thread_process): Make parameter const.
3775 * inferiors.h (get_thread_process): Update declaration.
3776 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3777 Add new parameters child_thread and parent_thread. Callers
3779 * mem-break.h (clone_all_breakpoints): Update declaration.
3781 2016-07-21 Yao Qi <yao.qi@linaro.org>
3783 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3784 <command_list, handler>: Remove.
3785 (struct gdb_breakpoint): New.
3786 (struct other_breakpoint): New.
3787 (struct reinsert_breakpoint): New.
3788 (is_gdb_breakpoint): New function.
3789 (any_persistent_commands): Update command_list if
3790 is_gdb_breakpoint returns true.
3791 (set_breakpoint): Create breakpoints according to their types.
3792 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3793 (set_gdb_breakpoint_1): Likewise.
3794 (set_gdb_breakpoint): Likewise.
3795 (clear_breakpoint_conditions): Change parameter type to
3796 'struct gdb_breakpoint *'.
3797 (clear_breakpoint_commands): Likewise.
3798 (clear_breakpoint_conditions_and_commands): Likewise.
3799 (add_condition_to_breakpoint): Likewise.
3800 (add_breakpoint_condition): Likewise.
3801 (add_commands_to_breakpoint): Likewise.
3802 (check_breakpoints): Check other_breakpoint.
3803 (clone_one_breakpoint): Clone breakpopint according to its type.
3804 * mem-break.h (struct gdb_breakpoint): Declare.
3805 (set_gdb_breakpoint): Update declaration.
3806 (clear_breakpoint_conditions_and_commands): Likewise.
3807 (add_breakpoint_condition): Likewise.
3808 (add_breakpoint_commands): Likewise.
3809 * server.c (process_point_options): Change parameter type to
3810 'struct gdb_breakpoint *'.
3812 2016-07-21 Yao Qi <yao.qi@linaro.org>
3814 * mem-break.c (set_breakpoint_at): Rename it to ...
3815 (set_breakpoint_type_at): ... it.
3816 (set_breakpoint_at): Call set_breakpoint_type_at.
3817 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3818 * mem-break.h (set_breakpoint_at): Update comments.
3820 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3822 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3824 (nios2_store_gregset): Likewise.
3826 2016-07-01 Pedro Alves <palves@redhat.com>
3827 Antoine Tremblay <antoine.tremblay@ericsson.com>
3829 * linux-low.c: Change interface to take the target lwp_info
3830 pointer directly and return void. Handle detaching from a zombie
3832 (linux_detach_lwp_callback): New function.
3833 (linux_detach): Detach from the leader thread after detaching from
3836 2016-06-28 Yao Qi <yao.qi@linaro.org>
3838 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3839 for variable new_offset.
3840 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3841 (aarch64_ftrace_insn_reloc_cb): Likewise.
3842 (aarch64_ftrace_insn_reloc_tb): Likewise.
3843 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3844 PRIx64 instead of PRIx32.
3846 2016-06-28 Yao Qi <yao.qi@linaro.org>
3848 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3849 (the_low_target): Install arm_get_syscall_trapinfo.
3851 2016-06-28 Yao Qi <yao.qi@linaro.org>
3853 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3855 (the_low_target): Install aarch64_get_syscall_trapinfo.
3857 2016-06-28 Yao Qi <yao.qi@linaro.org>
3859 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3861 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3862 Remove parameter sysno.
3863 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3866 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3868 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3869 (s390_emit_ne_goto): Likewise.
3870 (s390_emit_lt_goto): Likewise.
3871 (s390_emit_le_goto): Likewise.
3872 (s390_emit_gt_goto): Likewise.
3873 (s390_emit_ge_goto): Likewise.
3874 (s390x_emit_eq_goto): Likewise.
3875 (s390x_emit_ne_goto): Likewise.
3876 (s390x_emit_lt_goto): Likewise.
3877 (s390x_emit_le_goto): Likewise.
3878 (s390x_emit_gt_goto): Likewise.
3879 (s390x_emit_ge_goto): Likewise.
3880 (s390_emit_ops_impl): Mark variable static.
3881 (s390x_emit_ops): Likewise.
3883 2016-06-17 Yao Qi <yao.qi@linaro.org>
3885 * linux-low.c (handle_extended_wait): Call
3886 uninsert_reinsert_breakpoints for the parent process. Remove
3887 reinsert breakpoints from the child process. Reinsert them to
3888 the parent process when vfork is done.
3889 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3890 (reinsert_reinsert_breakpoints): New function.
3891 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3892 (reinsert_reinsert_breakpoints): Declare.
3894 2016-06-17 Yao Qi <yao.qi@linaro.org>
3896 * linux-low.c (handle_extended_wait): If the parent is doing
3897 step-over, remove the reinsert breakpoints from the forked child.
3899 2016-06-17 Yao Qi <yao.qi@linaro.org>
3901 * linux-low.c (unsuspend_all_lwps): Declare.
3902 (linux_low_filter_event): If thread exited, call finish_step_over.
3903 If step-over is finished, unsuspend other threads.
3905 2016-06-17 Yao Qi <yao.qi@linaro.org>
3907 * linux-low.c (linux_resume_one_lwp_throw): Assert
3908 has_reinsert_breakpoints returns false.
3909 * mem-break.c (delete_disabled_breakpoints): Assert
3910 bp type isn't reinsert_breakpoint.
3912 2016-06-17 Yao Qi <yao.qi@linaro.org>
3914 * linux-low.c (maybe_hw_step): New function.
3915 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3916 (finish_step_over): Switch current_thread to lwp temporarily,
3917 and assert has_reinsert_breakpoints returns true.
3918 (proceed_one_lwp): Call maybe_hw_step.
3919 * mem-break.c (has_reinsert_breakpoints): New function.
3920 * mem-break.h (has_reinsert_breakpoints): Declare.
3922 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3924 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3926 2016-05-17 Yao Qi <yao.qi@linaro.org>
3928 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3929 instead of find_inferior.
3931 2016-05-05 Yao Qi <yao.qi@linaro.org>
3933 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3934 Initialize res to zero.
3936 2016-05-05 Yao Qi <yao.qi@linaro.org>
3938 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3941 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3943 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3944 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3945 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3947 2016-04-28 Par Olsson <par.olsson@windriver.com>
3948 Simon Marchi <simon.marchi@ericsson.com>
3950 * tracepoint.c (write_inferior_int8): New function.
3951 (cmd_qtenable_disable): Write enable flag using
3952 write_inferior_int8.
3954 2016-04-25 Yao Qi <yao.qi@linaro.org>
3956 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3957 (need_step_over_p): Return zero if the LWP has pending signals
3958 can be delivered on software single step target.
3960 2016-04-25 Yao Qi <yao.qi@linaro.org>
3962 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3963 return instead of error.
3965 2016-04-22 Yao Qi <yao.qi@linaro.org>
3967 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3970 2016-04-22 Yao Qi <yao.qi@linaro.org>
3972 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3973 signal when stepping over breakpoint with software single
3976 2016-04-21 Pedro Alves <palves@redhat.com>
3978 * linux-s390-low.c (s390_collect_ptrace_register)
3979 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3981 (s390_check_regset): Use void * instead of gdb_byte *.
3983 2016-04-20 Pedro Alves <palves@redhat.com>
3985 * configure: Renegerate.
3987 2016-04-20 Yao Qi <yao.qi@linaro.org>
3989 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3990 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3992 (arm_store_gregset): Likewise.
3994 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3996 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3997 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3998 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3999 (amd64-avx-mpx-linux.c): New rules.
4000 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
4001 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
4002 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
4003 (srv_amd64_regobj): Add amd64-avx-mpx.o.
4004 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
4005 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
4006 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
4007 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
4008 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
4009 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
4010 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
4011 * linux-x86-low.c (x86_linux_read_description): Add case for
4012 X86_XSTATE_AVX_MPX_MASK.
4013 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
4014 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
4015 init_registers_i386_avx_mpx_linux.
4016 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4017 (initialize_low_tracepoint): Call
4018 init_registers_i386_avx_mpx_linux.
4019 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
4020 (initialize_low_tracepoint): Call
4021 init_registers_amd64_avx_mpx_linux.
4022 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
4023 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
4024 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
4027 2016-04-18 Pedro Alves <palves@redhat.com>
4029 * configure: Regenerate.
4031 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
4033 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4034 (aarch64_emit_sub): Likewise.
4036 2016-04-12 Pedro Alves <palves@redhat.com>
4038 * utils.c (prepare_to_throw_exception): Delete.
4040 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
4042 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
4044 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
4046 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4048 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
4050 * linux-aarch64-ipa.c: Add <elf.h> include.
4051 * linux-ppc-ipa.c: Add <elf.h> include.
4052 * linux-s390-ipa.c: Add <elf.h> include.
4054 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4056 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
4057 (get_raw_reg_ptr): Likewise.
4058 (get_trace_state_variable_value_ptr): Likewise.
4059 (set_trace_state_variable_value_ptr): Likewise.
4060 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
4063 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4064 Marcin Kościelnicki <koriakin@0x04.net>
4067 * linux-ppc-low.c (emit_insns): New function.
4068 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
4069 (ppc_emit_prologue): New function.
4070 (ppc_emit_epilogue): New function.
4071 (ppc_emit_add): New function.
4072 (ppc_emit_sub): New function.
4073 (ppc_emit_mul): New function.
4074 (ppc_emit_lsh): New function.
4075 (ppc_emit_rsh_signed): New function.
4076 (ppc_emit_rsh_unsigned): New function.
4077 (ppc_emit_ext): New function.
4078 (ppc_emit_zero_ext): New function.
4079 (ppc_emit_log_not): New function.
4080 (ppc_emit_bit_and): New function.
4081 (ppc_emit_bit_or): New function.
4082 (ppc_emit_bit_xor): New function.
4083 (ppc_emit_bit_not): New function.
4084 (ppc_emit_equal): New function.
4085 (ppc_emit_less_signed): New function.
4086 (ppc_emit_less_unsigned): New function.
4087 (ppc_emit_ref): New function.
4088 (ppc_emit_const): New function.
4089 (ppc_emit_reg): New function.
4090 (ppc_emit_pop): New function.
4091 (ppc_emit_stack_flush): New function.
4092 (ppc_emit_swap): New function.
4093 (ppc_emit_stack_adjust): New function.
4094 (ppc_emit_call): New function.
4095 (ppc_emit_int_call_1): New function.
4096 (ppc_emit_void_call_2): New function.
4097 (ppc_emit_if_goto): New function.
4098 (ppc_emit_goto): New function.
4099 (ppc_emit_eq_goto): New function.
4100 (ppc_emit_ne_goto): New function.
4101 (ppc_emit_lt_goto): New function.
4102 (ppc_emit_le_goto): New function.
4103 (ppc_emit_gt_goto): New function.
4104 (ppc_emit_ge_goto): New function.
4105 (ppc_write_goto_address): New function.
4106 (ppc_emit_ops_impl): New static variable.
4107 (ppc64v1_emit_prologue): New function.
4108 (ppc64v2_emit_prologue): New function.
4109 (ppc64_emit_epilogue): New function.
4110 (ppc64_emit_add): New function.
4111 (ppc64_emit_sub): New function.
4112 (ppc64_emit_mul): New function.
4113 (ppc64_emit_lsh): New function.
4114 (ppc64_emit_rsh_signed): New function.
4115 (ppc64_emit_rsh_unsigned): New function.
4116 (ppc64_emit_ext): New function.
4117 (ppc64_emit_zero_ext): New function.
4118 (ppc64_emit_log_not): New function.
4119 (ppc64_emit_bit_and): New function.
4120 (ppc64_emit_bit_or): New function.
4121 (ppc64_emit_bit_xor): New function.
4122 (ppc64_emit_bit_not): New function.
4123 (ppc64_emit_equal): New function.
4124 (ppc64_emit_less_signed): New function.
4125 (ppc64_emit_less_unsigned): New function.
4126 (ppc64_emit_ref): New function.
4127 (ppc64_emit_const): New function.
4128 (ppc64v1_emit_reg): New function.
4129 (ppc64v2_emit_reg): New function.
4130 (ppc64_emit_pop): New function.
4131 (ppc64_emit_stack_flush): New function.
4132 (ppc64_emit_swap): New function.
4133 (ppc64v1_emit_call): New function.
4134 (ppc64v2_emit_call): New function.
4135 (ppc64v1_emit_int_call_1): New function.
4136 (ppc64v2_emit_int_call_1): New function.
4137 (ppc64v1_emit_void_call_2): New function.
4138 (ppc64v2_emit_void_call_2): New function.
4139 (ppc64_emit_if_goto): New function.
4140 (ppc64_emit_eq_goto): New function.
4141 (ppc64_emit_ne_goto): New function.
4142 (ppc64_emit_lt_goto): New function.
4143 (ppc64_emit_le_goto): New function.
4144 (ppc64_emit_gt_goto): New function.
4145 (ppc64_emit_ge_goto): New function.
4146 (ppc64v1_emit_ops_impl): New static variable.
4147 (ppc64v2_emit_ops_impl): New static variable.
4148 (ppc_emit_ops): New function.
4149 (linux_low_target): Wire in ppc_emit_ops.
4151 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
4152 Marcin Kościelnicki <koriakin@0x04.net>
4155 * Makefile.in: Add powerpc-*-ipa.o
4156 * configure.srv: Add ipa_obj for powerpc*-linux.
4157 * linux-ppc-ipa.c: New file.
4158 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
4160 (PPC_FIELD): New macro.
4161 (PPC_SEXT): New macro.
4162 (PPC_OP6): New macro.
4163 (PPC_BO): New macro.
4164 (PPC_LI): New macro.
4165 (PPC_BD): New macro.
4166 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
4167 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
4168 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
4169 (ppc_get_thread_area): New function.
4170 (is_elfv2_inferior): New function.
4171 (gen_ds_form): New function.
4172 (GEN_STD): New macro.
4173 (GEN_STDU): New macro.
4174 (GEN_LD): New macro.
4175 (GEN_LDU): New macro.
4176 (gen_d_form): New function.
4177 (GEN_ADDI): New macro.
4178 (GEN_ADDIS): New macro.
4179 (GEN_LI): New macro.
4180 (GEN_LIS): New macro.
4181 (GEN_ORI): New macro.
4182 (GEN_ORIS): New macro.
4183 (GEN_LWZ): New macro.
4184 (GEN_STW): New macro.
4185 (GEN_STWU): New macro.
4186 (gen_xfx_form): New function.
4187 (GEN_MFSPR): New macro.
4188 (GEN_MTSPR): New macro.
4189 (GEN_MFCR): New macro.
4190 (GEN_MTCR): New macro.
4191 (GEN_SYNC): New macro.
4192 (GEN_LWSYNC): New macro.
4193 (gen_x_form): New function.
4194 (GEN_OR): New macro.
4195 (GEN_MR): New macro.
4196 (GEN_LWARX): New macro.
4197 (GEN_STWCX): New macro.
4198 (GEN_CMPW): New macro.
4199 (gen_md_form): New function.
4200 (GEN_RLDICL): New macro.
4201 (GEN_RLDICR): New macro.
4202 (gen_i_form): New function.
4204 (GEN_BL): New macro.
4205 (gen_b_form): New function.
4206 (GEN_BNE): New macro.
4207 (GEN_LOAD): New macro.
4208 (GEN_STORE): New macro.
4209 (gen_limm): New function.
4210 (gen_atomic_xchg): New function.
4211 (gen_call): New function.
4212 (ppc_relocate_instruction): New function.
4213 (ppc_install_fast_tracepoint_jump_pad): New function.
4214 (ppc_get_min_fast_tracepoint_insn_len): New function.
4215 (ppc_get_ipa_tdesc_idx): New function.
4216 (the_low_target): Wire in the new functions.
4217 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4219 * linux-ppc-tdesc.h: New file.
4221 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4223 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4224 (alloc_jump_pad_buffer): New function.
4225 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4226 (alloc_jump_pad_buffer): New function.
4227 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4228 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4229 (alloc_jump_pad_buffer): New function.
4230 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4231 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4232 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4233 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4235 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4237 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4238 * linux-amd64-ipa.c: Likewise.
4239 * linux-i386-ipa.c: Likewise.
4240 * linux-s390-ipa.c: Likewise.
4241 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4242 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4243 set_trace_state_variable_value_ptr.
4244 (struct ipa_sym_addresses): Likewise.
4245 (symbol_list): Likewise.
4246 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4247 accessing gdb_collect directly.
4248 (gdb_collect_ptr_type): New typedef.
4249 (get_raw_reg_ptr_type): New typedef.
4250 (get_trace_state_variable_value_ptr_type): New typedef.
4251 (set_trace_state_variable_value_ptr_type): New typedef.
4252 (gdb_collect_ptr): New global.
4253 (get_raw_reg_ptr): New global.
4254 (get_trace_state_variable_value_ptr): New global.
4255 (set_trace_state_variable_value_ptr): New global.
4256 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4257 accessing get_raw_reg directly.
4258 (get_get_tsv_func_addr): Likewise for
4259 get_trace_state_variable_value_ptr.
4260 (get_set_tsv_func_addr): Likewise for
4261 set_trace_state_variable_value_ptr.
4262 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4264 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4266 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4268 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4270 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4272 (relocate_instruction): Remove own_buf.
4273 * server.c (own_buf): Make global.
4274 (handle_v_requests): Make global.
4275 * server.h (own_buf): New declaration.
4276 (handle_v_requests): New prototype.
4278 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4281 * linux-s390-low.c (add_insns): New function.
4282 (s390_emit_prologue): New function.
4283 (s390_emit_epilogue): New function.
4284 (s390_emit_add): New function.
4285 (s390_emit_sub): New function.
4286 (s390_emit_mul): New function.
4287 (s390_emit_lsh): New function.
4288 (s390_emit_rsh_signed): New function.
4289 (s390_emit_rsh_unsigned): New function.
4290 (s390_emit_ext): New function.
4291 (s390_emit_log_not): New function.
4292 (s390_emit_bit_and): New function.
4293 (s390_emit_bit_or): New function.
4294 (s390_emit_bit_xor): New function.
4295 (s390_emit_bit_not): New function.
4296 (s390_emit_equal): New function.
4297 (s390_emit_less_signed): New function.
4298 (s390_emit_less_unsigned): New function.
4299 (s390_emit_ref): New function.
4300 (s390_emit_if_goto): New function.
4301 (s390_emit_goto): New function.
4302 (s390_write_goto_address): New function.
4303 (s390_emit_litpool): New function.
4304 (s390_emit_const): New function.
4305 (s390_emit_call): New function.
4306 (s390_emit_reg): New function.
4307 (s390_emit_pop): New function.
4308 (s390_emit_stack_flush): New function.
4309 (s390_emit_zero_ext): New function.
4310 (s390_emit_swap): New function.
4311 (s390_emit_stack_adjust): New function.
4312 (s390_emit_set_r2): New function.
4313 (s390_emit_int_call_1): New function.
4314 (s390_emit_void_call_2): New function.
4315 (s390_emit_eq_goto): New function.
4316 (s390_emit_ne_goto): New function.
4317 (s390_emit_lt_goto): New function.
4318 (s390_emit_le_goto): New function.
4319 (s390_emit_gt_goto): New function.
4320 (s390_emit_ge_goto): New function.
4321 (s390x_emit_prologue): New function.
4322 (s390x_emit_epilogue): New function.
4323 (s390x_emit_add): New function.
4324 (s390x_emit_sub): New function.
4325 (s390x_emit_mul): New function.
4326 (s390x_emit_lsh): New function.
4327 (s390x_emit_rsh_signed): New function.
4328 (s390x_emit_rsh_unsigned): New function.
4329 (s390x_emit_ext): New function.
4330 (s390x_emit_log_not): New function.
4331 (s390x_emit_bit_and): New function.
4332 (s390x_emit_bit_or): New function.
4333 (s390x_emit_bit_xor): New function.
4334 (s390x_emit_bit_not): New function.
4335 (s390x_emit_equal): New function.
4336 (s390x_emit_less_signed): New function.
4337 (s390x_emit_less_unsigned): New function.
4338 (s390x_emit_ref): New function.
4339 (s390x_emit_if_goto): New function.
4340 (s390x_emit_const): New function.
4341 (s390x_emit_call): New function.
4342 (s390x_emit_reg): New function.
4343 (s390x_emit_pop): New function.
4344 (s390x_emit_stack_flush): New function.
4345 (s390x_emit_zero_ext): New function.
4346 (s390x_emit_swap): New function.
4347 (s390x_emit_stack_adjust): New function.
4348 (s390x_emit_int_call_1): New function.
4349 (s390x_emit_void_call_2): New function.
4350 (s390x_emit_eq_goto): New function.
4351 (s390x_emit_ne_goto): New function.
4352 (s390x_emit_lt_goto): New function.
4353 (s390x_emit_le_goto): New function.
4354 (s390x_emit_gt_goto): New function.
4355 (s390x_emit_ge_goto): New function.
4356 (s390_emit_ops): New function.
4357 (struct linux_target_ops): Fill in emit_ops hook.
4359 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4362 * Makefile.in: Add s390 IPA files.
4363 * configure.srv: Build IPA for s390.
4364 * linux-s390-ipa.c: New file.
4365 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4366 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4367 (tdesc_s390_linux32): Likewise.
4368 (init_registers_s390_linux32v1): Likewise.
4369 (tdesc_s390_linux32v1): Likewise.
4370 (init_registers_s390_linux32v2): Likewise.
4371 (tdesc_s390_linux32v2): Likewise.
4372 (init_registers_s390_linux64): Likewise.
4373 (tdesc_s390_linux64): Likewise.
4374 (init_registers_s390_linux64v1): Likewise.
4375 (tdesc_s390_linux64v1): Likewise.
4376 (init_registers_s390_linux64v2): Likewise.
4377 (tdesc_s390_linux64v2): Likewise.
4378 (init_registers_s390_te_linux64): Likewise.
4379 (tdesc_s390_te_linux64): Likewise.
4380 (init_registers_s390_vx_linux64): Likewise.
4381 (tdesc_s390_vx_linux64): Likewise.
4382 (init_registers_s390_tevx_linux64): Likewise.
4383 (tdesc_s390_tevx_linux64): Likewise.
4384 (init_registers_s390x_linux64): Likewise.
4385 (tdesc_s390x_linux64): Likewise.
4386 (init_registers_s390x_linux64v1): Likewise.
4387 (tdesc_s390x_linux64v1): Likewise.
4388 (init_registers_s390x_linux64v2): Likewise.
4389 (tdesc_s390x_linux64v2): Likewise.
4390 (init_registers_s390x_te_linux64): Likewise.
4391 (tdesc_s390x_te_linux64): Likewise.
4392 (init_registers_s390x_vx_linux64): Likewise.
4393 (tdesc_s390x_vx_linux64): Likewise.
4394 (init_registers_s390x_tevx_linux64): Likewise.
4395 (tdesc_s390x_tevx_linux64): Likewise.
4396 (have_hwcap_s390_vx): New static variable.
4397 (s390_arch_setup): Fill have_hwcap_s390_vx.
4398 (s390_get_thread_area): New function.
4399 (s390_ft_entry_gpr_esa): New const.
4400 (s390_ft_entry_gpr_zarch): New const.
4401 (s390_ft_entry_misc): New const.
4402 (s390_ft_entry_fr): New const.
4403 (s390_ft_entry_vr): New const.
4404 (s390_ft_main_31): New const.
4405 (s390_ft_main_64): New const.
4406 (s390_ft_exit_fr): New const.
4407 (s390_ft_exit_vr): New const.
4408 (s390_ft_exit_misc): New const.
4409 (s390_ft_exit_gpr_esa): New const.
4410 (s390_ft_exit_gpr_zarch): New const.
4411 (append_insns): New function.
4412 (s390_relocate_instruction): New function.
4413 (s390_install_fast_tracepoint_jump_pad): New function.
4414 (s390_get_min_fast_tracepoint_insn_len): New function.
4415 (s390_get_ipa_tdesc_idx): New function.
4416 (struct linux_target_ops): Wire in the above functions.
4417 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4418 * linux-s390-tdesc.h: New file.
4420 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4422 * linux-s390-low.c (s390_supports_tracepoints): New function.
4423 (struct linux_target_ops): Fill supports_tracepoints hook.
4425 2016-03-18 Yao Qi <yao.qi@linaro.org>
4427 * linux-low.c (lwp_signal_can_be_delivered): New function.
4428 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4430 2016-03-18 Yao Qi <yao.qi@linaro.org>
4432 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4433 0 if signal is enqueued. Remove 'signal' from one debugging
4434 message. Move one debugging message to some lines below.
4435 Remove code setting 'signal' to 0.
4437 2016-03-18 Yao Qi <yao.qi@linaro.org>
4439 * linux-low.c (linux_low_filter_event): Remove redundant
4440 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4442 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4444 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4445 (struct linux_target_ops): Wire in the above.
4447 2016-03-03 Yao Qi <yao.qi@linaro.org>
4449 * linux-low.c: Update comments to start_step_over.
4451 2016-03-03 Yao Qi <yao.qi@linaro.org>
4454 * linux-low.c (handle_extended_wait): Set child suspended
4455 if event_lwp->bp_reinsert isn't zero.
4457 2016-03-02 Yao Qi <yao.qi@linaro.org>
4459 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4460 enqueue_pending_signal.
4462 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4464 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4467 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4469 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4470 (s390_regmap_3264) [!__s390x__]: New global.
4471 (s390_collect_ptrace_register): Skip map entries containing -1.
4472 (s390_supply_ptrace_register): Ditto.
4473 (s390_fill_gprs_high): New function.
4474 (s390_store_gprs_high): New function.
4475 (s390_regsets): Add NT_S390_HIGH_GPRS.
4476 (s390_get_hwcap): Enable on 31-bit.
4477 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4478 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4479 Detect NT_S390_HIGH_GPRS.
4480 (s390_usrregs_info_3264): Enable on 31-bit.
4481 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4482 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4484 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4487 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4488 * configure.srv: Ditto.
4489 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4490 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4491 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4492 (init_registers_amd64_linux): Remove prototype.
4493 (tdesc_amd64_linux): Remove declaration.
4494 (get_ipa_tdesc): New function.
4495 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4496 initialize remaining tdescs.
4497 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4498 (init_registers_i386_linux): Remove prototype.
4499 (tdesc_i386_linux): Remove declaration.
4500 (get_ipa_tdesc): New function.
4501 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4502 initialize remaining tdescs.
4503 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4504 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4505 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4506 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4507 (x86_get_ipa_tdesc_idx): New function.
4508 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4509 * linux-x86-tdesc.h: New file.
4510 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4511 (target_get_ipa_tdesc_idx): New macro.
4512 * tracepoint.c (ipa_tdesc_idx): New macro.
4513 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4514 (symbol_list): Add ipa_tdesc_idx.
4515 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4516 (ipa_tdesc): Remove.
4517 (ipa_tdesc_idx): New variable.
4518 (get_context_regcache): Use get_ipa_tdesc.
4519 (gdb_collect): Ditto.
4521 * tracepoint.h (get_ipa_tdesc): New prototype.
4522 (ipa_tdesc): Remove.
4524 2016-02-24 Pedro Alves <palves@redhat.com>
4526 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4527 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4528 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4529 Factor out common code between the USE_SIGTRAP_SIGINFO and
4530 !USE_SIGTRAP_SIGINFO blocks.
4531 (linux_low_filter_event): Call save_stop_reason instead of
4532 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4534 (linux_wait_1): Update comments.
4536 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4538 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4539 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4540 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4541 ppc_insert_point, ppc_remove_point.
4543 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4545 * linux-s390-low.c (s390_supports_z_point_type): New function.
4546 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4548 2016-02-16 Yao Qi <yao.qi@linaro.org>
4550 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4551 PC. Get pc from regcache_read_pc.
4553 2016-02-12 Yao Qi <yao.qi@linaro.org>
4555 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4556 or linux_get_pc_32bit.
4557 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4559 2016-02-12 Yao Qi <yao.qi@linaro.org>
4561 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4562 arm_linux_get_next_pcs_fixup.
4564 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4566 * tracepoint.c (x_tracepoint_action_download): Change
4567 write_inferior_data_ptr to write_inferior_data_pointer.
4568 (cmd_qtstart): Likewise.
4569 (write_inferior_data_ptr): Remove.
4570 (download_agent_expr): Change write_inferior_data_ptr to
4571 write_inferior_data_pointer.
4572 (download_tracepoint_1): Likewise.
4573 (download_tracepoint): Likewise.
4574 (download_trace_state_variables): Likewise.
4576 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4577 Marcin Kościelnicki <koriakin@0x04.net>
4579 * tracepoint.c (struct tracepoint_action_ops): Remove.
4580 (struct tracepoint_action): Remove ops.
4581 (m_tracepoint_action_download, r_tracepoint_action_download)
4582 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4583 size and offset accordingly.
4584 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4585 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4586 (tracepoint_action_send, tracepoint_action_download): New functions.
4587 Helpers for trace action handlers.
4588 (add_tracepoint_action): Remove setup actions ops.
4589 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4591 2016-02-10 Yao Qi <yao.qi@linaro.org>
4593 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4595 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4597 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4599 * configure: Regenerate.
4601 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4603 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4604 void * to gdb_byte *.
4605 * linux-low.c (siginfo_fixup): Likewise.
4606 (linux_xfer_siginfo): Likewise.
4607 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4609 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4611 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4613 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4615 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4617 * linux-x86-low.c [__x86_64__]: Include
4618 "nat/amd64-linux-siginfo.h".
4619 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4620 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4621 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4622 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4623 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4624 (cpt_si_fd, si_timerid, si_overrun): Move from
4625 nat/amd64-linux-siginfo.c.
4626 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4628 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4630 * server.c (skip_to_semicolon): Remove.
4631 (process_point_options): Use strchrnul instead of
4634 2016-01-26 Yao Qi <yao.qi@linaro.org>
4636 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4637 * linux-low.c (install_software_single_step_breakpoints): Don't
4638 call regcache_read_pc.
4639 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4642 2016-01-26 Yao Qi <yao.qi@linaro.org>
4644 * linux-low.c (install_software_single_step_breakpoints): Call
4645 regcache_read_pc instead of get_pc.
4647 2016-01-26 Yao Qi <yao.qi@linaro.org>
4649 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4650 (unblock_async_io): Rename to ...
4651 (block_unblock_async_io): ... it. New function.
4652 (enable_async_io): Don't install SIGIO handler. Unblock it
4654 (disable_async_io): Don't ignore SIGIO. Block it instead.
4655 (initialize_async_io): Install SIGIO handler. Don't call
4658 2016-01-26 Yao Qi <yao.qi@linaro.org>
4660 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4661 first character is '\003', call *the_target->request_interrupt.
4663 2016-01-25 Yao Qi <yao.qi@linaro.org>
4665 * remote-utils.c (new_thread_notify): Remove.
4666 (dead_thread_notify): Likewise.
4667 * remote-utils.h (new_thread_notify): Remove declaration.
4668 (dead_thread_notify): Likewise.
4670 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4672 * gdb.trace/pending.exp: Fix expected message on continue.
4674 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4676 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4677 it works properly on big-endian machines where sizeof (CORE_ADDR)
4680 2016-01-21 Pedro Alves <palves@redhat.com>
4682 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4683 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4684 * configure: Regenerate.
4686 2016-01-21 Yao Qi <yao.qi@linaro.org>
4688 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4689 is_thumb and set it according to CPSR saved on the stack.
4690 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4691 arm_sigreturn_next_pc.
4693 2016-01-18 Yao Qi <yao.qi@linaro.org>
4695 * linux-low.c (linux_set_pc_64bit): New function.
4696 (linux_get_pc_64bit): New function.
4697 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4699 * linux-sparc-low.c (debug_threads): Remove declaration.
4700 (sparc_get_pc): Remove.
4701 (the_low_target): Use linux_get_pc_64bit instead of
4703 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4704 (the_low_target): Use linux_get_pc_64bit and
4707 2016-01-18 Yao Qi <yao.qi@linaro.org>
4709 * linux-arm-low.c (debug_threads): Remove declaration.
4710 (arm_get_pc, arm_set_pc): Remove.
4711 (the_low_target): Use linux_get_pc_32bit and
4713 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4714 (the_low_target): Use linux_get_pc_32bit and
4716 * linux-cris-low.c (debug_threads): Remove declaration.
4717 (cris_get_pc, cris_set_pc,): Remove.
4718 (the_low_target): Use linux_get_pc_32bit and
4720 * linux-crisv32-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-low.c: Include inttypes.h.
4725 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4726 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4727 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4728 (the_low_target): Use linux_get_pc_32bit and
4730 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4731 (the_low_target): Use linux_get_pc_32bit and
4733 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4734 (the_low_target): Use linux_get_pc_32bit and
4736 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4737 (the_low_target): Use linux_get_pc_32bit and
4739 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4740 (the_low_target): Use linux_get_pc_32bit and
4743 2016-01-18 Gary Benson <gbenson@redhat.com>
4745 * configure.ac (AC_FUNC_FORK): New check.
4746 * config.in: Regenerate.
4747 * configure: Likewise.
4749 2016-01-14 Yao Qi <yao.qi@linaro.org>
4751 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4752 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4753 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4754 arm_get_next_pcs_ctor.
4756 2016-01-12 Josh Stone <jistone@redhat.com>
4757 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4759 * inferiors.h: Include "gdb_vecs.h".
4760 (struct process_info): Add syscalls_to_catch.
4761 * inferiors.c (remove_process): Free syscalls_to_catch.
4762 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4763 syscall_return stops.
4764 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4765 * server.c (handle_general_set): Handle QCatchSyscalls.
4766 (handle_query): Report support for QCatchSyscalls.
4767 * target.h (struct target_ops): Add supports_catch_syscall.
4768 (target_supports_catch_syscall): New macro.
4769 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4770 (struct lwp_info): Add syscall_state.
4771 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4772 Maintain syscall_state and syscalls_to_catch across exec.
4773 (get_syscall_trapinfo): New function, proxy to the_low_target.
4774 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4775 (linux_low_filter_event): Toggle syscall_state entry/return for
4776 syscall traps, and set it ignored for all others.
4777 (gdb_catching_syscalls_p): New function.
4778 (gdb_catch_this_syscall_p): New function.
4779 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4780 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4781 (linux_supports_catch_syscall): New function.
4782 (linux_target_ops): Install it.
4783 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4784 (the_low_target): Install it.
4786 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4788 * acinclude.m4: Include new ../warning.m4 file.
4789 * configure: Regenerated.
4790 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4792 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4794 * ax.c (is_goto_target): Mark static.
4795 * linux-low.c (register_addr): Likewise.
4796 (linux_fetch_registers, linux_store_registers): Likewise.
4797 * mem-break.c (any_persistent_commands): Fix old prototype.
4798 (add_commands_to_breakpoint): Mark static.
4799 * regcache.c (find_register_by_name): Delete unused func.
4800 * remote-utils.c (hex_or_minus_one): Mark static.
4801 * server.c (monitor_show_help): Mark static.
4802 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4803 handle_v_requests): Likewise.
4805 2016-01-12 Pedro Alves <palves@redhat.com>
4807 Remove use of the registered trademark symbol throughout.
4809 2016-01-08 Yao Qi <yao.qi@linaro.org>
4811 * remote-utils.c (getpkt): If c is '\003', call target hook
4814 2016-01-06 Yao Qi <yao.qi@linaro.org>
4816 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4817 linux-aarch32-low.c.
4818 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4819 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4820 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4821 (thumb2_breakpoint): Declare.
4822 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4823 linux-aarch32-low.h.
4824 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4825 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4826 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4828 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4830 * gdbreplay.c (gdbreplay_version): Change copyright year in
4832 * server.c (gdbserver_version): Likewise.
4834 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4836 * server.c (crc32_table): Delete.
4837 (crc32): Use libiberty's xcrc32 function.
4839 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4841 * lynx-low.c (lynx_delete_thread_callback): New function.
4842 (lynx_mourn): Properly delete our process and all of its
4843 threads. Remove call to clear_inferiors.
4845 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4847 * target.c (thread_search_callback): Add check that
4848 the thread_stopped target callback is not NULL before
4851 2015-12-21 Yao Qi <yao.qi@linaro.org>
4853 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4856 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4858 * server.c (handle_query): Call target_supports_software_single_step.
4860 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4862 * linux-low.c (single_step): New function.
4863 (linux_resume_one_lwp_throw): Call single_step.
4864 (start_step_over): Likewise.
4866 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4868 * Makefile.in (SFILES): Append arch/arm-linux.c,
4869 arch/arm-get-next-pcs.c.
4870 (arm-linux.o): New rule.
4871 (arm-get-next-pcs.o): New rule.
4872 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4874 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4875 to linux-aarch32-low.c.
4876 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4877 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4878 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4879 (thumb2_breakpoint_len): Likewise.
4880 (arm_is_thumb_mode): Make non-static.
4881 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4882 from linux-aarch32-low.c.
4883 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4884 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4885 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4886 (thumb2_breakpoint_len): Likewise.
4887 (arm_is_thumb_mode): New declaration.
4888 * linux-arm-low.c: Include arch/arm-linux.h
4889 aarch/arm-get-next-pcs.h, sys/syscall.h.
4890 (get_next_pcs_ops): New struct.
4891 (get_next_pcs_addr_bits_remove): New function.
4892 (get_next_pcs_is_thumb): New function.
4893 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4894 (arm_sigreturn_next_pc): Likewise.
4895 (get_next_pcs_syscall_next_pc): Likewise.
4896 (arm_gdbserver_get_next_pcs): Likewise.
4897 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4899 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4900 * server.h: Include gdb_vecs.h.
4902 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4904 * Makefile.in (SFILES): Append common/common-regcache.c.
4905 (OBS): Append common-regcache.o.
4906 (common-regcache.o): New rule.
4907 * regcache.c (init_register_cache): Initialize cache to
4909 (regcache_raw_read_unsigned): New function.
4910 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4911 register_status enum.
4913 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4915 * linux-aarch64-low.c (the_low_targets): Rename
4916 breakpoint_reinsert_addr to get_next_pcs.
4917 * linux-arm-low.c (the_low_targets): Likewise.
4918 * linux-bfin-low.c (the_low_targets): Likewise.
4919 * linux-cris-low.c (the_low_targets): Likewise.
4920 * linux-crisv32-low.c (the_low_targets): Likewise.
4921 * linux-low.c (can_software_single_step): Likewise.
4922 (install_software_single_step_breakpoints): New function.
4923 (start_step_over): Use install_software_single_step_breakpoints.
4924 * linux-low.h: New CORE_ADDR vector.
4925 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4927 * linux-mips-low.c (the_low_targets): Likewise.
4928 * linux-nios2-low.c (the_low_targets): Likewise.
4929 * linux-sparc-low.c (the_low_targets): Likewise.
4931 2015-12-17 Pedro Alves <palves@redhat.com>
4933 * linux-low.c (linux_kill_one_lwp): Remove references to
4935 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4937 (linux_init_signals): Delete.
4938 (initialize_low): Adjust.
4939 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4941 2015-12-16 Pedro Alves <palves@redhat.com>
4943 * configure.ac (compiler warning flags): When testing a
4944 -Wno-foo option, check whether -Wfoo works instead.
4945 * configure: Regenerate.
4947 2015-12-11 Don Breazeal <donb@codesourcery.com>
4949 * server.c (process_serial_event): Don't exit from gdbserver
4950 in remote mode if there are still active inferiors.
4952 2015-12-11 Yao Qi <yao.qi@linaro.org>
4954 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4955 arm_breakpoint_at if the process is 32-bit.
4957 2015-12-11 Yao Qi <yao.qi@linaro.org>
4959 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4962 2015-12-07 Yao Qi <yao.qi@linaro.org>
4964 * configure.srv: Append arm.o to srv_tgtobj for
4965 aarch64*-*-linux* target.
4966 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4967 from linux-arm-low.c.
4968 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4969 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4970 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4971 (thumb2_breakpoint_len): Likewise.
4972 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4973 (arm_breakpoint_kinds): Likewise.
4974 (arm_breakpoint_kind_from_pc): Likewise.
4975 (arm_sw_breakpoint_from_kind): Likewise.
4976 (arm_breakpoint_kind_from_current_state): Likewise.
4977 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4978 (arm_sw_breakpoint_from_kind): Declare.
4979 (arm_breakpoint_kind_from_current_state): Declare.
4980 (arm_breakpoint_at): Declare.
4981 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4982 arm_sw_breakpoint_from_kind if process is 32-bit.
4983 (aarch64_breakpoint_kind_from_pc): New function.
4984 (aarch64_breakpoint_kind_from_current_state): New function.
4985 (the_low_target): Initialize fields breakpoint_kind_from_pc
4986 and breakpoint_kind_from_current_state.
4987 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4988 linux-aarch32-low.c.
4989 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4990 (arm_breakpoint, arm_breakpoint_len): Likewise.
4991 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4992 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4993 (arm_is_thumb_mode): Likewise.
4994 (arm_breakpoint_at): Likewise.
4995 (arm_breakpoint_kind_from_pc): Likewise.
4996 (arm_sw_breakpoint_from_kind): Likewise.
4997 (arm_breakpoint_kind_from_current_state): Likewise.
5000 2015-08-04 Yao Qi <yao.qi@linaro.org>
5002 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5003 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5004 * server.c (extended_protocol): Remove "static".
5005 * server.h (extended_protocol): Declare it.
5007 2015-12-04 Josh Stone <jistone@redhat.com>
5009 * target.h (struct target_ops) <arch_setup>: Rename to ...
5010 (struct target_ops) <post_create_inferior>: ... this.
5011 (target_arch_setup): Rename to ...
5012 (target_post_create_inferior): ... this, calling post_create_inferior.
5013 * server.c (start_inferior): Update target_arch_setup calls to
5014 target_post_create_inferior.
5015 * linux-low.c (linux_low_ptrace_options): Forward declare.
5016 (linux_arch_setup): Update its comment for general use.
5017 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
5018 (struct linux_target_ops): Use linux_post_create_inferior.
5019 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
5020 to post_create_inferior.
5021 * nto-low.c (struct nto_target_ops): Likewise.
5022 * spu-low.c (struct spu_target_ops): Likewise.
5023 * win32-low.c (struct win32_target_ops): Likewise.
5025 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
5027 * linux-arm-low.c: Remove duplicate arch/arm.h include.
5029 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5031 * linux-arm-low.c (arm_reinsert_addr): Remove function.
5032 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
5033 * linux-cris-low.c (cris_reinsert_addr> Remove function.
5034 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5035 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
5036 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5037 * linux-mips-low.c (mips_reinsert_addr): Remove function.
5038 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5039 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
5040 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5041 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
5042 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
5044 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5046 * linux-low.c (linux_look_up_symbols): Don't call
5047 linux_supports_traceclone.
5048 * linux-low.h (thread_db_init): Remove use_events argument.
5049 * thread-db.c (thread_db_use_event): Remove global variable.
5050 (struct thread_db) <td_thr_event_enable_p>: Remove field.
5051 (struct thread_db) <td_create_bp>: Remove field.
5052 (thread_db_create_event): Remove function.
5053 (thread_db_enable_reporting): Likewise.
5054 (find_one_thread): Don't check for thread_db_use_events.
5055 (attach_thread): Likewise.
5056 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
5057 (try_thread_db_load_1): Don't check for thread_db_use_events.
5058 (thread_db_init): Remove use_events argument and thread events
5060 (remove_thread_event_breakpoints): Remove function.
5061 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
5063 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5065 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
5067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5068 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
5069 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5070 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
5071 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
5073 * linux-crisv32-low.c (cris_supports_hardware_single_step):
5075 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5076 * linux-low.c (can_hardware_single_step): Use
5077 supports_hardware_single_step.
5078 (can_software_single_step): New function.
5079 (start_step_over): Call can_software_single_step.
5080 (linux_supports_hardware_single_step): New function.
5081 (struct target_ops) <supports_software_single_step>: Initialize.
5082 * linux-low.h (struct linux_target_ops)
5083 <supports_hardware_single_step>: Initialize.
5084 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
5085 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5086 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
5087 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
5088 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
5089 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5090 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
5091 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5092 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
5093 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
5095 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
5096 (struct linux_target_ops) <tile_supports_hardware_single_step>:
5098 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
5099 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5100 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
5102 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
5103 * target.h (struct target_ops): <supports_software_single_step>:
5105 (target_supports_software_single_step): New macro.
5107 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5109 * linux-low.c (linux_wait_1): Fix pc advance condition.
5110 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
5111 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
5113 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
5115 * linux-arm-low.c (arm_is_thumb_mode): New function.
5116 (arm_breakpoint_at): Use arm_is_thumb_mode.
5117 (arm_breakpoint_kind_from_current_state): New function.
5118 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
5120 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
5121 (linux_breakpoint_kind_from_current_state): New function.
5122 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
5123 * linux-low.h (struct linux_target_ops)
5124 <breakpoint_kind_from_current_state>: New field.
5125 * target.h (struct target_ops): Likewise.
5126 (target_breakpoint_kind_from_current_state): New macro.
5128 2015-11-30 Pedro Alves <palves@redhat.com>
5130 * linux-low.c (linux_resume): Wake up the event loop before
5133 2015-11-30 Pedro Alves <palves@redhat.com>
5135 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
5137 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
5139 * target.c (struct thread_search): New structure.
5140 (thread_search_callback): New function.
5141 (prev_general_thread): New global.
5142 (prepare_to_access_memory, done_accessing_memory): New functions.
5143 * target.h (prepare_to_access_memory, done_accessing_memory):
5144 Replace macros with function declarations.
5146 2015-11-30 Pedro Alves <palves@redhat.com>
5149 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
5150 report TARGET_WAITKIND_NO_RESUMED.
5151 * remote-utils.c (prepare_resume_reply): Handle
5152 TARGET_WAITKIND_NO_RESUMED.
5153 * server.c (report_no_resumed): New global.
5154 (handle_query) <qSupported>: Handle "no-resumed+". Report
5155 "no-resumed+" support.
5156 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
5157 return error if the client doesn't support no-resumed events.
5158 (push_stop_notification): New function.
5159 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
5160 events if the client supports them.
5162 2015-11-30 Pedro Alves <palves@redhat.com>
5164 * linux-low.c (thread_still_has_status_pending_p): Don't check
5166 (lwp_resumed): New function.
5167 (status_pending_p_callback): Return early if the LWP is not
5168 supposed to be resumed.
5170 2015-11-30 Pedro Alves <palves@redhat.com>
5172 * linux-low.c (handle_extended_wait): Assert that the LWP's
5173 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
5174 thread create events, leave the new child's status pending.
5175 (linux_low_filter_event): If GDB wants to hear about thread exit
5176 events, leave the LWP marked dead and don't delete it.
5177 (linux_wait_for_event_filtered): Don't check for thread exit.
5178 (filter_exit_event): New function.
5179 (linux_wait_1): Use it, when returning an exit event.
5180 (linux_resume_one_lwp_throw): Assert that the LWP's
5181 waitstatus is TARGET_WAITKIND_IGNORE.
5182 * remote-utils.c (prepare_resume_reply): Handle
5183 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
5184 * server.c (report_thread_events): New global.
5185 (handle_general_set): Handle QThreadEvents.
5186 (handle_query) <qSupported>: Handle and report QThreadEvents+;
5187 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
5188 TARGET_WAITKIND_THREAD_EXITED.
5189 * server.h (report_thread_events): Declare.
5191 2015-11-30 Pedro Alves <palves@redhat.com>
5193 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
5194 the thread's last_resume_kind was resume_stop.
5196 2015-11-30 Pedro Alves <palves@redhat.com>
5198 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5201 2015-11-30 Pedro Alves <palves@redhat.com>
5203 * server.c (handle_v_requests): Handle vCtrlC.
5205 2015-11-30 Pedro Alves <palves@redhat.com>
5207 * gdbthread.h (find_any_thread_of_pid): Declare.
5208 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5210 * server.c (handle_query): If current_thread is NULL, look for
5211 another thread of the selected process.
5213 2015-11-26 Daniel Colascione <dancol@dancol.org>
5214 Simon Marchi <simon.marchi@ericsson.com>
5216 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5217 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5219 * target.h (struct target_ops) <thread_name>: New field.
5220 (target_thread_name): New macro.
5222 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5224 * regcache.h (regcache_invalidate_pid): Add declaration.
5225 * regcache.c (regcache_invalidate_pid): New function, extracted
5226 from regcache_invalidate.
5227 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5228 Add trivial documentation comment.
5229 * lynx-low.c: Use regcache_invalidate_pid instead of
5230 regcache_invalidate.
5232 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5234 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5235 and Elf64_auxv_t if the target is Android.
5237 2015-11-22 Doug Evans <xdje42@gmail.com>
5239 * target.h: #include <sys/types.h>.
5241 2015-11-19 Pedro Alves <palves@redhat.com>
5243 * linux-low.c (linux_process_qsupported): Change prototype.
5245 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5247 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5248 and adjust to loop over all features.
5249 * server.c (handle_query) <qSupported>: Adjust to call
5250 target_process_qsupported once, passing it a vector of unprocessed
5252 * target.h (struct target_ops) <process_qsupported>: Change
5254 (target_process_qsupported): Adjust.
5256 2015-11-19 Pedro Alves <palves@redhat.com>
5258 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5260 * configure: Regenerate.
5262 2015-11-19 Pedro Alves <palves@redhat.com>
5264 * configure: Regenerate.
5266 2015-11-19 Yao Qi <yao.qi@linaro.org>
5268 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5271 2015-11-19 Yao Qi <yao.qi@linaro.org>
5273 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5274 (struct aarch64_operand): Move enum out.
5276 2015-11-19 Yao Qi <yao.qi@linaro.org>
5278 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5279 struct user_fpsimd_state *.
5280 (aarch64_store_fpregset): Likewise.
5282 2015-11-19 Yao Qi <yao.qi@linaro.org>
5284 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5285 struct user_pt_regs *.
5286 (aarch64_store_gregset): Likewise.
5288 2015-11-18 Pedro Alves <palves@redhat.com>
5290 * Makefile.in (all_object_files): Add $IPA_OBJS.
5292 2015-11-17 Pedro Alves <palves@redhat.com>
5294 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5295 GDB_SIGNAL_0 and gdb_signal_to_string.
5297 2015-11-17 Pedro Alves <palves@redhat.com>
5299 * win32-low.c (handle_output_debug_string): Remove parameter.
5300 (win32_kill): Remove our_status local and adjust call to
5301 handle_output_debug_string.
5302 (get_child_debug_event): Adjust call to
5303 handle_output_debug_string.
5305 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5307 * linux-mips-low.c (mips_fill_gregset): Add cast.
5308 (mips_store_gregset): Likewise.
5309 (mips_fill_fpregset): Likewise.
5310 (mips_store_fpregset): Likewise.
5312 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5314 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5317 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5319 * linux-mips-low.c (mips_linux_new_thread): Change type of
5320 watch_type to enum target_hw_bp_type.
5322 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5324 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5325 Change return type to arm_hwbp_type.
5327 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5329 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5330 (arm_store_gregset): Likewise.
5331 * linux-arm-low.c (arm_get_hwcap): Likewise.
5332 (arm_read_description): Likewise.
5334 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5336 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5338 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5340 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5341 (ppc_fill_vsxregset): Likewise.
5342 (ppc_store_vsxregset): Likewise.
5343 (ppc_fill_vrregset): Likewise.
5344 (ppc_store_vrregset): Likewise.
5345 (ppc_fill_evrregset): Likewise.
5346 (ppc_store_evrregset): Likewise.
5348 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5350 * linux-ppc-low.c (ppc_usrregs_info): Remove
5351 forward-declaration.
5352 (ppc_arch_setup): Move lower in file.
5354 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5356 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5357 (ps_pdwrite): Likewise.
5359 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5361 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5362 to after assert checks.
5364 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5366 * proc-service.c (ps_pdread): Add/adjust casts.
5367 (ps_pdwrite): Add/adjust casts.
5369 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5371 * server.c (handle_search_memory_1): Cast return value of
5374 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5376 * server.c (write_qxfer_response): Change type of data to
5379 2015-10-29 Pedro Alves <palves@redhat.com>
5381 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5383 2015-10-29 Pedro Alves <palves@redhat.com>
5385 * tracepoint.c (clear_installed_tracepoints): Add casts.
5387 2015-10-29 Pedro Alves <palves@redhat.com>
5389 * server.c (handle_v_cont, process_serial_event): Add enum
5390 gdb_signal casts to signal parsing code.
5392 2015-10-29 Pedro Alves <palves@redhat.com>
5394 * linux-low.h (NULL_REGSET): Define.
5395 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5396 * linux-arm-low.c (arm_regsets): Likewise.
5397 * linux-crisv32-low.c (cris_regsets): Likewise.
5398 * linux-m68k-low.c (m68k_regsets): Likewise.
5399 * linux-mips-low.c (mips_regsets): Likewise.
5400 * linux-nios2-low.c (nios2_regsets): Likewise.
5401 * linux-ppc-low.c (ppc_regsets): Likewise.
5402 * linux-s390-low.c (s390_regsets): Likewise.
5403 * linux-sh-low.c (sh_regsets): Likewise.
5404 * linux-sparc-low.c (sparc_regsets): Likewise.
5405 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5406 * linux-tile-low.c (tile_regsets): Likewise.
5407 * linux-x86-low.c (x86_regsets): Likewise.
5408 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5410 2015-10-29 Pedro Alves <palves@redhat.com>
5412 * linux-low.h (NULL_REGSET): Define.
5413 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5414 * linux-arm-low.c (arm_regsets): Likewise.
5415 * linux-crisv32-low.c (cris_regsets): Likewise.
5416 * linux-m68k-low.c (m68k_regsets): Likewise.
5417 * linux-mips-low.c (mips_regsets): Likewise.
5418 * linux-nios2-low.c (nios2_regsets): Likewise.
5419 * linux-ppc-low.c (ppc_regsets): Likewise.
5420 * linux-s390-low.c (s390_regsets): Likewise.
5421 * linux-sh-low.c (sh_regsets): Likewise.
5422 * linux-sparc-low.c (sparc_regsets): Likewise.
5423 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5424 * linux-tile-low.c (tile_regsets): Likewise.
5425 * linux-x86-low.c (x86_regsets): Likewise.
5426 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5428 2015-10-26 Doug Evans <dje@google.com>
5430 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5432 2015-10-26 Doug Evans <dje@google.com>
5434 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5436 2015-10-26 Doug Evans <dje@google.com>
5438 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5440 (attach_thread, find_new_threads_callback): Ditto.
5442 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5444 * mem-break.h (set_breakpoint_data): Remove.
5446 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5448 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5449 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5450 (initialize_low): Remove set_breakpoint_data call.
5451 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5452 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5453 (initialize_low): Remove set_breakpoint_data call.
5454 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5455 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5456 (initialize_low): Remove set_breakpoint_data call.
5458 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5460 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5461 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5462 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5463 * target.h (target_breakpoint_kind_from_pc): New macro.
5465 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5467 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5468 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5469 the default breakpoint kind.
5471 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5473 * linux-arm-low.c (arm_supports_z_point_type): Add software
5476 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5478 * linux-arm-low.c: Refactor breakpoint definitions.
5479 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5480 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5482 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5484 * Makefile.in: Add arm.c/o.
5485 * configure.srv: Likewise.
5486 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5487 (arm_breakpoint_kind_from_pc): New function.
5488 (arm_sw_breakpoint_from_kind): Return proper kind.
5489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5491 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5493 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5495 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5496 (struct raw_breakpoint) <size>: Remove.
5497 (struct raw_breakpoint) <kind>: Add.
5498 (bp_size): New function.
5499 (bp_opcode): Likewise.
5500 (find_raw_breakpoint_at): Adjust for kind.
5501 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5502 (remove_memory_breakpoint): Adjust for kind call bp_size.
5503 (set_raw_breakpoint_at): Adjust for kind.
5504 (set_breakpoint): Likewise.
5505 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5506 (delete_raw_breakpoint): Adjust for kind.
5507 (delete_breakpoint): Likewise.
5508 (find_gdb_breakpoint): Likewise.
5509 (set_gdb_breakpoint_1): Likewise.
5510 (set_gdb_breakpoint): Likewise.
5511 (delete_gdb_breakpoint_1): Likewise.
5512 (delete_gdb_breakpoint): Likewise.
5513 (uninsert_raw_breakpoint): Likewise.
5514 (reinsert_raw_breakpoint): Likewise.
5515 (set_breakpoint_data): Remove.
5516 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5517 (check_mem_read): Adjust for kind call bp_size.
5518 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5519 (clone_one_breakpoint): Adjust for kind.
5520 * mem-break.h (set_gdb_breakpoint): Likewise.
5521 (delete_gdb_breakpoint): Likewise.
5522 * server.c (process_serial_event): Likewise.
5524 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5526 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5527 (struct linux_target_ops) <breakpoint>: Remove.
5528 (struct linux_target_ops) <breakpoint_len>: Remove.
5529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5531 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5532 (arm_sw_breakpoint_from_kind): New function.
5533 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5534 (struct linux_target_ops) <breakpoint>: Remove.
5535 (struct linux_target_ops) <breakpoint_len>: Remove.
5536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5538 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5539 (struct linux_target_ops) <breakpoint>: Remove.
5540 (struct linux_target_ops) <breakpoint_len>: Remove.
5541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5543 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5544 (struct linux_target_ops) <breakpoint>: Remove.
5545 (struct linux_target_ops) <breakpoint_len>: Remove.
5546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5548 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5549 and sw_breakpoint_from_kind to increment the pc.
5550 (linux_breakpoint_kind_from_pc): New function.
5551 (linux_sw_breakpoint_from_kind): New function.
5552 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5553 (initialize_low): Call breakpoint_kind_from_pc and
5554 sw_breakpoint_from_kind to replace breakpoint_data/len.
5555 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5558 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5559 (struct linux_target_ops) <breakpoint>: Remove.
5560 (struct linux_target_ops) <breakpoint_len>: Remove.
5561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5563 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5564 (struct linux_target_ops) <breakpoint>: Remove.
5565 (struct linux_target_ops) <breakpoint_len>: Remove.
5566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5568 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5569 (struct linux_target_ops) <breakpoint>: Remove.
5570 (struct linux_target_ops) <breakpoint_len>: Remove.
5571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5573 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5574 (struct linux_target_ops) <breakpoint>: Remove.
5575 (struct linux_target_ops) <breakpoint_len>: Remove.
5576 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5577 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5578 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5579 (struct linux_target_ops) <breakpoint>: Remove.
5580 (struct linux_target_ops) <breakpoint_len>: Remove.
5581 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5582 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5583 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5584 (struct linux_target_ops) <breakpoint>: Remove.
5585 (struct linux_target_ops) <breakpoint_len>: Remove.
5586 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5587 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5588 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5589 (struct linux_target_ops) <breakpoint>: Remove.
5590 (struct linux_target_ops) <breakpoint_len>: Remove.
5591 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5592 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5593 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5594 (struct linux_target_ops) <breakpoint>: Remove.
5595 (struct linux_target_ops) <breakpoint_len>: Remove.
5596 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5597 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5598 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5599 (struct linux_target_ops) <breakpoint>: Remove.
5600 (struct linux_target_ops) <breakpoint_len>: Remove.
5601 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5602 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5603 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5604 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5605 (struct linux_target_ops) <breakpoint>: Remove.
5606 (struct linux_target_ops) <breakpoint_len>: Remove.
5607 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5608 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5609 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5610 (struct linux_target_ops) <breakpoint>: Remove.
5611 (struct linux_target_ops) <breakpoint_len>: Remove.
5612 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5613 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5615 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5617 * linux-cris-low.c (cris_get_pc): Remove void arg.
5619 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5621 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5624 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5626 * inferiors.c (thread_pid_matches_callback): New function.
5627 (find_thread_process): New function.
5628 (remove_thread): Reset current_thread.
5629 (remove_process): Assert threads have been removed first.
5631 2015-10-15 Yao Qi <yao.qi@linaro.org>
5633 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5635 (aarch64_remove_point): Likewise.
5636 * regcache.c (regcache_register_size): New function.
5638 2015-10-12 Yao Qi <yao.qi@linaro.org>
5640 * linux-aarch64-low.c: Update all callers as emit_load_store
5641 is renamed to aarch64_emit_load_store.
5643 2015-10-12 Yao Qi <yao.qi@linaro.org>
5645 * linux-aarch64-low.c: Update all callers of function renaming
5646 from emit_insn to aarch64_emit_insn.
5648 2015-10-12 Yao Qi <yao.qi@linaro.org>
5650 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5651 arch/aarch64-insn.h.
5652 (struct aarch64_memory_operand): Likewise.
5654 (emit_insn): Move to arch/aarch64-insn.c.
5655 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5656 (emit_load_store): Move to arch/aarch64-insn.c.
5657 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5658 (can_encode_int32): Remove.
5660 2015-10-12 Yao Qi <yao.qi@linaro.org>
5662 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5663 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5664 (aarch64_relocate_instruction): Likewise.
5665 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5666 (struct aarch64_insn_visitor): Likewise.
5668 2015-10-12 Yao Qi <yao.qi@linaro.org>
5670 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5671 (struct aarch64_insn_visitor): New.
5672 (struct aarch64_insn_relocation_data): New.
5673 (aarch64_ftrace_insn_reloc_b): New function.
5674 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5675 (aarch64_ftrace_insn_reloc_cb): Likewise.
5676 (aarch64_ftrace_insn_reloc_tb): Likewise.
5677 (aarch64_ftrace_insn_reloc_adr): Likewise.
5678 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5679 (aarch64_ftrace_insn_reloc_others): Likewise.
5681 (aarch64_relocate_instruction): Use visitor.
5683 2015-10-12 Yao Qi <yao.qi@linaro.org>
5685 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5686 int. Add argument buf.
5687 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5688 aarch64_relocate_instruction.
5690 2015-10-12 Yao Qi <yao.qi@linaro.org>
5692 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5693 argument insn. Remove local variable insn. Don't call
5695 (aarch64_install_fast_tracepoint_jump_pad): Call
5698 2015-09-30 Yao Qi <yao.qi@linaro.org>
5700 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5701 (emit_load_store_pair): Likewise.
5703 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5705 * dll.c (match_dll): Add cast(s).
5706 (unloaded_dll): Likewise.
5707 * linux-low.c (second_thread_of_pid_p): Likewise.
5708 (delete_lwp_callback): Likewise.
5709 (count_events_callback): Likewise.
5710 (select_event_lwp_callback): Likewise.
5711 (linux_set_resume_request): Likewise.
5712 * server.c (accumulate_file_name_length): Likewise.
5713 (emit_dll_description): Likewise.
5714 (handle_qxfer_threads_worker): Likewise.
5715 (visit_actioned_threads): Likewise.
5716 * thread-db.c (any_thread_of): Likewise.
5717 * tracepoint.c (same_process_p): Likewise.
5718 (match_blocktype): Likewise.
5719 (build_traceframe_info_xml): Likewise.
5721 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5723 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5725 (gdb_unparse_agent_expr): Likewise.
5726 * hostio.c (require_data): Likewise.
5727 (handle_pread): Likewise.
5728 * linux-low.c (disable_regset): Likewise.
5729 (fetch_register): Likewise.
5730 (store_register): Likewise.
5731 (get_dynamic): Likewise.
5732 (linux_qxfer_libraries_svr4): Likewise.
5733 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5734 (set_fast_tracepoint_jump): Likewise.
5735 (uninsert_fast_tracepoint_jumps_at): Likewise.
5736 (reinsert_fast_tracepoint_jumps_at): Likewise.
5737 (validate_inserted_breakpoint): Likewise.
5738 (clone_agent_expr): Likewise.
5739 * regcache.c (init_register_cache): Likewise.
5740 * remote-utils.c (putpkt_binary_1): Likewise.
5741 (decode_M_packet): Likewise.
5742 (decode_X_packet): Likewise.
5743 (look_up_one_symbol): Likewise.
5744 (relocate_instruction): Likewise.
5745 (monitor_output): Likewise.
5746 * server.c (handle_search_memory): Likewise.
5747 (handle_qxfer_exec_file): Likewise.
5748 (handle_qxfer_libraries): Likewise.
5749 (handle_qxfer): Likewise.
5750 (handle_query): Likewise.
5751 (handle_v_cont): Likewise.
5752 (handle_v_run): Likewise.
5753 (captured_main): Likewise.
5754 * target.c (write_inferior_memory): Likewise.
5755 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5756 * tracepoint.c (init_trace_buffer): Likewise.
5757 (add_tracepoint_action): Likewise.
5758 (add_traceframe): Likewise.
5759 (add_traceframe_block): Likewise.
5760 (cmd_qtdpsrc): Likewise.
5761 (cmd_qtdv): Likewise.
5762 (cmd_qtstatus): Likewise.
5763 (response_source): Likewise.
5764 (response_tsv): Likewise.
5765 (cmd_qtnotes): Likewise.
5766 (gdb_collect): Likewise.
5767 (initialize_tracepoint): Likewise.
5769 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5771 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5772 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5773 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5775 (enum aarch64_condition_codes): New enum.
5776 (w0): New static global.
5779 (struct aarch64_memory_operand) <type>: New
5780 MEMORY_OPERAND_POSTINDEX type.
5781 (postindex_memory_operand): New helper function.
5782 (emit_ret): New function.
5783 (emit_load_store_pair): New function, factored out of emit_stp
5784 with support for MEMORY_OPERAND_POSTINDEX.
5785 (emit_stp): Rewrite using emit_load_store_pair.
5786 (emit_ldp): New function.
5787 (emit_load_store): Likewise.
5788 (emit_ldr): Mention post-index instruction in comment.
5789 (emit_ldrh): New function.
5790 (emit_ldrb): New function.
5791 (emit_ldrsw): Mention post-index instruction in comment.
5792 (emit_str): Likewise.
5793 (emit_subs): New function.
5794 (emit_cmp): Likewise.
5795 (emit_and): Likewise.
5796 (emit_orr): Likewise.
5797 (emit_orn): Likewise.
5798 (emit_eor): Likewise.
5799 (emit_mvn): Likewise.
5800 (emit_lslv): Likewise.
5801 (emit_lsrv): Likewise.
5802 (emit_asrv): Likewise.
5803 (emit_mul): Likewise.
5804 (emit_sbfm): Likewise.
5805 (emit_sbfx): Likewise.
5806 (emit_ubfm): Likewise.
5807 (emit_ubfx): Likewise.
5808 (emit_csinc): Likewise.
5809 (emit_cset): Likewise.
5810 (emit_nop): Likewise.
5811 (emit_ops_insns): New helper function.
5812 (emit_pop): Likewise.
5813 (emit_push): Likewise.
5814 (aarch64_emit_prologue): New function.
5815 (aarch64_emit_epilogue): Likewise.
5816 (aarch64_emit_add): Likewise.
5817 (aarch64_emit_sub): Likewise.
5818 (aarch64_emit_mul): Likewise.
5819 (aarch64_emit_lsh): Likewise.
5820 (aarch64_emit_rsh_signed): Likewise.
5821 (aarch64_emit_rsh_unsigned): Likewise.
5822 (aarch64_emit_ext): Likewise.
5823 (aarch64_emit_log_not): Likewise.
5824 (aarch64_emit_bit_and): Likewise.
5825 (aarch64_emit_bit_or): Likewise.
5826 (aarch64_emit_bit_xor): Likewise.
5827 (aarch64_emit_bit_not): Likewise.
5828 (aarch64_emit_equal): Likewise.
5829 (aarch64_emit_less_signed): Likewise.
5830 (aarch64_emit_less_unsigned): Likewise.
5831 (aarch64_emit_ref): Likewise.
5832 (aarch64_emit_if_goto): Likewise.
5833 (aarch64_emit_goto): Likewise.
5834 (aarch64_write_goto_address): Likewise.
5835 (aarch64_emit_const): Likewise.
5836 (aarch64_emit_call): Likewise.
5837 (aarch64_emit_reg): Likewise.
5838 (aarch64_emit_pop): Likewise.
5839 (aarch64_emit_stack_flush): Likewise.
5840 (aarch64_emit_zero_ext): Likewise.
5841 (aarch64_emit_swap): Likewise.
5842 (aarch64_emit_stack_adjust): Likewise.
5843 (aarch64_emit_int_call_1): Likewise.
5844 (aarch64_emit_void_call_2): Likewise.
5845 (aarch64_emit_eq_goto): Likewise.
5846 (aarch64_emit_ne_goto): Likewise.
5847 (aarch64_emit_lt_goto): Likewise.
5848 (aarch64_emit_le_goto): Likewise.
5849 (aarch64_emit_gt_goto): Likewise.
5850 (aarch64_emit_ge_got): Likewise.
5851 (aarch64_emit_ops_impl): New static global variable.
5852 (aarch64_emit_ops): New target function, return
5853 &aarch64_emit_ops_impl.
5854 (struct linux_target_ops): Install it.
5856 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5858 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5859 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5861 * linux-aarch64-ipa.c: New file.
5862 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5864 (aarch64_get_thread_area): New target method.
5865 (extract_signed_bitfield): New helper function.
5866 (aarch64_decode_ldr_literal): New function.
5867 (enum aarch64_opcodes): New enum.
5868 (struct aarch64_register): New struct.
5869 (struct aarch64_operand): New struct.
5870 (x0): New static global.
5879 (aarch64_register): New helper function.
5880 (register_operand): Likewise.
5881 (immediate_operand): Likewise.
5882 (struct aarch64_memory_operand): New struct.
5883 (offset_memory_operand): New helper function.
5884 (preindex_memory_operand): Likewise.
5885 (enum aarch64_system_control_registers): New enum.
5886 (ENCODE): New macro.
5887 (emit_insn): New helper function.
5888 (emit_b): New function.
5889 (emit_bcond): Likewise.
5890 (emit_cb): Likewise.
5891 (emit_tb): Likewise.
5892 (emit_blr): Likewise.
5893 (emit_stp): Likewise.
5894 (emit_ldp_q_offset): Likewise.
5895 (emit_stp_q_offset): Likewise.
5896 (emit_load_store): Likewise.
5897 (emit_ldr): Likewise.
5898 (emit_ldrsw): Likewise.
5899 (emit_str): Likewise.
5900 (emit_ldaxr): Likewise.
5901 (emit_stxr): Likewise.
5902 (emit_stlr): Likewise.
5903 (emit_data_processing_reg): Likewise.
5904 (emit_data_processing): Likewise.
5905 (emit_add): Likewise.
5906 (emit_sub): Likewise.
5907 (emit_mov): Likewise.
5908 (emit_movk): Likewise.
5909 (emit_mov_addr): Likewise.
5910 (emit_mrs): Likewise.
5911 (emit_msr): Likewise.
5912 (emit_sevl): Likewise.
5913 (emit_wfe): Likewise.
5914 (append_insns): Likewise.
5915 (can_encode_int32_in): New helper function.
5916 (aarch64_relocate_instruction): New function.
5917 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5918 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5919 (struct linux_target_ops): Install aarch64_get_thread_area,
5920 aarch64_install_fast_tracepoint_jump_pad and
5921 aarch64_get_min_fast_tracepoint_insn_len.
5923 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5925 * Makefile.in (aarch64-insn.o): New rule.
5926 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5928 2015-09-21 Yao Qi <yao.qi@linaro.org>
5930 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5932 2015-09-21 Yao Qi <yao.qi@linaro.org>
5934 * tracepoint.c (max_jump_pad_size): Remove.
5936 2015-09-18 Yao Qi <yao.qi@linaro.org>
5938 * linux-aarch64-low.c: Don't include sys/uio.h.
5939 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5941 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5943 * tracepoint.c (eval_result_type): Change prototype.
5944 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5946 2015-09-15 Pedro Alves <palves@redhat.com>
5948 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5949 Check whether to report exec events instead of checking whether
5950 multiprocess is enabled.
5952 2015-09-15 Pedro Alves <palves@redhat.com>
5955 * remote-utils.c (prepare_resume_reply): Merge
5956 TARGET_WAITKIND_VFORK_DONE switch case with the
5957 TARGET_WAITKIND_FORKED case.
5959 2015-09-15 Yao Qi <yao.qi@linaro.org>
5961 * server.c (handle_query): Check string comparison using
5962 "else if" instead of "if".
5964 2015-09-15 Yao Qi <yao.qi@linaro.org>
5966 * server.c (vCont_supported): New global variable.
5967 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5968 matches. Append ";vContSupported+" to own_buf.
5969 (handle_v_requests): Append ";s;S" to own_buf if target supports
5970 hardware single step or vCont_supported is false.
5971 (capture_main): Set vCont_supported to zero.
5973 2015-09-15 Yao Qi <yao.qi@linaro.org>
5975 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5977 (linux_supports_hardware_single_step): ... New function.
5978 (linux_target_ops): Update.
5979 * lynx-low.c (lynx_target_ops): Set field
5980 supports_hardware_single_step to target_can_do_hardware_single_step.
5981 * nto-low.c (nto_target_ops): Likewise.
5982 * spu-low.c (spu_target_ops): Likewise.
5983 * win32-low.c (win32_target_ops): Likewise.
5984 * target.c (target_can_do_hardware_single_step): New function.
5985 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5986 Remove. <supports_hardware_single_step>: New field.
5987 (target_supports_conditional_breakpoints): Remove.
5988 (target_supports_hardware_single_step): New macro.
5989 (target_can_do_hardware_single_step): Declare.
5990 * server.c (handle_query): Use target_supports_hardware_single_step
5991 instead of target_supports_conditional_breakpoints.
5993 2015-09-15 Yao Qi <yao.qi@linaro.org>
5995 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5997 (struct linux_target_ops the_low_target): Install
5998 aarch64_linux_siginfo_fixup.
6000 2015-09-11 Don Breazeal <donb@codesourcery.com>
6001 Luis Machado <lgustavo@codesourcery.com>
6003 * linux-low.c (linux_mourn): Static declaration.
6004 (linux_arch_setup): Move in front of
6005 handle_extended_wait.
6006 (linux_arch_setup_thread): New function.
6007 (handle_extended_wait): Handle exec events. Call
6008 linux_arch_setup_thread. Make event_lwp argument a
6009 pointer-to-a-pointer.
6010 (check_zombie_leaders): Do not check stopped threads.
6011 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
6012 (linux_low_filter_event): Add lwp and thread for exec'ing
6013 non-leader thread if leader thread has been deleted.
6014 Refactor code into linux_arch_setup_thread and call it.
6015 Pass child lwp pointer by reference to handle_extended_wait.
6016 (linux_wait_for_event_filtered): Update comment.
6017 (linux_wait_1): Prevent clobbering exec event status.
6018 (linux_supports_exec_events): New function.
6019 (linux_target_ops) <supports_exec_events>: Initialize new member.
6020 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
6022 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
6023 * server.c (report_exec_events): New global variable.
6024 (handle_query): Handle qSupported query for exec-events feature.
6025 (captured_main): Initialize report_exec_events.
6026 * server.h (report_exec_events): Declare new global variable.
6027 * target.h (struct target_ops) <supports_exec_events>: New
6029 (target_supports_exec_events): New macro.
6030 * win32-low.c (win32_target_ops) <supports_exec_events>:
6031 Initialize new member.
6033 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
6035 * linux-low.c (linux_low_enable_btrace): Remove.
6036 (linux_target_ops): Replace linux_low_enable_btrace with
6037 linux_enable_btrace.
6039 2015-09-03 Yao Qi <yao.qi@linaro.org>
6041 * linux-aarch64-low.c (aarch64_insert_point): Call
6042 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
6045 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
6047 * linux-low.c (check_stopped_by_breakpoint): Use
6048 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
6050 2015-08-27 Pedro Alves <palves@redhat.com>
6052 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
6054 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
6056 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
6057 the XNEW-family equivalent.
6058 (compile_bytecodes): Likewise.
6059 * dll.c (loaded_dll): Likewise.
6060 * event-loop.c (append_callback_event): Likewise.
6061 (create_file_handler): Likewise.
6062 (create_file_event): Likewise.
6063 * hostio.c (handle_open): Likewise.
6064 * inferiors.c (add_thread): Likewise.
6065 (add_process): Likewise.
6066 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
6067 * linux-arm-low.c (arm_new_process): Likewise.
6068 (arm_new_thread): Likewise.
6069 * linux-low.c (add_to_pid_list): Likewise.
6070 (linux_add_process): Likewise.
6071 (handle_extended_wait): Likewise.
6072 (add_lwp): Likewise.
6073 (enqueue_one_deferred_signal): Likewise.
6074 (enqueue_pending_signal): Likewise.
6075 (linux_resume_one_lwp_throw): Likewise.
6076 (linux_resume_one_thread): Likewise.
6077 (linux_read_memory): Likewise.
6078 (linux_write_memory): Likewise.
6079 * linux-mips-low.c (mips_linux_new_process): Likewise.
6080 (mips_linux_new_thread): Likewise.
6081 (mips_add_watchpoint): Likewise.
6082 * linux-x86-low.c (initialize_low_arch): Likewise.
6083 * lynx-low.c (lynx_add_process): Likewise.
6084 * mem-break.c (set_raw_breakpoint_at): Likewise.
6085 (set_breakpoint): Likewise.
6086 (add_condition_to_breakpoint): Likewise.
6087 (add_commands_to_breakpoint): Likewise.
6088 (clone_agent_expr): Likewise.
6089 (clone_one_breakpoint): Likewise.
6090 * regcache.c (new_register_cache): Likewise.
6091 * remote-utils.c (look_up_one_symbol): Likewise.
6092 * server.c (queue_stop_reply): Likewise.
6093 (start_inferior): Likewise.
6094 (queue_stop_reply_callback): Likewise.
6095 (handle_target_event): Likewise.
6096 * spu-low.c (fetch_ppc_memory): Likewise.
6097 (store_ppc_memory): Likewise.
6098 * target.c (set_target_ops): Likewise.
6099 * thread-db.c (thread_db_load_search): Likewise.
6100 (try_thread_db_load_1): Likewise.
6101 * tracepoint.c (add_tracepoint): Likewise.
6102 (add_tracepoint_action): Likewise.
6103 (create_trace_state_variable): Likewise.
6104 (cmd_qtdpsrc): Likewise.
6105 (cmd_qtro): Likewise.
6106 (add_while_stepping_state): Likewise.
6107 * win32-low.c (child_add_thread): Likewise.
6108 (get_image_name): Likewise.
6110 2015-08-25 Yao Qi <yao.qi@linaro.org>
6112 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
6114 2015-08-25 Yao Qi <yao.qi@linaro.org>
6116 * Makefile.in (aarch64-linux.o): New rule.
6117 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
6119 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
6120 (aarch64_init_debug_reg_state): Make it extern.
6121 (aarch64_linux_prepare_to_resume): Remove.
6123 2015-08-25 Yao Qi <yao.qi@linaro.org>
6125 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
6126 lwp_arch_private_info and ptid_of_lwp.
6128 2015-08-25 Yao Qi <yao.qi@linaro.org>
6130 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
6131 Find proc_info by find_process_pid. All callers updated.
6133 2015-08-25 Yao Qi <yao.qi@linaro.org>
6135 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
6137 (debug_reg_change_callback): Remove.
6138 (aarch64_notify_debug_reg_change): Remove.
6140 2015-08-25 Yao Qi <yao.qi@linaro.org>
6142 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
6143 Call current_lwp_ptid.
6145 2015-08-25 Yao Qi <yao.qi@linaro.org>
6147 * linux-aarch64-low.c (debug_reg_change_callback): Use
6150 2015-08-25 Yao Qi <yao.qi@linaro.org>
6152 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
6154 2015-08-25 Yao Qi <yao.qi@linaro.org>
6156 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
6158 2015-08-25 Yao Qi <yao.qi@linaro.org>
6160 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
6163 2015-08-25 Yao Qi <yao.qi@linaro.org>
6165 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
6167 (debug_reg_change_callback): Remove argument entry and add argument
6168 lwp. Remove local variable thread. Don't print thread id in the
6169 debugging output. Don't check whether pid of thread equals to pid.
6170 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
6171 iterate_over_lwps instead find_inferior.
6173 2015-08-24 Pedro Alves <palves@redhat.com>
6175 * inferiors.c (get_first_process): New function.
6176 * inferiors.h (get_first_process): New declaration.
6177 * remote-utils.c (read_ptid): Default to the first process in the
6178 list, instead of to the current thread's process.
6180 2015-08-24 Pedro Alves <palves@redhat.com>
6182 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
6183 * event-loop.c: Likewise.
6184 * remote-utils.c: Likewise.
6185 * tracepoint.c: Likewise.
6187 2015-08-24 Pedro Alves <palves@redhat.com>
6189 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
6192 2015-08-21 Pedro Alves <palves@redhat.com>
6194 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
6195 instead of literal 1.
6197 2015-08-21 Pedro Alves <palves@redhat.com>
6199 * tdesc.c (default_description): Explicitly zero-initialize.
6201 2015-08-21 Pedro Alves <palves@redhat.com>
6204 * inferiors.c (remove_thread): Discard any pending stop reply for
6206 * server.c (remove_all_on_match_pid): Rename to ...
6207 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6209 (discard_queued_stop_replies): Change parameter to a ptid. Now
6211 (handle_v_kill, kill_inferior_callback, captured_main)
6212 (process_serial_event): Adjust.
6213 * server.h (discard_queued_stop_replies): Declare.
6215 2015-08-21 Pedro Alves <palves@redhat.com>
6217 * linux-low.c (wait_for_sigstop): Always switch to no thread
6218 selected if the previously current thread dies.
6219 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6220 process instead of the current thread's.
6221 * remote-utils.c (input_interrupt): Don't check if there's no
6223 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6224 current thread to the general thread fails, error out.
6225 (handle_qxfer_auxv, handle_qxfer_libraries)
6226 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6227 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6228 (handle_query): Check if there's a thread selected instead of
6229 checking whether there's any thread in the thread list.
6230 (handle_qxfer_threads, handle_qxfer_btrace)
6231 (handle_qxfer_btrace_conf): Don't error out early if there's no
6232 thread in the thread list.
6233 (handle_v_cont, myresume): Don't set the current thread to the
6235 (process_serial_event) <Hg handling>: Also set thread_id if the
6236 previous general thread is still alive.
6237 (process_serial_event) <g/G handling>: If setting the current
6238 thread to the general thread fails, error out.
6239 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6240 thread's lwp instead of the current thread's.
6241 * target.c (set_desired_thread): If the desired thread was not
6242 found, leave the current thread pointing to NULL. Return an int
6243 (boolean) indicating success.
6244 * target.h (set_desired_thread): Change return type to int.
6246 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6248 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6249 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6251 (ps_get_thread_area): New function.
6253 2015-08-19 Gary Benson <gbenson@redhat.com>
6255 * hostio.c (handle_pread): Do not attempt to read more data
6256 than hostio_reply_with_data can fit in a packet.
6258 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6260 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6262 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6264 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6266 2015-08-06 Pedro Alves <palves@redhat.com>
6268 * tracepoint.c (expr_eval_result): Now an int.
6270 2015-08-06 Pedro Alves <palves@redhat.com>
6272 * gdbthread.h (struct regcache): Forward declare.
6273 (struct thread_info) <regcache_data>: Now a struct regcache
6275 * inferiors.c (inferior_regcache_data)
6276 (set_inferior_regcache_data): Now work with struct regcache
6278 * inferiors.h (struct regcache): Forward declare.
6279 (inferior_regcache_data, set_inferior_regcache_data): Now work
6280 with struct regcache pointers.
6281 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6282 (free_register_cache_thread): Remove struct regcache pointer
6285 2015-08-06 Pedro Alves <palves@redhat.com>
6287 * server.c (captured_main): On error, print the exception message
6288 to stderr, and if run_once is set, throw a quit.
6290 2015-08-06 Pedro Alves <palves@redhat.com>
6292 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6295 2015-08-06 Pedro Alves <palves@redhat.com>
6297 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6298 reading beyond the passed in buffer length.
6300 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6302 * tracepoint.c (symbol_list) <required>: Remove.
6304 2015-08-06 Pedro Alves <palves@redhat.com>
6306 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6307 count if stopping and suspending threads.
6308 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6309 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6310 (linux_detach): Complete an ongoing step-over.
6311 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6313 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6314 (linux_wait_1): If passing a signal to the inferior after
6315 finishing a step-over, unsuspend and re-resume all lwps. If we
6316 see a single-step event but the thread should be continuing, don't
6317 pass the trap to gdb.
6318 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6319 internal_error instead of gdb_assert.
6320 (enqueue_pending_signal): New function.
6321 (check_ptrace_stopped_lwp_gone): Add debug output.
6322 (start_step_over): Use internal_error instead of gdb_assert.
6323 (complete_ongoing_step_over): New function.
6324 (linux_resume_one_thread): Don't resume a suspended thread.
6325 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6328 2015-08-06 Pedro Alves <palves@redhat.com>
6330 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6331 (linux_thread_alive): Use lwp_is_marked_dead.
6332 (extended_event_reported): Delete.
6333 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6334 instead of extended_event_reported.
6335 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6337 (lwp_is_marked_dead): New function.
6338 (lwp_running): Use lwp_is_marked_dead.
6339 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6342 2015-08-06 Pedro Alves <palves@redhat.com>
6344 * linux-low.c (linux_wait_1): Move fork event output out of the
6345 !report_to_gdb check. Pass event_child->waitstatus to
6346 target_waitstatus_to_string instead of ourstatus.
6348 2015-08-04 Yao Qi <yao.qi@linaro.org>
6350 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6351 if current_thread is 32 bit.
6353 2015-08-04 Yao Qi <yao.qi@linaro.org>
6355 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6356 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6357 * server.c (extended_protocol): Remove "static".
6358 * server.h (extended_protocol): Declare it.
6360 2015-08-04 Yao Qi <yao.qi@linaro.org>
6362 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6363 both aarch64 and aarch32.
6364 (aarch64_set_pc): Likewise.
6366 2015-08-04 Yao Qi <yao.qi@linaro.org>
6368 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6369 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6370 arm-with-neon.xml to srv_xmlfiles.
6371 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6372 (is_64bit_tdesc): New function.
6373 (aarch64_linux_read_description): New function.
6374 (aarch64_arch_setup): Call aarch64_linux_read_description.
6375 (regs_info): Rename to regs_info_aarch64.
6376 (aarch64_regs_info): Return right regs_info.
6377 (initialize_low_arch): Call initialize_low_arch_aarch32.
6379 2015-08-04 Yao Qi <yao.qi@linaro.org>
6381 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6382 * linux-aarch32-low.c: New file.
6383 * linux-aarch32-low.h: New file.
6384 * linux-arm-low.c (arm_fill_gregset): Move it to
6385 linux-aarch32-low.c.
6386 (arm_store_gregset): Likewise.
6387 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6388 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6389 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6390 (regs_info): Rename to regs_info_arm.
6391 (arm_regs_info): Return regs_info_aarch32 if
6392 have_ptrace_getregset is 1 and target description is
6393 arm_with_neon or arm_with_vfpv3.
6394 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6395 Call initialize_low_arch_aarch32 instead.
6397 2015-08-04 Yao Qi <yao.qi@linaro.org>
6399 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6400 * linux-low.c: ... here.
6401 * linux-low.h (have_ptrace_getregset): Declare it.
6403 2015-08-04 Pedro Alves <palves@redhat.com>
6405 * thread-db.c (struct thread_db): Use new typedefs.
6406 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6408 (disable_thread_event_reporting): Cast result of dlsym to
6409 destination function pointer type.
6410 (thread_db_mourn): Use td_ta_delete_ftype.
6412 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6414 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6416 (CDX_BREAKPOINT): Define for R2.
6417 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6418 (the_low_target): Add comments.
6420 2015-07-30 Yao Qi <yao.qi@linaro.org>
6422 * linux-arm-low.c (arm_hwcap): Remove it.
6423 (arm_read_description): New local variable arm_hwcap. Don't
6424 set arm_hwcap to zero.
6426 2015-07-30 Yao Qi <yao.qi@linaro.org>
6428 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6429 Use regcache->tdesc instead.
6430 (arm_store_wmmxregset): Likewise.
6431 (arm_fill_vfpregset): Likewise.
6432 (arm_store_vfpregset): Likewise.
6434 2015-07-30 Yao Qi <yao.qi@linaro.org>
6436 * linux-arm-low.c: Include arch/arm.h.
6437 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6438 (arm_store_gregset): Likewise.
6440 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6442 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6443 ptrace's 4th parameter.
6445 2015-07-27 Yao Qi <yao.qi@linaro.org>
6447 * configure.srv (case aarch64*-*-linux*): Don't set
6450 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6452 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6454 * linux-arm-low.c: Likewise.
6455 * linux-cris-low.c: Likewise.
6456 * linux-crisv32-low.c: Likewise.
6457 * linux-low.c: Likewise.
6458 * linux-m68k-low.c: Likewise.
6459 * linux-mips-low.c: Likewise.
6460 * linux-nios2-low.c: Likewise.
6461 * linux-s390-low.c: Likewise.
6462 * linux-sparc-low.c: Likewise.
6463 * linux-tic6x-low.c: Likewise.
6464 * linux-tile-low.c: Likewise.
6465 * linux-x86-low.c: Likewise.
6467 2015-07-24 Pedro Alves <palves@redhat.com>
6469 * config.in: Regenerate.
6470 * configure: Regenerate.
6472 2015-07-24 Pedro Alves <palves@redhat.com>
6474 * acinclude.m4: Include ../ptrace.m4.
6475 * configure.ac: Call GDB_AC_PTRACE.
6476 * config.in, configure: Regenerate.
6478 2015-07-24 Yao Qi <yao.qi@linaro.org>
6480 * linux-low.c (linux_create_inferior): Remove setting to
6481 proc->priv->new_inferior.
6482 (linux_attach): Likewise.
6483 (linux_low_filter_event): Likewise.
6484 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6486 2015-07-24 Yao Qi <yao.qi@linaro.org>
6488 * linux-low.c (linux_arch_setup): New function.
6489 (linux_low_filter_event): If proc->tdesc is NULL and
6490 proc->attached is true, call the_low_target.arch_setup.
6491 Otherwise, keep status pending, and return.
6492 (linux_resume_one_lwp_throw): Don't call get_pc if
6493 thread->while_stepping isn't NULL. Don't call
6494 get_thread_regcache if proc->tdesc is NULL.
6495 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6496 (linux_target_ops): Install arch_setup.
6497 * server.c (start_inferior): Call the_target->arch_setup.
6498 * target.h (struct target_ops) <arch_setup>: New field.
6499 (target_arch_setup): New marco.
6500 * lynx-low.c (lynx_target_ops): Update.
6501 * nto-low.c (nto_target_ops): Update.
6502 * spu-low.c (spu_target_ops): Update.
6503 * win32-low.c (win32_target_ops): Update.
6505 2015-07-24 Yao Qi <yao.qi@linaro.org>
6507 * linux-low.c (linux_add_process): Don't set
6508 proc->priv->new_inferior.
6509 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6510 (linux_attach): Likewise.
6512 2015-07-24 Yao Qi <yao.qi@linaro.org>
6514 * server.c (start_inferior): Code refactor.
6516 2015-07-24 Yao Qi <yao.qi@linaro.org>
6518 * server.c (process_serial_event): Set general_thread.
6520 2015-07-21 Yao Qi <yao.qi@linaro.org>
6522 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6523 aarch64_linux_get_debug_reg_capacity.
6525 2015-07-17 Yao Qi <yao.qi@linaro.org>
6527 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6528 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6529 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6530 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6531 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6532 (AARCH64_HWP_ALIGNMENT): Likewise.
6533 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6534 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6535 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6536 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6537 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6538 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6539 (struct aarch64_debug_reg_state): Likewise.
6540 (struct arch_lwp_info): Likewise.
6541 (aarch64_align_watchpoint): Likewise.
6542 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6543 (aarch64_watchpoint_length): Likewise.
6544 (aarch64_point_encode_ctrl_reg): Likewise
6545 (aarch64_point_is_aligned): Likewise.
6546 (aarch64_align_watchpoint): Likewise.
6547 (aarch64_linux_set_debug_regs):
6548 (aarch64_dr_state_insert_one_point): Likewise.
6549 (aarch64_dr_state_remove_one_point): Likewise.
6550 (aarch64_handle_breakpoint): Likewise.
6551 (aarch64_handle_aligned_watchpoint): Likewise.
6552 (aarch64_handle_unaligned_watchpoint): Likewise.
6553 (aarch64_handle_watchpoint): Likewise.
6555 2015-07-17 Yao Qi <yao.qi@linaro.org>
6557 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6558 and don't aarch64_get_debug_reg_state. All callers update.
6559 (aarch64_handle_aligned_watchpoint): Likewise.
6560 (aarch64_handle_unaligned_watchpoint): Likewise.
6561 (aarch64_handle_watchpoint): Likewise.
6562 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6563 (aarch64_remove_point): Likewise.
6565 2015-07-17 Yao Qi <yao.qi@linaro.org>
6567 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6569 (aarch64_handle_unaligned_watchpoint): Likewise.
6571 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6573 Revert the previous 3 commits:
6574 Move gdb_regex* to common/
6575 Move linux_find_memory_regions_full & co.
6576 gdbserver build-id attribute generator
6578 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6579 Jan Kratochvil <jan.kratochvil@redhat.com>
6581 gdbserver build-id attribute generator.
6582 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6583 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6584 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6586 (get_dynamic): Use find_pdhr to traverse program headers.
6587 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6588 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6589 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6590 (get_hex_build_id): New.
6591 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6592 to reply XML document.
6594 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6595 Jan Kratochvil <jan.kratochvil@redhat.com>
6597 * target.c: Include target/target-utils.h and fcntl.h.
6598 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6599 (target_fileio_read_stralloc): New functions.
6601 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6603 * Makefile.in (OBS): Add gdb_regex.o.
6605 * config.in: Rebuilt.
6606 * configure: Rebuilt.
6608 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6609 Jan Kratochvil <jan.kratochvil@redhat.com>
6611 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6612 * Makefile.in (OBS): Add target-utils.o.
6613 (linux-maps.o, target-utils.o): New.
6614 * configure.srv (srv_linux_obj): Add linux-maps.o.
6616 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6618 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6620 (the_low_target): Install it.
6622 2015-07-14 Pedro Alves <palves@redhat.com>
6624 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6625 Instead, ignore ECHILD, and throw an error for other errnos.
6627 2015-07-10 Pedro Alves <palves@redhat.com>
6629 * event-loop.c (struct callback_event) <data>: Change type to
6630 gdb_client_data instance instead of gdb_client_data pointer.
6631 (append_callback_event): Adjust.
6633 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6635 * linux-aarch64-low.c: Add comments for each linux_target_ops
6636 method. Remove comments already covered in target_ops and
6637 linux_target_ops definitions.
6638 (the_low_target): Add comments for each unimplemented method.
6640 2015-07-09 Yao Qi <yao.qi@linaro.org>
6642 * linux-aarch64-low.c (aarch64_regmap): Remove.
6643 (aarch64_usrregs_info): Remove.
6644 (regs_info): Set field usrregs to NULL.
6646 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6648 * linux-low.c: Include "rsp-low.h"
6649 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6650 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6651 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6652 (handle_btrace_enable_pt): New.
6653 (handle_btrace_general_set): Support "pt".
6654 (handle_btrace_conf_general_set): Support "pt:size".
6656 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6658 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6661 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6663 * linux-aarch64-low.c: Remove comment about endianness.
6664 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6665 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6668 2015-06-24 Gary Benson <gbenson@redhat.com>
6670 * linux-i386-ipa.c (stdint.h): Do not include.
6671 * lynx-i386-low.c (stdint.h): Likewise.
6672 * lynx-ppc-low.c (stdint.h): Likewise.
6673 * mem-break.c (stdint.h): Likewise.
6674 * thread-db.c (stdint.h): Likewise.
6675 * tracepoint.c (stdint.h): Likewise.
6676 * win32-low.c (stdint.h): Likewise.
6678 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6680 * server.c (write_qxfer_response): Update call to
6681 remote_escape_output.
6683 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6684 Jan Kratochvil <jan.kratochvil@redhat.com>
6686 Merge multiple hex conversions.
6687 * gdbreplay.c (tohex): Rename to 'fromhex'.
6688 (logchar): Use fromhex.
6690 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6692 * server.c (handle_qxfer_libraries): Set `version' attribute for
6695 2015-06-10 Gary Benson <gbenson@redhat.com>
6697 * target.h (struct target_ops) <multifs_open>: New field.
6698 <multifs_unlink>: Likewise.
6699 <multifs_readlink>: Likewise.
6700 * linux-low.c (nat/linux-namespaces.h): New include.
6701 (linux_target_ops): Initialize the_target->multifs_open,
6702 the_target->multifs_unlink and the_target->multifs_readlink.
6703 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6704 * hostio.c (hostio_fs_pid): New static variable.
6705 (hostio_handle_new_gdb_connection): New function.
6706 (handle_setfs): Likewise.
6707 (handle_open): Use the_target->multifs_open as appropriate.
6708 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6709 (handle_readlink): Use the_target->multifs_readlink as
6711 (handle_vFile): Handle vFile:setfs packets.
6712 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6713 after target_handle_new_gdb_connection.
6715 2015-06-10 Gary Benson <gbenson@redhat.com>
6717 * configure.ac (AC_CHECK_FUNCS): Add setns.
6718 * config.in: Regenerate.
6719 * configure: Likewise.
6720 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6721 (linux-namespaces.o): New rule.
6722 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6724 2015-06-09 Gary Benson <gbenson@redhat.com>
6726 * hostio.c (handle_open): Process mode argument with
6727 fileio_to_host_mode.
6729 2015-06-01 Yao Qi <yao.qi@linaro.org>
6731 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6732 * linux-x86-low.c: Likewise.
6734 2015-05-28 Don Breazeal <donb@codesourcery.com>
6736 * linux-low.c (handle_extended_wait): Initialize
6737 thread_info.last_resume_kind for new fork children.
6739 2015-05-15 Pedro Alves <palves@redhat.com>
6741 * target.h (target_handle_new_gdb_connection): Rewrite using if
6742 wrapped in do/while.
6744 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6746 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6747 * configure, config.in: Regenerate.
6748 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6751 2015-05-12 Don Breazeal <donb@codesourcery.com>
6753 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6754 PTRACE_EVENT_VFORK_DONE.
6755 (linux_low_ptrace_options, extended_event_reported): Add vfork
6757 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6758 and "vforkdone" for RSP 'T' Stop Reply Packet.
6759 * server.h (report_vfork_events): Declare
6762 2015-05-12 Don Breazeal <donb@codesourcery.com>
6764 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6765 (the_low_target) <new_fork>: Initialize new member.
6766 * linux-arm-low.c (arm_new_fork): New function.
6767 (the_low_target) <new_fork>: Initialize new member.
6768 * linux-low.c (handle_extended_wait): Call new target function
6770 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6771 * linux-mips-low.c (mips_add_watchpoint): New function
6772 extracted from mips_insert_point.
6773 (the_low_target) <new_fork>: Initialize new member.
6774 (mips_linux_new_fork): New function.
6775 (mips_insert_point): Call mips_add_watchpoint.
6776 * linux-x86-low.c (x86_linux_new_fork): New function.
6777 (the_low_target) <new_fork>: Initialize new member.
6779 2015-05-12 Don Breazeal <donb@codesourcery.com>
6781 * linux-low.c (handle_extended_wait): Implement return value,
6782 rename argument 'event_child' to 'event_lwp', handle
6783 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6784 (linux_low_ptrace_options): New function.
6785 (linux_low_filter_event): Call linux_low_ptrace_options,
6786 use different argument fo linux_enable_event_reporting,
6787 use return value from handle_extended_wait.
6788 (extended_event_reported): New function.
6789 (linux_wait_1): Call extended_event_reported and set
6790 status to report fork events.
6791 (linux_write_memory): Add pid to debug message.
6792 (reset_lwp_ptrace_options_callback): New function.
6793 (linux_handle_new_gdb_connection): New function.
6794 (linux_target_ops): Initialize new structure member.
6795 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6796 * lynx-low.c: Initialize new structure member.
6797 * remote-utils.c (prepare_resume_reply): Implement stop reason
6798 "fork" for "T" stop message.
6799 * server.c (handle_query): Call handle_new_gdb_connection.
6800 * server.h (report_fork_events): Declare global flag.
6801 * target.h (struct target_ops) <handle_new_gdb_connection>:
6803 (target_handle_new_gdb_connection): New macro.
6804 * win32-low.c: Initialize new structure member.
6806 2015-05-12 Don Breazeal <donb@codesourcery.com>
6808 * mem-break.c (APPEND_TO_LIST): Define macro.
6809 (clone_agent_expr): New function.
6810 (clone_one_breakpoint): New function.
6811 (clone_all_breakpoints): New function.
6812 * mem-break.h: Declare new functions.
6814 2015-05-12 Don Breazeal <donb@codesourcery.com>
6816 * linux-low.c (linux_supports_fork_events): New function.
6817 (linux_supports_vfork_events): New function.
6818 (linux_target_ops): Initialize new structure members.
6819 (initialize_low): Call linux_check_ptrace_features.
6820 * lynx-low.c (lynx_target_ops): Initialize new structure
6822 * server.c (report_fork_events, report_vfork_events):
6824 (handle_query): Add new features to qSupported packet and
6826 (captured_main): Initialize new global variables.
6827 * target.h (struct target_ops) <supports_fork_events>:
6829 <supports_vfork_events>: New member.
6830 (target_supports_fork_events): New macro.
6831 (target_supports_vfork_events): New macro.
6832 * win32-low.c (win32_target_ops): Initialize new structure
6835 2015-05-12 Gary Benson <gbenson@redhat.com>
6837 * server.c (handle_qxfer_exec_file): Use current process
6840 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6842 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6843 Remove HAVE_PTRACE_GETREGS conditionals.
6844 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6845 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6847 2015-05-08 Yao Qi <yao.qi@linaro.org>
6849 * linux-low.c (linux_supports_conditional_breakpoints): New
6851 (linux_target_ops): Install new target method.
6852 * lynx-low.c (lynx_target_ops): Install NULL hook for
6853 supports_conditional_breakpoints.
6854 * nto-low.c (nto_target_ops): Likewise.
6855 * spu-low.c (spu_target_ops): Likewise.
6856 * win32-low.c (win32_target_ops): Likewise.
6857 * server.c (handle_query): Check
6858 target_supports_conditional_breakpoints.
6859 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6861 (target_supports_conditional_breakpoints): New macro.
6863 2015-05-06 Pedro Alves <palves@redhat.com>
6866 * server.c (start_inferior): If the process exits, mourn it.
6868 2015-04-21 Gary Benson <gbenson@redhat.com>
6870 * hostio.c (fileio_open_flags_to_host): Factored out to
6871 fileio_to_host_openflags in common/fileio.c. Single use
6874 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6876 * linux-xtensa-low.c (xtensa_fill_gregset)
6877 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6880 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6882 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6883 (regs_info): Replace usrregs pointer with NULL.
6885 2015-04-17 Gary Benson <gbenson@redhat.com>
6887 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6888 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6889 * server.c (handle_qxfer_exec_file): New function.
6890 (qxfer_packets): Add exec-file entry.
6891 (handle_query): Report qXfer:exec-file:read as supported packet.
6893 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6895 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6897 2015-04-09 Gary Benson <gbenson@redhat.com>
6899 * hostio-errno.c (errno_to_fileio_error): Remove function.
6900 Update caller to use remote_fileio_to_fio_error.
6902 2015-04-09 Yao Qi <yao.qi@linaro.org>
6904 * linux-low.c (linux_insert_point): Call
6905 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6906 (linux_remove_point): Call remove_memory_breakpoint if type is
6908 * linux-x86-low.c (x86_insert_point): Don't call
6909 insert_memory_breakpoint.
6910 (x86_remove_point): Don't call remove_memory_breakpoint.
6912 2015-04-01 Pedro Alves <palves@redhat.com>
6913 Cleber Rosa <crosa@redhat.com>
6915 * server.c (gdbserver_usage): Reorganize and extend the usage
6918 2015-03-24 Pedro Alves <palves@redhat.com>
6920 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6921 output. Also dump TRAP_TRACE.
6922 (linux_low_filter_event): In debug output, distinguish a
6923 resume_stop SIGSTOP from a delayed SIGSTOP.
6925 2015-03-24 Gary Benson <gbenson@redhat.com>
6927 * linux-x86-low.c (x86_linux_new_thread): Moved to
6929 (x86_linux_prepare_to_resume): Likewise.
6931 2015-03-24 Gary Benson <gbenson@redhat.com>
6933 * Makefile.in (x86-linux-dregs.o): New rule.
6934 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6935 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6936 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6937 (x86_linux_dr_get): Likewise.
6938 (x86_linux_dr_set): Likewise.
6939 (update_debug_registers_callback): Likewise.
6940 (x86_linux_dr_set_addr): Likewise.
6941 (x86_linux_dr_get_addr): Likewise.
6942 (x86_linux_dr_set_control): Likewise.
6943 (x86_linux_dr_get_control): Likewise.
6944 (x86_linux_dr_get_status): Likewise.
6945 (x86_linux_update_debug_registers): Likewise.
6947 2015-03-24 Gary Benson <gbenson@redhat.com>
6949 * linux-x86-low.c (x86_linux_update_debug_registers):
6950 New function, factored out from...
6951 (x86_linux_prepare_to_resume): ...this.
6953 2015-03-24 Gary Benson <gbenson@redhat.com>
6955 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6956 (x86_linux_dr_set): Likewise.
6957 (update_debug_registers_callback): Likewise.
6958 (x86_linux_dr_set_addr): Likewise.
6959 (x86_linux_dr_get_addr): Likewise.
6960 (x86_linux_dr_set_control): Likewise.
6961 (x86_linux_dr_get_control): Likewise.
6962 (x86_linux_dr_get_status): Likewise.
6963 (x86_linux_prepare_to_resume): Likewise.
6965 2015-03-24 Gary Benson <gbenson@redhat.com>
6967 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6968 Use perror_with_name. Pass string through gettext.
6969 (x86_linux_dr_set): Likewise.
6971 2015-03-24 Gary Benson <gbenson@redhat.com>
6973 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6974 (x86_linux_dr_set_addr): ...this.
6975 (x86_dr_low_get_addr): Rename to...
6976 (x86_linux_dr_get_addr): ...this.
6977 (x86_dr_low_set_control): Rename to...
6978 (x86_linux_dr_set_control): ...this.
6979 (x86_dr_low_get_control): Rename to...
6980 (x86_linux_dr_get_control): ...this.
6981 (x86_dr_low_get_status): Rename to...
6982 (x86_linux_dr_get_status): ...this.
6983 (x86_dr_low): Update with new function names.
6985 2015-03-24 Gary Benson <gbenson@redhat.com>
6987 * Makefile.in (x86-linux.o): New rule.
6988 * configure.srv: Add x86-linux.o to relevant targets.
6989 * linux-low.c (lwp_set_arch_private_info): New function.
6990 (lwp_arch_private_info): Likewise.
6991 * linux-x86-low.c: Include nat/x86-linux.h.
6992 (arch_lwp_info): Removed structure.
6993 (update_debug_registers_callback):
6994 Use lwp_set_debug_registers_changed.
6995 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6996 and lwp_set_debug_registers_changed.
6997 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6999 2015-03-24 Gary Benson <gbenson@redhat.com>
7001 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
7002 * linux-arm-low.c (arm_new_thread): Likewise.
7003 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
7004 * linux-mips-low.c (mips_linux_new_thread): Likewise.
7005 * linux-x86-low.c (x86_linux_new_thread): Likewise.
7006 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
7008 2015-03-24 Gary Benson <gbenson@redhat.com>
7010 * linux-low.c (ptid_of_lwp): New function.
7011 (lwp_is_stopped): Likewise.
7012 (lwp_stop_reason): Likewise.
7013 * linux-x86-low.c (update_debug_registers_callback):
7015 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
7018 2015-03-24 Gary Benson <gbenson@redhat.com>
7020 * linux-low.h (linux_stop_lwp): Remove declaration.
7022 2015-03-24 Gary Benson <gbenson@redhat.com>
7024 * linux-low.h: Include nat/linux-nat.h.
7025 * linux-low.c (iterate_over_lwps_args): New structure.
7026 (iterate_over_lwps_filter): New function.
7027 (iterate_over_lwps): Likewise.
7028 * linux-x86-low.c (update_debug_registers_callback):
7029 Update signature to what iterate_over_lwps expects.
7030 Remove PID check that iterate_over_lwps now performs.
7031 (x86_dr_low_set_addr): Use iterate_over_lwps.
7032 (x86_dr_low_set_control): Likewise.
7034 2015-03-24 Gary Benson <gbenson@redhat.com>
7036 * linux-x86-low.c (x86_debug_reg_state): New function.
7037 (x86_linux_prepare_to_resume): Use the above.
7039 2015-03-24 Gary Benson <gbenson@redhat.com>
7041 * linux-low.c (current_lwp_ptid): New function.
7042 * linux-x86-low.c: Include nat/linux-nat.h.
7043 (x86_dr_low_get_addr): Use current_lwp_ptid.
7044 (x86_dr_low_get_control): Likewise.
7045 (x86_dr_low_get_status): Likewise.
7047 2015-03-20 Pedro Alves <palves@redhat.com>
7049 * tracepoint.c (cmd_qtstatus): Make "str" const.
7051 2015-03-20 Pedro Alves <palves@redhat.com>
7053 * server.c (handle_general_set): Make "req_str" const.
7055 2015-03-19 Pedro Alves <palves@redhat.com>
7057 * linux-low.c (linux_resume_one_lwp): Rename to ...
7058 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
7059 instead call perror_with_name.
7060 (check_ptrace_stopped_lwp_gone): New function.
7061 (linux_resume_one_lwp): Reimplement as wrapper around
7062 linux_resume_one_lwp_throw that swallows errors if the LWP is
7065 2015-03-19 Pedro Alves <palves@redhat.com>
7067 * linux-low.c (count_events_callback, select_event_lwp_callback):
7068 No longer check whether the thread has resume_stop as last resume
7071 2015-03-19 Pedro Alves <palves@redhat.com>
7073 * linux-low.c (count_events_callback, select_event_lwp_callback):
7074 Use the lwp's status_pending_p field, not the thread's.
7076 2015-03-19 Pedro Alves <palves@redhat.com>
7078 * linux-low.c (select_event_lwp_callback): Update comments to
7079 no longer mention SIGTRAP.
7081 2015-03-18 Gary Benson <gbenson@redhat.com>
7083 * server.c (handle_query): Do not report vFile:fstat as supported.
7085 2015-03-11 Gary Benson <gbenson@redhat.com>
7087 * hostio.c (sys/types.h): New include.
7088 (sys/stat.h): Likewise.
7089 (common-remote-fileio.h): Likewise.
7090 (handle_fstat): New function.
7091 (handle_vFile): Handle vFile:fstat packets.
7093 2015-03-11 Gary Benson <gbenson@redhat.com>
7095 * configure.ac (AC_CHECK_MEMBERS): Add checks for
7096 struct stat.st_blocks and struct stat.st_blksize.
7097 * configure: Regenerate.
7098 * config.in: Likewise.
7099 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
7100 (OBS): Add common-remote-fileio.o.
7101 (common-remote-fileio.o): New rule.
7103 2015-03-09 Pedro Alves <palves@redhat.com>
7105 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
7106 'struct sockaddr' pointer in 'accept' call.
7108 2015-03-09 Pedro Alves <palves@redhat.com>
7111 2015-03-07 Pedro Alves <palves@redhat.com>
7112 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7113 or <winsock2.h> here. Instead include "gdb_socket.h".
7114 (remote_open): Use union gdb_sockaddr_u.
7115 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7116 or <winsock2.h> here. Instead include "gdb_socket.h".
7117 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7118 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7120 (init_named_socket, gdb_agent_helper_thread): Use union
7123 2015-03-07 Pedro Alves <palves@redhat.com>
7125 * configure.ac (build_warnings): Move
7126 -Wdeclaration-after-statement to the C-specific set.
7127 * configure: Regenerate.
7129 2015-03-07 Pedro Alves <palves@redhat.com>
7131 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
7132 or <winsock2.h> here. Instead include "gdb_socket.h".
7133 (remote_open): Use union gdb_sockaddr_u.
7134 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
7135 or <winsock2.h> here. Instead include "gdb_socket.h".
7136 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
7137 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
7139 (init_named_socket, gdb_agent_helper_thread): Use union
7142 2015-03-07 Pedro Alves <palves@redhat.com>
7144 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
7147 2015-03-06 Yao Qi <yao.qi@linaro.org>
7149 * linux-aarch64-low.c (aarch64_insert_point): Use
7150 show_debug_regs as a boolean.
7151 (aarch64_remove_point): Likewise.
7153 2015-03-05 Pedro Alves <palves@redhat.com>
7155 * lynx-low.c (lynx_target_ops): Install NULL hooks for
7156 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7157 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
7158 * nto-low.c (nto_target_ops): Likewise.
7159 * spu-low.c (spu_target_ops): Likewise.
7160 * win32-low.c (win32_target_ops): Likewise.
7162 2015-03-04 Pedro Alves <palves@redhat.com>
7164 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
7165 Decide whether a breakpoint triggered based on the SIGTRAP's
7167 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
7168 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
7169 (linux_low_filter_event): Check for breakpoints before checking
7171 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
7173 (linux_stopped_by_sw_breakpoint)
7174 (linux_supports_stopped_by_sw_breakpoint)
7175 (linux_stopped_by_hw_breakpoint)
7176 (linux_supports_stopped_by_hw_breakpoint): New functions.
7177 (linux_target_ops): Install new target methods.
7179 2015-03-04 Pedro Alves <palves@redhat.com>
7181 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
7182 * server.c (swbreak_feature, hwbreak_feature): New globals.
7183 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
7184 (captured_main): Clear swbreak_feature and hwbreak_feature.
7185 * server.h (swbreak_feature, hwbreak_feature): Declare.
7186 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
7187 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
7188 supports_stopped_by_hw_breakpoint>: New fields.
7189 (target_supports_stopped_by_sw_breakpoint)
7190 (target_stopped_by_sw_breakpoint)
7191 (target_supports_stopped_by_hw_breakpoint)
7192 (target_stopped_by_hw_breakpoint): Declare.
7194 2015-03-04 Pedro Alves <palves@redhat.com>
7196 enum lwp_stop_reason -> enum target_stop_reason
7197 * linux-low.c (check_stopped_by_breakpoint): Adjust.
7198 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
7199 (linux_wait_1, stuck_in_jump_pad_callback)
7200 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7201 (linux_stopped_by_watchpoint):
7202 * linux-low.h (enum lwp_stop_reason): Delete.
7203 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7204 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7206 2015-03-04 Yao Qi <yao.qi@linaro.org>
7208 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7210 2015-03-03 Gary Benson <gbenson@redhat.com>
7212 * hostio.c (handle_vFile): Fix prefix lengths.
7214 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7216 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7219 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7221 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7222 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7223 (clean): Add "rm -f" for above C files.
7224 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7225 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7226 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7227 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7228 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7229 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7230 (init_registers_s390x_vx_linux64)
7231 (init_registers_s390x_tevx_linux64)
7232 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7233 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7235 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7236 (s390_store_vxrs_high): New functions.
7237 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7239 (s390_arch_setup): Add logic for selecting one of the new target
7240 descriptions. Activate the new vector regsets if applicable.
7241 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7242 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7243 and init_registers_s390x_tevx_linux64.
7245 2015-03-01 Pedro Alves <palves@redhat.com>
7247 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7250 2015-02-27 Pedro Alves <palves@redhat.com>
7252 * linux-x86-low.c (u_debugreg_offset): New function.
7253 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7255 2015-02-27 Pedro Alves <palves@redhat.com>
7257 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7258 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7259 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7260 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7261 (ps_lsetfpregs, ps_getpid)
7262 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7263 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7264 (ps_lsetxregs, ps_plog): Declare.
7266 2015-02-27 Pedro Alves <palves@redhat.com>
7268 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7269 IP_AGENT_EXPORT_FUNC.
7270 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7271 IP_AGENT_EXPORT_FUNC.
7272 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7273 (IP_AGENT_EXPORT): Delete.
7274 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7275 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7276 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7277 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7278 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7279 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7280 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7281 (traceframe_read_count, traceframe_write_count)
7282 (traceframes_created, trace_state_variables, get_raw_reg)
7283 (get_trace_state_variable_value, set_trace_state_variable_value)
7284 (ust_loaded, helper_thread_id, cmd_buf): Use
7285 IPA_SYM_EXPORTED_NAME.
7286 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7287 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7288 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7289 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7290 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7291 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7292 EXTERN_C_PUSH/EXTERN_C_POP.
7293 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7294 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7295 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7296 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7297 (traceframe_write_count, traceframe_read_count)
7298 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7299 (about_to_request_buffer_space, get_trace_state_variable_value)
7300 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7301 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7302 EXTERN_C_PUSH/EXTERN_C_POP.
7303 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7304 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7305 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7306 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7307 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7308 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7309 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7310 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7312 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7313 (IP_AGENT_EXPORT_VAR_DECL): Define.
7315 (gdb_agent_get_raw_reg): Declare.
7317 2015-02-27 Tom Tromey <tromey@redhat.com>
7318 Pedro Alves <palves@redhat.com>
7320 Rename symbols whose names are reserved C++ keywords throughout.
7322 2015-02-27 Pedro Alves <palves@redhat.com>
7324 * Makefile.in (COMPILER): New, get it from autoconf.
7325 (CXX): Get from autoconf instead.
7326 (COMPILE.pre): Use COMPILER.
7327 (CC-LD): Rename to ...
7328 (CC_LD): ... this. Use COMPILER.
7329 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7330 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7331 * acinclude.m4: Include build-with-cxx.m4.
7332 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7333 Disable -Werror by default if building in C++ mode.
7334 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7335 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7336 the C++ compiler. Save/restore CXXFLAGS too.
7337 * configure: Regenerate.
7339 2015-02-27 Pedro Alves <palves@redhat.com>
7341 * acinclude.m4: Include libiberty.m4.
7342 * configure.ac: Call libiberty_INIT.
7343 * config.in, configure: Regenerate.
7345 2015-02-26 Pedro Alves <palves@redhat.com>
7347 * linux-low.c (linux_wait_1): When incrementing the PC past a
7348 program breakpoint always use the_low_target.breakpoint_len as
7349 increment, rather than the maximum between that and
7350 the_low_target.decr_pc_after_break.
7352 2015-02-23 Pedro Alves <palves@redhat.com>
7354 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7355 thread was doing a step-over; always adjust the PC if
7356 we stepped over a permanent breakpoint.
7357 (linux_wait_1): If we stepped over breakpoint that was on top of a
7358 permanent breakpoint, manually advance the PC past it.
7360 2015-02-23 Pedro Alves <palves@redhat.com>
7362 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7364 (x86_fill_gregset, x86_store_gregset): Use it when handling
7367 2015-02-20 Pedro Alves <palves@redhat.com>
7369 * thread-db.c: Include "nat/linux-procfs.h".
7370 (thread_db_init): Skip listing new threads if the kernel supports
7371 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7373 2015-02-20 Pedro Alves <palves@redhat.com>
7375 * linux-low.c (status_pending_p_callback): Use ptid_match.
7377 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7379 PR breakpoints/16812
7380 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7381 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7382 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7384 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7386 PR breakpoints/15956
7387 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7389 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7391 * linux-low.c (linux_low_btrace_conf): Print size.
7392 * server.c (handle_btrace_conf_general_set): New.
7393 (hanle_general_set): Call handle_btrace_conf_general_set.
7394 (handle_query): Report Qbtrace-conf:bts:size as supported.
7396 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7398 * linux-low.c (linux_low_enable_btrace): Update parameters.
7399 (linux_low_btrace_conf): New.
7400 (linux_target_ops)<to_btrace_conf>: Initialize.
7401 * server.c (current_btrace_conf): New.
7402 (handle_btrace_enable): Rename to ...
7403 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7404 to target_enable_btrace. Update comment. Update users.
7405 (handle_qxfer_btrace_conf): New.
7406 (qxfer_packets): Add btrace-conf entry.
7407 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7408 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7409 (target_ops)<read_btrace_conf>: New.
7410 (target_enable_btrace): Update parameters.
7411 (target_read_btrace_conf): New.
7413 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7415 * server.c (handle_btrace_general_set): Remove call to
7416 target_supports_btrace.
7417 (supported_btrace_packets): New.
7418 (handle_query): Call supported_btrace_packets.
7419 * target.h: include btrace-common.h.
7420 (btrace_target_info): Removed.
7421 (supports_btrace, target_supports_btrace): Update parameters.
7423 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7425 * Makefile.in (SFILES): Add common/btrace-common.c.
7426 (OBS): Add common/btrace-common.o.
7427 (btrace-common.o): Add build rules.
7428 * linux-low: Include btrace-common.h.
7429 (linux_low_read_btrace): Use struct btrace_data. Call
7430 btrace_data_init and btrace_data_fini.
7432 2015-02-06 Pedro Alves <palves@redhat.com>
7434 * thread-db.c (find_new_threads_callback): Add debug output.
7436 2015-02-04 Pedro Alves <palves@redhat.com>
7438 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7439 (resume_stopped_resumed_lwps): New function.
7440 (linux_wait_for_event_filtered): Use it.
7442 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7444 * Makefile.in (SFILES): Add linux-personality.c.
7445 (linux-personality.o): New rule.
7446 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7447 list of objects to be built.
7448 * linux-low.c: Include nat/linux-personality.h.
7449 (linux_create_inferior): Remove code to disable address space
7450 randomization (moved to ../nat/linux-personality.c). Create
7451 cleanup to disable address space randomization.
7453 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7455 * Makefile.in (posix-strerror.o): New rule.
7456 (mingw-strerror.o): Likewise.
7457 * configure: Regenerated.
7458 * configure.ac: Source file ../common/common.host. Initialize new
7459 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7461 2015-01-14 Yao Qi <yao@codesourcery.com>
7463 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7464 (ppc-linux.o): New rule.
7465 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7466 * configure.ac: AC_CHECK_FUNCS(getauxval).
7467 * config.in: Re-generated.
7468 * configure: Re-generated.
7469 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7470 ppc64_64bit_inferior_p
7472 2015-01-14 Yao Qi <yao@codesourcery.com>
7474 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7475 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7476 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7477 (PT_ORIG_R3, PT_TRAP): Likewise.
7478 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7479 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7480 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7482 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7484 * i387-fp.c (i387_cache_to_xsave): In look over
7485 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7486 zmmh_low_space field by use of zmmh_high_space.
7488 2015-01-09 Pedro Alves <palves@redhat.com>
7490 * linux-low.c (step_over_bkpt): Move higher up in the file.
7491 (handle_extended_wait): Don't store the stop_pc here.
7492 (get_stop_pc): Adjust comments and rename to ...
7493 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7494 stopped for a software breakpoint or hardware breakpoint.
7495 (thread_still_has_status_pending_p): New function.
7496 (status_pending_p_callback): Use
7497 thread_still_has_status_pending_p. If the event is no longer
7498 interesting, resume the LWP.
7499 (handle_tracepoints): Add assert.
7500 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7501 (wstatus_maybe_breakpoint): New function.
7502 (cancel_breakpoint): Delete function.
7503 (check_stopped_by_watchpoint): New function, factored out from
7504 linux_low_filter_event.
7505 (lp_status_maybe_breakpoint): Delete function.
7506 (linux_low_filter_event): Remove filter_ptid argument.
7507 Leave thread group exits pending here. Store the LWP's stop PC.
7508 Always leave events pending.
7509 (linux_wait_for_event_filtered): Pull all events out of the
7510 kernel, and leave them all pending.
7511 (count_events_callback, select_event_lwp_callback): Consider all
7513 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7514 (select_event_lwp): Only give preference to the stepping LWP in
7515 all-stop mode. Adjust comments.
7516 (ignore_event): New function.
7517 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7518 references to cancel_breakpoints. Adjust to renames. Also give
7519 equal priority to all LWPs that have had events in non-stop mode.
7520 If reporting a software breakpoint event, unadjust the LWP's PC.
7521 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7522 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7524 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7525 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7526 (linux_stopped_by_watchpoint): Adjust.
7527 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7528 * linux-low.h (enum lwp_stop_reason): New.
7529 (struct lwp_info) <stop_pc>: Adjust comment.
7530 <stopped_by_watchpoint>: Delete field.
7531 <stop_reason>: New field.
7532 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7533 * mem-break.c (software_breakpoint_inserted_here)
7534 (hardware_breakpoint_inserted_here): New function.
7535 * mem-break.h (software_breakpoint_inserted_here)
7536 (hardware_breakpoint_inserted_here): Declare.
7537 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7538 (cancel_breakpoints): Delete.
7539 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7540 (upload_fast_traceframes): Remove references to
7543 2015-01-09 Pedro Alves <palves@redhat.com>
7545 * thread-db.c (find_new_threads_callback): Ignore thread if the
7546 kernel thread ID is -1.
7548 2015-01-09 Pedro Alves <palves@redhat.com>
7550 * linux-low.c (linux_attach_fail_reason_string): Move to
7551 nat/linux-ptrace.c, and rename.
7552 (linux_attach_lwp): Update comment.
7553 (attach_proc_task_lwp_callback): New function.
7554 (linux_attach): Adjust to rename and use
7555 linux_proc_attach_tgid_threads.
7556 (linux_attach_fail_reason_string): Delete declaration.
7558 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7560 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7561 * server.c (gdbserver_version): Likewise.
7563 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7565 * remote-utils.c: Include ctype.h.
7566 (input_interrupt): Explicitly handle the case when the char
7567 received is the NUL byte. Improve the printing of non-ASCII
7570 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7572 * linux-low.c (linux_low_filter_event): Update call to
7573 linux_enable_event_reporting following the addition of
7574 a new parameter to that function.
7576 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7579 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7580 (AARCH64_FPCR_REGNO): Likewise.
7581 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7582 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7583 (aarch64_store_fpregset): Likewise.
7585 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7587 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7588 Remove FIXME comment about assumption about N.
7590 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7592 * configure.ac: If large-file support is disabled in GDBserver,
7593 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7594 * configure: Regenerate.
7596 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7598 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7599 warning upon ENODATA from ptrace.
7600 * linux-s390-low.c (s390_store_tdb): New.
7601 (s390_regsets): Add regset for NT_S390_TDB.
7603 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7605 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7606 without a fill_function.
7607 * linux-s390-low.c (s390_fill_last_break): Remove.
7608 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7609 (s390_arch_setup): Use regset's size instead of fill_function for
7612 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7614 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7615 the regset's store function when ptrace returned an error.
7616 * regcache.c (get_thread_regcache): Invalidate register cache
7617 before fetching inferior's registers.
7619 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7621 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7622 while-loop as for-loop.
7623 (regsets_store_inferior_registers): Likewise.
7625 2014-11-28 Yao Qi <yao@codesourcery.com>
7627 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7628 * config.in, configure: Re-generate.
7629 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7632 2014-11-21 Yao Qi <yao@codesourcery.com>
7634 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7635 (AC_CHECK_HEADERS): Remove malloc.h.
7636 * configure: Re-generated.
7637 * config.in: Re-generated.
7638 * server.h: Don't include alloca.h and malloc.h.
7639 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7640 Don't include malloc.h.
7642 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7644 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7645 corresponding ERRNO check in same block.
7647 2014-11-12 Pedro Alves <palves@redhat.com>
7649 * server.c (cont_thread): Update comment.
7650 (start_inferior, attach_inferior): No longer clear cont_thread.
7651 (handle_v_cont): No longer set cont_thread.
7652 (captured_main): Clear cont_thread each time a GDB connects.
7654 2014-11-12 Pedro Alves <palves@redhat.com>
7656 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7657 thread, and don't resume all threads if the Hc thread has exited.
7659 2014-11-12 Pedro Alves <palves@redhat.com>
7661 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7662 the process group instead of to a specific LWP.
7664 2014-10-15 Pedro Alves <palves@redhat.com>
7667 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7669 (arm_set_thread_context): Delete.
7670 (the_low_target): Adjust.
7671 * win32-i386-low.c (debug_registers_changed)
7672 (debug_registers_used): Delete.
7673 (update_debug_registers_callback): New function.
7674 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7675 needing to update their debug registers.
7676 (win32_get_current_dr): New function.
7677 (x86_dr_low_get_addr, x86_dr_low_get_control)
7678 (x86_dr_low_get_status): Fetch the debug register from the thread
7680 (i386_initial_stuff): Adjust.
7681 (i386_get_thread_context): Remove current_event parameter. Don't
7682 clear debug_registers_changed nor copy DR values to
7684 (i386_set_thread_context): Delete.
7685 (i386_prepare_to_resume): New function.
7686 (i386_thread_added): Mark the thread as needing to update irs
7688 (the_low_target): Remove i386_set_thread_context and install
7689 i386_prepare_to_resume.
7690 * win32-low.c (win32_get_thread_context): Adjust.
7691 (win32_set_thread_context): Use SetThreadContext
7693 (win32_prepare_to_resume): New function.
7694 (win32_require_context): New function, factored out from ...
7695 (thread_rec): ... this.
7696 (continue_one_thread): Call win32_prepare_to_resume on each thread
7697 we're about to continue.
7698 (win32_resume): Call win32_prepare_to_resume on the event thread.
7699 * win32-low.h (struct win32_thread_info)
7700 <debug_registers_changed>: New field.
7701 (struct win32_target_ops): Change prototype of set_thread_context,
7702 delete set_thread_context and add prepare_to_resume.
7703 (win32_require_context): New declaration.
7705 2014-10-08 Gary Benson <gbenson@redhat.com>
7707 * server.h: Do not include common-exceptions.h.
7709 2014-10-08 Gary Benson <gbenson@redhat.com>
7711 * server.h: Do not include cleanups.h.
7713 2014-09-30 James Hogan <james.hogan@imgtec.com>
7715 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7718 2014-09-23 Yao Qi <yao@codesourcery.com>
7720 * linux-low.c (lp_status_maybe_breakpoint): New function.
7721 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7722 (count_events_callback): Likewise.
7723 (select_event_lwp_callback): Likewise.
7724 (cancel_breakpoints_callback): Likewise.
7726 2014-09-19 Don Breazeal <donb@codesourcery.com>
7728 * linux-low.c (handle_extended_wait): Call
7729 linux_ptrace_get_extended_event.
7730 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7731 linux_is_extended_waitstatus.
7733 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7735 * Makefile.in (CPPFLAGS): Define.
7736 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7737 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7739 2014-09-16 Gary Benson <gbenson@redhat.com>
7741 * inferiors.h (current_inferior): Renamed as...
7742 (current_thread): New variable. All uses updated.
7743 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7744 (maybe_move_out_of_jump_pad): Likewise.
7745 (cancel_breakpoint): Likewise.
7746 (linux_low_filter_event): Likewise.
7747 (wait_for_sigstop): Likewise.
7748 (linux_resume_one_lwp): Likewise.
7749 (need_step_over_p): Likewise.
7750 (start_step_over): Likewise.
7751 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7752 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7753 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7754 and save_inferior as saved_thread.
7755 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7757 (regcache_invalidate_thread): Likewise.
7758 * remote-utils.c (prepare_resume_reply): Likewise.
7759 * thread-db.c (thread_db_get_tls_address): Likewise.
7760 (disable_thread_event_reporting): Likewise.
7761 (remove_thread_event_breakpoints): Likewise.
7762 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7764 * target.h (set_desired_inferior): Renamed as...
7765 (set_desired_thread): New declaration. All uses updated.
7766 * server.c (myresume): Updated comment to reference thread instead
7768 (handle_serial_event): Likewise.
7769 (handle_target_event): Likewise.
7771 2014-09-12 Tom Tromey <tromey@redhat.com>
7772 Gary Benson <gbenson@redhat.com>
7774 * regcache.h: Include common-regcache.h.
7775 (regcache_read_pc): Don't declare.
7776 * regcache.c (get_thread_regcache_for_ptid): New function.
7778 2014-09-11 Tom Tromey <tromey@redhat.com>
7779 Gary Benson <gbenson@redhat.com>
7781 * symbol.c: New file.
7782 * Makefile.in (SFILES): Add symbol.c.
7783 (OBS): Add symbol.o.
7785 2014-09-11 Gary Benson <gbenson@redhat.com>
7787 * target.c (target_stop_ptid, target_continue_ptid): New
7790 2014-09-11 Tom Tromey <tromey@redhat.com>
7791 Gary Benson <gbenson@redhat.com>
7793 * target.h: Include target/target.h.
7794 * target.c (target_read_memory, target_read_uint32)
7795 (target_write_memory): New functions.
7797 2014-09-11 Gary Benson <gbenson@redhat.com>
7799 * server.h (debug_hw_points): Don't declare.
7800 * server.c (debug_hw_points): Don't define. Replace all uses
7801 with show_debug_regs.
7802 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7803 all uses with show_debug_regs.
7805 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7807 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7808 endianness into account.
7809 (ppc_supply_ptrace_register): Likewise.
7811 2014-09-03 James Hogan <james.hogan@imgtec.com>
7813 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7814 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7816 2014-09-03 Gary Benson <gbenson@redhat.com>
7818 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7819 ALL_DEBUG_ADDRESS_REGISTERS.
7821 2014-09-02 Gary Benson <gbenson@redhat.com>
7823 * i386-low.h: Renamed as...
7824 * x86-low.h: New file. All type, function and variable name
7825 prefixes changed from "i386_" to "x86_". All references updated.
7826 * i386-low.c: Renamed as...
7827 * x86-low.c: New file. All type, function and variable name
7828 prefixes changed from "i386_" to "x86_". All references updated.
7830 2014-09-02 Gary Benson <gbenson@redhat.com>
7832 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7833 (x86_linux_new_thread): Likewise.
7835 2014-08-29 Gary Benson <gbenson@redhat.com>
7837 * server.h (setjmp.h): Do not include.
7838 (toplevel): Do not declare.
7839 (common-exceptions.h): Include.
7840 (cleanups.h): Likewise.
7841 * server.c (toplevel): Do not define.
7842 (exit_code): New static global.
7843 (detach_or_kill_for_exit_cleanup): New function.
7844 (main): New function. Original main renamed to...
7845 (captured_main): New function.
7846 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7848 2014-08-29 Gary Benson <gbenson@redhat.com>
7850 * Makefile.in (SFILES): Add common/common-exceptions.c.
7851 (OBS): Add common-exceptions.o.
7852 (common-exceptions.o): New rule.
7853 * utils.c (prepare_to_throw_exception): New function.
7855 2014-08-29 Gary Benson <gbenson@redhat.com>
7857 * config.in: Regenerate.
7858 * configure: Likewise.
7860 2014-08-29 Gary Benson <gbenson@redhat.com>
7862 * Makefile.in (SFILES): Add common/cleanups.c.
7864 (cleanups.o): New rule.
7866 2014-08-29 Gary Benson <gbenson@redhat.com>
7868 * utils.c (internal_vwarning): New function.
7870 2014-08-28 Gary Benson <gbenson@redhat.com>
7872 * utils.h (fatal): Remove declaration.
7873 * utils.c (fatal): Remove function.
7875 2014-08-28 Gary Benson <gbenson@redhat.com>
7877 * tracepoint.c (gdb_agent_init): Replace fatal with
7879 (initialize_tracepoint): Likewise.
7881 2014-08-28 Gary Benson <gbenson@redhat.com>
7883 * remote-utils.c (remote_prepare): Replace fatal with error.
7885 2014-08-28 Gary Benson <gbenson@redhat.com>
7887 * linux-low.c (linux_async): Replace fatal with warning.
7889 (linux_start_non_stop): Return -1 if linux_async failed.
7891 2014-08-28 Gary Benson <gbenson@redhat.com>
7893 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7895 (i386_dr_low_get_addr): Remove vague comment.
7896 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7899 2014-08-28 Gary Benson <gbenson@redhat.com>
7901 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7902 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7904 (linux_resume_one_lwp): Likewise.
7905 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7907 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7908 with internal_error.
7909 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7910 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7911 (find_register_by_name): Replace fatal with internal_error.
7912 (find_regno): Likewise.
7913 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7914 * thread-db.c (thread_db_create_event): Likewise.
7915 (thread_db_load_search): Likewise.
7916 (try_thread_db_load_1): Likewise.
7917 * tracepoint.c (get_jump_space_head): Replace fatal with
7919 (claim_trampoline_space): Likewise.
7920 (have_fast_tracepoint_trampoline_buffer): Likewise.
7921 (cmd_qtstart): Likewise.
7922 (stop_tracing): Likewise.
7923 (fast_tracepoint_collecting): Likewise.
7924 (target_malloc): Likewise.
7925 (download_tracepoint): Likewise.
7926 (download_trace_state_variables): Replace check with gdb_assert.
7927 (upload_fast_traceframes): Replace fatal with internal_error.
7929 2014-08-19 Tom Tromey <tromey@redhat.com>
7930 Gary Benson <gbenson@redhat.com>
7932 * Makefile.in (SFILES): Add common/common-debug.c.
7933 (OBS): Add common-debug.o.
7934 (common-debug.o): New rule.
7935 * debug.h (debug_printf): Don't declare.
7936 * debug.c (debug_printf): Renamed and rewritten as...
7937 (debug_vprintf): New function.
7939 2014-08-19 Gary Benson <gbenson@redhat.com>
7941 * utils.h: Do not include print-utils.h.
7943 2014-08-19 Tom Tromey <tromey@redhat.com>
7944 Gary Benson <gbenson@redhat.com>
7946 * server.h: Add static assertion.
7947 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7949 2014-08-19 Tom Tromey <tromey@redhat.com>
7950 Gary Benson <gbenson@redhat.com>
7952 * Makefile.in (SFILES): Add common/errors.c.
7953 (OBS): Add errors.o.
7954 (IPA_OBS): Add errors-ipa.o.
7955 (errors.o): New rule.
7956 (errors-ipa.o): Likewise.
7957 * utils.h (perror_with_name, error, warning): Don't declare.
7958 * utils.c (warning): Renamed and rewritten as...
7959 (vwarning): New function.
7960 (error): Renamed and rewritten as...
7961 (verror): New function.
7962 (internal_error): Renamed and rewritten as...
7963 (internal_verror): New function.
7965 2014-08-07 Gary Benson <gbenson@redhat.com>
7967 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7968 * configure: Regenerate.
7969 * config.in: Likewise.
7970 * server.h: Do not include errno.h.
7971 * event-loop.c: Likewise.
7972 * hostio-errno.c: Likewise.
7973 * linux-low.c: Likewise.
7974 * remote-utils.c: Likewise.
7975 * spu-low.c: Likewise.
7976 * utils.c: Likewise.
7977 * gdbreplay.c: Unconditionally include errno.h.
7979 2014-08-07 Gary Benson <gbenson@redhat.com>
7981 * server.h: Do not include string.h.
7982 * event-loop.c: Likewise.
7983 * linux-low.c: Likewise.
7984 * regcache.c: Likewise.
7985 * remote-utils.c: Likewise.
7986 * spu-low.c: Likewise.
7987 * utils.c: Likewise.
7989 2014-08-07 Gary Benson <gbenson@redhat.com>
7991 * server.h: Do not include gdb_assert.h.
7993 2014-08-07 Gary Benson <gbenson@redhat.com>
7995 * server.h: Do not include common-utils.h.
7997 2014-08-07 Gary Benson <gbenson@redhat.com>
7999 * server.h: Do not include ptid.h.
8000 * notif.h: Likewise.
8002 2014-08-07 Gary Benson <gbenson@redhat.com>
8004 * server.h: Do not include gdb_locale.h.
8006 2014-08-07 Gary Benson <gbenson@redhat.com>
8008 * server.h: Do not include gdb/signals.h.
8009 * win32-low.c: Likewise.
8011 2014-08-07 Gary Benson <gbenson@redhat.com>
8013 * server.h: Do not include pathmax.h.
8015 2014-08-07 Gary Benson <gbenson@redhat.com>
8017 * server.h: Do not include libiberty.h.
8018 * linux-bfin-low.c: Likewise.
8020 2014-08-07 Gary Benson <gbenson@redhat.com>
8022 * server.h: Do not include ansidecl.h.
8024 2014-08-07 Gary Benson <gbenson@redhat.com>
8026 * linux-x86-low.c: Do not include stddef.h.
8027 * lynx-ppc-low.c: Likewise.
8028 * tracepoint.c: Likewise.
8030 2014-08-07 Gary Benson <gbenson@redhat.com>
8032 * server.h: Do not include stdarg.h.
8033 * nto-low.c: Likewise.
8035 2014-08-07 Gary Benson <gbenson@redhat.com>
8037 * server.h: Do not include stdlib.h.
8038 * inferiors.c: Likewise.
8039 * linux-low.c: Likewise.
8040 * regcache.c: Likewise.
8041 * spu-low.c: Likewise.
8042 * tracepoint.c: Likewise.
8043 * utils.c: Likewise.
8045 2014-08-07 Gary Benson <gbenson@redhat.com>
8047 * server.h: Do not include stdio.h.
8048 * linux-low.c: Likewise.
8049 * remote-utils.c: Likewise.
8050 * spu-low.c: Likewise.
8051 * utils.c: Likewise.
8052 * wincecompat.c: Likewise.
8054 2014-08-06 Gary Benson <gbenson@redhat.com>
8056 * regcache.c (init_register_cache): Move conditionals inside if.
8058 2014-08-06 Gary Benson <gbenson@redhat.com>
8060 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
8062 2014-07-31 Gary Benson <gbenson@redhat.com>
8064 * ax.h: Do not include server.h.
8065 * gdbthread.h: Likewise.
8066 * lynx-low.h: Likewise.
8067 * notif.h: Likewise.
8069 2014-07-30 Gary Benson <gbenson@redhat.com>
8071 * server.h: Include common-defs.h.
8072 Do not include config.h or build-gnulib-gdbserver/config.h.
8074 2014-07-30 Gary Benson <gbenson@redhat.com>
8076 * hostio-errno.c: Move server.h to top of includes list.
8077 * inferiors.c: Likewise.
8078 * linux-x86-low.c: Likewise.
8079 * notif.c: Include server.h.
8081 2014-07-24 Tom Tromey <tromey@redhat.com>
8082 Gary Benson <gbenson@redhat.com>
8084 * server.h (CORE_ADDR): Now unsigned.
8086 2014-07-16 Pedro Alves <palves@redhat.com>
8088 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
8090 2014-07-15 Pedro Alves <palves@redhat.com>
8092 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
8095 2014-07-11 Pedro Alves <palves@redhat.com>
8097 * linux-low.c (kill_wait_lwp): New function, based on
8098 kill_one_lwp_callback, but use my_waitpid directly.
8099 (kill_one_lwp_callback, linux_kill): Use it.
8101 2014-06-23 Pedro Alves <palves@redhat.com>
8103 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
8104 before setting DR0..DR3.
8106 2014-06-20 Gary Benson <gbenson@redhat.com>
8108 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
8109 * configure: Regenerated.
8110 * config.in: Likewise.
8112 2014-06-20 Gary Benson <gbenson@redhat.com>
8114 * Makefile.in (SFILES): Update locations for files moved
8116 (object file files): Reordered.
8118 2014-06-20 Gary Benson <gbenson@redhat.com>
8120 * i386-low.h (i386_dr_low_can_set_addr): Removed.
8121 (i386_dr_low_set_addr): Likewise.
8122 (i386_dr_low_get_addr): Likewise.
8123 (i386_dr_low_can_set_control): Likewise.
8124 (i386_dr_low_set_control): Likewise.
8125 (i386_dr_low_get_control): Likewise.
8126 (i386_dr_low_get_status): Likewise.
8127 (i386_get_debug_register_length): Likewise.
8128 * linux-x86-low.c (i386_dr_low_set_addr):
8129 Changed signature. Made static.
8130 (i386_dr_low_get_addr): Likewise.
8131 (i386_dr_low_set_control): Likewise.
8132 (i386_dr_low_get_control): Likewise.
8133 (i386_dr_low_get_status): Likewise.
8134 (i386_dr_low): New global variable.
8135 * win32-i386-low.c (i386_dr_low_set_addr):
8136 Changed signature. Made static.
8137 (i386_dr_low_get_addr): Likewise.
8138 (i386_dr_low_set_control): Likewise.
8139 (i386_dr_low_get_control): Likewise.
8140 (i386_dr_low_get_status): Likewise.
8141 (i386_dr_low): New global variable.
8143 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
8145 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
8146 * Makefile.in (AR, AR_FLAGS): Define.
8147 * configure: Regenerate.
8149 2014-06-19 Gary Benson <gbenson@redhat.com>
8151 * Makefile.in (i386-dregs.o): New rule.
8152 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
8153 * i386-low.c (target.h): Remove include.
8154 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
8155 (DR_CONTROL_SHIFT): Likewise.
8156 (DR_CONTROL_SIZE): Likewise.
8157 (DR_RW_EXECUTE): Likewise.
8158 (DR_RW_WRITE): Likewise.
8159 (DR_RW_READ): Likewise.
8160 (DR_RW_IORW): Likewise.
8161 (DR_LEN_1): Likewise.
8162 (DR_LEN_2): Likewise.
8163 (DR_LEN_4): Likewise.
8164 (DR_LEN_8): Likewise.
8165 (DR_LOCAL_ENABLE_SHIFT): Likewise.
8166 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
8167 (DR_ENABLE_SIZE): Likewise.
8168 (DR_LOCAL_SLOWDOWN): Likewise.
8169 (DR_GLOBAL_SLOWDOWN): Likewise.
8170 (DR_CONTROL_RESERVED): Likewise.
8171 (I386_DR_CONTROL_MASK): Likewise.
8172 (I386_DR_VACANT): Likewise.
8173 (I386_DR_LOCAL_ENABLE): Likewise.
8174 (I386_DR_GLOBAL_ENABLE): Likewise.
8175 (I386_DR_DISABLE): Likewise.
8176 (I386_DR_SET_RW_LEN): Likewise.
8177 (I386_DR_GET_RW_LEN): Likewise.
8178 (I386_DR_WATCH_HIT): Likewise.
8179 (i386_wp_op_t): Likewise.
8180 (i386_show_dr): Likewise.
8181 (i386_length_and_rw_bits): Likewise.
8182 (i386_insert_aligned_watchpoint): Likewise.
8183 (i386_remove_aligned_watchpoint): Likewise.
8184 (i386_handle_nonaligned_watchpoint): Likewise.
8185 i386_update_inferior_debug_regs(): Likewise.
8186 (i386_dr_insert_watchpoint): Likewise.
8187 (i386_dr_remove_watchpoint): Likewise.
8188 (i386_dr_region_ok_for_watchpoint): Likewise.
8189 (i386_dr_stopped_data_address): Likewise.
8190 (i386_dr_stopped_by_watchpoint): Likewise.
8192 2014-06-19 Gary Benson <gbenson@redhat.com>
8194 * i386-low.c (i386_dr_show): Renamed to
8195 i386_show_dr and made static. All uses updated.
8196 (i386_dr_length_and_rw_bits): Renamed to
8197 i386_length_and_rw_bits and made static.
8199 (i386_dr_insert_aligned_watchpoint): Renamed to
8200 i386_insert_aligned_watchpoint and made static.
8202 (i386_dr_remove_aligned_watchpoint): Renamed to
8203 i386_remove_aligned_watchpoint and made static.
8205 (i386_dr_update_inferior_debug_regs): Renamed to
8206 i386_update_inferior_debug_regs and made static.
8209 2014-06-18 Gary Benson <gbenson@redhat.com>
8211 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8212 (i386_dr_low_can_set_control): Likewise.
8213 (i386_get_debug_register_length): Likewise.
8214 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8215 (i386_dr_low_can_set_control): Likewise.
8216 (i386_get_debug_register_length): Likewise.
8218 2014-06-17 Gary Benson <gbenson@redhat.com>
8220 * i386-low.h (i386-dregs.h): New include.
8221 (DR_FIRSTADDR): Now in i386-dregs.h.
8222 (DR_LASTADDR): Likewise.
8223 (DR_NADDR): Likewise.
8224 (DR_STATUS): Likewise.
8225 (DR_CONTROL): Likewise.
8226 (i386_debug_reg_state): Likewise.
8227 (i386_dr_insert_watchpoint): Likewise.
8228 (i386_dr_remove_watchpoint): Likewise.
8229 (i386_dr_region_ok_for_watchpoint): Likewise.
8230 (i386_dr_stopped_data_address): Likewise.
8231 (i386_dr_stopped_by_watchpoint): Likewise.
8232 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8234 2014-06-18 Gary Benson <gbenson@redhat.com>
8236 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8237 i386_dr_insert_watchpoint.
8238 (i386_low_remove_watchpoint): Renamed to
8239 i386_dr_remove_watchpoint.
8240 (i386_low_region_ok_for_watchpoint): Renamed to
8241 i386_dr_region_ok_for_watchpoint.
8242 (i386_low_stopped_data_address): Renamed to
8243 i386_dr_stopped_data_address.
8244 (i386_low_stopped_by_watchpoint): Renamed to
8245 i386_dr_stopped_by_watchpoint.
8246 * i386-low.c (i386_show_dr): Renamed to
8247 i386_dr_show and made nonstatic. All uses updated.
8248 (i386_length_and_rw_bits): Renamed to
8249 i386_dr_length_and_rw_bits and made nonstatic.
8251 (i386_insert_aligned_watchpoint): Renamed to
8252 i386_dr_insert_aligned_watchpoint and made nonstatic.
8254 (i386_remove_aligned_watchpoint): Renamed to
8255 i386_dr_remove_aligned_watchpoint and made nonstatic.
8257 (i386_update_inferior_debug_regs): Renamed to
8258 i386_dr_update_inferior_debug_regs and made nonstatic.
8260 (i386_low_insert_watchpoint): Renamed to
8261 i386_dr_insert_watchpoint. All uses updated.
8262 (i386_low_remove_watchpoint): Renamed to
8263 i386_dr_remove_watchpoint. All uses updated.
8264 (i386_low_region_ok_for_watchpoint): Renamed to
8265 i386_dr_region_ok_for_watchpoint. All uses updated.
8266 (i386_low_stopped_data_address): Renamed to
8267 i386_dr_stopped_data_address. All uses updated.
8268 (i386_low_stopped_by_watchpoint): Renamed to
8269 i386_dr_stopped_by_watchpoint. All uses updated.
8271 2014-06-18 Gary Benson <gbenson@redhat.com>
8273 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8274 (i386_dr_low_can_set_control): Likewise.
8275 (i386_insert_aligned_watchpoint): New check.
8277 2014-06-18 Gary Benson <gbenson@redhat.com>
8279 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8282 2014-06-18 Gary Benson <gbenson@redhat.com>
8284 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8285 instead of fatal and error.
8286 (i386_handle_nonaligned_watchpoint): Likewise.
8288 2014-06-18 Gary Benson <gbenson@redhat.com>
8290 * i386-low.c (i386_get_debug_register_length): New macro.
8291 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8292 (i386_show_dr): Use debug_printf instead of fprintf. Use
8293 phex to format values.
8295 2014-06-18 Gary Benson <gbenson@redhat.com>
8297 * i386-low.h: Comment changes.
8298 * i386-low.c: Likewise.
8300 2014-06-18 Gary Benson <gbenson@redhat.com>
8302 * i386-low.c: Whitespace changes.
8304 2014-06-12 Tom Tromey <tromey@redhat.com>
8306 * utils.c (freeargv): Remove.
8308 2014-06-12 Tom Tromey <tromey@redhat.com>
8310 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8311 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8312 (parse_debug_format_options): Likewise.
8313 (gdbserver_usage): Likewise.
8314 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8315 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8316 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8318 ($(LIBGNU)): Depend on libiberty.
8319 (all-lib): Recurse into all subdirs.
8320 (install-only): Invoke "install" target in subdirs.
8321 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8323 * configure: Rebuild.
8324 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8325 for vasprintf, vsnprintf, or gettimeofday.
8326 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8329 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8331 * development.sh: Delete.
8332 * Makefile.in (config.status): Adjust dependency on development.sh.
8333 * configure.ac: Adjust development.sh source call.
8334 * configure: Regenerate.
8336 2014-06-02 Pedro Alves <palves@redhat.com>
8338 * ax.c (gdb_free_agent_expr): New function.
8339 * ax.h (gdb_free_agent_expr): New declaration.
8340 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8342 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8344 (clear_breakpoint_conditions_and_commands): New function.
8345 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8346 (clear_breakpoint_conditions_and_commands): New declaration.
8348 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8350 * linux-aarch64-low.c (asm/ptrace.h): Include.
8352 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8354 Fix TLS access for -static -pthread.
8355 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8356 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8357 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8359 2014-05-20 Pedro Alves <palves@redhat.com>
8361 * linux-aarch64-low.c (aarch64_insert_point)
8362 (aarch64_remove_point): No longer check whether the type is
8363 supported here. Adjust to new interface.
8364 (the_low_target): Install aarch64_supports_z_point_type as
8365 supports_z_point_type method.
8366 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8367 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8368 instead of a Z packet char. Adjust.
8369 (arm_supports_z_point_type): New function.
8370 (arm_insert_point, arm_remove_point): Adjust to new interface.
8371 (the_low_target): Install arm_supports_z_point_type.
8372 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8373 (cris_insert_point, cris_remove_point): Adjust to new interface.
8374 Don't check whether the type is supported here.
8375 (the_low_target): Install cris_supports_z_point_type.
8376 * linux-low.c (linux_supports_z_point_type): New function.
8377 (linux_insert_point, linux_remove_point): Adjust to new interface.
8378 * linux-low.h (struct linux_target_ops) <insert_point,
8379 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8380 raw_breakpoint pointer parameter.
8381 <supports_z_point_type>: New method.
8382 * linux-mips-low.c (mips_supports_z_point_type): New function.
8383 (mips_insert_point, mips_remove_point): Adjust to new interface.
8384 Use mips_supports_z_point_type.
8385 (the_low_target): Install mips_supports_z_point_type.
8386 * linux-ppc-low.c (the_low_target): Install NULL as
8387 supports_z_point_type method.
8388 * linux-s390-low.c (the_low_target): Install NULL as
8389 supports_z_point_type method.
8390 * linux-sparc-low.c (the_low_target): Install NULL as
8391 supports_z_point_type method.
8392 * linux-x86-low.c (x86_supports_z_point_type): New function.
8393 (x86_insert_point): Adjust to new insert_point interface. Use
8394 insert_memory_breakpoint. Adjust to new
8395 i386_low_insert_watchpoint interface.
8396 (x86_remove_point): Adjust to remove_point interface. Use
8397 remove_memory_breakpoint. Adjust to new
8398 i386_low_remove_watchpoint interface.
8399 (the_low_target): Install x86_supports_z_point_type.
8400 * lynx-low.c (lynx_target_ops): Install NULL as
8401 supports_z_point_type callback.
8402 * nto-low.c (nto_supports_z_point_type): New.
8403 (nto_insert_point, nto_remove_point): Adjust to new interface.
8404 (nto_target_ops): Install nto_supports_z_point_type.
8405 * mem-break.c: Adjust intro comment.
8406 (struct raw_breakpoint) <raw_type, size>: New fields.
8407 <inserted>: Update comment.
8408 <shlib_disabled>: Delete field.
8409 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8410 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8411 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8412 (raw_bkpt_type_to_target_hw_bp_type): New function.
8413 (find_enabled_raw_code_breakpoint_at): New function.
8414 (find_raw_breakpoint_at): New type and size parameters. Use them.
8415 (insert_memory_breakpoint): New function, based off
8416 set_raw_breakpoint_at.
8417 (remove_memory_breakpoint): New function.
8418 (set_raw_breakpoint_at): Reimplement.
8419 (set_breakpoint): New, based on set_breakpoint_at.
8420 (set_breakpoint_at): Reimplement.
8421 (delete_raw_breakpoint): Go through the_target->remove_point
8422 instead of assuming memory breakpoints.
8423 (find_gdb_breakpoint_at): Delete.
8424 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8425 (find_gdb_breakpoint): New function.
8426 (set_gdb_breakpoint_at): Delete.
8427 (z_type_supported): New function.
8428 (set_gdb_breakpoint_1): New function, loosely based off
8429 set_gdb_breakpoint_at.
8430 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8431 (delete_gdb_breakpoint_at): Delete.
8432 (delete_gdb_breakpoint_1): New function, loosely based off
8433 delete_gdb_breakpoint_at.
8434 (delete_gdb_breakpoint): New function.
8435 (clear_gdb_breakpoint_conditions): Rename to ...
8436 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8438 (add_condition_to_breakpoint): Make static.
8439 (add_breakpoint_condition): Take a struct breakpoint pointer
8440 instead of an address. Adjust.
8441 (gdb_condition_true_at_breakpoint): Rename to ...
8442 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8444 (gdb_condition_true_at_breakpoint): Reimplement.
8445 (add_breakpoint_commands): Take a struct breakpoint pointer
8446 instead of an address. Adjust.
8447 (gdb_no_commands_at_breakpoint): Rename to ...
8448 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8449 parameter. Return true if no breakpoint was found. Change debug
8451 (gdb_no_commands_at_breakpoint): Reimplement.
8452 (run_breakpoint_commands): Rename to ...
8453 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8454 and change return type to boolean.
8455 (run_breakpoint_commands): New function.
8456 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8457 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8458 breakpoint. Go through the_target->remove_point instead of
8459 assuming memory breakpoint.
8460 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8461 software and hardware breakpoints.
8462 (reinsert_raw_breakpoint): Go through the_target->insert_point
8463 instead of assuming memory breakpoint.
8464 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8465 software and hardware breakpoints.
8466 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8467 Check both software and hardware breakpoints.
8468 (validate_inserted_breakpoint): Assert the breakpoint is a
8469 software breakpoint. Set the inserted flag to -1 instead of
8470 setting shlib_disabled.
8471 (delete_disabled_breakpoints): Adjust.
8472 (validate_breakpoints): Only validate software breakpoints.
8473 Adjust to inserted flag change.
8474 (check_mem_read, check_mem_write): Skip breakpoint types other
8475 than software breakpoints. Adjust to inserted flag change.
8476 * mem-break.h (enum raw_bkpt_type): New enum.
8477 (raw_breakpoint, struct process_info): Forward declare.
8478 (Z_packet_to_target_hw_bp_type): Delete declaration.
8479 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8480 (set_gdb_breakpoint, delete_gdb_breakpoint)
8481 (clear_breakpoint_conditions): New declarations.
8482 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8483 (breakpoint_inserted_here): Update comment.
8484 (add_breakpoint_condition, add_breakpoint_commands): Replace
8485 address parameter with a breakpoint pointer parameter.
8486 (gdb_breakpoint_here): Update comment.
8487 (delete_gdb_breakpoint_at): Delete.
8488 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8489 * server.c (process_point_options): Take a struct breakpoint
8490 pointer instead of an address. Adjust.
8491 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8492 delete_gdb_breakpoint.
8493 * spu-low.c (spu_target_ops): Install NULL as
8494 supports_z_point_type method.
8495 * target.h: Include mem-break.h.
8496 (struct target_ops) <prepare_to_access_memory>: Update comment.
8497 <supports_z_point_type>: New field.
8498 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8499 instead of a char. Also take a raw breakpoint pointer.
8500 * win32-arm-low.c (the_low_target): Install NULL as
8501 supports_z_point_type.
8502 * win32-i386-low.c (i386_supports_z_point_type): New function.
8503 (i386_insert_point, i386_remove_point): Adjust to new interface.
8504 (the_low_target): Install i386_supports_z_point_type.
8505 * win32-low.c (win32_supports_z_point_type): New function.
8506 (win32_insert_point, win32_remove_point): Adjust to new interface.
8507 (win32_target_ops): Install win32_supports_z_point_type.
8508 * win32-low.h (struct win32_target_ops):
8509 <supports_z_point_type>: New method.
8510 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8511 instead of a char. Also take a raw breakpoint pointer.
8513 2014-05-20 Pedro Alves <palves@redhat.com>
8515 * mem-break.h: Include break-common.h.
8516 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8517 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8518 (Z_packet_to_target_hw_bp_type): New declaration.
8519 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8520 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8521 (Z_PACKET_ACCESS_WP): Delete macros.
8522 (Z_packet_to_hw_type): Delete function.
8523 * i386-low.h: Don't include break-common.h here.
8524 (Z_packet_to_hw_type): Delete declaration.
8525 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8526 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8527 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8528 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8529 * linux-aarch64-low.c: Don't include break-common.h here.
8530 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8531 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8532 (Z_packet_to_target_hw_bp_type): Delete function.
8533 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8535 (mips_insert_point, mips_remove_point): Use
8536 Z_packet_to_target_hw_bp_type.
8538 2014-05-20 Pedro Alves <palves@redhat.com>
8540 * linux-aarch64-low.c: Include break-common.h.
8541 (enum target_point_type): Delete.
8542 (Z_packet_to_point_type): Rename to ...
8543 (Z_packet_to_target_hw_bp_type): ... this, and return a
8544 target_hw_bp_type instead.
8545 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8546 instead of an enum target_point_type.
8547 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8549 (aarch64_dr_state_insert_one_point)
8550 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8551 (aarch64_handle_aligned_watchpoint)
8552 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8553 Take an enum target_hw_bp_type instead of an enum
8555 (aarch64_supports_z_point_type): New function.
8556 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8557 use Z_packet_to_target_hw_bp_type.
8559 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8561 * configure.ac: Only use -Werror by default when DEVELOPMENT
8563 * configure: Regenerate.
8565 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8567 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8568 * linux-x86-low.c (X86_64_USER_REGS): New.
8569 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8571 2014-04-28 Yao Qi <yao@codesourcery.com>
8573 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8576 2014-04-25 Pedro Alves <palves@redhat.com>
8579 * linux-low.c (linux_attach_fail_reason_string): New function.
8580 (linux_attach_lwp): Delete.
8581 (linux_attach_lwp_1): Rename to ...
8582 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8583 argument. Remove "initial" parameter. Return int instead of
8584 void. Don't error or warn here.
8585 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8586 failure to attach to the tgid. Call warning when failing to
8588 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8589 argument. Remove "initial" parameter. Return int instead of
8590 void. Don't error or warn here.
8591 (linux_attach_fail_reason_string): New declaration.
8592 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8593 interface change. Use linux_attach_fail_reason_string.
8595 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8596 Walfred Tedeschi <walfred.tedeschi@intel.com>
8598 * Makefile.in: Added rules to handle new files
8599 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8600 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8601 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8602 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8603 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8604 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8606 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8607 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8608 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8609 i386/x32-avx512.xml.
8610 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8611 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8612 i386/x32-avx512-linux.xml.
8613 * i387-fp.c (num_avx512_k_registers): New constant for number
8615 (num_avx512_zmmh_low_registers): New constant for number of
8616 lower ZMM registers (0-15).
8617 (num_avx512_zmmh_high_registers): New constant for number of
8618 higher ZMM registers (16-31).
8619 (num_avx512_ymmh_registers): New contant for number of higher
8620 YMM registers (ymm16-31 added by avx521 on x86_64).
8621 (num_avx512_xmm_registers): New constant for number of higher
8622 XMM registers (xmm16-31 added by AVX512 on x86_64).
8623 (struct i387_xsave): Add space for AVX512 registers.
8624 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8625 Add code to handle AVX512 registers.
8626 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8627 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8628 prototypei from generated file.
8629 (tdesc_amd64_avx512_linux): Likewise.
8630 (init_registers_x32_avx512_linux): Likewise.
8631 (tdesc_x32_avx512_linux): Likewise.
8632 (init_registers_i386_avx512_linux): Likewise.
8633 (tdesc_i386_avx512_linux): Likewise.
8634 (x86_64_regmap): Add AVX512 registers.
8635 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8637 (initialize_low_arch): Add code to initialize AVX512 registers.
8639 2014-04-23 Pedro Alves <palves@redhat.com>
8641 * mem-break.c (find_gdb_breakpoint_at): Make static.
8642 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8644 2014-04-23 Pedro Alves <palves@redhat.com>
8646 * i386-low.c: Don't include break-common.h here.
8647 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8648 prototype to take target_hw_bp_type as argument instead of a Z
8650 * i386-low.h: Include break-common.h here.
8651 (Z_packet_to_hw_type): Declare.
8652 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8654 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8655 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8656 (x86_remove_point): Convert the packet number to a
8657 target_hw_bp_type before calling i386_low_remove_watchpoint.
8658 * win32-i386-low.c (i386_insert_point): Convert the packet number
8659 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8660 (i386_remove_point): Convert the packet number to a
8661 target_hw_bp_type before calling i386_low_remove_watchpoint.
8663 2014-04-23 Pedro Alves <palves@redhat.com>
8665 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8667 2014-04-10 Pedro Alves <palves@redhat.com>
8669 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8670 Check if the condition or command is NULL before checking if the
8671 breakpoint is known. On success, return true.
8672 * mem-break.h (add_breakpoint_condition): Document return.
8673 (add_breakpoint_commands): Add describing comment.
8674 * server.c (skip_to_semicolon): New function.
8675 (process_point_options): Use it.
8677 2014-04-09 Pedro Alves <palves@redhat.com>
8679 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8682 2014-02-27 Pedro Alves <palves@redhat.com>
8685 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8687 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8689 (last_thread_of_process_p): Take a PID argument instead of a
8691 (linux_wait_for_lwp): Delete.
8692 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8694 (linux_low_filter_event): New function, party factored out from
8695 linux_wait_for_event.
8696 (linux_wait_for_event): Rename to ...
8697 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8698 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8699 sigsuspend. Check for zombie leaders.
8700 (linux_wait_for_event): Reimplement as wrapper around
8701 linux_wait_for_event_filtered.
8702 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8703 a normal or signal exit is seen, it's the whole process exiting.
8704 (wait_for_sigstop): No longer a for_each_inferior callback.
8705 Rewrite on top of linux_wait_for_event_filtered.
8706 (stop_all_lwps): Call wait_for_sigstop directly.
8707 * server.c (resume, handle_target_event): Handle
8708 TARGET_WAITKIND_NO_RESUMED.
8710 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8712 * win32-low.c (psapi_get_dll_name,
8713 * win32_CreateToolhelp32Snapshot): Delete.
8714 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8715 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8717 (handle_load_dll): Add function description.
8718 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8720 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8722 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8724 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8725 base address when calling win32_add_one_solib.
8726 (handle_load_dll): Delete local variable load_addr.
8727 Remove 0x1000 offset applied to DLL base address when calling
8728 win32_add_one_solib.
8729 (handle_unload_dll): Add comment.
8731 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8733 * win32-low.c (win32_add_all_dlls): Renames
8734 win32_ensure_ntdll_loaded. Rewrite function documentation.
8735 Adjust implementation to always load all DLLs.
8736 Add 0x1000 offset to DLL base address when calling
8737 win32_add_one_solib.
8738 (child_initialization_done): New static global.
8739 (do_initial_child_stuff): Set child_initialization_done to
8740 zero during child initialization, and 1 after. Replace call
8741 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8743 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8744 (handle_unload_dll): Add function documentation.
8745 (get_child_debug_event): Ignore load and unload DLL events
8746 during child initialization.
8748 2014-02-20 Doug Evans <dje@google.com>
8750 Remove global all_lwps.
8751 * inferiors.h (ptid_of): Move here from linux-low.h.
8752 (pid_of, lwpid_of): Ditto.
8753 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8754 parameter is a struct thread_info * now.
8755 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8756 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8757 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8759 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8760 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8761 * linux-arm-low.c (update_registers_callback): Update, "entry"
8762 parameter is a struct thread_info * now.
8763 Fetch lwpid from current_inferior directly.
8764 (arm_insert_point): Pass &all_threads to find_inferior instead of
8766 (arm_remove_point): Ditto.
8767 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8768 (arm_prepare_to_resume): Fetch pid from thread.
8769 (arm_read_description): Fetch lwpid from current_inferior directly.
8770 * linux-low.c (all_lwps): Delete.
8771 (delete_lwp): Delete call to remove_inferior.
8772 (handle_extended_wait): Fetch lwpid from thread.
8773 (add_lwp): Don't set lwp->entry.id. Remove call to
8774 add_inferior_to_list.
8775 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8776 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8777 (kill_one_lwp_callback): Ditto.
8778 (linux_kill): Don't dereference NULL pointer.
8779 Fetch ptid,lwpid from thread.
8780 (get_detach_signal): Fetch ptid from thread.
8781 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8782 Simplify call to regcache_invalidate_thread.
8783 (delete_lwp_callback): Update, "entry" parameter is a
8784 struct thread_info * now. Fetch pid from thread.
8785 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8786 (status_pending_p_callback): Update, "entry" parameter is a
8787 struct thread_info * now. Fetch ptid from thread.
8788 (find_lwp_pid): Update, "entry" parameter is a
8789 struct thread_info * now.
8790 (linux_wait_for_lwp): Fetch pid from thread.
8791 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8792 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8793 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8794 (dequeue_one_deferred_signal): Ditto.
8795 (cancel_breakpoint): Fetch ptid from current_inferior.
8796 (linux_wait_for_event): Pass &all_threads to find_inferior,
8797 not &all_lwps. Fetch ptid, lwpid from thread.
8798 (count_events_callback): Update, "entry" parameter is a
8799 struct thread_info * now.
8800 (select_singlestep_lwp_callback): Ditto.
8801 (select_event_lwp_callback): Ditto.
8802 (cancel_breakpoints_callback): Ditto.
8803 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8805 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8806 (unsuspend_one_lwp): Update, "entry" parameter is a
8807 struct thread_info * now.
8808 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8810 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8811 Fetch lwpid from thread, not lwp.
8812 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8813 Pass &all_threads to find_inferior, not &all_lwps.
8814 (send_sigstop): Fetch lwpid from thread, not lwp.
8815 (send_sigstop_callback): Update, "entry" parameter is a
8816 struct thread_info * now.
8817 (suspend_and_send_sigstop_callback): Ditto.
8818 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8819 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8820 struct thread_info * now.
8821 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8823 (lwp_running): Update, "entry" parameter is a
8824 struct thread_info * now.
8825 (stop_all_lwps): Fetch ptid from thread.
8826 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8827 (linux_resume_one_lwp): Fetch lwpid from thread.
8828 (linux_set_resume_request): Update, "entry" parameter is a
8829 struct thread_info * now. Fetch pid, lwpid from thread.
8830 (resume_status_pending_p): Update, "entry" parameter is a
8831 struct thread_info * now.
8832 (need_step_over_p): Ditto. Fetch lwpid from thread.
8833 (start_step_over): Fetch lwpid from thread.
8834 (linux_resume_one_thread): Update, "entry" parameter is a
8835 struct thread_info * now. Fetch lwpid from thread.
8836 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8837 (proceed_one_lwp): Update, "entry" parameter is a
8838 struct thread_info * now. Fetch lwpid from thread.
8839 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8840 struct thread_info * now.
8841 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8842 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8843 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8845 (regsets_store_inferior_registers): Ditto.
8846 (fetch_register, store_register): Ditto.
8847 (linux_read_memory, linux_write_memory): Ditto.
8848 (linux_request_interrupt): Ditto.
8849 (linux_read_auxv): Ditto.
8850 (linux_xfer_siginfo): Ditto.
8851 (linux_qxfer_spu): Ditto.
8852 (linux_qxfer_libraries_svr4): Ditto.
8853 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8854 moved to inferiors.h.
8856 (get_thread_lwp): Update.
8857 (struct lwp_info): Delete member "entry". Simplify comment for
8860 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8861 current_inferior directly.
8862 (update_watch_registers_callback): Update, "entry" parameter is a
8863 struct thread_info * now. Fetch pid from thread.
8864 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8865 (mips_insert_point): Fetch lwpid from current_inferior.
8866 Pass &all_threads to find_inferior, not &all_lwps.
8867 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8868 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8870 (mips_stopped_data_address): Ditto.
8871 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8873 * linux-tile-low.c (tile_arch_setup): Ditto.
8874 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8875 (update_debug_registers_callback): Update, "entry" parameter is a
8876 struct thread_info * now. Fetch pid from thread.
8877 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8878 Pass &all_threads to find_inferior, not &all_lwps.
8879 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8880 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8881 Pass &all_threads to find_inferior, not &all_lwps.
8882 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8883 (i386_dr_low_get_status): Ditto.
8884 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8885 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8886 (x86_linux_read_description): Ditto.
8887 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8889 2014-02-20 Doug Evans <dje@google.com>
8891 * inferiors.c (get_first_inferior): Fix buglet.
8893 2014-02-19 Doug Evans <dje@google.com>
8895 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8896 * inferiors.c (add_thread): Change result type to struct thread_info *.
8897 All callers updated.
8898 (add_lwp): Call add_thread here instead of in callers.
8899 All callers updated.
8900 * linux-low.h (get_lwp_thread): Rewrite.
8901 (struct lwp_info): New member "thread".
8903 2014-02-19 Doug Evans <dje@google.com>
8905 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8906 All callers updated.
8908 2014-02-19 Doug Evans <dje@google.com>
8910 * inferiors.c (add_thread): Fix whitespace.
8912 2014-02-19 Doug Evans <dje@google.com>
8914 * dll.c (clear_dlls): Replace accessing list implemention details
8916 * gdbthread.h (get_first_thread): Declare.
8917 * inferiors.c (for_each_inferior_with_data): New function.
8918 (get_first_thread): New function.
8919 (find_thread_ptid): Simplify.
8920 (get_first_inferior): New function.
8921 (clear_list): Delete.
8922 (one_inferior_p): New function.
8923 (clear_inferior_list): New function.
8924 (clear_inferiors): Update.
8925 * inferiors.h (for_each_inferior_with_data): Declare.
8926 (clear_inferior_list): Declare.
8927 (one_inferior_p): Declare.
8928 (get_first_inferior): Declare.
8929 * linux-low.c (linux_wait_for_event): Replace accessing list
8930 implemention details with API function.
8931 * server.c (target_running): Ditto.
8932 (accumulate_file_name_length): New function.
8933 (emit_dll_description): New function.
8934 (handle_qxfer_libraries): Replace accessing list implemention
8935 details with API function.
8936 (handle_qxfer_threads_worker): New function.
8937 (handle_qxfer_threads_proper): Replace accessing list implemention
8938 details with API function.
8939 (handle_query): Ditto.
8940 (visit_actioned_threads_callback_ftype): New typedef.
8941 (visit_actioned_threads_data): New struct.
8942 (visit_actioned_threads): Rewrite to be find_inferior callback.
8943 (resume): Call find_inferior.
8944 (handle_status): Replace accessing list implemention
8945 details with API function.
8946 (process_serial_event): Replace accessing list implemention details
8948 * target.c (set_desired_inferior): Replace accessing list implemention
8949 details with API function.
8950 * tracepoint.c (same_process_p): New function.
8951 (gdb_agent_about_to_close): Replace accessing list implemention
8952 details with API function.
8953 * win32-low.c (child_delete_thread): Replace accessing list
8954 implemention details with API function.
8955 (match_dll_by_basename): New function.
8956 (dll_is_loaded_by_basename): New function.
8957 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8958 details call to dll_is_loaded_by_basename.
8960 2014-02-19 Doug Evans <dje@google.com>
8962 * dll.h (struct dll_info): Add comment.
8963 * gdbthread.h (struct thread_info): Add comment.
8964 (current_ptid): Simplify.
8965 * inferiors.c (add_process): Update.
8966 (remove_process): Update.
8967 * inferiors.h (struct process_info): Rename member "head" to "entry".
8968 * linux-low.c (delete_lwp): Update.
8970 (last_thread_of_process_p): Update.
8971 (kill_one_lwp_callback, linux_kill): Update.
8972 (status_pending_p_callback): Update.
8973 (wait_for_sigstop): Update. Simplify read of ptid.
8974 (start_step_over): Update.
8975 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8976 (get_lwp_thread): Update.
8977 (struct lwp_info): Rename member "head" to "entry".
8978 * regcache.h (inferior_list_entry): Delete.
8979 * server.c (kill_inferior_callback): Update.
8980 (detach_or_kill_inferior_callback): Update.
8981 (print_started_pid): Update.
8982 (print_attached_pid): Update.
8983 (process_serial_event): Simplify read of ptid.
8984 * thread-db.c (thread_db_create_event): Update.
8985 (thread_db_get_tls_address): Update.
8986 * win32-low.c (current_inferior_ptid): Simplify.
8988 2014-02-19 Tom Tromey <tromey@redhat.com>
8990 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8992 (target_supports_btrace): Update.
8994 2014-02-14 Yao Qi <yao@codesourcery.com>
8996 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8997 (rsp-low-ipa.o): New target.
8999 2014-02-12 Tom Tromey <tromey@redhat.com>
9001 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
9002 convert_ascii_to_int.
9003 * regcache.c (registers_to_string): Likewise.
9004 * remote-utils.c (decode_M_packet): Likewise.
9005 * server.c (process_serial_event): Likewise.
9007 2014-02-12 Tom Tromey <tromey@redhat.com>
9009 * server.c (handle_query, handle_v_run): Use hex2bin, not
9011 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
9013 2014-02-12 Tom Tromey <tromey@redhat.com>
9015 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
9016 convert_int_to_ascii.
9017 * regcache.c (registers_to_string, collect_register_as_string):
9019 * remote-utils.c (look_up_one_symbol, relocate_instruction):
9021 * server.c (process_serial_event): Likewise.
9022 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
9023 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
9025 2014-02-12 Tom Tromey <tromey@redhat.com>
9027 * remote-utils.c (look_up_one_symbol, monitor_output): Use
9028 bin2hex, not hexify.
9029 * tracepoint.c (cmd_qtstatus): Likewise.
9031 2014-02-12 Tom Tromey <tromey@redhat.com>
9033 * remote-utils.c (monitor_output): Pass explicit length to
9036 2014-02-12 Tom Tromey <tromey@redhat.com>
9038 * tracepoint.c: Include rsp-low.h.
9039 * server.c: Include rsp-low.h.
9040 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
9041 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
9043 * remote-utils.c: Include rsp-low.h.
9044 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
9045 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
9046 (convert_int_to_ascii, convert_ascii_to_int): Move to
9048 * regcache.c: Include rsp-low.h.
9049 * ax.c: Include rsp-low.h.
9050 * Makefile.in (SFILES): Add common/rsp-low.c.
9051 (OBS): Add rsp-low.o.
9052 (rsp-low.o): New target.
9054 2014-02-12 Tom Tromey <tromey@redhat.com>
9056 * utils.h (pulongest, plongest, phex_nz): Don't declare.
9057 Include print-utils.h.
9058 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
9059 (plongest, thirty_two, phex_nz): Remove.
9060 * Makefile.in (SFILES): Add common/print-utils.c.
9061 (OBS): Add print-utils.o.
9062 (print-utils-ipa.o): New target.
9063 (print-utils.o): New target.
9064 (IPA_OBJS): Add print-utils-ipa.o.
9066 2014-02-06 Tom Tromey <tromey@redhat.com>
9068 * Makefile.in (SFILES): Fix indentation.
9070 2014-02-05 Doug Evans <dje@google.com>
9072 * linux-low.c (linux_wait_for_event): Improve comment.
9073 (linux_wait_1): Keep current_inferior in sync with event_child.
9075 2014-01-22 Doug Evans <dje@google.com>
9077 * gdbthread.h (gdb_id_to_thread): Delete, unused.
9079 2014-01-22 Doug Evans <dje@google.com>
9081 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
9082 * configure: Regenerate.
9083 * config.in: Regenerate.
9084 * Makefile.in (SFILES): Add debug.c.
9086 * debug.c: New file.
9087 * debug.h: New file.
9088 * linux-aarch64-low.c (*): Update all debugging printfs to use
9089 debug_printf instead of fprintf.
9090 * linux-arm-low.c (*): Ditto.
9091 * linux-cris-low.c (*): Ditto.
9092 * linux-crisv32-low.c (*): Ditto.
9093 * linux-m32r-low.c (*): Ditto.
9094 * linux-sparc-low.c (*): Ditto.
9095 * linux-x86.c (*): Ditto.
9096 * linux-low.c (*): Ditto.
9097 (linux_wait_1): Add calls to debug_enter, debug_exit.
9098 (linux_wait): Remove redundant debugging printf.
9099 (stop_all_lwps): Add calls to debug_enter, debug_exit.
9100 (linux_resume, unstop_all_lwps): Ditto.
9101 * mem-break.c (*): Update all debugging printfs to use
9102 debug_printf instead of fprintf.
9103 * remote-utils.c (*): Ditto.
9104 * thread-db.c (*): Ditto.
9105 * server.c #include <ctype.h>, "gdb_vecs.h".
9106 (debug_threads): Moved to debug.c.
9107 (*): Update all debugging printfs to use debug_printf instead of
9109 (start_inferior): Replace call to fflush with call to debug_flush.
9110 (monitor_show_help): Mention set debug-format.
9111 (parse_debug_format_options): New function.
9112 (handle_monitor_command): Handle "monitor set debug-format".
9113 (gdbserver_usage): Mention --debug-format.
9114 (main): Parse --debug-format.
9115 * server.h (debug_threads): Declaration moved to debug.h.
9117 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
9118 trace_debug_1 that uses debug_printf.
9119 (tracepoint_look_up_symbols): Update all debugging printfs to use
9120 debug_printf instead of fprintf.
9122 2014-01-20 Baruch Siach <baruch@tkos.co.il>
9124 * linux-xtensa-low.c: Include asm/ptrace.h instead of
9127 2014-01-17 Pedro Alves <palves@redhat.com>
9130 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
9131 defined after including gdb_proc_service.h.
9133 2014-01-16 Doug Evans <dje@google.com>
9135 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
9136 (match_dll): Use it.
9138 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
9140 * target.h (target_ops) <read_btrace>: Change parameters and
9141 return type to allow error reporting.
9142 * server.c (handle_qxfer_btrace): Support delta reads. Pass
9143 trace reading errors on.
9144 * linux-low.c (linux_low_read_btrace): Pass trace reading
9146 (linux_low_disable_btrace): New.
9148 2014-01-15 Doug Evans <dje@google.com>
9150 * inferiors.c (thread_id_to_gdb_id): Delete.
9151 * inferiors.h (thread_id_to_gdb_id): Delete.
9153 2014-01-13 Eli Zaretskii <eliz@gnu.org>
9155 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
9156 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
9159 2014-01-08 Pedro Alves <palves@redhat.com>
9161 * server.c (handle_status): Don't discard previous queued stop
9162 replies or thread's pending status here.
9163 (main) <disconnection>: Do it here instead.
9165 2014-01-08 Pedro Alves <palves@redhat.com>
9167 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
9168 * server.c (visit_actioned_threads, handle_pending_status): New
9170 (handle_v_cont): Factor out parts to ...
9171 (resume): ... this new function. If in all-stop, and a thread
9172 being resumed has a pending status, report it without actually
9174 (myresume): Adjust to use the new 'resume' function.
9175 (clear_pending_status_callback, set_pending_status_callback)
9176 (find_status_pending_thread_callback): New functions.
9177 (handle_status): Handle the case of multiple threads having
9178 interesting statuses to report. Report threads' real last signal
9179 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
9180 with an interesting thread to report the status for, instead of
9181 always reporting the status of the first thread.
9183 2014-01-01 Joel Brobecker <brobecker@adacore.com>
9185 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
9186 * gdbreplay.c (gdbreplay_version): Likewise.
9188 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
9190 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
9191 iov.iov_len with the real length in use.
9193 2013-12-13 Joel Brobecker <brobecker@adacore.com>
9195 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
9196 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
9197 for all targets that use win32-low.c.
9198 * win32-low.c (win32_ensure_ntdll_loaded): New function.
9199 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9201 2013-12-13 Pedro Alves <palves@redhat.com>
9203 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9204 if equal to TARGET_WAITKIND_LOADED.
9205 * win32-low.c (cached_status): New static global.
9206 (win32_wait): Add declaration.
9207 (do_initial_child_stuff): Flush all initial pending debug events
9208 up to the initial breakpoint.
9209 (win32_wait): If CACHED_STATUS was set, return that instead
9210 of doing a real wait. Remove the code resuming the execution
9211 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9212 during the initial phase. Also remove the code changing
9213 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9214 TARGET_WAITKIND_STOPPED.
9216 2013-12-11 Yao Qi <yao@codesourcery.com>
9218 * notif.c (handle_notif_ack): Return 0 if no notification
9221 2013-11-20 Doug Evans <dje@google.com>
9223 * linux-low.c (linux_set_resume_request): Fix comment.
9225 2013-11-20 Doug Evans <dje@google.com>
9227 * linux-low.c (resume_status_pending_p): Tweak comment.
9229 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9231 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9232 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9233 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9234 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9235 (srv_amd64_regobj): Add amd64-mpx.o.
9236 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9237 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9238 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9239 * i387-fp.c (num_pl_bnd_register) Added constant.
9240 (num_pl_bnd_cfg_registers) Added constant.
9241 (struct i387_xsave) Added reserved area and MPX fields.
9242 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9243 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9245 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9246 (init_registers_amd64_mpx_linux): Declare new function.
9247 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9248 (x86_64_regmap): Add MPX registers.
9249 (x86_linux_read_description): Add MPX case.
9250 (initialize_low_arch): Initialize MPX targets.
9252 2013-11-18 Tom Tromey <tromey@redhat.com>
9254 * configure: Rebuild.
9255 * configure.ac: Don't check for stdlib.h.
9256 * gdbreplay.c: Unconditionally include stdlib.h.
9258 2013-11-18 Tom Tromey <tromey@redhat.com>
9260 * config.in: Rebuild.
9261 * configure: Rebuild.
9262 * configure.ac: Don't use AC_HEADER_DIRENT.
9264 2013-11-18 Tom Tromey <tromey@redhat.com>
9266 * server.h: Don't check HAVE_STRING_H.
9267 * gdbreplay.c: Don't check HAVE_STRING_H.
9268 * configure: Rebuild.
9270 2013-11-18 Tom Tromey <tromey@redhat.com>
9272 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9275 2013-11-08 Tom Tromey <tromey@redhat.com>
9277 * configure, config.in: Rebuild.
9278 * configure.ac: Remove unused configury.
9280 2013-11-08 Tom Tromey <tromey@redhat.com>
9282 * acinclude.m4: Include common.m4, codeset.m4.
9283 * configure, config.in: Rebuild.
9284 * configure.ac: Use GDB_AC_COMMON.
9286 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9288 * linux-s390-low.c (HWCAP_S390_TE): New define.
9289 (s390_arch_setup): Consider the TE field in the HWCAP for
9290 determining 'have_regset_tdb'.
9292 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9295 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9298 2013-10-02 Pedro Alves <palves@redhat.com>
9300 * server.c (process_serial_event): Don't output "GDBserver
9301 exiting" if GDB is connected through stdio.
9302 * target.c (mywait): Likewise, be silent if GDB is connected
9305 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9307 * lynx-low.c (lynx_add_threads_after_attach): New function.
9308 (lynx_attach): Remove call to add_thread. Add call to
9309 lynx_add_threads_after_attach instead.
9311 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9313 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9314 * config.in, configure: Regenerated.
9316 2013-09-18 Yao Qi <yao@codesourcery.com>
9319 * server.c (start_inferior): Clear 'resume_info'.
9321 2013-09-16 Jiong Wang <jiwang@tilera.com>
9323 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9326 2013-09-16 Jiong Wang <jiwang@tilera.com>
9328 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9329 linux-tile-low.o to srv_tgtobj.
9331 2013-09-16 Will Newton <will.newton@linaro.org>
9333 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9336 2013-09-06 Pedro Alves <palves@redhat.com>
9338 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9339 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9340 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9341 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9342 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9343 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9345 2013-09-06 Pedro Alves <palves@redhat.com>
9347 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9348 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9350 2013-09-06 Pedro Alves <palves@redhat.com>
9352 * linux-amd64-ipa.c: Include tracepoint.h.
9353 * linux-i386-ipa.c: Include tracepoint.h.
9355 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9357 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9358 (ps_get_thread_area): New function.
9360 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9362 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9363 (initialize_low_arch): Call init_registers_crisv32 rather than
9364 init_register_crisv32.
9366 2013-09-05 Pedro Alves <palves@redhat.com>
9368 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9370 * hostio.h: ... this new file.
9371 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9372 win32-low.c: Include hostio.h.
9374 2013-09-05 Pedro Alves <palves@redhat.com>
9376 * server.h (gdb_client_data, handler_func, callback_handler_func)
9377 (delete_file_handler, add_file_handler, append_callback_event)
9378 (delete_callback_event, start_event_loop, initialize_event_loop):
9379 Move to event-loop.h and include it.
9380 * event-loop.h: New file.
9382 2013-09-05 Pedro Alves <palves@redhat.com>
9384 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9385 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9386 (loaded_dll, unloaded_dll): Move to ...
9387 * dll.h: ... this new file.
9388 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9390 2013-09-05 Pedro Alves <palves@redhat.com>
9392 * server.h (current_process, get_thread_process, all_processes)
9393 (add_inferior_to_list, for_each_inferior, current_inferior)
9394 (remove_inferior, add_process, remove_process, find_process_pid)
9395 (have_started_inferiors_p, have_attached_inferiors_p)
9396 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9397 (clear_inferiors, find_inferior, find_inferior_id)
9398 (inferior_target_data, set_inferior_target_data)
9399 (inferior_regcache_data, set_inferior_regcache_data): Move to
9400 inferiors.h, and include it.
9401 * inferiors.h: New file.
9403 2013-09-05 Pedro Alves <palves@redhat.com>
9405 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9409 2013-09-05 Pedro Alves <palves@redhat.com>
9411 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9413 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9414 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9415 (handle_tracepoint_general_set, handle_tracepoint_query)
9416 (tracepoint_finished_step, tracepoint_was_hit)
9417 (release_while_stepping_state_list, current_traceframe)
9418 (in_readonly_region, traceframe_read_mem)
9419 (fetch_traceframe_registers, traceframe_read_sdata)
9420 (traceframe_read_info, struct fast_tpoint_collect_status)
9421 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9422 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9423 (supply_fast_tracepoint_registers)
9424 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9425 (ipa_tdesc, claim_trampoline_space)
9426 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9427 (agent_mem_read, agent_get_trace_state_variable_value)
9428 (agent_set_trace_state_variable_value, agent_tsv_read)
9429 (agent_mem_read_string, get_raw_reg_func_addr)
9430 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9431 * tracepoint.h: ... this new file.
9433 2013-09-05 Pedro Alves <palves@redhat.com>
9435 * server.h (perror_with_name, error, fatal, warning, paddress)
9436 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9438 * utils.h: New file.
9440 2013-09-05 Pedro Alves <palves@redhat.com>
9442 * server.h (remote_debug, noack_mode, transport_is_reliable)
9443 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9444 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9445 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9446 (write_enn, initialize_async_io, enable_async_io)
9447 (disable_async_io, check_remote_input_interrupt_request)
9448 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9449 (dead_thread_notify, prepare_resume_reply)
9450 (decode_address_to_semicolon, decode_address, decode_m_packet)
9451 (decode_M_packet, decode_X_packet, decode_xfer_write)
9452 (decode_search_memory_packet, unhexify, hexify)
9453 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9454 (look_up_one_symbol, relocate_instruction)
9455 (monitor_output): Move to remote-utils.h, and include it.
9456 * remote-utils.h: New file.
9458 2013-09-05 Pedro Alves <palves@redhat.com>
9460 * server.h (_): Delete.
9462 2013-09-02 Pedro Alves <palves@redhat.com>
9464 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9465 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9467 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9469 2013-09-02 Pierre Muller <muller@sourceware.org>
9471 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9472 or WriteProcessMemory complete successfully and handle
9473 ERROR_PARTIAL_COPY error.
9475 2013-09-02 Pedro Alves <palves@redhat.com>
9477 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9478 error instead of EIO.
9480 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9483 * linux-low.c: Include filestuff.h.
9484 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9485 * lynx-low.c: Include filestuff.h.
9486 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9487 * server.c: Include filestuff.h.
9488 (main): Call notice_open_fds.
9489 * spu-low.c: Include filestuff.h.
9490 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9492 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9494 * Makefile.in: Explain why ../target and ../nat are not
9495 listed as include file search paths.
9496 (linux-waitpid.o): New object file rule.
9497 * configure.srv (srv_native_linux_obj): New variable.
9498 Replace all occurrences of linux native object files with
9499 $srv_native_linux_obj.
9500 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9501 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9502 (linux_enable_event_reporting): Remove declaration.
9503 (my_waitpid): Moved to common/linux-waitpid.c.
9504 (linux_wait_for_event): Pass ptid when calling
9505 linux_enable_event_reporting.
9506 (linux_supports_tracefork_flag): Remove.
9507 (linux_enable_event_reporting): Likewise.
9508 (linux_tracefork_grandchild): Remove.
9509 (STACK_SIZE): Moved to common/linux-ptrace.c.
9510 (linux_tracefork_child): Remove.
9511 (linux_test_for_tracefork): Remove.
9512 (linux_look_up_symbols): Call linux_supports_traceclone.
9513 (initialize_low): Remove call to linux_test_for_tracefork.
9514 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9515 common/linux-ptrace.h.
9516 (PTRACE_TYPE_ARG4): Likewise.
9517 Include linux-ptrace.h.
9519 2013-08-21 Pedro Alves <palves@redhat.com>
9521 * config.in: Renegerate.
9523 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9525 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9526 (SFILES): Remove $(srcdir)/common/target-common.c and
9527 add $(srcdir)/target/waitstatus.c.
9528 (OBS): Remove target-common.o and add waitstatus.o.
9529 (server_h): Remove $(srcdir)/../common/target-common.h and
9530 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9531 and $(srcdir)/../target/waitstatus.h.
9532 (target-common.o): Remove.
9533 (waitstatus.o): New target object file.
9534 * target.h: Do not include target-common.h and
9535 include target/resume.h, target/wait.h and
9536 target/waitstatus.h.
9538 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9540 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9541 to PTRACE_TYPE_ARG3.
9542 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9543 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9545 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9546 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9548 2013-07-27 Jie Zhang <jie@codesourcery.com>
9549 Daniel Jacobowitz <dan@codesourcery.com>
9550 Yao Qi <yao@codesourcery.com>
9552 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9553 (mips-linux-watch.o): New rule.
9554 (mips_linux_watch_h): New variable.
9555 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9557 * linux-mips-low.c: Include mips-linux-watch.h.
9558 (struct arch_process_info, struct arch_lwp_info): New.
9559 (update_watch_registers_callback): New function.
9560 (mips_linux_new_process, mips_linux_new_thread) New functions.
9561 (mips_linux_prepare_to_resume, mips_insert_point): New
9563 (mips_remove_point, mips_stopped_by_watchpoint): New
9565 (rsp_bp_type_to_target_hw_bp_type): New function.
9566 (mips_stopped_data_address): New function.
9567 (the_low_target): Add watchpoint support functions.
9569 2013-07-27 Yao Qi <yao@codesourcery.com>
9571 * i386-low.c: Include break-common.h.
9572 (enum target_hw_bp_type): Remove.
9574 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9576 * Makefile.in (SFILES): /common/target-common.c.
9577 (OBS): Add target-common.o.
9578 (server_h): Add $(srcdir)/../common/target-common.h.
9579 (target-common.o): New target.
9580 * server.c (queue_stop_reply_callback): Free
9581 status string after use.
9582 * target.c (target_waitstatus_to_string): Remove.
9583 * target.h: Include target-common.h.
9584 (resume_kind): Likewise.
9585 (target_waitkind): Likewise.
9586 (target_waitstatus): Likewise.
9587 (TARGET_WNOHANG): Likewise.
9589 2013-07-04 Yao Qi <yao@codesourcery.com>
9591 * Makefile.in (host_alias): Use @host_noncanonical@.
9592 (target_alias): Use @target_noncanonical@.
9593 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9594 ACX_NONCANONICAL_HOST.
9595 * configure: Regenerated.
9598 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9600 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9601 * configure: Rebuild.
9602 * Makefile.in (version_host, version_target): Get from configure.
9603 (version.c): Use $(version_host) and $(version_target).
9605 2013-07-03 Pedro Alves <palves@redhat.com>
9607 * Makefile.in (config.status): Depend on development.sh.
9608 * acinclude.m4: Include libmcheck.m4.
9609 * configure: Regenerate.
9611 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9613 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9614 attribute inside the parentheses.
9615 (winapi_DebugSetProcessKillOnExit): Ditto.
9616 (winapi_DebugBreakProcess): Ditto.
9617 (winapi_GenerateConsoleCtrlEvent): Ditto.
9619 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9621 * notif.h (notif_event): Add a dummy member to avoid compiler
9624 2013-07-01 Pedro Alves <palves@redhat.com>
9626 * hostio.c (HOSTIO_PATH_MAX): Define.
9627 (require_filename, handle_open, handle_unlink, handle_readlink):
9630 2013-07-01 Pedro Alves <palves@redhat.com>
9632 * server.h: Include "pathmax.h".
9633 * linux-low.c: Don't include sys/param.h.
9634 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9636 * win32-low.c: Don't include sys/param.h.
9637 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9639 2013-07-01 Pedro Alves <palves@redhat.com>
9641 * event-loop.c: Don't check HAVE_UNISTD_H before including
9643 * gdbreplay.c: Likewise.
9644 * remote-utils.c: Likewise.
9645 * server.c: Likewise.
9646 * configure.ac: Don't check for unistd.h.
9647 * configure: Regenerate.
9649 2013-06-28 Tom Tromey <tromey@redhat.com>
9651 * Makefile.in (version.c): Use version.in, not
9654 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9656 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9657 * configure: Rebuild.
9658 * Makefile.in (version_host, version_target): Get from configure.
9659 (version.c): Use $(version_host) and $(version_target).
9661 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9663 Fix trace-status to output user name without trailing colon.
9664 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9666 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9668 Fix trace-status to output proper start-time and stop-time.
9669 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9670 output start time and stop time in hex as gdb expects.
9672 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9674 * tracepoint.c (build_traceframe_info_xml): Output trace state
9675 variables present in the trace buffer.
9677 2013-06-24 Tom Tromey <tromey@redhat.com>
9679 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9681 (version.o): Remove.
9682 * gdbreplay.c: Include version.h.
9683 (version, host_name): Don't declare.
9684 * server.h: Include version.h.
9685 (version, host_name): Don't declare.
9687 2013-06-12 Pedro Alves <palves@redhat.com>
9689 * linux-x86-low.c (linux_is_elf64): Delete global.
9690 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9691 with local linux_pid_exe_is_elf_64_file use.
9693 2013-06-11 Pedro Alves <palves@redhat.com>
9695 * linux-low.c (regset_disabled, disable_regset): New functions.
9696 (regsets_fetch_inferior_registers)
9697 (regsets_store_inferior_registers): Use them.
9698 (initialize_regsets_info); Don't allocate the disabled_regsets
9700 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9703 2013-06-11 Pedro Alves <palves@redhat.com>
9705 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9708 2013-06-11 Pedro Alves <palves@redhat.com>
9710 * linux-x86-low.c (initialize_low_arch): Call
9711 init_registers_x32_avx_linux.
9713 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9715 Fix compatibility with Android Bionic.
9716 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9719 2013-06-07 Pedro Alves <palves@redhat.com>
9722 * Makefile.in (OBS): Add tdesc.o.
9723 (IPA_OBJS): Add tdesc-ipa.o.
9724 (tdesc-ipa.o): New rule.
9725 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9727 * linux-low.c (new_inferior): Delete.
9728 (disabled_regsets, num_regsets): Delete.
9729 (linux_add_process): Adjust to set the new per-process
9731 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9732 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9733 was a stop. When calling arch_setup, switch the current inferior
9734 to the thread that got an event.
9735 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9736 (regsets_fetch_inferior_registers)
9737 (regsets_store_inferior_registers): New regsets_info parameter.
9739 (linux_register_in_regsets): New regs_info parameter. Adjust to
9741 (register_addr, fetch_register, store_register): New usrregs_info
9742 parameter. Adjust to use it.
9743 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9744 parameter regs_info. Adjust to use it.
9745 (linux_fetch_registers): Get the current inferior's regs_info, and
9747 (linux_store_registers): Ditto.
9748 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9749 (initialize_low): Don't initialize the target_regsets here. Call
9750 initialize_low_arch.
9751 * linux-low.h (target_regsets): Delete declaration.
9752 (struct regsets_info): New.
9753 (struct usrregs_info): New.
9754 (struct regs_info): New.
9755 (struct process_info_private) <new_inferior>: New field.
9756 (struct linux_target_ops): Delete the num_regs, regmap, and
9757 regset_bitmap fields. New field regs_info.
9758 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9759 * i387-fp.c (num_xmm_registers): Delete.
9760 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9761 calls to new interface.
9762 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9763 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9764 Infer the number of xmm registers from the regcache's target
9766 * i387-fp.h (num_xmm_registers): Delete.
9767 * inferiors.c (add_thread): Don't install the thread's regcache
9769 * proc-service.c (gregset_info): Fetch the current inferior's
9770 regs_info. Adjust to use it.
9771 * regcache.c: Include tdesc.h.
9772 (register_bytes, reg_defs, num_registers)
9773 (gdbserver_expedite_regs): Delete.
9774 (get_thread_regcache): If the thread doesn't have a regcache yet,
9775 create one, instead of aborting gdbserver.
9776 (regcache_invalidate_one): Rename to ...
9777 (regcache_invalidate_thread): ... this.
9778 (regcache_invalidate_one): New.
9779 (regcache_invalidate): Only invalidate registers of the current
9781 (init_register_cache): Add target_desc parameter, and use it.
9782 (new_register_cache): Ditto. Assert the target description has a
9783 non zero registers_size.
9784 (regcache_cpy): Add assertions. Adjust.
9785 (realloc_register_cache, set_register_cache): Delete.
9786 (registers_to_string, registers_from_string): Adjust.
9787 (find_register_by_name, find_regno, find_register_by_number)
9788 (register_cache_size): Add target_desc parameter, and use it.
9789 (free_register_cache_thread, free_register_cache_thread_one)
9790 (regcache_release, register_cache_size): New.
9791 (register_size): Add target_desc parameter, and use it.
9792 (register_data, supply_register, supply_register_zeroed)
9793 (supply_regblock, supply_register_by_name, collect_register)
9794 (collect_register_as_string, collect_register_by_name): Adjust.
9795 * regcache.h (struct target_desc): Forward declare.
9796 (struct regcache) <tdesc>: New field.
9797 (init_register_cache, new_register_cache): Add target_desc
9799 (regcache_invalidate_thread): Declare.
9800 (regcache_invalidate_one): Delete declaration.
9801 (regcache_release): Declare.
9802 (find_register_by_number, register_cache_size, register_size)
9803 (find_regno): Add target_desc parameter.
9804 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9806 * remote-utils.c: Include tdesc.h.
9807 (outreg, prepare_resume_reply): Adjust.
9808 * server.c: Include tdesc.h.
9809 (gdbserver_xmltarget): Delete declaration.
9810 (get_features_xml, process_serial_event): Adjust.
9811 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9813 (struct process_info) <tdesc>: New field.
9814 (ipa_tdesc): Declare.
9815 * tdesc.c: New file.
9816 * tdesc.h: New file.
9817 * tracepoint.c: Include tdesc.h.
9818 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9819 (get_context_regcache): Adjust to pass ipa_tdesc down.
9820 (do_action_at_tracepoint): Adjust to get the register cache size
9821 from the context regcache's description.
9822 (traceframe_walk_blocks): Adjust to get the register cache size
9823 from the current trace frame's description.
9824 (traceframe_get_pc): Adjust to get current trace frame's
9825 description and pass it down.
9826 (gdb_collect): Adjust to get the register cache size from the
9828 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9829 (gdbserver_xmltarget): Delete.
9830 (initialize_low_tracepoint): Set the ipa's target description.
9831 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9832 (initialize_low_tracepoint): Set the ipa's target description.
9833 * linux-x86-low.c: Include tdesc.h.
9834 [__x86_64__] (is_64bit_tdesc): New.
9835 (ps_get_thread_area, x86_get_thread_area): Use it.
9836 (i386_cannot_store_register): Rename to ...
9837 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9838 (i386_cannot_fetch_register): Rename to ...
9839 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9840 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9842 (target_regsets): Rename to ...
9843 (x86_regsets): ... this.
9844 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9846 (x86_siginfo_fixup): Use is_64bit_tdesc.
9847 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9848 (tdesc_x32_avx_linux, tdesc_x32_linux)
9849 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9851 (x86_linux_update_xmltarget): Delete.
9852 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9853 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9854 (AMD64_LINUX_USER64_CS): New.
9855 (x86_linux_read_description): New, based on
9856 x86_linux_update_xmltarget.
9857 (same_process_callback): New.
9858 (x86_arch_setup_process_callback): New.
9859 (x86_linux_update_xmltarget): New.
9860 (x86_regsets_info): New.
9861 (amd64_linux_regs_info): New.
9862 (i386_linux_usrregs_info): New.
9863 (i386_linux_regs_info): New.
9864 (x86_linux_regs_info): New.
9865 (x86_arch_setup): Reimplement.
9866 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9867 (x86_emit_ops): Ditto.
9868 (the_low_target): Adjust. Install x86_linux_regs_info,
9869 x86_cannot_fetch_register, and x86_cannot_store_register.
9870 (initialize_low_arch): New.
9871 * linux-ia64-low.c (tdesc_ia64): Declare.
9872 (ia64_fetch_register): Adjust.
9873 (ia64_usrregs_info, regs_info): New globals.
9874 (ia64_regs_info): New function.
9875 (the_low_target): Adjust.
9876 (initialize_low_arch): New function.
9877 * linux-sparc-low.c (tdesc_sparc64): Declare.
9878 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9880 (sparc_arch_setup): New function.
9881 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9882 (the_low_target): Adjust.
9883 (initialize_low_arch): New function.
9884 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9885 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9886 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9887 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9888 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9889 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9890 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9891 (tdesc_powerpc_isa205_vsx64l): Declare.
9892 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9893 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9894 (ppc_set_pc, ppc_get_hwcap): Adjust.
9895 (ppc_usrregs_info): Forward declare.
9896 (!__powerpc64__) ppc_regmap_adjusted: New global.
9897 (ppc_arch_setup): Adjust to the current process'es target
9899 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9900 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9901 (ppc_store_evrregset): Adjust.
9902 (target_regsets): Rename to ...
9903 (ppc_regsets): ... this, and make static.
9904 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9905 (ppc_regs_info): New function.
9906 (the_low_target): Adjust.
9907 (initialize_low_arch): New function.
9908 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9909 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9910 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9911 (tdesc_s390x_linux64v2): Declare.
9912 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9913 (s390_fill_gregset, s390_store_last_break): Adjust.
9914 (target_regsets): Rename to ...
9915 (s390_regsets): ... this, and make static.
9916 (s390_get_pc, s390_set_pc): Adjust.
9917 (s390_get_hwcap): New target_desc parameter, and use it.
9918 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9919 (s390_arch_setup): Adjust to set the current process'es target
9920 description. Don't adjust the regmap.
9921 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9922 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9923 (regs_info_3264): New globals.
9924 (s390_regs_info): New function.
9925 (the_low_target): Adjust.
9926 (initialize_low_arch): New function.
9927 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9928 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9929 [__mips64] (init_registers_mips_linux)
9930 (init_registers_mips_dsp_linux): Delete defines.
9931 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9932 (have_dsp): New global.
9933 (mips_read_description): New, based on mips_arch_setup.
9934 (mips_arch_setup): Reimplement.
9935 (get_usrregs_info): New function.
9936 (mips_cannot_fetch_register, mips_cannot_store_register)
9937 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9938 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9939 (target_regsets): Rename to ...
9940 (mips_regsets): ... this, and make static.
9941 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9942 (dsp_regs_info, regs_info): New globals.
9943 (mips_regs_info): New function.
9944 (the_low_target): Adjust.
9945 (initialize_low_arch): New function.
9946 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9947 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9949 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9950 (arm_read_description): New, with bits factored from
9952 (arm_arch_setup): Reimplement.
9953 (target_regsets): Rename to ...
9954 (arm_regsets): ... this, and make static.
9955 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9956 (arm_regs_info): New function.
9957 (the_low_target): Adjust.
9958 (initialize_low_arch): New function.
9959 * linux-m68k-low.c (tdesc_m68k): Declare.
9960 (target_regsets): Rename to ...
9961 (m68k_regsets): ... this, and make static.
9962 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9963 (m68k_regs_info): New function.
9964 (m68k_arch_setup): New function.
9965 (the_low_target): Adjust.
9966 (initialize_low_arch): New function.
9967 * linux-sh-low.c (tdesc_sharch): Declare.
9968 (target_regsets): Rename to ...
9969 (sh_regsets): ... this, and make static.
9970 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9971 (sh_regs_info, sh_arch_setup): New functions.
9972 (the_low_target): Adjust.
9973 (initialize_low_arch): New function.
9974 * linux-bfin-low.c (tdesc_bfin): Declare.
9975 (bfin_arch_setup): New function.
9976 (bfin_usrregs_info, regs_info): New globals.
9977 (bfin_regs_info): New function.
9978 (the_low_target): Adjust.
9979 (initialize_low_arch): New function.
9980 * linux-cris-low.c (tdesc_cris): Declare.
9981 (cris_arch_setup): New function.
9982 (cris_usrregs_info, regs_info): New globals.
9983 (cris_regs_info): New function.
9984 (the_low_target): Adjust.
9985 (initialize_low_arch): New function.
9986 * linux-cris-low.c (tdesc_crisv32): Declare.
9987 (cris_arch_setup): New function.
9988 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9989 (cris_regs_info): New function.
9990 (the_low_target): Adjust.
9991 (initialize_low_arch): New function.
9992 * linux-m32r-low.c (tdesc_m32r): Declare.
9993 (m32r_arch_setup): New function.
9994 (m32r_usrregs_info, regs_info): New globals.
9995 (m32r_regs_info): Adjust.
9996 (initialize_low_arch): New function.
9997 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9998 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9999 (tic6x_usrregs_info): Forward declare.
10000 (tic6x_read_description): New function, based on ...
10001 (tic6x_arch_setup): ... this. Reimplement.
10002 (target_regsets): Rename to ...
10003 (tic6x_regsets): ... this, and make static.
10004 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
10005 (tic6x_regs_info): New function.
10006 (the_low_target): Adjust.
10007 (initialize_low_arch): New function.
10008 * linux-xtensa-low.c (tdesc_xtensa): Declare.
10009 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
10010 (target_regsets): Rename to ...
10011 (xtensa_regsets): ... this, and make static.
10012 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
10014 (xtensa_arch_setup, xtensa_regs_info): New functions.
10015 (the_low_target): Adjust.
10016 (initialize_low_arch): New function.
10017 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
10018 (nios2_arch_setup): Set the current process'es tdesc.
10019 (target_regsets): Rename to ...
10020 (nios2_regsets): ... this.
10021 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
10022 (nios2_regs_info): New function.
10023 (the_low_target): Adjust.
10024 (initialize_low_arch): New function.
10025 * linux-aarch64-low.c (tdesc_aarch64): Declare.
10026 (aarch64_arch_setup): Set the current process'es tdesc.
10027 (target_regsets): Rename to ...
10028 (aarch64_regsets): ... this.
10029 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
10030 (aarch64_regs_info): New function.
10031 (the_low_target): Adjust.
10032 (initialize_low_arch): New function.
10033 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
10035 (target_regsets): Rename to ...
10036 (tile_regsets): ... this.
10037 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
10038 (tile_regs_info): New function.
10039 (tile_arch_setup): Set the current process'es tdesc.
10040 (the_low_target): Adjust.
10041 (initialize_low_arch): New function.
10042 * spu-low.c (tdesc_spu): Declare.
10043 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
10044 * win32-arm-low.c (tdesc_arm): Declare.
10045 (arm_arch_setup): New function.
10046 (the_low_target): Install arm_arch_setup instead of
10047 init_registers_arm.
10048 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
10049 (init_windows_x86): Rename to ...
10050 (i386_arch_setup): ... this. Set `win32_tdesc'.
10051 (the_low_target): Adjust.
10052 * win32-low.c (win32_tdesc): New global.
10053 (child_add_thread): Don't create the thread cache here.
10054 (do_initial_child_stuff): Set the new process'es tdesc.
10055 * win32-low.h (struct target_desc): Forward declare.
10056 (win32_tdesc): Declare.
10057 * lynx-i386-low.c (tdesc_i386): Declare global.
10058 (lynx_i386_arch_setup): Set `lynx_tdesc'.
10059 * lynx-low.c (lynx_tdesc): New global.
10060 (lynx_add_process): Set the new process'es tdesc.
10061 * lynx-low.h (struct target_desc): Forward declare.
10062 (lynx_tdesc): Declare global.
10063 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
10064 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
10065 * nto-low.c (nto_tdesc): New global.
10066 (do_attach): Set the new process'es tdesc.
10067 * nto-low.h (struct target_desc): Forward declare.
10068 (nto_tdesc): Declare.
10069 * nto-x86-low.c (tdesc_i386): Declare.
10070 (nto_x86_arch_setup): Set `nto_tdesc'.
10072 2013-06-04 Gary Benson <gbenson@redhat.com>
10074 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
10075 to qSupported response when appropriate.
10076 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
10077 with nonzero-length annex.
10078 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
10079 arguments supplied in annex.
10081 2013-05-31 Doug Evans <dje@google.com>
10084 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
10085 64 bits in 64-cross-32 environment.
10087 2013-05-28 Pedro Alves <palves@redhat.com>
10089 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
10090 (aarch64-without-fpu.c): Delete rule.
10091 * configure.srv (aarch64*-*-linux*): Remove references to
10092 aarch64-without-fpu.o and aarch64-without-fpu.xml.
10093 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
10096 2013-05-24 Pedro Alves <palves@redhat.com>
10098 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
10099 instead of strchr/decode_address. Error if the range isn't split
10100 with a ','. Don't assume there's be a ':' in the action.
10102 2013-05-23 Yao Qi <yao@codesourcery.com>
10103 Pedro Alves <palves@redhat.com>
10105 * linux-low.c (lwp_in_step_range): New function.
10106 (linux_wait_1): If the thread was range stepping and stopped
10107 outside the stepping range, report the stop to GDB. Otherwise,
10108 continue stepping. Add range stepping debug output.
10109 (linux_set_resume_request): Copy the step range from the resume
10110 request to the lwp.
10111 (linux_supports_range_stepping): New.
10112 (linux_target_ops) <supports_range_stepping>: Set to
10113 linux_supports_range_stepping.
10114 * linux-low.h (struct linux_target_ops)
10115 <supports_range_stepping>: New field.
10116 (struct lwp_info) <step_range_start, step_range_end>: New fields.
10117 * linux-x86-low.c (x86_supports_range_stepping): New.
10118 (the_low_target) <supports_range_stepping>: Set to
10119 x86_supports_range_stepping.
10120 * server.c (handle_v_cont): Handle 'r' action.
10121 (handle_v_requests): Append ";r" if the target supports range
10123 * target.h (struct thread_resume) <step_range_start,
10124 step_range_end>: New fields.
10125 (struct target_ops) <supports_range_stepping>:
10127 (target_supports_range_stepping): New macro.
10129 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10131 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
10132 confusion in comment.
10134 2013-05-17 Joel Brobecker <brobecker@adacore.com>
10136 * lynx-low.c (struct process_info_private): New type.
10137 (lynx_add_process): New function.
10138 (lynx_create_inferior, lynx_attach): Replace calls to
10139 add_process by calls to lynx_add_process.
10140 (lynx_resume): If PTID is null, then try using
10141 current_process()->private->last_wait_event_ptid.
10143 (lynx_clear_inferiors): Delete. The contents of that function
10144 has been inlined in lynx_mourn;
10145 (lynx_wait_1): Save the ptid in the process's private data.
10146 (lynx_mourn): Free the process' private data. Replace call
10147 to lynx_clear_inferiors by call to clear_inferiors.
10149 2013-05-17 Yao Qi <yao@codesourcery.com>
10151 * i386-low.c (i386_length_and_rw_bits): Move the comment to
10154 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
10156 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
10157 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
10158 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
10159 PT_TEXT_END_ADDR guards. Update comments.
10160 (linux_target_op) <read_offsets>: Conditionally define to
10161 linux_read_offsets if the target is UCLIBC and if it defines
10162 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
10164 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
10165 Andrew Jenner <andrew@codesourcery.com>
10167 * Makefile.in (SFILES): Add linux-nios2-low.c.
10168 (clean): Add action to delete nios2-linux.c.
10169 (nios2-linux.c): New rule.
10170 * configure.srv: Add nios2*-*-linux*.
10171 * linux-nios2-low.c: New.
10173 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
10175 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
10177 2013-04-25 Hui Zhu <hui@codesourcery.com>
10180 * ax.c (ax_printf): Add fflush.
10182 2013-04-22 Tom Tromey <tromey@redhat.com>
10184 * Makefile.in (SFILES): Add filestuff.c.
10185 (OBS): Add filestuff.o.
10186 (filestuff.o): New target.
10187 * config.in, configure: Rebuild.
10188 * configure.ac: Check for fdwalk, pipe2.
10190 2013-04-17 Pedro Alves <palves@redhat.com>
10192 * configure.ac (USE_THREAD_DB): Delete variable.
10193 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
10194 Don't AC_SUBST USE_THREAD_DB.
10195 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
10196 * config.in, configure: Regenerate.
10198 2013-04-16 Pedro Alves <palves@redhat.com>
10200 * linux-low.h (struct lwp_info) <thread_known>: Move under
10201 the USE_THREAD_DB #ifdef.
10203 2013-04-16 Pedro Alves <palves@redhat.com>
10205 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10206 (linux-low.o): Delete rule.
10207 * linux-low.h: Always include "gdb_thread_db.h" instead of
10208 conditionally including thread_db.h.
10209 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10212 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10214 * Makefile.in (install-only): Fix make install regression.
10216 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10218 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10219 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10221 * gdbserver.1: Remove.
10223 2013-03-22 Pedro Alves <palves@redhat.com>
10225 * linux-low.c (handle_extended_wait): Don't call
10226 linux_enable_event_reporting.
10228 2013-03-15 Tony Theodore <tonyt@logyst.com>
10231 * Makefile.in (SHELL): Use @SHELL@.
10233 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10235 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10238 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10240 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10241 Remove extraneous NULL element.
10243 2013-03-13 Yao Qi <yao@codesourcery.com>
10245 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10246 'V' block in trace frame.
10248 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10250 * target.h (struct target_ops): Add btrace ops.
10251 (target_supports_btrace): New macro.
10252 (target_enable_btrace): New macro.
10253 (target_disable_btrace): New macro.
10254 (target_read_btrace): New macro.
10255 * gdbthread.h (struct thread_info): Add btrace field.
10256 * server.c: Include btrace-common.h.
10257 (handle_btrace_general_set): New function.
10258 (handle_btrace_enable): New function.
10259 (handle_btrace_disable): New function.
10260 (handle_general_set): Call handle_btrace_general_set.
10261 (handle_qxfer_btrace): New function.
10262 (struct qxfer qxfer_packets[]): Add btrace entry.
10263 * inferiors.c (remove_thread): Disable btrace.
10264 * linux-low: Include linux-btrace.h.
10265 (linux_low_enable_btrace): New function.
10266 (linux_low_read_btrace): New function.
10267 (linux_target_ops): Add btrace ops.
10268 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10269 Add srv_linux_btrace=yes.
10270 (x86_64-*-linux*): Add linux-btrace.o.
10271 Add srv_linux_btrace=yes.
10272 * configure.ac: Define HAVE_LINUX_BTRACE.
10273 * config.in: Regenerated.
10274 * configure: Regenerated.
10276 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10278 * server.c (handle_qxfer): Preserve error message if -3 is
10280 (qxfer): Document the -3 return value.
10282 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10284 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10285 (linux_btrace_h): New variable.
10286 (linux-btrace.o): New rule.
10288 2013-03-08 Stan Shebs <stan@codesourcery.com>
10289 Hafiz Abid Qadeer <abidh@codesourcery.com>
10291 * tracepoint.c (trace_buffer_size): New global.
10292 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10293 (init_trace_buffer): Change to one-argument function. Allocate
10294 trace buffer memory.
10295 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10296 handle QTBuffer:size packet.
10297 (cmd_bigqtbuffer_size): New function.
10298 (initialize_tracepoint): Call init_trace_buffer with
10299 DEFAULT_TRACE_BUFFER_SIZE.
10300 * server.c (handle_query): Add QTBuffer:size in the
10303 2013-03-07 Yao Qi <yao@codesourcery.com>
10305 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10306 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10308 (cmd_qtsp): Adjust condition. Do post increment.
10309 Set cur_action and cur_step_action back to 0.
10311 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10314 * linux-low.c (linux_write_memory): Return early success if LEN is
10317 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10319 * configure.srv: Add x86_64-*-cygwin* as target.
10321 2013-02-28 Tom Tromey <tromey@redhat.com>
10323 * configure.ac: Invoke AC_SYS_LARGEFILE.
10324 * configure, config.in: Rebuild.
10326 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10328 * win32-low.c: Throughout, fix format strings and casts of
10329 printf-like functions to avoid type related warnings on all
10331 (get_child_debug_event): Print dwDebugEventCode as hex since
10332 that's how it's usually documented.
10334 2013-02-28 Yao Qi <yao@codesourcery.com>
10336 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10339 2013-02-27 Jiong Wang <jiwang@tilera.com>
10341 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10342 (reg-tilegx32.c): New rule.
10343 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10344 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10345 different register info initializer according to elf class.
10346 (init_registers_tilgx32): New function. The tilegx32 register info
10348 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10349 (tile_store_gregset): Likewise.
10351 2013-02-27 Yao Qi <yao@codesourcery.com>
10353 * server.c (process_point_options): Print debug message when
10354 debug_threads is true.
10356 2013-02-26 Yao Qi <yao@codesourcery.com>
10358 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10360 2013-02-19 Pedro Alves <palves@redhat.com>
10361 Kai Tietz <ktietz@redhat.com>
10365 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10366 instead of strtoul to extract address from packet.
10367 (process_serial_event) <'z'>: Likewise.
10369 2013-02-18 Yao Qi <yao@codesourcery.com>
10371 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10373 2013-02-14 Pedro Alves <palves@redhat.com>
10377 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10378 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10380 2013-02-14 Pedro Alves <palves@redhat.com>
10382 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10384 2013-02-14 Pedro Alves <palves@redhat.com>
10386 * tracepoint.c (save_string): Delete.
10387 (add_tracepoint_action): Use savestring instead of save_string.
10389 2013-02-12 Pedro Alves <palves@redhat.com>
10391 * linux-xtensa-low.c: Ditto.
10392 * xtensa-xtregs.c: Ditto.
10394 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10396 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10399 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10401 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10402 aarch64_num_wp_regs and aarch64_num_bp_regs to
10403 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10405 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10407 * linux-aarch64-low.c (ps_get_thread_area): Replace
10408 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10410 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10411 Marcus Shawcroft <marcus.shawcroft@arm.com>
10412 Nigel Stephens <nigel.stephens@arm.com>
10413 Yufeng Zhang <yufeng.zhang@arm.com>
10415 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10416 (aarch64.c, aarch64-without-fpu.c): New targets.
10417 * configure.srv (aarch64*-*-linux*): New.
10418 * linux-aarch64-low.c: New file.
10420 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10422 * linux-low.c (handle_extended_wait, linux_create_inferior)
10423 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10424 (dequeue_one_deferred_signal, linux_resume_one_thread)
10425 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10426 (linux_tracefork_grandchild, linux_test_for_tracefork)
10427 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10428 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10429 where the argument is 0.
10431 2013-01-25 Yao Qi <yao@codesourcery.com>
10433 * event-loop.c: Include "queue.h".
10434 (gdb_event_p): New typedef.
10435 (struct gdb_event) <next_event>: Remove.
10436 (event_queue): Change to QUEUE(gdb_event_p).
10437 (async_queue_event): Remove.
10438 (gdb_event_xfree): New.
10439 (initialize_event_loop): New.
10440 (process_event): Use API from QUEUE.
10441 (wait_for_event): Likewise.
10442 * server.c (main): Call initialize_event_loop.
10443 * server.h (initialize_event_loop): Declare.
10445 2013-01-18 Yao Qi <yao@codesourcery.com>
10447 * ax.h (struct eval_agent_expr_context): New.
10448 (gdb_eval_agent_expr): Update declaration.
10449 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10450 TFRAME. Add new argument CTX.
10451 * server.h (struct eval_agent_expr_context): Declare.
10452 (agent_mem_read, agent_tsv_read): Update declaration.
10453 (agent_mem_read_string): Likewise.
10454 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10455 (add_traceframe_block): Add new argument TPOINT.
10456 Increase TPOINT->traceframe_usage.
10457 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10458 eval_tracepoint_agent_expr.
10459 (condition_true_at_tracepoint): Likewise.
10460 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10461 (agent_mem_read_string, agent_tsv_read): Likewise.
10463 2013-01-16 Yao Qi <yao@codesourcery.com>
10465 * linux-low.c (linux_resume_one_lwp): Don't check
10466 'lwp->bp_reinsert != 0'.
10468 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10469 Pedro Alves <palves@redhat.com>
10471 * lynx-low.c (ptrace_request_to_str): Define a temporary
10472 macro and use it to simplify this function's implementation.
10474 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10476 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10479 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10481 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10483 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10485 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10487 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10489 * lynx-low.c (lynx_resume): Use the resume_info parameter
10490 to determine the ptid for the lynx_ptrace call, unless
10491 it is equal to minus_one_ptid, in which case we use the
10492 ptid of the current_inferior.
10493 (lynx_wait_1): After having received a thread create/exit
10494 event, resume the inferior's execution using the signaling
10495 thread's ptid, rather than the old ptid.
10497 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10499 * lynx-low.c (lynx_resume): Delete variable ret.
10501 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10503 * gdbreplay.c (gdbreplay_version): Update copyright year.
10504 * server.c (gdbserver_version): Likewise.
10506 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10508 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10511 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10513 * lynx-low.c (ptrace_request_to_str): Add handling for
10514 PTRACE_GETTRACESIG.
10516 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10518 * lynx-low.c (lynx_attach): Delete variable new_process.
10520 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10522 * lynx-low.c (lynx_create_inferior): Delete variable
10525 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10527 * lynx-low.c (ptrace_request_to_str): Do not handle
10528 PTRACE_GETTHREADLIST if this macro does not exist.
10530 2012-12-15 Yao Qi <yao@codesourcery.com>
10532 * Makefile.in (OBS): Add notif.o.
10533 * notif.c, notif.h: New.
10534 * server.c: Include "notif.h".
10535 (struct vstop_notif) <next>: Remove.
10537 (queue_stop_reply): Update.
10538 (push_event, send_next_stop_reply): Remove.
10539 (discard_queued_stop_replies): Update.
10540 (notif_stop): New variable.
10541 (handle_v_stopped): Remove.
10542 (handle_v_requests): Don't call handle_v_stopped. Call
10543 handle_ack_notif instead.
10544 (queue_stop_reply_callback): Call notif_event_enque instead
10545 of queue_stop_reply.
10546 (handle_status): Don't call send_next_stop_reply, call
10547 notif_write_event instead.
10548 (kill_inferior_callback): Likewise.
10549 (detach_or_kill_inferior_callback): Likewise.
10550 (main): Call initialize_notif.
10551 (process_serial_event): Call QUEUE_is_empty.
10552 (handle_target_event): Call notif_push instead of push event.
10553 * server.h (push_event): Remove declaration.
10555 2012-12-10 Tom Tromey <tromey@redhat.com>
10557 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10558 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10561 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10562 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10563 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10564 (amd64-linux-ipa.o, ax.o): Rewrite.
10565 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10566 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10567 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10568 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10569 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10570 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10571 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10572 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10573 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10574 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10575 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10576 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10577 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10578 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10579 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10580 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10581 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10582 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10583 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10584 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10585 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10586 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10587 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10588 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10589 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10590 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10591 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10592 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10593 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10594 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10595 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10596 (reg-tilegx.o): Remove.
10597 (all_object_files): New macro.
10598 Include .deps files.
10599 * aclocal.m4, configure: Rebuild.
10600 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10601 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10602 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10604 2012-12-05 Tom Tromey <tromey@redhat.com>
10607 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10609 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10611 * configure.ac: Check for linux/perf_event.h.
10612 * config.in: Regenerated.
10613 * configure: Regenerated.
10615 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10617 * hostio.c (handle_readlink): Decrease buffer size
10618 parameter passed to readlink by one byte.
10620 2012-11-26 Yao Qi <yao@codesourcery.com>
10622 * configure.ac (build_warnings): Append '-Wempty-body'.
10623 * configure: Regenerated.
10624 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10627 2012-11-15 Pierre Muller <muller@sourceware.org>
10629 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10630 * config.in: Regenerate.
10631 * configure: Regenerate.
10632 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10633 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10634 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10635 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10637 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10638 instead of <sys/wait.h> header.
10639 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10641 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10643 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10644 (various make rules): Remove -DGDBSERVER
10646 2012-11-09 Yao Qi <yao@codesourcery.com>
10648 * spu-low.c (current_ptid): Move it to ..
10649 * gdbthread.h: ... here. New.
10650 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10651 * server.c (myresume, process_serial_event): Likewise.
10652 * thread-db.c (thread_db_find_new_threads): Likewise.
10653 * tracepoint.c (run_inferior_command): Likewise.
10655 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10657 * server.c (handle_search_memory_1): Include access length in
10660 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10662 * linux-crisv32-low.c: Fix compile errors.
10664 2012-09-04 Yao Qi <yao@codesourcery.com>
10666 * tracepoint.c (cmd_qtsv): Adjust debug message.
10667 Don't check CUR_TPOINT.
10669 2012-08-28 Yao Qi <yao@codesourcery.com>
10671 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10672 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10673 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10674 Remove declarations of xmalloc, xreallloc, xstrdup and
10676 * Makefile.in (libiberty_h): New.
10677 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10678 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10680 2012-08-23 Yao Qi <yao@codesourcery.com>
10682 * server.h: Remove declaration of 'xsnprintf'.
10684 2012-08-22 Keith Seitz <keiths@redhat.com>
10686 * server.h: Include build-gnulib-gbserver/config.h.
10687 * gdbreplay.c: Likewise.
10689 2012-08-08 Doug Evans <dje@google.com>
10691 * Makefile.in (SFILES): Add gdb_vecs.c.
10692 (OBS): Add gdb_vecs.o.
10693 (gdb_vecs_h, host_defs_h): New variables.
10694 (thread-db.o): Add $(gdb_vecs_h) dependency.
10695 (gdb_vecs.o): New rule.
10696 * thread-db.c: #include "gdb_vecs.h".
10697 (thread_db_load_search): Use a vector to iterate over path elements.
10698 Handle text appearing after "$pdir".
10700 * configure.ac: Add check for strstr.
10701 * config.in: Regenerate.
10702 * configure: Regenerate.
10704 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10706 * hostio.c (handle_pread): If pread fails, fall back to attempting
10708 (handle_pwrite): Likewise for pwrite.
10710 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10712 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10713 between unsupported TYPE and unimplementable ADDR/LEN combination.
10714 (arm_insert_point): Act on new return value.
10716 2012-07-31 Pedro Alves <palves@redhat.com>
10718 * server.c (process_point_options): Only skip tokens if we find
10719 one that is unrecognized. Don't treat 'X' specially while
10720 skipping unrecognized tokens.
10722 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10724 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10725 to 4-byte-align HW breakpoint addresses for Thumb.
10727 2012-07-27 Yao Qi <yao@codesourcery.com>
10731 * server.h: Declare gdb_agent_about_to_close.
10732 * target.c (kill_inferior): Include "agent.h".
10733 New. Send command 'kill'.
10734 * target.h (kill_inferior): Removed macro.
10735 * tracepoint.c (gdb_agent_about_to_close): New.
10736 (gdb_agent_helper_thread): Handle command 'close'.
10737 Wait endlessly until the inferior stops.
10738 Install gdb_agent_remove_socket to atexit hook.
10739 (agent_socket_name): New static variable.
10740 (gdb_agent_socket_init): Replace local variable 'name' with
10741 'agent_socket_name'.
10742 (gdb_agent_remove_socket): New.
10744 2012-07-27 Yao Qi <yao@codesourcery.com>
10746 * server.c (process_point_options): Stop at 'X' when parsing.
10748 2012-07-19 Michael Eager <eager@eagercon.com>
10750 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10752 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10753 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10754 hardware breakpoint.
10756 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10758 * gdbserver/linux-low.c (initialize_low): Call
10759 linux_ptrace_init_warnings.
10761 2012-07-02 Doug Evans <dje@google.com>
10763 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10766 2012-07-02 Stan Shebs <stan@codesourcery.com>
10768 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10769 (ax.o): Add it to build rule.
10771 (OBS): Add format.o.
10772 (IPA_OBS): Add format.o.
10773 * server.c (handle_query): Claim support for breakpoint commands.
10774 (process_point_options): Add command case.
10775 (process_serial_event): Leave running if there are printfs in
10777 * mem-break.h (any_persistent_commands): Declare.
10778 (add_breakpoint_commands): Declare.
10779 (gdb_no_commands_at_breakpoint): Declare.
10780 (run_breakpoint_commands): Declare.
10781 * mem-break.c (struct point_command_list): New struct.
10782 (struct breakpoint): New field command_list.
10783 (any_persistent_commands): New function.
10784 (add_commands_to_breakpoint): New function.
10785 (add_breakpoint_commands): New function.
10786 (gdb_no_commands_at_breakpoint): New function.
10787 (run_breakpoint_commands): New function.
10788 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10790 * ax.c: Include format.h.
10791 (ax_printf): New function.
10792 (gdb_eval_agent_expr): Add printf opcode.
10794 2012-06-13 Yao Qi <yao@codesourcery.com>
10796 * server.c (start_inferior): Remove duplicated writes to fields
10797 'last_resume_kind' and 'last_status' of 'current_inferior'.
10799 2012-06-12 Yao Qi <yao@codesourcery.com>
10800 Pedro Alves <palves@redhat.com>
10802 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10804 * server.c (handle_v_cont): Extend comment.
10806 2012-06-11 Yao Qi <yao@codesourcery.com>
10808 * linux-low.c (linux_attach): Add 'static'.
10810 2012-06-06 Yao Qi <yao@codesourcery.com>
10812 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10814 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10816 Fix gcc -flto compilation warning.
10817 * server.c (main): Make variable multi_mode and attach volatile.
10819 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10821 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10822 if the platform doesn't know about it.
10824 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10826 * Makefile.in (SFILES): Add linux-tile-low.c.
10827 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10828 * configure.srv: Handle tilegx-*-linux*.
10829 * linux-tile-low.c: New file.
10831 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10833 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10835 2012-05-24 Pedro Alves <palves@redhat.com>
10839 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10841 2012-05-24 Pedro Alves <palves@redhat.com>
10845 Replace target_signal with gdb_signal throughout.
10847 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10849 * linux-low.c (linux_store_registers): Avoid the copying sequence
10850 when no data has been retrieved by ptrace.
10852 2012-05-22 Will Deacon <will.deacon@arm.com>
10854 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10855 Include asm/ptrace.h.
10856 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10859 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10861 * linux-low.c (linux_store_registers): Don't re-retrieve data
10862 with ptrace that has already been obtained from /proc. Always
10863 copy any data retrieved with ptrace to the buffer supplied.
10865 2012-05-11 Yao Qi <yao@codesourcery.com>
10866 Pedro Alves <palves@redhat.com>
10868 * linux-low.c (enum stopping_threads_kind): New.
10869 (stopping_threads): Change type to `enum stopping_threads_kind'.
10870 (handle_extended_wait): If stopping and suspending threads, leave
10871 the new_lwp suspended too.
10872 (linux_wait_for_event): Adjust.
10873 (stop_all_lwps): Set `stopping_threads' to
10874 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10875 whether we're suspending threads or just stopping them. Assert no
10878 2012-04-29 Yao Qi <yao@codesourcery.com>
10880 * server.h: Move some code to ...
10881 * gdbthread.h: ... here. New.
10882 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10883 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10884 (nto-low.o, win32-low.o): Likewise.
10885 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10886 * regcache.c, remote-utils.c, server.c: Likewise.
10887 * target.c, tracepoint.c, win32-low.c: Likewise.
10889 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10891 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10892 (PTRACE_ARG4_TYPE): Likewise.
10893 (PTRACE_XFER_TYPE): Likewise.
10894 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10895 ptrace to PTRACE_ARG3_TYPE.
10896 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10897 (PTRACE_ARG4_TYPE): Likewise.
10898 (PTRACE_XFER_TYPE): Likewise.
10899 (linux_detach_one_lwp): Cast fourth argument of
10900 ptrace to long then PTRACE_ARG4_TYPE.
10901 (regsets_fetch_inferior_registers): Cast third argument of
10902 ptrace to long then PTRACE_ARG3_TYPE.
10903 (regsets_store_inferior_registers): Likewise.
10905 2012-04-20 Pedro Alves <palves@redhat.com>
10907 * configure: Regenerate.
10909 2012-04-19 Pedro Alves <palves@redhat.com>
10911 * Makefile.in (GNULIB_BUILDDIR): New.
10912 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10913 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10914 (all, install-only, uninstall, clean-info, all-lib, clean): No
10915 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10916 (maintainer-clean realclean distclean): Use subdir_do.
10918 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10919 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10920 * acinclude.m4: Include acx_configure_dir.m4.
10921 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10922 calls. Call AC_PROG_RANLIB. Configure gnulib using
10925 (GNULIB_STDINT_H): Adjust.
10926 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10927 * gdbreplay.c: Include build-gnulib/config.h.
10928 * server.h: Likewise.
10929 * aclocal.m4: Regenerate.
10930 * config.in: Regenerate.
10931 * configure: Regenerate.
10933 2012-04-19 Pedro Alves <palves@redhat.com>
10935 * Makefile.in (LIBGNU, INCGNU): Adjust.
10936 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10937 (all, install-only, uninstall, clean-info, all-lib, clean)
10938 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10939 * configure.ac: Adjust AC_OUTPUT output.
10940 * aclocal.m4: Regenerate.
10941 * configure: Regenerate.
10943 2012-04-19 Pedro Alves <palves@redhat.com>
10945 * Makefile.in (generated_files): New.
10946 (server_h): Remove the explicit dependency on config.h, and depend
10947 on $generated_files.
10949 2012-04-19 Pedro Alves <palves@redhat.com>
10951 * Makefile.in (INCGNU): Add -Ignulib.
10953 2012-04-19 Pedro Alves <palves@redhat.com>
10955 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10956 (INCGNU): ... this, and spell out -I here.
10957 (GNULIB_LIB): Rename to ...
10958 (LIBGNU): ... this.
10959 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10961 2012-04-19 Pedro Alves <palves@redhat.com>
10963 * config.in: Regenerate.
10965 2012-04-19 Pedro Alves <palves@redhat.com>
10967 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10968 * server.h (memmem): Remove declaration.
10969 * config.in: Regenerate.
10970 * configure: Regenerate.
10972 2012-04-19 Yao Qi <yao@codesourcery.com>
10974 * Makefile.in (SFILES): Add common/vec.c.
10978 2012-04-19 Yao Qi <yao@codesourcery.com>
10980 * remote-utils.c (prepare_resume_reply): Replace with macro
10981 target_core_of_thread.
10982 * server.c (handle_qxfer_threads_proper): Likewise.
10983 * target.h (traget_core_of_thread): New macro.
10985 2012-04-18 Pedro Alves <palves@redhat.com>
10987 * aclocal.m4: Regenerate.
10988 * configure: Regenerate.
10990 2012-04-16 Yao Qi <yao@codesourcery.com>
10992 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10993 duplicated on address.
10995 2012-04-16 Yao Qi <yao@codesourcery.com>
10997 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10998 (struct tracepoint_action_ops) <send>: New field.
10999 (m_tracepoint_action_send, r_tracepoint_action_send): New.
11000 (agent_expr_send, x_tracepoint_action_send): New.
11001 (l_tracepoint_action_send): New.
11002 (cmd_qtdp): Download and install tracepoint
11003 according to `use_agent'.
11004 (run_inferior_command): Add one more parameter `len'.
11006 (tracepoint_send_agent): New.
11007 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
11009 2012-04-16 Yao Qi <yao@codesourcery.com>
11011 * tracepoint.c (download_tracepoints): Moved to ...
11012 (cmd_qtstart): ... here.
11014 2012-04-14 Yao Qi <yao@codesourcery.com>
11016 * tracepoint.c: Include inttypes.h.
11017 (struct collect_memory_action): Use sized types.
11018 (struct tracepoint): Likewise.
11019 (cmd_qtdp, stop_tracing): Update print specifiers.
11020 (cmd_qtp, response_tracepoint): Likewise.
11021 (collect_data_at_tracepoint): Likewise.
11022 (collect_data_at_step): Likewise.
11024 2012-04-14 Yao Qi <yao@codesourcery.com>
11026 Import gnulib module inttypes.
11027 * aclocal.m4, config.in, configure: Regenerated.
11029 2012-04-14 Yao Qi <yao@codesourcery.com>
11031 * Makefile.in (maintainer-clean, realclean, distclean): Remove
11032 Makefile and config.status at last.
11034 2012-04-13 Yao Qi <yao@codesourcery.com>
11036 * tracepoint.c: Include stdint.h unconditionally.
11038 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11040 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
11041 on BFD_HAVE_SYS_PROCFS_TYPE.
11042 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
11043 * configure: Regenerate.
11044 * config.in: Likewise.
11046 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
11048 * Makefile.in (clean): Also remove x32.c x32-linux.c
11049 x32-avx.c x32-avx-linux.c.
11050 (x32.o): New target.
11052 (x32-linux.o): Likewise.
11053 (x32-linux.c): Likewise.
11054 (x32-avx.o): Likewise.
11055 (x32-avx.c): Likewise.
11056 (x32-avx-linux.o): Likewise.
11057 (x32-avx-linux.c): Likewise.
11059 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
11060 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
11061 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
11062 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
11063 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
11064 i386/x32-avx-linux.xml.
11066 * linux-x86-low.c (init_registers_x32_linux): New prototype.
11067 (init_registers_x32_avx_linux): Likwise.
11068 (x86_linux_update_xmltarget): Call init_registers_x32_linux
11069 or init_registers_x32_avx_linux if linux_is_elf64 is false.
11071 2012-04-13 Pedro Alves <palves@redhat.com>
11073 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
11074 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
11075 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
11076 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
11079 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11081 * linux-x86-low.c (compat_x32_clock_t): New.
11082 (compat_x32_siginfo_t): Likewise.
11083 (compat_x32_siginfo_from_siginfo): Likewise.
11084 (siginfo_from_compat_x32_siginfo): Likewise.
11085 (linux_is_elf64): Likewise.
11086 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
11087 and siginfo_from_compat_x32_siginfo for x32.
11088 (x86_arch_setup): Set linux_is_elf64.
11090 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
11093 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
11095 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
11096 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
11097 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
11098 compatible with process.
11100 2012-04-12 Yao Qi <yao@codesourcery.com>
11102 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
11103 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
11104 (install-only, install-info, clean): Handle sub dir gnulib.
11105 (all-lib, am--refresh): New targets.
11106 (memmem.o): Remove target.
11107 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
11108 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
11109 (AC_REPLACE_FUNCS): Remove memmem.
11110 Invoke gl_INIT and AM_INIT_AUTOMAKE.
11111 (AC_OUTPUT): Generate Makefile in gnulib/.
11112 * aclocal.m4, config.in, configure: Regenerated.
11114 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
11116 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
11118 2012-04-05 Pedro Alves <palves@redhat.com>
11120 -Werror=strict-aliasing
11122 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
11125 2012-04-04 Pedro Alves <palves@redhat.com>
11127 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11128 (sparc_store_gregset_from_stack, sparc_store_gregset)
11129 (sparc_breakpoint_at): Fix formatting.
11131 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
11133 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
11135 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
11136 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
11137 * config.in: Regenerate.
11138 * configure: Likewise.
11140 2012-03-29 Pedro Alves <palves@redhat.com>
11142 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
11143 Correct ptrace arguments.
11145 2012-03-28 Pedro Alves <palves@redhat.com>
11147 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
11148 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
11149 (IA64_FR1_REGNUM): New defines.
11150 (ia64_fetch_register): New.
11151 (the_low_target): Install it.
11152 * linux-low.h (struct linux_target_ops) <fetch_register>: New
11154 * linux-low.c (linux_fetch_registers): Try the
11155 the_low_target.fetch_register hook first.
11157 * linux-arm-low.c (the_low_target): Adjust.
11158 * linux-bfin-low.c (the_low_target): Adjust.
11159 * linux-cris-low.c (the_low_target): Adjust.
11160 * linux-crisv32-low.c (the_low_target): Adjust.
11161 * linux-m32r-low.c (the_low_target): Adjust.
11162 * linux-m68k-low.c (the_low_target): Adjust.
11163 * linux-mips-low.c (the_low_target): Adjust.
11164 * linux-ppc-low.c (the_low_target): Adjust.
11165 * linux-s390-low.c (the_low_target): Adjust.
11166 * linux-sh-low.c (the_low_target): Adjust.
11167 * linux-sparc-low.c (the_low_target): Adjust.
11168 * linux-tic6x-low.c (the_low_target): Adjust.
11169 * linux-x86-low.c (the_low_target): Adjust.
11170 * linux-xtensa-low.c (the_low_target): Adjust.
11172 2012-03-26 Pedro Alves <palves@redhat.com>
11174 * server.c (handle_qxfer_libraries): Don't bail early if
11175 the_target->qxfer_libraries_svr4 is not NULL.
11177 2012-03-26 Pedro Alves <palves@redhat.com>
11179 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
11181 2012-03-23 Pedro Alves <palves@redhat.com>
11183 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
11184 "library-list-svr4" element's start tag when the the DSO list is
11187 2012-03-23 Pedro Alves <palves@redhat.com>
11189 * linux-low.c (read_one_ptr): Read the inferior's pointer through
11190 a variable whose type size is the same as the inferior's pointer
11193 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
11195 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
11197 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
11198 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
11199 * linux-low.h: Include <signal.h>.
11200 (struct siginfo): Remove forward declaration.
11201 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11204 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11206 * .gitignore: Ignore more files.
11208 2012-03-19 Pedro Alves <palves@redhat.com>
11209 Jan Kratochvil <jan.kratochvil@redhat.com>
11211 * server.c (cont_thread, general_thread): Add describing comments.
11212 (start_inferior): Clear `cont_thread'.
11213 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11216 2012-03-15 Yao Qi <yao@codesourcery.com>
11218 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11220 (cmd_qtdp): ... here.
11222 2012-03-15 Yao Qi <yao@codesourcery.com>
11224 * tracepoint.c (struct tracepoint_action_ops): New.
11225 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11226 (m_tracepoint_action_download): New.
11227 (r_tracepoint_action_download): New.
11228 (x_tracepoint_action_download): New.
11229 (l_tracepoint_action_download): New.
11230 (add_tracepoint_action): Install `action->ops' according type.
11231 (download_tracepoint_1): Move code `download' function pointer
11232 of various tracepoint_action_ops.
11234 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11236 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11237 linux_ptrace_attach_warnings.
11239 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11241 * Makefile.in (linux-ptrace.o): New.
11242 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11243 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11244 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11245 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11246 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11248 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11250 2012-03-08 Yao Qi <yao@codesourcery.com>
11251 Pedro Alves <palves@redhat.com>
11253 Fix PR server/13392.
11254 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11255 offset of JMP insn.
11256 * tracepoint.c (remove_tracepoint): New.
11257 (cmd_qtdp): Call remove_tracepoint when failed to install.
11259 2012-03-07 Pedro Alves <palves@redhat.com>
11261 * linux-low.c (get_detach_signal): New.
11262 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11263 Pass on pending signals to PTRACE_DETACH. Check the result of the
11265 * server.c (program_signals, program_signals_p): New.
11266 (handle_general_set): Handle QProgramSignals.
11267 * server.h (program_signals, program_signals_p): Declare.
11269 2012-03-05 Pedro Alves <palves@redhat.com>
11270 Jan Kratochvil <jan.kratochvil@redhat.com>
11272 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11275 2012-03-03 Yao Qi <yao@codesourcery.com>
11277 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11278 agent_look_up_symbols.
11280 2012-03-03 Yao Qi <yao@codesourcery.com>
11282 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11283 (linux-x86-low.o): Likewise.
11284 * server.h: Remove in_process_agent_loaded.
11285 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11289 2012-03-03 Yao Qi <yao@codesourcery.com>
11291 * tracepoint.c (gdb_agent_capability): New global.
11292 (in_process_agent_loaded_ust): Renamed to
11293 `in_process_agent_supports_ust'.
11295 (in_process_agent_supports_ust): Call agent_capability_check.
11296 (clear_installed_tracepoints): Assert that agent supports
11299 2012-03-03 Yao Qi <yao@codesourcery.com>
11301 * linux-low.c (linux_supports_agent): New.
11302 (linux_target_ops): Initialize field `supports_agent' with
11303 linux_supports_agent.
11304 * target.h (struct target_ops) <supports_agent>: New.
11305 (target_supports_agent): New macro.
11306 * server.c (handle_general_set): Handle packet 'QAgent'.
11307 (handle_query): Send `QAgent+'.
11308 * Makefile.in (server.o): Depends on agent.h.
11310 2012-03-03 Yao Qi <yao@codesourcery.com>
11312 * Makefile.in (OBS): Add agent.o.
11313 Add new rule for agent.o.
11314 Track dependence of tracepoint.c on agent.h.
11315 * tracepoint.c (run_inferior_command_1):
11316 (run_inferior_command): Call agent_run_command.
11317 (gdb_ust_connect_sync_socket): Deleted. Move it to
11319 (resume_thread, stop_thread): Likewise.
11320 (gdb_ust_socket_init): Renamed to ...
11321 (gdb_agent_socket_init): ... New.
11322 (gdb_ust_thread): Renamed to ...
11323 (gdb_agent_helper_thread): ... New.
11324 (gdb_ust_init): Move some code to ...
11325 (gdb_agent_init): ... here. New.
11326 [HAVE_UST]: Call gdb_ust_init.
11327 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11328 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11329 * config.in, configure: Regenerated.
11331 2012-03-02 Pedro Alves <palves@redhat.com>
11333 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11334 * linux-low.c (struct simple_pid_list): New.
11335 (stopped_pids): New a struct simple_pid_list pointer.
11336 (add_to_pid_list, pull_pid_from_list): New.
11337 (handle_extended_wait): Don't assume the first signal new children
11338 report is SIGSTOP. Adjust call to pull_pid_from_list.
11339 (linux_wait_for_lwp): Adjust.
11341 2012-03-02 Yao Qi <yao@codesourcery.com>
11343 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11346 2012-03-02 Yao Qi <yao@codesourcery.com>
11348 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11349 `stop_pc' and `tpoint'. Update caller.
11351 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11353 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11354 * linux-low.c (use_linux_regsets): New macro.
11355 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11356 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11357 (linux_register_in_regsets): New function.
11358 (usr_fetch_inferior_registers): Skip registers covered by
11360 (usr_store_inferior_registers): Likewise.
11361 (usr_fetch_inferior_registers): New macro.
11362 (usr_store_inferior_registers): Likewise.
11363 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11364 (linux_store_registers): Likewise.
11365 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11367 (init_registers_mips64_dsp_linux): Likewise.
11368 (init_registers_mips_linux): New macro.
11369 (init_registers_mips_dsp_linux): Likewise.
11370 (mips_dsp_num_regs): Likewise.
11371 (DSP_BASE, DSP_CONTROL): New fallback macros.
11372 (mips_base_regs): New macro.
11373 (mips_regmap): Use it. Fix the size.
11374 (mips_dsp_regmap): New variable.
11375 (mips_dsp_regset_bitmap): Likewise.
11376 (mips_arch_setup): New function.
11377 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11379 (mips_cannot_store_register): Likewise.
11380 (the_low_target): Update .arch_setup, .num_regs and .regmap
11381 initializers. Add .regset_bitmap initializer.
11382 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11384 * linux-bfin-low.c (the_low_target): Likewise.
11385 * linux-cris-low.c (the_low_target): Likewise.
11386 * linux-crisv32-low.c (the_low_target): Likewise.
11387 * linux-ia64-low.c (the_low_target): Likewise.
11388 * linux-m32r-low.c (the_low_target): Likewise.
11389 * linux-m68k-low.c (the_low_target): Likewise.
11390 * linux-ppc-low.c (the_low_target): Likewise.
11391 * linux-s390-low.c (the_low_target): Likewise.
11392 * linux-sh-low.c (the_low_target): Likewise.
11393 * linux-sparc-low.c (the_low_target): Likewise.
11394 * linux-tic6x-low.c (the_low_target): Likewise.
11395 * linux-x86-low.c (the_low_target): Likewise.
11396 * linux-xtensa-low.c (the_low_target): Likewise.
11397 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11398 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11399 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11401 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11402 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11404 2012-02-29 Yao Qi <yao@codesourcery.com>
11405 Pedro Alves <palves@redhat.com>
11407 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11408 `step_over_finished' is true.
11410 2012-02-27 Pedro Alves <palves@redhat.com>
11412 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11413 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11415 2012-02-27 Pedro Alves <palves@redhat.com>
11418 * linux-low.c (pid_is_stopped): New.
11419 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11421 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11423 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11426 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11428 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11430 2012-02-24 Luis Machado <lgustavo@codesourcery>
11432 * server.c (handle_query): Advertise support for target-side
11433 breakpoint condition evaluation.
11434 (process_point_options): New function.
11435 (process_serial_event): When inserting a breakpoint, check for
11436 a target-side condition that should be evaluated.
11438 * mem-break.c: Include regcache.h and ax.h.
11439 (point_cond_list_t): New data structure.
11440 (breakpoint) <cond_list>: New field.
11441 (find_gdb_breakpoint_at): Make non-static.
11442 (delete_gdb_breakpoint_at): Clear any target-side
11444 (clear_gdb_breakpoint_conditions): New function.
11445 (add_condition_to_breakpoint): Likewise.
11446 (add_breakpoint_condition): Likewise.
11447 (gdb_condition_true_at_breakpoint): Likewise.
11448 (gdb_breakpoint_here): Return result directly instead
11449 of going through a local variable.
11451 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11452 (clear_gdb_breakpoint_conditions): Likewise.
11453 (add_breakpoint_condition): Likewise.
11454 (gdb_condition_true_at_breakpoint): Likewise.
11456 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11457 (need_step_over_p): Take target-side breakpoint condition into
11460 2012-02-24 Luis Machado <lgustavo@codesourcery>
11462 * server.h: Include tracepoint.h.
11463 (agent_mem_read, agent_get_trace_state_variable_value,
11464 agent_set_trace_state_variable_value,
11465 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11466 get_set_tsv_func_addr): New prototypes.
11468 * ax.h: New include file.
11469 * ax.c: New source file.
11471 * tracepoint.c: Include ax.h.
11472 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11473 agent_expr, eval_result_type): Move to ax.h.
11474 (parse_agent_expr): Rename to ...
11475 (gdb_parse_agent_expr): ... this, make it non-static and move
11477 (unparse_agent_expr) Rename to ...
11478 (gdb_unparse_agent_expr): ... this, make it non-static and move
11480 (eval_agent_expr): Rename to ...
11481 (eval_tracepoint_agent_expr): ... this.
11482 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11483 forward declarations.
11484 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11485 (agent_get_trace_state_variable_value): New function.
11486 (agent_set_trace_state_variable_value): New function.
11487 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11488 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11489 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11490 (condition_true_at_tracepoint): Likewise.
11491 (parse_agent_expr): Rename to ...
11492 (gdb_parse_agent_expr): ... this and move to ax.c.
11493 (unparse_agent_expr): Rename to ...
11494 (gdb_unparse_agent_expr): ... this and move to ax.c.
11495 (gdb_agent_op_name): Move to ax.c.
11496 (eval_agent_expr): Rename to ...
11497 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11499 (eval_tracepoint_agent_expr): New function.
11500 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11502 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11504 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11505 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11506 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11507 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11508 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11509 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11510 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11511 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11512 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11513 (compile_bytecodes): Remove forward declaration.
11514 (is_goto_target): Move to ax.c.
11515 (compile_bytecodes): Move to ax.c and call
11516 agent_get_trace_state_variable_value (...) and
11517 agent_set_trace_state_variable_value (...).
11519 * Makefile.in: Update ax.c and IPA dependencies.
11521 2012-02-24 Pedro Alves <palves@redhat.com>
11523 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11524 (cmd_bigqtbuffer_circular): ... this. Only handle
11525 'QTBuffer:circular:'.
11526 (handle_tracepoint_general_set): Adjust.
11528 2012-02-16 Yao Qi <yao@codesourcery.com>
11530 * inferiors.c: Move code to ...
11531 * dll.c: .... here. New.
11532 * server.h: Declare clear_dlls.
11533 * Makefile.in (SFILES): Add dll.c.
11537 2012-02-11 Yao Qi <yao@codesourcery.com>
11539 * server.c: (handle_monitor_command): Add a new parameter
11541 (handle_query): Update caller.
11543 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11545 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11546 * configure, config.in: Regenerate.
11547 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11550 2012-02-02 Pedro Alves <palves@redhat.com>
11552 Try SIGKILL first, then PTRACE_KILL.
11553 * linux-low.c (linux_kill_one_lwp): New.
11554 (linux_kill_one_lwp): Rename to ...
11555 (kill_one_lwp_callback): ... this. Use the new
11556 linux_kill_one_lwp.
11558 2012-02-02 Pedro Alves <palves@redhat.com>
11560 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11563 2012-01-27 Pedro Alves <palves@redhat.com>
11565 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11566 (elf_64_file_p): Make static.
11567 (linux_pid_exe_is_elf_64_file): New.
11568 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11569 Delete declarations.
11570 (linux_pid_exe_is_elf_64_file): Declare.
11571 * linux-x86-low.c (x86_arch_setup): Use
11572 linux_pid_exe_is_elf_64_file.
11574 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11576 * linux-low.c (linux_wait_for_event_1): Rename to ...
11577 (linux_wait_for_event): ... here and merge it with former
11578 linux_wait_for_event - new variable wait_ptid, use it.
11579 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11581 2012-01-23 Pedro Alves <palves@redhat.com>
11583 * server.c (main): Avoid yet another case of infinite loop while
11584 detaching/killing after a longjmp.
11586 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11589 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11591 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11593 * hostio.c (handle_readlink): New function.
11594 (handle_vFile): Call it to handle "vFile:readlink" packets.
11596 2012-01-20 Pedro Alves <palves@redhat.com>
11597 Ulrich Weigand <ulrich.weigand@linaro.org>
11599 * server.c (handle_v_requests): Only support vAttach and vRun to
11600 start multiple processes when in extended protocol mode.
11602 2012-01-17 Pedro Alves <palves@redhat.com>
11604 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11605 memalign plus mprotect to allocate the scratch buffer.
11607 2012-01-13 Pedro Alves <palves@redhat.com>
11609 * server.c (attach_inferior): Clear `cont_thread'.
11611 2012-01-13 Pedro Alves <palves@redhat.com>
11613 * server.c (main): Avoid infinite loop while detaching/killing
11616 2012-01-09 Doug Evans <dje@google.com>
11618 * server.c (start_inferior): Set last_ptid in --wrapper case.
11620 2012-01-06 Yao Qi <yao@codesourcery.com>
11622 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11624 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11626 2012-01-04 Yao Qi <yao@codesourcery.com>
11628 * tracepoint.c (cmd_qtdp): Print debug message
11629 for static tracepoint.
11631 2012-01-04 Yao Qi <yao@codesourcery.com>
11633 * tracepoint.c (trace_vdebug): Differentiate debug message
11634 between gdbserver and IPA.
11636 2012-01-03 Yao Qi <yao@codesourcery.com>
11638 * tracepoint.c (tracepoint_was_hit): Don't collect for
11641 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11643 * terminal.h: Reformat copyright header.
11645 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11647 * server.c (gdbserver_version): Update copyright year.
11648 * gdbreplay.c (gdbreplay_version): Likewise.
11650 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11652 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11655 2011-12-18 Hui Zhu <teawater@gmail.com>
11656 * linux-low.c (linux_create_inferior): Save return value to ret.
11658 2011-12-18 Hui Zhu <teawater@gmail.com>
11660 * linux-low.c (linux_create_inferior): Save return value to ret.
11662 2011-12-16 Doug Evans <dje@google.com>
11664 * linux-low.c (linux_create_inferior): If stdio connection,
11665 redirect stdin from /dev/null, stdout to stderr.
11666 * remote-utils.c (remote_is_stdio): New static global.
11667 (remote_connection_is_stdio): New function.
11668 (remote_prepare): Handle stdio connection.
11669 (remote_open): Ditto.
11670 (remote_close): Don't close stdin for stdio connections.
11671 (read_prim,write_prim): New functions. Replace all calls to
11672 read/write to these.
11673 * server.c (main): Watch for "-" argument. Move call to
11674 remote_prepare before start_inferior.
11675 * server.h (STDIO_CONNECTION_NAME): New macro.
11676 (remote_connection_is_stdio): Declare.
11678 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11679 in debugging output.
11681 2011-12-15 Yao Qi <yao@codesourcery.com>
11683 * tracepoint.c: Include sys/syscall.h.
11684 (gdb_ust_thread): Remove preprocessor conditional.
11686 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11688 * linux-low.c (linux_detach_one_lwp): Call
11689 the_low_target.prepare_to_resume before detaching.
11691 2011-12-14 Yao Qi <yao@codesourcery.com>
11693 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11696 2011-12-14 Yao Qi <yao@codesourcery.com>
11698 * i386-low.c (i386_low_stopped_data_address): Initialize local
11699 variable `control'.
11701 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11705 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11706 DR_CONTROL unless necessary. Extend comments.
11707 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11708 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11710 2011-12-13 Yao Qi <yao@codesourcery.com>
11712 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11714 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11716 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11718 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11719 Print new debug message for such case.
11721 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11723 Fix overlapping memcpy.
11724 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11725 the read_inferior_memory transfer.
11726 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11727 write_inferior_memory transfer.
11728 (set_fast_tracepoint_jump): New variable buf. Use it for the
11729 read_inferior_memory and write_inferior_memory transfers.
11730 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11731 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11732 Use it for the write_inferior_memory transfer.
11733 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11736 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11738 * linux-low.c (fetch_register, store_register): Make code
11739 consistent, fix formatting.
11741 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11743 * linux-low.c (usr_store_inferior_registers): Factor out code
11744 to handle individual registers into...
11745 (store_register): ... this new function.
11747 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11749 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11750 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11751 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11752 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11753 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11754 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11755 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11756 (srv_xmlfiles): Add new XML files.
11758 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11760 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11761 (init_registers_s390_linux32v1): Add prototype.
11762 (init_registers_s390_linux32v2): Likewise.
11763 (init_registers_s390_linux64v1): Likewise.
11764 (init_registers_s390_linux64v2): Likewise.
11765 (init_registers_s390x_linux64v1): Likewise.
11766 (init_registers_s390x_linux64v2): Likewise.
11767 (s390_num_regs): Increment to 52.
11768 (s390_regmap): Add orig_r2 register.
11769 (s390_num_regs_3264): Increment to 68.
11770 (s390_regmap_3264): Add orig_r2 register.
11771 (s390_collect_ptrace_register): Handle orig_r2 register.
11772 (s390_supply_ptrace_register): Likewise.
11773 (s390_fill_last_break): New function.
11774 (s390_store_last_break): Likewise.
11775 (s390_fill_system_call): New function.
11776 (s390_store_system_call): Likewise.
11777 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11779 (s390_check_regset): New function.
11780 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11781 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11782 Update target_regsets for available register sets.
11784 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11785 Jan Kratochvil <jan.kratochvil@redhat.com>
11787 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11788 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11790 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11791 * linux-low.h (struct process_info_private): New member r_debug.
11792 * server.c (handle_qxfer_libraries): Call
11793 the_target->qxfer_libraries_svr4.
11794 (handle_qxfer_libraries_svr4): New function.
11795 (qxfer_packets): New entry "libraries-svr4".
11796 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11797 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11798 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11799 PACKET_qXfer_libraries_svr4.
11801 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11803 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11804 PSW address/mask between 8-byte and 16-byte formats.
11805 (s390_supply_ptrace_register): Likewise.
11806 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11807 basic addressing mode bit.
11809 2011-11-24 Stan Shebs <stan@codesourcery.com>
11811 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11813 2011-11-17 Stan Shebs <stan@codesourcery.com>
11815 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11816 (tracing_start_time): New global.
11817 (tracing_stop_time): New global.
11818 (tracing_user_name): New global.
11819 (tracing_notes): New global.
11820 (tracing_stop_note): New global.
11821 (cmd_qtstart): Set traceframe_usage, start_time.
11822 (stop_tracing): Set stop_time.
11823 (cmd_qtstatus): Report additional status.
11824 (cmd_qtp): New function.
11825 (handle_tracepoint_query): Call it.
11826 (cmd_qtnotes): New function.
11827 (handle_tracepoint_general_set): Call it.
11828 (get_timestamp): Rename from tsv_get_timestamp.
11830 2011-11-14 Stan Shebs <stan@codesourcery.com>
11831 Kwok Cheung Yeung <kcy@codesourcery.com>
11833 * linux-x86-low.c (small_jump_insn): New.
11834 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11835 trampoline and error message, build a trampoline and issue a small
11836 jump instruction to it.
11837 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11838 trampoline and error message.
11839 (x86_get_min_fast_tracepoint_insn_len): New.
11840 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11841 * linux-low.h (struct linux_target_ops): Add arguments to
11842 install_fast_tracepoint_jump_pad operation, add new operation.
11843 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11845 (linux_get_min_fast_tracepoint_insn_len): New function.
11846 (linux_target_op): Add new operation.
11847 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11848 (gdb_trampoline_buffer_end): Ditto.
11849 (gdb_trampoline_buffer_error): Ditto.
11850 (struct ipa_sym_addresses): Add fields for new IPA variables.
11851 (symbol_list): Add entries for new IPA variables.
11852 (struct tracepoint): Add fields to hold the address range of the
11853 trampoline used by the tracepoint.
11854 (trampoline_buffer_head): New static variable.
11855 (trampoline_buffer_tail): Ditto.
11856 (claim_trampoline_space): New function.
11857 (have_fast_tracepoint_trampoline_buffer): New function.
11858 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11860 (install_fast_tracepoint): Ditto, also add error buffer argument.
11861 (cmd_qtminftpilen): New function.
11862 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11863 (fast_tracepoint_from_trampoline_address): New function.
11864 (fast_tracepoint_collecting): Handle trampoline as part of jump
11866 (set_trampoline_buffer_space): New function.
11867 (initialize_tracepoint): Initialize new IPA variables.
11868 * target.h (struct target_ops): Add arguments to
11869 install_fast_tracepoint_jump_pad operation, add new
11870 get_min_fast_tracepoint_insn_len operation.
11871 (target_get_min_fast_tracepoint_insn_len): New.
11872 (install_fast_tracepoint_jump_pad): Add arguments.
11873 * server.h (IPA_BUFSIZ): Define.
11874 * linux-i386-ipa.c: Include extra header files.
11875 (initialize_fast_tracepoint_trampoline_buffer): New function.
11876 (initialize_low_tracepoint): Call it.
11877 * server.h (set_trampoline_buffer_space): Declare.
11878 (claim_trampoline_space): Ditto.
11879 (have_fast_tracepoint_trampoline_buffer): Ditto.
11881 2011-11-14 Yao Qi <yao@codesourcery.com>
11883 * server.c (handle_query): Handle InstallInTrace for qSupported.
11884 * tracepoint.c (add_tracepoint): Sort list.
11885 (install_tracepoint, download_tracepoint): New.
11886 (cmd_qtdp): Call them to install and download tracepoints.
11887 (sort_tracepoints): Removed.
11888 (cmd_qtstart): Update.
11890 2011-11-14 Yao Qi <yao@codesourcery.com>
11892 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11893 * mem-break.h: Declare.
11894 * tracepoint.c (cmd_qtstart): Move some code to ...
11895 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11897 (download_tracepoints): Move some code to ...
11898 (download_tracepoint_1): ... here. New.
11900 2011-11-08 Yao Qi <yao@codesourcery.com>
11902 * remote-utils.c (relocate_instruction): A comment fix.
11904 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11906 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11907 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11908 dr_status_mirror and dr_control_mirror from debug_reg_state.
11909 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11910 (i386_initial_stuff): Remove use of deleted globals.
11911 (i386_get_thread_context, i386_set_thread_context,
11912 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11913 from debug_reg_state.
11915 2011-11-05 Yao Qi <yao@codesourcery.com>
11917 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11918 address as TPOINT's.
11920 2011-11-02 Stan Shebs <stan@codesourcery.com>
11922 * tracepoint.c (agent_mem_read_string): New function.
11923 (eval_agent_expr): Call it for tracenz.
11924 * server.c (handle_query): Report support for tracenz.
11926 2011-11-02 Yao Qi <yao@codesourcery.com>
11928 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11930 2011-11-02 Yao Qi <yao@codesourcery.com>
11932 * target.h: Fix a typo in comment.
11934 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11936 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11937 clobber the breakpoints' shadows with fast tracepoint jumps.
11938 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11939 * target.c (write_inferior_memory): Also pass MYADDR down to
11942 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11944 * configure.ac: Check support for personality routine.
11945 * configure: Regenerate.
11946 * config.in: Likewise.
11947 * linux-low.c: Include <sys/personality.h>.
11948 Define ADDR_NO_RANDOMIZE if necessary.
11949 (linux_create_inferior): Disable address space randomization when
11950 forking inferior, if requested.
11951 (linux_supports_disable_randomization): New function.
11952 (linux_target_ops): Install it.
11953 * server.h (disable_randomization): Declare.
11954 * server.c (disable_randomization): New global variable.
11955 (handle_general_set): Handle QDisableRandomization.
11956 (handle_query): Likewise for qSupported.
11957 (main): Support --disable-randomization and --no-disable-randomization
11958 command line arguments.
11959 * target.h (struct target_ops): Add supports_disable_randomization.
11960 (target_supports_disable_randomization): New macro.
11962 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11964 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11966 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11967 [!PT_GETDSBT] (target_loadmap): New definition.
11968 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11969 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11970 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11971 and PT_GETDSBT to LINUX_LOADMAP.
11972 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11973 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11975 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11977 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11978 (arm_linux_hwbp_cap): New static variable.
11979 (arm_linux_get_hwbp_cap): Replace by ...
11980 (arm_linux_init_hwbp_cap): ... this new function.
11981 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11982 (arm_linux_get_hw_watchpoint_count): Likewise.
11983 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11984 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11985 (arm_prepare_to_resume): Use perror_with_name instead of error.
11987 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11989 * linux-arm-low.c: Include <signal.h>.
11990 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11991 (struct arm_linux_hwbp_cap): New data type.
11992 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11993 (struct arm_linux_hw_breakpoint): New data type.
11994 (MAX_BPTS, MAX_WPTS): Define.
11995 (struct arch_process_info, struct arch_lwp_info): New data types.
11996 (arm_linux_get_hwbp_cap): New function.
11997 (arm_linux_get_hw_breakpoint_count): Likewise.
11998 (arm_linux_get_hw_watchpoint_count): Likewise.
11999 (arm_linux_get_hw_watchpoint_max_length): Likewise.
12000 (arm_hwbp_control_initialize): Likewise.
12001 (arm_hwbp_control_is_enabled): Likewise.
12002 (arm_hwbp_control_is_initialized): Likewise.
12003 (arm_hwbp_control_disable): Likewise.
12004 (arm_linux_hw_breakpoint_equal): Likewise.
12005 (arm_linux_hw_point_initialize): Likewise.
12006 (struct update_registers_data): New data structure.
12007 (update_registers_callback: New function.
12008 (arm_insert_point): Likewise.
12009 (arm_remove_point): Likewise.
12010 (arm_stopped_by_watchpoint): Likewise.
12011 (arm_stopped_data_address): Likewise.
12012 (arm_new_process): Likewise.
12013 (arm_new_thread): Likewise.
12014 (arm_prepare_to_resume): Likewise.
12015 (the_low_target): Register arm_insert_point, arm_remove_point,
12016 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
12017 arm_new_thread, and arm_prepare_to_resume.
12019 2011-09-15 Stan Shebs <stan@codesourcery.com>
12021 * server.h (struct emit_ops): Add compare-goto fields.
12022 * tracepoint.c (gdb_agent_op_sizes): New table.
12023 (emit_eq_goto): New function.
12024 (emit_ne_goto): New function.
12025 (emit_lt_goto): New function.
12026 (emit_le_goto): New function.
12027 (emit_gt_goto): New function.
12028 (emit_ge_goto): New function.
12029 (is_goto_target): New function.
12030 (compile_bytecodes): Recognize special cases of compare-goto
12031 combinations and call specialized emitters for them.
12032 * linux-x86-low.c (amd64_emit_eq_goto): New function.
12033 (amd64_emit_ne_goto): New function.
12034 (amd64_emit_lt_goto): New function.
12035 (amd64_emit_le_goto): New function.
12036 (amd64_emit_gt_goto): New function.
12037 (amd64_emit_ge_goto): New function.
12038 (amd64_emit_ops): Add the new functions.
12039 (i386_emit_eq_goto): New function.
12040 (i386_emit_ne_goto): New function.
12041 (i386_emit_lt_goto): New function.
12042 (i386_emit_le_goto): New function.
12043 (i386_emit_gt_goto): New function.
12044 (i386_emit_ge_goto): New function.
12045 (i386_emit_ops): Add the new functions.
12047 2011-09-08 Stan Shebs <stan@codesourcery.com>
12049 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
12050 (i386_emit_epilogue): Restore %ebx.
12052 2011-08-31 Jie Zhang <jzhang918@gmail.com>
12054 * server.c (step_thread): Remove definition.
12055 (process_serial_event): Don't handle Hs.
12056 * server.h (step_thread): Remove declaration.
12057 * target.c (set_desired_inferior): Remove use of step_thread.
12059 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12061 * linux-low.c: Include linux-procfs.h.
12062 (linux_attach_lwp_1): Update comments.
12063 (linux_attach): Scan for existing threads when attaching to a
12064 process that is the tgid.
12065 * Makefile.in: Update dependencies.
12067 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
12069 * configure.srv: Add linux-procfs.o dependencies.
12071 2011-08-14 Yao Qi <yao@codesourcery.com>
12073 * target.h (struct target_ops): Fix indent.
12074 * win32-low.c (win32_target_ops): Fix comment.
12076 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
12077 Yao Qi <yao@codesourcery.com>
12079 * Makefile.in (clean): Remove tic6x-*.c files.
12080 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
12081 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
12082 (tic6x-c64xp-linux.c): Likewise.
12083 * configure.srv: Add support for tic6x-*-uclinux.
12084 * linux-tic6x-low.c: New.
12085 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
12087 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
12088 Yao Qi <yao@codesourcery.com>
12090 * target.h (struct target_ops): Add read_loadmap.
12091 * linux-low.c (struct target_loadseg): New type.
12092 (struct target_loadmap): New type.
12093 (linux_read_loadmap): New function.
12094 (linux_target_ops): Add linux_read_loadmap.
12095 * server.c (handle_query): Support qXfer:fdpic:read packet.
12096 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
12099 2011-08-05 Eli Zaretskii <eliz@gnu.org>
12101 * win32-low.c: Include <stdint.h>.
12103 2011-07-22 Pedro Alves <pedro@codesourcery.com>
12105 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
12106 to the inferior here.
12107 (i386_remove_aligned_watchpoint): Ditto.
12108 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
12109 fit part of the watchpoint in the debug registers.
12110 (i386_update_inferior_debug_regs): New.
12111 (i386_low_insert_watchpoint): Work on a local mirror of the debug
12112 registers, and only update the inferior on success.
12113 (i386_low_remove_watchpoint): Ditto.
12115 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
12117 * linux-low.c (compare_ints, unique, list_threads, show_process,
12118 linux_core_of_thread): Delete.
12119 (linux_target_ops): Change linux_core_of_thread to
12120 linux_common_core_of_thread.
12121 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
12122 * utils.c (malloc_failure): Change type of argument.
12123 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
12124 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
12125 common/linux-osdata.c, common/ptid.c and common/buffer.c.
12126 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
12127 (IPA_OBJS): Add common-utils-ipa.o.
12128 (ptid_h, linux_osdata_h): New macros.
12129 (server_h): Add common/common-utils.h, common/xml-utils.h,
12130 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
12132 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
12133 ptid.o, buffer.o): New rules.
12134 (linux-low.o): Add common/linux-osdata.h as a dependency.
12135 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
12136 * configure.ac: Add AC_HEADER_DIRENT check.
12137 * config.in: Regenerate.
12138 * configure: Regenerate.
12139 * remote-utils.c (xml_escape_text): Delete.
12140 (buffer_grow, buffer_free, buffer_init, buffer_finish,
12141 buffer_xml_printf): Move to common/buffer.c.
12142 * server.c (main): Remove call to initialize_inferiors.
12143 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
12144 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
12145 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
12146 internal_error, gdb_assert, gdb_assert_fail): Delete.
12147 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
12148 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
12150 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
12151 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
12152 initialize_inferiors): Delete.
12154 2011-07-20 Pedro Alves <pedro@codesourcery.com>
12156 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
12159 2011-05-31 Pedro Alves <pedro@codesourcery.com>
12161 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
12163 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
12165 2011-05-26 Yao Qi <yao@codesourcery.com>
12167 * Makefile.in (thread-db.o): Track dependence to
12168 common/gdb_thread_db.h.
12169 * thread-db.c: include gdb_thread_db.h from right place.
12171 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
12173 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
12174 __FILE__ and __LINE__ to internal_error.
12176 2011-05-13 Doug Evans <dje@google.com>
12178 * thread-db.c (try_thread_db_load_from_sdir): New function.
12179 (try_thread_db_load_from_dir): New function.
12180 (thread_db_load_search): Handle $sdir, ignore $pdir.
12181 Remove trying of system directories if search of
12182 libthread-db-search-path fails, that is now done via $sdir.
12184 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
12186 * server.c (handle_query): Add EnableDisableTracepoints to the list
12187 of supported features.
12188 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
12190 (cmd_qtenable_disable): New.
12191 (cmd_qtstart): Install tracepoints even if disabled.
12192 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
12193 receiving a QTEnable or QTDisable packet.
12194 (gdb_collect): Skip data collection if fast tracepoint is disabled.
12195 (ust_marker_to_static_tracepoint): Do not ignore disabled static
12197 (gdb_probe): Skip data collection if static tracepoint is disabled.
12199 2011-05-10 Doug Evans <dje@google.com>
12201 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12203 2011-05-04 Doug Evans <dje@google.com>
12205 * linux-low.c (linux_join): Skip process lookup.
12206 * spu-low.c (spu_join): Ditto.
12207 * server.c (join_inferiors_callback): Delete.
12208 (process_serial_event): For 'D' packet (detach) call join_inferior
12211 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12213 * README: Don't mention xscale*-*-linux*.
12214 * configure.srv (xscale*-*-linux*): Don't handle target.
12216 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12218 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12220 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12221 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12222 (i386_emit_void_call_2): Likewise.
12224 2011-04-26 Yao Qi <yao@codesourcery.com>
12226 * linux-low.c: Move common macros to linux-ptrace.h.
12227 Include linux-ptrace.h.
12228 * Makefile.in (linux_ptrace_h): New.
12229 (linux-low.o): Depends on linux-ptrace.h.
12231 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12233 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12234 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12235 (remote_prepare): New function with most of the TCP code from ...
12236 (remote_open): ... here. Detect PORT here unconditionally. Move also
12237 setting transport_is_reliable.
12238 * server.c (run_once): New variable.
12239 (gdbserver_usage): Document it.
12240 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12241 the first run if RUN_ONCE.
12242 * server.h (run_once, remote_prepare): New declarations.
12244 2011-04-19 Tom Tromey <tromey@redhat.com>
12246 * win32-low.c (handle_load_dll): Remove duplicate "the".
12248 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12250 Remove support for old Cygwin 1.5 versions.
12251 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12252 function to avoid warning.
12253 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12256 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12258 * gdbserver/server.h (Macro _): Define it if not available.
12260 2011-03-14 Michael Snyder <msnyder@vmware.com>
12262 * hostio.c (handle_close): Remove unnecessary null test.
12264 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12266 * Makefile.in (maintainer-clean realclean distclean): Remove
12267 "make ... subdir_do" command.
12269 2011-03-10 Michael Snyder <msnyder@vmware.com>
12271 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12273 * server.c (handle_v_run): Free alloced buffer on early return.
12275 2011-03-09 Yao Qi <yao@codesourcery.com>
12278 2011-03-04 Yao Qi <yao@codesourcery.com>
12280 * Makefile.in: Remove GNU make feature --directory.
12282 2011-03-05 Yao Qi <yao@codesourcery.com>
12284 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12285 (subdir_do): New make target. Copied from gdb/Makefile.
12286 (maintainer-clean, realclean, distclean, clean): Call corresponding
12287 make targets in common/Makefile.
12289 2011-02-11 Yao Qi <yao@codesourcery.com>
12291 * configure.ac: Call AC_PROG_RANLIB.
12292 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12293 * configure: Regenerate.
12295 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12297 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12299 2011-03-06 Yao Qi <yao@codesourcery.com>
12301 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12303 2011-03-05 Yao Qi <yao@codesourcery.com>
12305 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12306 (subdir_do): New make target. Copied from gdb/Makefile.
12307 (maintainer-clean, realclean, distclean, clean): Call corresponding
12308 make targets in common/Makefile.
12310 2011-03-04 Yao Qi <yao@codesourcery.com>
12312 * Makefile.in: Remove GNU make feature --directory.
12314 2011-03-04 Michael Snyder <msnyder@vmware.com>
12316 * server.c (queue_stop_reply): Call xmalloc not malloc.
12318 2011-03-02 Michael Snyder <msnyder@vmware.com>
12320 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12322 2011-02-28 Michael Snyder <msnyder@vmware.com>
12324 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12325 (cmd_qtframe): Ditto.
12326 (cmd_qtbuffer): Ditto.
12327 (cmd_bigqtbuffer): Ditto.
12329 * utils.c (decimal2str): Initialize 'width' to nine, then
12330 don't mess with it.
12332 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12334 * hostio.c (require_data): Free *data, not data.
12336 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12338 * hostio.c (require_data): Use free, not xfree.
12340 2011-02-27 Michael Snyder <msnyder@vmware.com>
12342 * server.c (handle_query): Discard unused value.
12344 * hostio.c (require_data): Free malloc memory before returning
12347 2011-02-26 Michael Snyder <msnyder@vmware.com>
12349 * linux-low.c (list_threads): Call closedir for dirent.
12351 2011-02-27 Michael Snyder <msnyder@vmware.com>
12353 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12354 a case statement falls through.
12356 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12358 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12361 2011-02-26 Michael Snyder <msnyder@vmware.com>
12363 * utils.c (decimal2str): Eliminate dead code and dead param.
12364 (pulongest): Drop dead param from call to decimal2str.
12367 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12369 Revert the following patch (not approved yet):
12370 2011-02-21 Hui Zhu <teawater@gmail.com>
12371 * tracepoint.c (tp_printf): New function.
12372 (eval_agent_expr): Handle gdb_agent_op_printf.
12374 2011-02-21 Hui Zhu <teawater@gmail.com>
12376 * tracepoint.c (tp_printf): New function.
12377 (eval_agent_expr): Handle gdb_agent_op_printf.
12379 2011-02-18 Tom Tromey <tromey@redhat.com>
12381 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12382 (tracepoint.o): Likewise.
12383 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12384 (gdb_agent_op_names): Likewise.
12386 2011-02-18 Tom Tromey <tromey@redhat.com>
12388 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12389 gdb_agent_op_rot>: New constants.
12390 (gdb_agent_op_names): Add pick and roll.
12391 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12394 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12396 * aclocal.m4: Regenerated with aclocal-1.11.1.
12398 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12400 * server.c (handle_qxfer_traceframe_info): New.
12401 (qxfer_packets): Register "traceframe-info".
12402 (handle_query): Report support for qXfer:traceframe-info:read+.
12403 * tracepoint.c (match_blocktype): New.
12404 (traceframe_find_block_type): Rename to ...
12405 (traceframe_walk_blocks): ... this. Add callback filter argument,
12407 (traceframe_find_block_type): New, reimplemented on top of
12408 traceframe_walk_blocks.
12409 (build_traceframe_info_xml): New.
12410 (traceframe_read_info): New.
12411 * server.h (traceframe_read_info): Declare.
12413 2011-02-11 Yao Qi <yao@codesourcery.com>
12415 * configure.ac: Call AC_PROG_RANLIB.
12416 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12417 * configure: Regenerate.
12419 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12421 * server.c (gdb_read_memory): Change return semantics to allow
12423 (handle_search_memory_1): Adjust.
12424 (process_serial_event) <'m' packet>: Handle partial transfers.
12425 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12427 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12429 * regcache.c (init_register_cache): Initialize
12430 regcache->register_status.
12431 (free_register_cache): Release regcache->register_status.
12432 (regcache_cpy): Copy register_status.
12433 (registers_to_string): Print 'x's for unavailable registers.
12434 (supply_register): Mark the register's status valid or
12435 unavailable, depending on whether a buffer was passed in or not.
12436 (supply_register_zeroed): New.
12437 (supply_regblock): Mark the registers' status valid or
12438 unavailable, depending on whether a buffer was passed in or not.
12439 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12440 (struct regcache): New `register_status' field.
12441 (supply_register_zeroed): Declare.
12442 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12443 supply_register_zeroed, rather than passing a NULL buffer to
12445 * tracepoint.c (fetch_traceframe_registers): Update comment.
12447 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12449 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12452 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12454 * server.h (decode_xfer_write): Change prototype.
12455 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12456 and don't extract the annex here.
12457 * server.c (decode_xfer_read): Remove `annex' parameter,
12458 and don't extract the annex here.
12459 (decode_xfer): New.
12460 (struct qxfer): New.
12461 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12462 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12463 (handle_qxfer_statictrace): New functions, abstracted out from
12464 handle_query, and made to use the struct qxfer interface.
12465 (handle_threads_qxfer_proper): Rename to ...
12466 (handle_qxfer_threads_proper): ... this.
12467 (handle_threads_qxfer): Rename to ...
12468 (handle_qxfer_threads): ... this. Adjust.
12469 (qxfer_packets): New array.
12470 (handle_qxfer): New function.
12471 (handle_query): Use handle_qxfer.
12473 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12475 * gdbreplay.c: Shorten lines of >= 80 columns.
12476 * linux-low.c: Ditto.
12477 * linux-ppc-low.c: Ditto.
12478 * linux-s390-low.c: Ditto.
12479 * linux-sparc-low.c: Ditto.
12480 * linux-x86-low.c: Ditto.
12481 * linux-xtensa-low.c: Ditto.
12482 * mem-break.c: Ditto.
12483 * nto-low.c: Ditto.
12484 * regcache.h: Ditto.
12485 * remote-utils.c: Ditto.
12488 * thread-db.c: Ditto.
12489 * tracepoint.c: Ditto.
12491 * win32-low.h: Ditto.
12493 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12495 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12498 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12500 * server.c (gdbserver_version): Update copyright year in version
12502 * gdbreplay.c (gdbreplay_version): Ditto.
12504 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12506 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12507 * linux-bfin-low.c: New file.
12508 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12509 PT_DATA_ADDR for BFIN targets.
12510 * Makefile.in (SFILES): Add linux-bfin-low.c.
12511 (clean): Remove reg-bfin.c.
12512 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12513 * README: Mention supported Blackfin targets.
12515 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12517 * .gitignore: New file.
12519 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12521 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12523 2010-10-22 Jie Zhang <jie@codesourcery.com>
12525 * Makefile.in: Add FLAGS_TO_PASS variable.
12526 (install): Remove dependency of install-only and recursively
12527 invoke make for install-only.
12529 2010-10-04 Doug Evans <dje@google.com>
12531 * Makefile.in (uninstall): Use $(DESTDIR).
12533 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12537 * linux-x86-low.c (compat_siginfo_from_siginfo)
12538 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12539 si_code is < 0. Check for si_code == SI_TIMER before checking for
12542 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12544 * lynx-i386-low.c: New file.
12545 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12547 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12549 * lynx-low.c (ptrace_request_to_str): Remove handling for
12550 request values that have been removed in LynxOS 5.x.
12552 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12554 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12557 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12559 * configure.ac: Add --enable-inprocess-agent option.
12560 * configure: Rebuilt.
12562 2010-09-06 Yao Qi <yao@codesourcery.com>
12564 * linux-low.c (linux_kill): Remove unused variable.
12565 (linux_stabilize_threads): Likewise.
12566 * server.c (start_inferior): Likewise.
12567 (queue_stop_reply_callback): Likewise.
12568 * tracepoint.c (do_action_at_tracepoint): Likewise.
12570 2010-09-06 Yao Qi <yao@codesourcery.com>
12572 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12575 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12577 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12579 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12581 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12584 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12586 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12587 gdbserver/lynx-ppc-low.c: New files.
12588 * Makefile.in (lynx_low_h): New variable.
12589 (lynx-low.o, lynx-ppc-low.o): New rules.
12590 * configure.ac: On LynxOS, link with -lnetinet.
12591 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12592 * configure: regenerate.
12594 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12596 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12597 * configure.ac: Add check for vasprintf and vsnprintf.
12598 * configure, config.in: Regenerate.
12599 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12601 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12603 * gdbreplay.c: Move include of alloca.h up, next to include of
12605 * server.h: Add include of malloc.h.
12606 * mem-break.c: Remove include of malloc.h.
12607 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12609 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12611 * Makefile.in (memmem.o): Build with -Wno-error.
12613 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12615 * utils.c (xsnprintf): Make non-static.
12616 * server.h: Add xsnprintf declaration.
12617 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12618 replace calls to snprintf by calls to xsnprintf throughout.
12620 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12622 * configure.ac: Add configure check for alloca.
12623 * configure, config.in: Regenerate.
12624 * server.h: Include alloca.h if it exists.
12625 * gdbreplay.c: Include alloca.h if it exists.
12627 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12629 * linux-low.c (__SIGRTMIN): Define if not already defined.
12630 (linux_create_inferior): Check for __ANDROID__ rather than
12632 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12633 are already deferred.
12634 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12635 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12636 stopped and already has a pending signal to report.
12637 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12638 a pending signal to report or is moving out of a jump pad.
12639 (linux_init_signals): Check for __ANDROID__ rather than
12642 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12644 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12645 debug_threads check. Avoid a linear search when not doing debug
12648 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12650 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12651 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12652 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12653 (process_event): Change local fd's type to gdb_fildes_t.
12654 (create_file_handler): Adjust prototype.
12655 (delete_file_handler): Adjust prototype.
12656 (handle_file_event): Adjust prototype. Use pfildes.
12657 (create_file_event): Adjsut prototype.
12658 * remote-utils.c (remote_desc, listen_desc): Change type to
12660 * server.h: New gdb_fildes_t typedef.
12661 [USE_WIN32API]: Include winsock2.h.
12662 (delete_file_handler, add_file_handler): Adjust prototypes.
12663 (pfildes): Declare.
12664 * utils.c (pfildes): New.
12666 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12668 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12669 * configure: Regenerate.
12671 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12673 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12674 (linux_done_accessing_memory): ... this.
12675 (linux_target_ops): Adjust.
12676 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12677 * nto-low.c (nto_target_ops): Adjust comment.
12678 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12679 * spu-low.c (spu_target_ops): Adjust comment.
12680 * target.h (target_ops): Rename unprepare_to_access_memory field
12681 to done_accessing_memory.
12682 (unprepare_to_access_memory): Rename to ...
12683 (done_accessing_memory): ... this.
12685 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12687 * linux-low.c (linux_prepare_to_access_memory): New.
12688 (linux_unprepare_to_access_memory): New.
12689 (linux_target_ops): Install them.
12690 * server.c (read_memory): Rename to ...
12691 (gdb_read_memory): ... this. Use
12692 prepare_to_access_memory/prepare_to_access_memory.
12693 (write_memory): Rename to ...
12694 (gdb_write_memory): ... this. Use
12695 prepare_to_access_memory/prepare_to_access_memory.
12696 (handle_search_memory_1): Adjust.
12697 (process_serial_event): Adjust.
12698 * target.h (struct target_ops): New fields
12699 prepare_to_access_memory and unprepare_to_access_memory.
12700 (prepare_to_access_memory, unprepare_to_access_memory): New.
12701 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12702 prepare_to_access_memory/prepare_to_access_memory.
12703 * nto-low.c (nto_target_ops): Adjust.
12704 * spu-low.c (spu_target_ops): Adjust.
12705 * win32-low.c (win32_target_ops): Adjust.
12707 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12709 * Makefile.in (WARN_CFLAGS): Get it from configure.
12710 (WERROR_CFLAGS): New.
12711 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12712 * configure.ac: Introduce --enable-werror, which adds -Werror to
12713 the compiler command line. Enabled by default. Disable with
12714 --disable-werror. Add -Wdeclaration-after-statement
12715 Wpointer-arith and -Wformat-nonliteral to warning flags.
12716 * configure: Regenerate.
12718 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12720 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12722 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12724 * gdbreplay.c (remote_error): New.
12726 (expect): Use gdbchar. Check for error reading from GDB.
12727 Clarify sync error output.
12728 (play): Check for errors writing to GDB.
12729 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12730 * remote-utils.c (getpkt): Check for errors writing to the remote
12733 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12735 * linux-low.c (linux_wait_1): Move non-debugging code out of
12736 `debug_threads' control.
12738 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12740 * linux-low.c (linux_wait_1): Don't set last_status here.
12741 * server.c (push_event, queue_stop_reply_callback): Assert we're
12742 not pushing a TARGET_WAITKIND_IGNORE event.
12743 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12744 (myresume, handle_target_event): Set the thread's last_resume_kind
12745 and last_status from the target returned status.
12747 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12751 * linux-x86-low.c (update_debug_registers_callback): New.
12752 (i386_dr_low_set_addr): Use it.
12753 (i386_dr_low_get_addr): New.
12754 (i386_dr_low_set_control): Use update_debug_registers_callback.
12755 (i386_dr_low_get_control): New.
12756 (i386_dr_low_get_status): Adjust.
12757 * linux-low.c (linux_stop_lwp): New.
12758 * linux-low.h (linux_stop_lwp): Declare.
12760 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12761 argument instead of a i386_debug_reg_state.
12762 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12763 a i386_debug_reg_state.
12764 (i386_insert_aligned_watchpoint): Adjust.
12765 (i386_remove_aligned_watchpoint): Adjust.
12766 (i386_low_stopped_data_address): Read the debug registers from the
12767 inferior instead of from the mirrors.
12768 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12769 (i386_dr_low_get_addr): Declare.
12770 (i386_dr_low_get_control): Declare.
12771 (i386_dr_low_get_status): Change prototype.
12773 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12774 (i386_dr_low_get_addr): New.
12775 (i386_dr_low_get_control): New.
12776 (i386_dr_low_get_status): Adjust prototype. Return
12778 (i386_initial_stuff): Clear dr_status_mirror and
12780 (i386_get_thread_context): Adjust.
12781 (i386_set_thread_context): Adjust.
12782 (i386_thread_added): Adjust.
12784 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12786 * linux-low.h (linux_thread_area): Delete declaration.
12788 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12790 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12791 after its termination.
12793 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12795 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12796 (gdb_wants_all_stopped): Delete.
12797 (linux_wait_1): Don't call them.
12798 * server.c (handle_v_cont): Tag all threads as want-stopped.
12799 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12800 stopped as "client-wants-stopped".
12802 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12804 * Makefile.in (signals_h): New.
12805 (server_h): Depend on it.
12806 (server.o): Don't depend on $(signals_def).
12807 (signals.o): Depend on $(signals_def).
12809 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12811 * Makefile.in (signals_def): New.
12812 (server_h): Append include/gdb/signals.h and signals_def.
12813 (server.o): Append signals_def.
12815 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12817 * server.c (handle_target_event): Use target_signal_to_host for
12818 resume_info.sig initialization.
12819 * target.h (struct thread_resume) <sig>: New comment.
12821 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12823 * server.c (handle_query): strcpy() the returned string from paddress()
12824 instead of sprintf().
12825 * utils.c (paddress): Return phex_nz().
12827 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12829 * server.c (handle_v_cont): Call mourn_inferior if process
12831 (myresume): Likewise.
12833 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12835 Static tracepoints, and integration with UST.
12837 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12838 * mem-break.c (uninsert_all_breakpoints)
12839 (reinsert_all_breakpoints): New.
12840 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12841 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12842 (gdb_agent_ust_loaded, helper_thread_id)
12843 (gdb_agent_helper_thread_id): New macros.
12844 (struct ipa_sym_addresses): Add addr_ust_loaded,
12845 addr_helper_thread_id, addr_cmd_buf.
12846 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12847 (in_process_agent_loaded_ust): New.
12848 (write_e_ust_not_loaded): New.
12849 (maybe_write_ipa_ust_not_loaded): New.
12850 (struct collect_static_trace_data_action): New.
12851 (enum tracepoint_type) <static_tracepoint>: New.
12852 (struct tracepoint) <handle>: Mention static tracepoints.
12853 (struct static_tracepoint_ctx): New.
12854 (CMD_BUF_SIZE): New.
12855 (add_tracepoint_action): Handle static tracepoint actions.
12856 (unprobe_marker_at): New.
12857 (clear_installed_tracepoints): Handle static tracepoints.
12858 (cmd_qtdp): Handle static tracepoints.
12859 (probe_marker_at): New.
12860 (cmd_qtstart): Handle static tracepoints.
12861 (response_tracepoint): Handle static tracepoints.
12862 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12863 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12864 (get_context_regcache): Handle static tracepoints.
12865 (do_action_at_tracepoint): Handle static tracepoint actions.
12866 (traceframe_find_block_type): Handle static trace data blocks.
12867 (traceframe_read_sdata): New.
12868 (download_tracepoints): Download static tracepoint actions.
12869 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12870 (GDB_PROBE_NAME): New.
12872 (GET_UST_SYM): New.
12875 (ust_marker_to_static_tracepoint): New.
12877 (collect_ust_data_at_tracepoint): New.
12878 (gdb_ust_probe): New.
12879 (UNIX_PATH_MAX, SOCK_DIR): New.
12880 (gdb_ust_connect_sync_socket): New.
12881 (resume_thread, stop_thread): New.
12882 (run_inferior_command): New.
12883 (init_named_socket): New.
12884 (gdb_ust_socket_init): New.
12885 (cstr_to_hexstr): New.
12887 (first_marker, next_marker): New.
12888 (response_ust_marker): New.
12889 (cmd_qtfstm, cmd_qtsstm): New.
12890 (unprobe_marker_at, probe_marker_at): New.
12891 (cmd_qtstmat, gdb_ust_thread): New.
12892 (gdb_ust_init): New.
12893 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12894 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12895 (ST_REGENTRY): New.
12896 (x86_64_st_collect_regmap): New.
12897 (X86_64_NUM_ST_COLLECT_GREGS): New.
12898 (AMD64_RIP_REGNUM): New.
12899 (supply_static_tracepoint_registers): New.
12900 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12901 (ST_REGENTRY): New.
12902 (i386_st_collect_regmap): New.
12903 (i386_NUM_ST_COLLECT_GREGS): New.
12904 (supply_static_tracepoint_registers): New.
12905 * server.c (handle_query): Handle qXfer:statictrace:read.
12906 <qSupported>: Report support for StaticTracepoints, and
12907 qXfer:statictrace:read features.
12908 * server.h (traceframe_read_sdata)
12909 (supply_static_tracepoint_registers): Declare.
12910 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12911 (unpack_varlen_hex): Include in IPA build.
12912 * Makefile.in (ustlibs, ustinc): New.
12913 (IPA_OBJS): Add remote-utils-ipa.o.
12914 ($(IPA_LIB)): Link -ldl and -lpthread.
12916 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12917 * config.in, configure: Regenerate.
12919 2010-06-20 Ian Lance Taylor <iant@google.com>
12920 Pedro Alves <pedro@codesourcery.com>
12922 * linux-x86-low.c (always_true): Delete.
12923 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12924 trying to fool the compiler with always_true.
12926 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12928 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12929 conditions in gdbserver.
12931 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12933 * spu-low.c (spu_read_memory): Wrap around local store limit.
12934 (spu_write_memory): Likewise.
12936 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12938 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12939 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12941 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12943 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12944 uses with LONGEST uses.
12946 2010-06-14 Stan Shebs <stan@codesourcery.com>
12947 Pedro Alves <pedro@codesourcery.com>
12951 * linux-x86-low.c: Include limits.h.
12953 (always_true): New.
12956 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12957 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12958 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12959 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12960 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12961 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12962 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12963 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12964 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12965 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12966 (amd64_emit_void_call_2): New.
12967 (amd64_emit_ops): New.
12968 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12969 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12970 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12971 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12972 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12973 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12974 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12975 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12976 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12977 (i386_emit_stack_adjust, i386_emit_int_call_1)
12978 (i386_emit_void_call_2): New.
12979 (i386_emit_ops): New.
12980 (x86_emit_ops): New.
12981 (the_low_target): Install x86_emit_ops.
12982 * server.h (struct emit_ops): New.
12983 (get_raw_reg_func_addr): Declare.
12984 (current_insn_ptr, emit_error): Declare.
12985 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12986 (set_trace_state_variable_value): New defines.
12987 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12988 addr_get_trace_state_variable_value and
12989 addr_set_trace_state_variable_value.
12990 (symbol_list): New fields for get_raw_reg,
12991 get_trace_state_variable_value and set_trace_state_variable_value.
12992 (condfn): New typedef.
12993 (struct tracepoint): New field `compiled_cond'.
12994 (do_action_at_tracepoint): Clear compiled_cond.
12995 (get_trace_state_variable_value, set_trace_state_variable_value):
12997 (condition_true_at_tracepoint): If there's a compiled condition,
12999 (current_insn_ptr, emit_error): New globals.
13000 (struct bytecode_address): New.
13001 (get_raw_reg_func_addr): New.
13002 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
13003 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
13004 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
13005 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
13006 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
13007 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
13008 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
13009 (compile_tracepoint_condition, compile_bytecodes): New.
13010 * target.h (emit_ops): Forward declare.
13011 (struct target_ops): New field emit_ops.
13012 (target_emit_ops): New.
13013 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
13014 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
13015 * linux-low.c (linux_emit_ops): New.
13016 (linux_target_ops): Install it.
13017 * linux-low.h (struct linux_target_ops): New field emit_ops.
13019 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
13021 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
13022 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
13024 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13025 Stan Shebs <stan@codesourcery.com>
13027 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
13028 (all): Depend on $(extra_libraries).
13029 (install-only): Install the IPA.
13030 (IPA_OBJS, IPA_LIB): New.
13031 (clean): Remove the IPA lib.
13032 (IPAGENT_CFLAGS): New.
13033 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
13034 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
13035 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
13036 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
13037 * configure.ac: Check for atomic builtins support in the compiler.
13038 (IPA_DEPFILES, extra_libraries): Define.
13039 * configure.srv (ipa_obj): Add description.
13040 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
13041 (i[34567]86-*-linux*): Set ipa_obj.
13042 (x86_64-*-linux*): Set ipa_obj.
13043 * linux-low.c (stabilizing_threads): New.
13044 (supports_fast_tracepoints): New.
13045 (linux_detach): Stabilize threads before detaching.
13046 (handle_tracepoints): Handle internal tracing breakpoints. Assert
13047 the lwp is either not stabilizing, or is moving out of a jump pad.
13048 (linux_fast_tracepoint_collecting): New.
13049 (maybe_move_out_of_jump_pad): New.
13050 (enqueue_one_deferred_signal): New.
13051 (dequeue_one_deferred_signal): New.
13052 (linux_wait_for_event_1): If moving out of a jump pad, defer
13053 pending signals to later.
13054 (linux_stabilize_threads): New.
13055 (linux_wait_1): Check if threads need moving out of jump pads, and
13057 (stuck_in_jump_pad_callback): New.
13058 (move_out_of_jump_pad_callback): New.
13059 (lwp_running): New.
13060 (linux_resume_one_lwp): Handle moving out of jump pads.
13061 (linux_set_resume_request): Dequeue deferred signals.
13062 (need_step_over_p): Also step over fast tracepoint jumps.
13063 (start_step_over): Also uninsert fast tracepoint jumps.
13064 (finish_step_over): Also reinsert fast tracepoint jumps.
13065 (linux_install_fast_tracepoint_jump): New.
13066 (linux_target_ops): Install linux_stabilize_threads and
13067 linux_install_fast_tracepoint_jump_pad.
13068 * linux-low.h (linux_target_ops) <get_thread_area,
13069 install_fast_tracepoint_jump_pad>: New fields.
13070 (struct lwp_info) <collecting_fast_tracepoint,
13071 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
13072 (linux_get_thread_area): Declare.
13073 * linux-x86-low.c (jump_insn): New.
13074 (x86_get_thread_area): New.
13075 (append_insns): New.
13076 (push_opcode): New.
13077 (amd64_install_fast_tracepoint_jump_pad): New.
13078 (i386_install_fast_tracepoint_jump_pad): New.
13079 (x86_install_fast_tracepoint_jump_pad): New.
13080 (the_low_target): Install x86_get_thread_area and
13081 x86_install_fast_tracepoint_jump_pad.
13082 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
13083 (struct fast_tracepoint_jump): New.
13084 (fast_tracepoint_jump_insn): New.
13085 (fast_tracepoint_jump_shadow): New.
13086 (find_fast_tracepoint_jump_at): New.
13087 (fast_tracepoint_jump_here): New.
13088 (delete_fast_tracepoint_jump): New.
13089 (set_fast_tracepoint_jump): New.
13090 (uninsert_fast_tracepoint_jumps_at): New.
13091 (reinsert_fast_tracepoint_jumps_at): New.
13092 (set_breakpoint_at): Use write_inferior_memory.
13093 (uninsert_raw_breakpoint): Use write_inferior_memory.
13094 (check_mem_read): Mask out fast tracepoint jumps.
13095 (check_mem_write): Mask out fast tracepoint jumps.
13096 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
13097 (set_fast_tracepoint_jump): Declare.
13098 (delete_fast_tracepoint_jump)
13099 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
13100 (reinsert_fast_tracepoint_jumps_at): Declare.
13101 * regcache.c: Don't compile many functions when building the
13102 in-process agent library.
13103 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
13104 the register buffer in the heap.
13105 (free_register_cache): If the register buffer isn't owned by the
13106 regcache, don't free it.
13107 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
13108 pre-existing register caches.
13109 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
13111 (convert_ascii_to_int): : Constify `from' parameter type.
13112 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
13113 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
13114 the needed buffer in-place.
13115 (relocate_instruction): New.
13116 * server.c (handle_query) <qSymbols>: If the target supports
13117 tracepoints, give it a chance of looking up symbols. Report
13118 support for fast tracepoints.
13119 (handle_status): Stabilize threads.
13120 (process_serial_event): Adjust.
13121 * server.h (struct fast_tracepoint_jump): Forward declare.
13122 (struct process_info) <fast_tracepoint_jumps>: New field.
13123 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
13124 (decode_X_packet, decode_M_packet): Adjust.
13125 (relocate_instruction): Declare.
13126 (in_process_agent_loaded): Declare.
13127 (tracepoint_look_up_symbols): Declare.
13128 (struct fast_tpoint_collect_status): Declare.
13129 (fast_tracepoint_collecting): Declare.
13130 (force_unlock_trace_buffer): Declare.
13131 (handle_tracepoint_bkpts): Declare.
13132 (initialize_low_tracepoint)
13133 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
13134 * target.h (struct target_ops) <stabilize_threads,
13135 install_fast_tracepoint_jump_pad>: New fields.
13136 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
13137 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
13138 [HAVE_STDINT_H]: Include stdint.h.
13139 (trace_debug_1): Rename to ...
13140 (trace_vdebug): ... this.
13141 (trace_debug): Rename to ...
13142 (trace_debug_1): ... this. Add `level' parameter.
13143 (trace_debug): New.
13144 (ATTR_USED, ATTR_NOINLINE): New.
13145 (IP_AGENT_EXPORT): New.
13146 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
13147 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
13148 (about_to_request_buffer_space, trace_buffer_is_full)
13149 (stopping_tracepoint, expr_eval_result, error_tracepoint)
13150 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
13151 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
13152 (traceframe_write_count, traceframes_created)
13153 (trace_state_variables)
13154 New renaming defines.
13155 (struct ipa_sym_addresses): New.
13156 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
13157 (symbol_list): New.
13158 (ipa_sym_addrs): New.
13159 (all_tracepoint_symbols_looked_up): New.
13160 (in_process_agent_loaded): New.
13161 (write_e_ipa_not_loaded): New.
13162 (maybe_write_ipa_not_loaded): New.
13163 (tracepoint_look_up_symbols): New.
13164 (debug_threads) [IN_PROCESS_AGENT]: New.
13165 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
13166 (UNKNOWN_SIDE_EFFECTS): New.
13167 (stop_tracing): New.
13168 (flush_trace_buffer): New.
13169 (stop_tracing_bkpt): New.
13170 (flush_trace_buffer_bkpt): New.
13171 (read_inferior_integer): New.
13172 (read_inferior_uinteger): New.
13173 (read_inferior_data_pointer): New.
13174 (write_inferior_data_pointer): New.
13175 (write_inferior_integer): New.
13176 (write_inferior_uinteger): New.
13177 (struct collect_static_trace_data_action): Delete.
13178 (enum tracepoint_type): New.
13179 (struct tracepoint) <type>: New field `type'.
13180 <actions_str, step_actions, step_actions_str>: Only include in
13182 <orig_size, obj_addr_on_target, adjusted_insn_addr>
13183 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
13184 (tracepoints): Use IP_AGENT_EXPORT.
13185 (last_tracepoint): Don't include in the IPA.
13186 (stopping_tracepoint): Use IP_AGENT_EXPORT.
13187 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
13188 (alloced_trace_state_variables): New.
13189 (trace_state_variables): Use IP_AGENT_EXPORT.
13190 (traceframe_t): Delete unused variable.
13191 (circular_trace_buffer): Don't include in the IPA.
13192 (trace_buffer_start): Delete.
13193 (struct trace_buffer_control): New.
13194 (trace_buffer_free): Delete.
13195 (struct ipa_trace_buffer_control): New.
13196 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
13197 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
13199 (trace_buffer_ctrl): New.
13200 (TRACE_BUFFER_CTRL_CURR): New.
13201 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13202 Reimplement as macros.
13203 (trace_buffer_wrap): Delete.
13204 (traceframe_write_count, traceframe_read_count)
13205 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13206 (struct tracepoint_hit_ctx) <type>: New field.
13207 (struct fast_tracepoint_ctx): New.
13208 (memory_barrier): New.
13210 (record_tracepoint_error): Update atomically in the IPA.
13211 (clear_inferior_trace_buffer): New.
13212 (about_to_request_buffer_space): New.
13213 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13214 updating the same buffer.
13215 (add_tracepoint): Default the tracepoint's type to trap
13216 tracepoint, and orig_size to -1.
13217 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13218 internal variables.
13219 (create_trace_state_variable): New parameter `gdb'. Handle it.
13220 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13221 (cmd_qtdp): Handle fast tracepoints.
13222 (cmd_qtdv): Adjust.
13223 (max_jump_pad_size): New.
13224 (gdb_jump_pad_head): New.
13225 (get_jump_space_head): New.
13226 (claim_jump_space): New.
13227 (sort_tracepoints): New.
13228 (MAX_JUMP_SIZE): New.
13229 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13231 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13232 support. Upload fast traceframes, and delete internal IPA
13234 (stop_tracing_handler): New.
13235 (flush_trace_buffer_handler): New.
13236 (cmd_qtstop): Upload fast tracepoints.
13237 (response_tracepoint): Handle fast tracepoints.
13238 (tracepoint_finished_step): Upload fast traceframes. Set the
13239 tracepoint hit context's tracepoint type.
13240 (handle_tracepoint_bkpts): New.
13241 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13242 type. Add comment about fast tracepoints.
13243 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13244 non-existing action_str field.
13245 (get_context_regcache): Handle fast tracepoints.
13246 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13248 (fast_tracepoint_from_jump_pad_address): New.
13249 (fast_tracepoint_from_ipa_tpoint_address): New.
13250 (collecting_t): New.
13251 (force_unlock_trace_buffer): New.
13252 (fast_tracepoint_collecting): New.
13254 (gdb_collect): New.
13255 (write_inferior_data_ptr): New.
13256 (target_tp_heap): New.
13257 (target_malloc): New.
13258 (download_agent_expr): New.
13260 (download_tracepoints): New.
13261 (download_trace_state_variables): New.
13262 (upload_fast_traceframes): New.
13263 (IPA_FIRST_TRACEFRAME): New.
13264 (IPA_NEXT_TRACEFRAME_1): New.
13265 (IPA_NEXT_TRACEFRAME): New.
13266 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13267 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13268 (gdb_jump_pad_buffer_end): New.
13269 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13270 (initialize_tracepoint): Adjust.
13271 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13272 buffer. Initialize the low module.
13273 * utils.c (PREFIX, TOOLNAME): New.
13274 (malloc_failure): Use PREFIX.
13275 (error): In the IPA, an error causes an exit.
13276 (fatal, warning): Use PREFIX.
13277 (internal_error): Use TOOLNAME.
13278 (NUMCELLS): Increase to 10.
13279 * configure, config.in: Regenerate.
13281 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13283 * server.c (handle_query) <qSupported>: Do two passes over the
13284 qSupported string to avoid nesting strtok.
13286 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13288 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13290 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13291 -Wl,--dynamic-list.
13292 * configure: Regenerate.
13293 * proc-service.list: New.
13295 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13297 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13300 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13302 * gdbreplay.c (remote_open): Check error return from socket() call by
13303 its equality to -1 not by it being negative.
13304 * remote-utils.c (remote_open): Likewise.
13306 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13308 * config.h: Regenerate.
13310 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13312 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13313 doesn't provide PTRACE_GET_THREAD_AREA.
13315 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13317 * linux-m68k-low.c: Include <asm/ptrace.h>
13318 (ps_get_thread_area): Implement.
13320 2010-05-03 Doug Evans <dje@google.com>
13322 * event-loop.c (struct callback_event): New struct.
13323 (callback_list): New global.
13324 (append_callback_event, delete_callback_event): New functions.
13325 (process_callback): New function.
13326 (start_event_loop): Call it.
13327 * remote-utils.c (NOT_SCHEDULED): Define.
13328 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13329 moved out of readchar.
13330 (readchar): Rewrite. Call reschedule before returning.
13331 (reset_readchar): New function.
13332 (remote_close): Call it.
13333 (process_remaining, reschedule): New functions.
13334 * server.h (callback_handler_func): New typedef.
13335 (append_callback_event, delete_callback_event): Declare.
13337 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13339 * proc-service.c (ps_pglobal_lookup): Use
13340 thread_db_look_up_one_symbol.
13341 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13342 parameter. Use it instead of all_symbols_looked_up.
13343 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13345 (all_symbols_looked_up): Don't declare.
13346 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13347 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13349 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13350 Set all_symbols_looked_up here.
13351 (thread_db_look_up_one_symbol): New.
13352 (thread_db_get_tls_address): Adjust.
13353 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13354 thread_db object on the heap, and tentatively set it in the
13356 (thread_db_init): Don't set all_symbols_looked_up here.
13357 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13359 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13361 * linux-low.c (linux_kill, linux_detach): Adjust.
13362 (status_pending_p_callback): Remove redundant statement. Check
13363 for !TARGET_WAITIKIND_IGNORE, instead of
13364 TARGET_WAITKIND_STOPPED.
13365 (handle_tracepoints): Make sure LWP is locked. Adjust.
13366 (linux_wait_for_event_1): Adjust.
13367 (linux_cancel_breakpoints): New.
13368 (unsuspend_one_lwp): New.
13369 (unsuspend_all_lwps): New.
13370 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13371 (send_sigstop_callback): Change return type to int, add new
13372 `except' parameter and handle it.
13373 (suspend_and_send_sigstop_callback): New.
13374 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13375 pass them down. If SUSPEND, also increment the lwp's suspend
13377 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13378 (need_step_over_p): Don't consider suspended LWPs.
13379 (start_step_over): Adjust.
13380 (proceed_one_lwp): Change return type to int, add new `except'
13381 parameter and handle it.
13382 (unsuspend_and_proceed_one_lwp): New.
13383 (proceed_all_lwps): Use find_inferior instead of
13385 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13386 also decrement the suspend count of LWPs. Pass `except' down,
13387 instead of hacking its suspend count.
13388 (linux_pause_all): Add `freeze' parameter. Adjust.
13389 (linux_unpause_all): New.
13390 (linux_target_ops): Install linux_unpause_all.
13391 * server.c (handle_status): Adjust.
13392 * target.h (struct target_ops): New fields `unpause_all' and
13393 `cancel_breakpoints'. Add new parameter to `pause_all'.
13394 (pause_all): Add new `freeze' parameter.
13395 (unpause_all): New.
13396 (cancel_breakpoints): New.
13397 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13398 cancel breakpoints.
13399 (cmd_qtstart): Pause threads.
13400 (stop_tracing): Pause threads, and cancel breakpoints.
13401 * win32-low.c (win32_target_ops): Adjust.
13403 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13405 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13406 the inferior right away from here...
13407 (linux_wait_1): ... to here, and adjust to check the thread's
13408 last_resume_kind instead of the lwp's step or stop_expected flags.
13410 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13412 * README: Use consistent `GDB' and `GDBserver' spellings.
13414 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13416 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13417 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13418 (linux_detach_one_lwp): Assume the lwp is stopped.
13419 (any_thread_of): Delete.
13420 (linux_detach): Stop all lwps here. Don't blindly delete all
13422 (delete_lwp_callback): New.
13423 (linux_mourn): Delete all lwps of the process that is gone.
13424 (linux_wait_1): Don't delete the last lwp of the process here.
13425 * mem-break.h (mark_breakpoints_out): Declare.
13426 * mem-break.c (mark_breakpoints_out): New.
13427 (free_all_breakpoints): Use it.
13428 * server.c (handle_target_event): If the process is gone, mark
13430 * thread-db.c (struct thread_db) <create_bp>: New field.
13431 (thread_db_enable_reporting): Fix prototype. Store a thread event
13432 breakpoint reference in the thread_db struct.
13433 (thread_db_load_search): Clear the thread_db object.
13434 (try_thread_db_load_1): Ditto.
13435 (switch_to_process): New.
13436 (disable_thread_event_reporting): Use it.
13437 (remove_thread_event_breakpoints): New.
13438 (thread_db_detach, thread_db_mourn): Use it.
13440 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13442 * linux-low.c (linux_enable_event_reporting): New.
13443 (linux_wait_for_event_1, handle_extended_wait): Use it.
13445 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13447 * linux-low.c (linux_kill_one_lwp, linux_kill)
13448 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13449 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13450 SIGSTOP even if the LWP is stopped.
13451 (send_sigstop_callback): New.
13452 (stop_all_lwps): Use send_sigstop_callback instead.
13453 (linux_resume_one_thread): Adjust.
13454 (proceed_one_lwp): Still proceed an LWP that the client has
13455 requested to stop, if we haven't reported it as stopped yet. Make
13456 sure that LWPs the client want stopped, have a pending SIGSTOP.
13458 2010-04-26 Doug Evans <dje@google.com>
13460 * server.c (handle_general_set): Make static.
13462 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13463 Print received char after testing for error/eof instead of before.
13464 (input_interrupt): Tweak comment.
13466 2010-04-23 Doug Evans <dje@google.com>
13468 * server.c (start_inferior): Print inferior argv if --debug.
13470 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13472 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13473 * nto-x86-low.c: Include server.h
13475 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13477 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13478 be consistent with other sources of this directory.
13479 (init_registers_amd64): Correct name of source file of this function
13482 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13484 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13485 64-bit executables.
13487 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13489 * win32-i386-low.c: Add 64-bit support.
13490 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13491 (init_registers_amd64): Declare.
13492 (mappings): Add 64-bit version of array.
13493 (init_windows_x86): New function.
13494 (the_low_target): Change init_arch field to init_windows_x86.
13496 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13498 * win32-low.c: Adapt to support also 64-bit architecture.
13499 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13500 (get_image_name): Use SIZE_T type for local variable `done'.
13501 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13502 (toolhelp_get_dll_name): Idem.
13503 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13504 Use uintptr_t typecast to avoid warning.
13505 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13506 (handle_exception): Use phex_nz to avoid warning.
13507 (win32_wait): Remove unused local variable `process'.
13509 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13511 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13514 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13516 * configure.ac: Use `ws2_32' library for srv_mingw.
13517 * configure: Regenerate.
13518 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13519 * remote-utils.c: Likewise.
13521 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13523 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13524 if __x86_64__ is defined.
13526 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13528 * configure: Regenerate.
13530 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13532 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13533 * target.h (target_ops): New get_tib_address field.
13534 * win32-low.h (win32_thread_info): Add thread_local_base field.
13535 * win32-low.c (child_add_thread): Add tlb argument.
13536 Set thread_local_base field to TLB.
13537 (get_child_debug_event): Adapt to child_add_thread change.
13538 (win32_get_tib_address): New function.
13539 (win32_target_ops): Set get_tib_address field to
13540 win32_get_tib_address.
13541 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13543 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13545 * linux-low.c (linux_mourn): Also remove the process.
13546 * server.c (handle_target_event): Don't remove the process here.
13547 * nto-low.c (nto_mourn): New.
13548 (nto_target_ops): Install it.
13549 * spu-low.c (spu_mourn): New.
13550 (spu_target_ops): Install it.
13551 * win32-low.c (win32_mourn): New.
13552 (win32_target_ops): Install it.
13554 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13556 * server.h (buffer_xml_printf): Remove redundant `;'.
13558 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13560 * regcache.c (set_register_cache): Invalidate regcaches before
13561 changing the register cache layout.
13562 (regcache_invalidate_one): Allow a NULL regcache.
13563 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13564 regcaches before changing the register cache layout or the target
13567 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13569 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13570 variable warning on Linux/x86-64.
13572 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13574 GDBserver disconnected tracing support.
13576 * linux-low.c (linux_remove_process): Delete.
13577 (add_lwp): Don't set last_resume_kind here.
13578 (linux_kill): Use `mourn'.
13579 (linux_detach): Use `thread_db_detach', and `mourn'.
13580 (linux_mourn): New.
13581 (linux_attach_lwp_1): Adjust comment.
13582 (linux_attach): last_resume_kind moved the thread_info; adjust.
13583 (status_pending_p_callback): Adjust.
13584 (linux_wait_for_event_1): Adjust.
13585 (count_events_callback, select_singlestep_lwp_callback)
13586 (select_event_lwp_callback, cancel_breakpoints_callback)
13587 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13588 (proceed_one_lwp): Adjust.
13589 (linux_async): Add debug output.
13590 (linux_thread_stopped): New.
13591 (linux_pause_all): New.
13592 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13594 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13595 (thread_db_free): Delete declaration.
13596 (thread_db_detach, thread_db_mourn): Declare.
13597 * thread-db.c (thread_db_init): Use thread_db_mourn.
13598 (thread_db_free): Delete, split in two.
13599 (disable_thread_event_reporting): New.
13600 (thread_db_detach): New.
13601 (thread_db_mourn): New.
13603 * server.h (struct thread_info) <last_resume_kind>: New field.
13604 <attached>: Add comment.
13605 <gdb_detached>: New field.
13606 (handler_func): Change return type to int.
13607 (handle_serial_event, handle_target_event): Ditto.
13608 (gdb_connected): Declare.
13610 (disconnected_tracing): Declare.
13611 (stop_tracing): Declare.
13613 * server.c (handle_query) <qSupported>: Report support for
13614 disconnected tracing.
13615 (queue_stop_reply_callback): Account for running threads.
13616 (gdb_wants_thread_stopped): New.
13617 (gdb_wants_all_threads_stopped): New.
13618 (gdb_reattached_process): New.
13619 (handle_status): Clear the `gdb_detached' flag of all processes.
13620 In all-stop, stop all threads.
13621 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13622 (process_serial_event): If the remote connection breaks, or if an
13623 exit was forced with "monitor exit", force an event loop exit.
13624 Handle disconnected tracing on detach.
13625 (handle_serial_event): Adjust.
13626 (handle_target_event): If GDB isn't connected, forward events back
13627 to the inferior, unless the last process exited, in which case,
13628 exit gdbserver. Adjust interface.
13630 * remote-utils.c (remote_open): Don't block in accept. Instead
13631 register an event loop source on the listen socket file
13632 descriptor. Refactor bits into ...
13633 (listen_desc): ... this new global.
13634 (gdb_connected): ... this new function.
13635 (enable_async_notification): ... this new function.
13636 (handle_accept_event): ... this new function.
13637 (remote_close): Clear remote_desc.
13639 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13641 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13643 (mourn_inferior): Define.
13644 (target_process_qsupported): Avoid the dangling else problem.
13645 (thread_stopped): Define.
13646 (pause_all): Define.
13647 (target_waitstatus_to_string): Declare.
13648 * target.c (target_waitstatus_to_string): New.
13650 * tracepoint.c (tracing): Make extern.
13651 (disconnected_tracing): New.
13652 (stop_tracing): Make extern. Handle tracing stops due to GDB
13654 (cmd_qtdisconnected): New.
13655 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13656 (handle_tracepoint_general_set): Handle QTDisconnected.
13658 * event-loop.c (event_handler_func): Change return type to int.
13659 (process_event): Bail out if the event handler wants the event
13661 (handle_file_event): Ditto.
13662 (start_event_loop): Bail out if the event handler wants the event
13665 * nto-low.c (nto_target_ops): Adjust.
13666 * spu-low.c (spu_wait): Don't remove the process here.
13667 (spu_target_ops): Adjust.
13668 * win32-low.c (win32_wait): Don't remove the process here.
13669 (win32_target_ops): Adjust.
13671 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13673 * regcache.c (realloc_register_cache): Invalidate inferior's
13674 regcache before recreating it.
13676 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13678 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13680 2010-04-09 Stan Shebs <stan@codesourcery.com>
13681 Pedro Alves <pedro@codesourcery.com>
13683 * server.h (LONGEST): New.
13684 (struct thread_info) <while_stepping>: New field.
13685 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13687 (initialize_tracepoint, handle_tracepoint_general_set)
13688 (handle_tracepoint_query, tracepoint_finished_step)
13689 (tracepoint_was_hit, release_while_stepping_state_list):
13690 (current_traceframe): Declare.
13691 * server.c (handle_general_set): Handle tracepoint packets.
13692 (read_memory): New.
13693 (write_memory): New.
13694 (handle_search_memory_1): Use read_memory.
13695 (handle_query): Report support for conditional tracepoints, trace
13696 state variables, and tracepoint sources. Handle tracepoint
13698 (main): Initialize the tracepoints module.
13699 (process_serial_event): Handle traceframe reads/writes.
13701 * linux-low.c (handle_tracepoints): New.
13702 (linux_wait_1): Call it.
13703 (linux_resume_one_lwp): Handle while-stepping.
13704 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13705 (linux_target_ops): Install them.
13706 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13708 * linux-x86-low.c (x86_supports_tracepoints): New.
13709 (the_low_target). Install it.
13711 * mem-break.h (delete_breakpoint): Declare.
13712 * mem-break.c (delete_breakpoint): Make external.
13714 * target.h (struct target_ops): Add `supports_tracepoints',
13715 `read_pc', and `write_pc' fields.
13716 (target_supports_tracepoints): Define.
13717 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13720 * regcache.h (struct regcache) <registers_owned>: New field.
13721 (init_register_cache, regcache_cpy): Declare.
13722 (regcache_read_pc, regcache_write_pc): Declare.
13723 (register_cache_size): Declare.
13724 (supply_regblock): Declare.
13725 * regcache.c (init_register_cache): New.
13726 (new_register_cache): Use it.
13727 (regcache_cpy): New.
13728 (register_cache_size): New.
13729 (supply_regblock): New.
13730 (regcache_read_pc, regcache_write_pc): New.
13732 * tracepoint.c: New.
13734 * Makefile.in (OBS): Add tracepoint.o.
13735 (tracepoint.o): New rule.
13737 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13739 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13741 (i386-mmx.c): Likewise.
13742 (i386-mmx-linux.o): Likewise.
13743 (i386-mmx-linux.c): Likewise.
13745 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13746 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13747 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13748 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13750 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13751 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13752 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13754 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13756 * Makefile.in (clean): Updated.
13758 (i386-avx.c): Likewise.
13759 (i386-avx-linux.o): Likewise.
13760 (i386-avx-linux.c): Likewise.
13761 (amd64-avx.o): Likewise.
13762 (amd64-avx.c): Likewise.
13763 (amd64-avx-linux.o): Likewise.
13764 (amd64-avx-linux.c): Likewise.
13766 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13767 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13768 (srv_amd64_regobj): Add amd64-avx.o.
13769 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13770 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13771 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13772 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13773 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13774 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13775 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13777 * i387-fp.c: Include "i386-xstate.h".
13779 (i387_cache_to_xsave): Likewise.
13780 (i387_xsave_to_cache): Likewise.
13781 (x86_xcr0): Likewise.
13783 * i387-fp.h (i387_cache_to_xsave): Likewise.
13784 (i387_xsave_to_cache): Likewise.
13785 (x86_xcr0): Likewise.
13787 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13788 * linux-crisv32-low.c (target_regsets): Likewise.
13789 * linux-m68k-low.c (target_regsets): Likewise.
13790 * linux-mips-low.c (target_regsets): Likewise.
13791 * linux-ppc-low.c (target_regsets): Likewise.
13792 * linux-s390-low.c (target_regsets): Likewise.
13793 * linux-sh-low.c (target_regsets): Likewise.
13794 * linux-sparc-low.c (target_regsets): Likewise.
13795 * linux-xtensa-low.c (target_regsets): Likewise.
13797 * linux-low.c: Include <sys/uio.h>.
13798 (regsets_fetch_inferior_registers): Support nt_type.
13799 (regsets_store_inferior_registers): Likewise.
13800 (linux_process_qsupported): New.
13801 (linux_target_ops): Add linux_process_qsupported.
13803 * linux-low.h (regset_info): Add nt_type.
13804 (linux_target_ops): Add process_qsupported.
13806 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13808 (init_registers_i386_avx_linux): New.
13809 (init_registers_amd64_avx_linux): Likewise.
13810 (xmltarget_i386_linux_no_xml): Likewise.
13811 (xmltarget_amd64_linux_no_xml): Likewise.
13812 (PTRACE_GETREGSET): Likewise.
13813 (PTRACE_SETREGSET): Likewise.
13814 (x86_fill_xstateregset): Likewise.
13815 (x86_store_xstateregset): Likewise.
13816 (use_xml): Likewise.
13817 (x86_linux_update_xmltarget): Likewise.
13818 (x86_linux_process_qsupported): Likewise.
13819 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13820 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13821 init_registers_i386_linux here. Call
13822 x86_linux_update_xmltarget.
13823 (the_low_target): Add x86_linux_process_qsupported.
13825 * server.c (handle_query): Call target_process_qsupported.
13827 * target.h (target_ops): Add process_qsupported.
13828 (target_process_qsupported): New.
13830 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13832 * inferiors.c (add_thread): Set last_status kind to
13833 TARGET_WAITKIND_IGNORE.
13834 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13835 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13836 (linux_wait_1): Move `thread' local definition to block that uses
13837 it. Don't NULL initialize `event_child'.
13838 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13839 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13840 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13842 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13844 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13845 an extended waitstatus, or by a watchpoint.
13846 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13847 thread was stepping or has been stopped by a watchpoint.
13849 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13851 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13852 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13853 of another, then delete the previous, and validate all
13855 (validate_inserted_breakpoint): New.
13856 (delete_disabled_breakpoints): New.
13857 (validate_breakpoints): New.
13858 (check_mem_read): Validate breakpoints before trusting their
13859 shadow. Delete disabled breakpoints.
13860 (check_mem_write): Validate breakpoints before trusting they
13861 should be inserted. Delete disabled breakpoints.
13862 * mem-break.h (validate_breakpoints):
13863 * server.c (handle_query): Validate breakpoints when we see a
13866 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13868 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13869 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13870 if we could tell there's a GDB breakpoint at stop_pc.
13871 (need_step_over_p): Don't do a step over if we find a GDB
13872 breakpoint at the resume PC.
13874 * mem-break.c (struct raw_breakpoint): New.
13875 (enum bkpt_type): New type `gdb_breakpoint'.
13876 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13877 fields. New field `raw'.
13878 (find_raw_breakpoint_at): New.
13879 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13880 breakpoint instead.
13881 (set_breakpoint_at): Adjust.
13882 (delete_raw_breakpoint): New.
13883 (release_breakpoint): New.
13884 (delete_breakpoint): Rename to...
13885 (delete_breakpoint_1): ... this. Add proc parameter. Use
13886 release_breakpoint. Return ENOENT.
13887 (delete_breakpoint): Reimplement.
13888 (find_breakpoint_at): Delete.
13889 (find_gdb_breakpoint_at): New.
13890 (delete_breakpoint_at): Delete.
13891 (set_gdb_breakpoint_at): New.
13892 (delete_gdb_breakpoint_at): New.
13893 (gdb_breakpoint_here): New.
13894 (set_reinsert_breakpoint): Use release_breakpoint.
13895 (uninsert_breakpoint): Rename to ...
13896 (uninsert_raw_breakpoint): ... this.
13897 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13898 (reinsert_raw_breakpoint): Change parameter type to
13900 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13902 (check_breakpoints): Adjust. Use release_breakpoint.
13903 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13904 (breakpoint_inserted_here): Ditto.
13905 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13906 Don't trust the breakpoint's shadow if it is not inserted.
13907 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13908 (delete_all_breakpoints): Adjust.
13909 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13910 use delete_breakpoint_1.
13912 * mem-break.h (breakpoints_supported): Delete declaration.
13913 (set_gdb_breakpoint_at): Declare.
13914 (gdb_breakpoint_here): Declare.
13915 (delete_breakpoint_at): Delete.
13916 (delete_gdb_breakpoint_at): Declare.
13918 * server.h (struct raw_breakpoint): Forward declare.
13919 (struct process_info): New field `raw_breakpoints'.
13921 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13924 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13926 * linux-low.c (status_pending_p_callback): Fix comment.
13927 (linux_wait_for_event_1): Move most of the internal breakpoint
13928 handling from here...
13929 (linux_wait_1): ... to here.
13930 (count_events_callback): New.
13931 (select_singlestep_lwp_callback): New.
13932 (select_event_lwp_callback): New.
13933 (cancel_breakpoints_callback): New.
13934 (select_event_lwp): New.
13935 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13936 priority to all LWPs that have had events that should be reported
13937 to the client. Cancel breakpoints when about to reporting the
13938 event to the client, not while stopping lwps. No longer cancel
13939 finished single-steps here.
13940 (cancel_finished_single_step): Delete.
13941 (cancel_finished_single_steps): Delete.
13943 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13945 * mem-break.c (enum bkpt_type): New.
13946 (struct breakpoint): New field `type'.
13947 (set_breakpoint_at): Change return type to struct breakpoint
13948 pointer. Set type to `other_breakpoint' by default.
13949 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13950 in the breakpoint list.
13951 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13952 (reinsert_breakpoint): Rename to ...
13953 (reinsert_raw_breakpoint): ... this.
13954 (reinsert_breakpoints_at): Adjust.
13955 * mem-break.h (struct breakpoint): Declare.
13956 (set_breakpoint_at): Change return type to struct breakpoint
13959 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13961 * server.c (handle_query): Assign, not compare.
13963 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13965 Teach linux gdbserver to step-over-breakpoints.
13967 * linux-low.c (can_hardware_single_step): New.
13968 (supports_breakpoints): New.
13969 (handle_extended_wait): If stopping threads, read the stop pc of
13970 the new cloned LWP.
13972 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13973 low target doesn't support retrieving the PC.
13974 (add_lwp): Set last_resume_kind to resume_continue.
13975 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13976 (linux_attach): Don't clear stop_expected. Set the lwp's
13977 last_resume_kind to resume_stop.
13978 (linux_detach_one_lwp): Don't check for removed breakpoints.
13979 (check_removed_breakpoint): Delete.
13980 (status_pending_p): Rename to ...
13981 (status_pending_p_callback): ... this. Don't check for removed
13982 breakpoints. Don't consider threads that are stopped from GDB's
13984 (linux_wait_for_lwp): Always read the stop_pc here.
13985 (cancel_breakpoint): New.
13986 (step_over_bkpt): New global.
13987 (linux_wait_for_event_1): Implement stepping over breakpoints.
13988 (gdb_wants_lwp_stopped): New.
13989 (gdb_wants_all_stopped): New.
13990 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13991 single-step traps here. Store the thread's last reported target
13993 (send_sigstop): Don't clear stop_expected. Always set it,
13995 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13996 (cancel_finished_single_step): New.
13997 (cancel_finished_single_steps): New.
13998 (wait_for_sigstop): Don't cancel finished single-step traps here.
13999 (linux_resume_one_lwp): Don't check for removed breakpoints.
14000 Don't set `step' on non-hardware step archs.
14001 (linux_set_resume_request): Ignore resume_stop requests if already
14002 stopping or stopped. Set the lwp's last_resume_kind.
14003 (resume_status_pending_p): Don't check for removed breakpoints.
14004 (need_step_over_p): New.
14005 (start_step_over): New.
14006 (finish_step_over): New.
14007 (linux_resume_one_thread): Always queue a sigstop for resume_stop
14008 requests. Clear the thread's last reported target waitstatus.
14009 Don't use the `suspended' flag. Don't consider pending breakpoints.
14010 (linux_resume): Start a step-over if necessary.
14011 (proceed_one_lwp): New.
14012 (proceed_all_lwps): New.
14013 (unstop_all_lwps): New.
14014 * linux-low.h (struct lwp_info): Rewrite comment for the
14015 `suspended' flag. Add the `stop_pc' field. Delete the
14016 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
14017 Add `'last_resume_kind' and `need_step_over' fields.
14018 * inferiors.c (struct thread_info): Delete, moved elsewhere.
14019 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
14020 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
14021 (set_raw_breakpoint_at): New.
14022 (set_breakpoint_at): Rewrite to use it.
14023 (reinsert_breakpoint_handler): Delete.
14024 (set_reinsert_breakpoint): New.
14025 (reinsert_breakpoint_by_bp): Delete.
14026 (delete_reinsert_breakpoints): New.
14027 (uninsert_breakpoint): Rewrite.
14028 (uninsert_breakpoints_at): New.
14029 (reinsert_breakpoint): Rewrite.
14030 (reinsert_breakpoints_at): New.
14031 (check_breakpoints): Rewrite.
14032 (breakpoint_here): New.
14033 (breakpoint_inserted_here): New.
14034 (check_mem_read): Adjust.
14035 * mem-break.h (breakpoints_supported, breakpoint_here)
14036 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
14037 (reinsert_breakpoint_by_bp): Delete declaration.
14038 (delete_reinsert_breakpoints): Declare.
14039 (reinsert_breakpoint): Delete declaration.
14040 (reinsert_breakpoints_at): Declare.
14041 (uninsert_breakpoint): Delete declaration.
14042 (uninsert_breakpoints_at): Declare.
14043 (check_breakpoints): Adjust prototype.
14044 * server.h: Adjust include order.
14045 (struct thread_info): Declare here. Add a `last_status' field.
14047 2010-03-23 Michael Snyder <msnyder@vmware.com>
14049 * server.c (crc32): New function.
14050 (handle_query): Add handling for 'qCRC:' request.
14052 2010-03-23 Pedro Alves <pedro@codesourcery.com>
14054 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
14055 lwp had been stopped by a watchpoint.
14057 2010-03-16 Pedro Alves <pedro@codesourcery.com>
14059 * server.h (internal_error): Declare.
14060 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
14061 * utils.c (internal_error): New function.
14063 2010-03-15 Andreas Schwab <schwab@redhat.com>
14065 * configure.srv: Fix typo setting srv_regobj.
14067 2010-03-15 Pedro Alves <pedro@codesourcery.com>
14069 * linux-low.c (fetch_register): Avoid passing a non string literal
14071 (usr_store_inferior_registers): Ditto.
14073 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14075 * linux-low.c (linux_write_memory): Bail out early if peeking
14078 2010-03-14 Pedro Alves <pedro@codesourcery.com>
14080 * linux-low.h (struct lwp_info): New fields
14081 `stopped_by_watchpoint' and `stopped_data_address'.
14082 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
14083 here, and cache them in the lwp object.
14084 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
14086 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
14088 (linux_stopped_by_watchpoint): Rewrite.
14089 (linux_stopped_data_address): Rewrite.
14091 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
14093 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
14094 switching the current inferior, not before.
14096 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
14098 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
14099 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
14100 i386-linux.c and amd64-linux.c.
14101 (reg-i386.o): Removed.
14102 (reg-i386.c): Likewise.
14103 (reg-i386-linux.o): Likewise.
14104 (reg-i386-linux.c): Likewise.
14105 (reg-x86-64.o): Likewise.
14106 (reg-x86-64.c): Likewise.
14107 (reg-x86-64-linux.o): Likewise.
14108 (reg-x86-64-linux.c): Likewise.
14110 (i386.c): Likewise.
14111 (i386-linux.o): Likewise.
14112 (i386-linux.c): Likewise.
14113 (amd64.o): Likewise.
14114 (amd64.c): Likewise.
14115 (amd64-linux.o): Likewise.
14116 (amd64-linux.c): Likewise.
14118 * configure.srv (srv_i386_regobj): New.
14119 (srv_i386_linux_regobj): Likewise.
14120 (srv_amd64_regobj): Likewise.
14121 (srv_amd64_linux_regobj): Likewise.
14122 (srv_i386_32bit_xmlfiles): Likewise.
14123 (srv_i386_64bit_xmlfiles): Likewise.
14124 (srv_i386_xmlfiles): Likewise.
14125 (srv_amd64_xmlfiles): Likewise.
14126 (srv_i386_linux_xmlfiles): Likewise.
14127 (srv_amd64_linux_xmlfiles): Likewise.
14128 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
14129 srv_xmlfiles to $srv_i386_xmlfiles.
14130 (i[34567]86-*-mingw32ce*): Likewise.
14131 (i[34567]86-*-mingw*): Likewise.
14132 (i[34567]86-*-nto*): Likewise.
14133 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
14134 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
14135 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
14136 (x86_64-*-linux*): Likewise.
14138 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
14139 (init_registers_amd64_linux): New.
14140 (x86_arch_setup): Replace init_registers_x86_64_linux with
14141 init_registers_amd64_linux.
14143 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
14145 * configure.ac: Check for libdl. If it is not available link against
14146 static libthread_db.
14147 * configure: Regenerate.
14149 2010-02-22 Pedro Alves <pedro@codesourcery.com>
14153 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
14154 handing a read watchpoint.
14155 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
14157 2010-02-12 Doug Evans <dje@google.com>
14159 * linux-low.c (linux_supports_tracefork_flag): Document.
14160 (linux_look_up_symbols): Add comment.
14162 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
14164 * regcache.c (supply_register): Clear regcache if buf is NULL.
14166 2010-02-02 Nicolas Roche <roche@sourceware.org>
14167 Joel Brobecker <brobecker@adacore.com>
14169 * inferiors.c (find_inferior): Add function documentation.
14170 (unloaded_dll): Handle the case where the unloaded dll has not
14171 been previously registered in the dll list.
14173 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14175 * linux-arm-low.c (thumb_breakpoint_len): Delete.
14176 (thumb2_breakpoint): New.
14177 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
14179 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14181 * linux-low.c (get_stop_pc): Check for SIGTRAP.
14182 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
14185 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14187 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
14189 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
14191 * linux-s390-low.c (s390_collect_ptrace_register)
14192 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
14194 2010-01-21 Doug Evans <dje@google.com>
14196 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
14197 (PTRACE_ARG4_TYPE): New macro.
14198 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
14199 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14200 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14201 (usr_store_inferior_registers): Ditto.
14202 (linux_read_memory, linux_write_memory): Ditto.
14203 (linux_test_for_tracefork): Ditto.
14205 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14206 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14208 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14210 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14213 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14215 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14216 prototype to take a regcache. Adjust.
14218 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14220 * regcache.h (struct thread_info): Forward declare.
14221 (struct regcache): New.
14222 (new_register_cache): Adjust prototype.
14223 (get_thread_regcache): Declare.
14224 (free_register_cache): Adjust prototype.
14225 (registers_to_string, registers_from_string): Ditto.
14226 (supply_register, supply_register_by_name, collect_register)
14227 (collect_register_as_string, collect_register_by_name): Ditto.
14228 * regcache.c (struct inferior_regcache_data): Delete.
14229 (get_regcache): Rename to ...
14230 (get_thread_regcache): ... this. Adjust. Switch inferior before
14231 fetching registers.
14232 (regcache_invalidate_one): Adjust.
14233 (regcache_invalidate): Fix prototype.
14234 (new_register_cache): Return the new register cache.
14235 (free_register_cache): Change prototype.
14236 (realloc_register_cache): Adjust.
14237 (registers_to_string): Change prototype to take a regcache. Adjust.
14238 (registers_from_string): Ditto.
14239 (register_data): Ditto.
14240 (supply_register): Ditto.
14241 (supply_register_by_name): Ditto.
14242 (collect_register): Ditto.
14243 (collect_register_as_string): Ditto.
14244 (collect_register_by_name): Ditto.
14245 * server.c (process_serial_event): Adjust.
14246 * linux-low.h (regset_fill_func, regset_store_func): Change
14248 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14250 * linux-low.c (get_stop_pc): Adjust.
14251 (check_removed_breakpoint): Adjust.
14252 (linux_wait_for_event): Adjust.
14253 (linux_resume_one_lwp): Adjust.
14254 (fetch_register): Add regcache parameter. Adjust.
14255 (usr_store_inferior_registers): Ditto.
14256 (regsets_fetch_inferior_registers): Ditto.
14257 (regsets_store_inferior_registers): Ditto.
14258 (linux_fetch_registers, linux_store_registers): Ditto.
14259 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14261 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14263 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14264 prototype to take a regcache.
14265 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14266 * remote-utils.c (convert_ascii_to_int, outreg)
14267 (prepare_resume_reply): Change prototype to take a regcache.
14269 * target.h (struct target_ops) <fetch_registers, store_registers>:
14270 Change prototype to take a regcache.
14271 (fetch_inferior_registers, store_inferior_registers): Change
14272 prototype to take a regcache. Adjust.
14273 * proc-service.c (ps_lgetregs): Adjust.
14274 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14275 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14276 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14277 take a regcache. Adjust.
14278 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14279 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14280 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14281 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14282 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14283 (cris_cannot_fetch_register):
14284 (cris_breakpoint_at): Change prototype to take a regcache.
14286 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14287 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14288 to take a regcache. Adjust.
14289 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14291 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14292 take a regcache. Adjust.
14293 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14294 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14295 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14296 * linux-mips-low.c (mips_get_pc):
14297 (mips_set_pc): Change prototype to take a regcache. Adjust.
14298 (mips_reinsert_addr): Adjust.
14299 (mips_collect_register): Change prototype to take a regcache.
14301 (mips_supply_register):
14302 (mips_collect_register_32bit, mips_supply_register_32bit)
14303 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14304 (mips_store_fpregset): Ditto.
14305 * linux-ppc-low.c (ppc_supply_ptrace_register)
14306 (ppc_supply_ptrace_register): Ditto.
14307 (parse_spufs_run): Adjust.
14308 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14309 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14310 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14311 take a regcache. Adjust.
14312 * linux-s390-low.c (s390_collect_ptrace_register)
14313 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14314 (s390_set_pc): Change prototype to take a regcache. Adjust.
14315 (s390_arch_setup): Adjust.
14316 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14317 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14318 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14319 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14320 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14322 (sparc_breakpoint_at): Adjust.
14323 * linux-xtensa-low.c (xtensa_fill_gregset):
14324 (xtensa_store_gregset):
14325 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14326 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14327 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14328 prototype to take a regcache. Adjust.
14329 * win32-arm-low.c (arm_fetch_inferior_register)
14330 (arm_store_inferior_register): Change prototype to take a
14332 * win32-i386-low.c (i386_fetch_inferior_register)
14333 (i386_store_inferior_register): Change prototype to take a
14335 * win32-low.c (child_fetch_inferior_registers)
14336 (child_store_inferior_registers): Change prototype to take a
14338 (win32_wait): Adjust.
14339 (win32_fetch_inferior_registers): Change prototype to take a
14341 (win32_store_inferior_registers): Adjust.
14342 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14343 store_inferior_register>: Change prototype to take a regcache.
14345 2010-01-20 Doug Evans <dje@google.com>
14347 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14349 (linux_wait_for_event1, linux_init_signals): Ditto.
14350 (W_STOPCODE): Provide definition if missing.
14352 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14354 * linux-low.c (linux_core_of_thread): New.
14355 (compare_ints, show_process, list_threads): New.
14356 (linux_qxfer_osdata): Report threads and cores.
14357 (linux_target_op): Register linux_core_of_thread.
14358 * remote-utils.c (prepare_resume_reply): Report the core.
14359 (buffer_xml_printf): Support %d specifier.
14360 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14362 (handle_query): Handle qXfer:threads. Announce availability
14364 * target.h (struct target_ops): New field core_of_thread.
14366 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14368 * Makefile.in (clean): Remove new generated files.
14369 (reg-s390.o, reg-s390.c): Remove rules.
14370 (reg-s390x.o, reg-s390x.c): Likewise.
14371 (s390-linux32.o, s390-linux32.c): Add rules.
14372 (s390-linux64.o, s390-linux64.c): Likewise.
14373 (s390x-linux64.o, s390x-linux64.c): Likewise.
14374 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14375 * linux-s390-low.c: Include <elf.h>.
14376 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14377 (init_registers_s390): Remove prototype.
14378 (init_registers_s390x): Likewise.
14379 (init_registers_s390_linux32): Add prototype.
14380 (init_registers_s390_linux64): Likewise.
14381 (init_registers_s390x_linux64): Likewise.
14382 (s390_num_regs_3264): New define.
14383 (s390_regmap_3264): New global variable.
14384 (s390_cannot_fetch_register): Remove obsolete check.
14385 (s390_cannot_store_register): Likewise.
14386 (s390_collect_ptrace_register): Handle upper/lower register halves.
14387 (s390_supply_ptrace_register): Likewise.
14388 (s390_fill_gregset): Update to register number changes.
14389 (s390_get_hwcap): New routine.
14390 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14391 Install appropriate regmap and register set.
14393 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14395 * server.c (gdbserver_version): Update copyright year to 2010.
14396 * gdbreplay.c (gdbreplay_version): Likewise.
14398 2009-12-28 Doug Evans <dje@google.com>
14400 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14401 elf/external.h. Include <elf.h> instead but only if necessary.
14403 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14405 * linux-low.c (linux_remove_process): Remove `detaching'
14406 parameter. Don't release/detach from thread_db here.
14407 (linux_kill): Release/detach from thread_db here, ...
14408 (linux_detach): ... and here, before actually detaching.
14409 (linux_wait_1): ... and here, when a process exits.
14410 * thread-db.c (any_thread_of): New.
14411 (thread_db_free): Switch the current inferior to a thread of the
14414 2009-12-21 Doug Evans <dje@google.com>
14416 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14418 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14419 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14420 warning ifndef __NR_tkill. Move setting of errno there too.
14421 Delete unnecessary resetting of errno after syscall.
14422 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14424 * configure.ac: Check for dladdr.
14425 * config.in: Regenerate.
14426 * configure: Regenerate.
14427 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14428 (try_thread_db_load): Update.
14430 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14432 2009-12-18 Doug Evans <dje@google.com>
14434 * event-loop.c: Include unistd.h if it exists.
14436 * linux-low.c (my_waitpid): Move definition away from being in
14437 between linux_tracefork_child/linux_test_for_tracefork.
14439 * gdb_proc_service.h (psaddr_t): Fix type.
14440 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14441 signature to match glibc.
14443 2009-12-16 Doug Evans <dje@google.com>
14445 * linux-low.c (linux_read_memory): Fix argument to read.
14447 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14449 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14450 events, don't leave current_inferior pointing at null.
14452 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14454 * win32-low.c (LOG): Delete.
14455 (OUTMSG): Output to stderr.
14456 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14457 on compile time LOG macro.
14458 (win32_wait): Fix debug output.
14460 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14462 * win32-low.c (win32_add_one_solib): If the dll name is
14463 "ntdll.dll", prepend the system directory to the dll path.
14465 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14467 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14469 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14470 Vladimir Prus <vladimir@codesourcery.com>
14472 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14473 * configure.ac: Check for __mcoldfire__ and set
14474 gdb_cv_m68k_is_coldfire.
14475 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14476 reg-cf.o and reg-m68k.o.
14477 * configure: Regenerated.
14479 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14481 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14482 Pass it to thread_db_free.
14483 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14484 proper `detaching' argument to linux_remove_process.
14485 * linux-low.h (thread_db_free): Add `detaching' parameter.
14486 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14488 (thread_db_free): Add `detaching' parameter. Only
14489 call td_ta_clear_event if detaching from process.
14491 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14493 * thread-db.c (thread_db_free): Fix typo.
14495 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14498 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14500 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14502 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14503 with an i686 compiler.
14504 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14506 * configure: Rebuilt.
14508 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14512 * server.c (handle_search_memory_1): Correct read_addr initialization
14513 in loop for searching subsequent chunks.
14515 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14517 * configure.ac: New --with-libthread-db option.
14518 * thread-db.c: Allow direct dependence on libthread_db.
14519 (thread_db_free): Adjust.
14520 * config.in: Regenerate.
14521 * configure: Likewise.
14523 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14526 * thread-db.c (attach_thread): New function.
14527 (maybe_attach_thread): Return success/failure.
14528 (find_new_threads_callback): Adjust.
14529 (thread_db_find_new_threads): Loop until no new threads.
14531 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14533 * proc-service.c (ps_lgetregs): Formatting.
14535 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14537 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14538 * configure.ac: Adjust.
14539 * linux-low.h (struct process_info_private): Move members to struct
14541 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14542 * linux-low.c (linux_remove_process): Adjust.
14543 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14544 * server.c (handle_query): Move code ...
14545 (handle_monitor_command): ... here. New function.
14546 * target.h (struct target_ops): New member.
14547 * thread-db.c (struct thread_db): New.
14548 (libthread_db_search_path): New variable.
14549 (thread_db_create_event, thread_db_enable_reporting)
14550 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14551 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14552 (try_thread_db_load_1, dladdr_to_soname): New functions.
14553 (try_thread_db_load, thread_db_load_search): New functions.
14554 (thread_db_init): Search for libthread_db.
14555 (thread_db_free): New function.
14556 (thread_db_handle_monitor_command): Likewise.
14557 * config.in: Regenerate.
14558 * configure: Regenerate.
14560 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14562 * spu-low.c (spu_kill): Wait for inferior to terminate.
14563 Call clear_inferiors.
14564 (spu_detach): Call clear_inferiors.
14566 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14568 * aclocal.m4: Regenerate.
14569 * config.in: Likewise.
14570 * configure: Likewise.
14572 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14574 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14575 (parse_spufs_run): New function.
14576 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14577 (ppc_breakpoint_at): Handle SPU breakpoints.
14579 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14581 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14582 (SPUFS_MAGIC): Define.
14583 (spu_enumerate_spu_ids): New function.
14584 (linux_qxfer_spu): New function.
14585 (linux_target_ops): Install linux_qxfer_spu.
14587 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14589 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14590 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14591 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14592 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14593 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14594 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14595 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14596 (init_registers_powerpc_cell32l): Add prototype.
14597 (init_registers_powerpc_cell64l): Likewise.
14598 (ppc_arch_setup): Detect Cell/B.E. architecture.
14600 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14602 * Makefile.in (datarootdir): New variable.
14604 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14606 * linux-low.c (linux_write_memory): Update debugging output.
14607 * Makefile.in (clean): Add new descriptions.
14608 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14609 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14610 * configure.srv: Add new files for arm*-*-linux*.
14611 * linux-arm-low.c: Add new declarations.
14612 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14613 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14614 (HWCAP_VFPv3D16): New.
14615 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14616 instead of __IWMMXT__.
14617 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14618 (arm_arch_setup): New.
14619 (target_regsets): Remove #ifdef. Add VFP regset.
14620 (the_low_target): Use arm_arch_setup.
14622 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14624 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14625 the main thread again.
14627 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14629 Adding Neutrino gdbserver.
14630 * configure: Regenerated.
14631 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14632 * configure.srv (i[34567]86-*-nto*): New target.
14633 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14634 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14635 (nto_comctrl) [__QNX__]: New function.
14636 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14638 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14640 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14643 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14644 Pedro Alves <pedro@codesourcery.com>
14646 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14647 don't support CONTEXT_EXTENDED_REGISTERS.
14648 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14649 (the_low_target): Install them.
14650 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14651 failing with ERROR_PIPE_NOT_CONNECTED.
14653 2009-06-30 Doug Evans <dje@google.com>
14654 Pierre Muller <muller@ics.u-strasbg.fr>
14656 Add h/w watchpoint support to x86-linux, win32-i386.
14657 * Makefile.in (SFILES): Add i386-low.c
14658 (i386_low_h): Define.
14659 (i386-low.o): Add dependencies.
14660 (linux-x86-low.o): Add i386-low.h dependency.
14661 (win32-i386-low.o): Ditto.
14662 * i386-low.c: New file.
14663 * i386-low.h: New file.
14664 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14665 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14666 * linux-low.c (linux_add_process): Initialize arch_private.
14667 (linux_remove_process): Free arch_private.
14668 (add_lwp): Initialize arch_private.
14669 (delete_lwp): Free arch_private.
14670 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14672 * linux-low.h (process_info_private): New member arch_private.
14673 (lwp_info): New member arch_private.
14674 (linux_target_ops): New members new_process, new_thread,
14676 (ptid_of): New macro.
14677 * linux-x86-low.c: Include stddef.h, i386-low.h.
14678 (arch_process_info): New struct.
14679 (arch_lwp_info): New struct.
14680 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14681 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14682 (i386_dr_low_get_status): New function.
14683 (x86_insert_point, x86_remove_point): New functions.
14684 (x86_stopped_by_watchpoint): New function.
14685 (x86_stopped_data_address): New function.
14686 (x86_linux_new_process, x86_linux_new_thread): New functions.
14687 (x86_linux_prepare_to_resume): New function.
14688 (the_low_target): Add entries for insert_point, remove_point,
14689 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14691 * server.c (debug_hw_points): New global.
14692 (monitor_show_help): Document set debug-hw-points.
14693 (handle_query): Process "set debug-hw-points".
14694 * server.h (debug_hw_points): Declare.
14695 (paddress): Declare.
14696 * utils.c (NUMCELLS, CELLSIZE): New macros.
14697 (get_sell, xsnprintf, paddress): New functions.
14698 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14699 remove_point, stopped_by_watchpoint, stopped_data_address.
14700 * win32-i386-low.c: Include i386-low.h.
14701 (debug_reg_state): Replaces dr.
14702 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14703 (i386_dr_low_get_status): New function.
14704 (i386_insert_point, i386_remove_point): New functions.
14705 (i386_stopped_by_watchpoint): New function.
14706 (i386_stopped_data_address): New function.
14707 (i386_initial_stuff): Update.
14708 (get_thread_context,set_thread_context,i386_thread_added): Update.
14709 (the_low_target): Add entries for insert_point,
14710 remove_point, stopped_by_watchpoint, stopped_data_address.
14711 * win32-low.c (win32_insert_watchpoint): New function.
14712 (win32_remove_watchpoint): New function.
14713 (win32_stopped_by_watchpoint): New function.
14714 (win32_stopped_data_address): New function.
14715 (win32_target_ops): Add entries for insert_watchpoint,
14716 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14717 * win32-low.h (win32_target_ops): New members insert_point,
14718 remove_point, stopped_by_watchpoint, stopped_data_address.
14720 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14722 * server.c (process_serial_event): Re-return unsupported, not
14723 error, if the type isn't recognized. Re-allow supporting only
14724 insert or remove packets. Also call require_running for
14725 breakpoints. Add missing break statement to default case. Tidy.
14726 * target.h (struct target_ops): Rename insert_watchpoint to
14727 insert_point, and remove_watchpoint to remove_point.
14729 * linux-low.h (struct linux_target_ops): Likewise.
14730 * linux-low.c (linux_insert_watchpoint): Rename to ...
14731 (linux_insert_point): ... this. Adjust.
14732 (linux_remove_watchpoint): Rename to ...
14733 (linux_remove_point): ... this. Adjust.
14734 (linux_target_ops): Adjust.
14735 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14736 (cris_insert_point): ... this.
14737 (cris_remove_watchpoint): Rename to ...
14738 (cris_remove_point): ... this.
14739 (the_low_target): Adjust.
14741 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14743 * server.c (handle_v_kill): Pass signal_pid to
14744 kill_inferior if multi_process is zero.
14746 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14748 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14749 * target.h (target_ops): Comment for *_watchpoint to make it clear
14750 the functions can get types '0' and '1'.
14752 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14754 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14755 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14756 * regcache.c (get_regcache): Likewise.
14757 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14758 * win32-low.c (child_fetch_inferior_registers): Remove check for
14761 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14762 Pedro Alves <pedro@codesourcery.com>
14764 * target.h (struct target_ops) <supports_multi_process>: New
14766 (target_supports_multi_process): New.
14767 * server.c (handle_query): Even if GDB reports support, only
14768 enable multi-process if the target also supports it. Report
14769 multi-process support only if the target backend supports it.
14770 * linux-low.c (linux_supports_multi_process): New function.
14771 (linux_target_ops): Install it as target_supports_multi_process
14774 2009-05-24 Doug Evans <dje@google.com>
14776 Global renaming of find_thread_pid to find_thread_ptid.
14777 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14778 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14779 All callers updated.
14781 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14782 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14785 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14786 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14787 (linux_resume_one_lwp): Ditto.
14789 2009-05-23 Doug Evans <dje@google.com>
14791 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14792 from struct inferior_list_entry * to struct lwp_info *.
14793 All callers updated.
14795 2009-05-13 Doug Evans <dje@google.com>
14797 * linux-x86-low.c: Don't include assert.h.
14798 (x86_siginfo_fixup): Use fatal, not assert.
14799 (x86_arch_setup): Fix comment.
14801 2009-05-12 Doug Evans <dje@google.com>
14803 Biarch support for i386/amd64 gdbserver.
14804 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14805 Add linux-x86-low.c.
14806 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14807 (linux-x86-low.o): Add.
14808 * linux-x86-64-low.c: Delete.
14809 * linux-i386-low.c: Delete.
14810 * linux-x86-low.c: New file.
14811 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14813 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14815 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14816 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14817 (linux_child_pid_to_exec_file): New function.
14818 (elf_64_header_p, elf_64_file_p): New functions.
14819 (siginfo_fixup): New function.
14820 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14821 give target a chance to convert layout.
14822 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14823 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14825 2009-05-07 Doug Evans <dje@google.com>
14827 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14828 (regsets_store_inferior_registers): Ditto.
14830 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14834 * linux-low.c (must_set_ptrace_flags): Delete.
14835 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14837 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14838 `lwp->must_set_ptrace_flags' instead.
14839 (linux_wait_for_event_1): Set ptrace options here.
14840 (linux_wait_1): ... not here.
14842 2009-04-30 Doug Evans <dje@google.com>
14844 * inferiors.c (started_inferior_callback): New function.
14845 (attached_inferior_callback): New function.
14846 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14847 * server.c (print_started_pid, print_attached_pid): New functions.
14848 (detach_or_kill_for_exit): New function.
14849 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14850 * server.h (have_started_inferiors_p): Declare.
14851 (have_attached_inferiors_p): Declare.
14853 * inferiors.c (remove_process): Fix memory leak, free process.
14854 * linux-low.c (linux_remove_process): New function.
14855 (linux_kill): Call it instead of remove_process.
14856 (linux_detach, linux_wait_1): Ditto.
14858 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14860 * configure.srv: Add x86 Windows CE target.
14862 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14864 * inferiors.c (get_thread_process): Make global.
14865 * server.h (get_thread_process): Add prototype.
14866 * thread-db.c (find_one_thread): Use get_thread_process
14867 instead of current_process.
14868 (thread_db_get_tls_address): Do not crash if called when
14869 thread layer is not yet initialized.
14871 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14873 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14874 * spu-low.c (current_tid): Rename to ...
14875 (current_ptid): ... this.
14876 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14877 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14878 ptid_get_lwp (current_ptid) instead of current_tid.
14879 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14880 instead of current_tid. Use find_process_pid to verify pid
14881 argument is valid. Pass proper argument to remove_process.
14882 (spu_thread_alive): Compare current_ptid instead of current_tid.
14883 (spu_resume): Likewise.
14885 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14887 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14890 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14892 Implement the multiprocess extensions, and add linux multiprocess
14895 * server.h (ULONGEST): Declare.
14896 (struct ptid, ptid_t): New.
14897 (minus_one_ptid, null_ptid): Declare.
14898 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14899 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14900 (struct inferior_list_entry): Change `id' type from unsigned from
14902 (struct sym_cache, struct breakpoint, struct
14903 process_info_private): Forward declare.
14904 (struct process_info): Declare.
14905 (current_process): Declare.
14906 (all_processes): Declare.
14907 (initialize_inferiors): Declare.
14908 (add_thread): Adjust to use ptid_t.
14909 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14910 (add_process, remove_process, find_thread_pid): Declare.
14911 (find_inferior_id): Adjust to use ptid_t.
14912 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14913 (multi_process): Declare.
14914 (push_event): Adjust to use ptid_t.
14915 (read_ptid, write_ptid): Declare.
14916 (prepare_resume_reply): Adjust to use ptid_t.
14917 (clear_symbol_cache): Declare.
14918 * inferiors.c (all_processes): New.
14919 (null_ptid, minus_one_ptid): New.
14920 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14921 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14922 (add_thread): Change unsigned long to ptid. Remove gdb_id
14924 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14925 (gdb_id_to_thread): Rename to ...
14926 (find_thread_pid): ... this. Change unsigned long to ptid.
14927 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14928 (loaded_dll, pull_pid_from_list): Adjust.
14929 (add_process, remove_process, find_process_pid)
14930 (get_thread_process, current_process, initialize_inferiors): New.
14931 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14932 (struct target_waitstatus) <related_pid>: Ditto.
14933 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14934 return type to int.
14935 (struct target_ops) <join>: Add `pid' argument.
14936 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14937 (struct target_ops) <wait>: Add `ptid' field. Change return type
14939 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14940 (mywait): Add `ptid' argument. Change return type to ptid_t.
14941 (target_pid_to_str): Declare.
14942 * target.c (set_desired_inferior): Adjust to use ptids.
14943 (mywait): Add new `ptid' argument. Adjust.
14944 (target_pid_to_str): New.
14945 * mem-break.h (free_all_breakpoints): Declare.
14946 * mem-break.c (breakpoints): Delelete.
14947 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14948 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14949 to use per-process breakpoint list.
14950 (free_all_breakpoints): New.
14951 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14952 (symbol_cache, all_symbols_looked_up): Delete.
14954 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14956 (prepare_resume_reply): Change ptid argument's type from unsigned
14957 long to ptid_t. Adjust. Implement W;process and X;process.
14958 (free_sym_cache, clear_symbol_cache): New.
14959 (look_up_one_symbol): Adjust to per-process symbol cache. *
14960 * server.c (cont_thread, general_thread, step_thread): Change type
14962 (attached): Delete.
14963 (multi_process): New.
14964 (last_ptid): Change type to ptid_t.
14965 (struct vstop_notif) <ptid>: Change type to ptid_t.
14966 (queue_stop_reply, push_event): Change `ptid' argument's type to
14968 (discard_queued_stop_replies): Add `pid' argument.
14969 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14970 changes. Don't reference the `attached' global.
14971 (attach_inferior): Adjust to mywait interface changes.
14972 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14973 features. Handle and report "multiprocess+". Handle
14975 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14977 (handle_v_kill): New.
14978 (handle_v_stopped): Adjust to use target_pid_to_str.
14979 (handle_v_requests): Allow multiple attaches and runs when
14980 multiprocess extensions are in effect. Handle "vKill".
14981 (myresume): Adjust to use ptids.
14982 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14983 (handle_status): Adjust to discard_queued_stop_replies interface
14985 (first_thread_of, kill_inferior_callback)
14986 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14987 (main): Call initialize_inferiors. Adjust to use ptids, killing
14988 and detaching from all inferiors. Handle multiprocess packet
14990 * linux-low.h: Include gdb_proc_service.h.
14991 (struct process_info_private): New.
14992 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14993 <lwpid_of>: Use ptid_get_lwp.
14994 (get_lwp_thread): Adjust.
14995 (struct lwp_info): Add `dead' member.
14996 (find_lwp_pid): Declare.
14997 * linux-low.c (thread_db_active): Delete.
14998 (new_inferior): Adjust comment.
14999 (inferior_pid): Delete.
15000 (linux_add_process): New.
15001 (handle_extended_wait): Adjust.
15002 (add_lwp): Change unsigned long to ptid.
15003 (linux_create_inferior): Add process to processes table. Adjust
15004 to use ptids. Don't set new_inferior here.
15005 (linux_attach_lwp): Rename to ...
15006 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
15007 it. Adjust to use ptids.
15008 (linux_attach_lwp): New.
15009 (linux_attach): Add process to processes table. Don't set
15011 (struct counter): New.
15012 (second_thread_of_pid_p, last_thread_of_process_p): New.
15013 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
15014 multiple processes.
15015 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
15016 processes. Remove process from process table.
15017 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
15018 to multiple processes.
15019 (any_thread_of): New.
15020 (linux_detach): Add `pid' argument, and handle it. Remove process
15021 from processes table.
15022 (linux_join): Add `pid' argument. Handle it.
15023 (linux_thread_alive): Change unsighed long argument to ptid_t.
15024 Consider dead lwps as not being alive.
15025 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
15026 threads we're not interested in.
15027 (same_lwp, find_lwp_pid): New.
15028 (linux_wait_for_lwp): Change `pid' argument's type from int to
15030 (linux_wait_for_event): Rename to ...
15031 (linux_wait_for_event_1): ... this. Change `pid' argument's type
15032 from int to ptid_t. Adjust.
15033 (linux_wait_for_event): New.
15034 (linux_wait_1): Add `ptid' argument. Change return type to
15035 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
15036 that exit from the process table.
15037 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
15039 (mark_lwp_dead): New.
15040 (wait_for_sigstop): Adjust to use ptids. If a process exits while
15041 stopping all threads, mark its main lwp as dead.
15042 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
15044 (fetch_register, usr_store_inferior_registers)
15045 (regsets_fetch_inferior_registers)
15046 (regsets_store_inferior_registers, linux_read_memory)
15047 (linux_write_memory): Inline `inferior_pid'.
15048 (linux_look_up_symbols): Adjust to use per-process
15049 `thread_db_active'.
15050 (linux_request_interrupt): Adjust to use ptids.
15051 (linux_read_auxv): Inline `inferior_pid'.
15052 (initialize_low): Don't reference thread_db_active.
15053 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
15054 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
15055 (ps_getpid): Return the pid of the current inferior.
15056 * thread-db.c (proc_handle, thread_agent): Delete.
15057 (thread_db_create_event, thread_db_enable_reporting): Adjust to
15059 (find_one_thread): Change argument type to ptid_t. Adjust to
15061 (maybe_attach_thread): Adjust to per-process data and ptids.
15062 (thread_db_find_new_threads): Ditto.
15063 (thread_db_init): Ditto.
15064 * spu-low.c (spu_create_inferior, spu_attach): Add process to
15065 processes table. Adjust to use ptids.
15066 (spu_kill, spu_detach): Adjust interface. Remove process from
15068 (spu_join, spu_thread_alive): Adjust interface.
15069 (spu_wait): Adjust interface. Remove process from processes
15070 table. Adjust to use ptids.
15071 * win32-low.c (current_inferior_tid): Delete.
15072 (current_inferior_ptid): New.
15073 (debug_event_ptid): New.
15074 (thread_rec): Take a ptid. Adjust.
15075 (child_add_thread): Add `pid' argument. Adjust to use ptids.
15076 (child_delete_thread): Ditto.
15077 (do_initial_child_stuff): Add `attached' argument. Add process to
15079 (child_fetch_inferior_registers, child_store_inferior_registers):
15081 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
15082 (win32_attach): Pass 1 to do_initial_child_stuff.
15083 (win32_kill): Adjust interface. Remove process from processes
15085 (win32_detach): Ditto.
15086 (win32_join): Adjust interface.
15087 (win32_thread_alive): Take a ptid.
15088 (win32_resume): Adjust to use ptids.
15089 (get_child_debug_event): Ditto.
15090 (win32_wait): Adjust interface. Remove exiting process from
15093 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15095 Non-stop mode support.
15097 * server.h (non_stop): Declare.
15098 (gdb_client_data, handler_func): Declare.
15099 (delete_file_handler, add_file_handler, start_event_loop):
15101 (handle_serial_event, handle_target_event, push_event)
15102 (putpkt_notif): Declare.
15103 * target.h (enum resume_kind): New.
15104 (struct thread_resume): Replace `step' field by `kind' field.
15105 (TARGET_WNOHANG): Define.
15106 (struct target_ops) <wait>: Add `options' argument.
15107 <supports_non_stop, async, start_non_stop>: New fields.
15108 (target_supports_non_stop, target_async): New.
15109 (start_non_stop): Declare.
15110 (mywait): Add `options' argument.
15111 * target.c (mywait): Add `options' argument. Print child exit
15112 notifications here.
15113 (start_non_stop): New.
15114 * server.c (non_stop, own_buf, mem_buf): New globals.
15115 (struct vstop_notif): New.
15116 (notif_queue): New global.
15117 (queue_stop_reply, push_event, discard_queued_stop_replies)
15118 (send_next_stop_reply): New.
15119 (start_inferior): Adjust to use resume_kind. Adjust to mywait
15121 (attach_inferior): In non-stop mode, don't wait for the target
15123 (handle_general_set): Handle QNonStop.
15124 (handle_query): When handling qC, return the current general
15125 thread, instead of the first thread of the list.
15126 (handle_query): If the backend supports non-stop mode, include
15127 QNonStop+ in the qSupported query response.
15128 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
15130 (handle_v_attach, handle_v_run): Handle non-stop mode.
15131 (handle_v_stopped): New.
15132 (handle_v_requests): Report support for vCont;t. Handle vStopped.
15133 (myresume): Adjust to use resume_kind. Handle non-stop.
15134 (queue_stop_reply_callback): New.
15135 (handle_status): Handle non-stop mode.
15136 (main): Clear non_stop flag on reconnection. Use the event-loop.
15137 Refactor serial protocol handling from here ...
15138 (process_serial_event): ... to this new function. When GDB
15139 selects any thread, select one here. In non-stop mode, wait until
15140 GDB acks all pending events before exiting.
15141 (handle_serial_event, handle_target_event): New.
15142 * remote-utils.c (remote_open): Install remote_desc in the event
15144 (remote_close): Remove remote_desc from the event loop.
15145 (putpkt_binary): Rename to...
15146 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
15147 (putpkt_binary): New as wrapper around putpkt_binary_1.
15148 (putpkt_notif): New.
15149 (prepare_resume_reply): In non-stop mode, don't change the
15151 * event-loop.c: New.
15152 * Makefile.in (OBJ): Add event-loop.o.
15153 (event-loop.o): New rule.
15155 * linux-low.h (pid_of): Moved here.
15157 (get_lwp_thread): Use lwpid_of.
15158 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
15159 * linux-low.c (pid_of): Delete.
15160 (inferior_pid): Use lwpid_of.
15161 (linux_event_pipe): New.
15162 (target_is_async_p): New.
15164 (handle_extended_wait): Use lwpid_of.
15165 (add_lwp): Don't set lwpid field.
15166 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
15167 (linux_kill_one_lwp): If killing a running lwp, stop it first.
15168 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
15169 (linux_detach_one_lwp): If detaching from a running lwp, stop it
15170 first. Adjust to linux_wait_for_event interface changes. Use
15172 (linux_detach): Don't delete the main lwp here.
15173 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
15174 (status_pending_p): Don't consider explicitly suspended lwps.
15175 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
15176 pointer. Add OPTIONS argument. Change return type to int. Use
15177 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
15178 (linux_wait_for_event): Take an integer pid instead of a lwp_info
15179 pointer. Add status pointer argument. Return a pid instead of a
15180 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
15181 changes. In non-stop mode, don't switch to a random thread.
15182 (linux_wait): Rename to...
15183 (linux_wait_1): ... this. Add target_options argument, and handle
15184 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
15185 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
15186 clean exit and signal exit code. Don't stop all threads in
15187 non-stop mode. In all-stop mode, only stop all threads when
15188 reporting a stop to GDB. Handle explicit thread stop requests.
15189 (async_file_flush, async_file_mark): New.
15191 (send_sigstop): Use lwpid_of.
15192 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
15193 interface changes. In non-stop mode, don't switch to a random
15195 (linux_resume_one_lwp): Use lwpid_of.
15196 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
15197 (linux_resume_one_thread): ... this. Handle resume_stop. In
15198 non-stop mode, don't look for pending flag in all threads.
15199 (resume_status_pending_p): Don't consider explicitly suspended
15201 (my_waitpid): Reimplement. Emulate __WALL.
15202 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15204 (sigchld_handler, linux_supports_non_stop, linux_async)
15205 (linux_start_non_stop): New.
15206 (linux_target_ops): Register linux_supports_non_stop, linux_async
15207 and linux_start_non_stop.
15208 (initialize_low): Install SIGCHLD handler.
15209 * thread-db.c (thread_db_create_event, find_one_thread)
15210 (thread_db_get_tls_address): Use lwpid_of.
15211 * win32-low.c (win32_detach): Adjust to use resume_kind.
15212 (win32_wait): Add `options' argument.
15213 * spu-low.c (spu_resume): Adjust to use resume_kind.
15214 (spu_wait): Add `options' argument.
15216 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15218 Decouple target code from remote protocol.
15220 * target.h (enum target_waitkind): New.
15221 (struct target_waitstatus): New.
15222 (struct target_ops) <wait>: Return an unsigned long. Take a
15223 target_waitstatus pointer instead of a char pointer.
15224 (mywait): Likewise.
15225 * target.c (mywait): Change prototype to return an unsigned long.
15226 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15227 * server.h (thread_from_wait, old_thread_from_wait): Delete
15229 (prepare_resume_reply): Change prototype to take a
15231 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15232 (last_status, last_ptid): New.
15233 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15234 pid instead of a signal.
15235 (attach_inferior): Remove "status" and "signal" parameters.
15237 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15239 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15240 (handle_v_requests, myresume): Remove "status" and "signal"
15241 parameters. Adjust.
15242 (handle_status): New.
15243 (main): Delete local `status'. Adjust.
15244 * remote-utils.c: Include target.h.
15245 (prepare_resume_reply): Change prototype to take a
15246 target_waitstatus. Adjust.
15248 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15250 * spu-low.c (spu_wait): Adjust.
15251 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15253 (win32_wait): Adjust.
15255 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15257 * target.h (struct thread_resume): Delete leave_stopped member.
15258 (struct target_ops): Add a `n' argument to the `resume' callback.
15259 * server.c (start_inferior): Adjust.
15260 (handle_v_cont, myresume): Adjust.
15261 * linux-low.c (check_removed_breakpoint): Adjust to resume
15262 interface change, and to removed leave_stopped field.
15263 (resume_ptr): Delete.
15264 (struct thread_resume_array): New.
15265 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15266 resume interface change.
15267 (linux_continue_one_thread, linux_queue_one_thread)
15268 (resume_status_pending_p): Check if the resume field is NULL
15269 instead of checking the leave_stopped member.
15270 (linux_resume): Adjust to the target resume interface change.
15271 * spu-low.c (spu_resume): Adjust to the target resume interface
15273 * win32-low.c (win32_detach, win32_resume): Ditto.
15275 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15277 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15279 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15281 (linux_continue_one_thread): Only preserve the stepping flag if
15282 there's a pending breakpoint.
15284 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15286 * server.c (main): After the inferior having exited, call
15287 remote_close before exiting gdbserver.
15289 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15291 Fix size of FPSCR in Power 7 processors.
15292 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15293 (PPC_FEATURE_HAS_DFP): New #define.
15294 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15297 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15299 * server.c (handle_query) Whitespace and formatting.
15301 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15303 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15304 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15305 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15306 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15307 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15308 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15309 Makefile.in, configure.ac: Fix whitespace throughout.
15310 * configure: Regenerate.
15312 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15314 * inferiors.c (find_inferior): Make it safe for the callback
15315 function to delete the currently iterated inferior.
15317 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15319 * Makefile.in (linuw_low_h): Move higher.
15320 (thread-db.o): Depend on $(linux_low_h).
15322 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15324 Rename "process" to "lwp" throughout.
15326 * linux-low.c (all_processes): Rename to...
15327 (all_lwps): ... this.
15328 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15329 (add_process): Rename to ...
15330 (add_lwp): ... this. Adjust.
15331 (linux_create_inferior): Adjust.
15332 (linux_attach_lwp): Adjust.
15333 (linux_attach): Adjust.
15334 (linux_kill_one_process): Rename to ...
15335 (linux_kill_one_lwp): ... this. Adjust.
15336 (linux_kill): Adjust.
15337 (linux_detach_one_process): Rename to ...
15338 (linux_detach_one_lwp): ... this. Adjust.
15339 (linux_detach): Adjust.
15340 (check_removed_breakpoint): Adjust.
15341 (status_pending_p): Adjust.
15342 (linux_wait_for_process): Rename to ...
15343 (linux_wait_for_lwp): ... this. Adjust.
15344 (linux_wait_for_event): Adjust.
15345 (send_sigstop): Adjust.
15346 (wait_for_sigstop): Adjust.
15347 (stop_all_processes): Rename to ...
15348 (stop_all_lwps): ... this.
15349 (linux_resume_one_process): Rename to ...
15350 (linux_resume_one_lwp): ... this. Adjust.
15351 (linux_set_resume_request, linux_continue_one_thread)
15352 (linux_queue_one_thread, resume_status_pending_p)
15353 (usr_store_inferior_registers, regsets_store_inferior_registers)
15354 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15356 * linux-low.h (get_process): Rename to ...
15357 (get_lwp): ... this. Adjust.
15358 (get_thread_process): Rename to ...
15359 (get_thread_lwp): ... this. Adjust.
15360 (get_process_thread): Rename to ...
15361 (get_lwp_thread): ... this. Adjust.
15362 (struct process_info): Rename to ...
15363 (struct lwp_info): ... this.
15364 (all_processes): Rename to ...
15365 (all_lwps): ... this.
15366 * proc-service.c (ps_lgetregs): Adjust.
15367 * thread-db.c (thread_db_create_event, find_one_thread)
15368 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15370 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15372 * server.c (handle_query): Handle "qAttached".
15374 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15376 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15377 GPLv3, update license URL.
15379 2009-03-01 Doug Evans <dje@google.com>
15381 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15382 (server_h): Add gdb_signals.h.
15383 (signals.o): Update.
15384 * server.h (target_signal_from_host,target_signal_to_host_p)
15385 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15387 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15389 * remote-utils.c (getpkt): Also generate remote-debug
15390 information if noack_mode is set.
15392 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15394 * server.c (handle_query): Report qXfer:siginfo:read and
15395 qXfer:siginfo:write as supported and handle them.
15396 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15397 * linux-low.c (linux_xfer_siginfo): New.
15398 (linux_target_ops): Set it.
15400 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15402 * server.c (gdbserver_usage): Mention --remote-debug.
15403 (main): Accept '--remote-debug' switch.
15405 2009-01-18 Doug Evans <dje@google.com>
15407 * regcache.c (new_register_cache): No need to check result of xcalloc.
15408 * server.c (handle_search_memory): Back out calls to xmalloc,
15409 result is checked and error is returned to user upon failure.
15410 (handle_query): Ditto. Add more checks for result of malloc.
15411 (handle_v_cont): Check result of malloc, report error back to
15413 (handle_v_run): Ditto. Call freeargv.
15414 * server.h (freeargv): Declare.
15415 * utils.c (freeargv): New fn.
15417 2009-01-15 Doug Evans <dje@google.com>
15419 * gdbreplay.c (perror_with_name): Make arg const char *.
15420 * server.h (target_signal_to_name): Make return type const char *.
15421 * thread-db.c (thread_db_err_str): Make return type const char *.
15422 * utils.c (perror_with_name): Make arg const char *.
15424 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15426 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15427 when handling a EXIT_PROCESS_DEBUG_EVENT.
15429 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15431 * gdbreplay.c (gdbreplay_version): Update copyright year.
15432 * server.c (gdbserver_version): Likewise.
15434 2009-01-05 Doug Evans <dje@google.com>
15436 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15437 (handle_extended_wait): Improve comment.
15439 2008-12-13 Doug Evans <dje@google.com>
15441 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15442 * server.h (ATTR_MALLOC): New macro.
15443 (xmalloc,xcalloc,xstrdup): Declare.
15444 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15445 * inferiors.c: Ditto.
15446 * linux-low.c: Ditto.
15447 * mem-break.c: Ditto.
15448 * regcache.c: Ditto.
15449 * remote-utils.c: Ditto.
15452 * win32-low.c: Ditto.
15454 2008-12-12 Doug Evans <dje@google.com>
15456 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15457 in debugging printf.
15459 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15461 2008-12-09 Doug Evans <dje@google.com>
15463 * linux-low.h (struct process_info): Delete member tid, unused.
15464 * thread-db.c (find_one_thread): Update.
15465 (maybe_attach_thread): Update.
15467 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15469 * target.h (struct target_ops): Add qxfer_osdata member.
15470 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15472 (linux_qxfer_osdata): New functions.
15473 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15475 * server.c (handle_query): Handle "qXfer:osdata:read:".
15476 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15477 (buffer_xml_printf): New functions.
15478 * server.h (struct buffer): New.
15479 (buffer_grow_str, buffer_grow_str0): New macros.
15480 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15481 (buffer_xml_printf): Declare.
15483 2008-11-24 Doug Evans <dje@google.com>
15485 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15487 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15489 * server.c (handle_v_run): Always use the supplied argument list.
15491 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15493 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15494 (xtensa_regmap_table): Add entry for scompare1.
15496 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15498 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15499 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15500 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15501 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15502 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15503 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15504 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15505 XML target descriptions.
15506 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15507 when inferior is running on an ISA 2.05 or later processor. Add
15508 special case to return offset for full 64-bit slot of FPSCR when
15511 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15513 * Makefile.in (SFILES, clean): Added sparc64 files.
15514 (reg-sparc64.o, reg-sparc64.c): New.
15515 * configure.srv (sparc*-*-linux*): New configuration.
15516 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15517 syscall arguments for SPARC.
15518 (regsets_store_inferior_registers): Likewise.
15519 * linux-sparc-low.c: New file.
15521 2008-10-21 Doug Evans <dje@google.com>
15523 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15524 (READLINE_DIR,READLINE_DEP): Delete.
15525 (INTERNAL_CFLAGS): Update.
15526 (LINTFLAGS): Update.
15528 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15530 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15531 whole argv from the last run, not just argv[0].
15533 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15535 * regcache.c (new_register_cache): Return NULL if the register
15536 cache size isn't known yet.
15537 (free_register_cache): Avoid dereferencing a NULL regcache.
15539 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15541 * configure.srv: Merge MIPS and MIPS64.
15543 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15545 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15547 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15549 * Makefile.in: Add required vsx dependencies.
15551 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15552 Declare init_registers_powerpc_vsx32l.
15553 Declare init_registers_powerpc_vsx64l.
15554 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15555 (ppc_arch_setup): Check for VSX in hwcap.
15556 (ppc_fill_vsxregset): New function.
15557 (ppc_store_vsxregset): New function.
15558 Add new VSX entry in regset_info target_regsets.
15560 * configure.srv: Add new VSX dependencies.
15562 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15564 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15565 (remote_open): Set or clear transport_is_reliable.
15566 (putpkt_binary): Don't expect acks in noack mode.
15567 (getpkt): Don't send ack/nac in noack mode.
15568 * server.c (handle_general_set): Handle QStartNoAckMode.
15569 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15571 (main): Reset noack_mode on every connection.
15572 * server.h (noack_mode): Declare.
15574 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15576 * Makefile.in (GDBREPLAY_OBS): New variable.
15577 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15579 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15580 Daniel Jacobowitz <dan@codesourcery.com>
15582 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15583 (usr_store_inferior_registers): Likewise.
15584 (regsets_store_inferior_registers): Likewise.
15586 2008-07-31 Rolf Jansen <rj@surtec.com>
15587 Pedro Alves <pedro@codesourcery.com>
15589 * configure.ac: Check for memmem declaration.
15590 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15591 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15592 (disable_packet_qfThreadInfo): Unconditionally compile.
15593 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15594 * configure, config.in: Regenerate.
15596 2008-07-28 Doug Kwan <dougkwan@google.com>
15598 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15599 (linux_write_memory): Remove declaration of errno.
15601 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15603 * linux-low.c (handle_extended_wait): Do not use "status"
15604 variable uninitialized.
15606 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15608 * server.c (handle_v_attach): Inhibit reporting dll changes.
15610 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15612 * remote-utils.c (prepare_resume_reply): If requested, don't
15613 output "thread:TID" in the T stop reply.
15615 * server.c (disable_packet_vCont, disable_packet_Tthread)
15616 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15617 (handle_query): If requested, disable support for qC, qfThreadInfo
15619 (handle_v_requests): If requested, disable support for vCont.
15620 (gdbserver_show_disableable): New.
15621 (main): Handle --disable-packet and --disable-packet=LIST.
15623 * server.h (disable_packet_vCont, disable_packet_Tthread)
15624 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15626 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15628 * server.c (gdbserver_usage): Mention --version.
15630 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15632 * Makefile.in (gdbreplay.o): New rule.
15634 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15636 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15637 message, not gdbserver.
15639 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15640 Nathan Sidwell <nathan@codesourcery.com>
15641 Joseph Myers <joseph@codesourcery.com>
15643 * acinclude.m4: Include ../../config/acx.m4.
15644 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15645 * configure, config.in: Regenerate.
15646 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15647 * server.c (gdbserver_version): Print PKGVERSION.
15648 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15649 (main): Adjust gdbserver_usage calls.
15650 * gdbreplay.c (version, host_name): Add declarations.
15651 (gdbreplay_version, gdbreplay_usage): New.
15652 (main): Accept --version and --help options.
15654 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15656 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15657 (arm_breakpoint_at): Handle Thumb.
15658 (the_low_target): Add comment.
15660 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15662 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15664 2008-05-09 Doug Evans <dje@google.com>
15666 * server.h (decode_search_memory_packet): Declare.
15667 * remote-utils.c (decode_search_memory_packet): New fn.
15668 * server.c (handle_search_memory_1): New fn.
15669 (handle_search_memory): New fn.
15670 (handle_query): Process qSearch:memory packets.
15672 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15674 * regcache.c (registers_length): Remove.
15675 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15676 full register packet.
15677 * regcache.h (registers_length): Remove prototype.
15678 * server.h (PBUFSIZ): Define to 16384.
15680 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15682 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15683 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15684 powerpc-64l.o, and powerpc-altivec64l.o.
15685 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15686 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15687 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15688 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15689 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15692 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15693 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15694 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15695 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15696 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15697 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15698 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15699 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15700 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15701 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15704 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15705 (init_registers_powerpc_32l): ... this new prototype.
15706 (init_registers_powerpc_32): Remove, replace by ...
15707 (init_registers_powerpc_altivec32l): ... this new prototype.
15708 (init_registers_powerpc_e500): Remove, replace by ...
15709 (init_registers_powerpc_e500l): ... this new prototype.
15710 (init_registers_ppc64): Remove, replace by ...
15711 (init_registers_powerpc_64l): ... this new prototype.
15712 (init_registers_powerpc_64): Remove, replace by ...
15713 (init_registers_powerpc_altivec64l): ... this new prototype.
15714 (ppc_num_regs): Set to 73.
15715 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15716 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15717 (ppc_cannot_store_register): Handle orig_r3 and trap.
15718 (ppc_arch_setup): Update init_registers_... calls.
15719 (ppc_fill_gregset): Handle orig_r3 and trap.
15721 * inferiors.c (clear_inferiors): Reset current_inferior.
15723 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15725 * acinclude.m4: Add override.m4.
15726 * configure: Regenerate.
15728 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15730 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15731 initial call to init_register_ppc64.
15733 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15735 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15736 single powerpc*-*-linux* case.
15737 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15739 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15741 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15742 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15744 * linux-ppc-low.c: Include <elf.h>.
15745 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15746 (ppc_hwcap): New global variable.
15747 (ppc_regmap): Remove __SPE__ #ifdef sections.
15748 (ppc_regmap_e500): New global variable.
15749 (ppc_cannot_store_register): Update __SPE__ special case.
15750 (ppc_get_hwcap): New function.
15751 (ppc_arch_setup): Use it to determine whether inferior supports
15752 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15753 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15754 Do not access registers if target does not support AltiVec.
15755 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15756 Do not access registers if target does not support SPE.
15757 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15759 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15761 * linux-low.c (disabled_regsets, num_regsets): New.
15762 (use_regsets_p): Delete.
15763 (linux_wait_for_process): Clear disabled_regsets.
15764 (regsets_fetch_inferior_registers): Check and set it.
15765 (regsets_store_inferior_registers): Likewise.
15766 (linux_fetch_registers, linux_store_registers): Do not use
15768 (initialize_low): Allocate disabled_regsets.
15770 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15772 * Makefile.in (LIBOBJS): New.
15773 (OBS): Use LIBOBJS.
15774 (memmem.o): New rule.
15775 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15776 * configure: Regenerated.
15778 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15780 * server.c (handle_query): Never return "unsupported" for
15781 qXfer:features:read queries.
15783 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15785 * server.c (get_features_xml): Fix inverted condition.
15786 (handle_query): Always support qXfer:feature:read.
15788 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15790 * server.c (wrapper_argv): New.
15791 (start_inferior): Handle wrapper_argv. If set, expect an extra
15793 (gdbserver_usage): Document --wrapper.
15794 (main): Parse --wrapper.
15796 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15798 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15799 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15800 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15801 (ppc_set_pc): Likewise.
15802 (ppc_arch_setup): New function.
15803 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15804 of collect_register.
15805 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15807 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15809 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15810 instead of linux-ppc64-low.o.
15811 * linux-ppc64-low.c: Remove file.
15812 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15813 (linux-ppc64-low.o): Remove rule.
15815 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15816 (init_registers_powerpc_64): Likewise.
15817 (ppc_regmap): Conditionally define depending on __powerpc64__.
15818 (ppc_cannot_store_register): Do not special-case "fpscr" when
15819 compiled on __powerpc64__.
15820 (ppc_collect_ptrace_register): New function.
15821 (ppc_supply_ptrace_register): New function.
15822 (ppc_breakpoint): Change type to "unsigned int".
15823 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15824 (the_low_target): Conditionally provide initializers for the
15825 arch_setup member depending on __powerpc64__. Install
15826 collect_ptrace_register and supply_ptrace_register members.
15828 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15830 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15831 * server.c (gdbserver_xmltarget): Define.
15832 (get_features_xml): Use it to replace "target.xml" and arch_string.
15834 * configure.srv: Remove srv_xmltarget. Add XML files that were
15835 mentioned there to srv_xmlfiles instead. Remove conditional tests
15836 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15837 srv_xmlfiles and srv_regobj to include all possible choices.
15838 * configure.ac (srv_xmltarget): Remove.
15839 (srv_xmlfiles): Do not add "target.xml".
15840 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15841 checks for supplementary target information.
15842 * configure: Regenerate.
15843 * Makefile.in (XML_TARGET): Remove.
15844 (target.xml): Remove rule.
15845 (clean): Do not clean up target.xml.
15846 (.PRECIOUS): Do not mention target.xml.
15848 * target.h (struct target_ops): Remove arch_string member.
15849 * linux-low.c (linux_arch_string): Remove.
15850 (linux_target_ops): Remove arch_string initializer.
15851 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15852 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15853 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15854 * spu-low.c (spu_arch_string): Remove.
15855 (spu_target_ops): Remove arch_string initializer.
15856 * win32-low.c (win32_arch_string): Remove.
15857 (win32_target_ops): Remove arch_string initializer.
15858 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15859 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15860 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15862 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15864 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15865 by collect_ptrace_register and supply_ptrace_register hooks.
15866 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15867 instead of checking for the_low_target.left_pad_xfer.
15868 (usr_store_inferior_registers): Use collect_ptrace_register callback
15869 instead of checking for the_low_target.left_pad_xfer.
15871 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15872 (s390_supply_ptrace_register): Likewise.
15873 (s390_fill_gregset): Call s390_collect_ptrace_register.
15874 (the_low_target): Update.
15876 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15877 (ppc_supply_ptrace_register): Likewise.
15878 (the_low_target): Update.
15880 * linux-i386-low.c (the_low_target): Update.
15881 * linux-x86-64-low.c (the_low_target): Update.
15883 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15885 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15886 reg-s390.o and reg-s390x.o.
15888 * linux-low.c (new_inferior): New global variable.
15889 (linux_create_inferior, linux_attach): Set it.
15890 (linux_wait_for_process): Call the_low_target.arch_setup after the
15891 target has stopped for the first time.
15892 (initialize_low): Do not call the_low_target.arch_setup.
15894 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15895 (s390_set_pc): Likewise.
15896 (s390_arch_setup): New function.
15897 (the_low_target): Use s390_arch_setup as arch_setup routine.
15899 * regcache.c (realloc_register_cache): New function.
15900 (set_register_cache): Call it for each existing regcache.
15902 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15904 * server.h (init_registers): Remove prototype.
15906 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15907 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15908 instead of init_registers ().
15909 * linux-arm-low.c (init_registers_arm): Add prototype.
15910 (init_registers_arm_with_iwmmxt): Likewise.
15911 (the_low_target): Add initializer for arch_setup field.
15912 * linux-cris-low.c (init_registers_cris): Add prototype.
15913 (the_low_target): Add initializer for arch_setup field.
15914 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15915 (the_low_target): Add initializer for arch_setup field.
15916 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15917 (the_low_target): Add initializer for arch_setup field.
15918 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15919 (the_low_target): Add initializer for arch_setup field.
15920 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15921 (the_low_target): Add initializer for arch_setup field.
15922 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15923 (the_low_target): Add initializer for arch_setup field.
15924 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15925 (init_registers_mips64_linux): Likewise.
15926 (the_low_target): Add initializer for arch_setup field.
15927 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15928 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15929 (the_low_target): Add initializer for arch_setup field.
15930 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15931 (init_registers_powerpc_64): Likewise.
15932 (the_low_target): Add initializer for arch_setup field.
15933 * linux-s390-low.c (init_registers_s390): Add prototype.
15934 (init_registers_s390x): Likewise.
15935 (the_low_target): Add initializer for arch_setup field.
15936 * linux-sh-low.c (init_registers_sh): Add prototype.
15937 (the_low_target): Add initializer for arch_setup field.
15938 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15939 (the_low_target): Add initializer for arch_setup field.
15940 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15941 (the_low_target): Add initializer for arch_setup field.
15943 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15944 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15945 instead of init_registers ().
15946 * win32-arm-low.c (init_registers_arm): Add prototype.
15947 (the_low_target): Add initializer for arch_setup field.
15948 * win32-i386-low.c (init_registers_i386): Add prototype.
15949 (the_low_target): Add initializer for arch_setup field.
15951 * spu-low.c (init_registers_spu): Add prototype.
15952 (initialize_low): Call initialie_registers_spu () instead of
15953 initialize_registers ().
15955 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15957 * server.c (handle_v_requests): When handling the vRun and vAttach
15958 packets, if already debugging a process, don't kill it. Return an
15961 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15963 * server.c (handle_query): Correct length check.
15965 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15967 * win32-low.c (do_initial_child_stuff): Add process handle
15968 parameter. Set current_process_handle and current_process_id from the
15969 parameters. Clear globals.
15970 (win32_create_inferior): Don't set current_process_handle and
15971 current_process_id here. Instead pass them on the call to
15972 do_initial_child_stuff.
15973 (win32_attach): Likewise.
15974 (win32_clear_inferiors): New.
15975 (win32_kill): Don't close the current process handle or the
15976 current thread handle here. Instead call win32_clear_inferiors.
15977 (win32_detach): Don't open a new handle to the process. Call
15978 win32_clear_inferiors.
15979 (win32_join): Don't rely on current_process_handle; open a new
15980 handle using the process id.
15981 (win32_wait): Call win32_clear_inferiors when the inferior process
15984 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15986 * server.c (monitor_show_help): Add "exit".
15988 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15990 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15991 (clean): Add reg-xtensa.c.
15992 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15993 * configure.srv (xtensa*-*-linux*) New target.
15994 * linux-xtensa-low.c: New.
15995 * xtensa-xtregs.c: New.
15997 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15999 * hostio.c: Don't include errno.h.
16000 (errno_to_fileio_errno): Move to hostio-errno.
16001 * hostio.c: (hostio_error): Remove the error parameter. Defer the
16002 error number outputting to the target->hostio_last_error callback.
16003 (hostio_packet_error): Use FILEIO_EINVAL directly.
16004 (handle_open, handle_pread, hostio_error, handle_unlink): Update
16005 calls to hostio_error.
16006 * hostio-errno.c: New.
16007 * server.h (hostio_last_error_from_errno): Declare.
16008 * target.h (target_ops): Add hostio_last_error member.
16009 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
16010 as hostio_last_error handler.
16011 * spu-low.c (spu_target_ops): Likewise.
16012 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
16013 (wince_hostio_last_error): New functions.
16014 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
16015 as hostio_last_error handler.
16016 (win32_target_ops) [!_WIN32_WCE]: Register
16017 hostio_last_error_from_errno as hostio_last_error handler.
16018 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
16019 (hostio-errno.o): New rule.
16020 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
16021 * configure.srv (srv_hostio_err_objs): New variable. Default to
16023 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
16024 * configure: Regenerate.
16026 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16028 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
16029 (linux_kill, linux_detach): Clean up the process list.
16030 * remote-utils.c (remote_open): Improve port number parsing.
16031 (putpkt_binary, input_interrupt): Only send interrupts if the target
16033 * server.c (extended_protocol): Make static.
16034 (attached): Define earlier.
16035 (exit_requested, response_needed, program_argv): New variables.
16036 (target_running): New.
16037 (start_inferior): Clear attached here.
16038 (attach_inferior): Set attached here.
16039 (require_running): Define.
16040 (handle_query): Use require_running and target_running. Implement
16042 (handle_v_attach, handle_v_run): New.
16043 (handle_v_requests): Use require_running. Handle vAttach and vRun.
16044 (gdbserver_usage): Update.
16045 (main): Redo argument parsing. Handle --debug and --multi. Handle
16046 --attach along with other options or after the port. Save
16047 program_argv. Support no initial program. Resynchronize
16048 communication with GDB after an error. Handle "monitor exit".
16049 Use require_running and target_running. Always allow the extended
16050 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
16051 restart in extended mode.
16052 * README: Refer to the GDB manual. Update --attach usage.
16054 2007-12-20 Andreas Schwab <schwab@suse.de>
16056 * linux-low.c (STACK_SIZE): Define.
16057 (linux_tracefork_child): Use it. Use __clone2 on ia64.
16058 (linux_test_for_tracefork): Likewise.
16060 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
16062 * linux-low.c (linux_wait_for_event): Update messages. Do not
16063 reinsert auto-delete breakpoints.
16064 * mem-break.c (struct breakpoint): Change return type of handler to
16066 (set_breakpoint_at): Update handler type.
16067 (reinsert_breakpoint_handler): Return 1 instead of calling
16069 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
16071 (check_breakpoints): Delete auto-delete breakpoints and return 2.
16072 * mem-break.h (set_breakpoint_at): Update handler type.
16073 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
16074 * win32-low.c (auto_delete_breakpoint): New.
16075 (get_child_debug_event): Use it.
16077 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
16079 * configure.ac: Check for pread and pwrite.
16080 * hostio.c (handle_pread): Fall back to lseek and read.
16081 (handle_pwrite): Fall back to lseek and write.
16082 * config.in, configure: Regenerated.
16084 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
16086 * server.c (myresume): Add own_buf argument.
16087 (main): Update calls.
16089 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
16091 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
16092 * remote-utils.c (remote_open): Do not call disable_async_io.
16093 (block_async_io): Delete.
16094 (unblock_async_io): Make static.
16095 (initialize_async_io): New.
16096 * server.c (handle_v_cont): Handle async I/O here.
16097 (myresume): Likewise. Move other common resume tasks here...
16098 (main): ... from here. Call initialize_async_io. Disable async
16099 I/O before the main loop.
16100 * server.h (initialize_async_io): Declare.
16101 (block_async_io, unblock_async_io): Delete prototypes.
16102 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
16104 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
16106 * remote-utils.c (readchar): Allow binary data in received messages.
16108 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16110 * win32-low.c (attaching): New global.
16111 (win32_create_inferior): Clear the `attaching' global.
16112 (win32_attach): Set the `attaching' global.
16113 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
16114 attaching. Only set a breakpoint at the entry point if not
16117 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16119 * server.c (main): Don't report dll events on the initial
16120 connection on attaches.
16122 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16124 * server.c (main): Relax numerical bases supported for the pid of
16125 the --attach command line argument.
16127 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16129 * win32-low.c (win32_attach): Call OpenProcess before
16130 DebugActiveProcess, not after. Add last error output to error
16133 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
16135 * win32-low.c (win32_get_thread_context)
16136 (win32_set_thread_context): New functions.
16137 (thread_rec): Use win32_get_thread_context.
16138 (continue_one_thread, win32_resume): Use win32_set_thread_context.
16139 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
16142 2007-12-03 Leo Zayas
16143 Pedro Alves <pedro_alves@portugalmail.pt>
16145 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
16147 (child_add_thread): Minor cleanup.
16148 (child_continue): Resume artificially suspended threads before
16149 calling ContinueDebugEvent.
16150 (suspend_one_thread): New.
16151 (fake_breakpoint_event): New.
16152 (get_child_debug_event): Change return type to int. Check here if
16153 gdb sent an interrupt request. If a soft interrupt was requested,
16154 fake a breakpoint event. Return 0 if there is no event to handle,
16156 (win32_wait): Don't check here if gdb sent an interrupt request.
16157 Ensure there is a valid event to handle.
16158 (win32_request_interrupt): Add soft interruption method as last
16161 2007-12-03 Leo Zayas
16162 Pedro Alves <pedro_alves@portugalmail.pt>
16164 * win32-low.h (win32_thread_info): Add descriptions to the
16165 structure members. Replace `suspend_count' counter by a
16167 * win32-low.c (thread_rec): Update condition of when to get the
16168 context from the inferior. Rely on ContextFlags being set if it
16169 has already been retrieved. Only suspend the inferior thread if
16170 we haven't already. Warn if that fails.
16171 (continue_one_thread): s/suspend_count/suspended/. Only call
16172 ResumeThread once. Warn if that fails.
16174 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16176 * win32-low.c (win32_wait): Don't read from the inferior when it
16177 has already exited.
16179 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
16181 * Makefile.in (win32_low_h): New variable.
16182 (win32-low.o): Add dependency on $(win32_low_h).
16183 (win32-arm-low.o, win32-i386-low.o): New rules.
16185 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16187 * hostio.c: Correct copyright year.
16189 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
16191 * Makefile.in (OBS): Add hostio.o.
16192 (hostio.o): New rule.
16193 * server.h (handle_vFile): Declare.
16194 * hostio.c: New file.
16195 * server.c (handle_v_requests): Take packet_len and new_packet_len
16196 for binary packets. Call handle_vFile.
16197 (main): Update call to handle_v_requests.
16199 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16201 * linux-low.c: Include <sched.h>.
16203 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16205 * linux-low.c (linux_tracefork_grandchild): New.
16206 (linux_tracefork_child): Use clone.
16207 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16209 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16211 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16213 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16215 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16217 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16219 * inferiors.c (change_inferior_id): Delete.
16220 (add_pid_to_list, pull_pid_from_list): New.
16221 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16222 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16223 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16224 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16225 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16226 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16227 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16228 (using_threads): Always set to 1.
16229 (handle_extended_wait): New.
16230 (add_process): Do not set TID.
16231 (linux_create_inferior): Set must_set_ptrace_flags.
16232 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16233 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16234 (linux_thread_alive): Rename TID argument to LWPID.
16235 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16236 (linux_wait_for_event): Do not use TID or check using_threads. Update
16237 call to dead_thread_notify. Call handle_extended_wait.
16238 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16239 (send_sigstop): Delete sigstop_sent.
16240 (wait_for_sigstop): Avoid TID.
16241 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16242 (linux_test_for_tracefork): New.
16243 (linux_lookup_signals): Use thread_db_active and
16244 linux_supports_tracefork_flag.
16245 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16246 * linux-low.h (get_process_thread): Avoid TID.
16247 (struct process_ifo): Move thread_known and tid to the end. Remove
16249 (linux_attach_lwp, thread_db_init): Update prototypes.
16250 * server.h (change_inferior_id): Delete prototype.
16251 (add_pid_to_list, pull_pid_from_list): New prototypes.
16252 * thread-db.c (thread_db_use_events): New.
16253 (find_first_thread): Rename to...
16254 (find_one_thread): ...this. Update callers and messages. Do not
16255 call fatal. Check thread_db_use_events. Do not call
16256 change_inferior_id or new_thread_notify.
16257 (maybe_attach_thread): Update. Do not call new_thread_notify.
16258 (thread_db_init): Set thread_db_use_events. Check use_events.
16259 * utils.c (fatal, warning): Correct message prefix.
16261 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16263 * Makefile.in (clean): Remove new files.
16264 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16265 (powerpc-64.o, powerpc-64.c): New rules.
16266 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16267 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16269 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16271 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16272 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16273 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16274 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16275 (target_regsets): Add AltiVec and SPE register sets.
16276 * configure.ac: Check for AltiVec and SPE.
16277 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16278 (ppc_fill_vrregset, ppc_store_vrregset): New.
16279 (target_regsets): Add AltiVec register set.
16280 * configure: Regenerated.
16282 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16284 * linux-low.c (O_LARGEFILE): Define.
16285 (linux_read_memory): Use /proc/PID/mem.
16286 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16287 * configure, config.in: Regenerated.
16289 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16291 * linux-low.c (linux_wait_for_event): Do not pass signals while
16294 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16296 * win32-low.c (create_process): New.
16297 (win32_create_inferior): Use create_process instead of
16298 CreateProcess. If create_process failed retry appending an ".exe"
16299 suffix. Store the GetLastError result immediatelly after
16300 create_process calls and use it on the call to error.
16302 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16304 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16306 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16308 * configure.ac: Switch license to GPLv3.
16310 2007-08-01 Michael Snyder <msnyder@access-company.com>
16312 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16314 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16316 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16318 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16319 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16320 CloseToolhelp32Snapshot.
16321 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16322 CloseToolhelp32Snapshot.
16324 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16326 * server.c (main): Check for inferior exit before main loop.
16328 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16330 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16331 instead of on tmp_desc.
16333 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16334 Daniel Jacobowitz <dan@codesourcery.com>
16336 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16337 (add_thread): Minor cleanups.
16338 (clear_inferiors): Move lower in the file. Clear the DLL
16340 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16341 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16342 (xml_escape_text): New.
16343 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16345 (handle_v_cont): Report errors.
16346 (gdbserver_version): Update.
16347 (main): Correct size of own_buf. Do not report initial DLL events.
16348 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16349 (unloaded_dll, xml_escape_text): New.
16350 * win32-low.c (enum target_waitkind): Update comments.
16351 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16352 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16353 (win32_EnumProcessModules, win32_GetModuleInformation)
16354 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16355 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16356 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16357 (win32_Module32First, win32_Module32Next, load_toolhelp)
16358 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16359 (get_child_debug_event): Handle DLL events.
16360 (win32_wait): Likewise.
16362 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16364 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16365 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16367 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16369 * win32-low.c (handle_output_debug_string): Ignore event if not
16372 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16374 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16376 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16378 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16380 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16382 * inferiors.c (change_inferior_id): Add comment.
16383 * linux-low.c (check_removed_breakpoint): Add an early
16384 prototype. Improve debug output.
16385 (linux_attach): Doc update.
16386 (linux_detach_one_process, linux_detach): Clean up before releasing
16388 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16389 * linux-low.h (struct process_info): Doc improvement.
16390 * mem-break.c (delete_all_breakpoints): New.
16391 * mem-break.h (delete_all_breakpoints): New prototype.
16392 * thread-db.c (find_first_thread): New.
16393 (thread_db_create_event): Call it instead of
16394 thread_db_find_new_threads. Clean up unused variables.
16395 (maybe_attach_thread): Remove first thread handling.
16396 (thread_db_find_new_threads): Use find_first_thread.
16397 (thread_db_get_tls_address): Likewise.
16399 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16401 * thread-db.c (thread_db_find_new_threads): Add prototype.
16402 (thread_db_create_event): Check for the main thread before adding
16404 (maybe_attach_thread): Only enable event reporting if TID == 0.
16405 (thread_db_get_tls_address): Check for new threads.
16407 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16409 * linux-low.c (linux_create_inferior): Try execv before execvp.
16410 * spu-low.c (spu_create_inferior): Likewise.
16412 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16414 * linux-low.c (linux_create_inferior): Change execv to execvp.
16415 * spu-low.c (spu_create_inferior): Likewies.
16417 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16419 * Makefile.in (clean): Clean new files instead of deleted ones.
16420 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16421 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16423 * configure.srv: Specify XML files and new regformats for MIPS and
16425 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16426 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16427 an entry for the restart register.
16428 (mips_cannot_fetch_register, mips_cannot_store_register)
16429 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16430 register names to match the XML descriptions.
16431 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16432 restart register instead of $0.
16434 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16435 Markus Deuling <deuling@de.ibm.com>
16437 * remote-utils.c (decode_xfer_write): New function.
16438 * server.h (decode_xfer_write): Add prototype.
16439 * server.c (handle_query): Add PACKET_LEN argument. Support
16440 qXfer:spu:read and qXfer:spu:write packets.
16441 (main): Pass packet_len to handle_query.
16442 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16443 * target.h (target_ops): Add qxfer_spu.
16445 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16447 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16448 accessing non-seekable spufs files.
16450 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16452 * server.c (handle_query): Add reply for qC packet.
16454 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16455 Leo Zayas <lerele@champenstudios@com>
16457 * server.h (check_remote_input_interrupt_request): New function.
16458 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16459 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16460 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16461 (check_remote_input_interrupt_request): New function.
16462 * server.h (check_remote_input_interrupt_request): Declare.
16463 * win32-low.c (winapi_DebugBreakProcess,
16464 winapi_GenerateConsoleCtrlEvent): New typedefs.
16465 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16467 (win32_wait): Check for remote interrupt request
16468 with check_remote_input_interrupt_request.
16469 (win32_request_interrupt): New function.
16470 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16472 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16474 * win32-low.c (debug_registers_changed,
16475 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16476 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16477 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16478 (thread_rec): Get context using the low target.
16479 (child_add_thread): Call thread_added on the low target,
16480 which does the same thing.
16482 (do_initial_child_stuff): Remove debug registers references.
16483 Set context using the low target. Resume threads after
16484 setting the contexts.
16485 (child_continue): Remove dead variable. Remove debug
16486 registers references.
16487 (child_fetch_inferior_registers): Go through the low target.
16488 (do_child_store_inferior_registers): Remove.
16489 (child_store_inferior_registers): Go through the low target.
16490 (win32_resume): Remove debug registers references.
16491 Set context using the low target.
16492 (handle_exception): Change return type to void. Don't record
16493 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16494 first chance exception.
16495 (get_child_debug_event): Change return type to void. Remove
16496 goto loop. Always return after waiting for debug event.
16497 (win32_wait): Convert to switch statement. Handle spurious
16500 * win32-i386-low.c (debug_registers_changed,
16501 debug_registers_used): New.
16502 (initial_stuff): Rename to ...
16503 (i386_initial_stuff): ... this. Clear debug registers
16505 (store_debug_registers): Delete.
16506 (i386_get_thread_context): New.
16507 (load_debug_registers): Delete.
16508 (i386_set_thread_context): New.
16509 (i386_thread_added): New.
16510 (single_step): Rename to ...
16511 (i386_single_step): ... this.
16512 (do_fetch_inferior_registers): Rename to ...
16513 (i386_fetch_inferior_register): ... this.
16514 (i386_store_inferior_register): New.
16515 (the_low_target): Adapt to new interface.
16517 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16518 (arm_get_thread_context): New.
16519 (arm_set_thread_context): New.
16521 (do_fetch_inferior_registers): Rename to ...
16522 (arm_fetch_inferior_register): ... this.
16523 (arm_store_inferior_register): New.
16524 (arm_wince_breakpoint): Reimplement as unsigned long.
16525 (arm_wince_breakpoint_len): Define.
16526 (the_low_target): Adapt to new interface.
16528 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16529 load_debug_registers. Add get_thread_context, set_thread_context,
16530 thread_added and store_inferior_register. Rename
16531 fetch_inferior_registers to fetch_inferior_register.
16532 (regptr): Remove declaration.
16534 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16536 * linux-low.c (linux_detach): Change return type to int. Return 0.
16537 * spu-low.c (spu_detach): Likewise.
16539 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16541 * target.h (target_ops): Change return type of detach to int.
16543 (join_inferior): New.
16544 * server.c (main): Don't skip detach support on mingw32.
16545 If the inferior doesn't support detaching return error.
16546 Call join_inferior instead of using waitpid.
16547 * linux-low.c (linux_join): New.
16548 (linux_target_op): Add linux_join.
16549 * spu-low.c (spu_join): New.
16550 (spu_target_ops): Add spu_join.
16551 * win32-low.c (win32_detach): Adapt to new interface.
16552 Reopen current_process_handle before detaching. Issue a child
16553 resume before detaching.
16555 (win32_target_op): Add win32_join.
16557 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16559 * win32-low.c (win32-attach): Fix return value.
16560 * target.h (target_ops): Describe ATTACH return values.
16562 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16564 * win32-low.c (GETPROCADDRESS): Define.
16565 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16566 (winapi_DebugSetProcessKillOnExit): Likewise.
16567 (win32_create_inferior): Force usage of ansi CreateProcessA.
16568 (win32_attach): Use GETPROCADDRESS.
16569 (win32_detach): Likewise.
16571 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16573 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16575 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16577 * win32-low.c: Commit leftover changes from 2007-03-29.
16579 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16581 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16582 fields short instead of int. Add explicit padding.
16583 (i387_cache_to_fsave): Remove unnecessary casts.
16584 (i387_fsave_to_cache): Doc fix.
16585 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16587 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16589 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16590 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16592 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16594 * configure.srv (arm*-*-mingw32ce*): Move near the other
16597 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16599 * configure.ac: Add errno checking.
16600 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16601 sys/file.h and malloc.h.
16602 (AC_CHECK_DECLS): Add perror.
16603 (srv_mingwce): Handle.
16604 * configure.srv (i[34567]86-*-cygwin*): Add
16605 win32-i386-low.o to srv_tgtobj.
16606 (i[34567]86-*-mingw*): Likewise.
16607 (arm*-*-mingw32ce*): Add case.
16608 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16609 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16610 [__MINGW32CE__] (strerror): New function.
16611 [__MINGW32CE__] (errno): Define to GetLastError.
16612 [__MINGW32CE__] (COUNTOF): New macro.
16613 (remote_open): Remove extra close call.
16614 * mem-break.c (delete_breakpoint_at): New function.
16615 * mem-break.h (delete_breakpoint_at): Declare.
16616 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16617 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16618 [USE_WIN32API] (read, write): Add char* casts.
16619 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16620 * server.h: Include wincecompat.h on Windows CE.
16621 [HAVE_ERRNO_H]: Check.
16622 (perror): Declare if not declared.
16623 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16624 (perror_with_name): Remove errno declaration.
16625 * wincecompat.h: New.
16626 * wincecompat.c: New.
16627 * win32-low.h: New.
16628 * win32-arm-low.c: New.
16629 * win32-i386-low.c: New.
16630 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16631 (OUTMSG2): Make it safe.
16633 (COUNTOF): New macro.
16634 (NUM_REGS): Get it from the low target.
16635 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16636 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16637 (thread_rec): Let low target handle debug registers.
16638 (child_add_thread): Likewise.
16639 (child_init_thread_list): Likewise.
16640 (continue_one_thread): Likewise.
16642 (do_child_fetch_inferior_registers): Move to ...
16643 * win32-i386-low.c: ... here, and rename to ...
16644 (do_fetch_inferior_registers): ... this.
16645 * win32-low.c (child_fetch_inferior_registers):
16646 Go through the low target.
16647 (do_child_store_inferior_registers): Use regptr.
16648 (strwinerror): New function.
16649 (win32_create_inferior): Handle Windows CE.
16650 Use strwinerror instead of strerror on Windows error
16651 codes. Add program to the error output.
16652 Don't close the main thread handle on Windows CE.
16653 (win32_attach): Use coredll.dll on Windows CE.
16654 (win32_kill): Close current process and current
16656 (win32_detach): Use coredll.dll on Windows CE.
16657 (win32_resume): Let low target handle debug registers, and
16659 (handle_exception): Add/Remove initial breakpoint. Avoid
16660 non-existant WSTOPSIG on Windows CE.
16661 (win32_read_inferior_memory): Cast to remove warning.
16662 (win32_arch_string): Go through the low target.
16663 (initialize_low): Call set_breakpoint_data with the low
16664 target's breakpoint.
16665 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16666 FOP_REGNUM, mappings): Move to ...
16667 * win32-i386-low.c: ... here.
16668 * win32-low.c (win32_thread_info): Move to ...
16669 * win32-low.h: ... here.
16670 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16671 win32-arm-low.c and wincecompat.c.
16672 (all:): Add $EXEEXT.
16673 (install-only:): Likewise.
16674 (gdbserver:): Likewise.
16675 (gdbreplay:): Likewise.
16676 * config.in: Regenerate.
16677 * configure: Regenerate.
16679 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16681 * win32-low.c: Rename typedef thread_info to
16682 win32_thread_info throughout.
16684 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16686 * win32-i386-low.c: Rename to ...
16687 * win32-low.c: ... this.
16688 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16689 * Makefile.in: Likewise.
16691 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16693 * remote-utils.c (monitor_output): Constify msg parameter.
16694 * server.h (monitor_output): Likewise.
16695 * win32-i386-low.c (handle_output_debug_string): New.
16696 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16697 handle_output_debug_string.
16698 (get_child_debug_event): Likewise.
16700 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16702 * server.c (main): Correct strtoul check.
16704 2007-03-27 Jon Ringle <jon@ringle.org>
16706 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16708 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16710 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16712 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16714 * terminal.h: Check HAVE_SGTTY_H.
16716 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16718 * remote-utils.c (remote_open): Print out the assigned port number.
16720 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16722 * remote-utils.c (monitor_output): New function.
16723 * server.c (debug_threads): Define here.
16724 (monitor_show_help): New function.
16725 (handle_query): Handle qRcmd.
16726 (main): Do not handle 'd' packet.
16727 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16728 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16731 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16733 * Makefile.in (EXEEXT): New.
16734 (clean): Use $(EXEEXT).
16736 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16738 * target.h (target_ops): Rename send_signal to request_interrupt,
16739 and remove enum target_signal parameter.
16740 * linux-low.c (linux_request_interrupt): Rename from
16741 linux_send_signal, and always send SIGINT.
16742 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16743 and always send SIGINT.
16744 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16746 (input_interrupt): Likewise.
16748 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16750 * server.c (get_features_xml): Check if target implemented
16752 * win32-i386-low.c (win32_arch_string): New.
16753 (win32_target_ops): Add win32_arch_string as arch_string member.
16755 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16757 * spu-low.c (spu_arch_string): New.
16758 (spu_target_ops): Add spu_arch_string.
16760 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16762 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16763 * configure.ac: Do not check for terminal.h.
16764 * configure, config.in: Regenerated.
16766 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16768 * Makefile.in (OBS): Add $(XML_BUILTIN).
16769 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16771 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16772 (arm-with-iwmmxt.c): New.
16773 * config.in, configure: Regenerate.
16774 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16775 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16776 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16777 (arm*-*-linux*): Add iWMMXt and regset support.
16778 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16779 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16780 (arm_store_wmmxregset, target_regsets): New.
16781 * server.c (get_features_xml): Take annex argument. Check builtin
16783 (handle_query): Handle multiple annexes.
16785 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16787 * remote-utils.c [USE_WIN32API] (read, write): Define.
16788 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16791 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16793 * linux-i386-low.c (the_low_target): Set arch_string.
16794 * linux-x86-64-low.c (the_low_target): Likewise.
16795 * linux-low.c (linux_arch_string): New.
16796 (linux_target_ops): Add it.
16797 * linux-low.h (struct linux_target_ops): Add arch_string.
16798 * server.c (write_qxfer_response): Use const void * for DATA.
16799 (get_features_xml): New.
16800 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16801 * target.h (struct target_ops): Add arch_string method.
16803 2007-01-03 Denis Pilat <denis.pilat@st.com>
16804 Daniel Jacobowitz <dan@codesourcery.com>
16806 * linux-low.c (linux_kill): Handle being called with no threads.
16807 * win32-i386-low.c (win32_kill): Likewise.
16808 (get_child_debug_event): Clear current_process_handle.
16810 2006-12-30 Denis PILAT <denis.pilat@st.com>
16811 Daniel Jacobowitz <dan@codesourcery.com>
16813 * remote-utils.c (remote_open): Check the type of specified
16814 serial port devices before opening them.
16815 * server.c (main): Kill the inferior if an error occurs during
16816 the first remote_open.
16818 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16820 * README: Update supported targets.
16822 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16824 * Makefile.in (clean): Remove reg-mips64.c.
16825 (reg-mips64.c, reg-mips64.o): New rules.
16826 * configure.srv: Handle mips64. Include regset support for mips.
16827 * linux-mips-low.c (union mips_register): New.
16828 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16829 (mips_breakpoint, mips_breakpoint_at): Use int.
16830 (mips_collect_register, mips_supply_register)
16831 (mips_collect_register_32bit, mips_supply_register_32bit)
16832 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16833 (mips_store_fpregset, target_regsets): New.
16834 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16836 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16838 * configure.srv: Add target "spu*-*-*".
16839 * Makefile.in (clean): Remove reg-spu.c.
16840 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16841 * spu-low.c: New file.
16843 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16845 * configure.ac: Correct td_thr_tls_get_addr test.
16846 * configure: Regenerated.
16848 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16850 * linux-low.c (linux_wait_for_event): Reformat. Use the
16851 pass_signals array.
16852 * remote-utils.c (decode_address_to_semicolon): New.
16853 * server.c (pass_signals, handle_general_set): New.
16854 (handle_query): Mention QPassSignals for qSupported.
16855 (main): Call handle_general_set.
16856 * server.h (pass_signals, decode_address_to_semicolon): New.
16858 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16860 * server.c (handle_query): Correct error handling for read_auxv.
16862 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16864 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16865 and srv_linux_thread_db to yes.
16866 * linux-s390-low.c (s390_fill_gregset): New function.
16867 (target_regsets): Define data structure.
16869 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16871 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16872 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16873 * config.in, configure: Regenerated.
16874 * inferiors.c (gdb_id_to_thread): New function.
16875 (gdb_id_to_thread_id): Use it.
16876 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16877 * linux-low.h (struct process_info): Add th member.
16878 (thread_db_get_tls_address): New prototype.
16879 * remote-utils.c (decode_address): Make non-static.
16880 * server.c (handle_query): Handle qGetTLSAddr.
16881 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16882 * target.h (struct target_ops): Add get_tls_address.
16883 * thread-db.c (maybe_attach_thread): Save the thread handle.
16884 (thread_db_get_tls_address): New.
16886 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16888 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16889 (linux_resume_one_process): Take a siginfo_t *. Update all
16890 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16891 (struct pending_signals): Add a siginfo_t.
16892 (linux_wait_for_process): Always set last_status.
16893 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16894 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16895 * linux-low.h (struct process_info): Add last_status.
16897 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16899 * remote-utils.c (try_rle): New function.
16900 (putpkt_binary): Use it.
16902 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16904 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16905 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16906 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16907 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16908 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16911 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16913 * server.c (terminal_fd): New variable.
16914 (old_foreground_pgrp): Likewise.
16915 (restore_old_foreground_pgrp): New function.
16916 (start_inferior): Record the terminal file descriptor in terminal_fd
16917 and its original foreground group in old_foreground_pgrp. Register
16918 restore_old_foreground_pgrp with atexit().
16920 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16922 * server.c (handle_query): Correct qPart to qXfer.
16924 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16926 * configure.ac: Check for more headers which are missing on
16927 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16928 * configure.srv: Add Cygwin and mingw32.
16929 * remote-utils.c: Don't include headers unconditionally which
16930 are missing on mingw32. Include <winsock.h> for mingw32.
16931 (remote_open): Adjust for mingw32 support. Flush
16932 standard error after writing to it.
16933 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16934 (unblock_async_io, enable_async_io, disable_async_io)
16935 (readchar, getpkt): Update for Winsock support.
16936 (prepare_resume_reply): Expect a protocol signal number.
16937 * server.c: Disable <sys/wait.h> on mingw32.
16938 (start_inferior): Adjust for mingw32 support. Flush
16939 standard error after writing to it.
16940 (attach_inferior): Likewise. Use protocol signal
16942 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16944 * win32-i386-low.c: New file.
16945 * Makefile.in (XM_CLIBS): Set.
16946 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16947 (win32-i386-low.o): New dependency rule.
16948 * linux-low.c (linux_wait): Use target signal numbers.
16949 * target.h (struct target_ops): Doc fix.
16950 * server.h (target_signal_to_name): New prototype.
16951 * gdbreplay.c: Don't include headers unconditionally which
16952 are missing on mingw32. Include <winsock.h> for mingw32.
16953 (remote_close, remote_open): Adjust for Winsock support.
16954 * configure, config.in: Regenerated.
16956 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16958 * server.c (decode_xfer_read, write_qxfer_response): New.
16959 (handle_query): Take a packet length argument. Handle
16960 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16961 the qSupported response.
16962 (main): Update call to handle_query.
16964 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16966 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16967 (putpkt_binary): Renamed from putpkt and adjusted for binary
16969 (putpkt): New wrapper for putpkt_binary.
16970 (readchar): Don't mask off the high bit.
16971 (decode_X_packet): New function.
16972 * server.c (main): Call putpkt_binary if a handler sets the packet
16973 length. Save the length of the incoming packet. Handle 'X'.
16974 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16976 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16978 * server.c (handle_query): Handle qSupported.
16980 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16982 * remote-utils.c (all_symbols_looked_up): New variable.
16983 (look_up_one_symbol): Check it.
16984 * server.h (look_up_one_symbol): New declaration.
16985 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16987 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16989 * Makefile.in (linux-arm-low.o): Update dependencies.
16990 * linux-arm-low.c: Include "gdb_proc_service.h".
16991 (PTRACE_GET_THREAD_AREA): Define.
16992 (ps_get_thread_area): New function.
16994 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16996 * configure.srv (m68k*-*-uclinux*): New target.
16997 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16998 (linux_resume_one_process): Remove extraneous cast.
16999 (linux_read_offsets): New.
17000 (linux_target_op): Add linux_read_offsets on mmuless systems.
17001 * server.c (handle_query): Add qOffsets logic.
17002 * target.h (struct target_ops): Add read_offsets.
17004 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17006 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
17007 (PTRACE_GET_THREAD_AREA): Define.
17008 (ps_get_thread_area): New function.
17009 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
17010 (linux-x86-64-low.o): Update.
17012 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
17014 * configure.ac: Remove checks for prfpregset_t.
17015 * gdb_proc_service.h: New file.
17016 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
17017 new "gdb_proc_service.h".
17018 * proc-service.c: Likewise.
17019 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
17020 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
17021 * Makefile.in (gdb_proc_service_h): Updated.
17022 * configure, config.in: Regenerated.
17024 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17026 * remote-utils.c (prepare_resume_reply): Move declaration
17027 of gdb_id_from_wait to the top of the block.
17029 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
17031 * linux-low.c (regsets_store_inferior_registers): Read the regset
17032 from the target before filling it.
17034 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
17036 * server.c (attach_inferior): Return SIGTRAP for a successful
17039 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
17041 * Makefile.in (OBS): Add version.o.
17042 (STAGESTUFF): Delete.
17043 (version.o): Add dependencies.
17044 (version.c): Replace rule.
17045 (clean): Remove version.c.
17046 * server.c (gdbserver_version): New.
17047 (gdbserver_usage): Use printf.
17048 (main): Handle --version and --help.
17049 * server.h (version, host_name): Add declarations.
17051 2005-12-23 Eli Zaretskii <eliz@gnu.org>
17063 * linux-x86-64-low.c:
17065 * linux-s390-low.c:
17066 * linux-ppc64-low.c:
17068 * linux-mips-low.c:
17069 * linux-m68k-low.c:
17070 * linux-m32r-low.c:
17073 * linux-ia64-low.c:
17074 * linux-i386-low.c:
17075 * linux-crisv32-low.c:
17087 * gdbserver.1: Add (C) after Copyright. Update the FSF
17090 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
17092 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
17093 (arm_breakpoint_at): Recognize both breakpoints.
17094 (the_low_target): Use the correct breakpoint instruction.
17096 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
17098 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
17099 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
17100 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
17101 (the_low_target): Update.
17103 2005-10-25 Andreas Schwab <schwab@suse.de>
17105 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
17107 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
17108 (ia64_num_regs): Reduce to 462.
17110 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
17112 * acinclude.m4: Correct quoting.
17113 * aclocal.m4: Regenerated.
17115 Suggested by SZOKOVACS Robert <szo@ies.hu>:
17116 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
17117 (thread_db_init): Call thread_db_err_str.
17118 * configure.ac: Check for TD_VERSION.
17119 * config.in, configure: Regenerated.
17121 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17123 * server.h (error, fatal, warning): Add ATTR_FORMAT.
17125 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17127 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
17128 is not available. Define HAVE_PTRACE_GETREGS if it is.
17129 * config.in, configure: Regenerated.
17130 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
17131 * linux-i386-low.c, linux-m68k-low.c: Update to use
17132 HAVE_PTRACE_GETREGS.
17133 * linux-low.c (regsets_fetch_inferior_registers)
17134 (regsets_store_inferior_registers): Only return 0 if we processed
17136 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
17137 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
17139 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17141 * inferiors.c (struct thread_info): Add gdb_id.
17142 (add_thread): Add gdb_id argument.
17143 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
17144 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
17145 calls to add_thread.
17146 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
17147 * server.c (handle_query): Use thread_to_gdb_id.
17148 (handle_v_cont, main): Use gdb_id_to_thread_id.
17149 * server.h (add_thread): Update prototype.
17150 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
17153 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
17155 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
17156 left-padded registers.
17157 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
17158 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
17160 2005-07-01 Steve Ellcey <sje@cup.hp.com>
17162 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
17163 * configure: Regenerate.
17164 * config.in: Regenerate.
17165 * server.h (NEED_DECLARATION_STRERROR):
17166 Replace with !HAVE_DECL_STRERROR.
17168 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
17170 * linux-low.c (linux_wait, linux_send_signal): Don't test
17171 an unsigned long variable for > 0 if it could be MAX_ULONG.
17172 * server.c (myresume): Likewise.
17173 * target.c (set_desired_inferior): Likewise.
17175 2005-06-13 Mark Kettenis <kettenis@gnu.org>
17177 * configure.ac: Simplify and improve check for socklen_t.
17178 * configure, config.in: Regenerate.
17180 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
17182 * acconfig.h: Remove.
17183 * configure.ac: Add a test for socklen_t. Use three-argument
17184 AC_DEFINE throughout.
17185 * config.in: Regenerated using autoheader 2.59.
17186 * configure: Regenerated.
17188 * gdbreplay.c (socklen_t): Provide a default.
17189 (remote_open): Use socklen_t.
17190 * remote-utils.c (socklen_t): Provide a default.
17191 (remote_open): Use socklen_t.
17192 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
17195 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
17197 * linux-low.c (linux_read_memory, linux_write_memory)
17198 (linux_read_auxv): Likewise.
17199 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17200 (check_mem_write): Likewise.
17201 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17203 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17204 (registers_from_string, register_data): Likewise.
17205 * server.c (handle_query, main): Likewise.
17206 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17207 (decode_M_packet): Likewise.
17208 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17209 * target.h (struct target_ops): Update read_memory, write_memory,
17211 (read_inferior_memory, write_inferior_memory): Update.
17212 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17213 to unsigned char *.
17214 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17215 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17216 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17217 linux-s390-low.c, linux-sh-low.c: Update for changes in
17218 read_inferior_memory and the_low_target->breakpoint.
17220 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17222 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17223 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17224 * configure.srv: Add powerpc64-*-linux*.
17225 * linux-ppc64-low.c: New file.
17227 2005-05-23 Orjan Friberg <orjanf@axis.com>
17229 * linux-cris-low.c: New file with support for CRIS.
17230 * linux-crisv32-low.c: Ditto for CRISv32.
17231 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17232 (clean): Add reg-cris.c and reg-crisv32.c.
17233 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17234 reg-crisv32.o, and reg-crisv32.c to make rules.
17235 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17236 recognized targets.
17238 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17240 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17241 of sizeof (PTRACE_XFER_TYPE).
17242 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17244 2005-05-12 Orjan Friberg <orjanf@axis.com>
17246 * target.h (struct target_ops): Add insert_watchpoint,
17247 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17248 pointers for hardware watchpoint support.
17249 * linux-low.h (struct linux_target_ops): Ditto.
17250 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17251 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17252 to linux_target_ops.
17253 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17255 * server.c (main): Recognize 'Z' and 'z' packets.
17257 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17259 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17260 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17261 (the_low_target): Add new members.
17263 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17265 * proc-service.c (ps_lgetregs): Search all_processes instead of
17268 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17270 * server.c (start_inferior): Change return type to int.
17271 (attach_inferior): Change sigptr to int *.
17272 (handle_v_cont, handle_v_requests): Change signal to int *.
17273 (main): Change signal to int.
17275 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17277 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17278 * configure.srv: Add m32r*-*-linux*.
17279 * linux-m32r-low.c: New file.
17281 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17283 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17285 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17287 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17288 Take unsigned long arguments for PIDs.
17289 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17290 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17291 (wait_for_sigstop, linux_resume_one_process)
17292 (regsets_fetch_inferior_registers, linux_send_signal)
17293 (linux_read_auxv): Likewise. Update the types of variables holding
17294 PIDs. Update format string specifiers.
17295 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17296 * remote-utils.c (prepare_resume_reply): Likewise.
17297 * server.c (cont_thread, general_thread, step_thread)
17298 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17300 (handle_query): Update format specifiers.
17301 (handle_v_cont, main): Use strtoul for thread IDs.
17302 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17303 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17304 (general_thread, step_thread, thread_from_wait)
17305 (old_thread_from_wait): Update.
17306 * target.h (struct thread_resume): Use unsigned long for THREAD.
17307 (struct target_ops): Use unsigned long for arguments to attach and
17310 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17312 * acinclude.m4: Include bfd/bfd.m4 directly.
17313 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17314 <agriffis@toolchain.org>.
17315 * aclocal.m4, configure: Regenerated.
17317 2005-01-07 Andrew Cagney <cagney@gnu.org>
17319 * configure.ac: Rename configure.in, require autoconf 2.59.
17320 * configure: Re-generate.
17322 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17324 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17325 LIBS when finished.
17326 * aclocal.m4: Regenerated.
17327 * configure: Regenerated.
17329 2004-11-21 Andreas Schwab <schwab@suse.de>
17331 * linux-m68k-low.c (m68k_num_gregs): Define.
17332 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17333 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17334 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17335 (m68k_breakpoint_at): New. Add to the_low_target.
17337 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17338 srv_linux_thread_db to yes.
17340 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17342 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17343 (ARCH_SET_FS): Likewise.
17344 (ARCH_GET_FS): Likewise.
17345 (ARCH_GET_GS): Likewise.
17347 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17349 * linux-i386-low.c (ps_get_thread_area): New.
17350 * linux-x86-64-low.c (ps_get_thread_area): New.
17351 * linux-low.c: Include <sys/syscall.h>.
17352 (linux_kill_one_process): Don't kill the first thread here.
17353 (linux_kill): Kill the first thread here.
17354 (kill_lwp): New function.
17355 (send_sigstop, linux_send_signal): Use it.
17356 * proc-service.c: Clean up #ifdefs.
17357 (fpregset_info): Delete.
17358 (ps_lgetregs): Update and enable implementation.
17359 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17361 * remote-utils.c (struct sym_cache, symbol_cache): New.
17362 (input_interrupt): Print a clearer message.
17363 (async_io_enabled): New variable.
17364 (enable_async_io, disable_async_io): Use it. Update comments.
17365 (look_up_one_symbol): Use the symbol cache.
17366 * thread-db.c (thread_db_look_up_symbols): New function.
17367 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17369 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17371 * configure.in: Test for -rdynamic.
17372 * configure: Regenerated.
17373 * Makefile (INTERNAL_LDFLAGS): New.
17374 (gdbserver, gdbreplay): Use it.
17376 2004-09-02 Andrew Cagney <cagney@gnu.org>
17378 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17380 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17382 * linux-low.c (linux_wait): Clear all_processes list also.
17384 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17386 * linux-low.c: Include <errno.h>. Remove extern declaration of
17389 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17391 * gdbreplay.c, server.h, utils.c: Update copyright years.
17393 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17395 * server.c (main): Print child status or termination signal from
17396 variable 'signal', not 'sig'.
17398 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17400 * linux-low.c (linux_read_memory): Change return type to
17401 int. Check for and return error from ptrace().
17402 * target.c (read_inferior_memory): Change return type to int. Pass
17403 back return status from the_target->read_memory().
17404 * target.h (struct target_ops): Adapt *read_memory() prototype.
17406 (read_inferior_memory): Adapt prototype.
17407 * server.c (main): Return an error packet if
17408 read_inferior_memory() returns an error.
17410 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17412 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17413 Unify with other clean targets.
17415 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17417 * server.c (handle_v_cont): Call set_desired_inferior.
17419 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17421 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17423 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17425 * linux-low.c (linux_wait): Unblock async I/O.
17426 (linux_resume): Block and enable async I/O.
17427 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17428 * server.h (block_async_io, unblock_async_io): Add prototypes.
17430 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17432 * remote-utils.c (remote_open): Print a status notice after
17433 opening a TCP port.
17434 * server.c (attach_inferior): Print a status notice after
17437 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17439 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17441 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17443 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17445 * server.c, target.h: Update copyright years.
17447 2004-02-25 Roland McGrath <roland@redhat.com>
17449 * target.h (struct target_ops): New member `read_auxv'.
17450 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17451 * linux-low.c (linux_read_auxv): New function.
17452 (linux_target_ops): Initialize `read_auxv' member to that.
17454 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17456 Committed by Jim Blandy <jimb@redhat.com>.
17458 * linux-s390-low.c (s390_num_regs): Update.
17459 (s390_regmap): Remove control registers. Use __s390x__ predefine
17460 instead of GPR_SIZE to distiguish s390 and s390x targets.
17462 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17464 * linux-low.c: Update copyright year.
17465 (check_removed_breakpoint): Clear pending_is_breakpoint.
17466 (linux_set_resume_request, linux_queue_one_thread)
17467 (resume_status_pending_p): New functions.
17468 (linux_continue_one_thread): Use process->resume.
17469 (linux_resume): Only resume threads if there are no pending events.
17470 * linux-low.h (struct process_info): Add resume request
17473 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17475 * regcache.c (new_register_cache): Clear the allocated register
17476 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17478 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17480 * linux-low.c (linux_resume): Take a struct thread_resume *
17482 (linux_wait): Update call.
17483 (resume_ptr): New static variable.
17484 (linux_continue_one_thread): Renamed from
17485 linux_continue_one_process. Use resume_ptr.
17486 (linux_resume): Use linux_continue_one_thread.
17487 * server.c (handle_v_cont, handle_v_requests): New functions.
17488 (myresume): New function.
17489 (main): Handle 'v' case.
17490 * target.h (struct thread_resume): New type.
17491 (struct target_ops): Change argument of "resume" to struct
17493 (myresume): Delete macro.
17495 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17497 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17498 (uninstall): Support DESTDIR.
17500 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17502 * configure.srv: Add xscale*linux copy of arm*linux entry.
17504 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17506 * linux-arm-low.c (arm_reinsert_addr): New function.
17507 (the_low_target): Add arm_reinsert_addr.
17509 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17511 * mem-break.c: Remove whitespace at end of file.
17513 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17515 * configure.in: Check whether we need to prototype strerror.
17516 * server.h: Optionally prototype strerror.
17517 * gdbreplay.c (perror_with_name): Use strerror.
17518 * linux-low.c (linux_attach_lwp): Use strerror.
17519 * utils.c (perror_with_name): Use strerror.
17520 * config.in, configure: Regenerated.
17522 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17524 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17525 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17527 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17529 * Makefile.in (SFILES): Update.
17530 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17531 low-sun3.c: Remove files.
17533 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17535 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17536 (linux_detach_one_process, linux_detach): New functions.
17537 (linux_target_ops): Add linux_detach.
17538 * server.c (main): Handle 'D' packet.
17539 * target.h (struct target_ops): Add "detach" member.
17540 (detach_inferior): Define.
17542 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17544 From Kelley Cook <kelleycook@wideopenwest.com>:
17545 * configure.srv: Accept i[34567]86 variants.
17547 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17549 * linux-low.c (linux_wait_for_event): Correct comment typos.
17550 (linux_resume_one_process): Call check_removed_breakpoint.
17551 (linux_send_signal): New function.
17552 (linux_target_ops): Add linux_send_signal.
17553 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17555 * target.h (struct target_ops): Add send_signal.
17557 2003-05-29 Jim Blandy <jimb@redhat.com>
17559 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17560 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17561 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17562 away part of the register's value.
17564 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17566 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17567 (linux_wait_for_event, linux_init_signals): Likewise.
17569 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17571 * configure.in: Check for stdlib.h.
17572 * configure: Regenerated.
17573 * config.in: Regenerated.
17575 2003-01-04 Andreas Schwab <schwab@suse.de>
17577 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17579 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17581 * Makefile.in: Remove obsolete code.
17583 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17585 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17586 defined(PT_FPR0_HI).
17588 2002-11-17 Stuart Hughes <seh@zee2.com>
17590 * linux-arm-low.c (arm_num_regs): Increase.
17591 (arm_regmap): Include status register.
17593 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17595 * linux-low.c (register_addr): Remove incorrect -1 check.
17597 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17599 * linux-low.c (linux_create_inferior): Call setpgid. Return
17601 (unstopped_p, linux_signal_pid): Remove.
17602 (linux_target_ops): Remove linux_signal_pid.
17603 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17604 global instead of target method.
17605 * target.h (struct target_ops): Remove signal_pid. Update comment
17606 for create_inferior.
17607 * server.c (signal_pid): New variable.
17608 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17609 gdbserver. Set the child to be the foreground process group.
17610 (attach_inferior): Set signal_pid.
17612 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17614 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17616 2002-08-20 Jim Blandy <jimb@redhat.com>
17618 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17621 2002-08-01 Andrew Cagney <cagney@redhat.com>
17623 * Makefile.in: Make chill references obsolete.
17625 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17627 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17628 * configure: Regenerate.
17629 * config.in: Regenerate.
17631 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17633 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17634 (perror_with_name, remote_close, remote_open, expect, play): Static.
17636 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17638 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17639 byte offsets instead of an array of indexes.
17640 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17642 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17644 * regcache.c: Add comment.
17646 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17648 * thread-db.c: New file.
17649 * proc-service.c: New file.
17650 * acinclude.m4: New file.
17651 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17652 proc-service.o, and thread-db.o.
17653 (linux-low.o): Add USE_THREAD_DB.
17654 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17655 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17656 * aclocal.m4: Regenerated.
17657 * config.in: Regenerated.
17658 * configure: Regenerated.
17659 * configure.in: Check for proc_service.h, sys/procfs.h,
17660 thread_db.h, and linux/elf.h headrs.
17661 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17662 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17663 Check for -lthread_db and thread support.
17664 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17665 PowerPC, and SuperH.
17666 * i387-fp.c: Constify arguments.
17667 * i387-fp.h: Likewise.
17668 * inferiors.c: (struct thread_info): Renamed from
17669 `struct inferior_info'. Remove PID member. Use generic inferior
17670 list header. All uses updated.
17671 (inferiors, signal_pid): Removed.
17672 (all_threads): New variable.
17673 (get_thread): Define.
17674 (add_inferior_to_list): New function.
17675 (for_each_inferior): New function.
17676 (change_inferior_id): New function.
17677 (add_inferior): Removed.
17678 (remove_inferior): New function.
17679 (add_thread): New function.
17680 (free_one_thread): New function.
17681 (remove_thread): New function.
17682 (clear_inferiors): Use for_each_inferior and free_one_thread.
17683 (find_inferior): New function.
17684 (find_inferior_id): New function.
17685 (inferior_target_data): Update argument type.
17686 (set_inferior_target_data): Likewise.
17687 (inferior_regcache_data): Likewise.
17688 (set_inferior_regcache_data): Likewise.
17689 * linux-low.c (linux_bp_reinsert): Remove.
17690 (all_processes, stopping_threads, using_thrads)
17691 (struct pending_signals, debug_threads, pid_of): New.
17692 (inferior_pid): Replace with macro.
17693 (struct inferior_linux_data): Remove.
17694 (get_stop_pc, add_process): New functions.
17695 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17696 Use add_process and add_thread.
17697 (linux_attach_lwp): New function, based on old linux_attach. Use
17698 add_process and add_thread. Set stop_expected for new threads.
17699 (linux_attach): New function.
17700 (linux_kill_one_process): New function.
17701 (linux_kill): Kill all LWPs.
17702 (linux_thread_alive): Use find_inferior_id.
17703 (check_removed_breakpoints, status_pending_p): New functions.
17704 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17705 Update. Use WNOHANG. Wait for cloned processes also. Update process
17706 struct for the found process.
17707 (linux_wait_for_event): New function.
17708 (linux_wait): Use it. Support LWPs.
17709 (send_sigstop, wait_for_sigstop, stop_all_processes)
17710 (linux_resume_one_process, linux_continue_one_process): New functions.
17711 (linux_resume): Support LWPs.
17712 (REGISTER_RAW_SIZE): Remove.
17713 (fetch_register): Use register_size instead. Call supply_register.
17714 (usr_store_inferior_registers): Likewise. Call collect_register.
17715 Fix recursive case.
17716 (regsets_fetch_inferior_registers): Improve error message.
17717 (regsets_store_inferior_registers): Add debugging.
17718 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17719 (unstopped_p, linux_signal_pid): New functions.
17720 (linux_target_ops): Add linux_signal_pid.
17721 (linux_init_signals): New function.
17722 (initialize_low): Call it. Initialize using_threads.
17723 * regcache.c (inferior_regcache_data): Add valid
17725 (get_regcache): Fetch registers lazily. Add fetch argument
17726 and update all callers.
17727 (regcache_invalidate_one, regcache_invalidate): New
17729 (new_register_cache): Renamed from create_register_cache.
17730 Return the new regcache.
17731 (free_register_cache): Change argument to a void *.
17732 (registers_to_string, registers_from_string): Call get_regcache
17733 with fetch flag set.
17734 (register_data): Make static. Pass fetch flag to get_regcache.
17735 (supply_register): Call get_regcache with fetch flag clear.
17736 (collect_register): Call get_regcache with fetch flag set.
17737 (collect_register_as_string): New function.
17738 * regcache.h: Update.
17739 * remote-utils.c (putpkt): Flush after debug output and use
17741 Handle input interrupts while waiting for an ACK.
17742 (input_interrupt): Use signal_pid method.
17743 (getpkt): Flush after debug output and use stderr.
17744 (outreg): Use collect_register_as_string.
17745 (new_thread_notify, dead_thread_notify): New functions.
17746 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17747 and general_thread.
17748 (look_up_one_symbol): Flush after debug output.
17749 * server.c (step_thread, server_waiting): New variables.
17750 (start_inferior): Don't use signal_pid. Update call to mywait.
17751 (attach_inferior): Update call to mywait.
17752 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17753 (main): Don't fetch/store registers explicitly. Use
17754 set_desired_inferior. Support proposed ``Hs'' packet. Update
17756 * server.h: Update.
17757 (struct inferior_list, struct_inferior_list_entry): New.
17758 * target.c (set_desired_inferior): New.
17759 (write_inferior_memory): Constify.
17760 (mywait): New function.
17761 * target.h: Update.
17762 (struct target_ops): New signal_pid method.
17763 (mywait): Removed macro, added prototype.
17765 * linux-low.h (regset_func): Removed.
17766 (regset_fill_func, regset_store_func): New.
17767 (enum regset_type): New.
17768 (struct regset_info): Add type field. Use new operation types.
17769 (struct linux_target_ops): stop_pc renamed to get_pc.
17770 Add decr_pc_after_break and breakpoint_at.
17771 (get_process, get_thread_proess, get_process_thread)
17772 (strut process_info, all_processes, linux_attach_lwp)
17773 (thread_db_init): New.
17775 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17776 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17777 (the_low_target): Add new members.
17778 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17779 (i386_store_fpxregset): Constify.
17780 (target_regsets): Add new kind identifier.
17781 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17782 (i386_set_pc): Add debugging.
17783 (i386_breakpoint_at): New function.
17784 (the_low_target): Add new members.
17785 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17786 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17787 (mips_breakpoint_at): New.
17788 (the_low_target): Add new members.
17789 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17790 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17791 (the_low_target): Add new members.
17792 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17793 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17794 (the_low_target): Add new members.
17795 * linux-x86-64-low.c (target_regsets): Add new kind
17798 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17800 From Martin Pool <mbp@samba.org>:
17801 * server.c (gdbserver_usage): New function.
17804 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17806 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17807 stop_at -> stop_pc.
17809 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17811 * Makefile.in: Remove obsolete code.
17813 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17815 * linux-low.c (regsets_fetch_inferior_registers),
17816 (regsets_store_inferior_registers): Removed cast to int from
17818 * regcache.h: Added declaration of struct inferior_info.
17820 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17822 * inferiors.c (struct inferior_info): Add regcache_data.
17823 (add_inferior): Call create_register_cache.
17824 (clear_inferiors): Call free_register_cache.
17825 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17826 * regcache.c (struct inferior_regcache_data): New.
17827 (registers): Remove.
17828 (get_regcache): New function.
17829 (create_register_cache, free_register_cache): New functions.
17830 (set_register_cache): Don't initialize the register cache here.
17831 (registers_to_string, registers_from_string, register_data): Call
17833 * regcache.h: Add prototypes.
17834 * server.h: Likewise.
17836 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17838 * mem-break.c: New file.
17839 * mem-break.h: New file.
17840 * Makefile.in: Add mem-break.o rule; update server.h
17842 * inferiors.c (struct inferior_info): Add target_data
17844 (clear_inferiors): Free target_data member if set.
17845 (inferior_target_data, set_inferior_target_data): New functions.
17846 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17847 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17848 * linux-low.c (linux_bp_reinsert): New variable.
17849 (struct inferior_linux_data): New.
17850 (linux_create_inferior): Use set_inferior_target_data.
17851 (linux_attach): Likewise. Call add_inferior.
17852 (linux_wait_for_one_inferior): New function.
17853 (linux_wait): Call it.
17854 (linux_write_memory): Add const.
17855 (initialize_low): Call set_breakpoint_data.
17856 * linux-low.h (struct linux_target_ops): Add breakpoint
17858 * server.c (attach_inferior): Remove extra add_inferior
17860 * server.h: Include mem-break.h. Update inferior.c
17862 * target.c (read_inferior_memory)
17863 (write_inferior_memory): New functions.
17864 * target.h (read_inferior_memory)
17865 (write_inferior_memory): Change macros to prototypes.
17866 (struct target_ops): Update comments. Add const to write_memory
17869 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17871 * linux-low.c (usr_store_inferior_registers): Support
17872 registers which are allowed to fail to store.
17873 * linux-low.h (linux_target_ops): Likewise.
17874 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17875 (ppc_cannot_store_register): FPSCR may not be storable.
17877 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17879 * server.h: Include <string.h> if HAVE_STRING_H.
17880 * ChangeLog: Correct paths in last ChangeLog entry.
17882 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17884 * linux-low.h: Remove obsolete prototypes.
17885 (struct linux_target_ops): New.
17886 (extern the_low_target): New.
17887 * linux-low.c (num_regs, regmap): Remove declarations.
17888 (register_addr): Use the_low_target explicitly.
17889 (fetch_register): Likewise.
17890 (usr_fetch_inferior_registers): Likewise.
17891 (usr_store_inferior_registers): Likewise.
17892 * linux-arm-low.c (num_regs): Remove.
17893 (arm_num_regs): Define.
17894 (arm_regmap): Renamed from regmap, made static.
17895 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17897 (arm_cannot_store_register): Renamed from cannot_store_register,
17899 (the_low_target): New.
17900 * linux-i386-low.c (num_regs): Remove.
17901 (i386_num_regs): Define.
17902 (i386_regmap): Renamed from regmap, made static.
17903 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17905 (i386_cannot_store_register): Renamed from cannot_store_register,
17907 (the_low_target): New.
17908 * linux-ia64-low.c (num_regs): Remove.
17909 (ia64_num_regs): Define.
17910 (ia64_regmap): Renamed from regmap, made static.
17911 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17913 (ia64_cannot_store_register): Renamed from cannot_store_register,
17915 (the_low_target): New.
17916 * linux-m68k-low.c (num_regs): Remove.
17917 (m68k_num_regs): Define.
17918 (m68k_regmap): Renamed from regmap, made static.
17919 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17921 (m68k_cannot_store_register): Renamed from cannot_store_register,
17923 (the_low_target): New.
17924 * linux-mips-low.c (num_regs): Remove.
17925 (mips_num_regs): Define.
17926 (mips_regmap): Renamed from regmap, made static.
17927 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17929 (mips_cannot_store_register): Renamed from cannot_store_register,
17931 (the_low_target): New.
17932 * linux-ppc-low.c (num_regs): Remove.
17933 (ppc_num_regs): Define.
17934 (ppc_regmap): Renamed from regmap, made static.
17935 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17937 (ppc_cannot_store_register): Renamed from cannot_store_register,
17939 (the_low_target): New.
17940 * linux-s390-low.c (num_regs): Remove.
17941 (s390_num_regs): Define.
17942 (s390_regmap): Renamed from regmap, made static.
17943 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17945 (s390_cannot_store_register): Renamed from cannot_store_register,
17947 (the_low_target): New.
17948 * linux-sh-low.c (num_regs): Remove.
17949 (sh_num_regs): Define.
17950 (sh_regmap): Renamed from regmap, made static.
17951 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17953 (sh_cannot_store_register): Renamed from cannot_store_register,
17955 (the_low_target): New.
17956 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17957 (the_low_target): New.
17959 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17961 * Makefile.in: Add stamp-h target.
17962 * configure.in: Create stamp-h.
17963 * configure: Regenerated.
17965 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17967 * inferiors.c: New file.
17968 * target.c: New file.
17969 * target.h: New file.
17970 * Makefile.in: Add target.o and inferiors.o. Update
17972 * linux-low.c (inferior_pid): New static variable,
17973 moved from server.c.
17974 (linux_create_inferior): Renamed from create_inferior.
17975 Call add_inferior. Return 0 on success instead of a PID.
17976 (linux_attach): Renamed from myattach.
17977 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17978 (linux_thread_alive): Renamed from mythread_alive.
17979 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17981 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17982 (regsets_store_inferior_registers): Correct error message.
17983 Add missing ``return 0''.
17984 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17985 (linux_store_registers): Renamed from store_inferior_registers.
17986 (linux_read_memory): Renamed from read_inferior_memory.
17987 (linux_write_memory): Renamed from write_inferior_memory.
17988 (linux_target_ops): New structure.
17989 (initialize_low): Call set_target_ops ().
17990 * remote-utils.c (unhexify): New function.
17991 (hexify): New function.
17992 (input_interrupt): Send signals to ``signal_pid''.
17993 * server.c (inferior_pid): Remove.
17994 (start_inferior): Update create_inferior call.
17995 (attach_inferior): Call add_inferior.
17996 (handle_query): New function.
17997 (main): Call handle_query for `q' packets.
17998 * server.h: Include "target.h". Remove obsolete prototypes.
17999 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
18001 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
18003 * Makefile.in: Add WARN_CFLAGS. Update configury
18005 * configure.in: Check for <string.h>
18006 * configure: Regenerate.
18007 * config.in: Regenerate.
18008 * gdbreplay.c: Include needed system headers.
18009 (remote_open): Remove strchr prototype.
18010 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
18011 * regcache.c (supply_register): Change buf argument to const void *.
18012 (supply_register_by_name): Likewise.
18013 (collect_register): Change buf argument to void *.
18014 (collect_register_by_name): Likewise.
18015 * regcache.h: Add missing prototypes.
18016 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
18017 * server.c (handle_query): New function.
18018 (attached): New static variable, moved out of main.
18019 (main): Quiet longjmp clobber warnings.
18020 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
18021 * utils.c (error): Remove NORETURN.