1 2020-01-01 Joel Brobecker <brobecker@adacore.com>
3 * server.c (gdbserver_version): Change copyright year to 2020.
4 * gdbreplay.c (gdbreplay_version): Likewise.
6 2019-12-19 Christian Biesinger <cbiesinger@google.com>
8 * configure: Regenerate.
9 * configure.ac: Quote variable arguments of test.
11 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
13 * Makefile.in: Fix build with GNU Make 3.81
15 2019-12-16 Tom Tromey <tromey@adacore.com>
17 * server.c (get_exec_file): Constify result.
19 2019-12-10 Christian Biesinger <cbiesinger@google.com>
21 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
22 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
23 * config.in: Regenerate.
24 * configure: Regenerate.
25 * configure.ac: Don't check for strerror.
26 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
27 Call safe_strerror instead of strerror.
28 * server.h (strerror): Remove this now-unnecessary declaration.
29 * tracepoint.c (init_named_socket): Call safe_strerror instead of
31 (gdb_agent_helper_thread): Likewise.
32 * utils.c (perror_with_name): Likewise.
34 2019-11-26 Tom Tromey <tom@tromey.com>
36 * configure, config.in: Rebuild.
38 2019-11-26 Tom Tromey <tom@tromey.com>
40 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
41 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
43 * configure, config.in: Rebuild.
45 2019-11-26 Tom Tromey <tom@tromey.com>
47 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
48 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
49 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
50 * acinclude.m4: Include ax_pthread.m4.
51 * config.in, configure: Rebuild.
53 2019-11-26 Christian Biesinger <cbiesinger@google.com>
55 * debug.c (debug_set_output): Call safe_strerror instead of
57 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
58 (linux_kill_one_lwp): Likewise.
59 (linux_detach_one_lwp): Likewise.
60 (linux_wait_for_event_filtered): Likewise.
61 (store_register): Likewise.
62 * lynx-low.c (lynx_attach): Likewise.
63 * mem-break.c (insert_memory_breakpoint): Likewise.
64 (remove_memory_breakpoint): Likewise.
65 (delete_fast_tracepoint_jump): Likewise.
66 (set_fast_tracepoint_jump): Likewise.
67 (uninsert_fast_tracepoint_jumps_at): Likewise.
68 (reinsert_fast_tracepoint_jumps_at): Likewise.
69 * nto-low.c (nto_xfer_memory): Likewise.
70 (nto_resume): Likewise.
72 2019-11-20 Luis Machado <luis.machado@linaro.org>
74 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
75 instead of register count.
76 * tdesc.c (tdesc_contains_feature): New function.
77 * tdesc.h (tdesc_contains_feature): New prototype.
79 2019-11-15 Christian Biesinger <cbiesinger@google.com>
81 * Makefile.in: Add safe-strerror.c.
82 * configure: Regenerate.
83 * configure.ac: Don't source common.host.
85 2019-11-15 Christian Biesinger <cbiesinger@google.com>
87 * config.in: Regenerate.
88 * configure: Regenerate.
90 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
92 * ax.c (ax_printf): Handle size_t_arg.
94 2019-11-06 Christian Biesinger <cbiesinger@google.com>
96 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
97 * mi/mi-main.c (output_cores): Likewise.
98 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
99 (linux_xfer_osdata_modules): Likewise.
100 * remote.c (register_remote_support_xml): Likewise.
101 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
102 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
104 2019-11-01 Christian Biesinger <cbiesinger@google.com>
106 * configure: Regenerate.
107 * configure.ac: Remove check for strerror_r.
109 2019-10-31 Christian Biesinger <cbiesinger@google.com>
111 * config.in: Regenerate.
112 * configure: Regenerate.
113 * configure.ac: Also check for strerror_r.
115 2019-10-31 Christian Biesinger <cbiesinger@google.com>
117 * ax.h (debug_agent): Remove duplicate declaration.
119 2019-10-26 Tom de Vries <tdevries@suse.de>
121 * linux-aarch64-low.c: Fix typos in comments.
122 * linux-arm-low.c: Same.
124 * linux-ppc-low.c: Same.
125 * proc-service.c: Same.
128 * tracepoint.c: Same.
131 2019-10-25 Tom Tromey <tromey@adacore.com>
133 * utils.c (xstrdup): Remove.
135 2019-10-23 Tom Tromey <tom@tromey.com>
137 * configure, config.in: Rebuild.
139 2019-10-23 Tom Tromey <tom@tromey.com>
141 * configure: Rebuild.
142 * acinclude.m4: Use m4_include, not sinclude.
144 2019-10-17 Tom Tromey <tromey@adacore.com>
146 * configure: Rebuild.
147 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
148 in AC_CONFIG_FILES invocation.
149 * Makefile.in (stamp-h, Makefile): Use new-style config.status
152 2019-10-16 Christian Biesinger <cbiesinger@google.com>
154 * server.c: Include xml-builtin.h.
155 (get_xml_features): Don't declare xml_builtins here.
157 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
159 * Makefile.in: Remove references to vec-ipa.o.
161 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
163 * Makefile.in: Remove references to vec.c.
165 2019-10-02 Christian Biesinger <cbiesinger@google.com>
167 * server.c (server_waiting): Change to bool.
168 (extended_protocol): Likewise.
169 (response_needed): Likewise.
170 (exit_requested): Likewise.
171 (run_once): Likewise.
172 (report_no_resumed): Likewise.
173 (non_stop): Likewise.
174 (disable_packet_vCont): Likewise.
175 (disable_packet_Tthread): Likewise.
176 (disable_packet_qC): Likewise.
177 (disable_packet_qfThreadInfo): Likewise.
178 (handle_general_set): Update.
179 (handle_detach): Update.
180 (handle_monitor_command): Update.
181 (handle_query): Update.
182 (captured_main): Update.
183 (process_serial_event): Update.
184 * server.h (server_waiting): Change to bool.
185 (disable_packet_vCont): Likewise.
186 (disable_packet_Tthread): Likewise.
187 (disable_packet_qC): Likewise.
188 (disable_packet_qfThreadInfo): Likewise.
189 (run_once): Likewise.
190 (non_stop): Likewise.
191 * target.c (target_stop_and_wait): Update.
193 2019-10-02 Tom Tromey <tromey@adacore.com>
195 * Makefile.in (SFILES): Add common-inferior.c.
196 (OBS): Add common-inferior.o.
197 * server.c (startup_with_shell): Don't define.
199 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
201 * linux-low.c (linux_low_read_btrace): Update for change to
204 2019-09-20 Christian Biesinger <cbiesinger@google.com>
206 * debug.c (debug_threads): Remove comment in favor of the header.
207 * debug.h (using_threads): Add declaration.
208 (debug_threads): Add comment.
209 * linux-aarch64-low.c: Include debug.h and remove declaration of
211 * nto-low.c: Likewise.
212 * remote-utils.c: Likewise.
213 * thread-db.c: Likewise.
215 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
217 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
218 and powerpc-cell64l-ipa.o.
219 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
220 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
221 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
224 * spu-low.c: Remove file.
226 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
227 (parse_spufs_run): Remove.
228 (ppc_get_pc): Remove Cell/B.E. support.
229 (ppc_set_pc): Likewise.
230 (ppc_breakpoint_at): Likewise.
231 (ppc_arch_setup): Likewise.
232 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
233 tdesc_powerpc_cell32l.
234 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
235 or init_registers_powerpc_cell32l.
236 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
237 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
238 or init_registers_powerpc_cell32l.
239 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
240 (init_registers_powerpc_cell32l): Remove prototype.
241 (init_registers_powerpc_cell64l): Likewise.
243 * target.h (struct target_ops): Remove qxfer_spu member.
244 * server.c (handle_qxfer_spu): Remove.
245 (qxfer_packets): Remove entry for "spu".
246 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
247 * linux-low.c (SPUFS_MAGIC): Remove.
248 (spu_enumerate_spu_ids): Remove.
249 (linux_qxfer_spu): Remove.
250 (linux_target_ops): Remove qxfer_spu member.
251 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
252 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
253 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
255 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
257 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
258 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
259 * config.in: Regenerate.
260 * configure: Regenerate.
262 2019-08-15 Tom Tromey <tromey@adacore.com>
264 * target.c (target_write_memory): Use gdb::byte_vector.
266 2019-08-15 Tom Tromey <tromey@adacore.com>
268 * tracepoint.c (write_inferior_data_pointer)
269 (write_inferior_integer, write_inferior_int8)
270 (write_inferior_uinteger, m_tracepoint_action_download)
271 (r_tracepoint_action_download, x_tracepoint_action_download)
272 (l_tracepoint_action_download, clear_inferior_trace_buffer)
273 (download_agent_expr, download_tracepoint_1)
274 (download_trace_state_variables, upload_fast_traceframes): Update.
275 * server.c (gdb_write_memory): Update.
276 * remote-utils.c (relocate_instruction): Update.
277 * proc-service.c (ps_pdwrite): Update.
278 * mem-break.c (remove_memory_breakpoint)
279 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
280 (uninsert_fast_tracepoint_jumps_at)
281 (reinsert_fast_tracepoint_jumps_at): Update.
282 * linux-x86-low.c (append_insns)
283 (i386_install_fast_tracepoint_jump_pad)
284 (amd64_write_goto_address, i386_write_goto_address): Update.
285 * linux-s390-low.c (append_insns, s390_write_goto_address):
287 * linux-ppc-low.c (ppc_relocate_instruction)
288 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
289 (ppc_write_goto_address): Update.
290 * linux-aarch64-low.c (append_insns): Update.
291 * target.h (struct target_ops): Update.
292 (write_inferior_memory): Don't declare.
293 * target.c (target_write_memory): Rename from
294 write_inferior_memory. Remove old target_write_memory.
296 2019-08-15 Tom Tromey <tromey@adacore.com>
298 * target.c (write_inferior_memory): Use std::vector.
300 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
303 * configure.ac: Drop enable-libmcheck support.
304 * configure, config.in: Rebuild.
305 * acinclude.m4: Don't include it.
307 2019-07-19 Alan Hayward <alan.hayward@arm.com>
309 * configure.srv: Remove Arm xml files.
311 2019-07-19 Alan Hayward <alan.hayward@arm.com>
313 * configure.srv: Add new files. Remove xml generated files.
314 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
316 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
317 * linux-aarch32-tdesc.c: New file.
318 * linux-aarch32-tdesc.h: New file.
319 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
320 * linux-arm-low.c (init_registers_arm, tdesc_arm)
321 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
322 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
323 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
324 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
325 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
326 (arm_read_description): Call arm_linux_read_description.
327 (initialize_low_arch): Don't init registers.
328 * linux-arm-tdesc.c: New file.
329 * linux-arm-tdesc.h: New file.
331 2019-07-10 Alan Hayward <alan.hayward@arm.com>
333 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
334 Move counter inside for.
335 (arm_read_description): Check ptrace earlier.
336 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
338 2019-07-09 Tom Tromey <tom@tromey.com>
340 * configure: Rebuild.
341 * configure.ac: Change common to gdbsupport.
342 * acinclude.m4: Change common to gdbsupport.
343 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
344 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
345 common to gdbsupport.
346 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
347 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
348 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
349 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
350 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
351 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
352 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
353 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
354 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
355 common to gdbsupport.
357 2019-07-04 Alan Hayward <alan.hayward@arm.com>
359 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
361 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
363 2019-07-04 Alan Hayward <alan.hayward@arm.com>
365 * configure.srv: Remove legacy xml.
366 * linux-aarch64-low.c (initialize_low_arch): Remove
367 initialize_low_tdesc call.
368 * linux-aarch64-tdesc-selftest.c: Remove file.
369 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
370 * linux-x86-low.c (initialize_low_arch): Remove
371 initialize_low_tdesc call.
372 * linux-x86-tdesc-selftest.c: Remove file.
373 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
375 2019-06-20 Tom de Vries <tdevries@suse.de>
377 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
378 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
380 2019-06-19 Tom de Vries <tdevries@suse.de>
382 * debug.h (debug_write): Change return type to ssize_t.
383 * debug.c (debug_write): Same.
385 2019-06-14 Tom Tromey <tom@tromey.com>
387 * configure.ac: Use new path to gnulib.
388 * configure: Rebuild.
389 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
392 2019-06-11 Tom Tromey <tom@tromey.com>
394 * Makefile.in (SFILES): Add alloc.c.
396 (IPA_OBJS): Add alloc-ipa.o.
397 (alloc-ipa.o): New target.
398 (%.o: ../%.c): New pattern rule.
400 2019-06-10 Tom Tromey <tromey@adacore.com>
402 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
403 end warning with a newline.
404 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
406 * thread-db.c (attach_thread): Don't end warning with a newline.
407 (thread_db_notice_clone): Likewise.
408 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
410 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
411 end warning with a newline.
413 2019-06-04 Pedro Alves <palves@redhat.com>
415 * server.c (captured_main): Use make_unique_xstrdup.
417 2019-06-02 Tom Tromey <tom@tromey.com>
419 * gdbreplay.c (fromhex): Remove.
420 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
422 2019-05-29 Tom Tromey <tromey@adacore.com>
424 * configure: Rebuild.
426 2019-05-06 Kevin Buettner <kevinb@redhat.com>
428 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
429 sign extension code on 32-bit builds.
431 2019-05-03 Eli Zaretskii <eliz@gnu.org>
434 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
436 2019-04-19 Tom Tromey <tom@tromey.com>
438 * server.c (struct vstop_notif): Derive from notif_event.
440 (queue_stop_reply): Update.
441 (remove_all_on_match_ptid): Change type. Rewrite.
442 (discard_queued_stop_replies): Rewrite.
443 (in_queued_stop_replies_ptid): Change type.
444 (in_queued_stop_replies): Rewrite.
445 (notif_stop): Update.
446 (queue_stop_reply_callback): Update.
447 (captured_main): Don't call initialize_notif.
448 (push_stop_notification): Update.
449 * notif.c (notif_write_event, handle_notif_ack)
450 (notif_event_enque, notif_push): Update.
451 (notif_event_xfree, initialize_notif): Remove.
452 * notif.h (struct notif_event): Include <list>, not
454 (struct notif_server) <queue>: Now a std::list.
455 (notif_event_p): Remove typedef.
456 (initialize_notif): Don't declare.
457 (struct notif_event): Add virtual destructor.
459 2019-04-17 Alan Hayward <alan.hayward@arm.com>
461 * ax.c (ax_vdebug): Call debug_printf.
462 * debug.c (debug_write): New function.
463 * debug.h (debug_write): New declaration.
464 * linux-low.c (sigchld_handler): Call debug_write.
466 2019-04-17 Alan Hayward <alan.hayward@arm.com>
468 * debug.c (debug_set_output): New function.
469 (debug_vprintf): Send output to debug_file.
470 (debug_flush): Likewise.
471 * debug.h (debug_set_output): New declaration.
472 * server.c (handle_monitor_command): Add debug-file option.
473 (captured_main): Likewise.
475 2019-04-17 Alan Hayward <alan.hayward@arm.com>
477 * debug.c (remote_debug): Add definition.
478 * debug.h (remote_debug): Add declaration.
479 * hostio.c (remote_debug): Remove declaration.
480 * remote-utils.c (struct ui_file): Likewise.
481 (remote_debug): Likewise.
482 * remote-utils.h (remote_debug): Likewise,
483 * server.c (remote_debug): Remove definition.
485 2019-04-10 Kevin Buettner <kevinb@redhat.com>
487 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
488 when using a 64-bit gdbserver.
490 2019-04-09 Tom Tromey <tromey@adacore.com>
492 * linux-low.c (select_event_lwp): Use find_thread_in_random.
494 2019-04-08 Tom Tromey <tom@tromey.com>
496 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
498 (linux_resume_one_lwp): Likewise.
500 2019-04-08 Tom Tromey <tom@tromey.com>
502 * gdbreplay.c: Update.
503 * linux-low.c: Update.
506 2019-04-08 Tom Tromey <tom@tromey.com>
508 * server.c: Use C++ exception handling.
509 * linux-low.c: Use C++ exception handling.
510 * gdbreplay.c: Use C++ exception handling.
512 2019-04-08 Tom Tromey <tom@tromey.com>
514 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
515 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
516 (captured_main, main): Update.
517 * gdbreplay.c (main): Update.
519 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
521 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
522 value in argument pointer, return 1 if the entry is found and 0
523 otherwise. Move comment.
524 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
525 * linux-low.h (linux_get_auxv): Declare.
526 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
528 2019-04-05 Tom Tromey <tromey@adacore.com>
530 * server.c (gdbserver_usage): Use upper-case for metasyntactic
533 2019-03-28 Alan Hayward <alan.hayward@arm.com>
535 * linux-low.c (AT_HWCAP2): Add define if not already included.
537 2019-03-26 Alan Hayward <alan.hayward@arm.com>
539 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
540 (aarch64_arch_setup): Call linux_get_hwcap.
541 * linux-arm-low.c (arm_get_hwcap): Remove function.
542 (arm_read_description): Call linux_get_hwcap.
543 * linux-low.c (linux_get_auxv): New function.
544 (linux_get_hwcap): Likewise.
545 (linux_get_hwcap2): Likewise.
546 * linux-low.h (linux_get_hwcap): New declaration.
547 (linux_get_hwcap2): Likewise.
548 * linux-ppc-low.c (ppc_get_auxv): Remove function.
549 (ppc_arch_setup): Call linux_get_hwcap.
550 * linux-s390-low.c (s390_get_hwcap): Remove function.
551 (s390_arch_setup): Call linux_get_hwcap.
553 2019-03-22 Alan Hayward <alan.hayward@arm.com>
554 Jiong Wang <jiong.wang@arm.com>
556 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
557 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
559 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
561 2019-03-22 Alan Hayward <alan.hayward@arm.com>
562 Jiong Wang <jiong.wang@arm.com>
564 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
565 (aarch64_get_hwcap): New function.
566 (aarch64_arch_setup): Read APIA hwcap.
568 2019-03-22 Alan Hayward <alan.hayward@arm.com>
569 Jiong Wang <jiong.wang@arm.com>
571 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
572 (initialize_low_tracepoint): Likewise.
573 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
574 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
575 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
576 (aarch64_linux_read_description): Likewise.
577 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
579 2019-03-12 John Baldwin <jhb@FreeBSD.org>
581 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
582 i386_create_target_description for 'segments' parameter.
583 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
584 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
585 * win32-i386-low.c (i386_arch_setup): Likewise.
587 2019-03-12 Tom Tromey <tromey@adacore.com>
589 * linux-low.c (iterate_over_lwps): Update.
591 2019-03-06 Tom Tromey <tom@tromey.com>
593 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
594 (captured_main): Use SCOPE_EXIT.
596 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
598 * configure.srv: Use '$enable_unittest' instead of '$development'
599 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
602 2019-02-27 Tom Tromey <tromey@adacore.com>
604 * gdbreplay.c (logchar): Handle \r\n.
606 2019-02-07 Alan Hayward <alan.hayward@arm.com>
608 * linux-low.c (linux_attach): Add process before lwp.
609 * server.c (attach_inferior): Check if already attached.
611 2019-02-07 Tom Tromey <tom@tromey.com>
613 * x86-tdesc.h: Rename include guard.
614 * x86-low.h: Add include guard.
615 * wincecompat.h: Rename include guard.
616 * win32-low.h: Add include guard.
617 * utils.h: Rename include guard.
618 * tracepoint.h: Rename include guard.
619 * tdesc.h: Rename include guard.
620 * target.h: Rename include guard.
621 * server.h: Rename include guard.
622 * remote-utils.h: Rename include guard.
623 * regcache.h: Rename include guard.
624 * nto-low.h: Rename include guard.
625 * notif.h: Add include guard.
626 * mem-break.h: Rename include guard.
627 * lynx-low.h: Add include guard.
628 * linux-x86-tdesc.h: Add include guard.
629 * linux-s390-tdesc.h: Add include guard.
630 * linux-ppc-tdesc-init.h: Add include guard.
631 * linux-low.h: Add include guard.
632 * linux-aarch64-tdesc.h: Add include guard.
633 * linux-aarch32-low.h: Add include guard.
634 * inferiors.h: Rename include guard.
635 * i387-fp.h: Rename include guard.
636 * hostio.h: Rename include guard.
637 * gdbthread.h: Rename include guard.
638 * gdb_proc_service.h: Rename include guard.
639 * event-loop.h: Rename include guard.
640 * dll.h: Rename include guard.
641 * debug.h: Rename include guard.
642 * ax.h: Rename include guard.
644 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
647 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
648 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
650 2019-01-25 Tom Tromey <tom@tromey.com>
652 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
654 2019-01-25 Tom Tromey <tom@tromey.com>
656 * win32-low.c: Fix common/ includes.
657 * win32-i386-low.c: Fix common/ includes.
658 * tracepoint.c: Fix common/ includes.
659 * thread-db.c: Fix common/ includes.
660 * target.h: Fix common/ includes.
661 * symbol.c: Fix common/ includes.
662 * spu-low.c: Fix common/ includes.
663 * server.h: Fix common/ includes.
664 * server.c: Fix common/ includes.
665 * remote-utils.c: Fix common/ includes.
666 * regcache.h: Fix common/ includes.
667 * regcache.c: Fix common/ includes.
668 * nto-x86-low.c: Fix common/ includes.
669 * notif.h: Fix common/ includes.
670 * mem-break.h: Fix common/ includes.
671 * lynx-low.c: Fix common/ includes.
672 * lynx-i386-low.c: Fix common/ includes.
673 * linux-x86-tdesc-selftest.c: Fix common/ includes.
674 * linux-x86-low.c: Fix common/ includes.
675 * linux-low.c: Fix common/ includes.
676 * inferiors.h: Fix common/ includes.
677 * i387-fp.c: Fix common/ includes.
678 * hostio.c: Fix common/ includes.
679 * hostio-errno.c: Fix common/ includes.
680 * gdbthread.h: Fix common/ includes.
681 * gdbreplay.c: Fix common/ includes.
682 * fork-child.c: Fix common/ includes.
683 * event-loop.c: Fix common/ includes.
685 (enum gdb_agent_op): Fix common/ includes.
687 2019-01-21 Tom Tromey <tom@tromey.com>
689 * tracepoint.c: Fix includes.
690 * remote-utils.c: Fix includes.
691 * linux-x86-low.c: Fix includes.
693 2019-01-01 Joel Brobecker <brobecker@adacore.com>
695 * gdbreplay.c (gdbreplay_version): Update copyright year in
697 * server.c (gdbserver_version): Likewise.
699 2018-12-05 Alan Hayward <alan.hayward@arm.com>
701 * linux-low.c (add_lwp): Switch ordering.
703 2018-11-29 Tom Tromey <tom@tromey.com>
705 * win32-low.c (win32_join): Take pid, not process.
706 * target.h (struct target_ops) <join>: Change argument type.
707 (join_inferior): Change argument name.
708 * spu-low.c (spu_join): Take pid, not process.
709 * server.c (handle_detach): Preserve pid before destroying
711 * lynx-low.c (lynx_join): Take pid, not process.
712 * linux-low.c (linux_join): Take pid, not process.
714 2018-11-23 Alan Hayward <alan.hayward@arm.com>
716 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
717 (aarch64_cannot_fetch_register): Likewise.
718 (struct linux_target_ops): Update references.
720 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
722 * linux-ppc-low.c: Include nat/linux-ptrace.h.
724 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
726 * configure.srv (ipa_ppc_linux_regobj): Add
727 powerpc-isa207-htm-vsx32l-ipa.o and
728 powerpc-isa207-htm-vsx64l-ipa.o.
729 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
730 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
731 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
732 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
733 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
734 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
735 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
736 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
737 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
738 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
739 (init_registers_powerpc_isa207_htm_vsx32l)
740 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
741 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
742 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
743 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
744 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
745 (ppc_store_tm_ctarregset): New functions.
746 (ppc_regsets): Add entries for HTM regsets.
747 (ppc_arch_setup): Set htm in features struct when needed. Set
748 sizes for the HTM regsets.
749 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
750 (initialize_low_arch): Call
751 init_registers_powerpc_isa207_htm_vsx32l and
752 init_registers_powerpc_isa207_htm_vsx64l.
753 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
754 PPC_TDESC_ISA207_HTM_VSX.
755 (initialize_low_tracepoint): Call
756 init_registers_powerpc_isa207_htm_vsx32l and
757 init_registers_powerpc_isa207_htm_vsx64l.
759 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
761 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
762 rs6000/power-linux-pmu.xml to srv_xmlfiles.
763 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
764 (ppc_store_pmuregset): New functions.
765 (ppc_regsets): Add entries for ebb and pmu regsets.
766 (ppc_arch_setup): Set isa207 in features struct if the ebb and
767 pmu regsets are available. Set sizes for these regsets.
769 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
771 * configure.srv (ipa_ppc_linux_regobj): Add
772 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
773 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
774 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
775 rs6000/powerpc-isa207-vsx32l.xml, and
776 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
777 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
778 <PPC_TDESC_ISA207_VSX>: New enum value.
779 (init_registers_powerpc_isa207_vsx32l): Declare.
780 (init_registers_powerpc_isa207_vsx64l): Declare.
781 * linux-ppc-low.c (ppc_fill_tarregset): New function.
782 (ppc_store_tarregset): New function.
783 (ppc_regsets): Add entry for the TAR regset.
784 (ppc_arch_setup): Set isa207 in features struct when needed. Set
785 size for the TAR regsets.
786 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
787 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
788 and init_registers_powerpc_isa207_vsx64l.
789 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
790 (initialize_low_tracepoint): Call
791 init_registers_powerpc_isa207_vsx32l and
792 init_registers_powerpc_isa207_vsx64l.
794 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
795 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
797 * configure.srv (ipa_ppc_linux_regobj): Add
798 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
799 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
800 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
801 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
802 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
803 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
804 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
805 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
806 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
807 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
808 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
809 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
810 (ppc_hwcap): Add comment.
811 (ppc_hwcap2): New global.
812 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
813 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
814 (ppc_regsets): Add entries for the DSCR and PPR regsets.
815 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
816 when needed. Set sizes for the the DSCR and PPR regsets.
817 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
818 (initialize_low_arch): Call
819 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
820 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
821 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
822 PPC_TDESC_ISA205_PPR_DSCR_VSX.
823 (initialize_low_tracepoint): Call
824 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
825 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
827 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
829 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
831 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
832 Simon Marchi <simark@simark.ca>
834 * acinclude.m4: Include "../selftest.m4".
835 * configure: Regenerate.
836 * configure.ac: Use "GDB_AC_SELFTEST".
837 * configure.srv: Use "$enable_unittests" instead of
838 "$development" when checking whether unit tests have been
840 * server.c (captured_main): Update message informing that
841 selftests have been disabled.
843 2018-10-04 Tom Tromey <tom@tromey.com>
845 * configure: Rebuild.
847 2018-10-04 Tom Tromey <tom@tromey.com>
849 * server.c (handle_status): Rename inner "thread".
850 (process_serial_event): Declare "res" in 'm' case.
851 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
852 (iterate_over_lwps): Rename inner "thread".
853 (linux_qxfer_libraries_svr4): Rename inner "len".
854 * gdbthread.h (find_thread_in_random): Rename inner "thread".
856 2018-10-01 Gary Benson <gbenson@redhat.com>
858 * gdb_proc_service.h: Moved common code to
859 common/gdb_proc_service.h.
861 2018-10-01 Gary Benson <gbenson@redhat.com>
863 * gdb_proc_service.h: Synchronize comments and whitespace with
864 GDB's version of this file.
866 2018-09-25 Tom Tromey <tom@tromey.com>
868 * configure: Rebuild.
869 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
871 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
873 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
874 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
875 ($(IPA_LIB)): Sort IPA_OBJS.
877 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
879 * Makefile.in: Remove references to $(ADD_DEPS).
881 2018-09-16 Tom Tromey <tom@tromey.com>
883 * remote-utils.c (remote_open): Use GNU style for metasyntactic
885 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
888 2018-09-05 Tom Tromey <tom@tromey.com>
890 * configure: Rebuild.
892 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
895 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
897 2018-08-27 Tom Tromey <tom@tromey.com>
900 * configure: Rebuild.
902 2018-08-27 Tom Tromey <tom@tromey.com>
904 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
905 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
906 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
907 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
908 (s390x_emit_stack_adjust): Add casts to unsigned char.
910 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
914 * server.h (struct client_state) <disable_randomization>:
917 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
919 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
921 (mips_supply_ptrace_register): Likewise.
923 2018-07-22 Tom Tromey <tom@tromey.com>
925 * configure: Rebuild.
927 2018-07-22 Tom Tromey <tom@tromey.com>
929 * win32-low.c (win32_create_inferior): Remove unused variables.
930 * gdbreplay.c (remote_open): Remove unused variable.
931 * remote-utils.c (remote_prepare): Remove unused variable.
932 * x86-tdesc.h (X86_TDESC_H): Define.
933 (amd64_expedite_regs): Define conditionally.
934 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
935 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
936 * remote-utils.c (readchar): Remove unused variable.
938 2018-07-13 Pedro Alves <palves@redhat.com>
940 * linux-low.c (linux_kill): Change parameter to process_info
941 pointer instead of pid. Adjust.
942 * lynx-low.c (lynx_kill): Likewise.
943 * nto-low.c (nto_kill): Likewise.
944 * spu-low.c (spu_kill): Likewise.
945 * win32-low.c (win32_kill): Likewise.
946 * server.c (handle_v_kill, kill_inferior_callback)
947 (detach_or_kill_for_exit): Adjust.
948 * target.c (kill_inferior): Change parameter to process_info
949 pointer instead of pid. Adjust.
950 * target.h (struct target_ops) <kill>: Change parameter to
951 process_info pointer instead of pid. Adjust all implementations
953 (kill_inferior): Likewise.
955 2018-07-13 Pedro Alves <palves@redhat.com>
957 * linux-low.c (linux_detach, linux_join): Change parameter to
958 process_info pointer instead of pid. Adjust.
959 * lynx-low.c (lynx_detach, lynx_join): Likewise.
960 * nto-low.c (nto_detach): Likewise.
961 * spu-low.c (spu_detach, spu_join): Likewise.
962 * win32-low.c (win32_detach, win32_join): Likewise.
963 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
964 * target.h (struct target_ops) <detach, join>: Change parameter to
965 process_info pointer instead of pid. Adjust all implementations
967 (detach_inferior, join_inferior): Rename 'pid' parameter to
970 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
971 Jan Kratochvil <jan.kratochvil@redhat.com>
972 Paul Fertser <fercerpav@gmail.com>
973 Tsutomu Seki <sekiriki@gmail.com>
975 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
976 (OBS): Add 'common/netstuff.o'.
977 (GDBREPLAY_OBS): Likewise.
978 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
979 (remote_open): Implement support for IPv6
981 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
983 (handle_accept_event): Accept connections from IPv6 sources.
984 (remote_prepare): Handle IPv6-style hostnames; implement
985 support for IPv6 connections.
986 (remote_open): Implement support for printing connections from
989 2018-07-11 Pedro Alves <palves@redhat.com>
992 * mem-break.c (any_persistent_commands): Add process_info
993 parameter and use it instead of relying on the current process.
994 Change return type to bool.
995 * mem-break.h (any_persistent_commands): Add process_info
996 parameter and change return type to bool.
997 * server.c (handle_detach): Remove require_running_or_return call.
998 Look up the process_info for the process we're about to detach.
999 If not found, return back error to GDB. Adjust
1000 any_persistent_commands call to pass down a process pointer.
1002 2018-07-11 Pedro Alves <palves@redhat.com>
1004 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
1005 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
1006 instead of collect_register_by_name.
1007 * regcache.c (regcache_raw_get_unsigned_by_name): New.
1008 * regcache.h (regcache_raw_get_unsigned_by_name): New.
1010 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1011 Pedro Alves <palves@redhat.com>
1013 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
1015 2018-07-03 Tom Tromey <tom@tromey.com>
1017 * linux-low.c: Update.
1018 * lynx-low.c: Update.
1019 * mem-break.c: Update.
1020 * nto-low.c: Update.
1021 * remote-utils.c: Update.
1023 * spu-low.c: Update.
1025 * win32-low.c: Update.
1027 2018-07-03 Tom Tromey <tom@tromey.com>
1031 2018-07-03 Tom Tromey <tom@tromey.com>
1033 * linux-low.c: Update.
1035 2018-07-03 Tom Tromey <tom@tromey.com>
1039 2018-07-03 Tom Tromey <tom@tromey.com>
1041 * linux-low.c: Update.
1042 * linux-mips-low.c: Update.
1043 * lynx-low.c: Update.
1044 * nto-low.c: Update.
1045 * remote-utils.c: Update.
1047 * spu-low.c: Update.
1049 * thread-db.c: Update.
1051 2018-07-03 Tom Tromey <tom@tromey.com>
1053 * linux-low.c: Update.
1054 * linux-mips-low.c: Update.
1055 * lynx-low.c: Update.
1056 * mem-break.c: Update.
1057 * nto-low.c: Update.
1058 * remote-utils.c: Update.
1060 * spu-low.c: Update.
1062 * tracepoint.c: Update.
1064 2018-07-03 Tom Tromey <tom@tromey.com>
1066 * linux-low.c: Update.
1067 * linux-ppc-low.c: Update.
1068 * linux-x86-low.c: Update.
1069 * proc-service.c: Update.
1071 * spu-low.c: Update.
1072 * thread-db.c: Update.
1073 * win32-low.c: Update.
1075 2018-07-03 Tom Tromey <tom@tromey.com>
1077 * linux-low.c: Update.
1078 * lynx-low.c: Update.
1079 * nto-low.c: Update.
1080 * remote-utils.c: Update.
1081 * spu-low.c: Update.
1082 * thread-db.c: Update.
1083 * win32-low.c: Update.
1085 2018-06-29 Joel Brobecker <brobecker@adacore.com>
1087 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
1088 parameter in call to 'amd64_create_target_description'.
1090 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1092 * x86-tdesc.h: Remove executable permission flag.
1094 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1096 * configure.ac: Remove AC_PREREQ, add missing quoting.
1097 * configure: Re-generate.
1098 * config.in: Re-generate.
1099 * aclocal.m4: Re-generate.
1101 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
1103 * tracepoint.h (current_traceframe): Remove declaration.
1105 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1107 * linux-aarch64-low.c (is_sve_tdesc): New function.
1108 (aarch64_sve_regs_copy_to_regcache): Likewise.
1109 (aarch64_sve_regs_copy_from_regcache): Likewise.
1110 (aarch64_regs_info): Add SVE checks.
1111 (initialize_low_arch): Initialize SVE.
1113 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1115 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
1117 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1119 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
1120 (initialize_low_tracepoint): Likewise
1121 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
1122 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
1124 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
1126 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
1128 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1130 * server.h (PBUFSIZ): Increase size
1132 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1134 * regcache.c (regcache::raw_compare): New function.
1135 * regcache.h (regcache::raw_compare): New declaration.
1137 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1139 * regcache.c (new_register_cache): Use new.
1140 (free_register_cache): Use delete.
1141 (register_data): Use const.
1142 (supply_register): Move body inside regcache.
1143 (regcache::raw_supply): New override function.
1144 (collect_register): Move body inside regcache.
1145 (regcache::raw_collect): New override function.
1146 (regcache::get_register_status): New override function.
1147 * regcache.h (struct regcache): Inherit from reg_buffer_common.
1149 2018-06-09 Tom Tromey <tom@tromey.com>
1151 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
1153 (event_queue): Use std::queue.
1154 (gdb_event_xfree): Remove.
1155 (initialize_event_loop, process_event, wait_for_event): Update.
1157 2018-06-08 Stan Cox <scox@redhat.com>
1159 * win32-low.c (win32_create_inferior): last_ptid and last_status
1160 moved to client_state.
1162 2018-06-08 Pedro Alves <palves@redhat.com>
1164 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
1165 common/common-exceptions.o, common/common-utils.o,
1166 common/errors.o, common/print-utils.o and utils.o.
1167 * gdbreplay.c: Include "common-defs.h" instead of the two
1168 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
1169 string.h or alloca.h.
1170 (perror_with_name): Delete.
1171 (remote_open): Use xstrdup instead of strdup.
1172 (main): Rename to ...
1173 (captured_main): ... this.
1176 2018-06-08 Tom Tromey <tom@tromey.com>
1178 * linux-low.c (linux_low_read_btrace): Update.
1180 2018-06-04 Stan Cox <scox@redhat.com>
1182 * server.h (struct client_state): New.
1183 * server.c (cont_thread, general_thread, multi_process)
1184 (report_fork_events, report_vfork_events, report_exec_events)
1185 (report_thread_events, swbreak_feature, hwbreak_feature)
1186 (vCont_supported, disable_randomization, pass_signals)
1187 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
1188 Moved to client_state.
1189 * remote-utils.c (remote_debug, noack_mode)
1190 (transport_is_reliable): Moved to client_state.
1191 * tracepoint.c (current_traceframe): Moved to client_state.
1194 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
1195 linux-low.c, remote-utils.h, target.c: Use client_state.
1197 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1199 * configure.srv: Add new c/h file.
1201 2018-05-31 Alan Hayward <alan.hayward@arm.com>
1203 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
1206 2018-05-25 Maciej W. Rozycki <macro@mips.com>
1208 * gdb.arch/mips-fpregset-core.exp: New test.
1209 * gdb.arch/mips-fpregset-core.c: New test source.
1211 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
1214 * hostio.c (require_int): Do not report overflow for integers
1215 between 0xfffffff and 0x7fffffff.
1217 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1219 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
1220 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
1221 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
1223 (the_low_target): Wire them.
1225 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1227 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
1228 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
1229 mode. Call collect_register_by_name with vscr using
1230 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
1231 (ppc_store_vrregset): Add and set vscr_offset variable as in
1232 ppc_fill_vrregset. Call supply_register_by_name with vscr using
1235 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1237 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
1238 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
1239 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
1241 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1243 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
1244 (ppc_store_vsxregset): Likewise.
1245 (ppc_fill_vrregset): Likewise.
1246 (ppc_store_vrregset): Likewise.
1247 (ppc_fill_evrregset): Likewise.
1248 (ppc_store_evrregset): Likewise.
1249 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
1250 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
1253 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1255 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
1256 wordsize of the inferior. Call ppc_linux_target_wordsize.
1258 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
1260 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
1261 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
1262 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
1263 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
1264 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
1265 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
1266 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
1267 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
1268 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
1269 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
1270 (tdesc_powerpc_e500l): Remove.
1271 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
1272 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
1273 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
1274 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
1276 (ppc_arch_setup): Remove target description matching code. Fill a
1277 ppc_linux_features struct and call ppc_linux_match_description
1280 2018-05-22 Maciej W. Rozycki <macro@mips.com>
1282 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
1283 width of the requested register exceeds the width of the
1285 (mips_cannot_store_register): Likewise.
1287 2018-05-21 Maciej W. Rozycki <macro@mips.com>
1289 * linux-mips-low.c (mips_fetch_register): New function. Update
1291 (mips_store_gregset): Supply 0 rather than $restart for $zero.
1292 (the_low_target): Wire `mips_fetch_register'.
1294 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1296 * lynx-i386-low.c (LYNXOS_178): New macro.
1297 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
1298 the layout on LynxOS-178.
1299 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
1300 handle floating point registers that are not supported by
1303 2018-05-10 Tom Tromey <tom@tromey.com>
1305 * configure: Rebuild.
1307 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1310 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
1311 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
1312 Use it to set the expedite_regs field in the given tdesc.
1313 * x86-tdesc.h: New file.
1314 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
1315 Adjust following the addition of the new expedite_regs parameter
1316 to init_target_desc.
1317 * linux-tic6x-low.c (tic6x_read_description): Likewise.
1318 * linux-x86-tdesc.c: #include "x86-tdesc.h".
1319 (i386_linux_read_description, amd64_linux_read_description):
1320 Adjust following the addition of the new expedite_regs parameter
1321 to init_target_desc.
1322 * lynx-i386-low.c: #include "x86-tdesc.h".
1323 (lynx_i386_arch_setup): Adjust following the addition of the new
1324 expedite_regs parameter to init_target_desc.
1325 * nto-x86-low.c: #include "x86-tdesc.h".
1326 (nto_x86_arch_setup): Adjust following the addition of the new
1327 expedite_regs parameter to init_target_desc.
1328 * win32-i386-low.c: #include "x86-tdesc.h".
1329 (i386_arch_setup): Adjust following the addition of the new
1330 expedite_regs parameter to init_target_desc.
1332 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1335 * win32-low.c (win32_create_inferior): Add call to my_wait
1336 setting last_status global.
1338 2018-05-10 Joel Brobecker <brobecker@adacore.com>
1341 * win32-low.c (create_process): Only call gdb_tilde_expand if
1342 inferior_cwd is not NULL.
1344 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
1346 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
1347 registers to the cache if their values have changed.
1348 (i387_xsave_to_cache): Provide default values for x87 control
1349 registers when these features are available, but disabled.
1350 * regcache.c (supply_register_by_name_zeroed): New function.
1351 * regcache.h (supply_register_by_name_zeroed): Declare new
1354 2018-05-07 Tom Tromey <tom@tromey.com>
1356 * configure: Rebuild.
1358 2018-05-04 Tom Tromey <tom@tromey.com>
1360 * configure: Rebuild.
1362 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1363 Pedro Alves <palves@redhat.com>
1365 * linux-aarch64-low.c (aarch64_stopped_data_address):
1368 2018-04-27 Tom Tromey <tom@tromey.com>
1370 * configure: Rebuild.
1372 2018-04-23 Tom Tromey <tom@tromey.com>
1374 * configure: Rebuild.
1376 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1378 * Makefile.in (depcomp): Add "..".
1379 (all_deps_files): New and use it.
1381 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1383 * configure.srv (aarch64*-*-linux*): Don't include xml.
1384 (i[34567]86-*-cygwin*): Likewise.
1385 (i[34567]86-*-linux*): Likewise.
1386 (i[34567]86-*-lynxos*): Likewise.
1387 (i[34567]86-*-mingw32ce*): Likewise.
1388 (i[34567]86-*-mingw*): Likewise.
1389 (i[34567]86-*-nto*): Likewise.
1390 (tic6x-*-uclinux): Likewise.
1391 (x86_64-*-linux*): Likewise.
1392 (x86_64-*-mingw*): Likewise.
1393 (x86_64-*-cygwin*): Likewise.
1395 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1397 * tdesc.c: Remove xml parameter.
1399 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1401 * server.c (get_features_xml): Remove cast.
1402 * tdesc.c (void target_desc::accept): Fill in function.
1403 (tdesc_get_features_xml): Remove old xml creation.
1404 (print_xml_feature::visit_pre): Add xml vistor.
1405 * tdesc.h (struct target_desc): Make xmltarget mutable.
1406 (tdesc_get_features_xml): Remove declaration.
1408 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1410 * tdesc.c (tdesc_architecture_name): Add new function.
1411 (tdesc_osabi_name): Likewise.
1412 (tdesc_get_features_xml): Use new functions.
1414 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1416 * tdesc.c (tdesc_create_flags): Remove.
1417 (tdesc_add_flag): Likewise.
1418 (tdesc_named_type): Likewise.
1419 (tdesc_create_union): Likewise.
1420 (tdesc_create_struct): Likewise.
1421 (tdesc_create_vector): Likewise.
1422 (tdesc_add_bitfield): Likewise.
1423 (tdesc_add_field): Likewise.
1424 (tdesc_set_struct_size): Likewise.
1426 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1428 * tdesc.c (~target_desc): Remove implictly deleted items.
1429 (init_target_desc): Iterate all features.
1430 (tdesc_get_features_xml): Use vector.
1431 (tdesc_create_feature): Create feature.
1432 * tdesc.h (tdesc_feature) Remove
1433 (target_desc): Add features.
1435 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1437 * Makefile.in: Add common/tdesc.c
1438 * tdesc.c (init_target_desc): init all reg_defs from register
1440 (tdesc_create_reg): Create tdesc_reg.
1441 * tdesc.h (tdesc_feature): Add register vector.
1443 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1445 * tdesc.h (struct target_desc) <features>: Change type to
1446 std::vector<std::string>.
1447 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1449 (tdesc_get_features_xml): Likewise.
1450 (tdesc_create_feature): Likewise.
1452 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1454 * regcache.c (find_register_by_number): Return a ref.
1455 (find_regno): Use references.
1456 (register_size): Likewise.
1457 (register_data): Likewise.
1458 * tdesc.c (target_desc::~target_desc): Remove free calls.
1459 (target_desc::operator==): Use std::vector compare.
1460 (init_target_desc): Use reference.
1461 (tdesc_create_reg): Use reg constructors.
1462 * tdesc.h (struct target_desc): Replace pointer with object.
1464 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1466 * regcache.c (find_register_by_number): Make static.
1467 (find_regno): Use find_register_by_number
1468 * regcache.h (struct reg): Remove declaration.
1470 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1472 * tdesc.c (target_desc::~target_desc): Move to here.
1473 (target_desc::operator==): Likewise.
1474 * tdesc.h (target_desc::~target_desc): Move from here.
1475 (target_desc::operator==): Likewise.
1477 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1479 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1481 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1483 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1485 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1486 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1487 and init_registers_s390_gs_linux64.
1489 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1491 * linux-s390-low.c (s390_fill_gs): Remove function.
1492 (s390_fill_gsbc): Remove function.
1493 (s390_regsets): Set fill functions for the guarded storage regsets
1496 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1498 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1499 the word size. Add comment.
1500 (s390_get_wordsize): New function.
1501 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1502 pswm with it. Instead, use s390_get_wordsize to determine the
1503 word size first and derive the correct tdesc from that directly.
1505 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1507 * Makefile.in: Include silent-rules.mk.
1508 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1509 (COMPILE): Add ECHO_CXX.
1510 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1511 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1512 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1513 (version-generated.c): Add ECHO_GEN.
1514 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1515 (IPAGENT_COMPILE): Add ECHO_CXX.
1516 (%-generated.c): Add ECHO_REGDAT.
1518 2018-03-14 Tom Tromey <tom@tromey.com>
1521 * ax.c (ax_printf): Special case for NULL.
1523 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1525 * linux-low.c (linux_qxfer_libraries_svr4): Use
1526 xml_escape_text_append.
1528 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1530 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1532 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1534 * server.c (handle_general_set): Remove unnecessary xstrdup.
1536 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1538 * server.c (parse_debug_format_options): Adjust to
1539 delim_string_to_char_ptr_vec changes.
1540 * thread-db.c (thread_db_load_search): Adjust to
1541 dirnames_to_char_ptr_vec changes.
1543 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1545 * target.h (target_enable_btrace, target_disable_btrace)
1546 (target_read_btrace, target_read_btrace_conf): Turn macro into
1547 inline function. Throw error if target method is not defined.
1548 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1549 check for btrace target method. Be prepared to handle exceptions
1550 from btrace target methods.
1552 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1554 * server.c (captured_main): Change order of error message printed
1555 when the current working directory cannot be found.
1557 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1559 * server.c: Include "filenames.h" and "pathstuff.h".
1560 (program_name): Delete variable.
1561 (program_path): New anonymous class.
1562 (get_exec_wrapper): Use "program_path" instead of
1564 (handle_v_run): Likewise.
1565 (captured_main): Likewise.
1566 (process_serial_event): Likewise.
1568 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1570 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1571 (OBJS): Add "pathstuff.o".
1572 * server.c (current_directory): New global variable.
1573 (captured_main): Initialize "current_directory".
1575 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1577 * tdesc.c: Use common/tdesc.h.
1578 * tdesc.h: Likewise.
1580 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1581 Simon Marchi <simon.marchi@ericsson.com>
1583 * Makefile.in: Switch order of make rules.
1585 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1587 * Makefile.in: Add common directory in build.
1588 * configure.ac: Add common reference.
1589 * configure: Regenerate.
1591 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1593 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1594 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1595 * spu-low.c (spu_target_ops): Likewise.
1596 * win32-low.c (win32_target_ops): Likewise.
1597 * server.c (supported_btrace_packets): Report packets unconditionally.
1598 * target.h (target_ops) <supports_btrace>: Remove.
1599 (target_supports_btrace): Remove.
1601 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1603 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1604 (handle_btrace_disable): Change return type to void. Use exceptions
1606 (handle_btrace_general_set): Catch exception and copy message to
1609 2018-02-08 Tom Tromey <tom@tromey.com>
1611 * linux-low.c (install_software_single_step_breakpoints): Use
1612 make_scoped_restore.
1613 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1614 (do_restore_current_thread_cleanup): Remove.
1615 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1618 2018-02-08 Tom Tromey <tom@tromey.com>
1620 * mem-break.c (set_raw_breakpoint_at): Use
1621 gdb::unique_xmalloc_ptr.
1623 2018-01-30 Pedro Alves <palves@redhat.com>
1626 * target.c (target_terminal::terminal_state): Rename to ...
1627 (target_terminal::m_terminal_state): ... this.
1629 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1631 * linux-low.c (handle_extended_wait): Surround call to
1632 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1634 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1636 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1637 linux_ptrace_attach_fail_reason_string now returning an
1639 (linux_attach): Likewise.
1640 * thread-db.c (attach_thread): Likewise.
1642 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1645 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1646 checking for fs_base/gs_base fields in struct user_regs_struct.
1647 * configure: Regenerate.
1649 2018-01-16 Yao Qi <yao.qi@linaro.org>
1652 * linux-low.c (fetch_register): Call supply_register instead of
1655 2018-01-08 Yao Qi <yao.qi@linaro.org>
1656 Simon Marchi <simon.marchi@ericsson.com>
1658 * Makefile.in (OBS): Remove selftest.o.
1659 * configure.ac: Set srv_selftest_objs if $development is true.
1660 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1661 * configure: Re-generated.
1662 * server.c (captured_main): Wrap variable selftest_filter with
1665 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1667 * server.c (parse_debug_format_options): Return std::string.
1668 (handle_monitor_command, captured_main): Adjust.
1670 2018-01-05 Pedro Alves <palves@redhat.com>
1673 * server.c (captured_main): Pass quiet=false to
1674 save_original_signals_state.
1676 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1678 * gdbreplay.c (gdbreplay_version): Update copyright year in
1680 * server.c (gdbserver_version): Likewise.
1682 2017-12-08 Tom Tromey <tom@tromey.com>
1684 * ax.c (ax_printf): Update.
1686 2017-12-07 Yao Qi <yao.qi@linaro.org>
1688 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1689 aarch64_linux_read_description.
1690 * linux-amd64-ipa.c (idx2mask): New array.
1691 (get_ipa_tdesc): Move idx2mask out.
1692 (initialize_low_tracepoint): Initialize target descriptions.
1693 * linux-i386-ipa.c (idx2mask): New array.
1694 (get_ipa_tdesc): Move idx2mask out.
1695 (initialize_low_tracepoint): Initialize target descriptions.
1697 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1699 * tdesc.c (struct tdesc_type): Change return type.
1700 (tdesc_add_flag): Change parameter type.
1701 (tdesc_add_bitfield): Likewise.
1702 (tdesc_add_field): Likewise.
1703 (tdesc_set_struct_size): Likewise.
1705 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1707 * regcache.c (registers_to_string): Remove unused variable.
1709 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1711 * inferiors.c (for_each_inferior_with_data): Remove.
1712 * inferiors.h (for_each_inferior_with_data): Remove.
1713 * server.c (handle_qxfer_threads_worker): Change parameter type.
1714 (handle_qxfer_threads_proper): Use for_each_thread.
1716 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1718 * inferiors.c (for_each_inferior): Remove.
1719 (clear_inferiors): Use for_each_thread.
1720 * inferiors.h (for_each_inferior): Remove.
1721 * linux-low.c (linux_wait_for_event_filtered): Use
1723 (linux_stabilize_threads): Likewise.
1724 * regcache.c (regcache_release): Likewise.
1725 * server.c (gdb_wants_all_threads_stopped): Likewise.
1726 (clear_pending_status_callback): Remove.
1727 (handle_status): Use for_each_thread.
1728 (captured_main): Likewise.
1729 * win32-low.c (child_init_thread_list): Likewise.
1730 (win32_clear_inferiors): Likewise.
1731 (fake_breakpoint_event): Likewise.
1733 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1735 * inferiors.h (find_inferior): Remove.
1736 * inferiors.c (find_inferior): Remove.
1738 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1740 * linux-low.c (resume_status_pending_p): Update comment.
1741 (need_step_over_p): Update comment.
1743 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1745 * linux-low.c (proceed_one_lwp): Return void, change parameter
1747 (unsuspend_and_proceed_one_lwp): Likewise.
1748 (proceed_all_lwps): Use for_each_thread.
1749 (unstop_all_lwps): Likewise.
1751 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1753 * linux-low.c (linux_resume_one_thread): Return void, take
1755 (linux_resume): Use for_each_thread.
1757 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1759 * linux-low.c (send_sigstop_callback): Return void, change
1760 parameter type. Rename to...
1761 (send_sigstop): ... this.
1762 (suspend_and_send_sigstop_callback): Return void, change parameter
1764 (suspend_and_send_sigstop): ... this.
1765 (stop_all_lwps): Use for_each_thread.
1767 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1769 * linux-low.c (lwp_running): Return bool, remove unused
1771 (linux_stabilize_threads): Use find_thread.
1773 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1775 * linux-low.c (select_singlestep_lwp_callback): Remove.
1776 (count_events_callback): Remove.
1777 (select_event_lwp_callback): Remove.
1778 (select_event_lwp): Use find_thread/for_each_thread.
1780 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1782 * linux-low.c (not_stopped_callback): Return bool, take filter
1784 (linux_wait_for_event_filtered): Use find_thread.
1785 (linux_wait_1): Likewise.
1787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1789 * linux-low.c (same_lwp): Remove.
1790 (find_lwp_pid): Use find_thread.
1792 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1794 * linux-low.c (delete_lwp_callback): Remove.
1795 (linux_mourn): Use for_each_thread.
1797 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1799 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1800 args parameter, don't check for pid.
1801 (linux_detach): Use for_each_thread.
1803 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1805 * linux-low.c (struct counter): Remove.
1806 (second_thread_of_pid_p): Remove.
1807 (last_thread_of_process_p): Use find_thread.
1809 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1811 * inferiors.c (find_inferior_in_random): Remove.
1812 * inferiors.h (find_inferior_in_random): Remove.
1813 * linux-low.c (status_pending_p_callback): Return bool, accept
1814 parameter ptid directly.
1815 (linux_wait_for_event_filtered): Use find_thread_in_random.
1816 (linux_wait_1): Likewise.
1818 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1820 * inferiors.c (find_inferior_id): Remove.
1821 (find_thread_ptid): Move implemention from find_inferior_id to
1823 * inferiors.h (find_inferior_id): Remove.
1824 * server.c (handle_status): Use find_thread_ptid.
1825 (process_serial_event): Likewise.
1826 * thread-db.c (find_one_thread): Likewise.
1827 (thread_db_thread_handle): Likewise.
1828 * win32-low.c (thread_rec): Likewise.
1829 (child_delete_thread): Likewise.
1830 (win32_thread_alive): Likewise.
1831 (get_child_debug_event): Likewise.
1833 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1835 * linux-mips-low.c (update_watch_registers_callback): Return
1836 void, remove pid_p parameter, don't check for pid.
1837 (mips_insert_point, mips_remove_point): Use for_each_thread.
1839 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1841 * lynx.low (lynx_delete_thread_callback): Remove.
1842 (lynx_mourn): Use for_each_thread.
1844 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1846 * regcache.c (regcache_invalidate_one): Remove.
1847 (regcache_invalidate_pid): use for_each_thread.
1849 2017-11-26 Tom Tromey <tom@tromey.com>
1851 * linux-low.c (linux_create_inferior): Update.
1853 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1855 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1857 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1859 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1860 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1861 * linux-aarch64-tdesc-selftest.c: New file.
1862 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1864 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1866 * configure.srv: Add new file.
1867 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1868 * linux-aarch64-tdesc-selftest.c: New file.
1869 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1871 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1873 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1874 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1875 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1877 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1879 * configure.srv: Add new files.
1880 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1881 aarch64_linux_read_description.
1882 * linux-aarch64-low.c (aarch64_linux_read_description):
1883 Merge with aarch64_arch_setup.
1884 (aarch64_arch_setup): Call aarch64_linux_read_description.
1885 * linux-aarch64-tdesc.c: New file.
1886 * linux-aarch64-tdesc.h: New file.
1888 2017-11-24 Yao Qi <yao.qi@linaro.org>
1890 * configure.srv: Set $srv_regobj for tic6x-linux.
1891 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1892 (tic6x_read_description): Move some code to tic6x_arch_setup.
1893 (tic6x_tdesc_test): New function.
1894 (initialize_low_arch): Call selftests::register_test.
1896 2017-11-22 Yao Qi <yao.qi@linaro.org>
1898 * remote-utils.c (prepare_resume_reply): Use memcpy.
1900 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1902 * linux-low.c (kill_one_lwp_callback): Return void, take
1903 argument directly, don't filter on pid.
1904 (linux_kill): Use for_each_thread.
1906 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1908 * linux-low.c (need_step_over_p): Return bool, remove dummy
1910 (linux_resume, proceed_all_lwps): Use find_thread.
1912 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1914 * linux-low.c (resume_status_pending_p): Return bool, remove
1916 (linux_resume): Use find_thread.
1918 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1920 * linux-low.c (struct thread_resume_array): Remove.
1921 (linux_set_resume_request): Return void, take arguments
1923 (linux_resume): Use for_each_thread.
1925 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1927 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1928 return bool, remove data argument.
1929 (linux_stabilize_threads): Use find_thread.
1931 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1933 * linux-low.c (unsuspend_one_lwp): Remove.
1934 (unsuspend_all_lwps): Use for_each_thread, inline code from
1937 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1939 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1940 * linux-low.c (struct iterate_over_lwps_args): Remove.
1941 (iterate_over_lwps_filter): Remove.
1942 (iterate_over_lwps): Use find_thread.
1944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1946 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1947 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1948 code from reset_lwp_ptrace_options_callback.
1950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1952 * linux-arm-low.c (struct update_registers_data): Remove.
1953 (update_registers_callback): Return void, take arguments
1954 directly, don't check thread's pid.
1955 (arm_insert_point, arm_remove_point): Use for_each_thread.
1957 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1959 * win32-low.c (continue_one_thread): Return void, take argument
1961 (child_continue): Use for_each_thread.
1963 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1965 * win32-i386-low.c (update_debug_registers_callback): Rename
1967 (update_debug_registers): ... this, return void, remove pid_p arg.
1968 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1970 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1972 * inferiors.h (struct process_info): Add constructor, initialize
1974 <syscalls_to_catch>: Change type to std::vector<int>.
1975 * inferiors.c (add_process): Allocate process_info with new.
1976 (remove_process): Free process_info with delete.
1977 * linux-low.c (handle_extended_wait): Adjust.
1978 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1979 * server.c (handle_general_set): Adjust.
1981 2017-11-16 Pedro Alves <palves@redhat.com>
1983 * remote-utils.c (remote_close): Block SIGIO signals instead of
1984 uninstalling the SIGIO handler.
1986 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1988 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1990 2017-11-16 Yao Qi <yao.qi@linaro.org>
1992 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1993 (tic6x_store_gregset): Likewise.
1994 (tic6x_usrregs_info): Move it up.
1996 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1998 * Makefile.in: Update arch rules.
1999 * configure.srv: Explicitly mark arch/ files.
2001 2017-11-13 Andreas Schwab <schwab@suse.de>
2003 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
2005 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2007 2017-11-06 Pedro Alves <palves@redhat.com>
2009 * config.in, configure: Regenerate.
2011 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2013 * target.c (struct thread_search): Remove.
2014 (thread_search_callback): Remove.
2015 (prepare_to_access_memory): Use for_each_thread instead of
2016 find_inferior. Inline code from thread_search_callback.
2018 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2020 * server.c (struct visit_actioned_threads_data): Remove.
2021 (visit_actioned_threads): Change prototype to take arguments
2023 (resume): Use find_thread instead of find_inferior.
2025 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2027 * server.c (queue_stop_reply_callback): Change prototype, return
2029 (find_status_pending_thread_callback): Remove.
2030 (handle_status): Replace find_inferior with find_thread and
2033 2017-10-25 Alan Hayward <alan.hayward@arm.com>
2035 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
2037 (aarch64_store_gregset): Likewise.
2038 (aarch64_fill_fpregset): Likewise.
2039 (aarch64_store_fpregset): Likewise.
2041 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
2043 * gdbthread.h (find_thread, for_each_thread): New functions.
2044 * inferiors.c (thread_of_pid): Remove.
2045 (find_any_thread_of_pid): Use find_thread.
2046 * linux-low.c (num_lwps): Use for_each_thread.
2048 2017-10-17 Yao Qi <yao.qi@linaro.org>
2050 * Makefile.in: Remove one rule.
2051 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
2053 2017-10-17 Yao Qi <yao.qi@linaro.org>
2055 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
2056 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
2058 2017-10-17 Yao Qi <yao.qi@linaro.org>
2060 * configure.srv: Rename arm.o with arch/arm.o.
2062 2017-10-17 Yao Qi <yao.qi@linaro.org>
2064 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
2065 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
2066 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
2067 (arch-i386.o, arch-amd64.o): Remove rules.
2068 (arch/%.o): New rule.
2069 Update POSTCOMPILE and COMPILE.pre.
2070 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2071 * configure: Re-generated.
2072 * configure.srv: Replace arch-i386.o with arch/i386.o.
2073 Replace arch-amd64.o with arch/amd64.o.
2075 2017-10-16 Yao Qi <yao.qi@linaro.org>
2077 * configure: Regenerated.
2079 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2081 * inferiors.h: (struct inferior_list): Remove.
2082 (struct inferior_list_entry); Remove.
2083 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
2084 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
2085 get_first_inferior): Remove.
2086 (for_each_inferior, for_each_inferior_with_data, find_inferior,
2087 find_inferior_id, find_inferior_in_random): Change signature.
2088 * inferiors.c (all_threads): Change type to
2089 std::list<thread_info *>.
2090 (get_thread): Remove macro.
2091 (find_inferior, find_inferior_id): Change signature, implement
2093 (find_inferior_in_random): Change signature, implement using
2094 find_thread_in_random.
2095 (for_each_inferior, for_each_inferior_with_data): Change
2096 signature, implement using for_each_thread.
2097 (add_inferior_to_list, remove_inferior): Remove.
2098 (add_thread, get_first_thread, thread_of_pid,
2099 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
2100 (get_first_inferior, one_inferior_p, clear_inferior_list):
2102 (clear_inferiors, get_thread_process): Update.
2103 * gdbthread.h: Include <list>.
2104 (struct thread_info) <entry>: Remove field.
2106 (all_threads): Change type to std::list<thread_info *>.
2107 (get_first_inferior): Add doc.
2108 (find_thread, for_each_thread, find_thread_in_random): New
2110 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
2111 * linux-arm-low.c (update_registers_callback): Update.
2112 * linux-low.c (second_thread_of_pid_p): Update.
2113 (kill_one_lwp_callback, linux_detach_lwp_callback,
2114 delete_lwp_callback, status_pending_p_callback, same_lwp,
2115 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
2116 iterate_over_lwps, not_stopped_callback,
2117 resume_stopped_resumed_lwps, count_events_callback,
2118 select_singlestep_lwp_callback, select_event_lwp_callback,
2119 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
2120 suspend_and_send_sigstop_callback, wait_for_sigstop,
2121 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
2122 lwp_running, linux_set_resume_request, resume_status_pending_p,
2123 need_step_over_p, start_step_over, linux_resume_one_thread,
2124 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
2125 reset_lwp_ptrace_options_callback): Update.
2126 * linux-mips-low.c (update_watch_registers_callback): Update.
2127 * regcache.c (regcache_invalidate_one, regcache_invalidate):
2129 (free_register_cache_thread_one): Remove.
2130 (regcache_release): Update.
2131 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
2132 handle_qxfer_threads_worker): Update.
2133 (handle_query): Update, use list iterator.
2134 (visit_actioned_threads, handle_pending_status,
2135 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
2136 clear_pending_status_callback, set_pending_status_callback,
2137 find_status_pending_thread_callback, handle_status,
2138 process_serial_event): Update.
2139 * target.c (thread_search_callback): Update.
2140 * thread-db.c (thread_db_get_tls_address): Update.
2141 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
2143 * win32-i386-low.c (update_debug_registers_callback): Update.
2144 * win32-low.c (delete_thread_info, child_delete_thread,
2145 continue_one_thread, suspend_one_thread,
2146 get_child_debug_event): Adjust.
2148 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2150 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
2151 * inferiors.h: Include <list>.
2152 (struct process_info) <entry>: Remove field.
2154 (pid_of): Change macro to function.
2155 (ptid_of, lwpid_of): Remove macro.
2156 (all_processes): Change type to std::list<process_info *>.
2157 (ALL_PROCESSES): Remove macro.
2158 (for_each_process, find_process): New function.
2159 * inferiors.c (all_processes): Change type to
2160 std::list<process_info *>.
2161 (find_thread_process): Adjust.
2162 (add_process): Likewise.
2163 (remove_process): Likewise.
2164 (find_process_pid): Likewise.
2165 (get_first_process): Likewise.
2166 (started_inferior_callback): Remove.
2167 (have_started_inferiors_p): Adjust.
2168 (attached_inferior_callback): Remove.
2169 (have_attached_inferiors_p): Adjust.
2170 * linux-low.c (check_zombie_leaders): Likewise.
2171 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
2172 (x86_linux_update_xmltarget): Adjust.
2173 * server.c (handle_query): Likewise.
2174 (gdb_reattached_process): Remove.
2175 (handle_status): Adjust.
2176 (kill_inferior_callback): Likewise.
2177 (detach_or_kill_inferior): Remove.
2178 (print_started_pid): Likewise.
2179 (print_attached_pid): Likewise.
2180 (detach_or_kill_for_exit): Update.
2181 (process_serial_event): Likewise.
2182 * linux-arm-low.c (arm_new_fork): Likewise.
2184 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
2186 * dll.h: Include <list>.
2187 (struct dll_info): Add constructor.
2188 <entry>: Remove field.
2189 (all_dlls): Change type to std::list<dll_info>.
2190 * dll.c: Include <algorithm>.
2191 (get_dll): Remove macro.
2192 (all_dlls): Change type to std::list<dll_info *>.
2193 (free_one_dll): Remove.
2194 (match_dll): Likewise.
2195 (loaded_dll): Adjust.
2196 (unloaded_dll): Adjust to all_dlls type change, use
2197 std::find_if. Inline code from match_dll.
2198 (clear_dlls): Adjust to all_dlls type change.
2199 * server.c (emit_dll_description): Remove.
2200 (handle_qxfer_libraries): Adjust to all_dlls type change,
2201 integrate emit_dll_description's functionality.
2203 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2205 * linux-low.h (struct linux_target_ops) <delete_process>: New
2207 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
2208 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
2209 (struct linux_target_ops): Add delete_process callback.
2210 * linux-arm-low.c (arm_delete_process): New.
2211 (struct linux_target_ops): Add delete_process callback.
2212 * linux-bfin-low.c (struct linux_target_ops): Likewise.
2213 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
2214 * linux-m32r-low.c (struct linux_target_ops): Likewise.
2215 * linux-mips-low.c (mips_linux_delete_process): New.
2216 (struct linux_target_ops): Add delete_process callback.
2217 * linux-ppc-low.c (struct linux_target_ops): Likewise.
2218 * linux-s390-low.c (struct linux_target_ops): Likewise.
2219 * linux-sh-low.c (struct linux_target_ops): Likewise.
2220 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
2221 * linux-tile-low.c (struct linux_target_ops): Likewise.
2222 * linux-x86-low.c (x86_linux_delete_process): New.
2223 (struct linux_target_ops): Add delete_process callback.
2224 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
2226 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
2228 * linux-aarch64-low.c (the_low_target): Add thread delete
2230 * linux-arm-low.c (arm_delete_thread): New function.
2231 (the_low_target): Add thread delete callback.
2232 * linux-bfin-low.c (the_low_target): Likewise.
2233 * linux-crisv32-low.c (the_low_target): Likewise.
2234 * linux-low.c (delete_lwp): Invoke delete_thread callback if
2236 * linux-low.h (struct linux_target_ops) <delete_thread>: New
2238 * linux-m32r-low.c (the_low_target): Add thread delete callback.
2239 * linux-mips-low.c (mips_linux_delete_thread): New function.
2240 (the_low_target): Add thread delete callback.
2241 * linux-ppc-low.c (the_low_target): Likewise.
2242 * linux-s390-low.c (the_low_target): Likewise.
2243 * linux-sh-low.c (the_low_target): Likewise.
2244 * linux-tic6x-low.c (the_low_target): Likewise.
2245 * linux-tile-low.c (the_low_target): Likewise.
2246 * linux-x86-low.c (the_low_target): Likewise.
2247 * linux-xtensa-low.c (the_low_target): Likewise.
2249 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
2251 * win32-low.c: Include "common-inferior.h".
2253 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2255 * inferiors.c (set_inferior_cwd): New function.
2256 * server.c (handle_general_set): Handle QSetWorkingDir packet.
2257 (handle_query): Inform that QSetWorkingDir is supported.
2258 * win32-low.c (create_process): Pass the inferior's cwd to
2261 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2263 * inferiors.c (current_inferior_cwd): New global variable.
2264 (get_inferior_cwd): New function.
2265 * inferiors.h (struct process_info) <cwd>: New field.
2267 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2269 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
2270 (OBS): Add gdb_tilde_expand.o.
2272 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
2274 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
2275 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2277 2017-09-29 Pedro Alves <palves@redhat.com>
2279 * ax.c (gdb_parse_agent_expr): Constify.
2280 * ax.h (gdb_parse_agent_expr): Constify.
2281 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2283 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
2284 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
2285 * remote-utils.h (read_ptid): Constify.
2286 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
2287 (process_point_options, process_serial_event): Constify.
2288 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
2289 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
2290 (cmd_qtbuffer): Constify.
2292 2017-09-29 Pedro Alves <palves@redhat.com>
2294 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
2297 2017-09-29 Pedro Alves <palves@redhat.com>
2299 * linux-low.c (handle_extended_wait): Pass parent thread instead
2300 of process to thread_db_notice_clone.
2301 * linux-low.h (thread_db_notice_clone): Replace parent process
2302 parameter with parent thread parameter.
2303 * thread-db.c (find_one_thread): Add comment.
2304 (thread_db_notice_clone): Replace parent process parameter with
2305 parent thread parameter. Temporarily switch to the parent thread.
2307 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
2309 * gdbthread.h: Include "common-gdbthread.h".
2310 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
2311 "if" when validating the ptid.
2312 * remote-utils.c: Include "gdbthread.h".
2313 (prepare_resume_reply): Use "switch_to_thread".
2314 * target.c (done_accessing_memory): Likewise.
2316 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2318 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
2319 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
2320 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
2321 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
2322 s390x-gs-linux64-ipa.o to ipa_obj.
2323 * linux-s390-low.c (HWCAP_S390_GS): New define.
2324 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
2326 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
2327 (s390_arch_setup): Check for guarded-storage support and choose
2329 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
2330 init_registers_s390x_gs_linux64.
2331 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
2333 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
2334 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
2336 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
2338 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
2340 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2342 * linux-low.h (struct lwp_info): Add new field, thread_handle.
2343 (thread_db_thread_handle): Declare.
2344 * linux-low.c (linux_target_ops): Initialize thread_handle.
2345 * server.c (handle_qxfer_threads_worker): Add support for
2347 * target.h (struct target_ops): Add new function pointer,
2349 (target_thread_handle): Define.
2350 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
2352 (thread_db_thread_handle): New function.
2354 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2356 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2357 * linux-low.h (thread_db_notice_clone): Declare.
2358 * thread-db.c (thread_db_notice_clone): New function.
2360 2017-09-21 Pedro Alves <palves@redhat.com>
2362 * server.c (gdb_read_memory, handle_status, process_serial_event)
2363 (handle_serial_event, handle_target_event): Adjust to
2364 set_desired_thread prototype change.
2365 * target.c (set_desired_thread): Remove 'use_general' parameter
2367 * target.h (set_desired_thread): Remove 'use_general' parameter.
2369 2017-09-20 Tom Tromey <tom@tromey.com>
2371 * target.c (target_terminal::terminal_state): Define.
2372 (target_terminal::init): Rename from target_terminal_init.
2373 (target_terminal::inferior): Rename from
2374 target_terminal_inferior.
2375 (target_terminal::ours): Rename from target_terminal_ours.
2376 (target_terminal::ours_for_output, target_terminal::info): New.
2378 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2380 * server.c (accumulate_file_name_length): Remove.
2381 (emit_dll_description): Adjust to std::string change.
2382 (handle_qxfer_libraries): Use std::string to hold document.
2384 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2386 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2387 return type of xml_escape_text.
2388 * server.c (emit_dll_description): Likewise.
2390 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2392 * server.c (captured_main): Accept argument for --selftest.
2393 Update run_tests call.
2394 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2395 when registering selftests.
2397 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2399 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2400 instead of "VEC" for "target_desc.reg_defs".
2401 (regcache_cpy): Likewise.
2402 (registers_to_string): Likewise.
2403 (registers_from_string): Likewise.
2404 (find_regno): Likewise.
2405 (supply_regblock): Likewise.
2406 (regcache_raw_read_unsigned): Likewise.
2407 * tdesc.c (init_target_desc): Likewise.
2408 (tdesc_create_reg): Likewise.
2409 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2410 (struct target_desc) <reg_defs>: Convert to "std::vector".
2411 (target_desc): Do not initialize "reg_defs".
2412 (~target_desc): Update code to use "std::vector" instead of "VEC"
2413 for "target_desc.reg_defs".
2414 (operator==): Likewise.
2416 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2418 * inferiors.h (thread_to_gdb_id): Remove.
2419 * inferiors.c (thread_to_gdb_id): Remove.
2420 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2421 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2422 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2424 * nto-low.c (nto_fetch_registers, nto_store_registers,
2425 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2427 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2429 * inferiors.h (gdb_id_to_thread_id): Remove.
2430 * inferiors.c (gdb_id_to_thread_id): Remove.
2431 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2432 removal. Move pid declaration closer to where it's used.
2434 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2436 * server.c (handle_detach): New function.
2437 (process_serial_event): Move code out, call handle_detach.
2439 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2441 * server.c (require_running): Rename to ...
2442 (require_running_or_return): ... this ...
2443 (require_running_or_break): ... and this.
2444 (handle_query, process_serial_event): Adjust.
2446 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2448 * linux-low.c (linux_set_resume_request): Remove unused
2451 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2453 * server.c (first_thread_of): Remove.
2454 (process_serial_event): Replace usage of first_thread_of with
2455 find_any_thread_of_pid.
2456 * tracepoint.c (same_process_p): Remove.
2457 (gdb_agent_about_to_close): Replace usage of same_process_p with
2458 find_any_thread_of_pid.
2459 * linux-x86-low.c (same_process_callback): Remove.
2460 (x86_arch_setup_process_callback): Replace usage of
2461 same_process_callback with find_any_thread_of_pid.
2462 * thread-db.c (any_thread_of): Remove.
2463 (switch_to_process): Replace usage of any_thread_of with
2464 find_any_thread_of_pid.
2465 * inferiors.c (thread_pid_matches_callback): Remove.
2466 (find_thread_process): Adjust to use find_any_thread_of_pid.
2468 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2470 * regcache.c (get_thread_regcache): Guard calls to "memset"
2473 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2475 * linux-low.c (handle_extended_wait): Use
2476 "allocate_target_description" instead of "XNEW".
2477 * linux-x86-low.c (initialize_low_arch): Likewise.
2479 2017-09-05 Yao Qi <yao.qi@linaro.org>
2481 * configure.srv (srv_i386_regobj): Remove.
2482 (srv_amd64_regobj): Remove.
2483 (srv_regobj): Set it to "" for x86 non-linux targets.
2484 * linux-x86-tdesc.c (i386_linux_read_description):
2485 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2486 (init_registers_i386): Remove the declaration.
2487 (tdesc_i386): Remove the declaration.
2488 (lynx_i386_arch_setup): Call i386_create_target_description.
2489 * nto-x86-low.c: Likewise.
2490 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2491 [!__x86_64__]: include arch/i386.h.
2492 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2494 2017-09-05 Yao Qi <yao.qi@linaro.org>
2496 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2497 i386/amd64-XXX-linux from it.
2499 2017-09-05 Yao Qi <yao.qi@linaro.org>
2501 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2503 (ipa_amd64_linux_regobj): Remove.
2504 (ipa_x32_linux_regobj): Remove.
2506 2017-09-05 Yao Qi <yao.qi@linaro.org>
2508 * Makefile.in (arch-amd64.o): New rule.
2509 * configure.srv: Append arch-amd64.o.
2510 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2511 (get_ipa_tdesc): Call amd64_linux_read_description.
2512 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2513 and init_registers_amd64_XXX.
2514 * linux-x86-low.c (x86_linux_read_description): Call
2515 amd64_linux_read_description.
2516 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2517 (initialize_low_arch): Don't call init_registers_x32_XXX and
2518 init_registers_amd64_XXX.
2519 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2520 and tdesc_amd64_XXX.
2521 [__x86_64__] (amd64_tdesc_test): New function.
2522 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2523 and init_registers_amd64_XXX.
2524 * linux-x86-tdesc.c: Include arch/amd64.h.
2525 (xcr0_to_tdesc_idx): New function.
2526 (i386_linux_read_description): New function.
2527 (amd64_get_ipa_tdesc_idx): New function.
2528 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2529 (amd64_get_ipa_tdesc): Declare.
2531 2017-09-05 Yao Qi <yao.qi@linaro.org>
2533 * configure.srv (srv_i386_linux_xmlfiles): Remove
2534 i386/i386-XXX-linux.xml from it.
2536 2017-09-05 Yao Qi <yao.qi@linaro.org>
2538 * configure.srv: Set srv_i386_linux_regobj empty if $development
2540 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2541 initialize_low_tdesc.
2542 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2543 with #if initialize_low_tdesc.
2544 * linux-x86-tdesc-selftest.c: New file.
2545 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2547 2017-09-05 Yao Qi <yao.qi@linaro.org>
2549 * Makefile.in (arch-i386.o): New rule.
2550 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2551 (x86_64-*-linux*): Likewise.
2552 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2553 include arch/i386.h.
2554 (i386_linux_read_description): Remove code and call
2555 i386_create_target_description.
2556 * tdesc.c (allocate_target_description): New function.
2557 * tdesc.h (set_tdesc_architecture): Remove declaration.
2558 (set_tdesc_osabi): Likewise.
2560 2017-09-05 Yao Qi <yao.qi@linaro.org>
2562 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2563 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2564 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2566 * server.c (get_features_xml): Call tdesc_get_features_xml.
2567 * tdesc.c (set_tdesc_architecture): New function.
2568 (set_tdesc_osabi): New function.
2569 (tdesc_get_features_xml): New function.
2570 (tdesc_create_feature): Add an argument.
2571 * tdesc.h (struct target_desc) <features>: New field.
2572 <arch, osabi>: New field.
2573 (~target_desc): xfree features, arch, and osabi.
2574 (target_desc::oerator==): Don't compare .xmltarget.
2575 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2576 (set_tdesc_osabi): Likewise.
2577 (tdesc_get_features_xml): Likewise.
2579 2017-09-05 Yao Qi <yao.qi@linaro.org>
2581 * linux-x86-tdesc.c: Include selftest.h.
2582 (i386_tdesc_test): New function.
2583 (initialize_low_tdesc): Call selftests::register_test.
2584 * tdesc.h: Include regdef.h.
2585 (target_desc): Override operator == and !=.
2587 2017-09-05 Yao Qi <yao.qi@linaro.org>
2589 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2590 (ipa_obj): Likewise.
2591 * linux-i386-ipa.c: Include common/x86-xstate.h
2592 (get_ipa_tdesc): Call i386_linux_read_description.
2593 (initialize_low_tracepoint): Don't call init_registers_XXX
2594 functions, call initialize_low_tdesc instead.
2595 * linux-x86-low.c (x86_linux_read_description): Call
2596 i386_linux_read_description.
2597 (initialize_low_arch): Don't call init_registers_i386_XXX
2598 functions, call initialize_low_tdesc.
2599 * linux-x86-tdesc.c: New file.
2600 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2601 (i386_get_ipa_tdesc_idx): Declare.
2602 (i386_get_ipa_tdesc): Declare.
2603 (initialize_low_tdesc): Declare.
2605 2017-09-05 Yao Qi <yao.qi@linaro.org>
2607 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2610 2017-09-05 Yao Qi <yao.qi@linaro.org>
2612 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2613 * regcache.c (get_thread_regcache): Use VEC_length.
2614 (init_register_cache): Likewise.
2615 (regcache_cpy): Likewise.
2616 (registers_to_string): Iterate reg_defs via VEC_iterate.
2617 (find_regno): Likewise.
2618 (find_register_by_number): Use VEC_index.
2619 (register_size): Call find_register_by_number.
2620 (register_data): Call find_register_by_number.
2621 (supply_regblock): Use VEC_length.
2622 (regcache_raw_read_unsigned): Likewise.
2623 * tdesc.c (init_target_desc): Iterate reg_defs via
2625 (default_description): Update initializer.
2626 (copy_target_description): Don't update field num_registers.
2627 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2628 <num_registers>: Remove.
2630 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2632 * Makefile.in (.SECONDARY): Define target.
2634 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2636 * linux-low.c (linux_wait_1): Adjust.
2637 * server.c (queue_stop_reply_callback): Adjust.
2639 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2641 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2642 QEnvironmentUnset and QEnvironmentReset packets.
2643 (handle_query): Inform remote that QEnvironmentHexEncoded,
2644 QEnvironmentUnset and QEnvironmentReset are supported.
2646 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2648 * inferiors.h (inferior_target_data): Rename to ...
2649 (thread_target_data): ... this.
2650 (inferior_regcache_data): Rename to ...
2651 (thread_regcache_data): ... this.
2652 (set_inferior_regcache_data): Rename to ...
2653 (set_thread_regcache_data): ... this.
2654 * inferiors.c (inferior_target_data): Rename to ...
2655 (thread_target_data): ... this.
2656 (inferior_regcache_data): Rename to ...
2657 (thread_regcache_data): ... this.
2658 (set_inferior_regcache_data): Rename to ...
2659 (set_thread_regcache_data): ... this.
2660 (free_one_thread): Update.
2661 * linux-low.h (get_thread_lwp): Update.
2662 * regcache.c (get_thread_regcache): Update.
2663 (regcache_invalidate_thread): Update.
2664 (free_register_cache_thread): Update.
2665 * win32-i386-low.c (update_debug_registers_callback): Update.
2666 (win32_get_current_dr): Update.
2667 * win32-low.c (thread_rec): Update.
2668 (delete_thread_info): Update.
2669 (continue_one_thread): Update.
2670 (suspend_one_thread): Update.
2672 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2674 * inferiors.c (set_inferior_target_data): Remove.
2675 * inferiors.h (set_inferior_target_data): Remove.
2677 2017-08-18 Yao Qi <yao.qi@linaro.org>
2679 * Makefile.in (OBS): Add selftest.o.
2680 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2681 * configure, config.in: Re-generated.
2682 * server.c: Include common/sefltest.h.
2683 (captured_main): Handle option --selftest.
2685 2017-08-09 Yao Qi <yao.qi@linaro.org>
2687 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2688 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2689 i386-avx-mpx.o and i386-mmx.o.
2690 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2691 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2692 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2693 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2694 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2695 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2696 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2697 i386/amd64-avx-mpx.xml.
2699 2017-08-09 Yao Qi <yao.qi@linaro.org>
2701 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2702 and x32-avx-avx512.o.
2703 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2704 i386/x32-avx-avx512.xml.
2706 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2708 * tracepoint.h (enum class fast_tpoint_collect_result): New
2710 (fast_tracepoint_collecting): Change return type to
2711 fast_tpoint_collect_result.
2712 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2713 * linux-low.h: Include tracepoint.h.
2714 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2715 fast_tpoint_collect_result.
2716 * linux-low.c (handle_tracepoints): Adjust.
2717 (linux_fast_tracepoint_collecting): Change return type to
2718 fast_tpoint_collect_result.
2719 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2720 linux_wait_1, stuck_in_jump_pad_callback,
2721 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2722 proceed_one_lwp): Adjust to type change.
2724 2017-07-10 Yao Qi <yao.qi@linaro.org>
2726 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2728 2017-06-29 Yao Qi <yao.qi@linaro.org>
2730 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2732 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2734 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2736 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2738 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2740 * linux-low.c (linux_create_inferior): Adjust code to access the
2741 environment information via 'gdb_environ' class.
2742 * lynx-low.c (lynx_create_inferior): Likewise.
2743 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2744 (get_environ): Return a pointer to 'our_environ'.
2745 (captured_main): Initialize 'our_environ'.
2746 * server.h (get_environ): Adjust prototype.
2747 * spu-low.c (spu_create_inferior): Adjust code to access the
2748 environment information via 'gdb_environ' class.
2750 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2752 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2753 usage of "register" keyword.
2755 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2757 * configure: Re-generate.
2759 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2761 * configure: Re-generate.
2763 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2765 * Makefile.in (COMPILE.pre): Add "-x c++".
2767 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2769 * fork-child.c: Conditionally include <signal.h>.
2771 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2773 * server.c (handle_general_set): Handle new packet
2774 "QStartupWithShell".
2775 (handle_query): Add "QStartupWithShell" to the list of supported
2777 (gdbserver_usage): Add help text explaining the
2778 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2780 (captured_main): Recognize and act upon the presence of the new
2783 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2784 Pedro Alves <palves@redhat.com>
2786 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2787 * configure: Regenerate.
2788 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2790 (i[34567]86-*-lynxos*): Likewise.
2791 (spu*-*-*): Likewise.
2792 * fork-child.c: New file.
2793 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2795 (linux_ptrace_fun): New function.
2796 (linux_create_inferior): Adjust function prototype to reflect
2797 change on "target.h". Adjust function code to use
2799 (linux_request_interrupt): Delete "signal_pid".
2800 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2801 (lynx_ptrace_fun): New function.
2802 (lynx_create_inferior): Adjust function prototype to reflect
2803 change on "target.h". Adjust function code to use
2805 * nto-low.c (nto_create_inferior): Adjust function prototype and
2806 code to reflect change on "target.h". Update comments.
2807 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2808 "common-terminal.h" and "environ.h".
2809 (terminal_fd): Moved to fork-child.c.
2810 (old_foreground_pgrp): Likewise.
2811 (restore_old_foreground_pgrp): Likewise.
2812 (last_status): Make it global.
2813 (last_ptid): Likewise.
2814 (our_environ): New variable.
2815 (startup_with_shell): Likewise.
2816 (program_name): Likewise.
2817 (program_argv): Rename to...
2818 (program_args): ...this.
2819 (wrapper_argv): New variable.
2820 (start_inferior): Delete function.
2821 (get_exec_wrapper): New function.
2822 (get_exec_file): Likewise.
2823 (get_environ): Likewise.
2824 (prefork_hook): Likewise.
2825 (post_fork_inferior): Likewise.
2826 (postfork_hook): Likewise.
2827 (postfork_child_hook): Likewise.
2828 (handle_v_run): Update code to deal with arguments coming from the
2829 remote host. Update calls from "start_inferior" to
2831 (captured_main): Likewise. Initialize environment variable. Call
2833 * server.h (post_fork_inferior): New prototype.
2834 (get_environ): Likewise.
2835 (last_status): Declare.
2836 (last_ptid): Likewise.
2837 (signal_pid): Likewise.
2838 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2839 (spu_ptrace_fun): New function.
2840 (spu_create_inferior): Adjust function prototype to reflect change
2841 on "target.h". Adjust function code to use "fork_inferior".
2842 * target.c (target_terminal_init): New function.
2843 (target_terminal_inferior): Likewise.
2844 (target_terminal_ours): Likewise.
2845 * target.h: Include <vector>.
2846 (struct target_ops) <create_inferior>: Update prototype.
2847 (create_inferior): Update macro.
2848 * utils.c (gdb_flush_out_err): New function.
2849 * win32-low.c (win32_create_inferior): Adjust function prototype
2850 and code to reflect change on "target.h".
2852 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2854 * inferiors.c (switch_to_thread): New function.
2856 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2858 * Makefile.in (SFILE): Add "common/job-control.c".
2859 (OBS): Add "job-control.o".
2861 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2863 * Makefile: Remove "@host_makefile_frag@".
2865 2017-05-05 Pedro Alves <palves@redhat.com>
2867 * configure: Regenerate.
2869 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2871 * configure: Regenerate.
2873 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2875 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2876 software_single_step change of return type to
2877 std::vector<CORE_ADDR>.
2878 * linux-low.c (install_software_single_step_breakpoints):
2880 * linux-low.h (install_software_single_step_breakpoints):
2883 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2885 * remote-utils.c: Include "gdb_termios.h" instead of
2887 * terminal.h: Delete file.
2889 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2891 * server.c: Include <vector>.
2892 <program_argv, wrapper_argv>: Convert to std::vector.
2893 (start_inferior): Rewrite function to use C++.
2894 (handle_v_run): Likewise. Update code that calculates the argv
2895 based on the vRun packet; use C++.
2896 (captured_main): Likewise.
2898 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2900 * server.c (handle_v_cont): Initialize thread_resume::thread
2903 2017-04-05 Pedro Alves <palves@redhat.com>
2905 * configure: Regenerate.
2907 2017-04-05 Pedro Alves <palves@redhat.com>
2909 * gdbreplay.c (sync_error): Constify.
2910 * linux-x86-low.c (push_opcode): Constify.
2912 2017-04-05 Pedro Alves <palves@redhat.com>
2914 * win32-low.c (get_child_debug_event)
2915 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2916 Report TARGET_WAITKIND_SPURIOUS instead.
2918 2017-04-05 Pedro Alves <palves@redhat.com>
2920 * remote-utils.c (remote_prepare, remote_open): Constify.
2921 * remote-utils.h (remote_prepare, remote_open): Constify.
2922 * server.c (captured_main): Constify 'port' handling.
2924 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2926 * Makefile.in (clean): Clear .deps.
2928 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2930 * .gitignore: Remove generated files, replace with wildcard.
2931 * (clean): Replace removal of generated files with wildcard.
2932 (version.c): Replace with...
2933 (version-generated.c): ...this.
2934 (xml-builtin.c): Replace with...
2935 (xml-builtin-generated.c): ...this.
2936 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2937 (%.c: *regformats*): Replace with...
2938 (%-generated.c: *regformats*): ...this.
2940 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2942 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2943 (xtensa_fill_gregset): Call collect_register_by_name for
2945 (xtensa_store_gregset): Call supply_register_by_name for
2948 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2950 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2951 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2952 (xtensa_store_gregset): Call supply_register for all registers in
2953 a0_regnum..a0_regnum + C0_NREGS range.
2955 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2957 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2958 (ax-ipa.o: ax.c): Remove.
2959 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2960 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2961 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2962 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2963 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2965 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2967 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2968 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2969 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2970 (errors-ipa.o: ../common/errors.c): Remove.
2971 (format-ipa.o: ../common/format.c): Remove.
2972 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2974 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2976 * Makefile.in (%-ipa.o: %.c): New rule.
2977 (tracepoint-ipa.o: tracepoint.c): Remove.
2978 (utils-ipa.o: utils.c): Remove.
2979 (remote-utils-ipa.o: remote-utils.c): Remove.
2980 (regcache-ipa.o: regcache.c): Remove.
2981 (i386-linux-ipa.o: i386-linux.c): Remove.
2982 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2983 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2984 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2985 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2986 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2987 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2988 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2989 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2990 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2991 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2992 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2993 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2994 (aarch64-ipa.o: aarch64.c): Remove.
2995 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2996 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2997 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2998 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2999 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
3000 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
3001 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
3002 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
3003 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
3004 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
3005 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
3006 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
3007 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
3008 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
3009 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
3010 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
3011 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
3012 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
3013 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
3014 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
3015 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
3016 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
3017 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
3018 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
3019 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
3020 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
3021 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
3022 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
3023 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
3024 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
3025 (tdesc-ipa.o: tdesc.c): Remove.
3026 (x32-linux-ipa.o: x32-linux.c): Remove.
3027 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
3028 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
3030 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3032 * Makefile.in (%.o: ../arch/%.c): New rule.
3033 (arm.o: ../arch/arm.c): Remove.
3034 (arm-linux.o: ../arch/arm-linux.c): Remove.
3035 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
3036 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
3038 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3040 * Makefile.in (%.o: ../nat/%.c): New rule.
3041 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
3042 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
3043 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
3044 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
3045 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
3046 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
3047 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
3048 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
3049 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
3050 (linux-personality.o: ../nat/linux-personality.c): Remove.
3051 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
3052 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
3053 (x86-linux.o: ../nat/x86-linux.c): Remove.
3054 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
3055 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
3057 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3059 * Makefile.in (%.o: ../common/%.c): New rule.
3060 (signals.o: ../common/signals.c): Remove.
3061 (print-utils.o: ../common/print-utils.c): Remove.
3062 (rsp-low.o: ../common/rsp-low.c): Remove.
3063 (common-utils.o: ../common/common-utils.c): Remove.
3064 (posix-strerror.o: ../common/posix-strerror.c): Remove.
3065 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
3066 (vec.o: ../common/vec.c): Remove.
3067 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
3068 (xml-utils.o: ../common/xml-utils.c): Remove.
3069 (ptid.o: ../common/ptid.c): Remove.
3070 (buffer.o: ../common/buffer.c): Remove.
3071 (format.o: ../common/format.c): Remove.
3072 (filestuff.o: ../common/filestuff.c): Remove.
3073 (agent.o: ../common/agent.c): Remove.
3074 (errors.o: ../common/errors.c): Remove.
3075 (environ.o: ../common/environ.c): Remove.
3076 (common-debug.o: ../common/common-debug.c): Remove.
3077 (cleanups.o: ../common/cleanups.c): Remove.
3078 (common-exceptions.o: ../common/common-exceptions.c): Remove.
3079 (fileio.o: ../common/fileio.c): Remove.
3080 (common-regcache.o: ../common/common-regcache.c): Remove.
3081 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
3082 (new-op.o: ../common/new-op.c): Remove.
3083 (btrace-common.o: ../common/btrace-common.c): Remove.
3085 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3087 * Makefile.in (%.o: ../target/%.c): New rule.
3088 (waitstatus.o: ../target/waitstatus.c): Remove.
3090 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
3093 (%.c: ../regformats/%.dat,
3094 (%.c: ../regformats/arm/%.dat,
3095 (%.c: ../regformats/i386/%.dat,
3096 (%.c: ../regformats/rs6000/%.dat): New rules.
3097 (aarch64.c): Remove.
3098 (reg-arm.c): Remove.
3099 (arm-with-iwmmxt.c): Remove.
3100 (arm-with-vfpv2.c): Remove.
3101 (arm-with-vfpv3.c): Remove.
3102 (arm-with-neon.c): Remove.
3103 (reg-bfin.c): Remove.
3104 (reg-cris.c): Remove.
3105 (reg-crisv32.c): Remove.
3107 (i386-linux.c): Remove.
3108 (i386-avx.c): Remove.
3109 (i386-avx-linux.c): Remove.
3110 (i386-avx-avx512.c): Remove.
3111 (i386-avx-avx512-linux.c): Remove.
3112 (i386-mpx.c): Remove.
3113 (i386-mpx-linux.c): Remove.
3114 (i386-avx-mpx-avx512-pku.c): Remove.
3115 (i386-avx-mpx-avx512-pku-linux.c): Remove.
3116 (i386-avx-mpx.c): Remove.
3117 (i386-avx-mpx-linux.c): Remove.
3118 (i386-mmx.c): Remove.
3119 (i386-mmx-linux.c): Remove.
3120 (reg-ia64.c): Remove.
3121 (reg-m32r.c): Remove.
3122 (reg-m68k.c): Remove.
3124 (mips-linux.c): Remove.
3125 (mips-dsp-linux.c): Remove.
3126 (mips64-linux.c): Remove.
3127 (mips64-dsp-linux.c): Remove.
3128 (nios2-linux.c): Remove.
3129 (powerpc-32.c): Remove.
3130 (powerpc-32l.c): Remove.
3131 (powerpc-altivec32l.c): Remove.
3132 (powerpc-cell32l.c): Remove.
3133 (powerpc-vsx32l.c): Remove.
3134 (powerpc-isa205-32l.c): Remove.
3135 (powerpc-isa205-altivec32l.c): Remove.
3136 (powerpc-isa205-vsx32l.c): Remove.
3137 (powerpc-e500l.c): Remove.
3138 (powerpc-64l.c): Remove.
3139 (powerpc-altivec64l.c): Remove.
3140 (powerpc-cell64l.c): Remove.
3141 (powerpc-vsx64l.c): Remove.
3142 (powerpc-isa205-64l.c): Remove.
3143 (powerpc-isa205-altivec64l.c): Remove.
3144 (powerpc-isa205-vsx64l.c): Remove.
3145 (s390-linux32.c): Remove.
3146 (s390-linux32v1.c): Remove.
3147 (s390-linux32v2.c): Remove.
3148 (s390-linux64.c): Remove.
3149 (s390-linux64v1.c): Remove.
3150 (s390-linux64v2.c): Remove.
3151 (s390-te-linux64.c): Remove.
3152 (s390-vx-linux64.c): Remove.
3153 (s390-tevx-linux64.c): Remove.
3154 (s390x-linux64.c): Remove.
3155 (s390x-linux64v1.c): Remove.
3156 (s390x-linux64v2.c): Remove.
3157 (s390x-te-linux64.c): Remove.
3158 (s390x-vx-linux64.c): Remove.
3159 (s390x-tevx-linux64.c): Remove.
3160 (tic6x-c64xp-linux.c): Remove.
3161 (tic6x-c64x-linux.c): Remove.
3162 (tic6x-c62x-linux.c): Remove.
3164 (reg-sparc64.c): Remove.
3165 (reg-spu.c): Remove.
3167 (amd64-linux.c): Remove.
3168 (amd64-avx.c): Remove.
3169 (amd64-avx-linux.c): Remove.
3170 (amd64-avx-avx512.c): Remove.
3171 (amd64-avx-avx512-linux.c): Remove.
3172 (amd64-mpx.c): Remove.
3173 (amd64-mpx-linux.c): Remove.
3174 (amd64-avx-mpx-avx512-pku.c): Remove.
3175 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
3176 (amd64-avx-mpx.c): Remove.
3177 (amd64-avx-mpx-linux.c): Remove.
3179 (x32-linux.c): Remove.
3180 (x32-avx.c): Remove.
3181 (x32-avx-linux.c): Remove.
3182 (x32-avx-avx512.c): Remove.
3183 (x32-avx-avx512-linux.c): Remove.
3184 (reg-xtensa.c): Remove.
3185 (reg-tilegx.c): Remove.
3186 (reg-tilegx32.c): Remove.
3188 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
3190 * Makefile.in (SFILES): Add "common/environ.c".
3191 (OBJS): Add "common/environ.h".
3193 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3195 * configure.ac: Check if the fs_base and gs_base members of
3196 `struct user_regs_struct' exist.
3197 * config.in: Regenerated.
3198 * configure: Likewise.
3200 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
3202 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
3204 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
3205 (get_next_pcs_syscall_next_pc): Likewise.
3207 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
3209 * win32-i386-low.c: Fix incorrect reference to a couple source files.
3210 * nto-x86-low.c: Likewise.
3212 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
3214 * Makefile.in: Include disable-implicit-rules.mk.
3216 2016-11-23 Pedro Alves <palves@redhat.com>
3218 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
3219 (debug_vprintf): Use std::chrono::steady_clock instead of
3220 gettimeofday. Use '.' instead of ':'.
3221 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
3222 (get_timestamp): Use std::chrono::steady_clock instead of
3225 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3227 * Makefile.in: Fix whitespace formatting.
3229 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
3231 * Makefile.in (SFILES, OBS): Flatten list and order
3234 2016-11-23 Pedro Alves <palves@redhat.com>
3236 * event-loop.c (handle_file_event): Use warning.
3237 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
3238 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3241 2016-11-23 Pedro Alves <palves@redhat.com>
3243 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
3245 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
3246 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
3247 debug_printf and debug_flush for debug output.
3248 * server.c (handle_general_set): Likewise.
3249 * thread-db.c (try_thread_db_load): Use debug_printf for debug
3252 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3254 * Makefile.in (.c.o): Replace rule with ...
3255 (%.o: %.c): ... this one.
3257 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
3259 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
3260 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
3262 * configure.ac: Remove checks for the make program.
3263 * configure: Re-generate.
3265 2016-10-28 Pedro Alves <palves@redhat.com>
3267 * Makefile.in (CXX_DIALECT): Get from configure.
3268 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
3269 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
3270 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
3271 * config.in: Regenerate.
3272 * configure: Regenerate.
3274 2016-10-27 Yao Qi <yao.qi@linaro.org>
3276 * linux-low.c (linux_supports_range_stepping): Return true if
3277 can_software_single_step return true.
3279 2016-10-27 Yao Qi <yao.qi@linaro.org>
3281 * inferiors.c (find_inferior_in_random): New function.
3282 * inferiors.h (find_inferior_in_random): Declare.
3283 * linux-low.c (linux_wait_for_event_filtered): Call
3284 find_inferior_in_random instead of find_inferior.
3286 2016-10-27 Yao Qi <yao.qi@linaro.org>
3288 * linux-low.c (linux_wait_1): If single-step breakpoints are
3289 inserted, remove them.
3291 2016-10-26 Pedro Alves <palves@redhat.com>
3293 * linux-low.c (handle_extended_wait): Link parent/child fork
3295 (linux_wait_1): Unlink them.
3296 (linux_set_resume_request): Ignore resume requests for
3297 already-resumed and unhandled fork child threads.
3298 * linux-low.h (struct lwp_info) <fork_relative>: New field.
3299 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
3301 (handle_v_requests) <vCont>: Don't call require_running.
3302 * server.h (in_queued_stop_replies): New declaration.
3304 2016-10-24 Yao Qi <yao.qi@linaro.org>
3307 * linux-aarch64-low.c (append_insns): Cast the return value to
3310 2016-10-10 Yao Qi <yao.qi@linaro.org>
3312 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
3314 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
3316 * target.c (target_supports_multi_process): New function, moved
3318 * target.h (target_supports_multi_process): ... here. Remove
3321 2016-10-05 Tom Tromey <tom@tromey.com>
3324 * tracepoint.c (handle_tracepoint_bkpts): Check
3325 ipa_error_tracepoint, not ipa_stopping_tracepoint.
3327 2016-10-05 Yao Qi <yao.qi@linaro.org>
3329 * configure.srv: Update the path of arm-*.xml files.
3331 2016-10-05 Terry Guo <terry.guo@arm.com>
3332 Yao Qi <yao.qi@linaro.org>
3334 * Makefile.in: Adjust the path of rules.
3335 * configure.srv: Update the path of xml files.
3336 * regformats/arm-with-iwmmxt.dat: Regenerated.
3337 * regformats/arm-with-neon.dat: Likewise.
3338 * regformats/arm-with-vfpv2.dat: Likewise.
3339 * regformats/arm-with-vfpv3.dat Likewise.
3341 2016-09-30 Yao Qi <yao.qi@linaro.org>
3344 * target.c (target_stop_and_wait): Don't call
3345 target_continue_no_signal, use resume_stop instead.
3347 2016-09-26 Yao Qi <yao.qi@linaro.org>
3349 * linux-low.c (linux_wait_1): Call debug_exit.
3351 2016-09-23 Pedro Alves <palves@redhat.com>
3353 * Makefile.in (SFILES): Add common/new-op.c.
3354 (OBS): Add common/new-op.o.
3355 (new-op.o): New rule.
3357 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3359 * .gitinore: Ignore more files.
3361 2016-09-21 Yao Qi <yao.qi@linaro.org>
3363 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3366 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3368 * server.c (start_inferior): Call target_mourn_inferior instead of
3369 mourn_inferior; pass ptid_t argument to it.
3371 (handle_target_event): Likewise.
3372 * target.c (target_mourn_inferior): New function.
3373 * target.h (mourn_inferior): Delete macro.
3375 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3377 * linux-low.c (lwp_is_stepping): New function.
3379 2016-09-06 Carl Love <cel@us.ibm.com>
3381 * server.c (start_inferior): Fixed comment, requested comment change
3382 didn't get updated correctly. Removed reference to ptrace () call as
3383 it is only true on Linux systems.
3385 2016-09-06 Carl Love <cel@us.ibm.com>
3387 * server.c (start_inferior): Do not call
3388 function target_post_create_inferior () if the
3389 inferior process has already exited.
3391 2016-09-05 Pedro Alves <palves@redhat.com>
3393 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3394 (COMPILE.pre, CC_LD): Use CXX directly.
3395 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3396 * acinclude.m4: Don't include build-with-cxx.m4.
3397 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3398 * configure: Regenerate.
3400 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3403 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3404 call writing data to own_buf.
3406 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3408 * target.c (mywait): Call target_wait instead of
3410 (target_wait): New function.
3412 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3414 * server.c (start_inferior): New variable 'ptid'. Replace calls
3415 to the_target->resume by target_continue{,_no_signal}, depending
3417 * target.c (target_stop_and_wait): Call target_continue_no_signal
3418 instead of the_target->resume.
3419 (target_continue): New function.
3421 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3423 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3425 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3428 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3430 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3431 * linux-arm-low.c (ps_get_thread_area): Likewise.
3432 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3433 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3434 * linux-mips-low.c (ps_get_thread_area): Likewise.
3435 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3436 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3437 * linux-x86-low.c (ps_get_thread_area): Likewise.
3438 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3440 2016-08-19 Pedro Alves <palves@redhat.com>
3442 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3444 2016-08-19 Pedro Alves <palves@redhat.com>
3446 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3447 comment. Use memcpy instead of casting through unsigned long.
3449 2016-08-19 Pedro Alves <palves@redhat.com>
3451 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3452 allocating around 0x80000000.
3454 2016-08-19 Pedro Alves <palves@redhat.com>
3457 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3458 (x32-avx512-linux-ipa.o): New rules.
3459 * configure.ac (x86_64-*-linux*): New x32 check.
3460 * configure.srv (ipa_x32_linux_regobj): New.
3461 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3462 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3464 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3466 * configure: Regenerate.
3468 2016-08-09 Pedro Alves <palves@redhat.com>
3471 * Makefile.in (OBS): Add signals-state-save-restore.o.
3472 (signals-state-save-restore.o): New rule.
3473 * config.in: Regenerate.
3474 * configure: Regenerate.
3475 * linux-low.c: Include "signals-state-save-restore.h".
3476 (linux_create_inferior): Call
3477 restore_original_signals_state.
3478 * server.c: Include "dispositions-save-restore.h".
3479 (captured_main): Call save_original_signals_state.
3481 2016-08-05 Pedro Alves <palves@redhat.com>
3483 * configure: Regenerate.
3485 2016-08-04 Yao Qi <yao.qi@linaro.org>
3487 * linux-low.c (regsets_fetch_inferior_registers): Check
3488 errno is ESRCH or not.
3490 2016-08-02 Yao Qi <yao.qi@linaro.org>
3492 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3493 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3494 (thread_db_load_search): Update.
3495 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3496 td_ta_set_event and td_ta_event_getmsg.
3498 2016-07-26 Pedro Alves <palves@redhat.com>
3501 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3502 of unsigned long for 64-bit registers and use uint32_t instead of
3503 unsigned int for 32-bit registers.
3505 2016-07-26 Pedro Alves <palves@redhat.com>
3507 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3510 2016-07-21 Tom Tromey <tom@tromey.com>
3512 * configure: Rebuild.
3514 2016-07-21 Yao Qi <yao.qi@linaro.org>
3516 * mem-break.c (find_gdb_breakpoint): Cast bp to
3517 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3519 2016-07-21 Yao Qi <yao.qi@linaro.org>
3521 * server.c (handle_v_requests): Support s and S actions
3522 if target_supports_software_single_step return true.
3524 2016-07-21 Yao Qi <yao.qi@linaro.org>
3526 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3527 is resume_step, call maybe_hw_step.
3528 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3530 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3532 (proceed_one_lwp): If resume request is resume_step, install
3533 reinsert breakpoints and call maybe_hw_step.
3535 2016-07-21 Yao Qi <yao.qi@linaro.org>
3537 * linux-low.c (proceed_one_lwp): Declare.
3538 (linux_resume_one_thread): Remove local variable 'step'.
3539 Lift code enqueue signal. Call proceed_one_lwp instead of
3540 linux_resume_one_lwp.
3542 2016-07-21 Yao Qi <yao.qi@linaro.org>
3544 * linux-low.c (linux_resume_one_thread): Call
3545 enqueue_pending_signal.
3547 2016-07-21 Yao Qi <yao.qi@linaro.org>
3549 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3550 * inferiors.c (do_restore_current_thread_cleanup): New function.
3551 (make_cleanup_restore_current_thread): Likewise.
3552 * linux-low.c (install_software_single_step_breakpoints): Call
3553 make_cleanup_restore_current_thread. Switch current_thread to
3556 2016-07-21 Yao Qi <yao.qi@linaro.org>
3558 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3559 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3560 (clone_one_breakpoint): Likewise.
3561 (delete_reinsert_breakpoints): Change parameter to thread.
3563 (has_reinsert_breakpoints): Likewise.
3564 (uninsert_reinsert_breakpoints): Likewise.
3565 (reinsert_reinsert_breakpoints): Likewise.
3566 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3567 (delete_reinsert_breakpoints): Likewise.
3568 (reinsert_reinsert_breakpoints): Likewise.
3569 (uninsert_reinsert_breakpoints): Likewise.
3570 (has_reinsert_breakpoints): Likewise.
3572 2016-07-21 Yao Qi <yao.qi@linaro.org>
3574 * inferiors.c (get_thread_process): Make parameter const.
3575 * inferiors.h (get_thread_process): Update declaration.
3576 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3577 Add new parameters child_thread and parent_thread. Callers
3579 * mem-break.h (clone_all_breakpoints): Update declaration.
3581 2016-07-21 Yao Qi <yao.qi@linaro.org>
3583 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3584 <command_list, handler>: Remove.
3585 (struct gdb_breakpoint): New.
3586 (struct other_breakpoint): New.
3587 (struct reinsert_breakpoint): New.
3588 (is_gdb_breakpoint): New function.
3589 (any_persistent_commands): Update command_list if
3590 is_gdb_breakpoint returns true.
3591 (set_breakpoint): Create breakpoints according to their types.
3592 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3593 (set_gdb_breakpoint_1): Likewise.
3594 (set_gdb_breakpoint): Likewise.
3595 (clear_breakpoint_conditions): Change parameter type to
3596 'struct gdb_breakpoint *'.
3597 (clear_breakpoint_commands): Likewise.
3598 (clear_breakpoint_conditions_and_commands): Likewise.
3599 (add_condition_to_breakpoint): Likewise.
3600 (add_breakpoint_condition): Likewise.
3601 (add_commands_to_breakpoint): Likewise.
3602 (check_breakpoints): Check other_breakpoint.
3603 (clone_one_breakpoint): Clone breakpopint according to its type.
3604 * mem-break.h (struct gdb_breakpoint): Declare.
3605 (set_gdb_breakpoint): Update declaration.
3606 (clear_breakpoint_conditions_and_commands): Likewise.
3607 (add_breakpoint_condition): Likewise.
3608 (add_breakpoint_commands): Likewise.
3609 * server.c (process_point_options): Change parameter type to
3610 'struct gdb_breakpoint *'.
3612 2016-07-21 Yao Qi <yao.qi@linaro.org>
3614 * mem-break.c (set_breakpoint_at): Rename it to ...
3615 (set_breakpoint_type_at): ... it.
3616 (set_breakpoint_at): Call set_breakpoint_type_at.
3617 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3618 * mem-break.h (set_breakpoint_at): Update comments.
3620 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3622 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3624 (nios2_store_gregset): Likewise.
3626 2016-07-01 Pedro Alves <palves@redhat.com>
3627 Antoine Tremblay <antoine.tremblay@ericsson.com>
3629 * linux-low.c: Change interface to take the target lwp_info
3630 pointer directly and return void. Handle detaching from a zombie
3632 (linux_detach_lwp_callback): New function.
3633 (linux_detach): Detach from the leader thread after detaching from
3636 2016-06-28 Yao Qi <yao.qi@linaro.org>
3638 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3639 for variable new_offset.
3640 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3641 (aarch64_ftrace_insn_reloc_cb): Likewise.
3642 (aarch64_ftrace_insn_reloc_tb): Likewise.
3643 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3644 PRIx64 instead of PRIx32.
3646 2016-06-28 Yao Qi <yao.qi@linaro.org>
3648 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3649 (the_low_target): Install arm_get_syscall_trapinfo.
3651 2016-06-28 Yao Qi <yao.qi@linaro.org>
3653 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3655 (the_low_target): Install aarch64_get_syscall_trapinfo.
3657 2016-06-28 Yao Qi <yao.qi@linaro.org>
3659 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3661 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3662 Remove parameter sysno.
3663 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3666 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3668 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3669 (s390_emit_ne_goto): Likewise.
3670 (s390_emit_lt_goto): Likewise.
3671 (s390_emit_le_goto): Likewise.
3672 (s390_emit_gt_goto): Likewise.
3673 (s390_emit_ge_goto): Likewise.
3674 (s390x_emit_eq_goto): Likewise.
3675 (s390x_emit_ne_goto): Likewise.
3676 (s390x_emit_lt_goto): Likewise.
3677 (s390x_emit_le_goto): Likewise.
3678 (s390x_emit_gt_goto): Likewise.
3679 (s390x_emit_ge_goto): Likewise.
3680 (s390_emit_ops_impl): Mark variable static.
3681 (s390x_emit_ops): Likewise.
3683 2016-06-17 Yao Qi <yao.qi@linaro.org>
3685 * linux-low.c (handle_extended_wait): Call
3686 uninsert_reinsert_breakpoints for the parent process. Remove
3687 reinsert breakpoints from the child process. Reinsert them to
3688 the parent process when vfork is done.
3689 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3690 (reinsert_reinsert_breakpoints): New function.
3691 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3692 (reinsert_reinsert_breakpoints): Declare.
3694 2016-06-17 Yao Qi <yao.qi@linaro.org>
3696 * linux-low.c (handle_extended_wait): If the parent is doing
3697 step-over, remove the reinsert breakpoints from the forked child.
3699 2016-06-17 Yao Qi <yao.qi@linaro.org>
3701 * linux-low.c (unsuspend_all_lwps): Declare.
3702 (linux_low_filter_event): If thread exited, call finish_step_over.
3703 If step-over is finished, unsuspend other threads.
3705 2016-06-17 Yao Qi <yao.qi@linaro.org>
3707 * linux-low.c (linux_resume_one_lwp_throw): Assert
3708 has_reinsert_breakpoints returns false.
3709 * mem-break.c (delete_disabled_breakpoints): Assert
3710 bp type isn't reinsert_breakpoint.
3712 2016-06-17 Yao Qi <yao.qi@linaro.org>
3714 * linux-low.c (maybe_hw_step): New function.
3715 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3716 (finish_step_over): Switch current_thread to lwp temporarily,
3717 and assert has_reinsert_breakpoints returns true.
3718 (proceed_one_lwp): Call maybe_hw_step.
3719 * mem-break.c (has_reinsert_breakpoints): New function.
3720 * mem-break.h (has_reinsert_breakpoints): Declare.
3722 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3724 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3726 2016-05-17 Yao Qi <yao.qi@linaro.org>
3728 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3729 instead of find_inferior.
3731 2016-05-05 Yao Qi <yao.qi@linaro.org>
3733 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3734 Initialize res to zero.
3736 2016-05-05 Yao Qi <yao.qi@linaro.org>
3738 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3741 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3743 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3744 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3745 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3747 2016-04-28 Par Olsson <par.olsson@windriver.com>
3748 Simon Marchi <simon.marchi@ericsson.com>
3750 * tracepoint.c (write_inferior_int8): New function.
3751 (cmd_qtenable_disable): Write enable flag using
3752 write_inferior_int8.
3754 2016-04-25 Yao Qi <yao.qi@linaro.org>
3756 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3757 (need_step_over_p): Return zero if the LWP has pending signals
3758 can be delivered on software single step target.
3760 2016-04-25 Yao Qi <yao.qi@linaro.org>
3762 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3763 return instead of error.
3765 2016-04-22 Yao Qi <yao.qi@linaro.org>
3767 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3770 2016-04-22 Yao Qi <yao.qi@linaro.org>
3772 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3773 signal when stepping over breakpoint with software single
3776 2016-04-21 Pedro Alves <palves@redhat.com>
3778 * linux-s390-low.c (s390_collect_ptrace_register)
3779 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3781 (s390_check_regset): Use void * instead of gdb_byte *.
3783 2016-04-20 Pedro Alves <palves@redhat.com>
3785 * configure: Renegerate.
3787 2016-04-20 Yao Qi <yao.qi@linaro.org>
3789 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3790 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3792 (arm_store_gregset): Likewise.
3794 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3796 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3797 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3798 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3799 (amd64-avx-mpx-linux.c): New rules.
3800 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3801 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3802 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3803 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3804 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3805 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3806 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3807 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3808 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3809 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3810 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3811 * linux-x86-low.c (x86_linux_read_description): Add case for
3812 X86_XSTATE_AVX_MPX_MASK.
3813 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3814 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3815 init_registers_i386_avx_mpx_linux.
3816 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3817 (initialize_low_tracepoint): Call
3818 init_registers_i386_avx_mpx_linux.
3819 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3820 (initialize_low_tracepoint): Call
3821 init_registers_amd64_avx_mpx_linux.
3822 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3823 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3824 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3827 2016-04-18 Pedro Alves <palves@redhat.com>
3829 * configure: Regenerate.
3831 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3833 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3834 (aarch64_emit_sub): Likewise.
3836 2016-04-12 Pedro Alves <palves@redhat.com>
3838 * utils.c (prepare_to_throw_exception): Delete.
3840 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3842 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3844 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3846 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3848 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3850 * linux-aarch64-ipa.c: Add <elf.h> include.
3851 * linux-ppc-ipa.c: Add <elf.h> include.
3852 * linux-s390-ipa.c: Add <elf.h> include.
3854 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3856 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3857 (get_raw_reg_ptr): Likewise.
3858 (get_trace_state_variable_value_ptr): Likewise.
3859 (set_trace_state_variable_value_ptr): Likewise.
3860 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3863 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3864 Marcin Kościelnicki <koriakin@0x04.net>
3867 * linux-ppc-low.c (emit_insns): New function.
3868 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3869 (ppc_emit_prologue): New function.
3870 (ppc_emit_epilogue): New function.
3871 (ppc_emit_add): New function.
3872 (ppc_emit_sub): New function.
3873 (ppc_emit_mul): New function.
3874 (ppc_emit_lsh): New function.
3875 (ppc_emit_rsh_signed): New function.
3876 (ppc_emit_rsh_unsigned): New function.
3877 (ppc_emit_ext): New function.
3878 (ppc_emit_zero_ext): New function.
3879 (ppc_emit_log_not): New function.
3880 (ppc_emit_bit_and): New function.
3881 (ppc_emit_bit_or): New function.
3882 (ppc_emit_bit_xor): New function.
3883 (ppc_emit_bit_not): New function.
3884 (ppc_emit_equal): New function.
3885 (ppc_emit_less_signed): New function.
3886 (ppc_emit_less_unsigned): New function.
3887 (ppc_emit_ref): New function.
3888 (ppc_emit_const): New function.
3889 (ppc_emit_reg): New function.
3890 (ppc_emit_pop): New function.
3891 (ppc_emit_stack_flush): New function.
3892 (ppc_emit_swap): New function.
3893 (ppc_emit_stack_adjust): New function.
3894 (ppc_emit_call): New function.
3895 (ppc_emit_int_call_1): New function.
3896 (ppc_emit_void_call_2): New function.
3897 (ppc_emit_if_goto): New function.
3898 (ppc_emit_goto): New function.
3899 (ppc_emit_eq_goto): New function.
3900 (ppc_emit_ne_goto): New function.
3901 (ppc_emit_lt_goto): New function.
3902 (ppc_emit_le_goto): New function.
3903 (ppc_emit_gt_goto): New function.
3904 (ppc_emit_ge_goto): New function.
3905 (ppc_write_goto_address): New function.
3906 (ppc_emit_ops_impl): New static variable.
3907 (ppc64v1_emit_prologue): New function.
3908 (ppc64v2_emit_prologue): New function.
3909 (ppc64_emit_epilogue): New function.
3910 (ppc64_emit_add): New function.
3911 (ppc64_emit_sub): New function.
3912 (ppc64_emit_mul): New function.
3913 (ppc64_emit_lsh): New function.
3914 (ppc64_emit_rsh_signed): New function.
3915 (ppc64_emit_rsh_unsigned): New function.
3916 (ppc64_emit_ext): New function.
3917 (ppc64_emit_zero_ext): New function.
3918 (ppc64_emit_log_not): New function.
3919 (ppc64_emit_bit_and): New function.
3920 (ppc64_emit_bit_or): New function.
3921 (ppc64_emit_bit_xor): New function.
3922 (ppc64_emit_bit_not): New function.
3923 (ppc64_emit_equal): New function.
3924 (ppc64_emit_less_signed): New function.
3925 (ppc64_emit_less_unsigned): New function.
3926 (ppc64_emit_ref): New function.
3927 (ppc64_emit_const): New function.
3928 (ppc64v1_emit_reg): New function.
3929 (ppc64v2_emit_reg): New function.
3930 (ppc64_emit_pop): New function.
3931 (ppc64_emit_stack_flush): New function.
3932 (ppc64_emit_swap): New function.
3933 (ppc64v1_emit_call): New function.
3934 (ppc64v2_emit_call): New function.
3935 (ppc64v1_emit_int_call_1): New function.
3936 (ppc64v2_emit_int_call_1): New function.
3937 (ppc64v1_emit_void_call_2): New function.
3938 (ppc64v2_emit_void_call_2): New function.
3939 (ppc64_emit_if_goto): New function.
3940 (ppc64_emit_eq_goto): New function.
3941 (ppc64_emit_ne_goto): New function.
3942 (ppc64_emit_lt_goto): New function.
3943 (ppc64_emit_le_goto): New function.
3944 (ppc64_emit_gt_goto): New function.
3945 (ppc64_emit_ge_goto): New function.
3946 (ppc64v1_emit_ops_impl): New static variable.
3947 (ppc64v2_emit_ops_impl): New static variable.
3948 (ppc_emit_ops): New function.
3949 (linux_low_target): Wire in ppc_emit_ops.
3951 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3952 Marcin Kościelnicki <koriakin@0x04.net>
3955 * Makefile.in: Add powerpc-*-ipa.o
3956 * configure.srv: Add ipa_obj for powerpc*-linux.
3957 * linux-ppc-ipa.c: New file.
3958 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3960 (PPC_FIELD): New macro.
3961 (PPC_SEXT): New macro.
3962 (PPC_OP6): New macro.
3963 (PPC_BO): New macro.
3964 (PPC_LI): New macro.
3965 (PPC_BD): New macro.
3966 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3967 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3968 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3969 (ppc_get_thread_area): New function.
3970 (is_elfv2_inferior): New function.
3971 (gen_ds_form): New function.
3972 (GEN_STD): New macro.
3973 (GEN_STDU): New macro.
3974 (GEN_LD): New macro.
3975 (GEN_LDU): New macro.
3976 (gen_d_form): New function.
3977 (GEN_ADDI): New macro.
3978 (GEN_ADDIS): New macro.
3979 (GEN_LI): New macro.
3980 (GEN_LIS): New macro.
3981 (GEN_ORI): New macro.
3982 (GEN_ORIS): New macro.
3983 (GEN_LWZ): New macro.
3984 (GEN_STW): New macro.
3985 (GEN_STWU): New macro.
3986 (gen_xfx_form): New function.
3987 (GEN_MFSPR): New macro.
3988 (GEN_MTSPR): New macro.
3989 (GEN_MFCR): New macro.
3990 (GEN_MTCR): New macro.
3991 (GEN_SYNC): New macro.
3992 (GEN_LWSYNC): New macro.
3993 (gen_x_form): New function.
3994 (GEN_OR): New macro.
3995 (GEN_MR): New macro.
3996 (GEN_LWARX): New macro.
3997 (GEN_STWCX): New macro.
3998 (GEN_CMPW): New macro.
3999 (gen_md_form): New function.
4000 (GEN_RLDICL): New macro.
4001 (GEN_RLDICR): New macro.
4002 (gen_i_form): New function.
4004 (GEN_BL): New macro.
4005 (gen_b_form): New function.
4006 (GEN_BNE): New macro.
4007 (GEN_LOAD): New macro.
4008 (GEN_STORE): New macro.
4009 (gen_limm): New function.
4010 (gen_atomic_xchg): New function.
4011 (gen_call): New function.
4012 (ppc_relocate_instruction): New function.
4013 (ppc_install_fast_tracepoint_jump_pad): New function.
4014 (ppc_get_min_fast_tracepoint_insn_len): New function.
4015 (ppc_get_ipa_tdesc_idx): New function.
4016 (the_low_target): Wire in the new functions.
4017 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
4019 * linux-ppc-tdesc.h: New file.
4021 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
4023 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4024 (alloc_jump_pad_buffer): New function.
4025 * linux-amd64-ipa.c: Add <sys/mman.h> include.
4026 (alloc_jump_pad_buffer): New function.
4027 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
4028 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
4029 (alloc_jump_pad_buffer): New function.
4030 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
4031 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
4032 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
4033 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
4035 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4037 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
4038 * linux-amd64-ipa.c: Likewise.
4039 * linux-i386-ipa.c: Likewise.
4040 * linux-s390-ipa.c: Likewise.
4041 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
4042 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
4043 set_trace_state_variable_value_ptr.
4044 (struct ipa_sym_addresses): Likewise.
4045 (symbol_list): Likewise.
4046 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
4047 accessing gdb_collect directly.
4048 (gdb_collect_ptr_type): New typedef.
4049 (get_raw_reg_ptr_type): New typedef.
4050 (get_trace_state_variable_value_ptr_type): New typedef.
4051 (set_trace_state_variable_value_ptr_type): New typedef.
4052 (gdb_collect_ptr): New global.
4053 (get_raw_reg_ptr): New global.
4054 (get_trace_state_variable_value_ptr): New global.
4055 (set_trace_state_variable_value_ptr): New global.
4056 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
4057 accessing get_raw_reg directly.
4058 (get_get_tsv_func_addr): Likewise for
4059 get_trace_state_variable_value_ptr.
4060 (get_set_tsv_func_addr): Likewise for
4061 set_trace_state_variable_value_ptr.
4062 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
4064 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
4066 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
4068 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
4070 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
4072 (relocate_instruction): Remove own_buf.
4073 * server.c (own_buf): Make global.
4074 (handle_v_requests): Make global.
4075 * server.h (own_buf): New declaration.
4076 (handle_v_requests): New prototype.
4078 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4081 * linux-s390-low.c (add_insns): New function.
4082 (s390_emit_prologue): New function.
4083 (s390_emit_epilogue): New function.
4084 (s390_emit_add): New function.
4085 (s390_emit_sub): New function.
4086 (s390_emit_mul): New function.
4087 (s390_emit_lsh): New function.
4088 (s390_emit_rsh_signed): New function.
4089 (s390_emit_rsh_unsigned): New function.
4090 (s390_emit_ext): New function.
4091 (s390_emit_log_not): New function.
4092 (s390_emit_bit_and): New function.
4093 (s390_emit_bit_or): New function.
4094 (s390_emit_bit_xor): New function.
4095 (s390_emit_bit_not): New function.
4096 (s390_emit_equal): New function.
4097 (s390_emit_less_signed): New function.
4098 (s390_emit_less_unsigned): New function.
4099 (s390_emit_ref): New function.
4100 (s390_emit_if_goto): New function.
4101 (s390_emit_goto): New function.
4102 (s390_write_goto_address): New function.
4103 (s390_emit_litpool): New function.
4104 (s390_emit_const): New function.
4105 (s390_emit_call): New function.
4106 (s390_emit_reg): New function.
4107 (s390_emit_pop): New function.
4108 (s390_emit_stack_flush): New function.
4109 (s390_emit_zero_ext): New function.
4110 (s390_emit_swap): New function.
4111 (s390_emit_stack_adjust): New function.
4112 (s390_emit_set_r2): New function.
4113 (s390_emit_int_call_1): New function.
4114 (s390_emit_void_call_2): New function.
4115 (s390_emit_eq_goto): New function.
4116 (s390_emit_ne_goto): New function.
4117 (s390_emit_lt_goto): New function.
4118 (s390_emit_le_goto): New function.
4119 (s390_emit_gt_goto): New function.
4120 (s390_emit_ge_goto): New function.
4121 (s390x_emit_prologue): New function.
4122 (s390x_emit_epilogue): New function.
4123 (s390x_emit_add): New function.
4124 (s390x_emit_sub): New function.
4125 (s390x_emit_mul): New function.
4126 (s390x_emit_lsh): New function.
4127 (s390x_emit_rsh_signed): New function.
4128 (s390x_emit_rsh_unsigned): New function.
4129 (s390x_emit_ext): New function.
4130 (s390x_emit_log_not): New function.
4131 (s390x_emit_bit_and): New function.
4132 (s390x_emit_bit_or): New function.
4133 (s390x_emit_bit_xor): New function.
4134 (s390x_emit_bit_not): New function.
4135 (s390x_emit_equal): New function.
4136 (s390x_emit_less_signed): New function.
4137 (s390x_emit_less_unsigned): New function.
4138 (s390x_emit_ref): New function.
4139 (s390x_emit_if_goto): New function.
4140 (s390x_emit_const): New function.
4141 (s390x_emit_call): New function.
4142 (s390x_emit_reg): New function.
4143 (s390x_emit_pop): New function.
4144 (s390x_emit_stack_flush): New function.
4145 (s390x_emit_zero_ext): New function.
4146 (s390x_emit_swap): New function.
4147 (s390x_emit_stack_adjust): New function.
4148 (s390x_emit_int_call_1): New function.
4149 (s390x_emit_void_call_2): New function.
4150 (s390x_emit_eq_goto): New function.
4151 (s390x_emit_ne_goto): New function.
4152 (s390x_emit_lt_goto): New function.
4153 (s390x_emit_le_goto): New function.
4154 (s390x_emit_gt_goto): New function.
4155 (s390x_emit_ge_goto): New function.
4156 (s390_emit_ops): New function.
4157 (struct linux_target_ops): Fill in emit_ops hook.
4159 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4162 * Makefile.in: Add s390 IPA files.
4163 * configure.srv: Build IPA for s390.
4164 * linux-s390-ipa.c: New file.
4165 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
4166 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
4167 (tdesc_s390_linux32): Likewise.
4168 (init_registers_s390_linux32v1): Likewise.
4169 (tdesc_s390_linux32v1): Likewise.
4170 (init_registers_s390_linux32v2): Likewise.
4171 (tdesc_s390_linux32v2): Likewise.
4172 (init_registers_s390_linux64): Likewise.
4173 (tdesc_s390_linux64): Likewise.
4174 (init_registers_s390_linux64v1): Likewise.
4175 (tdesc_s390_linux64v1): Likewise.
4176 (init_registers_s390_linux64v2): Likewise.
4177 (tdesc_s390_linux64v2): Likewise.
4178 (init_registers_s390_te_linux64): Likewise.
4179 (tdesc_s390_te_linux64): Likewise.
4180 (init_registers_s390_vx_linux64): Likewise.
4181 (tdesc_s390_vx_linux64): Likewise.
4182 (init_registers_s390_tevx_linux64): Likewise.
4183 (tdesc_s390_tevx_linux64): Likewise.
4184 (init_registers_s390x_linux64): Likewise.
4185 (tdesc_s390x_linux64): Likewise.
4186 (init_registers_s390x_linux64v1): Likewise.
4187 (tdesc_s390x_linux64v1): Likewise.
4188 (init_registers_s390x_linux64v2): Likewise.
4189 (tdesc_s390x_linux64v2): Likewise.
4190 (init_registers_s390x_te_linux64): Likewise.
4191 (tdesc_s390x_te_linux64): Likewise.
4192 (init_registers_s390x_vx_linux64): Likewise.
4193 (tdesc_s390x_vx_linux64): Likewise.
4194 (init_registers_s390x_tevx_linux64): Likewise.
4195 (tdesc_s390x_tevx_linux64): Likewise.
4196 (have_hwcap_s390_vx): New static variable.
4197 (s390_arch_setup): Fill have_hwcap_s390_vx.
4198 (s390_get_thread_area): New function.
4199 (s390_ft_entry_gpr_esa): New const.
4200 (s390_ft_entry_gpr_zarch): New const.
4201 (s390_ft_entry_misc): New const.
4202 (s390_ft_entry_fr): New const.
4203 (s390_ft_entry_vr): New const.
4204 (s390_ft_main_31): New const.
4205 (s390_ft_main_64): New const.
4206 (s390_ft_exit_fr): New const.
4207 (s390_ft_exit_vr): New const.
4208 (s390_ft_exit_misc): New const.
4209 (s390_ft_exit_gpr_esa): New const.
4210 (s390_ft_exit_gpr_zarch): New const.
4211 (append_insns): New function.
4212 (s390_relocate_instruction): New function.
4213 (s390_install_fast_tracepoint_jump_pad): New function.
4214 (s390_get_min_fast_tracepoint_insn_len): New function.
4215 (s390_get_ipa_tdesc_idx): New function.
4216 (struct linux_target_ops): Wire in the above functions.
4217 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
4218 * linux-s390-tdesc.h: New file.
4220 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
4222 * linux-s390-low.c (s390_supports_tracepoints): New function.
4223 (struct linux_target_ops): Fill supports_tracepoints hook.
4225 2016-03-18 Yao Qi <yao.qi@linaro.org>
4227 * linux-low.c (lwp_signal_can_be_delivered): New function.
4228 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
4230 2016-03-18 Yao Qi <yao.qi@linaro.org>
4232 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
4233 0 if signal is enqueued. Remove 'signal' from one debugging
4234 message. Move one debugging message to some lines below.
4235 Remove code setting 'signal' to 0.
4237 2016-03-18 Yao Qi <yao.qi@linaro.org>
4239 * linux-low.c (linux_low_filter_event): Remove redundant
4240 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
4242 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
4244 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
4245 (struct linux_target_ops): Wire in the above.
4247 2016-03-03 Yao Qi <yao.qi@linaro.org>
4249 * linux-low.c: Update comments to start_step_over.
4251 2016-03-03 Yao Qi <yao.qi@linaro.org>
4254 * linux-low.c (handle_extended_wait): Set child suspended
4255 if event_lwp->bp_reinsert isn't zero.
4257 2016-03-02 Yao Qi <yao.qi@linaro.org>
4259 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
4260 enqueue_pending_signal.
4262 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
4264 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
4267 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4269 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
4270 (s390_regmap_3264) [!__s390x__]: New global.
4271 (s390_collect_ptrace_register): Skip map entries containing -1.
4272 (s390_supply_ptrace_register): Ditto.
4273 (s390_fill_gprs_high): New function.
4274 (s390_store_gprs_high): New function.
4275 (s390_regsets): Add NT_S390_HIGH_GPRS.
4276 (s390_get_hwcap): Enable on 31-bit.
4277 (have_hwcap_s390_high_gprs): Enable on 31-bit.
4278 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
4279 Detect NT_S390_HIGH_GPRS.
4280 (s390_usrregs_info_3264): Enable on 31-bit.
4281 (s390_regs_info): Enable regs_info_3264 on 31-bit.
4282 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
4284 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
4287 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
4288 * configure.srv: Ditto.
4289 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
4290 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
4291 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
4292 (init_registers_amd64_linux): Remove prototype.
4293 (tdesc_amd64_linux): Remove declaration.
4294 (get_ipa_tdesc): New function.
4295 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4296 initialize remaining tdescs.
4297 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
4298 (init_registers_i386_linux): Remove prototype.
4299 (tdesc_i386_linux): Remove declaration.
4300 (get_ipa_tdesc): New function.
4301 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
4302 initialize remaining tdescs.
4303 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
4304 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
4305 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
4306 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
4307 (x86_get_ipa_tdesc_idx): New function.
4308 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
4309 * linux-x86-tdesc.h: New file.
4310 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
4311 (target_get_ipa_tdesc_idx): New macro.
4312 * tracepoint.c (ipa_tdesc_idx): New macro.
4313 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
4314 (symbol_list): Add ipa_tdesc_idx.
4315 (cmd_qtstart): Write ipa_tdesc_idx in the target.
4316 (ipa_tdesc): Remove.
4317 (ipa_tdesc_idx): New variable.
4318 (get_context_regcache): Use get_ipa_tdesc.
4319 (gdb_collect): Ditto.
4321 * tracepoint.h (get_ipa_tdesc): New prototype.
4322 (ipa_tdesc): Remove.
4324 2016-02-24 Pedro Alves <palves@redhat.com>
4326 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
4327 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
4328 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
4329 Factor out common code between the USE_SIGTRAP_SIGINFO and
4330 !USE_SIGTRAP_SIGINFO blocks.
4331 (linux_low_filter_event): Call save_stop_reason instead of
4332 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
4334 (linux_wait_1): Update comments.
4336 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
4338 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
4339 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
4340 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
4341 ppc_insert_point, ppc_remove_point.
4343 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
4345 * linux-s390-low.c (s390_supports_z_point_type): New function.
4346 (struct linux_target_ops): Wire s390_supports_z_point_type in.
4348 2016-02-16 Yao Qi <yao.qi@linaro.org>
4350 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
4351 PC. Get pc from regcache_read_pc.
4353 2016-02-12 Yao Qi <yao.qi@linaro.org>
4355 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4356 or linux_get_pc_32bit.
4357 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4359 2016-02-12 Yao Qi <yao.qi@linaro.org>
4361 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4362 arm_linux_get_next_pcs_fixup.
4364 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4366 * tracepoint.c (x_tracepoint_action_download): Change
4367 write_inferior_data_ptr to write_inferior_data_pointer.
4368 (cmd_qtstart): Likewise.
4369 (write_inferior_data_ptr): Remove.
4370 (download_agent_expr): Change write_inferior_data_ptr to
4371 write_inferior_data_pointer.
4372 (download_tracepoint_1): Likewise.
4373 (download_tracepoint): Likewise.
4374 (download_trace_state_variables): Likewise.
4376 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4377 Marcin Kościelnicki <koriakin@0x04.net>
4379 * tracepoint.c (struct tracepoint_action_ops): Remove.
4380 (struct tracepoint_action): Remove ops.
4381 (m_tracepoint_action_download, r_tracepoint_action_download)
4382 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4383 size and offset accordingly.
4384 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4385 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4386 (tracepoint_action_send, tracepoint_action_download): New functions.
4387 Helpers for trace action handlers.
4388 (add_tracepoint_action): Remove setup actions ops.
4389 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4391 2016-02-10 Yao Qi <yao.qi@linaro.org>
4393 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4395 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4397 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4399 * configure: Regenerate.
4401 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4403 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4404 void * to gdb_byte *.
4405 * linux-low.c (siginfo_fixup): Likewise.
4406 (linux_xfer_siginfo): Likewise.
4407 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4409 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4411 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4413 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4415 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4417 * linux-x86-low.c [__x86_64__]: Include
4418 "nat/amd64-linux-siginfo.h".
4419 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4420 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4421 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4422 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4423 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4424 (cpt_si_fd, si_timerid, si_overrun): Move from
4425 nat/amd64-linux-siginfo.c.
4426 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4428 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4430 * server.c (skip_to_semicolon): Remove.
4431 (process_point_options): Use strchrnul instead of
4434 2016-01-26 Yao Qi <yao.qi@linaro.org>
4436 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4437 * linux-low.c (install_software_single_step_breakpoints): Don't
4438 call regcache_read_pc.
4439 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4442 2016-01-26 Yao Qi <yao.qi@linaro.org>
4444 * linux-low.c (install_software_single_step_breakpoints): Call
4445 regcache_read_pc instead of get_pc.
4447 2016-01-26 Yao Qi <yao.qi@linaro.org>
4449 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4450 (unblock_async_io): Rename to ...
4451 (block_unblock_async_io): ... it. New function.
4452 (enable_async_io): Don't install SIGIO handler. Unblock it
4454 (disable_async_io): Don't ignore SIGIO. Block it instead.
4455 (initialize_async_io): Install SIGIO handler. Don't call
4458 2016-01-26 Yao Qi <yao.qi@linaro.org>
4460 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4461 first character is '\003', call *the_target->request_interrupt.
4463 2016-01-25 Yao Qi <yao.qi@linaro.org>
4465 * remote-utils.c (new_thread_notify): Remove.
4466 (dead_thread_notify): Likewise.
4467 * remote-utils.h (new_thread_notify): Remove declaration.
4468 (dead_thread_notify): Likewise.
4470 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4472 * gdb.trace/pending.exp: Fix expected message on continue.
4474 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4476 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4477 it works properly on big-endian machines where sizeof (CORE_ADDR)
4480 2016-01-21 Pedro Alves <palves@redhat.com>
4482 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4483 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4484 * configure: Regenerate.
4486 2016-01-21 Yao Qi <yao.qi@linaro.org>
4488 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4489 is_thumb and set it according to CPSR saved on the stack.
4490 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4491 arm_sigreturn_next_pc.
4493 2016-01-18 Yao Qi <yao.qi@linaro.org>
4495 * linux-low.c (linux_set_pc_64bit): New function.
4496 (linux_get_pc_64bit): New function.
4497 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4499 * linux-sparc-low.c (debug_threads): Remove declaration.
4500 (sparc_get_pc): Remove.
4501 (the_low_target): Use linux_get_pc_64bit instead of
4503 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4504 (the_low_target): Use linux_get_pc_64bit and
4507 2016-01-18 Yao Qi <yao.qi@linaro.org>
4509 * linux-arm-low.c (debug_threads): Remove declaration.
4510 (arm_get_pc, arm_set_pc): Remove.
4511 (the_low_target): Use linux_get_pc_32bit and
4513 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4514 (the_low_target): Use linux_get_pc_32bit and
4516 * linux-cris-low.c (debug_threads): Remove declaration.
4517 (cris_get_pc, cris_set_pc,): Remove.
4518 (the_low_target): Use linux_get_pc_32bit and
4520 * linux-crisv32-low.c (debug_threads): Remove declaration.
4521 (cris_get_pc, cris_set_pc): Remove.
4522 (the_low_target): Use linux_get_pc_32bit and
4524 * linux-low.c: Include inttypes.h.
4525 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4526 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4527 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4528 (the_low_target): Use linux_get_pc_32bit and
4530 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4531 (the_low_target): Use linux_get_pc_32bit and
4533 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4534 (the_low_target): Use linux_get_pc_32bit and
4536 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4537 (the_low_target): Use linux_get_pc_32bit and
4539 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4540 (the_low_target): Use linux_get_pc_32bit and
4543 2016-01-18 Gary Benson <gbenson@redhat.com>
4545 * configure.ac (AC_FUNC_FORK): New check.
4546 * config.in: Regenerate.
4547 * configure: Likewise.
4549 2016-01-14 Yao Qi <yao.qi@linaro.org>
4551 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4552 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4553 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4554 arm_get_next_pcs_ctor.
4556 2016-01-12 Josh Stone <jistone@redhat.com>
4557 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4559 * inferiors.h: Include "gdb_vecs.h".
4560 (struct process_info): Add syscalls_to_catch.
4561 * inferiors.c (remove_process): Free syscalls_to_catch.
4562 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4563 syscall_return stops.
4564 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4565 * server.c (handle_general_set): Handle QCatchSyscalls.
4566 (handle_query): Report support for QCatchSyscalls.
4567 * target.h (struct target_ops): Add supports_catch_syscall.
4568 (target_supports_catch_syscall): New macro.
4569 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4570 (struct lwp_info): Add syscall_state.
4571 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4572 Maintain syscall_state and syscalls_to_catch across exec.
4573 (get_syscall_trapinfo): New function, proxy to the_low_target.
4574 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4575 (linux_low_filter_event): Toggle syscall_state entry/return for
4576 syscall traps, and set it ignored for all others.
4577 (gdb_catching_syscalls_p): New function.
4578 (gdb_catch_this_syscall_p): New function.
4579 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4580 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4581 (linux_supports_catch_syscall): New function.
4582 (linux_target_ops): Install it.
4583 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4584 (the_low_target): Install it.
4586 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4588 * acinclude.m4: Include new ../warning.m4 file.
4589 * configure: Regenerated.
4590 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4592 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4594 * ax.c (is_goto_target): Mark static.
4595 * linux-low.c (register_addr): Likewise.
4596 (linux_fetch_registers, linux_store_registers): Likewise.
4597 * mem-break.c (any_persistent_commands): Fix old prototype.
4598 (add_commands_to_breakpoint): Mark static.
4599 * regcache.c (find_register_by_name): Delete unused func.
4600 * remote-utils.c (hex_or_minus_one): Mark static.
4601 * server.c (monitor_show_help): Mark static.
4602 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4603 handle_v_requests): Likewise.
4605 2016-01-12 Pedro Alves <palves@redhat.com>
4607 Remove use of the registered trademark symbol throughout.
4609 2016-01-08 Yao Qi <yao.qi@linaro.org>
4611 * remote-utils.c (getpkt): If c is '\003', call target hook
4614 2016-01-06 Yao Qi <yao.qi@linaro.org>
4616 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4617 linux-aarch32-low.c.
4618 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4619 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4620 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4621 (thumb2_breakpoint): Declare.
4622 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4623 linux-aarch32-low.h.
4624 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4625 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4626 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4628 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4630 * gdbreplay.c (gdbreplay_version): Change copyright year in
4632 * server.c (gdbserver_version): Likewise.
4634 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4636 * server.c (crc32_table): Delete.
4637 (crc32): Use libiberty's xcrc32 function.
4639 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4641 * lynx-low.c (lynx_delete_thread_callback): New function.
4642 (lynx_mourn): Properly delete our process and all of its
4643 threads. Remove call to clear_inferiors.
4645 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4647 * target.c (thread_search_callback): Add check that
4648 the thread_stopped target callback is not NULL before
4651 2015-12-21 Yao Qi <yao.qi@linaro.org>
4653 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4656 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4658 * server.c (handle_query): Call target_supports_software_single_step.
4660 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4662 * linux-low.c (single_step): New function.
4663 (linux_resume_one_lwp_throw): Call single_step.
4664 (start_step_over): Likewise.
4666 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4668 * Makefile.in (SFILES): Append arch/arm-linux.c,
4669 arch/arm-get-next-pcs.c.
4670 (arm-linux.o): New rule.
4671 (arm-get-next-pcs.o): New rule.
4672 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4674 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4675 to linux-aarch32-low.c.
4676 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4677 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4678 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4679 (thumb2_breakpoint_len): Likewise.
4680 (arm_is_thumb_mode): Make non-static.
4681 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4682 from linux-aarch32-low.c.
4683 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4684 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4685 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4686 (thumb2_breakpoint_len): Likewise.
4687 (arm_is_thumb_mode): New declaration.
4688 * linux-arm-low.c: Include arch/arm-linux.h
4689 aarch/arm-get-next-pcs.h, sys/syscall.h.
4690 (get_next_pcs_ops): New struct.
4691 (get_next_pcs_addr_bits_remove): New function.
4692 (get_next_pcs_is_thumb): New function.
4693 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4694 (arm_sigreturn_next_pc): Likewise.
4695 (get_next_pcs_syscall_next_pc): Likewise.
4696 (arm_gdbserver_get_next_pcs): Likewise.
4697 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4699 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4700 * server.h: Include gdb_vecs.h.
4702 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4704 * Makefile.in (SFILES): Append common/common-regcache.c.
4705 (OBS): Append common-regcache.o.
4706 (common-regcache.o): New rule.
4707 * regcache.c (init_register_cache): Initialize cache to
4709 (regcache_raw_read_unsigned): New function.
4710 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4711 register_status enum.
4713 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4715 * linux-aarch64-low.c (the_low_targets): Rename
4716 breakpoint_reinsert_addr to get_next_pcs.
4717 * linux-arm-low.c (the_low_targets): Likewise.
4718 * linux-bfin-low.c (the_low_targets): Likewise.
4719 * linux-cris-low.c (the_low_targets): Likewise.
4720 * linux-crisv32-low.c (the_low_targets): Likewise.
4721 * linux-low.c (can_software_single_step): Likewise.
4722 (install_software_single_step_breakpoints): New function.
4723 (start_step_over): Use install_software_single_step_breakpoints.
4724 * linux-low.h: New CORE_ADDR vector.
4725 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4727 * linux-mips-low.c (the_low_targets): Likewise.
4728 * linux-nios2-low.c (the_low_targets): Likewise.
4729 * linux-sparc-low.c (the_low_targets): Likewise.
4731 2015-12-17 Pedro Alves <palves@redhat.com>
4733 * linux-low.c (linux_kill_one_lwp): Remove references to
4735 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4737 (linux_init_signals): Delete.
4738 (initialize_low): Adjust.
4739 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4741 2015-12-16 Pedro Alves <palves@redhat.com>
4743 * configure.ac (compiler warning flags): When testing a
4744 -Wno-foo option, check whether -Wfoo works instead.
4745 * configure: Regenerate.
4747 2015-12-11 Don Breazeal <donb@codesourcery.com>
4749 * server.c (process_serial_event): Don't exit from gdbserver
4750 in remote mode if there are still active inferiors.
4752 2015-12-11 Yao Qi <yao.qi@linaro.org>
4754 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4755 arm_breakpoint_at if the process is 32-bit.
4757 2015-12-11 Yao Qi <yao.qi@linaro.org>
4759 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4762 2015-12-07 Yao Qi <yao.qi@linaro.org>
4764 * configure.srv: Append arm.o to srv_tgtobj for
4765 aarch64*-*-linux* target.
4766 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4767 from linux-arm-low.c.
4768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4769 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4770 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4771 (thumb2_breakpoint_len): Likewise.
4772 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4773 (arm_breakpoint_kinds): Likewise.
4774 (arm_breakpoint_kind_from_pc): Likewise.
4775 (arm_sw_breakpoint_from_kind): Likewise.
4776 (arm_breakpoint_kind_from_current_state): Likewise.
4777 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4778 (arm_sw_breakpoint_from_kind): Declare.
4779 (arm_breakpoint_kind_from_current_state): Declare.
4780 (arm_breakpoint_at): Declare.
4781 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4782 arm_sw_breakpoint_from_kind if process is 32-bit.
4783 (aarch64_breakpoint_kind_from_pc): New function.
4784 (aarch64_breakpoint_kind_from_current_state): New function.
4785 (the_low_target): Initialize fields breakpoint_kind_from_pc
4786 and breakpoint_kind_from_current_state.
4787 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4788 linux-aarch32-low.c.
4789 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4790 (arm_breakpoint, arm_breakpoint_len): Likewise.
4791 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4792 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4793 (arm_is_thumb_mode): Likewise.
4794 (arm_breakpoint_at): Likewise.
4795 (arm_breakpoint_kind_from_pc): Likewise.
4796 (arm_sw_breakpoint_from_kind): Likewise.
4797 (arm_breakpoint_kind_from_current_state): Likewise.
4800 2015-08-04 Yao Qi <yao.qi@linaro.org>
4802 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4803 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4804 * server.c (extended_protocol): Remove "static".
4805 * server.h (extended_protocol): Declare it.
4807 2015-12-04 Josh Stone <jistone@redhat.com>
4809 * target.h (struct target_ops) <arch_setup>: Rename to ...
4810 (struct target_ops) <post_create_inferior>: ... this.
4811 (target_arch_setup): Rename to ...
4812 (target_post_create_inferior): ... this, calling post_create_inferior.
4813 * server.c (start_inferior): Update target_arch_setup calls to
4814 target_post_create_inferior.
4815 * linux-low.c (linux_low_ptrace_options): Forward declare.
4816 (linux_arch_setup): Update its comment for general use.
4817 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4818 (struct linux_target_ops): Use linux_post_create_inferior.
4819 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4820 to post_create_inferior.
4821 * nto-low.c (struct nto_target_ops): Likewise.
4822 * spu-low.c (struct spu_target_ops): Likewise.
4823 * win32-low.c (struct win32_target_ops): Likewise.
4825 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4827 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4829 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4831 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4832 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4833 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4834 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4835 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4836 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4837 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4838 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4839 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4840 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4841 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4842 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4844 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4846 * linux-low.c (linux_look_up_symbols): Don't call
4847 linux_supports_traceclone.
4848 * linux-low.h (thread_db_init): Remove use_events argument.
4849 * thread-db.c (thread_db_use_event): Remove global variable.
4850 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4851 (struct thread_db) <td_create_bp>: Remove field.
4852 (thread_db_create_event): Remove function.
4853 (thread_db_enable_reporting): Likewise.
4854 (find_one_thread): Don't check for thread_db_use_events.
4855 (attach_thread): Likewise.
4856 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4857 (try_thread_db_load_1): Don't check for thread_db_use_events.
4858 (thread_db_init): Remove use_events argument and thread events
4860 (remove_thread_event_breakpoints): Remove function.
4861 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4863 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4865 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4867 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4868 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4869 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4870 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4871 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4873 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4875 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4876 * linux-low.c (can_hardware_single_step): Use
4877 supports_hardware_single_step.
4878 (can_software_single_step): New function.
4879 (start_step_over): Call can_software_single_step.
4880 (linux_supports_hardware_single_step): New function.
4881 (struct target_ops) <supports_software_single_step>: Initialize.
4882 * linux-low.h (struct linux_target_ops)
4883 <supports_hardware_single_step>: Initialize.
4884 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4885 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4886 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4887 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4888 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4889 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4890 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4891 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4892 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4893 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4895 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4896 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4898 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4899 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4900 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4902 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4903 * target.h (struct target_ops): <supports_software_single_step>:
4905 (target_supports_software_single_step): New macro.
4907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4909 * linux-low.c (linux_wait_1): Fix pc advance condition.
4910 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4911 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4913 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4915 * linux-arm-low.c (arm_is_thumb_mode): New function.
4916 (arm_breakpoint_at): Use arm_is_thumb_mode.
4917 (arm_breakpoint_kind_from_current_state): New function.
4918 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4920 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4921 (linux_breakpoint_kind_from_current_state): New function.
4922 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4923 * linux-low.h (struct linux_target_ops)
4924 <breakpoint_kind_from_current_state>: New field.
4925 * target.h (struct target_ops): Likewise.
4926 (target_breakpoint_kind_from_current_state): New macro.
4928 2015-11-30 Pedro Alves <palves@redhat.com>
4930 * linux-low.c (linux_resume): Wake up the event loop before
4933 2015-11-30 Pedro Alves <palves@redhat.com>
4935 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4937 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4939 * target.c (struct thread_search): New structure.
4940 (thread_search_callback): New function.
4941 (prev_general_thread): New global.
4942 (prepare_to_access_memory, done_accessing_memory): New functions.
4943 * target.h (prepare_to_access_memory, done_accessing_memory):
4944 Replace macros with function declarations.
4946 2015-11-30 Pedro Alves <palves@redhat.com>
4949 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4950 report TARGET_WAITKIND_NO_RESUMED.
4951 * remote-utils.c (prepare_resume_reply): Handle
4952 TARGET_WAITKIND_NO_RESUMED.
4953 * server.c (report_no_resumed): New global.
4954 (handle_query) <qSupported>: Handle "no-resumed+". Report
4955 "no-resumed+" support.
4956 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4957 return error if the client doesn't support no-resumed events.
4958 (push_stop_notification): New function.
4959 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4960 events if the client supports them.
4962 2015-11-30 Pedro Alves <palves@redhat.com>
4964 * linux-low.c (thread_still_has_status_pending_p): Don't check
4966 (lwp_resumed): New function.
4967 (status_pending_p_callback): Return early if the LWP is not
4968 supposed to be resumed.
4970 2015-11-30 Pedro Alves <palves@redhat.com>
4972 * linux-low.c (handle_extended_wait): Assert that the LWP's
4973 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4974 thread create events, leave the new child's status pending.
4975 (linux_low_filter_event): If GDB wants to hear about thread exit
4976 events, leave the LWP marked dead and don't delete it.
4977 (linux_wait_for_event_filtered): Don't check for thread exit.
4978 (filter_exit_event): New function.
4979 (linux_wait_1): Use it, when returning an exit event.
4980 (linux_resume_one_lwp_throw): Assert that the LWP's
4981 waitstatus is TARGET_WAITKIND_IGNORE.
4982 * remote-utils.c (prepare_resume_reply): Handle
4983 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4984 * server.c (report_thread_events): New global.
4985 (handle_general_set): Handle QThreadEvents.
4986 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4987 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4988 TARGET_WAITKIND_THREAD_EXITED.
4989 * server.h (report_thread_events): Declare.
4991 2015-11-30 Pedro Alves <palves@redhat.com>
4993 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4994 the thread's last_resume_kind was resume_stop.
4996 2015-11-30 Pedro Alves <palves@redhat.com>
4998 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
5001 2015-11-30 Pedro Alves <palves@redhat.com>
5003 * server.c (handle_v_requests): Handle vCtrlC.
5005 2015-11-30 Pedro Alves <palves@redhat.com>
5007 * gdbthread.h (find_any_thread_of_pid): Declare.
5008 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
5010 * server.c (handle_query): If current_thread is NULL, look for
5011 another thread of the selected process.
5013 2015-11-26 Daniel Colascione <dancol@dancol.org>
5014 Simon Marchi <simon.marchi@ericsson.com>
5016 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
5017 * server.c (handle_qxfer_threads_worker): Refactor to include thread
5019 * target.h (struct target_ops) <thread_name>: New field.
5020 (target_thread_name): New macro.
5022 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5024 * regcache.h (regcache_invalidate_pid): Add declaration.
5025 * regcache.c (regcache_invalidate_pid): New function, extracted
5026 from regcache_invalidate.
5027 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
5028 Add trivial documentation comment.
5029 * lynx-low.c: Use regcache_invalidate_pid instead of
5030 regcache_invalidate.
5032 2015-11-23 Joel Brobecker <brobecker@adacore.com>
5034 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
5035 and Elf64_auxv_t if the target is Android.
5037 2015-11-22 Doug Evans <xdje42@gmail.com>
5039 * target.h: #include <sys/types.h>.
5041 2015-11-19 Pedro Alves <palves@redhat.com>
5043 * linux-low.c (linux_process_qsupported): Change prototype.
5045 * linux-low.h (struct linux_target_ops) <process_qsupported>:
5047 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
5048 and adjust to loop over all features.
5049 * server.c (handle_query) <qSupported>: Adjust to call
5050 target_process_qsupported once, passing it a vector of unprocessed
5052 * target.h (struct target_ops) <process_qsupported>: Change
5054 (target_process_qsupported): Adjust.
5056 2015-11-19 Pedro Alves <palves@redhat.com>
5058 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
5060 * configure: Regenerate.
5062 2015-11-19 Pedro Alves <palves@redhat.com>
5064 * configure: Regenerate.
5066 2015-11-19 Yao Qi <yao.qi@linaro.org>
5068 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
5071 2015-11-19 Yao Qi <yao.qi@linaro.org>
5073 * linux-aarch64-low.c (enum aarch64_operand_type): New.
5074 (struct aarch64_operand): Move enum out.
5076 2015-11-19 Yao Qi <yao.qi@linaro.org>
5078 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
5079 struct user_fpsimd_state *.
5080 (aarch64_store_fpregset): Likewise.
5082 2015-11-19 Yao Qi <yao.qi@linaro.org>
5084 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
5085 struct user_pt_regs *.
5086 (aarch64_store_gregset): Likewise.
5088 2015-11-18 Pedro Alves <palves@redhat.com>
5090 * Makefile.in (all_object_files): Add $IPA_OBJS.
5092 2015-11-17 Pedro Alves <palves@redhat.com>
5094 * win32-low.c (win32_resume): Use gdb_signal_from_host,
5095 GDB_SIGNAL_0 and gdb_signal_to_string.
5097 2015-11-17 Pedro Alves <palves@redhat.com>
5099 * win32-low.c (handle_output_debug_string): Remove parameter.
5100 (win32_kill): Remove our_status local and adjust call to
5101 handle_output_debug_string.
5102 (get_child_debug_event): Adjust call to
5103 handle_output_debug_string.
5105 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5107 * linux-mips-low.c (mips_fill_gregset): Add cast.
5108 (mips_store_gregset): Likewise.
5109 (mips_fill_fpregset): Likewise.
5110 (mips_store_fpregset): Likewise.
5112 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5114 * linux-mips-low.c (mips_add_watchpoint): Rename private to
5117 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5119 * linux-mips-low.c (mips_linux_new_thread): Change type of
5120 watch_type to enum target_hw_bp_type.
5122 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5124 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
5125 Change return type to arm_hwbp_type.
5127 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5129 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
5130 (arm_store_gregset): Likewise.
5131 * linux-arm-low.c (arm_get_hwcap): Likewise.
5132 (arm_read_description): Likewise.
5134 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5136 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
5138 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5140 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
5141 (ppc_fill_vsxregset): Likewise.
5142 (ppc_store_vsxregset): Likewise.
5143 (ppc_fill_vrregset): Likewise.
5144 (ppc_store_vrregset): Likewise.
5145 (ppc_fill_evrregset): Likewise.
5146 (ppc_store_evrregset): Likewise.
5148 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
5150 * linux-ppc-low.c (ppc_usrregs_info): Remove
5151 forward-declaration.
5152 (ppc_arch_setup): Move lower in file.
5154 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
5156 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
5157 (ps_pdwrite): Likewise.
5159 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
5161 * linux-arm-low.c (arm_new_thread): Move pointer dereference
5162 to after assert checks.
5164 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
5166 * proc-service.c (ps_pdread): Add/adjust casts.
5167 (ps_pdwrite): Add/adjust casts.
5169 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5171 * server.c (handle_search_memory_1): Cast return value of
5174 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
5176 * server.c (write_qxfer_response): Change type of data to
5179 2015-10-29 Pedro Alves <palves@redhat.com>
5181 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5183 2015-10-29 Pedro Alves <palves@redhat.com>
5185 * tracepoint.c (clear_installed_tracepoints): Add casts.
5187 2015-10-29 Pedro Alves <palves@redhat.com>
5189 * server.c (handle_v_cont, process_serial_event): Add enum
5190 gdb_signal casts to signal parsing code.
5192 2015-10-29 Pedro Alves <palves@redhat.com>
5194 * linux-low.h (NULL_REGSET): Define.
5195 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5196 * linux-arm-low.c (arm_regsets): Likewise.
5197 * linux-crisv32-low.c (cris_regsets): Likewise.
5198 * linux-m68k-low.c (m68k_regsets): Likewise.
5199 * linux-mips-low.c (mips_regsets): Likewise.
5200 * linux-nios2-low.c (nios2_regsets): Likewise.
5201 * linux-ppc-low.c (ppc_regsets): Likewise.
5202 * linux-s390-low.c (s390_regsets): Likewise.
5203 * linux-sh-low.c (sh_regsets): Likewise.
5204 * linux-sparc-low.c (sparc_regsets): Likewise.
5205 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5206 * linux-tile-low.c (tile_regsets): Likewise.
5207 * linux-x86-low.c (x86_regsets): Likewise.
5208 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5210 2015-10-29 Pedro Alves <palves@redhat.com>
5212 * linux-low.h (NULL_REGSET): Define.
5213 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
5214 * linux-arm-low.c (arm_regsets): Likewise.
5215 * linux-crisv32-low.c (cris_regsets): Likewise.
5216 * linux-m68k-low.c (m68k_regsets): Likewise.
5217 * linux-mips-low.c (mips_regsets): Likewise.
5218 * linux-nios2-low.c (nios2_regsets): Likewise.
5219 * linux-ppc-low.c (ppc_regsets): Likewise.
5220 * linux-s390-low.c (s390_regsets): Likewise.
5221 * linux-sh-low.c (sh_regsets): Likewise.
5222 * linux-sparc-low.c (sparc_regsets): Likewise.
5223 * linux-tic6x-low.c (tic6x_regsets): Likewise.
5224 * linux-tile-low.c (tile_regsets): Likewise.
5225 * linux-x86-low.c (x86_regsets): Likewise.
5226 * linux-xtensa-low.c (xtensa_regsets): Likewise.
5228 2015-10-26 Doug Evans <dje@google.com>
5230 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
5232 2015-10-26 Doug Evans <dje@google.com>
5234 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
5236 2015-10-26 Doug Evans <dje@google.com>
5238 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5240 (attach_thread, find_new_threads_callback): Ditto.
5242 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5244 * mem-break.h (set_breakpoint_data): Remove.
5246 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5248 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
5249 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5250 (initialize_low): Remove set_breakpoint_data call.
5251 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
5252 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
5253 (initialize_low): Remove set_breakpoint_data call.
5254 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
5255 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
5256 (initialize_low): Remove set_breakpoint_data call.
5258 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
5260 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
5261 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
5262 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
5263 * target.h (target_breakpoint_kind_from_pc): New macro.
5265 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
5267 * linux-low.c (default_breakpoint_kind_from_pc): New function.
5268 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
5269 the default breakpoint kind.
5271 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5273 * linux-arm-low.c (arm_supports_z_point_type): Add software
5276 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5278 * linux-arm-low.c: Refactor breakpoint definitions.
5279 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
5280 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
5282 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5284 * Makefile.in: Add arm.c/o.
5285 * configure.srv: Likewise.
5286 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
5287 (arm_breakpoint_kind_from_pc): New function.
5288 (arm_sw_breakpoint_from_kind): Return proper kind.
5289 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
5291 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5293 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
5295 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
5296 (struct raw_breakpoint) <size>: Remove.
5297 (struct raw_breakpoint) <kind>: Add.
5298 (bp_size): New function.
5299 (bp_opcode): Likewise.
5300 (find_raw_breakpoint_at): Adjust for kind.
5301 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
5302 (remove_memory_breakpoint): Adjust for kind call bp_size.
5303 (set_raw_breakpoint_at): Adjust for kind.
5304 (set_breakpoint): Likewise.
5305 (set_breakpoint_at): Call breakpoint_kind_from_pc.
5306 (delete_raw_breakpoint): Adjust for kind.
5307 (delete_breakpoint): Likewise.
5308 (find_gdb_breakpoint): Likewise.
5309 (set_gdb_breakpoint_1): Likewise.
5310 (set_gdb_breakpoint): Likewise.
5311 (delete_gdb_breakpoint_1): Likewise.
5312 (delete_gdb_breakpoint): Likewise.
5313 (uninsert_raw_breakpoint): Likewise.
5314 (reinsert_raw_breakpoint): Likewise.
5315 (set_breakpoint_data): Remove.
5316 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
5317 (check_mem_read): Adjust for kind call bp_size.
5318 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
5319 (clone_one_breakpoint): Adjust for kind.
5320 * mem-break.h (set_gdb_breakpoint): Likewise.
5321 (delete_gdb_breakpoint): Likewise.
5322 * server.c (process_serial_event): Likewise.
5324 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5326 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
5327 (struct linux_target_ops) <breakpoint>: Remove.
5328 (struct linux_target_ops) <breakpoint_len>: Remove.
5329 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5330 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5331 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
5332 (arm_sw_breakpoint_from_kind): New function.
5333 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
5334 (struct linux_target_ops) <breakpoint>: Remove.
5335 (struct linux_target_ops) <breakpoint_len>: Remove.
5336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5338 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
5339 (struct linux_target_ops) <breakpoint>: Remove.
5340 (struct linux_target_ops) <breakpoint_len>: Remove.
5341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5343 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
5344 (struct linux_target_ops) <breakpoint>: Remove.
5345 (struct linux_target_ops) <breakpoint_len>: Remove.
5346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5348 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
5349 and sw_breakpoint_from_kind to increment the pc.
5350 (linux_breakpoint_kind_from_pc): New function.
5351 (linux_sw_breakpoint_from_kind): New function.
5352 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
5353 (initialize_low): Call breakpoint_kind_from_pc and
5354 sw_breakpoint_from_kind to replace breakpoint_data/len.
5355 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5357 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5358 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5359 (struct linux_target_ops) <breakpoint>: Remove.
5360 (struct linux_target_ops) <breakpoint_len>: Remove.
5361 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5362 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5363 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5364 (struct linux_target_ops) <breakpoint>: Remove.
5365 (struct linux_target_ops) <breakpoint_len>: Remove.
5366 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5367 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5368 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5369 (struct linux_target_ops) <breakpoint>: Remove.
5370 (struct linux_target_ops) <breakpoint_len>: Remove.
5371 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5372 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5373 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5374 (struct linux_target_ops) <breakpoint>: Remove.
5375 (struct linux_target_ops) <breakpoint_len>: Remove.
5376 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5377 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5378 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5379 (struct linux_target_ops) <breakpoint>: Remove.
5380 (struct linux_target_ops) <breakpoint_len>: Remove.
5381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5382 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5383 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5384 (struct linux_target_ops) <breakpoint>: Remove.
5385 (struct linux_target_ops) <breakpoint_len>: Remove.
5386 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5387 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5388 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5389 (struct linux_target_ops) <breakpoint>: Remove.
5390 (struct linux_target_ops) <breakpoint_len>: Remove.
5391 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5392 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5393 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5394 (struct linux_target_ops) <breakpoint>: Remove.
5395 (struct linux_target_ops) <breakpoint_len>: Remove.
5396 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5397 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5398 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5399 (struct linux_target_ops) <breakpoint>: Remove.
5400 (struct linux_target_ops) <breakpoint_len>: Remove.
5401 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5402 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5403 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5404 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5405 (struct linux_target_ops) <breakpoint>: Remove.
5406 (struct linux_target_ops) <breakpoint_len>: Remove.
5407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5409 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5410 (struct linux_target_ops) <breakpoint>: Remove.
5411 (struct linux_target_ops) <breakpoint_len>: Remove.
5412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5415 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5417 * linux-cris-low.c (cris_get_pc): Remove void arg.
5419 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5421 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5424 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5426 * inferiors.c (thread_pid_matches_callback): New function.
5427 (find_thread_process): New function.
5428 (remove_thread): Reset current_thread.
5429 (remove_process): Assert threads have been removed first.
5431 2015-10-15 Yao Qi <yao.qi@linaro.org>
5433 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5435 (aarch64_remove_point): Likewise.
5436 * regcache.c (regcache_register_size): New function.
5438 2015-10-12 Yao Qi <yao.qi@linaro.org>
5440 * linux-aarch64-low.c: Update all callers as emit_load_store
5441 is renamed to aarch64_emit_load_store.
5443 2015-10-12 Yao Qi <yao.qi@linaro.org>
5445 * linux-aarch64-low.c: Update all callers of function renaming
5446 from emit_insn to aarch64_emit_insn.
5448 2015-10-12 Yao Qi <yao.qi@linaro.org>
5450 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5451 arch/aarch64-insn.h.
5452 (struct aarch64_memory_operand): Likewise.
5454 (emit_insn): Move to arch/aarch64-insn.c.
5455 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5456 (emit_load_store): Move to arch/aarch64-insn.c.
5457 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5458 (can_encode_int32): Remove.
5460 2015-10-12 Yao Qi <yao.qi@linaro.org>
5462 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5463 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5464 (aarch64_relocate_instruction): Likewise.
5465 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5466 (struct aarch64_insn_visitor): Likewise.
5468 2015-10-12 Yao Qi <yao.qi@linaro.org>
5470 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5471 (struct aarch64_insn_visitor): New.
5472 (struct aarch64_insn_relocation_data): New.
5473 (aarch64_ftrace_insn_reloc_b): New function.
5474 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5475 (aarch64_ftrace_insn_reloc_cb): Likewise.
5476 (aarch64_ftrace_insn_reloc_tb): Likewise.
5477 (aarch64_ftrace_insn_reloc_adr): Likewise.
5478 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5479 (aarch64_ftrace_insn_reloc_others): Likewise.
5481 (aarch64_relocate_instruction): Use visitor.
5483 2015-10-12 Yao Qi <yao.qi@linaro.org>
5485 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5486 int. Add argument buf.
5487 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5488 aarch64_relocate_instruction.
5490 2015-10-12 Yao Qi <yao.qi@linaro.org>
5492 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5493 argument insn. Remove local variable insn. Don't call
5495 (aarch64_install_fast_tracepoint_jump_pad): Call
5498 2015-09-30 Yao Qi <yao.qi@linaro.org>
5500 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5501 (emit_load_store_pair): Likewise.
5503 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5505 * dll.c (match_dll): Add cast(s).
5506 (unloaded_dll): Likewise.
5507 * linux-low.c (second_thread_of_pid_p): Likewise.
5508 (delete_lwp_callback): Likewise.
5509 (count_events_callback): Likewise.
5510 (select_event_lwp_callback): Likewise.
5511 (linux_set_resume_request): Likewise.
5512 * server.c (accumulate_file_name_length): Likewise.
5513 (emit_dll_description): Likewise.
5514 (handle_qxfer_threads_worker): Likewise.
5515 (visit_actioned_threads): Likewise.
5516 * thread-db.c (any_thread_of): Likewise.
5517 * tracepoint.c (same_process_p): Likewise.
5518 (match_blocktype): Likewise.
5519 (build_traceframe_info_xml): Likewise.
5521 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5523 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5525 (gdb_unparse_agent_expr): Likewise.
5526 * hostio.c (require_data): Likewise.
5527 (handle_pread): Likewise.
5528 * linux-low.c (disable_regset): Likewise.
5529 (fetch_register): Likewise.
5530 (store_register): Likewise.
5531 (get_dynamic): Likewise.
5532 (linux_qxfer_libraries_svr4): Likewise.
5533 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5534 (set_fast_tracepoint_jump): Likewise.
5535 (uninsert_fast_tracepoint_jumps_at): Likewise.
5536 (reinsert_fast_tracepoint_jumps_at): Likewise.
5537 (validate_inserted_breakpoint): Likewise.
5538 (clone_agent_expr): Likewise.
5539 * regcache.c (init_register_cache): Likewise.
5540 * remote-utils.c (putpkt_binary_1): Likewise.
5541 (decode_M_packet): Likewise.
5542 (decode_X_packet): Likewise.
5543 (look_up_one_symbol): Likewise.
5544 (relocate_instruction): Likewise.
5545 (monitor_output): Likewise.
5546 * server.c (handle_search_memory): Likewise.
5547 (handle_qxfer_exec_file): Likewise.
5548 (handle_qxfer_libraries): Likewise.
5549 (handle_qxfer): Likewise.
5550 (handle_query): Likewise.
5551 (handle_v_cont): Likewise.
5552 (handle_v_run): Likewise.
5553 (captured_main): Likewise.
5554 * target.c (write_inferior_memory): Likewise.
5555 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5556 * tracepoint.c (init_trace_buffer): Likewise.
5557 (add_tracepoint_action): Likewise.
5558 (add_traceframe): Likewise.
5559 (add_traceframe_block): Likewise.
5560 (cmd_qtdpsrc): Likewise.
5561 (cmd_qtdv): Likewise.
5562 (cmd_qtstatus): Likewise.
5563 (response_source): Likewise.
5564 (response_tsv): Likewise.
5565 (cmd_qtnotes): Likewise.
5566 (gdb_collect): Likewise.
5567 (initialize_tracepoint): Likewise.
5569 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5571 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5572 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5573 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5575 (enum aarch64_condition_codes): New enum.
5576 (w0): New static global.
5579 (struct aarch64_memory_operand) <type>: New
5580 MEMORY_OPERAND_POSTINDEX type.
5581 (postindex_memory_operand): New helper function.
5582 (emit_ret): New function.
5583 (emit_load_store_pair): New function, factored out of emit_stp
5584 with support for MEMORY_OPERAND_POSTINDEX.
5585 (emit_stp): Rewrite using emit_load_store_pair.
5586 (emit_ldp): New function.
5587 (emit_load_store): Likewise.
5588 (emit_ldr): Mention post-index instruction in comment.
5589 (emit_ldrh): New function.
5590 (emit_ldrb): New function.
5591 (emit_ldrsw): Mention post-index instruction in comment.
5592 (emit_str): Likewise.
5593 (emit_subs): New function.
5594 (emit_cmp): Likewise.
5595 (emit_and): Likewise.
5596 (emit_orr): Likewise.
5597 (emit_orn): Likewise.
5598 (emit_eor): Likewise.
5599 (emit_mvn): Likewise.
5600 (emit_lslv): Likewise.
5601 (emit_lsrv): Likewise.
5602 (emit_asrv): Likewise.
5603 (emit_mul): Likewise.
5604 (emit_sbfm): Likewise.
5605 (emit_sbfx): Likewise.
5606 (emit_ubfm): Likewise.
5607 (emit_ubfx): Likewise.
5608 (emit_csinc): Likewise.
5609 (emit_cset): Likewise.
5610 (emit_nop): Likewise.
5611 (emit_ops_insns): New helper function.
5612 (emit_pop): Likewise.
5613 (emit_push): Likewise.
5614 (aarch64_emit_prologue): New function.
5615 (aarch64_emit_epilogue): Likewise.
5616 (aarch64_emit_add): Likewise.
5617 (aarch64_emit_sub): Likewise.
5618 (aarch64_emit_mul): Likewise.
5619 (aarch64_emit_lsh): Likewise.
5620 (aarch64_emit_rsh_signed): Likewise.
5621 (aarch64_emit_rsh_unsigned): Likewise.
5622 (aarch64_emit_ext): Likewise.
5623 (aarch64_emit_log_not): Likewise.
5624 (aarch64_emit_bit_and): Likewise.
5625 (aarch64_emit_bit_or): Likewise.
5626 (aarch64_emit_bit_xor): Likewise.
5627 (aarch64_emit_bit_not): Likewise.
5628 (aarch64_emit_equal): Likewise.
5629 (aarch64_emit_less_signed): Likewise.
5630 (aarch64_emit_less_unsigned): Likewise.
5631 (aarch64_emit_ref): Likewise.
5632 (aarch64_emit_if_goto): Likewise.
5633 (aarch64_emit_goto): Likewise.
5634 (aarch64_write_goto_address): Likewise.
5635 (aarch64_emit_const): Likewise.
5636 (aarch64_emit_call): Likewise.
5637 (aarch64_emit_reg): Likewise.
5638 (aarch64_emit_pop): Likewise.
5639 (aarch64_emit_stack_flush): Likewise.
5640 (aarch64_emit_zero_ext): Likewise.
5641 (aarch64_emit_swap): Likewise.
5642 (aarch64_emit_stack_adjust): Likewise.
5643 (aarch64_emit_int_call_1): Likewise.
5644 (aarch64_emit_void_call_2): Likewise.
5645 (aarch64_emit_eq_goto): Likewise.
5646 (aarch64_emit_ne_goto): Likewise.
5647 (aarch64_emit_lt_goto): Likewise.
5648 (aarch64_emit_le_goto): Likewise.
5649 (aarch64_emit_gt_goto): Likewise.
5650 (aarch64_emit_ge_got): Likewise.
5651 (aarch64_emit_ops_impl): New static global variable.
5652 (aarch64_emit_ops): New target function, return
5653 &aarch64_emit_ops_impl.
5654 (struct linux_target_ops): Install it.
5656 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5658 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5659 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5661 * linux-aarch64-ipa.c: New file.
5662 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5664 (aarch64_get_thread_area): New target method.
5665 (extract_signed_bitfield): New helper function.
5666 (aarch64_decode_ldr_literal): New function.
5667 (enum aarch64_opcodes): New enum.
5668 (struct aarch64_register): New struct.
5669 (struct aarch64_operand): New struct.
5670 (x0): New static global.
5679 (aarch64_register): New helper function.
5680 (register_operand): Likewise.
5681 (immediate_operand): Likewise.
5682 (struct aarch64_memory_operand): New struct.
5683 (offset_memory_operand): New helper function.
5684 (preindex_memory_operand): Likewise.
5685 (enum aarch64_system_control_registers): New enum.
5686 (ENCODE): New macro.
5687 (emit_insn): New helper function.
5688 (emit_b): New function.
5689 (emit_bcond): Likewise.
5690 (emit_cb): Likewise.
5691 (emit_tb): Likewise.
5692 (emit_blr): Likewise.
5693 (emit_stp): Likewise.
5694 (emit_ldp_q_offset): Likewise.
5695 (emit_stp_q_offset): Likewise.
5696 (emit_load_store): Likewise.
5697 (emit_ldr): Likewise.
5698 (emit_ldrsw): Likewise.
5699 (emit_str): Likewise.
5700 (emit_ldaxr): Likewise.
5701 (emit_stxr): Likewise.
5702 (emit_stlr): Likewise.
5703 (emit_data_processing_reg): Likewise.
5704 (emit_data_processing): Likewise.
5705 (emit_add): Likewise.
5706 (emit_sub): Likewise.
5707 (emit_mov): Likewise.
5708 (emit_movk): Likewise.
5709 (emit_mov_addr): Likewise.
5710 (emit_mrs): Likewise.
5711 (emit_msr): Likewise.
5712 (emit_sevl): Likewise.
5713 (emit_wfe): Likewise.
5714 (append_insns): Likewise.
5715 (can_encode_int32_in): New helper function.
5716 (aarch64_relocate_instruction): New function.
5717 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5718 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5719 (struct linux_target_ops): Install aarch64_get_thread_area,
5720 aarch64_install_fast_tracepoint_jump_pad and
5721 aarch64_get_min_fast_tracepoint_insn_len.
5723 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5725 * Makefile.in (aarch64-insn.o): New rule.
5726 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5728 2015-09-21 Yao Qi <yao.qi@linaro.org>
5730 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5732 2015-09-21 Yao Qi <yao.qi@linaro.org>
5734 * tracepoint.c (max_jump_pad_size): Remove.
5736 2015-09-18 Yao Qi <yao.qi@linaro.org>
5738 * linux-aarch64-low.c: Don't include sys/uio.h.
5739 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5741 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5743 * tracepoint.c (eval_result_type): Change prototype.
5744 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5746 2015-09-15 Pedro Alves <palves@redhat.com>
5748 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5749 Check whether to report exec events instead of checking whether
5750 multiprocess is enabled.
5752 2015-09-15 Pedro Alves <palves@redhat.com>
5755 * remote-utils.c (prepare_resume_reply): Merge
5756 TARGET_WAITKIND_VFORK_DONE switch case with the
5757 TARGET_WAITKIND_FORKED case.
5759 2015-09-15 Yao Qi <yao.qi@linaro.org>
5761 * server.c (handle_query): Check string comparison using
5762 "else if" instead of "if".
5764 2015-09-15 Yao Qi <yao.qi@linaro.org>
5766 * server.c (vCont_supported): New global variable.
5767 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5768 matches. Append ";vContSupported+" to own_buf.
5769 (handle_v_requests): Append ";s;S" to own_buf if target supports
5770 hardware single step or vCont_supported is false.
5771 (capture_main): Set vCont_supported to zero.
5773 2015-09-15 Yao Qi <yao.qi@linaro.org>
5775 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5777 (linux_supports_hardware_single_step): ... New function.
5778 (linux_target_ops): Update.
5779 * lynx-low.c (lynx_target_ops): Set field
5780 supports_hardware_single_step to target_can_do_hardware_single_step.
5781 * nto-low.c (nto_target_ops): Likewise.
5782 * spu-low.c (spu_target_ops): Likewise.
5783 * win32-low.c (win32_target_ops): Likewise.
5784 * target.c (target_can_do_hardware_single_step): New function.
5785 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5786 Remove. <supports_hardware_single_step>: New field.
5787 (target_supports_conditional_breakpoints): Remove.
5788 (target_supports_hardware_single_step): New macro.
5789 (target_can_do_hardware_single_step): Declare.
5790 * server.c (handle_query): Use target_supports_hardware_single_step
5791 instead of target_supports_conditional_breakpoints.
5793 2015-09-15 Yao Qi <yao.qi@linaro.org>
5795 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5797 (struct linux_target_ops the_low_target): Install
5798 aarch64_linux_siginfo_fixup.
5800 2015-09-11 Don Breazeal <donb@codesourcery.com>
5801 Luis Machado <lgustavo@codesourcery.com>
5803 * linux-low.c (linux_mourn): Static declaration.
5804 (linux_arch_setup): Move in front of
5805 handle_extended_wait.
5806 (linux_arch_setup_thread): New function.
5807 (handle_extended_wait): Handle exec events. Call
5808 linux_arch_setup_thread. Make event_lwp argument a
5809 pointer-to-a-pointer.
5810 (check_zombie_leaders): Do not check stopped threads.
5811 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5812 (linux_low_filter_event): Add lwp and thread for exec'ing
5813 non-leader thread if leader thread has been deleted.
5814 Refactor code into linux_arch_setup_thread and call it.
5815 Pass child lwp pointer by reference to handle_extended_wait.
5816 (linux_wait_for_event_filtered): Update comment.
5817 (linux_wait_1): Prevent clobbering exec event status.
5818 (linux_supports_exec_events): New function.
5819 (linux_target_ops) <supports_exec_events>: Initialize new member.
5820 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5822 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5823 * server.c (report_exec_events): New global variable.
5824 (handle_query): Handle qSupported query for exec-events feature.
5825 (captured_main): Initialize report_exec_events.
5826 * server.h (report_exec_events): Declare new global variable.
5827 * target.h (struct target_ops) <supports_exec_events>: New
5829 (target_supports_exec_events): New macro.
5830 * win32-low.c (win32_target_ops) <supports_exec_events>:
5831 Initialize new member.
5833 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5835 * linux-low.c (linux_low_enable_btrace): Remove.
5836 (linux_target_ops): Replace linux_low_enable_btrace with
5837 linux_enable_btrace.
5839 2015-09-03 Yao Qi <yao.qi@linaro.org>
5841 * linux-aarch64-low.c (aarch64_insert_point): Call
5842 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5845 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5847 * linux-low.c (check_stopped_by_breakpoint): Use
5848 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5850 2015-08-27 Pedro Alves <palves@redhat.com>
5852 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5854 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5856 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5857 the XNEW-family equivalent.
5858 (compile_bytecodes): Likewise.
5859 * dll.c (loaded_dll): Likewise.
5860 * event-loop.c (append_callback_event): Likewise.
5861 (create_file_handler): Likewise.
5862 (create_file_event): Likewise.
5863 * hostio.c (handle_open): Likewise.
5864 * inferiors.c (add_thread): Likewise.
5865 (add_process): Likewise.
5866 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5867 * linux-arm-low.c (arm_new_process): Likewise.
5868 (arm_new_thread): Likewise.
5869 * linux-low.c (add_to_pid_list): Likewise.
5870 (linux_add_process): Likewise.
5871 (handle_extended_wait): Likewise.
5872 (add_lwp): Likewise.
5873 (enqueue_one_deferred_signal): Likewise.
5874 (enqueue_pending_signal): Likewise.
5875 (linux_resume_one_lwp_throw): Likewise.
5876 (linux_resume_one_thread): Likewise.
5877 (linux_read_memory): Likewise.
5878 (linux_write_memory): Likewise.
5879 * linux-mips-low.c (mips_linux_new_process): Likewise.
5880 (mips_linux_new_thread): Likewise.
5881 (mips_add_watchpoint): Likewise.
5882 * linux-x86-low.c (initialize_low_arch): Likewise.
5883 * lynx-low.c (lynx_add_process): Likewise.
5884 * mem-break.c (set_raw_breakpoint_at): Likewise.
5885 (set_breakpoint): Likewise.
5886 (add_condition_to_breakpoint): Likewise.
5887 (add_commands_to_breakpoint): Likewise.
5888 (clone_agent_expr): Likewise.
5889 (clone_one_breakpoint): Likewise.
5890 * regcache.c (new_register_cache): Likewise.
5891 * remote-utils.c (look_up_one_symbol): Likewise.
5892 * server.c (queue_stop_reply): Likewise.
5893 (start_inferior): Likewise.
5894 (queue_stop_reply_callback): Likewise.
5895 (handle_target_event): Likewise.
5896 * spu-low.c (fetch_ppc_memory): Likewise.
5897 (store_ppc_memory): Likewise.
5898 * target.c (set_target_ops): Likewise.
5899 * thread-db.c (thread_db_load_search): Likewise.
5900 (try_thread_db_load_1): Likewise.
5901 * tracepoint.c (add_tracepoint): Likewise.
5902 (add_tracepoint_action): Likewise.
5903 (create_trace_state_variable): Likewise.
5904 (cmd_qtdpsrc): Likewise.
5905 (cmd_qtro): Likewise.
5906 (add_while_stepping_state): Likewise.
5907 * win32-low.c (child_add_thread): Likewise.
5908 (get_image_name): Likewise.
5910 2015-08-25 Yao Qi <yao.qi@linaro.org>
5912 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5914 2015-08-25 Yao Qi <yao.qi@linaro.org>
5916 * Makefile.in (aarch64-linux.o): New rule.
5917 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5919 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5920 (aarch64_init_debug_reg_state): Make it extern.
5921 (aarch64_linux_prepare_to_resume): Remove.
5923 2015-08-25 Yao Qi <yao.qi@linaro.org>
5925 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5926 lwp_arch_private_info and ptid_of_lwp.
5928 2015-08-25 Yao Qi <yao.qi@linaro.org>
5930 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5931 Find proc_info by find_process_pid. All callers updated.
5933 2015-08-25 Yao Qi <yao.qi@linaro.org>
5935 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5937 (debug_reg_change_callback): Remove.
5938 (aarch64_notify_debug_reg_change): Remove.
5940 2015-08-25 Yao Qi <yao.qi@linaro.org>
5942 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5943 Call current_lwp_ptid.
5945 2015-08-25 Yao Qi <yao.qi@linaro.org>
5947 * linux-aarch64-low.c (debug_reg_change_callback): Use
5950 2015-08-25 Yao Qi <yao.qi@linaro.org>
5952 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5954 2015-08-25 Yao Qi <yao.qi@linaro.org>
5956 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5958 2015-08-25 Yao Qi <yao.qi@linaro.org>
5960 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5963 2015-08-25 Yao Qi <yao.qi@linaro.org>
5965 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5967 (debug_reg_change_callback): Remove argument entry and add argument
5968 lwp. Remove local variable thread. Don't print thread id in the
5969 debugging output. Don't check whether pid of thread equals to pid.
5970 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5971 iterate_over_lwps instead find_inferior.
5973 2015-08-24 Pedro Alves <palves@redhat.com>
5975 * inferiors.c (get_first_process): New function.
5976 * inferiors.h (get_first_process): New declaration.
5977 * remote-utils.c (read_ptid): Default to the first process in the
5978 list, instead of to the current thread's process.
5980 2015-08-24 Pedro Alves <palves@redhat.com>
5982 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5983 * event-loop.c: Likewise.
5984 * remote-utils.c: Likewise.
5985 * tracepoint.c: Likewise.
5987 2015-08-24 Pedro Alves <palves@redhat.com>
5989 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5992 2015-08-21 Pedro Alves <palves@redhat.com>
5994 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5995 instead of literal 1.
5997 2015-08-21 Pedro Alves <palves@redhat.com>
5999 * tdesc.c (default_description): Explicitly zero-initialize.
6001 2015-08-21 Pedro Alves <palves@redhat.com>
6004 * inferiors.c (remove_thread): Discard any pending stop reply for
6006 * server.c (remove_all_on_match_pid): Rename to ...
6007 (remove_all_on_match_ptid): ... this. Work with a filter ptid
6009 (discard_queued_stop_replies): Change parameter to a ptid. Now
6011 (handle_v_kill, kill_inferior_callback, captured_main)
6012 (process_serial_event): Adjust.
6013 * server.h (discard_queued_stop_replies): Declare.
6015 2015-08-21 Pedro Alves <palves@redhat.com>
6017 * linux-low.c (wait_for_sigstop): Always switch to no thread
6018 selected if the previously current thread dies.
6019 * lynx-low.c (lynx_request_interrupt): Use the first thread's
6020 process instead of the current thread's.
6021 * remote-utils.c (input_interrupt): Don't check if there's no
6023 * server.c (gdb_read_memory, gdb_write_memory): If setting the
6024 current thread to the general thread fails, error out.
6025 (handle_qxfer_auxv, handle_qxfer_libraries)
6026 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
6027 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
6028 (handle_query): Check if there's a thread selected instead of
6029 checking whether there's any thread in the thread list.
6030 (handle_qxfer_threads, handle_qxfer_btrace)
6031 (handle_qxfer_btrace_conf): Don't error out early if there's no
6032 thread in the thread list.
6033 (handle_v_cont, myresume): Don't set the current thread to the
6035 (process_serial_event) <Hg handling>: Also set thread_id if the
6036 previous general thread is still alive.
6037 (process_serial_event) <g/G handling>: If setting the current
6038 thread to the general thread fails, error out.
6039 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
6040 thread's lwp instead of the current thread's.
6041 * target.c (set_desired_thread): If the desired thread was not
6042 found, leave the current thread pointing to NULL. Return an int
6043 (boolean) indicating success.
6044 * target.h (set_desired_thread): Change return type to int.
6046 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
6048 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
6049 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
6051 (ps_get_thread_area): New function.
6053 2015-08-19 Gary Benson <gbenson@redhat.com>
6055 * hostio.c (handle_pread): Do not attempt to read more data
6056 than hostio_reply_with_data can fit in a packet.
6058 2015-08-18 Joel Brobecker <brobecker@adacore.com>
6060 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
6062 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
6064 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
6066 2015-08-06 Pedro Alves <palves@redhat.com>
6068 * tracepoint.c (expr_eval_result): Now an int.
6070 2015-08-06 Pedro Alves <palves@redhat.com>
6072 * gdbthread.h (struct regcache): Forward declare.
6073 (struct thread_info) <regcache_data>: Now a struct regcache
6075 * inferiors.c (inferior_regcache_data)
6076 (set_inferior_regcache_data): Now work with struct regcache
6078 * inferiors.h (struct regcache): Forward declare.
6079 (inferior_regcache_data, set_inferior_regcache_data): Now work
6080 with struct regcache pointers.
6081 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
6082 (free_register_cache_thread): Remove struct regcache pointer
6085 2015-08-06 Pedro Alves <palves@redhat.com>
6087 * server.c (captured_main): On error, print the exception message
6088 to stderr, and if run_once is set, throw a quit.
6090 2015-08-06 Pedro Alves <palves@redhat.com>
6092 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
6095 2015-08-06 Pedro Alves <palves@redhat.com>
6097 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
6098 reading beyond the passed in buffer length.
6100 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
6102 * tracepoint.c (symbol_list) <required>: Remove.
6104 2015-08-06 Pedro Alves <palves@redhat.com>
6106 * linux-low.c (handle_extended_wait): Set the fork child's suspend
6107 count if stopping and suspending threads.
6108 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
6109 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
6110 (linux_detach): Complete an ongoing step-over.
6111 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
6113 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
6114 (linux_wait_1): If passing a signal to the inferior after
6115 finishing a step-over, unsuspend and re-resume all lwps. If we
6116 see a single-step event but the thread should be continuing, don't
6117 pass the trap to gdb.
6118 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
6119 internal_error instead of gdb_assert.
6120 (enqueue_pending_signal): New function.
6121 (check_ptrace_stopped_lwp_gone): Add debug output.
6122 (start_step_over): Use internal_error instead of gdb_assert.
6123 (complete_ongoing_step_over): New function.
6124 (linux_resume_one_thread): Don't resume a suspended thread.
6125 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
6128 2015-08-06 Pedro Alves <palves@redhat.com>
6130 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
6131 (linux_thread_alive): Use lwp_is_marked_dead.
6132 (extended_event_reported): Delete.
6133 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
6134 instead of extended_event_reported.
6135 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
6137 (lwp_is_marked_dead): New function.
6138 (lwp_running): Use lwp_is_marked_dead.
6139 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
6142 2015-08-06 Pedro Alves <palves@redhat.com>
6144 * linux-low.c (linux_wait_1): Move fork event output out of the
6145 !report_to_gdb check. Pass event_child->waitstatus to
6146 target_waitstatus_to_string instead of ourstatus.
6148 2015-08-04 Yao Qi <yao.qi@linaro.org>
6150 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
6151 if current_thread is 32 bit.
6153 2015-08-04 Yao Qi <yao.qi@linaro.org>
6155 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6156 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6157 * server.c (extended_protocol): Remove "static".
6158 * server.h (extended_protocol): Declare it.
6160 2015-08-04 Yao Qi <yao.qi@linaro.org>
6162 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
6163 both aarch64 and aarch32.
6164 (aarch64_set_pc): Likewise.
6166 2015-08-04 Yao Qi <yao.qi@linaro.org>
6168 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
6169 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
6170 arm-with-neon.xml to srv_xmlfiles.
6171 * linux-aarch64-low.c: Include linux-aarch32-low.h.
6172 (is_64bit_tdesc): New function.
6173 (aarch64_linux_read_description): New function.
6174 (aarch64_arch_setup): Call aarch64_linux_read_description.
6175 (regs_info): Rename to regs_info_aarch64.
6176 (aarch64_regs_info): Return right regs_info.
6177 (initialize_low_arch): Call initialize_low_arch_aarch32.
6179 2015-08-04 Yao Qi <yao.qi@linaro.org>
6181 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
6182 * linux-aarch32-low.c: New file.
6183 * linux-aarch32-low.h: New file.
6184 * linux-arm-low.c (arm_fill_gregset): Move it to
6185 linux-aarch32-low.c.
6186 (arm_store_gregset): Likewise.
6187 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
6188 (arm_store_vfpregset): Call arm_store_vfpregset_num.
6189 (arm_arch_setup): Check if PTRACE_GETREGSET works.
6190 (regs_info): Rename to regs_info_arm.
6191 (arm_regs_info): Return regs_info_aarch32 if
6192 have_ptrace_getregset is 1 and target description is
6193 arm_with_neon or arm_with_vfpv3.
6194 (initialize_low_arch): Don't call init_registers_arm_with_neon.
6195 Call initialize_low_arch_aarch32 instead.
6197 2015-08-04 Yao Qi <yao.qi@linaro.org>
6199 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
6200 * linux-low.c: ... here.
6201 * linux-low.h (have_ptrace_getregset): Declare it.
6203 2015-08-04 Pedro Alves <palves@redhat.com>
6205 * thread-db.c (struct thread_db): Use new typedefs.
6206 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
6208 (disable_thread_event_reporting): Cast result of dlsym to
6209 destination function pointer type.
6210 (thread_db_mourn): Use td_ta_delete_ftype.
6212 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
6214 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
6216 (CDX_BREAKPOINT): Define for R2.
6217 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
6218 (the_low_target): Add comments.
6220 2015-07-30 Yao Qi <yao.qi@linaro.org>
6222 * linux-arm-low.c (arm_hwcap): Remove it.
6223 (arm_read_description): New local variable arm_hwcap. Don't
6224 set arm_hwcap to zero.
6226 2015-07-30 Yao Qi <yao.qi@linaro.org>
6228 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
6229 Use regcache->tdesc instead.
6230 (arm_store_wmmxregset): Likewise.
6231 (arm_fill_vfpregset): Likewise.
6232 (arm_store_vfpregset): Likewise.
6234 2015-07-30 Yao Qi <yao.qi@linaro.org>
6236 * linux-arm-low.c: Include arch/arm.h.
6237 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
6238 (arm_store_gregset): Likewise.
6240 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
6242 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
6243 ptrace's 4th parameter.
6245 2015-07-27 Yao Qi <yao.qi@linaro.org>
6247 * configure.srv (case aarch64*-*-linux*): Don't set
6250 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
6252 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
6254 * linux-arm-low.c: Likewise.
6255 * linux-cris-low.c: Likewise.
6256 * linux-crisv32-low.c: Likewise.
6257 * linux-low.c: Likewise.
6258 * linux-m68k-low.c: Likewise.
6259 * linux-mips-low.c: Likewise.
6260 * linux-nios2-low.c: Likewise.
6261 * linux-s390-low.c: Likewise.
6262 * linux-sparc-low.c: Likewise.
6263 * linux-tic6x-low.c: Likewise.
6264 * linux-tile-low.c: Likewise.
6265 * linux-x86-low.c: Likewise.
6267 2015-07-24 Pedro Alves <palves@redhat.com>
6269 * config.in: Regenerate.
6270 * configure: Regenerate.
6272 2015-07-24 Pedro Alves <palves@redhat.com>
6274 * acinclude.m4: Include ../ptrace.m4.
6275 * configure.ac: Call GDB_AC_PTRACE.
6276 * config.in, configure: Regenerate.
6278 2015-07-24 Yao Qi <yao.qi@linaro.org>
6280 * linux-low.c (linux_create_inferior): Remove setting to
6281 proc->priv->new_inferior.
6282 (linux_attach): Likewise.
6283 (linux_low_filter_event): Likewise.
6284 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
6286 2015-07-24 Yao Qi <yao.qi@linaro.org>
6288 * linux-low.c (linux_arch_setup): New function.
6289 (linux_low_filter_event): If proc->tdesc is NULL and
6290 proc->attached is true, call the_low_target.arch_setup.
6291 Otherwise, keep status pending, and return.
6292 (linux_resume_one_lwp_throw): Don't call get_pc if
6293 thread->while_stepping isn't NULL. Don't call
6294 get_thread_regcache if proc->tdesc is NULL.
6295 (need_step_over_p): Return 0 if proc->tdesc is NULL.
6296 (linux_target_ops): Install arch_setup.
6297 * server.c (start_inferior): Call the_target->arch_setup.
6298 * target.h (struct target_ops) <arch_setup>: New field.
6299 (target_arch_setup): New marco.
6300 * lynx-low.c (lynx_target_ops): Update.
6301 * nto-low.c (nto_target_ops): Update.
6302 * spu-low.c (spu_target_ops): Update.
6303 * win32-low.c (win32_target_ops): Update.
6305 2015-07-24 Yao Qi <yao.qi@linaro.org>
6307 * linux-low.c (linux_add_process): Don't set
6308 proc->priv->new_inferior.
6309 (linux_create_inferior): Set proc->priv->new_inferior to 1.
6310 (linux_attach): Likewise.
6312 2015-07-24 Yao Qi <yao.qi@linaro.org>
6314 * server.c (start_inferior): Code refactor.
6316 2015-07-24 Yao Qi <yao.qi@linaro.org>
6318 * server.c (process_serial_event): Set general_thread.
6320 2015-07-21 Yao Qi <yao.qi@linaro.org>
6322 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
6323 aarch64_linux_get_debug_reg_capacity.
6325 2015-07-17 Yao Qi <yao.qi@linaro.org>
6327 * Makefile.in (aarch64-linux-hw-point.o): New rule.
6328 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
6329 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
6330 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
6331 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
6332 (AARCH64_HWP_ALIGNMENT): Likewise.
6333 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
6334 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
6335 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
6336 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
6337 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
6338 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
6339 (struct aarch64_debug_reg_state): Likewise.
6340 (struct arch_lwp_info): Likewise.
6341 (aarch64_align_watchpoint): Likewise.
6342 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
6343 (aarch64_watchpoint_length): Likewise.
6344 (aarch64_point_encode_ctrl_reg): Likewise
6345 (aarch64_point_is_aligned): Likewise.
6346 (aarch64_align_watchpoint): Likewise.
6347 (aarch64_linux_set_debug_regs):
6348 (aarch64_dr_state_insert_one_point): Likewise.
6349 (aarch64_dr_state_remove_one_point): Likewise.
6350 (aarch64_handle_breakpoint): Likewise.
6351 (aarch64_handle_aligned_watchpoint): Likewise.
6352 (aarch64_handle_unaligned_watchpoint): Likewise.
6353 (aarch64_handle_watchpoint): Likewise.
6355 2015-07-17 Yao Qi <yao.qi@linaro.org>
6357 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6358 and don't aarch64_get_debug_reg_state. All callers update.
6359 (aarch64_handle_aligned_watchpoint): Likewise.
6360 (aarch64_handle_unaligned_watchpoint): Likewise.
6361 (aarch64_handle_watchpoint): Likewise.
6362 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6363 (aarch64_remove_point): Likewise.
6365 2015-07-17 Yao Qi <yao.qi@linaro.org>
6367 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6369 (aarch64_handle_unaligned_watchpoint): Likewise.
6371 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6373 Revert the previous 3 commits:
6374 Move gdb_regex* to common/
6375 Move linux_find_memory_regions_full & co.
6376 gdbserver build-id attribute generator
6378 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6379 Jan Kratochvil <jan.kratochvil@redhat.com>
6381 gdbserver build-id attribute generator.
6382 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6383 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6384 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6386 (get_dynamic): Use find_pdhr to traverse program headers.
6387 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6388 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6389 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6390 (get_hex_build_id): New.
6391 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6392 to reply XML document.
6394 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6395 Jan Kratochvil <jan.kratochvil@redhat.com>
6397 * target.c: Include target/target-utils.h and fcntl.h.
6398 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6399 (target_fileio_read_stralloc): New functions.
6401 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6403 * Makefile.in (OBS): Add gdb_regex.o.
6405 * config.in: Rebuilt.
6406 * configure: Rebuilt.
6408 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6409 Jan Kratochvil <jan.kratochvil@redhat.com>
6411 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6412 * Makefile.in (OBS): Add target-utils.o.
6413 (linux-maps.o, target-utils.o): New.
6414 * configure.srv (srv_linux_obj): Add linux-maps.o.
6416 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6418 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6420 (the_low_target): Install it.
6422 2015-07-14 Pedro Alves <palves@redhat.com>
6424 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6425 Instead, ignore ECHILD, and throw an error for other errnos.
6427 2015-07-10 Pedro Alves <palves@redhat.com>
6429 * event-loop.c (struct callback_event) <data>: Change type to
6430 gdb_client_data instance instead of gdb_client_data pointer.
6431 (append_callback_event): Adjust.
6433 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6435 * linux-aarch64-low.c: Add comments for each linux_target_ops
6436 method. Remove comments already covered in target_ops and
6437 linux_target_ops definitions.
6438 (the_low_target): Add comments for each unimplemented method.
6440 2015-07-09 Yao Qi <yao.qi@linaro.org>
6442 * linux-aarch64-low.c (aarch64_regmap): Remove.
6443 (aarch64_usrregs_info): Remove.
6444 (regs_info): Set field usrregs to NULL.
6446 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6448 * linux-low.c: Include "rsp-low.h"
6449 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6450 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6451 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6452 (handle_btrace_enable_pt): New.
6453 (handle_btrace_general_set): Support "pt".
6454 (handle_btrace_conf_general_set): Support "pt:size".
6456 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6458 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6461 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6463 * linux-aarch64-low.c: Remove comment about endianness.
6464 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6465 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6468 2015-06-24 Gary Benson <gbenson@redhat.com>
6470 * linux-i386-ipa.c (stdint.h): Do not include.
6471 * lynx-i386-low.c (stdint.h): Likewise.
6472 * lynx-ppc-low.c (stdint.h): Likewise.
6473 * mem-break.c (stdint.h): Likewise.
6474 * thread-db.c (stdint.h): Likewise.
6475 * tracepoint.c (stdint.h): Likewise.
6476 * win32-low.c (stdint.h): Likewise.
6478 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6480 * server.c (write_qxfer_response): Update call to
6481 remote_escape_output.
6483 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6484 Jan Kratochvil <jan.kratochvil@redhat.com>
6486 Merge multiple hex conversions.
6487 * gdbreplay.c (tohex): Rename to 'fromhex'.
6488 (logchar): Use fromhex.
6490 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6492 * server.c (handle_qxfer_libraries): Set `version' attribute for
6495 2015-06-10 Gary Benson <gbenson@redhat.com>
6497 * target.h (struct target_ops) <multifs_open>: New field.
6498 <multifs_unlink>: Likewise.
6499 <multifs_readlink>: Likewise.
6500 * linux-low.c (nat/linux-namespaces.h): New include.
6501 (linux_target_ops): Initialize the_target->multifs_open,
6502 the_target->multifs_unlink and the_target->multifs_readlink.
6503 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6504 * hostio.c (hostio_fs_pid): New static variable.
6505 (hostio_handle_new_gdb_connection): New function.
6506 (handle_setfs): Likewise.
6507 (handle_open): Use the_target->multifs_open as appropriate.
6508 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6509 (handle_readlink): Use the_target->multifs_readlink as
6511 (handle_vFile): Handle vFile:setfs packets.
6512 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6513 after target_handle_new_gdb_connection.
6515 2015-06-10 Gary Benson <gbenson@redhat.com>
6517 * configure.ac (AC_CHECK_FUNCS): Add setns.
6518 * config.in: Regenerate.
6519 * configure: Likewise.
6520 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6521 (linux-namespaces.o): New rule.
6522 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6524 2015-06-09 Gary Benson <gbenson@redhat.com>
6526 * hostio.c (handle_open): Process mode argument with
6527 fileio_to_host_mode.
6529 2015-06-01 Yao Qi <yao.qi@linaro.org>
6531 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6532 * linux-x86-low.c: Likewise.
6534 2015-05-28 Don Breazeal <donb@codesourcery.com>
6536 * linux-low.c (handle_extended_wait): Initialize
6537 thread_info.last_resume_kind for new fork children.
6539 2015-05-15 Pedro Alves <palves@redhat.com>
6541 * target.h (target_handle_new_gdb_connection): Rewrite using if
6542 wrapped in do/while.
6544 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6546 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6547 * configure, config.in: Regenerate.
6548 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6551 2015-05-12 Don Breazeal <donb@codesourcery.com>
6553 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6554 PTRACE_EVENT_VFORK_DONE.
6555 (linux_low_ptrace_options, extended_event_reported): Add vfork
6557 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6558 and "vforkdone" for RSP 'T' Stop Reply Packet.
6559 * server.h (report_vfork_events): Declare
6562 2015-05-12 Don Breazeal <donb@codesourcery.com>
6564 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6565 (the_low_target) <new_fork>: Initialize new member.
6566 * linux-arm-low.c (arm_new_fork): New function.
6567 (the_low_target) <new_fork>: Initialize new member.
6568 * linux-low.c (handle_extended_wait): Call new target function
6570 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6571 * linux-mips-low.c (mips_add_watchpoint): New function
6572 extracted from mips_insert_point.
6573 (the_low_target) <new_fork>: Initialize new member.
6574 (mips_linux_new_fork): New function.
6575 (mips_insert_point): Call mips_add_watchpoint.
6576 * linux-x86-low.c (x86_linux_new_fork): New function.
6577 (the_low_target) <new_fork>: Initialize new member.
6579 2015-05-12 Don Breazeal <donb@codesourcery.com>
6581 * linux-low.c (handle_extended_wait): Implement return value,
6582 rename argument 'event_child' to 'event_lwp', handle
6583 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6584 (linux_low_ptrace_options): New function.
6585 (linux_low_filter_event): Call linux_low_ptrace_options,
6586 use different argument fo linux_enable_event_reporting,
6587 use return value from handle_extended_wait.
6588 (extended_event_reported): New function.
6589 (linux_wait_1): Call extended_event_reported and set
6590 status to report fork events.
6591 (linux_write_memory): Add pid to debug message.
6592 (reset_lwp_ptrace_options_callback): New function.
6593 (linux_handle_new_gdb_connection): New function.
6594 (linux_target_ops): Initialize new structure member.
6595 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6596 * lynx-low.c: Initialize new structure member.
6597 * remote-utils.c (prepare_resume_reply): Implement stop reason
6598 "fork" for "T" stop message.
6599 * server.c (handle_query): Call handle_new_gdb_connection.
6600 * server.h (report_fork_events): Declare global flag.
6601 * target.h (struct target_ops) <handle_new_gdb_connection>:
6603 (target_handle_new_gdb_connection): New macro.
6604 * win32-low.c: Initialize new structure member.
6606 2015-05-12 Don Breazeal <donb@codesourcery.com>
6608 * mem-break.c (APPEND_TO_LIST): Define macro.
6609 (clone_agent_expr): New function.
6610 (clone_one_breakpoint): New function.
6611 (clone_all_breakpoints): New function.
6612 * mem-break.h: Declare new functions.
6614 2015-05-12 Don Breazeal <donb@codesourcery.com>
6616 * linux-low.c (linux_supports_fork_events): New function.
6617 (linux_supports_vfork_events): New function.
6618 (linux_target_ops): Initialize new structure members.
6619 (initialize_low): Call linux_check_ptrace_features.
6620 * lynx-low.c (lynx_target_ops): Initialize new structure
6622 * server.c (report_fork_events, report_vfork_events):
6624 (handle_query): Add new features to qSupported packet and
6626 (captured_main): Initialize new global variables.
6627 * target.h (struct target_ops) <supports_fork_events>:
6629 <supports_vfork_events>: New member.
6630 (target_supports_fork_events): New macro.
6631 (target_supports_vfork_events): New macro.
6632 * win32-low.c (win32_target_ops): Initialize new structure
6635 2015-05-12 Gary Benson <gbenson@redhat.com>
6637 * server.c (handle_qxfer_exec_file): Use current process
6640 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6642 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6643 Remove HAVE_PTRACE_GETREGS conditionals.
6644 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6645 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6647 2015-05-08 Yao Qi <yao.qi@linaro.org>
6649 * linux-low.c (linux_supports_conditional_breakpoints): New
6651 (linux_target_ops): Install new target method.
6652 * lynx-low.c (lynx_target_ops): Install NULL hook for
6653 supports_conditional_breakpoints.
6654 * nto-low.c (nto_target_ops): Likewise.
6655 * spu-low.c (spu_target_ops): Likewise.
6656 * win32-low.c (win32_target_ops): Likewise.
6657 * server.c (handle_query): Check
6658 target_supports_conditional_breakpoints.
6659 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6661 (target_supports_conditional_breakpoints): New macro.
6663 2015-05-06 Pedro Alves <palves@redhat.com>
6666 * server.c (start_inferior): If the process exits, mourn it.
6668 2015-04-21 Gary Benson <gbenson@redhat.com>
6670 * hostio.c (fileio_open_flags_to_host): Factored out to
6671 fileio_to_host_openflags in common/fileio.c. Single use
6674 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6676 * linux-xtensa-low.c (xtensa_fill_gregset)
6677 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6680 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6682 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6683 (regs_info): Replace usrregs pointer with NULL.
6685 2015-04-17 Gary Benson <gbenson@redhat.com>
6687 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6688 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6689 * server.c (handle_qxfer_exec_file): New function.
6690 (qxfer_packets): Add exec-file entry.
6691 (handle_query): Report qXfer:exec-file:read as supported packet.
6693 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6695 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6697 2015-04-09 Gary Benson <gbenson@redhat.com>
6699 * hostio-errno.c (errno_to_fileio_error): Remove function.
6700 Update caller to use remote_fileio_to_fio_error.
6702 2015-04-09 Yao Qi <yao.qi@linaro.org>
6704 * linux-low.c (linux_insert_point): Call
6705 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6706 (linux_remove_point): Call remove_memory_breakpoint if type is
6708 * linux-x86-low.c (x86_insert_point): Don't call
6709 insert_memory_breakpoint.
6710 (x86_remove_point): Don't call remove_memory_breakpoint.
6712 2015-04-01 Pedro Alves <palves@redhat.com>
6713 Cleber Rosa <crosa@redhat.com>
6715 * server.c (gdbserver_usage): Reorganize and extend the usage
6718 2015-03-24 Pedro Alves <palves@redhat.com>
6720 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6721 output. Also dump TRAP_TRACE.
6722 (linux_low_filter_event): In debug output, distinguish a
6723 resume_stop SIGSTOP from a delayed SIGSTOP.
6725 2015-03-24 Gary Benson <gbenson@redhat.com>
6727 * linux-x86-low.c (x86_linux_new_thread): Moved to
6729 (x86_linux_prepare_to_resume): Likewise.
6731 2015-03-24 Gary Benson <gbenson@redhat.com>
6733 * Makefile.in (x86-linux-dregs.o): New rule.
6734 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6735 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6736 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6737 (x86_linux_dr_get): Likewise.
6738 (x86_linux_dr_set): Likewise.
6739 (update_debug_registers_callback): Likewise.
6740 (x86_linux_dr_set_addr): Likewise.
6741 (x86_linux_dr_get_addr): Likewise.
6742 (x86_linux_dr_set_control): Likewise.
6743 (x86_linux_dr_get_control): Likewise.
6744 (x86_linux_dr_get_status): Likewise.
6745 (x86_linux_update_debug_registers): Likewise.
6747 2015-03-24 Gary Benson <gbenson@redhat.com>
6749 * linux-x86-low.c (x86_linux_update_debug_registers):
6750 New function, factored out from...
6751 (x86_linux_prepare_to_resume): ...this.
6753 2015-03-24 Gary Benson <gbenson@redhat.com>
6755 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6756 (x86_linux_dr_set): Likewise.
6757 (update_debug_registers_callback): Likewise.
6758 (x86_linux_dr_set_addr): Likewise.
6759 (x86_linux_dr_get_addr): Likewise.
6760 (x86_linux_dr_set_control): Likewise.
6761 (x86_linux_dr_get_control): Likewise.
6762 (x86_linux_dr_get_status): Likewise.
6763 (x86_linux_prepare_to_resume): Likewise.
6765 2015-03-24 Gary Benson <gbenson@redhat.com>
6767 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6768 Use perror_with_name. Pass string through gettext.
6769 (x86_linux_dr_set): Likewise.
6771 2015-03-24 Gary Benson <gbenson@redhat.com>
6773 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6774 (x86_linux_dr_set_addr): ...this.
6775 (x86_dr_low_get_addr): Rename to...
6776 (x86_linux_dr_get_addr): ...this.
6777 (x86_dr_low_set_control): Rename to...
6778 (x86_linux_dr_set_control): ...this.
6779 (x86_dr_low_get_control): Rename to...
6780 (x86_linux_dr_get_control): ...this.
6781 (x86_dr_low_get_status): Rename to...
6782 (x86_linux_dr_get_status): ...this.
6783 (x86_dr_low): Update with new function names.
6785 2015-03-24 Gary Benson <gbenson@redhat.com>
6787 * Makefile.in (x86-linux.o): New rule.
6788 * configure.srv: Add x86-linux.o to relevant targets.
6789 * linux-low.c (lwp_set_arch_private_info): New function.
6790 (lwp_arch_private_info): Likewise.
6791 * linux-x86-low.c: Include nat/x86-linux.h.
6792 (arch_lwp_info): Removed structure.
6793 (update_debug_registers_callback):
6794 Use lwp_set_debug_registers_changed.
6795 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6796 and lwp_set_debug_registers_changed.
6797 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6799 2015-03-24 Gary Benson <gbenson@redhat.com>
6801 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6802 * linux-arm-low.c (arm_new_thread): Likewise.
6803 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6804 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6805 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6806 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6808 2015-03-24 Gary Benson <gbenson@redhat.com>
6810 * linux-low.c (ptid_of_lwp): New function.
6811 (lwp_is_stopped): Likewise.
6812 (lwp_stop_reason): Likewise.
6813 * linux-x86-low.c (update_debug_registers_callback):
6815 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6818 2015-03-24 Gary Benson <gbenson@redhat.com>
6820 * linux-low.h (linux_stop_lwp): Remove declaration.
6822 2015-03-24 Gary Benson <gbenson@redhat.com>
6824 * linux-low.h: Include nat/linux-nat.h.
6825 * linux-low.c (iterate_over_lwps_args): New structure.
6826 (iterate_over_lwps_filter): New function.
6827 (iterate_over_lwps): Likewise.
6828 * linux-x86-low.c (update_debug_registers_callback):
6829 Update signature to what iterate_over_lwps expects.
6830 Remove PID check that iterate_over_lwps now performs.
6831 (x86_dr_low_set_addr): Use iterate_over_lwps.
6832 (x86_dr_low_set_control): Likewise.
6834 2015-03-24 Gary Benson <gbenson@redhat.com>
6836 * linux-x86-low.c (x86_debug_reg_state): New function.
6837 (x86_linux_prepare_to_resume): Use the above.
6839 2015-03-24 Gary Benson <gbenson@redhat.com>
6841 * linux-low.c (current_lwp_ptid): New function.
6842 * linux-x86-low.c: Include nat/linux-nat.h.
6843 (x86_dr_low_get_addr): Use current_lwp_ptid.
6844 (x86_dr_low_get_control): Likewise.
6845 (x86_dr_low_get_status): Likewise.
6847 2015-03-20 Pedro Alves <palves@redhat.com>
6849 * tracepoint.c (cmd_qtstatus): Make "str" const.
6851 2015-03-20 Pedro Alves <palves@redhat.com>
6853 * server.c (handle_general_set): Make "req_str" const.
6855 2015-03-19 Pedro Alves <palves@redhat.com>
6857 * linux-low.c (linux_resume_one_lwp): Rename to ...
6858 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6859 instead call perror_with_name.
6860 (check_ptrace_stopped_lwp_gone): New function.
6861 (linux_resume_one_lwp): Reimplement as wrapper around
6862 linux_resume_one_lwp_throw that swallows errors if the LWP is
6865 2015-03-19 Pedro Alves <palves@redhat.com>
6867 * linux-low.c (count_events_callback, select_event_lwp_callback):
6868 No longer check whether the thread has resume_stop as last resume
6871 2015-03-19 Pedro Alves <palves@redhat.com>
6873 * linux-low.c (count_events_callback, select_event_lwp_callback):
6874 Use the lwp's status_pending_p field, not the thread's.
6876 2015-03-19 Pedro Alves <palves@redhat.com>
6878 * linux-low.c (select_event_lwp_callback): Update comments to
6879 no longer mention SIGTRAP.
6881 2015-03-18 Gary Benson <gbenson@redhat.com>
6883 * server.c (handle_query): Do not report vFile:fstat as supported.
6885 2015-03-11 Gary Benson <gbenson@redhat.com>
6887 * hostio.c (sys/types.h): New include.
6888 (sys/stat.h): Likewise.
6889 (common-remote-fileio.h): Likewise.
6890 (handle_fstat): New function.
6891 (handle_vFile): Handle vFile:fstat packets.
6893 2015-03-11 Gary Benson <gbenson@redhat.com>
6895 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6896 struct stat.st_blocks and struct stat.st_blksize.
6897 * configure: Regenerate.
6898 * config.in: Likewise.
6899 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6900 (OBS): Add common-remote-fileio.o.
6901 (common-remote-fileio.o): New rule.
6903 2015-03-09 Pedro Alves <palves@redhat.com>
6905 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6906 'struct sockaddr' pointer in 'accept' call.
6908 2015-03-09 Pedro Alves <palves@redhat.com>
6911 2015-03-07 Pedro Alves <palves@redhat.com>
6912 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6913 or <winsock2.h> here. Instead include "gdb_socket.h".
6914 (remote_open): Use union gdb_sockaddr_u.
6915 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6916 or <winsock2.h> here. Instead include "gdb_socket.h".
6917 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6918 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6920 (init_named_socket, gdb_agent_helper_thread): Use union
6923 2015-03-07 Pedro Alves <palves@redhat.com>
6925 * configure.ac (build_warnings): Move
6926 -Wdeclaration-after-statement to the C-specific set.
6927 * configure: Regenerate.
6929 2015-03-07 Pedro Alves <palves@redhat.com>
6931 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6932 or <winsock2.h> here. Instead include "gdb_socket.h".
6933 (remote_open): Use union gdb_sockaddr_u.
6934 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6935 or <winsock2.h> here. Instead include "gdb_socket.h".
6936 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6937 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6939 (init_named_socket, gdb_agent_helper_thread): Use union
6942 2015-03-07 Pedro Alves <palves@redhat.com>
6944 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6947 2015-03-06 Yao Qi <yao.qi@linaro.org>
6949 * linux-aarch64-low.c (aarch64_insert_point): Use
6950 show_debug_regs as a boolean.
6951 (aarch64_remove_point): Likewise.
6953 2015-03-05 Pedro Alves <palves@redhat.com>
6955 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6956 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6957 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6958 * nto-low.c (nto_target_ops): Likewise.
6959 * spu-low.c (spu_target_ops): Likewise.
6960 * win32-low.c (win32_target_ops): Likewise.
6962 2015-03-04 Pedro Alves <palves@redhat.com>
6964 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6965 Decide whether a breakpoint triggered based on the SIGTRAP's
6967 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6968 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6969 (linux_low_filter_event): Check for breakpoints before checking
6971 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6973 (linux_stopped_by_sw_breakpoint)
6974 (linux_supports_stopped_by_sw_breakpoint)
6975 (linux_stopped_by_hw_breakpoint)
6976 (linux_supports_stopped_by_hw_breakpoint): New functions.
6977 (linux_target_ops): Install new target methods.
6979 2015-03-04 Pedro Alves <palves@redhat.com>
6981 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6982 * server.c (swbreak_feature, hwbreak_feature): New globals.
6983 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6984 (captured_main): Clear swbreak_feature and hwbreak_feature.
6985 * server.h (swbreak_feature, hwbreak_feature): Declare.
6986 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6987 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6988 supports_stopped_by_hw_breakpoint>: New fields.
6989 (target_supports_stopped_by_sw_breakpoint)
6990 (target_stopped_by_sw_breakpoint)
6991 (target_supports_stopped_by_hw_breakpoint)
6992 (target_stopped_by_hw_breakpoint): Declare.
6994 2015-03-04 Pedro Alves <palves@redhat.com>
6996 enum lwp_stop_reason -> enum target_stop_reason
6997 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6998 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6999 (linux_wait_1, stuck_in_jump_pad_callback)
7000 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
7001 (linux_stopped_by_watchpoint):
7002 * linux-low.h (enum lwp_stop_reason): Delete.
7003 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
7004 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7006 2015-03-04 Yao Qi <yao.qi@linaro.org>
7008 * Makefile.in (SFILES): Add linux-aarch64-low.c.
7010 2015-03-03 Gary Benson <gbenson@redhat.com>
7012 * hostio.c (handle_vFile): Fix prefix lengths.
7014 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
7016 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
7019 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
7021 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
7022 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
7023 (clean): Add "rm -f" for above C files.
7024 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
7025 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
7026 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
7027 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
7028 * linux-s390-low.c (HWCAP_S390_VX): New macro.
7029 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
7030 (init_registers_s390x_vx_linux64)
7031 (init_registers_s390x_tevx_linux64)
7032 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
7033 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
7035 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
7036 (s390_store_vxrs_high): New functions.
7037 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
7039 (s390_arch_setup): Add logic for selecting one of the new target
7040 descriptions. Activate the new vector regsets if applicable.
7041 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
7042 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
7043 and init_registers_s390x_tevx_linux64.
7045 2015-03-01 Pedro Alves <palves@redhat.com>
7047 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
7050 2015-02-27 Pedro Alves <palves@redhat.com>
7052 * linux-x86-low.c (u_debugreg_offset): New function.
7053 (x86_linux_dr_get, x86_linux_dr_set): Use it.
7055 2015-02-27 Pedro Alves <palves@redhat.com>
7057 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
7058 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
7059 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
7060 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
7061 (ps_lsetfpregs, ps_getpid)
7062 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
7063 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
7064 (ps_lsetxregs, ps_plog): Declare.
7066 2015-02-27 Pedro Alves <palves@redhat.com>
7068 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
7069 IP_AGENT_EXPORT_FUNC.
7070 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
7071 IP_AGENT_EXPORT_FUNC.
7072 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
7073 (IP_AGENT_EXPORT): Delete.
7074 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7075 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7076 (gdb_trampoline_buffer_error, collecting, gdb_collect)
7077 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
7078 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
7079 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
7080 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
7081 (traceframe_read_count, traceframe_write_count)
7082 (traceframes_created, trace_state_variables, get_raw_reg)
7083 (get_trace_state_variable_value, set_trace_state_variable_value)
7084 (ust_loaded, helper_thread_id, cmd_buf): Use
7085 IPA_SYM_EXPORTED_NAME.
7086 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
7087 (tracepoints) Use IP_AGENT_EXPORT_VAR.
7088 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
7089 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7090 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
7091 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
7092 EXTERN_C_PUSH/EXTERN_C_POP.
7093 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
7094 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
7095 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7096 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
7097 (traceframe_write_count, traceframe_read_count)
7098 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
7099 (about_to_request_buffer_space, get_trace_state_variable_value)
7100 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
7101 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
7102 EXTERN_C_PUSH/EXTERN_C_POP.
7103 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
7104 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
7105 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
7106 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
7107 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7108 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
7109 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
7110 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
7112 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
7113 (IP_AGENT_EXPORT_VAR_DECL): Define.
7115 (gdb_agent_get_raw_reg): Declare.
7117 2015-02-27 Tom Tromey <tromey@redhat.com>
7118 Pedro Alves <palves@redhat.com>
7120 Rename symbols whose names are reserved C++ keywords throughout.
7122 2015-02-27 Pedro Alves <palves@redhat.com>
7124 * Makefile.in (COMPILER): New, get it from autoconf.
7125 (CXX): Get from autoconf instead.
7126 (COMPILE.pre): Use COMPILER.
7127 (CC-LD): Rename to ...
7128 (CC_LD): ... this. Use COMPILER.
7129 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
7130 (CXX_FOR_TARGET): Default to g++ instead of gcc.
7131 * acinclude.m4: Include build-with-cxx.m4.
7132 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
7133 Disable -Werror by default if building in C++ mode.
7134 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
7135 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
7136 the C++ compiler. Save/restore CXXFLAGS too.
7137 * configure: Regenerate.
7139 2015-02-27 Pedro Alves <palves@redhat.com>
7141 * acinclude.m4: Include libiberty.m4.
7142 * configure.ac: Call libiberty_INIT.
7143 * config.in, configure: Regenerate.
7145 2015-02-26 Pedro Alves <palves@redhat.com>
7147 * linux-low.c (linux_wait_1): When incrementing the PC past a
7148 program breakpoint always use the_low_target.breakpoint_len as
7149 increment, rather than the maximum between that and
7150 the_low_target.decr_pc_after_break.
7152 2015-02-23 Pedro Alves <palves@redhat.com>
7154 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
7155 thread was doing a step-over; always adjust the PC if
7156 we stepped over a permanent breakpoint.
7157 (linux_wait_1): If we stepped over breakpoint that was on top of a
7158 permanent breakpoint, manually advance the PC past it.
7160 2015-02-23 Pedro Alves <palves@redhat.com>
7162 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
7164 (x86_fill_gregset, x86_store_gregset): Use it when handling
7167 2015-02-20 Pedro Alves <palves@redhat.com>
7169 * thread-db.c: Include "nat/linux-procfs.h".
7170 (thread_db_init): Skip listing new threads if the kernel supports
7171 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
7173 2015-02-20 Pedro Alves <palves@redhat.com>
7175 * linux-low.c (status_pending_p_callback): Use ptid_match.
7177 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
7179 PR breakpoints/16812
7180 * linux-low.c (wstatus_maybe_breakpoint): Remove.
7181 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
7182 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
7184 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
7186 PR breakpoints/15956
7187 * tracepoint.c (cmd_qtinit): Add check for current_thread.
7189 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7191 * linux-low.c (linux_low_btrace_conf): Print size.
7192 * server.c (handle_btrace_conf_general_set): New.
7193 (hanle_general_set): Call handle_btrace_conf_general_set.
7194 (handle_query): Report Qbtrace-conf:bts:size as supported.
7196 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7198 * linux-low.c (linux_low_enable_btrace): Update parameters.
7199 (linux_low_btrace_conf): New.
7200 (linux_target_ops)<to_btrace_conf>: Initialize.
7201 * server.c (current_btrace_conf): New.
7202 (handle_btrace_enable): Rename to ...
7203 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
7204 to target_enable_btrace. Update comment. Update users.
7205 (handle_qxfer_btrace_conf): New.
7206 (qxfer_packets): Add btrace-conf entry.
7207 (handle_query): Report qXfer:btrace-conf:read as supported packet.
7208 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
7209 (target_ops)<read_btrace_conf>: New.
7210 (target_enable_btrace): Update parameters.
7211 (target_read_btrace_conf): New.
7213 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7215 * server.c (handle_btrace_general_set): Remove call to
7216 target_supports_btrace.
7217 (supported_btrace_packets): New.
7218 (handle_query): Call supported_btrace_packets.
7219 * target.h: include btrace-common.h.
7220 (btrace_target_info): Removed.
7221 (supports_btrace, target_supports_btrace): Update parameters.
7223 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
7225 * Makefile.in (SFILES): Add common/btrace-common.c.
7226 (OBS): Add common/btrace-common.o.
7227 (btrace-common.o): Add build rules.
7228 * linux-low: Include btrace-common.h.
7229 (linux_low_read_btrace): Use struct btrace_data. Call
7230 btrace_data_init and btrace_data_fini.
7232 2015-02-06 Pedro Alves <palves@redhat.com>
7234 * thread-db.c (find_new_threads_callback): Add debug output.
7236 2015-02-04 Pedro Alves <palves@redhat.com>
7238 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
7239 (resume_stopped_resumed_lwps): New function.
7240 (linux_wait_for_event_filtered): Use it.
7242 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7244 * Makefile.in (SFILES): Add linux-personality.c.
7245 (linux-personality.o): New rule.
7246 * configure.srv (srv_linux_obj): Add linux-personality.o to the
7247 list of objects to be built.
7248 * linux-low.c: Include nat/linux-personality.h.
7249 (linux_create_inferior): Remove code to disable address space
7250 randomization (moved to ../nat/linux-personality.c). Create
7251 cleanup to disable address space randomization.
7253 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
7255 * Makefile.in (posix-strerror.o): New rule.
7256 (mingw-strerror.o): Likewise.
7257 * configure: Regenerated.
7258 * configure.ac: Source file ../common/common.host. Initialize new
7259 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
7261 2015-01-14 Yao Qi <yao@codesourcery.com>
7263 * Makefile.in (SFILES): Add nat/ppc-linux.c.
7264 (ppc-linux.o): New rule.
7265 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
7266 * configure.ac: AC_CHECK_FUNCS(getauxval).
7267 * config.in: Re-generated.
7268 * configure: Re-generated.
7269 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
7270 ppc64_64bit_inferior_p
7272 2015-01-14 Yao Qi <yao@codesourcery.com>
7274 * linux-ppc-low.c: Include "nat/ppc-linux.h".
7275 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
7276 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
7277 (PT_ORIG_R3, PT_TRAP): Likewise.
7278 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
7279 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
7280 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
7282 2015-01-10 Joel Brobecker <brobecker@adacore.com>
7284 * i387-fp.c (i387_cache_to_xsave): In look over
7285 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
7286 zmmh_low_space field by use of zmmh_high_space.
7288 2015-01-09 Pedro Alves <palves@redhat.com>
7290 * linux-low.c (step_over_bkpt): Move higher up in the file.
7291 (handle_extended_wait): Don't store the stop_pc here.
7292 (get_stop_pc): Adjust comments and rename to ...
7293 (check_stopped_by_breakpoint): ... this. Record whether the LWP
7294 stopped for a software breakpoint or hardware breakpoint.
7295 (thread_still_has_status_pending_p): New function.
7296 (status_pending_p_callback): Use
7297 thread_still_has_status_pending_p. If the event is no longer
7298 interesting, resume the LWP.
7299 (handle_tracepoints): Add assert.
7300 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
7301 (wstatus_maybe_breakpoint): New function.
7302 (cancel_breakpoint): Delete function.
7303 (check_stopped_by_watchpoint): New function, factored out from
7304 linux_low_filter_event.
7305 (lp_status_maybe_breakpoint): Delete function.
7306 (linux_low_filter_event): Remove filter_ptid argument.
7307 Leave thread group exits pending here. Store the LWP's stop PC.
7308 Always leave events pending.
7309 (linux_wait_for_event_filtered): Pull all events out of the
7310 kernel, and leave them all pending.
7311 (count_events_callback, select_event_lwp_callback): Consider all
7313 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
7314 (select_event_lwp): Only give preference to the stepping LWP in
7315 all-stop mode. Adjust comments.
7316 (ignore_event): New function.
7317 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
7318 references to cancel_breakpoints. Adjust to renames. Also give
7319 equal priority to all LWPs that have had events in non-stop mode.
7320 If reporting a software breakpoint event, unadjust the LWP's PC.
7321 (linux_wait): If linux_wait_1 returned an ignored event, retry.
7322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
7324 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
7325 (resume_status_pending_p): Use thread_still_has_status_pending_p.
7326 (linux_stopped_by_watchpoint): Adjust.
7327 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
7328 * linux-low.h (enum lwp_stop_reason): New.
7329 (struct lwp_info) <stop_pc>: Adjust comment.
7330 <stopped_by_watchpoint>: Delete field.
7331 <stop_reason>: New field.
7332 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
7333 * mem-break.c (software_breakpoint_inserted_here)
7334 (hardware_breakpoint_inserted_here): New function.
7335 * mem-break.h (software_breakpoint_inserted_here)
7336 (hardware_breakpoint_inserted_here): Declare.
7337 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
7338 (cancel_breakpoints): Delete.
7339 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
7340 (upload_fast_traceframes): Remove references to
7343 2015-01-09 Pedro Alves <palves@redhat.com>
7345 * thread-db.c (find_new_threads_callback): Ignore thread if the
7346 kernel thread ID is -1.
7348 2015-01-09 Pedro Alves <palves@redhat.com>
7350 * linux-low.c (linux_attach_fail_reason_string): Move to
7351 nat/linux-ptrace.c, and rename.
7352 (linux_attach_lwp): Update comment.
7353 (attach_proc_task_lwp_callback): New function.
7354 (linux_attach): Adjust to rename and use
7355 linux_proc_attach_tgid_threads.
7356 (linux_attach_fail_reason_string): Delete declaration.
7358 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7360 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7361 * server.c (gdbserver_version): Likewise.
7363 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7365 * remote-utils.c: Include ctype.h.
7366 (input_interrupt): Explicitly handle the case when the char
7367 received is the NUL byte. Improve the printing of non-ASCII
7370 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7372 * linux-low.c (linux_low_filter_event): Update call to
7373 linux_enable_event_reporting following the addition of
7374 a new parameter to that function.
7376 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7379 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7380 (AARCH64_FPCR_REGNO): Likewise.
7381 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7382 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7383 (aarch64_store_fpregset): Likewise.
7385 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7387 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7388 Remove FIXME comment about assumption about N.
7390 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7392 * configure.ac: If large-file support is disabled in GDBserver,
7393 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7394 * configure: Regenerate.
7396 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7398 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7399 warning upon ENODATA from ptrace.
7400 * linux-s390-low.c (s390_store_tdb): New.
7401 (s390_regsets): Add regset for NT_S390_TDB.
7403 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7405 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7406 without a fill_function.
7407 * linux-s390-low.c (s390_fill_last_break): Remove.
7408 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7409 (s390_arch_setup): Use regset's size instead of fill_function for
7412 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7414 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7415 the regset's store function when ptrace returned an error.
7416 * regcache.c (get_thread_regcache): Invalidate register cache
7417 before fetching inferior's registers.
7419 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7421 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7422 while-loop as for-loop.
7423 (regsets_store_inferior_registers): Likewise.
7425 2014-11-28 Yao Qi <yao@codesourcery.com>
7427 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7428 * config.in, configure: Re-generate.
7429 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7432 2014-11-21 Yao Qi <yao@codesourcery.com>
7434 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7435 (AC_CHECK_HEADERS): Remove malloc.h.
7436 * configure: Re-generated.
7437 * config.in: Re-generated.
7438 * server.h: Don't include alloca.h and malloc.h.
7439 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7440 Don't include malloc.h.
7442 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7444 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7445 corresponding ERRNO check in same block.
7447 2014-11-12 Pedro Alves <palves@redhat.com>
7449 * server.c (cont_thread): Update comment.
7450 (start_inferior, attach_inferior): No longer clear cont_thread.
7451 (handle_v_cont): No longer set cont_thread.
7452 (captured_main): Clear cont_thread each time a GDB connects.
7454 2014-11-12 Pedro Alves <palves@redhat.com>
7456 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7457 thread, and don't resume all threads if the Hc thread has exited.
7459 2014-11-12 Pedro Alves <palves@redhat.com>
7461 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7462 the process group instead of to a specific LWP.
7464 2014-10-15 Pedro Alves <palves@redhat.com>
7467 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7469 (arm_set_thread_context): Delete.
7470 (the_low_target): Adjust.
7471 * win32-i386-low.c (debug_registers_changed)
7472 (debug_registers_used): Delete.
7473 (update_debug_registers_callback): New function.
7474 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7475 needing to update their debug registers.
7476 (win32_get_current_dr): New function.
7477 (x86_dr_low_get_addr, x86_dr_low_get_control)
7478 (x86_dr_low_get_status): Fetch the debug register from the thread
7480 (i386_initial_stuff): Adjust.
7481 (i386_get_thread_context): Remove current_event parameter. Don't
7482 clear debug_registers_changed nor copy DR values to
7484 (i386_set_thread_context): Delete.
7485 (i386_prepare_to_resume): New function.
7486 (i386_thread_added): Mark the thread as needing to update irs
7488 (the_low_target): Remove i386_set_thread_context and install
7489 i386_prepare_to_resume.
7490 * win32-low.c (win32_get_thread_context): Adjust.
7491 (win32_set_thread_context): Use SetThreadContext
7493 (win32_prepare_to_resume): New function.
7494 (win32_require_context): New function, factored out from ...
7495 (thread_rec): ... this.
7496 (continue_one_thread): Call win32_prepare_to_resume on each thread
7497 we're about to continue.
7498 (win32_resume): Call win32_prepare_to_resume on the event thread.
7499 * win32-low.h (struct win32_thread_info)
7500 <debug_registers_changed>: New field.
7501 (struct win32_target_ops): Change prototype of set_thread_context,
7502 delete set_thread_context and add prepare_to_resume.
7503 (win32_require_context): New declaration.
7505 2014-10-08 Gary Benson <gbenson@redhat.com>
7507 * server.h: Do not include common-exceptions.h.
7509 2014-10-08 Gary Benson <gbenson@redhat.com>
7511 * server.h: Do not include cleanups.h.
7513 2014-09-30 James Hogan <james.hogan@imgtec.com>
7515 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7518 2014-09-23 Yao Qi <yao@codesourcery.com>
7520 * linux-low.c (lp_status_maybe_breakpoint): New function.
7521 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7522 (count_events_callback): Likewise.
7523 (select_event_lwp_callback): Likewise.
7524 (cancel_breakpoints_callback): Likewise.
7526 2014-09-19 Don Breazeal <donb@codesourcery.com>
7528 * linux-low.c (handle_extended_wait): Call
7529 linux_ptrace_get_extended_event.
7530 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7531 linux_is_extended_waitstatus.
7533 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7535 * Makefile.in (CPPFLAGS): Define.
7536 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7537 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7539 2014-09-16 Gary Benson <gbenson@redhat.com>
7541 * inferiors.h (current_inferior): Renamed as...
7542 (current_thread): New variable. All uses updated.
7543 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7544 (maybe_move_out_of_jump_pad): Likewise.
7545 (cancel_breakpoint): Likewise.
7546 (linux_low_filter_event): Likewise.
7547 (wait_for_sigstop): Likewise.
7548 (linux_resume_one_lwp): Likewise.
7549 (need_step_over_p): Likewise.
7550 (start_step_over): Likewise.
7551 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7552 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7553 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7554 and save_inferior as saved_thread.
7555 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7557 (regcache_invalidate_thread): Likewise.
7558 * remote-utils.c (prepare_resume_reply): Likewise.
7559 * thread-db.c (thread_db_get_tls_address): Likewise.
7560 (disable_thread_event_reporting): Likewise.
7561 (remove_thread_event_breakpoints): Likewise.
7562 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7564 * target.h (set_desired_inferior): Renamed as...
7565 (set_desired_thread): New declaration. All uses updated.
7566 * server.c (myresume): Updated comment to reference thread instead
7568 (handle_serial_event): Likewise.
7569 (handle_target_event): Likewise.
7571 2014-09-12 Tom Tromey <tromey@redhat.com>
7572 Gary Benson <gbenson@redhat.com>
7574 * regcache.h: Include common-regcache.h.
7575 (regcache_read_pc): Don't declare.
7576 * regcache.c (get_thread_regcache_for_ptid): New function.
7578 2014-09-11 Tom Tromey <tromey@redhat.com>
7579 Gary Benson <gbenson@redhat.com>
7581 * symbol.c: New file.
7582 * Makefile.in (SFILES): Add symbol.c.
7583 (OBS): Add symbol.o.
7585 2014-09-11 Gary Benson <gbenson@redhat.com>
7587 * target.c (target_stop_ptid, target_continue_ptid): New
7590 2014-09-11 Tom Tromey <tromey@redhat.com>
7591 Gary Benson <gbenson@redhat.com>
7593 * target.h: Include target/target.h.
7594 * target.c (target_read_memory, target_read_uint32)
7595 (target_write_memory): New functions.
7597 2014-09-11 Gary Benson <gbenson@redhat.com>
7599 * server.h (debug_hw_points): Don't declare.
7600 * server.c (debug_hw_points): Don't define. Replace all uses
7601 with show_debug_regs.
7602 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7603 all uses with show_debug_regs.
7605 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7607 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7608 endianness into account.
7609 (ppc_supply_ptrace_register): Likewise.
7611 2014-09-03 James Hogan <james.hogan@imgtec.com>
7613 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7614 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7616 2014-09-03 Gary Benson <gbenson@redhat.com>
7618 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7619 ALL_DEBUG_ADDRESS_REGISTERS.
7621 2014-09-02 Gary Benson <gbenson@redhat.com>
7623 * i386-low.h: Renamed as...
7624 * x86-low.h: New file. All type, function and variable name
7625 prefixes changed from "i386_" to "x86_". All references updated.
7626 * i386-low.c: Renamed as...
7627 * x86-low.c: New file. All type, function and variable name
7628 prefixes changed from "i386_" to "x86_". All references updated.
7630 2014-09-02 Gary Benson <gbenson@redhat.com>
7632 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7633 (x86_linux_new_thread): Likewise.
7635 2014-08-29 Gary Benson <gbenson@redhat.com>
7637 * server.h (setjmp.h): Do not include.
7638 (toplevel): Do not declare.
7639 (common-exceptions.h): Include.
7640 (cleanups.h): Likewise.
7641 * server.c (toplevel): Do not define.
7642 (exit_code): New static global.
7643 (detach_or_kill_for_exit_cleanup): New function.
7644 (main): New function. Original main renamed to...
7645 (captured_main): New function.
7646 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7648 2014-08-29 Gary Benson <gbenson@redhat.com>
7650 * Makefile.in (SFILES): Add common/common-exceptions.c.
7651 (OBS): Add common-exceptions.o.
7652 (common-exceptions.o): New rule.
7653 * utils.c (prepare_to_throw_exception): New function.
7655 2014-08-29 Gary Benson <gbenson@redhat.com>
7657 * config.in: Regenerate.
7658 * configure: Likewise.
7660 2014-08-29 Gary Benson <gbenson@redhat.com>
7662 * Makefile.in (SFILES): Add common/cleanups.c.
7664 (cleanups.o): New rule.
7666 2014-08-29 Gary Benson <gbenson@redhat.com>
7668 * utils.c (internal_vwarning): New function.
7670 2014-08-28 Gary Benson <gbenson@redhat.com>
7672 * utils.h (fatal): Remove declaration.
7673 * utils.c (fatal): Remove function.
7675 2014-08-28 Gary Benson <gbenson@redhat.com>
7677 * tracepoint.c (gdb_agent_init): Replace fatal with
7679 (initialize_tracepoint): Likewise.
7681 2014-08-28 Gary Benson <gbenson@redhat.com>
7683 * remote-utils.c (remote_prepare): Replace fatal with error.
7685 2014-08-28 Gary Benson <gbenson@redhat.com>
7687 * linux-low.c (linux_async): Replace fatal with warning.
7689 (linux_start_non_stop): Return -1 if linux_async failed.
7691 2014-08-28 Gary Benson <gbenson@redhat.com>
7693 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7695 (i386_dr_low_get_addr): Remove vague comment.
7696 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7699 2014-08-28 Gary Benson <gbenson@redhat.com>
7701 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7702 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7704 (linux_resume_one_lwp): Likewise.
7705 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7707 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7708 with internal_error.
7709 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7710 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7711 (find_register_by_name): Replace fatal with internal_error.
7712 (find_regno): Likewise.
7713 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7714 * thread-db.c (thread_db_create_event): Likewise.
7715 (thread_db_load_search): Likewise.
7716 (try_thread_db_load_1): Likewise.
7717 * tracepoint.c (get_jump_space_head): Replace fatal with
7719 (claim_trampoline_space): Likewise.
7720 (have_fast_tracepoint_trampoline_buffer): Likewise.
7721 (cmd_qtstart): Likewise.
7722 (stop_tracing): Likewise.
7723 (fast_tracepoint_collecting): Likewise.
7724 (target_malloc): Likewise.
7725 (download_tracepoint): Likewise.
7726 (download_trace_state_variables): Replace check with gdb_assert.
7727 (upload_fast_traceframes): Replace fatal with internal_error.
7729 2014-08-19 Tom Tromey <tromey@redhat.com>
7730 Gary Benson <gbenson@redhat.com>
7732 * Makefile.in (SFILES): Add common/common-debug.c.
7733 (OBS): Add common-debug.o.
7734 (common-debug.o): New rule.
7735 * debug.h (debug_printf): Don't declare.
7736 * debug.c (debug_printf): Renamed and rewritten as...
7737 (debug_vprintf): New function.
7739 2014-08-19 Gary Benson <gbenson@redhat.com>
7741 * utils.h: Do not include print-utils.h.
7743 2014-08-19 Tom Tromey <tromey@redhat.com>
7744 Gary Benson <gbenson@redhat.com>
7746 * server.h: Add static assertion.
7747 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7749 2014-08-19 Tom Tromey <tromey@redhat.com>
7750 Gary Benson <gbenson@redhat.com>
7752 * Makefile.in (SFILES): Add common/errors.c.
7753 (OBS): Add errors.o.
7754 (IPA_OBS): Add errors-ipa.o.
7755 (errors.o): New rule.
7756 (errors-ipa.o): Likewise.
7757 * utils.h (perror_with_name, error, warning): Don't declare.
7758 * utils.c (warning): Renamed and rewritten as...
7759 (vwarning): New function.
7760 (error): Renamed and rewritten as...
7761 (verror): New function.
7762 (internal_error): Renamed and rewritten as...
7763 (internal_verror): New function.
7765 2014-08-07 Gary Benson <gbenson@redhat.com>
7767 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7768 * configure: Regenerate.
7769 * config.in: Likewise.
7770 * server.h: Do not include errno.h.
7771 * event-loop.c: Likewise.
7772 * hostio-errno.c: Likewise.
7773 * linux-low.c: Likewise.
7774 * remote-utils.c: Likewise.
7775 * spu-low.c: Likewise.
7776 * utils.c: Likewise.
7777 * gdbreplay.c: Unconditionally include errno.h.
7779 2014-08-07 Gary Benson <gbenson@redhat.com>
7781 * server.h: Do not include string.h.
7782 * event-loop.c: Likewise.
7783 * linux-low.c: Likewise.
7784 * regcache.c: Likewise.
7785 * remote-utils.c: Likewise.
7786 * spu-low.c: Likewise.
7787 * utils.c: Likewise.
7789 2014-08-07 Gary Benson <gbenson@redhat.com>
7791 * server.h: Do not include gdb_assert.h.
7793 2014-08-07 Gary Benson <gbenson@redhat.com>
7795 * server.h: Do not include common-utils.h.
7797 2014-08-07 Gary Benson <gbenson@redhat.com>
7799 * server.h: Do not include ptid.h.
7800 * notif.h: Likewise.
7802 2014-08-07 Gary Benson <gbenson@redhat.com>
7804 * server.h: Do not include gdb_locale.h.
7806 2014-08-07 Gary Benson <gbenson@redhat.com>
7808 * server.h: Do not include gdb/signals.h.
7809 * win32-low.c: Likewise.
7811 2014-08-07 Gary Benson <gbenson@redhat.com>
7813 * server.h: Do not include pathmax.h.
7815 2014-08-07 Gary Benson <gbenson@redhat.com>
7817 * server.h: Do not include libiberty.h.
7818 * linux-bfin-low.c: Likewise.
7820 2014-08-07 Gary Benson <gbenson@redhat.com>
7822 * server.h: Do not include ansidecl.h.
7824 2014-08-07 Gary Benson <gbenson@redhat.com>
7826 * linux-x86-low.c: Do not include stddef.h.
7827 * lynx-ppc-low.c: Likewise.
7828 * tracepoint.c: Likewise.
7830 2014-08-07 Gary Benson <gbenson@redhat.com>
7832 * server.h: Do not include stdarg.h.
7833 * nto-low.c: Likewise.
7835 2014-08-07 Gary Benson <gbenson@redhat.com>
7837 * server.h: Do not include stdlib.h.
7838 * inferiors.c: Likewise.
7839 * linux-low.c: Likewise.
7840 * regcache.c: Likewise.
7841 * spu-low.c: Likewise.
7842 * tracepoint.c: Likewise.
7843 * utils.c: Likewise.
7845 2014-08-07 Gary Benson <gbenson@redhat.com>
7847 * server.h: Do not include stdio.h.
7848 * linux-low.c: Likewise.
7849 * remote-utils.c: Likewise.
7850 * spu-low.c: Likewise.
7851 * utils.c: Likewise.
7852 * wincecompat.c: Likewise.
7854 2014-08-06 Gary Benson <gbenson@redhat.com>
7856 * regcache.c (init_register_cache): Move conditionals inside if.
7858 2014-08-06 Gary Benson <gbenson@redhat.com>
7860 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7862 2014-07-31 Gary Benson <gbenson@redhat.com>
7864 * ax.h: Do not include server.h.
7865 * gdbthread.h: Likewise.
7866 * lynx-low.h: Likewise.
7867 * notif.h: Likewise.
7869 2014-07-30 Gary Benson <gbenson@redhat.com>
7871 * server.h: Include common-defs.h.
7872 Do not include config.h or build-gnulib-gdbserver/config.h.
7874 2014-07-30 Gary Benson <gbenson@redhat.com>
7876 * hostio-errno.c: Move server.h to top of includes list.
7877 * inferiors.c: Likewise.
7878 * linux-x86-low.c: Likewise.
7879 * notif.c: Include server.h.
7881 2014-07-24 Tom Tromey <tromey@redhat.com>
7882 Gary Benson <gbenson@redhat.com>
7884 * server.h (CORE_ADDR): Now unsigned.
7886 2014-07-16 Pedro Alves <palves@redhat.com>
7888 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7890 2014-07-15 Pedro Alves <palves@redhat.com>
7892 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7895 2014-07-11 Pedro Alves <palves@redhat.com>
7897 * linux-low.c (kill_wait_lwp): New function, based on
7898 kill_one_lwp_callback, but use my_waitpid directly.
7899 (kill_one_lwp_callback, linux_kill): Use it.
7901 2014-06-23 Pedro Alves <palves@redhat.com>
7903 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7904 before setting DR0..DR3.
7906 2014-06-20 Gary Benson <gbenson@redhat.com>
7908 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7909 * configure: Regenerated.
7910 * config.in: Likewise.
7912 2014-06-20 Gary Benson <gbenson@redhat.com>
7914 * Makefile.in (SFILES): Update locations for files moved
7916 (object file files): Reordered.
7918 2014-06-20 Gary Benson <gbenson@redhat.com>
7920 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7921 (i386_dr_low_set_addr): Likewise.
7922 (i386_dr_low_get_addr): Likewise.
7923 (i386_dr_low_can_set_control): Likewise.
7924 (i386_dr_low_set_control): Likewise.
7925 (i386_dr_low_get_control): Likewise.
7926 (i386_dr_low_get_status): Likewise.
7927 (i386_get_debug_register_length): Likewise.
7928 * linux-x86-low.c (i386_dr_low_set_addr):
7929 Changed signature. Made static.
7930 (i386_dr_low_get_addr): Likewise.
7931 (i386_dr_low_set_control): Likewise.
7932 (i386_dr_low_get_control): Likewise.
7933 (i386_dr_low_get_status): Likewise.
7934 (i386_dr_low): New global variable.
7935 * win32-i386-low.c (i386_dr_low_set_addr):
7936 Changed signature. Made static.
7937 (i386_dr_low_get_addr): Likewise.
7938 (i386_dr_low_set_control): Likewise.
7939 (i386_dr_low_get_control): Likewise.
7940 (i386_dr_low_get_status): Likewise.
7941 (i386_dr_low): New global variable.
7943 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7945 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7946 * Makefile.in (AR, AR_FLAGS): Define.
7947 * configure: Regenerate.
7949 2014-06-19 Gary Benson <gbenson@redhat.com>
7951 * Makefile.in (i386-dregs.o): New rule.
7952 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7953 * i386-low.c (target.h): Remove include.
7954 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7955 (DR_CONTROL_SHIFT): Likewise.
7956 (DR_CONTROL_SIZE): Likewise.
7957 (DR_RW_EXECUTE): Likewise.
7958 (DR_RW_WRITE): Likewise.
7959 (DR_RW_READ): Likewise.
7960 (DR_RW_IORW): Likewise.
7961 (DR_LEN_1): Likewise.
7962 (DR_LEN_2): Likewise.
7963 (DR_LEN_4): Likewise.
7964 (DR_LEN_8): Likewise.
7965 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7966 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7967 (DR_ENABLE_SIZE): Likewise.
7968 (DR_LOCAL_SLOWDOWN): Likewise.
7969 (DR_GLOBAL_SLOWDOWN): Likewise.
7970 (DR_CONTROL_RESERVED): Likewise.
7971 (I386_DR_CONTROL_MASK): Likewise.
7972 (I386_DR_VACANT): Likewise.
7973 (I386_DR_LOCAL_ENABLE): Likewise.
7974 (I386_DR_GLOBAL_ENABLE): Likewise.
7975 (I386_DR_DISABLE): Likewise.
7976 (I386_DR_SET_RW_LEN): Likewise.
7977 (I386_DR_GET_RW_LEN): Likewise.
7978 (I386_DR_WATCH_HIT): Likewise.
7979 (i386_wp_op_t): Likewise.
7980 (i386_show_dr): Likewise.
7981 (i386_length_and_rw_bits): Likewise.
7982 (i386_insert_aligned_watchpoint): Likewise.
7983 (i386_remove_aligned_watchpoint): Likewise.
7984 (i386_handle_nonaligned_watchpoint): Likewise.
7985 i386_update_inferior_debug_regs(): Likewise.
7986 (i386_dr_insert_watchpoint): Likewise.
7987 (i386_dr_remove_watchpoint): Likewise.
7988 (i386_dr_region_ok_for_watchpoint): Likewise.
7989 (i386_dr_stopped_data_address): Likewise.
7990 (i386_dr_stopped_by_watchpoint): Likewise.
7992 2014-06-19 Gary Benson <gbenson@redhat.com>
7994 * i386-low.c (i386_dr_show): Renamed to
7995 i386_show_dr and made static. All uses updated.
7996 (i386_dr_length_and_rw_bits): Renamed to
7997 i386_length_and_rw_bits and made static.
7999 (i386_dr_insert_aligned_watchpoint): Renamed to
8000 i386_insert_aligned_watchpoint and made static.
8002 (i386_dr_remove_aligned_watchpoint): Renamed to
8003 i386_remove_aligned_watchpoint and made static.
8005 (i386_dr_update_inferior_debug_regs): Renamed to
8006 i386_update_inferior_debug_regs and made static.
8009 2014-06-18 Gary Benson <gbenson@redhat.com>
8011 * i386-low.h (i386_dr_low_can_set_addr): New macro.
8012 (i386_dr_low_can_set_control): Likewise.
8013 (i386_get_debug_register_length): Likewise.
8014 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
8015 (i386_dr_low_can_set_control): Likewise.
8016 (i386_get_debug_register_length): Likewise.
8018 2014-06-17 Gary Benson <gbenson@redhat.com>
8020 * i386-low.h (i386-dregs.h): New include.
8021 (DR_FIRSTADDR): Now in i386-dregs.h.
8022 (DR_LASTADDR): Likewise.
8023 (DR_NADDR): Likewise.
8024 (DR_STATUS): Likewise.
8025 (DR_CONTROL): Likewise.
8026 (i386_debug_reg_state): Likewise.
8027 (i386_dr_insert_watchpoint): Likewise.
8028 (i386_dr_remove_watchpoint): Likewise.
8029 (i386_dr_region_ok_for_watchpoint): Likewise.
8030 (i386_dr_stopped_data_address): Likewise.
8031 (i386_dr_stopped_by_watchpoint): Likewise.
8032 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
8034 2014-06-18 Gary Benson <gbenson@redhat.com>
8036 * i386-low.h (i386_low_insert_watchpoint): Renamed to
8037 i386_dr_insert_watchpoint.
8038 (i386_low_remove_watchpoint): Renamed to
8039 i386_dr_remove_watchpoint.
8040 (i386_low_region_ok_for_watchpoint): Renamed to
8041 i386_dr_region_ok_for_watchpoint.
8042 (i386_low_stopped_data_address): Renamed to
8043 i386_dr_stopped_data_address.
8044 (i386_low_stopped_by_watchpoint): Renamed to
8045 i386_dr_stopped_by_watchpoint.
8046 * i386-low.c (i386_show_dr): Renamed to
8047 i386_dr_show and made nonstatic. All uses updated.
8048 (i386_length_and_rw_bits): Renamed to
8049 i386_dr_length_and_rw_bits and made nonstatic.
8051 (i386_insert_aligned_watchpoint): Renamed to
8052 i386_dr_insert_aligned_watchpoint and made nonstatic.
8054 (i386_remove_aligned_watchpoint): Renamed to
8055 i386_dr_remove_aligned_watchpoint and made nonstatic.
8057 (i386_update_inferior_debug_regs): Renamed to
8058 i386_dr_update_inferior_debug_regs and made nonstatic.
8060 (i386_low_insert_watchpoint): Renamed to
8061 i386_dr_insert_watchpoint. All uses updated.
8062 (i386_low_remove_watchpoint): Renamed to
8063 i386_dr_remove_watchpoint. All uses updated.
8064 (i386_low_region_ok_for_watchpoint): Renamed to
8065 i386_dr_region_ok_for_watchpoint. All uses updated.
8066 (i386_low_stopped_data_address): Renamed to
8067 i386_dr_stopped_data_address. All uses updated.
8068 (i386_low_stopped_by_watchpoint): Renamed to
8069 i386_dr_stopped_by_watchpoint. All uses updated.
8071 2014-06-18 Gary Benson <gbenson@redhat.com>
8073 * i386-low.c (i386_dr_low_can_set_addr): New macro.
8074 (i386_dr_low_can_set_control): Likewise.
8075 (i386_insert_aligned_watchpoint): New check.
8077 2014-06-18 Gary Benson <gbenson@redhat.com>
8079 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
8082 2014-06-18 Gary Benson <gbenson@redhat.com>
8084 * i386-low.c (i386_length_and_rw_bits): Use internal_error
8085 instead of fatal and error.
8086 (i386_handle_nonaligned_watchpoint): Likewise.
8088 2014-06-18 Gary Benson <gbenson@redhat.com>
8090 * i386-low.c (i386_get_debug_register_length): New macro.
8091 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
8092 (i386_show_dr): Use debug_printf instead of fprintf. Use
8093 phex to format values.
8095 2014-06-18 Gary Benson <gbenson@redhat.com>
8097 * i386-low.h: Comment changes.
8098 * i386-low.c: Likewise.
8100 2014-06-18 Gary Benson <gbenson@redhat.com>
8102 * i386-low.c: Whitespace changes.
8104 2014-06-12 Tom Tromey <tromey@redhat.com>
8106 * utils.c (freeargv): Remove.
8108 2014-06-12 Tom Tromey <tromey@redhat.com>
8110 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
8111 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
8112 (parse_debug_format_options): Likewise.
8113 (gdbserver_usage): Likewise.
8114 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
8115 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
8116 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
8118 ($(LIBGNU)): Depend on libiberty.
8119 (all-lib): Recurse into all subdirs.
8120 (install-only): Invoke "install" target in subdirs.
8121 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
8123 * configure: Rebuild.
8124 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
8125 for vasprintf, vsnprintf, or gettimeofday.
8126 * configure.srv: Don't add safe-ctype.o or lbasename.o to
8129 2014-06-05 Joel Brobecker <brobecker@adacore.com>
8131 * development.sh: Delete.
8132 * Makefile.in (config.status): Adjust dependency on development.sh.
8133 * configure.ac: Adjust development.sh source call.
8134 * configure: Regenerate.
8136 2014-06-02 Pedro Alves <palves@redhat.com>
8138 * ax.c (gdb_free_agent_expr): New function.
8139 * ax.h (gdb_free_agent_expr): New declaration.
8140 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
8142 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
8144 (clear_breakpoint_conditions_and_commands): New function.
8145 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
8146 (clear_breakpoint_conditions_and_commands): New declaration.
8148 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8150 * linux-aarch64-low.c (asm/ptrace.h): Include.
8152 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8154 Fix TLS access for -static -pthread.
8155 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
8156 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
8157 (thread_db_load_search, try_thread_db_load_1): Initialize it.
8159 2014-05-20 Pedro Alves <palves@redhat.com>
8161 * linux-aarch64-low.c (aarch64_insert_point)
8162 (aarch64_remove_point): No longer check whether the type is
8163 supported here. Adjust to new interface.
8164 (the_low_target): Install aarch64_supports_z_point_type as
8165 supports_z_point_type method.
8166 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
8167 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
8168 instead of a Z packet char. Adjust.
8169 (arm_supports_z_point_type): New function.
8170 (arm_insert_point, arm_remove_point): Adjust to new interface.
8171 (the_low_target): Install arm_supports_z_point_type.
8172 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
8173 (cris_insert_point, cris_remove_point): Adjust to new interface.
8174 Don't check whether the type is supported here.
8175 (the_low_target): Install cris_supports_z_point_type.
8176 * linux-low.c (linux_supports_z_point_type): New function.
8177 (linux_insert_point, linux_remove_point): Adjust to new interface.
8178 * linux-low.h (struct linux_target_ops) <insert_point,
8179 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
8180 raw_breakpoint pointer parameter.
8181 <supports_z_point_type>: New method.
8182 * linux-mips-low.c (mips_supports_z_point_type): New function.
8183 (mips_insert_point, mips_remove_point): Adjust to new interface.
8184 Use mips_supports_z_point_type.
8185 (the_low_target): Install mips_supports_z_point_type.
8186 * linux-ppc-low.c (the_low_target): Install NULL as
8187 supports_z_point_type method.
8188 * linux-s390-low.c (the_low_target): Install NULL as
8189 supports_z_point_type method.
8190 * linux-sparc-low.c (the_low_target): Install NULL as
8191 supports_z_point_type method.
8192 * linux-x86-low.c (x86_supports_z_point_type): New function.
8193 (x86_insert_point): Adjust to new insert_point interface. Use
8194 insert_memory_breakpoint. Adjust to new
8195 i386_low_insert_watchpoint interface.
8196 (x86_remove_point): Adjust to remove_point interface. Use
8197 remove_memory_breakpoint. Adjust to new
8198 i386_low_remove_watchpoint interface.
8199 (the_low_target): Install x86_supports_z_point_type.
8200 * lynx-low.c (lynx_target_ops): Install NULL as
8201 supports_z_point_type callback.
8202 * nto-low.c (nto_supports_z_point_type): New.
8203 (nto_insert_point, nto_remove_point): Adjust to new interface.
8204 (nto_target_ops): Install nto_supports_z_point_type.
8205 * mem-break.c: Adjust intro comment.
8206 (struct raw_breakpoint) <raw_type, size>: New fields.
8207 <inserted>: Update comment.
8208 <shlib_disabled>: Delete field.
8209 (enum bkpt_type) <gdb_breakpoint>: Delete value.
8210 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
8211 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
8212 (raw_bkpt_type_to_target_hw_bp_type): New function.
8213 (find_enabled_raw_code_breakpoint_at): New function.
8214 (find_raw_breakpoint_at): New type and size parameters. Use them.
8215 (insert_memory_breakpoint): New function, based off
8216 set_raw_breakpoint_at.
8217 (remove_memory_breakpoint): New function.
8218 (set_raw_breakpoint_at): Reimplement.
8219 (set_breakpoint): New, based on set_breakpoint_at.
8220 (set_breakpoint_at): Reimplement.
8221 (delete_raw_breakpoint): Go through the_target->remove_point
8222 instead of assuming memory breakpoints.
8223 (find_gdb_breakpoint_at): Delete.
8224 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
8225 (find_gdb_breakpoint): New function.
8226 (set_gdb_breakpoint_at): Delete.
8227 (z_type_supported): New function.
8228 (set_gdb_breakpoint_1): New function, loosely based off
8229 set_gdb_breakpoint_at.
8230 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
8231 (delete_gdb_breakpoint_at): Delete.
8232 (delete_gdb_breakpoint_1): New function, loosely based off
8233 delete_gdb_breakpoint_at.
8234 (delete_gdb_breakpoint): New function.
8235 (clear_gdb_breakpoint_conditions): Rename to ...
8236 (clear_breakpoint_conditions): ... this. Don't handle a NULL
8238 (add_condition_to_breakpoint): Make static.
8239 (add_breakpoint_condition): Take a struct breakpoint pointer
8240 instead of an address. Adjust.
8241 (gdb_condition_true_at_breakpoint): Rename to ...
8242 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
8244 (gdb_condition_true_at_breakpoint): Reimplement.
8245 (add_breakpoint_commands): Take a struct breakpoint pointer
8246 instead of an address. Adjust.
8247 (gdb_no_commands_at_breakpoint): Rename to ...
8248 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
8249 parameter. Return true if no breakpoint was found. Change debug
8251 (gdb_no_commands_at_breakpoint): Reimplement.
8252 (run_breakpoint_commands): Rename to ...
8253 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
8254 and change return type to boolean.
8255 (run_breakpoint_commands): New function.
8256 (gdb_breakpoint_here): Also check for Z1 breakpoints.
8257 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
8258 breakpoint. Go through the_target->remove_point instead of
8259 assuming memory breakpoint.
8260 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
8261 software and hardware breakpoints.
8262 (reinsert_raw_breakpoint): Go through the_target->insert_point
8263 instead of assuming memory breakpoint.
8264 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
8265 software and hardware breakpoints.
8266 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
8267 Check both software and hardware breakpoints.
8268 (validate_inserted_breakpoint): Assert the breakpoint is a
8269 software breakpoint. Set the inserted flag to -1 instead of
8270 setting shlib_disabled.
8271 (delete_disabled_breakpoints): Adjust.
8272 (validate_breakpoints): Only validate software breakpoints.
8273 Adjust to inserted flag change.
8274 (check_mem_read, check_mem_write): Skip breakpoint types other
8275 than software breakpoints. Adjust to inserted flag change.
8276 * mem-break.h (enum raw_bkpt_type): New enum.
8277 (raw_breakpoint, struct process_info): Forward declare.
8278 (Z_packet_to_target_hw_bp_type): Delete declaration.
8279 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
8280 (set_gdb_breakpoint, delete_gdb_breakpoint)
8281 (clear_breakpoint_conditions): New declarations.
8282 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
8283 (breakpoint_inserted_here): Update comment.
8284 (add_breakpoint_condition, add_breakpoint_commands): Replace
8285 address parameter with a breakpoint pointer parameter.
8286 (gdb_breakpoint_here): Update comment.
8287 (delete_gdb_breakpoint_at): Delete.
8288 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
8289 * server.c (process_point_options): Take a struct breakpoint
8290 pointer instead of an address. Adjust.
8291 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
8292 delete_gdb_breakpoint.
8293 * spu-low.c (spu_target_ops): Install NULL as
8294 supports_z_point_type method.
8295 * target.h: Include mem-break.h.
8296 (struct target_ops) <prepare_to_access_memory>: Update comment.
8297 <supports_z_point_type>: New field.
8298 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8299 instead of a char. Also take a raw breakpoint pointer.
8300 * win32-arm-low.c (the_low_target): Install NULL as
8301 supports_z_point_type.
8302 * win32-i386-low.c (i386_supports_z_point_type): New function.
8303 (i386_insert_point, i386_remove_point): Adjust to new interface.
8304 (the_low_target): Install i386_supports_z_point_type.
8305 * win32-low.c (win32_supports_z_point_type): New function.
8306 (win32_insert_point, win32_remove_point): Adjust to new interface.
8307 (win32_target_ops): Install win32_supports_z_point_type.
8308 * win32-low.h (struct win32_target_ops):
8309 <supports_z_point_type>: New method.
8310 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
8311 instead of a char. Also take a raw breakpoint pointer.
8313 2014-05-20 Pedro Alves <palves@redhat.com>
8315 * mem-break.h: Include break-common.h.
8316 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8317 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
8318 (Z_packet_to_target_hw_bp_type): New declaration.
8319 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
8320 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
8321 (Z_PACKET_ACCESS_WP): Delete macros.
8322 (Z_packet_to_hw_type): Delete function.
8323 * i386-low.h: Don't include break-common.h here.
8324 (Z_packet_to_hw_type): Delete declaration.
8325 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
8326 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8327 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
8328 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
8329 * linux-aarch64-low.c: Don't include break-common.h here.
8330 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
8331 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
8332 (Z_packet_to_target_hw_bp_type): Delete function.
8333 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
8335 (mips_insert_point, mips_remove_point): Use
8336 Z_packet_to_target_hw_bp_type.
8338 2014-05-20 Pedro Alves <palves@redhat.com>
8340 * linux-aarch64-low.c: Include break-common.h.
8341 (enum target_point_type): Delete.
8342 (Z_packet_to_point_type): Rename to ...
8343 (Z_packet_to_target_hw_bp_type): ... this, and return a
8344 target_hw_bp_type instead.
8345 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
8346 instead of an enum target_point_type.
8347 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
8349 (aarch64_dr_state_insert_one_point)
8350 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
8351 (aarch64_handle_aligned_watchpoint)
8352 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
8353 Take an enum target_hw_bp_type instead of an enum
8355 (aarch64_supports_z_point_type): New function.
8356 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8357 use Z_packet_to_target_hw_bp_type.
8359 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8361 * configure.ac: Only use -Werror by default when DEVELOPMENT
8363 * configure: Regenerate.
8365 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8367 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8368 * linux-x86-low.c (X86_64_USER_REGS): New.
8369 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8371 2014-04-28 Yao Qi <yao@codesourcery.com>
8373 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8376 2014-04-25 Pedro Alves <palves@redhat.com>
8379 * linux-low.c (linux_attach_fail_reason_string): New function.
8380 (linux_attach_lwp): Delete.
8381 (linux_attach_lwp_1): Rename to ...
8382 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8383 argument. Remove "initial" parameter. Return int instead of
8384 void. Don't error or warn here.
8385 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8386 failure to attach to the tgid. Call warning when failing to
8388 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8389 argument. Remove "initial" parameter. Return int instead of
8390 void. Don't error or warn here.
8391 (linux_attach_fail_reason_string): New declaration.
8392 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8393 interface change. Use linux_attach_fail_reason_string.
8395 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8396 Walfred Tedeschi <walfred.tedeschi@intel.com>
8398 * Makefile.in: Added rules to handle new files
8399 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8400 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8401 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8402 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8403 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8404 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8406 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8407 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8408 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8409 i386/x32-avx512.xml.
8410 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8411 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8412 i386/x32-avx512-linux.xml.
8413 * i387-fp.c (num_avx512_k_registers): New constant for number
8415 (num_avx512_zmmh_low_registers): New constant for number of
8416 lower ZMM registers (0-15).
8417 (num_avx512_zmmh_high_registers): New constant for number of
8418 higher ZMM registers (16-31).
8419 (num_avx512_ymmh_registers): New contant for number of higher
8420 YMM registers (ymm16-31 added by avx521 on x86_64).
8421 (num_avx512_xmm_registers): New constant for number of higher
8422 XMM registers (xmm16-31 added by AVX512 on x86_64).
8423 (struct i387_xsave): Add space for AVX512 registers.
8424 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8425 Add code to handle AVX512 registers.
8426 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8427 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8428 prototypei from generated file.
8429 (tdesc_amd64_avx512_linux): Likewise.
8430 (init_registers_x32_avx512_linux): Likewise.
8431 (tdesc_x32_avx512_linux): Likewise.
8432 (init_registers_i386_avx512_linux): Likewise.
8433 (tdesc_i386_avx512_linux): Likewise.
8434 (x86_64_regmap): Add AVX512 registers.
8435 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8437 (initialize_low_arch): Add code to initialize AVX512 registers.
8439 2014-04-23 Pedro Alves <palves@redhat.com>
8441 * mem-break.c (find_gdb_breakpoint_at): Make static.
8442 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8444 2014-04-23 Pedro Alves <palves@redhat.com>
8446 * i386-low.c: Don't include break-common.h here.
8447 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8448 prototype to take target_hw_bp_type as argument instead of a Z
8450 * i386-low.h: Include break-common.h here.
8451 (Z_packet_to_hw_type): Declare.
8452 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8454 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8455 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8456 (x86_remove_point): Convert the packet number to a
8457 target_hw_bp_type before calling i386_low_remove_watchpoint.
8458 * win32-i386-low.c (i386_insert_point): Convert the packet number
8459 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8460 (i386_remove_point): Convert the packet number to a
8461 target_hw_bp_type before calling i386_low_remove_watchpoint.
8463 2014-04-23 Pedro Alves <palves@redhat.com>
8465 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8467 2014-04-10 Pedro Alves <palves@redhat.com>
8469 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8470 Check if the condition or command is NULL before checking if the
8471 breakpoint is known. On success, return true.
8472 * mem-break.h (add_breakpoint_condition): Document return.
8473 (add_breakpoint_commands): Add describing comment.
8474 * server.c (skip_to_semicolon): New function.
8475 (process_point_options): Use it.
8477 2014-04-09 Pedro Alves <palves@redhat.com>
8479 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8482 2014-02-27 Pedro Alves <palves@redhat.com>
8485 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8487 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8489 (last_thread_of_process_p): Take a PID argument instead of a
8491 (linux_wait_for_lwp): Delete.
8492 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8494 (linux_low_filter_event): New function, party factored out from
8495 linux_wait_for_event.
8496 (linux_wait_for_event): Rename to ...
8497 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8498 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8499 sigsuspend. Check for zombie leaders.
8500 (linux_wait_for_event): Reimplement as wrapper around
8501 linux_wait_for_event_filtered.
8502 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8503 a normal or signal exit is seen, it's the whole process exiting.
8504 (wait_for_sigstop): No longer a for_each_inferior callback.
8505 Rewrite on top of linux_wait_for_event_filtered.
8506 (stop_all_lwps): Call wait_for_sigstop directly.
8507 * server.c (resume, handle_target_event): Handle
8508 TARGET_WAITKIND_NO_RESUMED.
8510 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8512 * win32-low.c (psapi_get_dll_name,
8513 * win32_CreateToolhelp32Snapshot): Delete.
8514 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8515 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8517 (handle_load_dll): Add function description.
8518 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8520 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8522 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8524 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8525 base address when calling win32_add_one_solib.
8526 (handle_load_dll): Delete local variable load_addr.
8527 Remove 0x1000 offset applied to DLL base address when calling
8528 win32_add_one_solib.
8529 (handle_unload_dll): Add comment.
8531 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8533 * win32-low.c (win32_add_all_dlls): Renames
8534 win32_ensure_ntdll_loaded. Rewrite function documentation.
8535 Adjust implementation to always load all DLLs.
8536 Add 0x1000 offset to DLL base address when calling
8537 win32_add_one_solib.
8538 (child_initialization_done): New static global.
8539 (do_initial_child_stuff): Set child_initialization_done to
8540 zero during child initialization, and 1 after. Replace call
8541 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8543 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8544 (handle_unload_dll): Add function documentation.
8545 (get_child_debug_event): Ignore load and unload DLL events
8546 during child initialization.
8548 2014-02-20 Doug Evans <dje@google.com>
8550 Remove global all_lwps.
8551 * inferiors.h (ptid_of): Move here from linux-low.h.
8552 (pid_of, lwpid_of): Ditto.
8553 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8554 parameter is a struct thread_info * now.
8555 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8556 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8557 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8559 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8560 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8561 * linux-arm-low.c (update_registers_callback): Update, "entry"
8562 parameter is a struct thread_info * now.
8563 Fetch lwpid from current_inferior directly.
8564 (arm_insert_point): Pass &all_threads to find_inferior instead of
8566 (arm_remove_point): Ditto.
8567 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8568 (arm_prepare_to_resume): Fetch pid from thread.
8569 (arm_read_description): Fetch lwpid from current_inferior directly.
8570 * linux-low.c (all_lwps): Delete.
8571 (delete_lwp): Delete call to remove_inferior.
8572 (handle_extended_wait): Fetch lwpid from thread.
8573 (add_lwp): Don't set lwp->entry.id. Remove call to
8574 add_inferior_to_list.
8575 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8576 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8577 (kill_one_lwp_callback): Ditto.
8578 (linux_kill): Don't dereference NULL pointer.
8579 Fetch ptid,lwpid from thread.
8580 (get_detach_signal): Fetch ptid from thread.
8581 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8582 Simplify call to regcache_invalidate_thread.
8583 (delete_lwp_callback): Update, "entry" parameter is a
8584 struct thread_info * now. Fetch pid from thread.
8585 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8586 (status_pending_p_callback): Update, "entry" parameter is a
8587 struct thread_info * now. Fetch ptid from thread.
8588 (find_lwp_pid): Update, "entry" parameter is a
8589 struct thread_info * now.
8590 (linux_wait_for_lwp): Fetch pid from thread.
8591 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8592 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8593 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8594 (dequeue_one_deferred_signal): Ditto.
8595 (cancel_breakpoint): Fetch ptid from current_inferior.
8596 (linux_wait_for_event): Pass &all_threads to find_inferior,
8597 not &all_lwps. Fetch ptid, lwpid from thread.
8598 (count_events_callback): Update, "entry" parameter is a
8599 struct thread_info * now.
8600 (select_singlestep_lwp_callback): Ditto.
8601 (select_event_lwp_callback): Ditto.
8602 (cancel_breakpoints_callback): Ditto.
8603 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8605 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8606 (unsuspend_one_lwp): Update, "entry" parameter is a
8607 struct thread_info * now.
8608 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8610 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8611 Fetch lwpid from thread, not lwp.
8612 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8613 Pass &all_threads to find_inferior, not &all_lwps.
8614 (send_sigstop): Fetch lwpid from thread, not lwp.
8615 (send_sigstop_callback): Update, "entry" parameter is a
8616 struct thread_info * now.
8617 (suspend_and_send_sigstop_callback): Ditto.
8618 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8619 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8620 struct thread_info * now.
8621 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8623 (lwp_running): Update, "entry" parameter is a
8624 struct thread_info * now.
8625 (stop_all_lwps): Fetch ptid from thread.
8626 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8627 (linux_resume_one_lwp): Fetch lwpid from thread.
8628 (linux_set_resume_request): Update, "entry" parameter is a
8629 struct thread_info * now. Fetch pid, lwpid from thread.
8630 (resume_status_pending_p): Update, "entry" parameter is a
8631 struct thread_info * now.
8632 (need_step_over_p): Ditto. Fetch lwpid from thread.
8633 (start_step_over): Fetch lwpid from thread.
8634 (linux_resume_one_thread): Update, "entry" parameter is a
8635 struct thread_info * now. Fetch lwpid from thread.
8636 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8637 (proceed_one_lwp): Update, "entry" parameter is a
8638 struct thread_info * now. Fetch lwpid from thread.
8639 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8640 struct thread_info * now.
8641 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8642 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8643 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8645 (regsets_store_inferior_registers): Ditto.
8646 (fetch_register, store_register): Ditto.
8647 (linux_read_memory, linux_write_memory): Ditto.
8648 (linux_request_interrupt): Ditto.
8649 (linux_read_auxv): Ditto.
8650 (linux_xfer_siginfo): Ditto.
8651 (linux_qxfer_spu): Ditto.
8652 (linux_qxfer_libraries_svr4): Ditto.
8653 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8654 moved to inferiors.h.
8656 (get_thread_lwp): Update.
8657 (struct lwp_info): Delete member "entry". Simplify comment for
8660 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8661 current_inferior directly.
8662 (update_watch_registers_callback): Update, "entry" parameter is a
8663 struct thread_info * now. Fetch pid from thread.
8664 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8665 (mips_insert_point): Fetch lwpid from current_inferior.
8666 Pass &all_threads to find_inferior, not &all_lwps.
8667 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8668 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8670 (mips_stopped_data_address): Ditto.
8671 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8673 * linux-tile-low.c (tile_arch_setup): Ditto.
8674 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8675 (update_debug_registers_callback): Update, "entry" parameter is a
8676 struct thread_info * now. Fetch pid from thread.
8677 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8678 Pass &all_threads to find_inferior, not &all_lwps.
8679 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8680 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8681 Pass &all_threads to find_inferior, not &all_lwps.
8682 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8683 (i386_dr_low_get_status): Ditto.
8684 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8685 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8686 (x86_linux_read_description): Ditto.
8687 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8689 2014-02-20 Doug Evans <dje@google.com>
8691 * inferiors.c (get_first_inferior): Fix buglet.
8693 2014-02-19 Doug Evans <dje@google.com>
8695 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8696 * inferiors.c (add_thread): Change result type to struct thread_info *.
8697 All callers updated.
8698 (add_lwp): Call add_thread here instead of in callers.
8699 All callers updated.
8700 * linux-low.h (get_lwp_thread): Rewrite.
8701 (struct lwp_info): New member "thread".
8703 2014-02-19 Doug Evans <dje@google.com>
8705 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8706 All callers updated.
8708 2014-02-19 Doug Evans <dje@google.com>
8710 * inferiors.c (add_thread): Fix whitespace.
8712 2014-02-19 Doug Evans <dje@google.com>
8714 * dll.c (clear_dlls): Replace accessing list implemention details
8716 * gdbthread.h (get_first_thread): Declare.
8717 * inferiors.c (for_each_inferior_with_data): New function.
8718 (get_first_thread): New function.
8719 (find_thread_ptid): Simplify.
8720 (get_first_inferior): New function.
8721 (clear_list): Delete.
8722 (one_inferior_p): New function.
8723 (clear_inferior_list): New function.
8724 (clear_inferiors): Update.
8725 * inferiors.h (for_each_inferior_with_data): Declare.
8726 (clear_inferior_list): Declare.
8727 (one_inferior_p): Declare.
8728 (get_first_inferior): Declare.
8729 * linux-low.c (linux_wait_for_event): Replace accessing list
8730 implemention details with API function.
8731 * server.c (target_running): Ditto.
8732 (accumulate_file_name_length): New function.
8733 (emit_dll_description): New function.
8734 (handle_qxfer_libraries): Replace accessing list implemention
8735 details with API function.
8736 (handle_qxfer_threads_worker): New function.
8737 (handle_qxfer_threads_proper): Replace accessing list implemention
8738 details with API function.
8739 (handle_query): Ditto.
8740 (visit_actioned_threads_callback_ftype): New typedef.
8741 (visit_actioned_threads_data): New struct.
8742 (visit_actioned_threads): Rewrite to be find_inferior callback.
8743 (resume): Call find_inferior.
8744 (handle_status): Replace accessing list implemention
8745 details with API function.
8746 (process_serial_event): Replace accessing list implemention details
8748 * target.c (set_desired_inferior): Replace accessing list implemention
8749 details with API function.
8750 * tracepoint.c (same_process_p): New function.
8751 (gdb_agent_about_to_close): Replace accessing list implemention
8752 details with API function.
8753 * win32-low.c (child_delete_thread): Replace accessing list
8754 implemention details with API function.
8755 (match_dll_by_basename): New function.
8756 (dll_is_loaded_by_basename): New function.
8757 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8758 details call to dll_is_loaded_by_basename.
8760 2014-02-19 Doug Evans <dje@google.com>
8762 * dll.h (struct dll_info): Add comment.
8763 * gdbthread.h (struct thread_info): Add comment.
8764 (current_ptid): Simplify.
8765 * inferiors.c (add_process): Update.
8766 (remove_process): Update.
8767 * inferiors.h (struct process_info): Rename member "head" to "entry".
8768 * linux-low.c (delete_lwp): Update.
8770 (last_thread_of_process_p): Update.
8771 (kill_one_lwp_callback, linux_kill): Update.
8772 (status_pending_p_callback): Update.
8773 (wait_for_sigstop): Update. Simplify read of ptid.
8774 (start_step_over): Update.
8775 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8776 (get_lwp_thread): Update.
8777 (struct lwp_info): Rename member "head" to "entry".
8778 * regcache.h (inferior_list_entry): Delete.
8779 * server.c (kill_inferior_callback): Update.
8780 (detach_or_kill_inferior_callback): Update.
8781 (print_started_pid): Update.
8782 (print_attached_pid): Update.
8783 (process_serial_event): Simplify read of ptid.
8784 * thread-db.c (thread_db_create_event): Update.
8785 (thread_db_get_tls_address): Update.
8786 * win32-low.c (current_inferior_ptid): Simplify.
8788 2014-02-19 Tom Tromey <tromey@redhat.com>
8790 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8792 (target_supports_btrace): Update.
8794 2014-02-14 Yao Qi <yao@codesourcery.com>
8796 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8797 (rsp-low-ipa.o): New target.
8799 2014-02-12 Tom Tromey <tromey@redhat.com>
8801 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8802 convert_ascii_to_int.
8803 * regcache.c (registers_to_string): Likewise.
8804 * remote-utils.c (decode_M_packet): Likewise.
8805 * server.c (process_serial_event): Likewise.
8807 2014-02-12 Tom Tromey <tromey@redhat.com>
8809 * server.c (handle_query, handle_v_run): Use hex2bin, not
8811 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8813 2014-02-12 Tom Tromey <tromey@redhat.com>
8815 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8816 convert_int_to_ascii.
8817 * regcache.c (registers_to_string, collect_register_as_string):
8819 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8821 * server.c (process_serial_event): Likewise.
8822 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8823 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8825 2014-02-12 Tom Tromey <tromey@redhat.com>
8827 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8828 bin2hex, not hexify.
8829 * tracepoint.c (cmd_qtstatus): Likewise.
8831 2014-02-12 Tom Tromey <tromey@redhat.com>
8833 * remote-utils.c (monitor_output): Pass explicit length to
8836 2014-02-12 Tom Tromey <tromey@redhat.com>
8838 * tracepoint.c: Include rsp-low.h.
8839 * server.c: Include rsp-low.h.
8840 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8841 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8843 * remote-utils.c: Include rsp-low.h.
8844 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8845 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8846 (convert_int_to_ascii, convert_ascii_to_int): Move to
8848 * regcache.c: Include rsp-low.h.
8849 * ax.c: Include rsp-low.h.
8850 * Makefile.in (SFILES): Add common/rsp-low.c.
8851 (OBS): Add rsp-low.o.
8852 (rsp-low.o): New target.
8854 2014-02-12 Tom Tromey <tromey@redhat.com>
8856 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8857 Include print-utils.h.
8858 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8859 (plongest, thirty_two, phex_nz): Remove.
8860 * Makefile.in (SFILES): Add common/print-utils.c.
8861 (OBS): Add print-utils.o.
8862 (print-utils-ipa.o): New target.
8863 (print-utils.o): New target.
8864 (IPA_OBJS): Add print-utils-ipa.o.
8866 2014-02-06 Tom Tromey <tromey@redhat.com>
8868 * Makefile.in (SFILES): Fix indentation.
8870 2014-02-05 Doug Evans <dje@google.com>
8872 * linux-low.c (linux_wait_for_event): Improve comment.
8873 (linux_wait_1): Keep current_inferior in sync with event_child.
8875 2014-01-22 Doug Evans <dje@google.com>
8877 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8879 2014-01-22 Doug Evans <dje@google.com>
8881 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8882 * configure: Regenerate.
8883 * config.in: Regenerate.
8884 * Makefile.in (SFILES): Add debug.c.
8886 * debug.c: New file.
8887 * debug.h: New file.
8888 * linux-aarch64-low.c (*): Update all debugging printfs to use
8889 debug_printf instead of fprintf.
8890 * linux-arm-low.c (*): Ditto.
8891 * linux-cris-low.c (*): Ditto.
8892 * linux-crisv32-low.c (*): Ditto.
8893 * linux-m32r-low.c (*): Ditto.
8894 * linux-sparc-low.c (*): Ditto.
8895 * linux-x86.c (*): Ditto.
8896 * linux-low.c (*): Ditto.
8897 (linux_wait_1): Add calls to debug_enter, debug_exit.
8898 (linux_wait): Remove redundant debugging printf.
8899 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8900 (linux_resume, unstop_all_lwps): Ditto.
8901 * mem-break.c (*): Update all debugging printfs to use
8902 debug_printf instead of fprintf.
8903 * remote-utils.c (*): Ditto.
8904 * thread-db.c (*): Ditto.
8905 * server.c #include <ctype.h>, "gdb_vecs.h".
8906 (debug_threads): Moved to debug.c.
8907 (*): Update all debugging printfs to use debug_printf instead of
8909 (start_inferior): Replace call to fflush with call to debug_flush.
8910 (monitor_show_help): Mention set debug-format.
8911 (parse_debug_format_options): New function.
8912 (handle_monitor_command): Handle "monitor set debug-format".
8913 (gdbserver_usage): Mention --debug-format.
8914 (main): Parse --debug-format.
8915 * server.h (debug_threads): Declaration moved to debug.h.
8917 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8918 trace_debug_1 that uses debug_printf.
8919 (tracepoint_look_up_symbols): Update all debugging printfs to use
8920 debug_printf instead of fprintf.
8922 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8924 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8927 2014-01-17 Pedro Alves <palves@redhat.com>
8930 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8931 defined after including gdb_proc_service.h.
8933 2014-01-16 Doug Evans <dje@google.com>
8935 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8936 (match_dll): Use it.
8938 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8940 * target.h (target_ops) <read_btrace>: Change parameters and
8941 return type to allow error reporting.
8942 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8943 trace reading errors on.
8944 * linux-low.c (linux_low_read_btrace): Pass trace reading
8946 (linux_low_disable_btrace): New.
8948 2014-01-15 Doug Evans <dje@google.com>
8950 * inferiors.c (thread_id_to_gdb_id): Delete.
8951 * inferiors.h (thread_id_to_gdb_id): Delete.
8953 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8955 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8956 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8959 2014-01-08 Pedro Alves <palves@redhat.com>
8961 * server.c (handle_status): Don't discard previous queued stop
8962 replies or thread's pending status here.
8963 (main) <disconnection>: Do it here instead.
8965 2014-01-08 Pedro Alves <palves@redhat.com>
8967 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8968 * server.c (visit_actioned_threads, handle_pending_status): New
8970 (handle_v_cont): Factor out parts to ...
8971 (resume): ... this new function. If in all-stop, and a thread
8972 being resumed has a pending status, report it without actually
8974 (myresume): Adjust to use the new 'resume' function.
8975 (clear_pending_status_callback, set_pending_status_callback)
8976 (find_status_pending_thread_callback): New functions.
8977 (handle_status): Handle the case of multiple threads having
8978 interesting statuses to report. Report threads' real last signal
8979 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8980 with an interesting thread to report the status for, instead of
8981 always reporting the status of the first thread.
8983 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8985 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8986 * gdbreplay.c (gdbreplay_version): Likewise.
8988 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8990 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8991 iov.iov_len with the real length in use.
8993 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8995 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8996 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8997 for all targets that use win32-low.c.
8998 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8999 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
9001 2013-12-13 Pedro Alves <palves@redhat.com>
9003 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
9004 if equal to TARGET_WAITKIND_LOADED.
9005 * win32-low.c (cached_status): New static global.
9006 (win32_wait): Add declaration.
9007 (do_initial_child_stuff): Flush all initial pending debug events
9008 up to the initial breakpoint.
9009 (win32_wait): If CACHED_STATUS was set, return that instead
9010 of doing a real wait. Remove the code resuming the execution
9011 of the inferior after receiving a TARGET_WAITKIND_LOADED event
9012 during the initial phase. Also remove the code changing
9013 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
9014 TARGET_WAITKIND_STOPPED.
9016 2013-12-11 Yao Qi <yao@codesourcery.com>
9018 * notif.c (handle_notif_ack): Return 0 if no notification
9021 2013-11-20 Doug Evans <dje@google.com>
9023 * linux-low.c (linux_set_resume_request): Fix comment.
9025 2013-11-20 Doug Evans <dje@google.com>
9027 * linux-low.c (resume_status_pending_p): Tweak comment.
9029 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
9031 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
9032 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
9033 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
9034 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
9035 (srv_amd64_regobj): Add amd64-mpx.o.
9036 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
9037 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
9038 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
9039 * i387-fp.c (num_pl_bnd_register) Added constant.
9040 (num_pl_bnd_cfg_registers) Added constant.
9041 (struct i387_xsave) Added reserved area and MPX fields.
9042 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
9043 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
9045 (tdesc_i386_mpx_linux): Add MPX amd64 target.
9046 (init_registers_amd64_mpx_linux): Declare new function.
9047 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
9048 (x86_64_regmap): Add MPX registers.
9049 (x86_linux_read_description): Add MPX case.
9050 (initialize_low_arch): Initialize MPX targets.
9052 2013-11-18 Tom Tromey <tromey@redhat.com>
9054 * configure: Rebuild.
9055 * configure.ac: Don't check for stdlib.h.
9056 * gdbreplay.c: Unconditionally include stdlib.h.
9058 2013-11-18 Tom Tromey <tromey@redhat.com>
9060 * config.in: Rebuild.
9061 * configure: Rebuild.
9062 * configure.ac: Don't use AC_HEADER_DIRENT.
9064 2013-11-18 Tom Tromey <tromey@redhat.com>
9066 * server.h: Don't check HAVE_STRING_H.
9067 * gdbreplay.c: Don't check HAVE_STRING_H.
9068 * configure: Rebuild.
9070 2013-11-18 Tom Tromey <tromey@redhat.com>
9072 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
9075 2013-11-08 Tom Tromey <tromey@redhat.com>
9077 * configure, config.in: Rebuild.
9078 * configure.ac: Remove unused configury.
9080 2013-11-08 Tom Tromey <tromey@redhat.com>
9082 * acinclude.m4: Include common.m4, codeset.m4.
9083 * configure, config.in: Rebuild.
9084 * configure.ac: Use GDB_AC_COMMON.
9086 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
9088 * linux-s390-low.c (HWCAP_S390_TE): New define.
9089 (s390_arch_setup): Consider the TE field in the HWCAP for
9090 determining 'have_regset_tdb'.
9092 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
9095 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
9098 2013-10-02 Pedro Alves <palves@redhat.com>
9100 * server.c (process_serial_event): Don't output "GDBserver
9101 exiting" if GDB is connected through stdio.
9102 * target.c (mywait): Likewise, be silent if GDB is connected
9105 2013-10-01 Joel Brobecker <brobecker@adacore.com>
9107 * lynx-low.c (lynx_add_threads_after_attach): New function.
9108 (lynx_attach): Remove call to add_thread. Add call to
9109 lynx_add_threads_after_attach instead.
9111 2013-09-28 Mike Frysinger <vapier@gentoo.org>
9113 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
9114 * config.in, configure: Regenerated.
9116 2013-09-18 Yao Qi <yao@codesourcery.com>
9119 * server.c (start_inferior): Clear 'resume_info'.
9121 2013-09-16 Jiong Wang <jiwang@tilera.com>
9123 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
9126 2013-09-16 Jiong Wang <jiwang@tilera.com>
9128 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
9129 linux-tile-low.o to srv_tgtobj.
9131 2013-09-16 Will Newton <will.newton@linaro.org>
9133 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
9136 2013-09-06 Pedro Alves <palves@redhat.com>
9138 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
9139 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
9140 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
9141 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
9142 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
9143 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
9145 2013-09-06 Pedro Alves <palves@redhat.com>
9147 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
9148 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
9150 2013-09-06 Pedro Alves <palves@redhat.com>
9152 * linux-amd64-ipa.c: Include tracepoint.h.
9153 * linux-i386-ipa.c: Include tracepoint.h.
9155 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9157 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
9158 (ps_get_thread_area): New function.
9160 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
9162 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
9163 (initialize_low_arch): Call init_registers_crisv32 rather than
9164 init_register_crisv32.
9166 2013-09-05 Pedro Alves <palves@redhat.com>
9168 * server.h (handle_vFile, hostio_last_error_from_errno): Move
9170 * hostio.h: ... this new file.
9171 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
9172 win32-low.c: Include hostio.h.
9174 2013-09-05 Pedro Alves <palves@redhat.com>
9176 * server.h (gdb_client_data, handler_func, callback_handler_func)
9177 (delete_file_handler, add_file_handler, append_callback_event)
9178 (delete_callback_event, start_event_loop, initialize_event_loop):
9179 Move to event-loop.h and include it.
9180 * event-loop.h: New file.
9182 2013-09-05 Pedro Alves <palves@redhat.com>
9184 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
9185 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
9186 (loaded_dll, unloaded_dll): Move to ...
9187 * dll.h: ... this new file.
9188 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
9190 2013-09-05 Pedro Alves <palves@redhat.com>
9192 * server.h (current_process, get_thread_process, all_processes)
9193 (add_inferior_to_list, for_each_inferior, current_inferior)
9194 (remove_inferior, add_process, remove_process, find_process_pid)
9195 (have_started_inferiors_p, have_attached_inferiors_p)
9196 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
9197 (clear_inferiors, find_inferior, find_inferior_id)
9198 (inferior_target_data, set_inferior_target_data)
9199 (inferior_regcache_data, set_inferior_regcache_data): Move to
9200 inferiors.h, and include it.
9201 * inferiors.h: New file.
9203 2013-09-05 Pedro Alves <palves@redhat.com>
9205 * server.h (struct emit_ops, current_insn_ptr, emit_error):
9209 2013-09-05 Pedro Alves <palves@redhat.com>
9211 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
9213 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
9214 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
9215 (handle_tracepoint_general_set, handle_tracepoint_query)
9216 (tracepoint_finished_step, tracepoint_was_hit)
9217 (release_while_stepping_state_list, current_traceframe)
9218 (in_readonly_region, traceframe_read_mem)
9219 (fetch_traceframe_registers, traceframe_read_sdata)
9220 (traceframe_read_info, struct fast_tpoint_collect_status)
9221 (fast_tracepoint_collecting, force_unlock_trace_buffer)
9222 (handle_tracepoit_bkpts, initialize_low_tracepoint)
9223 (supply_fast_tracepoint_registers)
9224 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
9225 (ipa_tdesc, claim_trampoline_space)
9226 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
9227 (agent_mem_read, agent_get_trace_state_variable_value)
9228 (agent_set_trace_state_variable_value, agent_tsv_read)
9229 (agent_mem_read_string, get_raw_reg_func_addr)
9230 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
9231 * tracepoint.h: ... this new file.
9233 2013-09-05 Pedro Alves <palves@redhat.com>
9235 * server.h (perror_with_name, error, fatal, warning, paddress)
9236 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
9238 * utils.h: New file.
9240 2013-09-05 Pedro Alves <palves@redhat.com>
9242 * server.h (remote_debug, noack_mode, transport_is_reliable)
9243 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
9244 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
9245 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
9246 (write_enn, initialize_async_io, enable_async_io)
9247 (disable_async_io, check_remote_input_interrupt_request)
9248 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
9249 (dead_thread_notify, prepare_resume_reply)
9250 (decode_address_to_semicolon, decode_address, decode_m_packet)
9251 (decode_M_packet, decode_X_packet, decode_xfer_write)
9252 (decode_search_memory_packet, unhexify, hexify)
9253 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
9254 (look_up_one_symbol, relocate_instruction)
9255 (monitor_output): Move to remote-utils.h, and include it.
9256 * remote-utils.h: New file.
9258 2013-09-05 Pedro Alves <palves@redhat.com>
9260 * server.h (_): Delete.
9262 2013-09-02 Pedro Alves <palves@redhat.com>
9264 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
9265 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
9267 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
9269 2013-09-02 Pierre Muller <muller@sourceware.org>
9271 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
9272 or WriteProcessMemory complete successfully and handle
9273 ERROR_PARTIAL_COPY error.
9275 2013-09-02 Pedro Alves <palves@redhat.com>
9277 * server.c (gdb_read_memory): Return -1 on traceframe memory read
9278 error instead of EIO.
9280 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9283 * linux-low.c: Include filestuff.h.
9284 (linux_create_inferior) <pid == 0>: Call close_most_fds.
9285 * lynx-low.c: Include filestuff.h.
9286 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
9287 * server.c: Include filestuff.h.
9288 (main): Call notice_open_fds.
9289 * spu-low.c: Include filestuff.h.
9290 (spu_create_inferior) <pid == 0>: Call close_most_fds.
9292 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
9294 * Makefile.in: Explain why ../target and ../nat are not
9295 listed as include file search paths.
9296 (linux-waitpid.o): New object file rule.
9297 * configure.srv (srv_native_linux_obj): New variable.
9298 Replace all occurrences of linux native object files with
9299 $srv_native_linux_obj.
9300 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
9301 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
9302 (linux_enable_event_reporting): Remove declaration.
9303 (my_waitpid): Moved to common/linux-waitpid.c.
9304 (linux_wait_for_event): Pass ptid when calling
9305 linux_enable_event_reporting.
9306 (linux_supports_tracefork_flag): Remove.
9307 (linux_enable_event_reporting): Likewise.
9308 (linux_tracefork_grandchild): Remove.
9309 (STACK_SIZE): Moved to common/linux-ptrace.c.
9310 (linux_tracefork_child): Remove.
9311 (linux_test_for_tracefork): Remove.
9312 (linux_look_up_symbols): Call linux_supports_traceclone.
9313 (initialize_low): Remove call to linux_test_for_tracefork.
9314 * linux-low.h (PTRACE_TYPE_ARG3): Move to
9315 common/linux-ptrace.h.
9316 (PTRACE_TYPE_ARG4): Likewise.
9317 Include linux-ptrace.h.
9319 2013-08-21 Pedro Alves <palves@redhat.com>
9321 * config.in: Renegerate.
9323 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
9325 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
9326 (SFILES): Remove $(srcdir)/common/target-common.c and
9327 add $(srcdir)/target/waitstatus.c.
9328 (OBS): Remove target-common.o and add waitstatus.o.
9329 (server_h): Remove $(srcdir)/../common/target-common.h and
9330 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
9331 and $(srcdir)/../target/waitstatus.h.
9332 (target-common.o): Remove.
9333 (waitstatus.o): New target object file.
9334 * target.h: Do not include target-common.h and
9335 include target/resume.h, target/wait.h and
9336 target/waitstatus.h.
9338 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
9340 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9341 to PTRACE_TYPE_ARG3.
9342 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
9343 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
9345 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
9346 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
9348 2013-07-27 Jie Zhang <jie@codesourcery.com>
9349 Daniel Jacobowitz <dan@codesourcery.com>
9350 Yao Qi <yao@codesourcery.com>
9352 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
9353 (mips-linux-watch.o): New rule.
9354 (mips_linux_watch_h): New variable.
9355 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9357 * linux-mips-low.c: Include mips-linux-watch.h.
9358 (struct arch_process_info, struct arch_lwp_info): New.
9359 (update_watch_registers_callback): New function.
9360 (mips_linux_new_process, mips_linux_new_thread) New functions.
9361 (mips_linux_prepare_to_resume, mips_insert_point): New
9363 (mips_remove_point, mips_stopped_by_watchpoint): New
9365 (rsp_bp_type_to_target_hw_bp_type): New function.
9366 (mips_stopped_data_address): New function.
9367 (the_low_target): Add watchpoint support functions.
9369 2013-07-27 Yao Qi <yao@codesourcery.com>
9371 * i386-low.c: Include break-common.h.
9372 (enum target_hw_bp_type): Remove.
9374 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9376 * Makefile.in (SFILES): /common/target-common.c.
9377 (OBS): Add target-common.o.
9378 (server_h): Add $(srcdir)/../common/target-common.h.
9379 (target-common.o): New target.
9380 * server.c (queue_stop_reply_callback): Free
9381 status string after use.
9382 * target.c (target_waitstatus_to_string): Remove.
9383 * target.h: Include target-common.h.
9384 (resume_kind): Likewise.
9385 (target_waitkind): Likewise.
9386 (target_waitstatus): Likewise.
9387 (TARGET_WNOHANG): Likewise.
9389 2013-07-04 Yao Qi <yao@codesourcery.com>
9391 * Makefile.in (host_alias): Use @host_noncanonical@.
9392 (target_alias): Use @target_noncanonical@.
9393 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9394 ACX_NONCANONICAL_HOST.
9395 * configure: Regenerated.
9398 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9400 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9401 * configure: Rebuild.
9402 * Makefile.in (version_host, version_target): Get from configure.
9403 (version.c): Use $(version_host) and $(version_target).
9405 2013-07-03 Pedro Alves <palves@redhat.com>
9407 * Makefile.in (config.status): Depend on development.sh.
9408 * acinclude.m4: Include libmcheck.m4.
9409 * configure: Regenerate.
9411 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9413 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9414 attribute inside the parentheses.
9415 (winapi_DebugSetProcessKillOnExit): Ditto.
9416 (winapi_DebugBreakProcess): Ditto.
9417 (winapi_GenerateConsoleCtrlEvent): Ditto.
9419 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9421 * notif.h (notif_event): Add a dummy member to avoid compiler
9424 2013-07-01 Pedro Alves <palves@redhat.com>
9426 * hostio.c (HOSTIO_PATH_MAX): Define.
9427 (require_filename, handle_open, handle_unlink, handle_readlink):
9430 2013-07-01 Pedro Alves <palves@redhat.com>
9432 * server.h: Include "pathmax.h".
9433 * linux-low.c: Don't include sys/param.h.
9434 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9436 * win32-low.c: Don't include sys/param.h.
9437 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9439 2013-07-01 Pedro Alves <palves@redhat.com>
9441 * event-loop.c: Don't check HAVE_UNISTD_H before including
9443 * gdbreplay.c: Likewise.
9444 * remote-utils.c: Likewise.
9445 * server.c: Likewise.
9446 * configure.ac: Don't check for unistd.h.
9447 * configure: Regenerate.
9449 2013-06-28 Tom Tromey <tromey@redhat.com>
9451 * Makefile.in (version.c): Use version.in, not
9454 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9456 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9457 * configure: Rebuild.
9458 * Makefile.in (version_host, version_target): Get from configure.
9459 (version.c): Use $(version_host) and $(version_target).
9461 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9463 Fix trace-status to output user name without trailing colon.
9464 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9466 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9468 Fix trace-status to output proper start-time and stop-time.
9469 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9470 output start time and stop time in hex as gdb expects.
9472 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9474 * tracepoint.c (build_traceframe_info_xml): Output trace state
9475 variables present in the trace buffer.
9477 2013-06-24 Tom Tromey <tromey@redhat.com>
9479 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9481 (version.o): Remove.
9482 * gdbreplay.c: Include version.h.
9483 (version, host_name): Don't declare.
9484 * server.h: Include version.h.
9485 (version, host_name): Don't declare.
9487 2013-06-12 Pedro Alves <palves@redhat.com>
9489 * linux-x86-low.c (linux_is_elf64): Delete global.
9490 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9491 with local linux_pid_exe_is_elf_64_file use.
9493 2013-06-11 Pedro Alves <palves@redhat.com>
9495 * linux-low.c (regset_disabled, disable_regset): New functions.
9496 (regsets_fetch_inferior_registers)
9497 (regsets_store_inferior_registers): Use them.
9498 (initialize_regsets_info); Don't allocate the disabled_regsets
9500 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9503 2013-06-11 Pedro Alves <palves@redhat.com>
9505 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9508 2013-06-11 Pedro Alves <palves@redhat.com>
9510 * linux-x86-low.c (initialize_low_arch): Call
9511 init_registers_x32_avx_linux.
9513 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9515 Fix compatibility with Android Bionic.
9516 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9519 2013-06-07 Pedro Alves <palves@redhat.com>
9522 * Makefile.in (OBS): Add tdesc.o.
9523 (IPA_OBJS): Add tdesc-ipa.o.
9524 (tdesc-ipa.o): New rule.
9525 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9527 * linux-low.c (new_inferior): Delete.
9528 (disabled_regsets, num_regsets): Delete.
9529 (linux_add_process): Adjust to set the new per-process
9531 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9532 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9533 was a stop. When calling arch_setup, switch the current inferior
9534 to the thread that got an event.
9535 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9536 (regsets_fetch_inferior_registers)
9537 (regsets_store_inferior_registers): New regsets_info parameter.
9539 (linux_register_in_regsets): New regs_info parameter. Adjust to
9541 (register_addr, fetch_register, store_register): New usrregs_info
9542 parameter. Adjust to use it.
9543 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9544 parameter regs_info. Adjust to use it.
9545 (linux_fetch_registers): Get the current inferior's regs_info, and
9547 (linux_store_registers): Ditto.
9548 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9549 (initialize_low): Don't initialize the target_regsets here. Call
9550 initialize_low_arch.
9551 * linux-low.h (target_regsets): Delete declaration.
9552 (struct regsets_info): New.
9553 (struct usrregs_info): New.
9554 (struct regs_info): New.
9555 (struct process_info_private) <new_inferior>: New field.
9556 (struct linux_target_ops): Delete the num_regs, regmap, and
9557 regset_bitmap fields. New field regs_info.
9558 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9559 * i387-fp.c (num_xmm_registers): Delete.
9560 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9561 calls to new interface.
9562 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9563 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9564 Infer the number of xmm registers from the regcache's target
9566 * i387-fp.h (num_xmm_registers): Delete.
9567 * inferiors.c (add_thread): Don't install the thread's regcache
9569 * proc-service.c (gregset_info): Fetch the current inferior's
9570 regs_info. Adjust to use it.
9571 * regcache.c: Include tdesc.h.
9572 (register_bytes, reg_defs, num_registers)
9573 (gdbserver_expedite_regs): Delete.
9574 (get_thread_regcache): If the thread doesn't have a regcache yet,
9575 create one, instead of aborting gdbserver.
9576 (regcache_invalidate_one): Rename to ...
9577 (regcache_invalidate_thread): ... this.
9578 (regcache_invalidate_one): New.
9579 (regcache_invalidate): Only invalidate registers of the current
9581 (init_register_cache): Add target_desc parameter, and use it.
9582 (new_register_cache): Ditto. Assert the target description has a
9583 non zero registers_size.
9584 (regcache_cpy): Add assertions. Adjust.
9585 (realloc_register_cache, set_register_cache): Delete.
9586 (registers_to_string, registers_from_string): Adjust.
9587 (find_register_by_name, find_regno, find_register_by_number)
9588 (register_cache_size): Add target_desc parameter, and use it.
9589 (free_register_cache_thread, free_register_cache_thread_one)
9590 (regcache_release, register_cache_size): New.
9591 (register_size): Add target_desc parameter, and use it.
9592 (register_data, supply_register, supply_register_zeroed)
9593 (supply_regblock, supply_register_by_name, collect_register)
9594 (collect_register_as_string, collect_register_by_name): Adjust.
9595 * regcache.h (struct target_desc): Forward declare.
9596 (struct regcache) <tdesc>: New field.
9597 (init_register_cache, new_register_cache): Add target_desc
9599 (regcache_invalidate_thread): Declare.
9600 (regcache_invalidate_one): Delete declaration.
9601 (regcache_release): Declare.
9602 (find_register_by_number, register_cache_size, register_size)
9603 (find_regno): Add target_desc parameter.
9604 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9606 * remote-utils.c: Include tdesc.h.
9607 (outreg, prepare_resume_reply): Adjust.
9608 * server.c: Include tdesc.h.
9609 (gdbserver_xmltarget): Delete declaration.
9610 (get_features_xml, process_serial_event): Adjust.
9611 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9613 (struct process_info) <tdesc>: New field.
9614 (ipa_tdesc): Declare.
9615 * tdesc.c: New file.
9616 * tdesc.h: New file.
9617 * tracepoint.c: Include tdesc.h.
9618 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9619 (get_context_regcache): Adjust to pass ipa_tdesc down.
9620 (do_action_at_tracepoint): Adjust to get the register cache size
9621 from the context regcache's description.
9622 (traceframe_walk_blocks): Adjust to get the register cache size
9623 from the current trace frame's description.
9624 (traceframe_get_pc): Adjust to get current trace frame's
9625 description and pass it down.
9626 (gdb_collect): Adjust to get the register cache size from the
9628 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9629 (gdbserver_xmltarget): Delete.
9630 (initialize_low_tracepoint): Set the ipa's target description.
9631 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9632 (initialize_low_tracepoint): Set the ipa's target description.
9633 * linux-x86-low.c: Include tdesc.h.
9634 [__x86_64__] (is_64bit_tdesc): New.
9635 (ps_get_thread_area, x86_get_thread_area): Use it.
9636 (i386_cannot_store_register): Rename to ...
9637 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9638 (i386_cannot_fetch_register): Rename to ...
9639 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9640 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9642 (target_regsets): Rename to ...
9643 (x86_regsets): ... this.
9644 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9646 (x86_siginfo_fixup): Use is_64bit_tdesc.
9647 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9648 (tdesc_x32_avx_linux, tdesc_x32_linux)
9649 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9651 (x86_linux_update_xmltarget): Delete.
9652 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9653 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9654 (AMD64_LINUX_USER64_CS): New.
9655 (x86_linux_read_description): New, based on
9656 x86_linux_update_xmltarget.
9657 (same_process_callback): New.
9658 (x86_arch_setup_process_callback): New.
9659 (x86_linux_update_xmltarget): New.
9660 (x86_regsets_info): New.
9661 (amd64_linux_regs_info): New.
9662 (i386_linux_usrregs_info): New.
9663 (i386_linux_regs_info): New.
9664 (x86_linux_regs_info): New.
9665 (x86_arch_setup): Reimplement.
9666 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9667 (x86_emit_ops): Ditto.
9668 (the_low_target): Adjust. Install x86_linux_regs_info,
9669 x86_cannot_fetch_register, and x86_cannot_store_register.
9670 (initialize_low_arch): New.
9671 * linux-ia64-low.c (tdesc_ia64): Declare.
9672 (ia64_fetch_register): Adjust.
9673 (ia64_usrregs_info, regs_info): New globals.
9674 (ia64_regs_info): New function.
9675 (the_low_target): Adjust.
9676 (initialize_low_arch): New function.
9677 * linux-sparc-low.c (tdesc_sparc64): Declare.
9678 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9680 (sparc_arch_setup): New function.
9681 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9682 (the_low_target): Adjust.
9683 (initialize_low_arch): New function.
9684 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9685 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9686 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9687 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9688 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9689 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9690 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9691 (tdesc_powerpc_isa205_vsx64l): Declare.
9692 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9693 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9694 (ppc_set_pc, ppc_get_hwcap): Adjust.
9695 (ppc_usrregs_info): Forward declare.
9696 (!__powerpc64__) ppc_regmap_adjusted: New global.
9697 (ppc_arch_setup): Adjust to the current process'es target
9699 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9700 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9701 (ppc_store_evrregset): Adjust.
9702 (target_regsets): Rename to ...
9703 (ppc_regsets): ... this, and make static.
9704 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9705 (ppc_regs_info): New function.
9706 (the_low_target): Adjust.
9707 (initialize_low_arch): New function.
9708 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9709 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9710 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9711 (tdesc_s390x_linux64v2): Declare.
9712 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9713 (s390_fill_gregset, s390_store_last_break): Adjust.
9714 (target_regsets): Rename to ...
9715 (s390_regsets): ... this, and make static.
9716 (s390_get_pc, s390_set_pc): Adjust.
9717 (s390_get_hwcap): New target_desc parameter, and use it.
9718 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9719 (s390_arch_setup): Adjust to set the current process'es target
9720 description. Don't adjust the regmap.
9721 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9722 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9723 (regs_info_3264): New globals.
9724 (s390_regs_info): New function.
9725 (the_low_target): Adjust.
9726 (initialize_low_arch): New function.
9727 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9728 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9729 [__mips64] (init_registers_mips_linux)
9730 (init_registers_mips_dsp_linux): Delete defines.
9731 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9732 (have_dsp): New global.
9733 (mips_read_description): New, based on mips_arch_setup.
9734 (mips_arch_setup): Reimplement.
9735 (get_usrregs_info): New function.
9736 (mips_cannot_fetch_register, mips_cannot_store_register)
9737 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9738 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9739 (target_regsets): Rename to ...
9740 (mips_regsets): ... this, and make static.
9741 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9742 (dsp_regs_info, regs_info): New globals.
9743 (mips_regs_info): New function.
9744 (the_low_target): Adjust.
9745 (initialize_low_arch): New function.
9746 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9747 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9749 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9750 (arm_read_description): New, with bits factored from
9752 (arm_arch_setup): Reimplement.
9753 (target_regsets): Rename to ...
9754 (arm_regsets): ... this, and make static.
9755 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9756 (arm_regs_info): New function.
9757 (the_low_target): Adjust.
9758 (initialize_low_arch): New function.
9759 * linux-m68k-low.c (tdesc_m68k): Declare.
9760 (target_regsets): Rename to ...
9761 (m68k_regsets): ... this, and make static.
9762 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9763 (m68k_regs_info): New function.
9764 (m68k_arch_setup): New function.
9765 (the_low_target): Adjust.
9766 (initialize_low_arch): New function.
9767 * linux-sh-low.c (tdesc_sharch): Declare.
9768 (target_regsets): Rename to ...
9769 (sh_regsets): ... this, and make static.
9770 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9771 (sh_regs_info, sh_arch_setup): New functions.
9772 (the_low_target): Adjust.
9773 (initialize_low_arch): New function.
9774 * linux-bfin-low.c (tdesc_bfin): Declare.
9775 (bfin_arch_setup): New function.
9776 (bfin_usrregs_info, regs_info): New globals.
9777 (bfin_regs_info): New function.
9778 (the_low_target): Adjust.
9779 (initialize_low_arch): New function.
9780 * linux-cris-low.c (tdesc_cris): Declare.
9781 (cris_arch_setup): New function.
9782 (cris_usrregs_info, regs_info): New globals.
9783 (cris_regs_info): New function.
9784 (the_low_target): Adjust.
9785 (initialize_low_arch): New function.
9786 * linux-cris-low.c (tdesc_crisv32): Declare.
9787 (cris_arch_setup): New function.
9788 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9789 (cris_regs_info): New function.
9790 (the_low_target): Adjust.
9791 (initialize_low_arch): New function.
9792 * linux-m32r-low.c (tdesc_m32r): Declare.
9793 (m32r_arch_setup): New function.
9794 (m32r_usrregs_info, regs_info): New globals.
9795 (m32r_regs_info): Adjust.
9796 (initialize_low_arch): New function.
9797 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9798 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9799 (tic6x_usrregs_info): Forward declare.
9800 (tic6x_read_description): New function, based on ...
9801 (tic6x_arch_setup): ... this. Reimplement.
9802 (target_regsets): Rename to ...
9803 (tic6x_regsets): ... this, and make static.
9804 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9805 (tic6x_regs_info): New function.
9806 (the_low_target): Adjust.
9807 (initialize_low_arch): New function.
9808 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9809 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9810 (target_regsets): Rename to ...
9811 (xtensa_regsets): ... this, and make static.
9812 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9814 (xtensa_arch_setup, xtensa_regs_info): New functions.
9815 (the_low_target): Adjust.
9816 (initialize_low_arch): New function.
9817 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9818 (nios2_arch_setup): Set the current process'es tdesc.
9819 (target_regsets): Rename to ...
9820 (nios2_regsets): ... this.
9821 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9822 (nios2_regs_info): New function.
9823 (the_low_target): Adjust.
9824 (initialize_low_arch): New function.
9825 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9826 (aarch64_arch_setup): Set the current process'es tdesc.
9827 (target_regsets): Rename to ...
9828 (aarch64_regsets): ... this.
9829 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9830 (aarch64_regs_info): New function.
9831 (the_low_target): Adjust.
9832 (initialize_low_arch): New function.
9833 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9835 (target_regsets): Rename to ...
9836 (tile_regsets): ... this.
9837 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9838 (tile_regs_info): New function.
9839 (tile_arch_setup): Set the current process'es tdesc.
9840 (the_low_target): Adjust.
9841 (initialize_low_arch): New function.
9842 * spu-low.c (tdesc_spu): Declare.
9843 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9844 * win32-arm-low.c (tdesc_arm): Declare.
9845 (arm_arch_setup): New function.
9846 (the_low_target): Install arm_arch_setup instead of
9848 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9849 (init_windows_x86): Rename to ...
9850 (i386_arch_setup): ... this. Set `win32_tdesc'.
9851 (the_low_target): Adjust.
9852 * win32-low.c (win32_tdesc): New global.
9853 (child_add_thread): Don't create the thread cache here.
9854 (do_initial_child_stuff): Set the new process'es tdesc.
9855 * win32-low.h (struct target_desc): Forward declare.
9856 (win32_tdesc): Declare.
9857 * lynx-i386-low.c (tdesc_i386): Declare global.
9858 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9859 * lynx-low.c (lynx_tdesc): New global.
9860 (lynx_add_process): Set the new process'es tdesc.
9861 * lynx-low.h (struct target_desc): Forward declare.
9862 (lynx_tdesc): Declare global.
9863 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9864 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9865 * nto-low.c (nto_tdesc): New global.
9866 (do_attach): Set the new process'es tdesc.
9867 * nto-low.h (struct target_desc): Forward declare.
9868 (nto_tdesc): Declare.
9869 * nto-x86-low.c (tdesc_i386): Declare.
9870 (nto_x86_arch_setup): Set `nto_tdesc'.
9872 2013-06-04 Gary Benson <gbenson@redhat.com>
9874 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9875 to qSupported response when appropriate.
9876 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9877 with nonzero-length annex.
9878 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9879 arguments supplied in annex.
9881 2013-05-31 Doug Evans <dje@google.com>
9884 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9885 64 bits in 64-cross-32 environment.
9887 2013-05-28 Pedro Alves <palves@redhat.com>
9889 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9890 (aarch64-without-fpu.c): Delete rule.
9891 * configure.srv (aarch64*-*-linux*): Remove references to
9892 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9893 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9896 2013-05-24 Pedro Alves <palves@redhat.com>
9898 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9899 instead of strchr/decode_address. Error if the range isn't split
9900 with a ','. Don't assume there's be a ':' in the action.
9902 2013-05-23 Yao Qi <yao@codesourcery.com>
9903 Pedro Alves <palves@redhat.com>
9905 * linux-low.c (lwp_in_step_range): New function.
9906 (linux_wait_1): If the thread was range stepping and stopped
9907 outside the stepping range, report the stop to GDB. Otherwise,
9908 continue stepping. Add range stepping debug output.
9909 (linux_set_resume_request): Copy the step range from the resume
9911 (linux_supports_range_stepping): New.
9912 (linux_target_ops) <supports_range_stepping>: Set to
9913 linux_supports_range_stepping.
9914 * linux-low.h (struct linux_target_ops)
9915 <supports_range_stepping>: New field.
9916 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9917 * linux-x86-low.c (x86_supports_range_stepping): New.
9918 (the_low_target) <supports_range_stepping>: Set to
9919 x86_supports_range_stepping.
9920 * server.c (handle_v_cont): Handle 'r' action.
9921 (handle_v_requests): Append ";r" if the target supports range
9923 * target.h (struct thread_resume) <step_range_start,
9924 step_range_end>: New fields.
9925 (struct target_ops) <supports_range_stepping>:
9927 (target_supports_range_stepping): New macro.
9929 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9931 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9932 confusion in comment.
9934 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9936 * lynx-low.c (struct process_info_private): New type.
9937 (lynx_add_process): New function.
9938 (lynx_create_inferior, lynx_attach): Replace calls to
9939 add_process by calls to lynx_add_process.
9940 (lynx_resume): If PTID is null, then try using
9941 current_process()->private->last_wait_event_ptid.
9943 (lynx_clear_inferiors): Delete. The contents of that function
9944 has been inlined in lynx_mourn;
9945 (lynx_wait_1): Save the ptid in the process's private data.
9946 (lynx_mourn): Free the process' private data. Replace call
9947 to lynx_clear_inferiors by call to clear_inferiors.
9949 2013-05-17 Yao Qi <yao@codesourcery.com>
9951 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9954 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9956 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9957 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9958 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9959 PT_TEXT_END_ADDR guards. Update comments.
9960 (linux_target_op) <read_offsets>: Conditionally define to
9961 linux_read_offsets if the target is UCLIBC and if it defines
9962 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9964 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9965 Andrew Jenner <andrew@codesourcery.com>
9967 * Makefile.in (SFILES): Add linux-nios2-low.c.
9968 (clean): Add action to delete nios2-linux.c.
9969 (nios2-linux.c): New rule.
9970 * configure.srv: Add nios2*-*-linux*.
9971 * linux-nios2-low.c: New.
9973 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9975 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9977 2013-04-25 Hui Zhu <hui@codesourcery.com>
9980 * ax.c (ax_printf): Add fflush.
9982 2013-04-22 Tom Tromey <tromey@redhat.com>
9984 * Makefile.in (SFILES): Add filestuff.c.
9985 (OBS): Add filestuff.o.
9986 (filestuff.o): New target.
9987 * config.in, configure: Rebuild.
9988 * configure.ac: Check for fdwalk, pipe2.
9990 2013-04-17 Pedro Alves <palves@redhat.com>
9992 * configure.ac (USE_THREAD_DB): Delete variable.
9993 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9994 Don't AC_SUBST USE_THREAD_DB.
9995 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9996 * config.in, configure: Regenerate.
9998 2013-04-16 Pedro Alves <palves@redhat.com>
10000 * linux-low.h (struct lwp_info) <thread_known>: Move under
10001 the USE_THREAD_DB #ifdef.
10003 2013-04-16 Pedro Alves <palves@redhat.com>
10005 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
10006 (linux-low.o): Delete rule.
10007 * linux-low.h: Always include "gdb_thread_db.h" instead of
10008 conditionally including thread_db.h.
10009 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
10012 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10014 * Makefile.in (install-only): Fix make install regression.
10016 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
10018 Convert man pages to texinfo, new gdbinit.5 texinfo page.
10019 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
10021 * gdbserver.1: Remove.
10023 2013-03-22 Pedro Alves <palves@redhat.com>
10025 * linux-low.c (handle_extended_wait): Don't call
10026 linux_enable_event_reporting.
10028 2013-03-15 Tony Theodore <tonyt@logyst.com>
10031 * Makefile.in (SHELL): Use @SHELL@.
10033 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
10035 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
10038 2013-03-13 Joel Brobecker <brobecker@adacore.com>
10040 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
10041 Remove extraneous NULL element.
10043 2013-03-13 Yao Qi <yao@codesourcery.com>
10045 * tracepoint.c (traceframe_read_tsv): Look for the last matched
10046 'V' block in trace frame.
10048 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10050 * target.h (struct target_ops): Add btrace ops.
10051 (target_supports_btrace): New macro.
10052 (target_enable_btrace): New macro.
10053 (target_disable_btrace): New macro.
10054 (target_read_btrace): New macro.
10055 * gdbthread.h (struct thread_info): Add btrace field.
10056 * server.c: Include btrace-common.h.
10057 (handle_btrace_general_set): New function.
10058 (handle_btrace_enable): New function.
10059 (handle_btrace_disable): New function.
10060 (handle_general_set): Call handle_btrace_general_set.
10061 (handle_qxfer_btrace): New function.
10062 (struct qxfer qxfer_packets[]): Add btrace entry.
10063 * inferiors.c (remove_thread): Disable btrace.
10064 * linux-low: Include linux-btrace.h.
10065 (linux_low_enable_btrace): New function.
10066 (linux_low_read_btrace): New function.
10067 (linux_target_ops): Add btrace ops.
10068 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
10069 Add srv_linux_btrace=yes.
10070 (x86_64-*-linux*): Add linux-btrace.o.
10071 Add srv_linux_btrace=yes.
10072 * configure.ac: Define HAVE_LINUX_BTRACE.
10073 * config.in: Regenerated.
10074 * configure: Regenerated.
10076 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10078 * server.c (handle_qxfer): Preserve error message if -3 is
10080 (qxfer): Document the -3 return value.
10082 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
10084 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
10085 (linux_btrace_h): New variable.
10086 (linux-btrace.o): New rule.
10088 2013-03-08 Stan Shebs <stan@codesourcery.com>
10089 Hafiz Abid Qadeer <abidh@codesourcery.com>
10091 * tracepoint.c (trace_buffer_size): New global.
10092 (DEFAULT_TRACE_BUFFER_SIZE): New define.
10093 (init_trace_buffer): Change to one-argument function. Allocate
10094 trace buffer memory.
10095 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
10096 handle QTBuffer:size packet.
10097 (cmd_bigqtbuffer_size): New function.
10098 (initialize_tracepoint): Call init_trace_buffer with
10099 DEFAULT_TRACE_BUFFER_SIZE.
10100 * server.c (handle_query): Add QTBuffer:size in the
10103 2013-03-07 Yao Qi <yao@codesourcery.com>
10105 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
10106 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
10108 (cmd_qtsp): Adjust condition. Do post increment.
10109 Set cur_action and cur_step_action back to 0.
10111 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
10114 * linux-low.c (linux_write_memory): Return early success if LEN is
10117 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
10119 * configure.srv: Add x86_64-*-cygwin* as target.
10121 2013-02-28 Tom Tromey <tromey@redhat.com>
10123 * configure.ac: Invoke AC_SYS_LARGEFILE.
10124 * configure, config.in: Rebuild.
10126 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
10128 * win32-low.c: Throughout, fix format strings and casts of
10129 printf-like functions to avoid type related warnings on all
10131 (get_child_debug_event): Print dwDebugEventCode as hex since
10132 that's how it's usually documented.
10134 2013-02-28 Yao Qi <yao@codesourcery.com>
10136 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
10139 2013-02-27 Jiong Wang <jiwang@tilera.com>
10141 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
10142 (reg-tilegx32.c): New rule.
10143 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
10144 * linux-tile-low.c (tile_arch_setup): New function. Invoke
10145 different register info initializer according to elf class.
10146 (init_registers_tilgx32): New function. The tilegx32 register info
10148 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
10149 (tile_store_gregset): Likewise.
10151 2013-02-27 Yao Qi <yao@codesourcery.com>
10153 * server.c (process_point_options): Print debug message when
10154 debug_threads is true.
10156 2013-02-26 Yao Qi <yao@codesourcery.com>
10158 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
10160 2013-02-19 Pedro Alves <palves@redhat.com>
10161 Kai Tietz <ktietz@redhat.com>
10165 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
10166 instead of strtoul to extract address from packet.
10167 (process_serial_event) <'z'>: Likewise.
10169 2013-02-18 Yao Qi <yao@codesourcery.com>
10171 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
10173 2013-02-14 Pedro Alves <palves@redhat.com>
10177 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
10178 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
10180 2013-02-14 Pedro Alves <palves@redhat.com>
10182 * tracepoint.c (cmd_qtdpsrc): Use savestring.
10184 2013-02-14 Pedro Alves <palves@redhat.com>
10186 * tracepoint.c (save_string): Delete.
10187 (add_tracepoint_action): Use savestring instead of save_string.
10189 2013-02-12 Pedro Alves <palves@redhat.com>
10191 * linux-xtensa-low.c: Ditto.
10192 * xtensa-xtregs.c: Ditto.
10194 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
10196 * thread-db.c (thread_db_get_tls_address): NULL pointer check
10199 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10201 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
10202 aarch64_num_wp_regs and aarch64_num_bp_regs to
10203 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
10205 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
10207 * linux-aarch64-low.c (ps_get_thread_area): Replace
10208 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
10210 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
10211 Marcus Shawcroft <marcus.shawcroft@arm.com>
10212 Nigel Stephens <nigel.stephens@arm.com>
10213 Yufeng Zhang <yufeng.zhang@arm.com>
10215 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
10216 (aarch64.c, aarch64-without-fpu.c): New targets.
10217 * configure.srv (aarch64*-*-linux*): New.
10218 * linux-aarch64-low.c: New file.
10220 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
10222 * linux-low.c (handle_extended_wait, linux_create_inferior)
10223 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
10224 (dequeue_one_deferred_signal, linux_resume_one_thread)
10225 (fetch_register, linux_write_memory, linux_enable_event_reporting)
10226 (linux_tracefork_grandchild, linux_test_for_tracefork)
10227 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
10228 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
10229 where the argument is 0.
10231 2013-01-25 Yao Qi <yao@codesourcery.com>
10233 * event-loop.c: Include "queue.h".
10234 (gdb_event_p): New typedef.
10235 (struct gdb_event) <next_event>: Remove.
10236 (event_queue): Change to QUEUE(gdb_event_p).
10237 (async_queue_event): Remove.
10238 (gdb_event_xfree): New.
10239 (initialize_event_loop): New.
10240 (process_event): Use API from QUEUE.
10241 (wait_for_event): Likewise.
10242 * server.c (main): Call initialize_event_loop.
10243 * server.h (initialize_event_loop): Declare.
10245 2013-01-18 Yao Qi <yao@codesourcery.com>
10247 * ax.h (struct eval_agent_expr_context): New.
10248 (gdb_eval_agent_expr): Update declaration.
10249 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
10250 TFRAME. Add new argument CTX.
10251 * server.h (struct eval_agent_expr_context): Declare.
10252 (agent_mem_read, agent_tsv_read): Update declaration.
10253 (agent_mem_read_string): Likewise.
10254 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
10255 (add_traceframe_block): Add new argument TPOINT.
10256 Increase TPOINT->traceframe_usage.
10257 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
10258 eval_tracepoint_agent_expr.
10259 (condition_true_at_tracepoint): Likewise.
10260 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
10261 (agent_mem_read_string, agent_tsv_read): Likewise.
10263 2013-01-16 Yao Qi <yao@codesourcery.com>
10265 * linux-low.c (linux_resume_one_lwp): Don't check
10266 'lwp->bp_reinsert != 0'.
10268 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10269 Pedro Alves <palves@redhat.com>
10271 * lynx-low.c (ptrace_request_to_str): Define a temporary
10272 macro and use it to simplify this function's implementation.
10274 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10276 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
10279 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10281 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
10283 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10285 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
10287 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10289 * lynx-low.c (lynx_resume): Use the resume_info parameter
10290 to determine the ptid for the lynx_ptrace call, unless
10291 it is equal to minus_one_ptid, in which case we use the
10292 ptid of the current_inferior.
10293 (lynx_wait_1): After having received a thread create/exit
10294 event, resume the inferior's execution using the signaling
10295 thread's ptid, rather than the old ptid.
10297 2013-01-07 Joel Brobecker <brobecker@adacore.com>
10299 * lynx-low.c (lynx_resume): Delete variable ret.
10301 2013-01-01 Joel Brobecker <brobecker@adacore.com>
10303 * gdbreplay.c (gdbreplay_version): Update copyright year.
10304 * server.c (gdbserver_version): Likewise.
10306 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10308 * lynx-low.c (lynx_wait_1): Add debug trace before adding
10311 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10313 * lynx-low.c (ptrace_request_to_str): Add handling for
10314 PTRACE_GETTRACESIG.
10316 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10318 * lynx-low.c (lynx_attach): Delete variable new_process.
10320 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10322 * lynx-low.c (lynx_create_inferior): Delete variable
10325 2012-12-17 Joel Brobecker <brobecker@adacore.com>
10327 * lynx-low.c (ptrace_request_to_str): Do not handle
10328 PTRACE_GETTHREADLIST if this macro does not exist.
10330 2012-12-15 Yao Qi <yao@codesourcery.com>
10332 * Makefile.in (OBS): Add notif.o.
10333 * notif.c, notif.h: New.
10334 * server.c: Include "notif.h".
10335 (struct vstop_notif) <next>: Remove.
10337 (queue_stop_reply): Update.
10338 (push_event, send_next_stop_reply): Remove.
10339 (discard_queued_stop_replies): Update.
10340 (notif_stop): New variable.
10341 (handle_v_stopped): Remove.
10342 (handle_v_requests): Don't call handle_v_stopped. Call
10343 handle_ack_notif instead.
10344 (queue_stop_reply_callback): Call notif_event_enque instead
10345 of queue_stop_reply.
10346 (handle_status): Don't call send_next_stop_reply, call
10347 notif_write_event instead.
10348 (kill_inferior_callback): Likewise.
10349 (detach_or_kill_inferior_callback): Likewise.
10350 (main): Call initialize_notif.
10351 (process_serial_event): Call QUEUE_is_empty.
10352 (handle_target_event): Call notif_push instead of push event.
10353 * server.h (push_event): Remove declaration.
10355 2012-12-10 Tom Tromey <tromey@redhat.com>
10357 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10358 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10361 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10362 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10363 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10364 (amd64-linux-ipa.o, ax.o): Rewrite.
10365 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10366 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10367 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10368 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10369 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10370 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10371 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10372 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10373 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10374 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10375 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10376 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10377 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10378 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10379 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10380 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10381 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10382 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10383 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10384 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10385 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10386 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10387 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10388 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10389 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10390 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10391 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10392 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10393 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10394 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10395 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10396 (reg-tilegx.o): Remove.
10397 (all_object_files): New macro.
10398 Include .deps files.
10399 * aclocal.m4, configure: Rebuild.
10400 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10401 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10402 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10404 2012-12-05 Tom Tromey <tromey@redhat.com>
10407 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10409 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10411 * configure.ac: Check for linux/perf_event.h.
10412 * config.in: Regenerated.
10413 * configure: Regenerated.
10415 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10417 * hostio.c (handle_readlink): Decrease buffer size
10418 parameter passed to readlink by one byte.
10420 2012-11-26 Yao Qi <yao@codesourcery.com>
10422 * configure.ac (build_warnings): Append '-Wempty-body'.
10423 * configure: Regenerated.
10424 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10427 2012-11-15 Pierre Muller <muller@sourceware.org>
10429 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10430 * config.in: Regenerate.
10431 * configure: Regenerate.
10432 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10433 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10434 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10435 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10437 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10438 instead of <sys/wait.h> header.
10439 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10441 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10443 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10444 (various make rules): Remove -DGDBSERVER
10446 2012-11-09 Yao Qi <yao@codesourcery.com>
10448 * spu-low.c (current_ptid): Move it to ..
10449 * gdbthread.h: ... here. New.
10450 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10451 * server.c (myresume, process_serial_event): Likewise.
10452 * thread-db.c (thread_db_find_new_threads): Likewise.
10453 * tracepoint.c (run_inferior_command): Likewise.
10455 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10457 * server.c (handle_search_memory_1): Include access length in
10460 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10462 * linux-crisv32-low.c: Fix compile errors.
10464 2012-09-04 Yao Qi <yao@codesourcery.com>
10466 * tracepoint.c (cmd_qtsv): Adjust debug message.
10467 Don't check CUR_TPOINT.
10469 2012-08-28 Yao Qi <yao@codesourcery.com>
10471 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10472 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10473 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10474 Remove declarations of xmalloc, xreallloc, xstrdup and
10476 * Makefile.in (libiberty_h): New.
10477 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10478 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10480 2012-08-23 Yao Qi <yao@codesourcery.com>
10482 * server.h: Remove declaration of 'xsnprintf'.
10484 2012-08-22 Keith Seitz <keiths@redhat.com>
10486 * server.h: Include build-gnulib-gbserver/config.h.
10487 * gdbreplay.c: Likewise.
10489 2012-08-08 Doug Evans <dje@google.com>
10491 * Makefile.in (SFILES): Add gdb_vecs.c.
10492 (OBS): Add gdb_vecs.o.
10493 (gdb_vecs_h, host_defs_h): New variables.
10494 (thread-db.o): Add $(gdb_vecs_h) dependency.
10495 (gdb_vecs.o): New rule.
10496 * thread-db.c: #include "gdb_vecs.h".
10497 (thread_db_load_search): Use a vector to iterate over path elements.
10498 Handle text appearing after "$pdir".
10500 * configure.ac: Add check for strstr.
10501 * config.in: Regenerate.
10502 * configure: Regenerate.
10504 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10506 * hostio.c (handle_pread): If pread fails, fall back to attempting
10508 (handle_pwrite): Likewise for pwrite.
10510 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10512 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10513 between unsupported TYPE and unimplementable ADDR/LEN combination.
10514 (arm_insert_point): Act on new return value.
10516 2012-07-31 Pedro Alves <palves@redhat.com>
10518 * server.c (process_point_options): Only skip tokens if we find
10519 one that is unrecognized. Don't treat 'X' specially while
10520 skipping unrecognized tokens.
10522 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10524 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10525 to 4-byte-align HW breakpoint addresses for Thumb.
10527 2012-07-27 Yao Qi <yao@codesourcery.com>
10531 * server.h: Declare gdb_agent_about_to_close.
10532 * target.c (kill_inferior): Include "agent.h".
10533 New. Send command 'kill'.
10534 * target.h (kill_inferior): Removed macro.
10535 * tracepoint.c (gdb_agent_about_to_close): New.
10536 (gdb_agent_helper_thread): Handle command 'close'.
10537 Wait endlessly until the inferior stops.
10538 Install gdb_agent_remove_socket to atexit hook.
10539 (agent_socket_name): New static variable.
10540 (gdb_agent_socket_init): Replace local variable 'name' with
10541 'agent_socket_name'.
10542 (gdb_agent_remove_socket): New.
10544 2012-07-27 Yao Qi <yao@codesourcery.com>
10546 * server.c (process_point_options): Stop at 'X' when parsing.
10548 2012-07-19 Michael Eager <eager@eagercon.com>
10550 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10552 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10553 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10554 hardware breakpoint.
10556 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10558 * gdbserver/linux-low.c (initialize_low): Call
10559 linux_ptrace_init_warnings.
10561 2012-07-02 Doug Evans <dje@google.com>
10563 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10566 2012-07-02 Stan Shebs <stan@codesourcery.com>
10568 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10569 (ax.o): Add it to build rule.
10571 (OBS): Add format.o.
10572 (IPA_OBS): Add format.o.
10573 * server.c (handle_query): Claim support for breakpoint commands.
10574 (process_point_options): Add command case.
10575 (process_serial_event): Leave running if there are printfs in
10577 * mem-break.h (any_persistent_commands): Declare.
10578 (add_breakpoint_commands): Declare.
10579 (gdb_no_commands_at_breakpoint): Declare.
10580 (run_breakpoint_commands): Declare.
10581 * mem-break.c (struct point_command_list): New struct.
10582 (struct breakpoint): New field command_list.
10583 (any_persistent_commands): New function.
10584 (add_commands_to_breakpoint): New function.
10585 (add_breakpoint_commands): New function.
10586 (gdb_no_commands_at_breakpoint): New function.
10587 (run_breakpoint_commands): New function.
10588 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10590 * ax.c: Include format.h.
10591 (ax_printf): New function.
10592 (gdb_eval_agent_expr): Add printf opcode.
10594 2012-06-13 Yao Qi <yao@codesourcery.com>
10596 * server.c (start_inferior): Remove duplicated writes to fields
10597 'last_resume_kind' and 'last_status' of 'current_inferior'.
10599 2012-06-12 Yao Qi <yao@codesourcery.com>
10600 Pedro Alves <palves@redhat.com>
10602 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10604 * server.c (handle_v_cont): Extend comment.
10606 2012-06-11 Yao Qi <yao@codesourcery.com>
10608 * linux-low.c (linux_attach): Add 'static'.
10610 2012-06-06 Yao Qi <yao@codesourcery.com>
10612 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10614 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10616 Fix gcc -flto compilation warning.
10617 * server.c (main): Make variable multi_mode and attach volatile.
10619 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10621 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10622 if the platform doesn't know about it.
10624 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10626 * Makefile.in (SFILES): Add linux-tile-low.c.
10627 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10628 * configure.srv: Handle tilegx-*-linux*.
10629 * linux-tile-low.c: New file.
10631 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10633 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10635 2012-05-24 Pedro Alves <palves@redhat.com>
10639 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10641 2012-05-24 Pedro Alves <palves@redhat.com>
10645 Replace target_signal with gdb_signal throughout.
10647 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10649 * linux-low.c (linux_store_registers): Avoid the copying sequence
10650 when no data has been retrieved by ptrace.
10652 2012-05-22 Will Deacon <will.deacon@arm.com>
10654 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10655 Include asm/ptrace.h.
10656 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10659 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10661 * linux-low.c (linux_store_registers): Don't re-retrieve data
10662 with ptrace that has already been obtained from /proc. Always
10663 copy any data retrieved with ptrace to the buffer supplied.
10665 2012-05-11 Yao Qi <yao@codesourcery.com>
10666 Pedro Alves <palves@redhat.com>
10668 * linux-low.c (enum stopping_threads_kind): New.
10669 (stopping_threads): Change type to `enum stopping_threads_kind'.
10670 (handle_extended_wait): If stopping and suspending threads, leave
10671 the new_lwp suspended too.
10672 (linux_wait_for_event): Adjust.
10673 (stop_all_lwps): Set `stopping_threads' to
10674 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10675 whether we're suspending threads or just stopping them. Assert no
10678 2012-04-29 Yao Qi <yao@codesourcery.com>
10680 * server.h: Move some code to ...
10681 * gdbthread.h: ... here. New.
10682 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10683 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10684 (nto-low.o, win32-low.o): Likewise.
10685 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10686 * regcache.c, remote-utils.c, server.c: Likewise.
10687 * target.c, tracepoint.c, win32-low.c: Likewise.
10689 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10691 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10692 (PTRACE_ARG4_TYPE): Likewise.
10693 (PTRACE_XFER_TYPE): Likewise.
10694 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10695 ptrace to PTRACE_ARG3_TYPE.
10696 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10697 (PTRACE_ARG4_TYPE): Likewise.
10698 (PTRACE_XFER_TYPE): Likewise.
10699 (linux_detach_one_lwp): Cast fourth argument of
10700 ptrace to long then PTRACE_ARG4_TYPE.
10701 (regsets_fetch_inferior_registers): Cast third argument of
10702 ptrace to long then PTRACE_ARG3_TYPE.
10703 (regsets_store_inferior_registers): Likewise.
10705 2012-04-20 Pedro Alves <palves@redhat.com>
10707 * configure: Regenerate.
10709 2012-04-19 Pedro Alves <palves@redhat.com>
10711 * Makefile.in (GNULIB_BUILDDIR): New.
10712 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10713 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10714 (all, install-only, uninstall, clean-info, all-lib, clean): No
10715 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10716 (maintainer-clean realclean distclean): Use subdir_do.
10718 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10719 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10720 * acinclude.m4: Include acx_configure_dir.m4.
10721 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10722 calls. Call AC_PROG_RANLIB. Configure gnulib using
10725 (GNULIB_STDINT_H): Adjust.
10726 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10727 * gdbreplay.c: Include build-gnulib/config.h.
10728 * server.h: Likewise.
10729 * aclocal.m4: Regenerate.
10730 * config.in: Regenerate.
10731 * configure: Regenerate.
10733 2012-04-19 Pedro Alves <palves@redhat.com>
10735 * Makefile.in (LIBGNU, INCGNU): Adjust.
10736 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10737 (all, install-only, uninstall, clean-info, all-lib, clean)
10738 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10739 * configure.ac: Adjust AC_OUTPUT output.
10740 * aclocal.m4: Regenerate.
10741 * configure: Regenerate.
10743 2012-04-19 Pedro Alves <palves@redhat.com>
10745 * Makefile.in (generated_files): New.
10746 (server_h): Remove the explicit dependency on config.h, and depend
10747 on $generated_files.
10749 2012-04-19 Pedro Alves <palves@redhat.com>
10751 * Makefile.in (INCGNU): Add -Ignulib.
10753 2012-04-19 Pedro Alves <palves@redhat.com>
10755 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10756 (INCGNU): ... this, and spell out -I here.
10757 (GNULIB_LIB): Rename to ...
10758 (LIBGNU): ... this.
10759 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10761 2012-04-19 Pedro Alves <palves@redhat.com>
10763 * config.in: Regenerate.
10765 2012-04-19 Pedro Alves <palves@redhat.com>
10767 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10768 * server.h (memmem): Remove declaration.
10769 * config.in: Regenerate.
10770 * configure: Regenerate.
10772 2012-04-19 Yao Qi <yao@codesourcery.com>
10774 * Makefile.in (SFILES): Add common/vec.c.
10778 2012-04-19 Yao Qi <yao@codesourcery.com>
10780 * remote-utils.c (prepare_resume_reply): Replace with macro
10781 target_core_of_thread.
10782 * server.c (handle_qxfer_threads_proper): Likewise.
10783 * target.h (traget_core_of_thread): New macro.
10785 2012-04-18 Pedro Alves <palves@redhat.com>
10787 * aclocal.m4: Regenerate.
10788 * configure: Regenerate.
10790 2012-04-16 Yao Qi <yao@codesourcery.com>
10792 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10793 duplicated on address.
10795 2012-04-16 Yao Qi <yao@codesourcery.com>
10797 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10798 (struct tracepoint_action_ops) <send>: New field.
10799 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10800 (agent_expr_send, x_tracepoint_action_send): New.
10801 (l_tracepoint_action_send): New.
10802 (cmd_qtdp): Download and install tracepoint
10803 according to `use_agent'.
10804 (run_inferior_command): Add one more parameter `len'.
10806 (tracepoint_send_agent): New.
10807 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10809 2012-04-16 Yao Qi <yao@codesourcery.com>
10811 * tracepoint.c (download_tracepoints): Moved to ...
10812 (cmd_qtstart): ... here.
10814 2012-04-14 Yao Qi <yao@codesourcery.com>
10816 * tracepoint.c: Include inttypes.h.
10817 (struct collect_memory_action): Use sized types.
10818 (struct tracepoint): Likewise.
10819 (cmd_qtdp, stop_tracing): Update print specifiers.
10820 (cmd_qtp, response_tracepoint): Likewise.
10821 (collect_data_at_tracepoint): Likewise.
10822 (collect_data_at_step): Likewise.
10824 2012-04-14 Yao Qi <yao@codesourcery.com>
10826 Import gnulib module inttypes.
10827 * aclocal.m4, config.in, configure: Regenerated.
10829 2012-04-14 Yao Qi <yao@codesourcery.com>
10831 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10832 Makefile and config.status at last.
10834 2012-04-13 Yao Qi <yao@codesourcery.com>
10836 * tracepoint.c: Include stdint.h unconditionally.
10838 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10840 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10841 on BFD_HAVE_SYS_PROCFS_TYPE.
10842 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10843 * configure: Regenerate.
10844 * config.in: Likewise.
10846 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10848 * Makefile.in (clean): Also remove x32.c x32-linux.c
10849 x32-avx.c x32-avx-linux.c.
10850 (x32.o): New target.
10852 (x32-linux.o): Likewise.
10853 (x32-linux.c): Likewise.
10854 (x32-avx.o): Likewise.
10855 (x32-avx.c): Likewise.
10856 (x32-avx-linux.o): Likewise.
10857 (x32-avx-linux.c): Likewise.
10859 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10860 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10861 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10862 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10863 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10864 i386/x32-avx-linux.xml.
10866 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10867 (init_registers_x32_avx_linux): Likwise.
10868 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10869 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10871 2012-04-13 Pedro Alves <palves@redhat.com>
10873 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10874 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10875 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10876 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10879 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10881 * linux-x86-low.c (compat_x32_clock_t): New.
10882 (compat_x32_siginfo_t): Likewise.
10883 (compat_x32_siginfo_from_siginfo): Likewise.
10884 (siginfo_from_compat_x32_siginfo): Likewise.
10885 (linux_is_elf64): Likewise.
10886 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10887 and siginfo_from_compat_x32_siginfo for x32.
10888 (x86_arch_setup): Set linux_is_elf64.
10890 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10893 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10895 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10896 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10897 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10898 compatible with process.
10900 2012-04-12 Yao Qi <yao@codesourcery.com>
10902 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10903 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10904 (install-only, install-info, clean): Handle sub dir gnulib.
10905 (all-lib, am--refresh): New targets.
10906 (memmem.o): Remove target.
10907 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10908 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10909 (AC_REPLACE_FUNCS): Remove memmem.
10910 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10911 (AC_OUTPUT): Generate Makefile in gnulib/.
10912 * aclocal.m4, config.in, configure: Regenerated.
10914 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10916 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10918 2012-04-05 Pedro Alves <palves@redhat.com>
10920 -Werror=strict-aliasing
10922 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10925 2012-04-04 Pedro Alves <palves@redhat.com>
10927 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10928 (sparc_store_gregset_from_stack, sparc_store_gregset)
10929 (sparc_breakpoint_at): Fix formatting.
10931 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10933 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10935 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10936 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10937 * config.in: Regenerate.
10938 * configure: Likewise.
10940 2012-03-29 Pedro Alves <palves@redhat.com>
10942 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10943 Correct ptrace arguments.
10945 2012-03-28 Pedro Alves <palves@redhat.com>
10947 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10948 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10949 (IA64_FR1_REGNUM): New defines.
10950 (ia64_fetch_register): New.
10951 (the_low_target): Install it.
10952 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10954 * linux-low.c (linux_fetch_registers): Try the
10955 the_low_target.fetch_register hook first.
10957 * linux-arm-low.c (the_low_target): Adjust.
10958 * linux-bfin-low.c (the_low_target): Adjust.
10959 * linux-cris-low.c (the_low_target): Adjust.
10960 * linux-crisv32-low.c (the_low_target): Adjust.
10961 * linux-m32r-low.c (the_low_target): Adjust.
10962 * linux-m68k-low.c (the_low_target): Adjust.
10963 * linux-mips-low.c (the_low_target): Adjust.
10964 * linux-ppc-low.c (the_low_target): Adjust.
10965 * linux-s390-low.c (the_low_target): Adjust.
10966 * linux-sh-low.c (the_low_target): Adjust.
10967 * linux-sparc-low.c (the_low_target): Adjust.
10968 * linux-tic6x-low.c (the_low_target): Adjust.
10969 * linux-x86-low.c (the_low_target): Adjust.
10970 * linux-xtensa-low.c (the_low_target): Adjust.
10972 2012-03-26 Pedro Alves <palves@redhat.com>
10974 * server.c (handle_qxfer_libraries): Don't bail early if
10975 the_target->qxfer_libraries_svr4 is not NULL.
10977 2012-03-26 Pedro Alves <palves@redhat.com>
10979 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10981 2012-03-23 Pedro Alves <palves@redhat.com>
10983 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10984 "library-list-svr4" element's start tag when the the DSO list is
10987 2012-03-23 Pedro Alves <palves@redhat.com>
10989 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10990 a variable whose type size is the same as the inferior's pointer
10993 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10995 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10997 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10998 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10999 * linux-low.h: Include <signal.h>.
11000 (struct siginfo): Remove forward declaration.
11001 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
11004 2012-03-21 Mike Frysinger <vapier@gentoo.org>
11006 * .gitignore: Ignore more files.
11008 2012-03-19 Pedro Alves <palves@redhat.com>
11009 Jan Kratochvil <jan.kratochvil@redhat.com>
11011 * server.c (cont_thread, general_thread): Add describing comments.
11012 (start_inferior): Clear `cont_thread'.
11013 (handle_v_cont): Don't set `cont_thread' if resuming all threads
11016 2012-03-15 Yao Qi <yao@codesourcery.com>
11018 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
11020 (cmd_qtdp): ... here.
11022 2012-03-15 Yao Qi <yao@codesourcery.com>
11024 * tracepoint.c (struct tracepoint_action_ops): New.
11025 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
11026 (m_tracepoint_action_download): New.
11027 (r_tracepoint_action_download): New.
11028 (x_tracepoint_action_download): New.
11029 (l_tracepoint_action_download): New.
11030 (add_tracepoint_action): Install `action->ops' according type.
11031 (download_tracepoint_1): Move code `download' function pointer
11032 of various tracepoint_action_ops.
11034 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11036 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
11037 linux_ptrace_attach_warnings.
11039 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
11041 * Makefile.in (linux-ptrace.o): New.
11042 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
11043 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
11044 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
11045 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
11046 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
11048 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
11050 2012-03-08 Yao Qi <yao@codesourcery.com>
11051 Pedro Alves <palves@redhat.com>
11053 Fix PR server/13392.
11054 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
11055 offset of JMP insn.
11056 * tracepoint.c (remove_tracepoint): New.
11057 (cmd_qtdp): Call remove_tracepoint when failed to install.
11059 2012-03-07 Pedro Alves <palves@redhat.com>
11061 * linux-low.c (get_detach_signal): New.
11062 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
11063 Pass on pending signals to PTRACE_DETACH. Check the result of the
11065 * server.c (program_signals, program_signals_p): New.
11066 (handle_general_set): Handle QProgramSignals.
11067 * server.h (program_signals, program_signals_p): Declare.
11069 2012-03-05 Pedro Alves <palves@redhat.com>
11070 Jan Kratochvil <jan.kratochvil@redhat.com>
11072 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
11075 2012-03-03 Yao Qi <yao@codesourcery.com>
11077 * tracepoint.c (tracepoint_look_up_symbols): Update call to
11078 agent_look_up_symbols.
11080 2012-03-03 Yao Qi <yao@codesourcery.com>
11082 * Makefile.in (linux-low.o): Keep dependence on agent.h.
11083 (linux-x86-low.o): Likewise.
11084 * server.h: Remove in_process_agent_loaded.
11085 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
11089 2012-03-03 Yao Qi <yao@codesourcery.com>
11091 * tracepoint.c (gdb_agent_capability): New global.
11092 (in_process_agent_loaded_ust): Renamed to
11093 `in_process_agent_supports_ust'.
11095 (in_process_agent_supports_ust): Call agent_capability_check.
11096 (clear_installed_tracepoints): Assert that agent supports
11099 2012-03-03 Yao Qi <yao@codesourcery.com>
11101 * linux-low.c (linux_supports_agent): New.
11102 (linux_target_ops): Initialize field `supports_agent' with
11103 linux_supports_agent.
11104 * target.h (struct target_ops) <supports_agent>: New.
11105 (target_supports_agent): New macro.
11106 * server.c (handle_general_set): Handle packet 'QAgent'.
11107 (handle_query): Send `QAgent+'.
11108 * Makefile.in (server.o): Depends on agent.h.
11110 2012-03-03 Yao Qi <yao@codesourcery.com>
11112 * Makefile.in (OBS): Add agent.o.
11113 Add new rule for agent.o.
11114 Track dependence of tracepoint.c on agent.h.
11115 * tracepoint.c (run_inferior_command_1):
11116 (run_inferior_command): Call agent_run_command.
11117 (gdb_ust_connect_sync_socket): Deleted. Move it to
11119 (resume_thread, stop_thread): Likewise.
11120 (gdb_ust_socket_init): Renamed to ...
11121 (gdb_agent_socket_init): ... New.
11122 (gdb_ust_thread): Renamed to ...
11123 (gdb_agent_helper_thread): ... New.
11124 (gdb_ust_init): Move some code to ...
11125 (gdb_agent_init): ... here. New.
11126 [HAVE_UST]: Call gdb_ust_init.
11127 (initialize_tracepoint_ftlib): Call gdb_agent_init.
11128 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
11129 * config.in, configure: Regenerated.
11131 2012-03-02 Pedro Alves <palves@redhat.com>
11133 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
11134 * linux-low.c (struct simple_pid_list): New.
11135 (stopped_pids): New a struct simple_pid_list pointer.
11136 (add_to_pid_list, pull_pid_from_list): New.
11137 (handle_extended_wait): Don't assume the first signal new children
11138 report is SIGSTOP. Adjust call to pull_pid_from_list.
11139 (linux_wait_for_lwp): Adjust.
11141 2012-03-02 Yao Qi <yao@codesourcery.com>
11143 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
11146 2012-03-02 Yao Qi <yao@codesourcery.com>
11148 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
11149 `stop_pc' and `tpoint'. Update caller.
11151 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
11153 * linux-low.h (linux_target_ops): Add regset_bitmap member.
11154 * linux-low.c (use_linux_regsets): New macro.
11155 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
11156 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
11157 (linux_register_in_regsets): New function.
11158 (usr_fetch_inferior_registers): Skip registers covered by
11160 (usr_store_inferior_registers): Likewise.
11161 (usr_fetch_inferior_registers): New macro.
11162 (usr_store_inferior_registers): Likewise.
11163 (linux_fetch_registers): Handle mixed regset/non-regset targets.
11164 (linux_store_registers): Likewise.
11165 * linux-mips-low.c (init_registers_mips_dsp_linux): New
11167 (init_registers_mips64_dsp_linux): Likewise.
11168 (init_registers_mips_linux): New macro.
11169 (init_registers_mips_dsp_linux): Likewise.
11170 (mips_dsp_num_regs): Likewise.
11171 (DSP_BASE, DSP_CONTROL): New fallback macros.
11172 (mips_base_regs): New macro.
11173 (mips_regmap): Use it. Fix the size.
11174 (mips_dsp_regmap): New variable.
11175 (mips_dsp_regset_bitmap): Likewise.
11176 (mips_arch_setup): New function.
11177 (mips_cannot_fetch_register): Use the_low_target.regmap rather
11179 (mips_cannot_store_register): Likewise.
11180 (the_low_target): Update .arch_setup, .num_regs and .regmap
11181 initializers. Add .regset_bitmap initializer.
11182 * linux-arm-low.c (the_low_target): Add .regset_bitmap
11184 * linux-bfin-low.c (the_low_target): Likewise.
11185 * linux-cris-low.c (the_low_target): Likewise.
11186 * linux-crisv32-low.c (the_low_target): Likewise.
11187 * linux-ia64-low.c (the_low_target): Likewise.
11188 * linux-m32r-low.c (the_low_target): Likewise.
11189 * linux-m68k-low.c (the_low_target): Likewise.
11190 * linux-ppc-low.c (the_low_target): Likewise.
11191 * linux-s390-low.c (the_low_target): Likewise.
11192 * linux-sh-low.c (the_low_target): Likewise.
11193 * linux-sparc-low.c (the_low_target): Likewise.
11194 * linux-tic6x-low.c (the_low_target): Likewise.
11195 * linux-x86-low.c (the_low_target): Likewise.
11196 * linux-xtensa-low.c (the_low_target): Likewise.
11197 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
11198 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
11199 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
11201 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
11202 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
11204 2012-02-29 Yao Qi <yao@codesourcery.com>
11205 Pedro Alves <palves@redhat.com>
11207 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
11208 `step_over_finished' is true.
11210 2012-02-27 Pedro Alves <palves@redhat.com>
11212 * linux-low.c (pid_is_stopped): Delete, moved to common/.
11213 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
11215 2012-02-27 Pedro Alves <palves@redhat.com>
11218 * linux-low.c (pid_is_stopped): New.
11219 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
11221 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
11223 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
11226 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
11228 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
11230 2012-02-24 Luis Machado <lgustavo@codesourcery>
11232 * server.c (handle_query): Advertise support for target-side
11233 breakpoint condition evaluation.
11234 (process_point_options): New function.
11235 (process_serial_event): When inserting a breakpoint, check for
11236 a target-side condition that should be evaluated.
11238 * mem-break.c: Include regcache.h and ax.h.
11239 (point_cond_list_t): New data structure.
11240 (breakpoint) <cond_list>: New field.
11241 (find_gdb_breakpoint_at): Make non-static.
11242 (delete_gdb_breakpoint_at): Clear any target-side
11244 (clear_gdb_breakpoint_conditions): New function.
11245 (add_condition_to_breakpoint): Likewise.
11246 (add_breakpoint_condition): Likewise.
11247 (gdb_condition_true_at_breakpoint): Likewise.
11248 (gdb_breakpoint_here): Return result directly instead
11249 of going through a local variable.
11251 * mem-break.h (find_gdb_breakpoint_at): New prototype.
11252 (clear_gdb_breakpoint_conditions): Likewise.
11253 (add_breakpoint_condition): Likewise.
11254 (gdb_condition_true_at_breakpoint): Likewise.
11256 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
11257 (need_step_over_p): Take target-side breakpoint condition into
11260 2012-02-24 Luis Machado <lgustavo@codesourcery>
11262 * server.h: Include tracepoint.h.
11263 (agent_mem_read, agent_get_trace_state_variable_value,
11264 agent_set_trace_state_variable_value,
11265 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
11266 get_set_tsv_func_addr): New prototypes.
11268 * ax.h: New include file.
11269 * ax.c: New source file.
11271 * tracepoint.c: Include ax.h.
11272 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
11273 agent_expr, eval_result_type): Move to ax.h.
11274 (parse_agent_expr): Rename to ...
11275 (gdb_parse_agent_expr): ... this, make it non-static and move
11277 (unparse_agent_expr) Rename to ...
11278 (gdb_unparse_agent_expr): ... this, make it non-static and move
11280 (eval_agent_expr): Rename to ...
11281 (eval_tracepoint_agent_expr): ... this.
11282 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
11283 forward declarations.
11284 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
11285 (agent_get_trace_state_variable_value): New function.
11286 (agent_set_trace_state_variable_value): New function.
11287 (cmd_qtdp): Call gdb_parse_agent_expr (...).
11288 (response_tracepoint): Call gdb_unparse_agent_expr (...).
11289 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
11290 (condition_true_at_tracepoint): Likewise.
11291 (parse_agent_expr): Rename to ...
11292 (gdb_parse_agent_expr): ... this and move to ax.c.
11293 (unparse_agent_expr): Rename to ...
11294 (gdb_unparse_agent_expr): ... this and move to ax.c.
11295 (gdb_agent_op_name): Move to ax.c.
11296 (eval_agent_expr): Rename to ...
11297 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
11299 (eval_tracepoint_agent_expr): New function.
11300 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
11302 (current_insn_ptr, emit_error, struct bytecode_address): Move to
11304 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
11305 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
11306 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
11307 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
11308 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
11309 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
11310 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
11311 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
11312 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
11313 (compile_bytecodes): Remove forward declaration.
11314 (is_goto_target): Move to ax.c.
11315 (compile_bytecodes): Move to ax.c and call
11316 agent_get_trace_state_variable_value (...) and
11317 agent_set_trace_state_variable_value (...).
11319 * Makefile.in: Update ax.c and IPA dependencies.
11321 2012-02-24 Pedro Alves <palves@redhat.com>
11323 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
11324 (cmd_bigqtbuffer_circular): ... this. Only handle
11325 'QTBuffer:circular:'.
11326 (handle_tracepoint_general_set): Adjust.
11328 2012-02-16 Yao Qi <yao@codesourcery.com>
11330 * inferiors.c: Move code to ...
11331 * dll.c: .... here. New.
11332 * server.h: Declare clear_dlls.
11333 * Makefile.in (SFILES): Add dll.c.
11337 2012-02-11 Yao Qi <yao@codesourcery.com>
11339 * server.c: (handle_monitor_command): Add a new parameter
11341 (handle_query): Update caller.
11343 2012-02-09 Joel Brobecker <brobecker@adacore.com>
11345 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
11346 * configure, config.in: Regenerate.
11347 * hostio.c: Provide an alternate implementation if HAVE_READLINK
11350 2012-02-02 Pedro Alves <palves@redhat.com>
11352 Try SIGKILL first, then PTRACE_KILL.
11353 * linux-low.c (linux_kill_one_lwp): New.
11354 (linux_kill_one_lwp): Rename to ...
11355 (kill_one_lwp_callback): ... this. Use the new
11356 linux_kill_one_lwp.
11358 2012-02-02 Pedro Alves <palves@redhat.com>
11360 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11363 2012-01-27 Pedro Alves <palves@redhat.com>
11365 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11366 (elf_64_file_p): Make static.
11367 (linux_pid_exe_is_elf_64_file): New.
11368 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11369 Delete declarations.
11370 (linux_pid_exe_is_elf_64_file): Declare.
11371 * linux-x86-low.c (x86_arch_setup): Use
11372 linux_pid_exe_is_elf_64_file.
11374 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11376 * linux-low.c (linux_wait_for_event_1): Rename to ...
11377 (linux_wait_for_event): ... here and merge it with former
11378 linux_wait_for_event - new variable wait_ptid, use it.
11379 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11381 2012-01-23 Pedro Alves <palves@redhat.com>
11383 * server.c (main): Avoid yet another case of infinite loop while
11384 detaching/killing after a longjmp.
11386 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11389 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11391 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11393 * hostio.c (handle_readlink): New function.
11394 (handle_vFile): Call it to handle "vFile:readlink" packets.
11396 2012-01-20 Pedro Alves <palves@redhat.com>
11397 Ulrich Weigand <ulrich.weigand@linaro.org>
11399 * server.c (handle_v_requests): Only support vAttach and vRun to
11400 start multiple processes when in extended protocol mode.
11402 2012-01-17 Pedro Alves <palves@redhat.com>
11404 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11405 memalign plus mprotect to allocate the scratch buffer.
11407 2012-01-13 Pedro Alves <palves@redhat.com>
11409 * server.c (attach_inferior): Clear `cont_thread'.
11411 2012-01-13 Pedro Alves <palves@redhat.com>
11413 * server.c (main): Avoid infinite loop while detaching/killing
11416 2012-01-09 Doug Evans <dje@google.com>
11418 * server.c (start_inferior): Set last_ptid in --wrapper case.
11420 2012-01-06 Yao Qi <yao@codesourcery.com>
11422 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11424 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11426 2012-01-04 Yao Qi <yao@codesourcery.com>
11428 * tracepoint.c (cmd_qtdp): Print debug message
11429 for static tracepoint.
11431 2012-01-04 Yao Qi <yao@codesourcery.com>
11433 * tracepoint.c (trace_vdebug): Differentiate debug message
11434 between gdbserver and IPA.
11436 2012-01-03 Yao Qi <yao@codesourcery.com>
11438 * tracepoint.c (tracepoint_was_hit): Don't collect for
11441 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11443 * terminal.h: Reformat copyright header.
11445 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11447 * server.c (gdbserver_version): Update copyright year.
11448 * gdbreplay.c (gdbreplay_version): Likewise.
11450 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11452 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11455 2011-12-18 Hui Zhu <teawater@gmail.com>
11456 * linux-low.c (linux_create_inferior): Save return value to ret.
11458 2011-12-18 Hui Zhu <teawater@gmail.com>
11460 * linux-low.c (linux_create_inferior): Save return value to ret.
11462 2011-12-16 Doug Evans <dje@google.com>
11464 * linux-low.c (linux_create_inferior): If stdio connection,
11465 redirect stdin from /dev/null, stdout to stderr.
11466 * remote-utils.c (remote_is_stdio): New static global.
11467 (remote_connection_is_stdio): New function.
11468 (remote_prepare): Handle stdio connection.
11469 (remote_open): Ditto.
11470 (remote_close): Don't close stdin for stdio connections.
11471 (read_prim,write_prim): New functions. Replace all calls to
11472 read/write to these.
11473 * server.c (main): Watch for "-" argument. Move call to
11474 remote_prepare before start_inferior.
11475 * server.h (STDIO_CONNECTION_NAME): New macro.
11476 (remote_connection_is_stdio): Declare.
11478 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11479 in debugging output.
11481 2011-12-15 Yao Qi <yao@codesourcery.com>
11483 * tracepoint.c: Include sys/syscall.h.
11484 (gdb_ust_thread): Remove preprocessor conditional.
11486 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11488 * linux-low.c (linux_detach_one_lwp): Call
11489 the_low_target.prepare_to_resume before detaching.
11491 2011-12-14 Yao Qi <yao@codesourcery.com>
11493 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11496 2011-12-14 Yao Qi <yao@codesourcery.com>
11498 * i386-low.c (i386_low_stopped_data_address): Initialize local
11499 variable `control'.
11501 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11505 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11506 DR_CONTROL unless necessary. Extend comments.
11507 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11508 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11510 2011-12-13 Yao Qi <yao@codesourcery.com>
11512 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11514 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11516 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11518 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11519 Print new debug message for such case.
11521 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11523 Fix overlapping memcpy.
11524 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11525 the read_inferior_memory transfer.
11526 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11527 write_inferior_memory transfer.
11528 (set_fast_tracepoint_jump): New variable buf. Use it for the
11529 read_inferior_memory and write_inferior_memory transfers.
11530 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11531 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11532 Use it for the write_inferior_memory transfer.
11533 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11536 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11538 * linux-low.c (fetch_register, store_register): Make code
11539 consistent, fix formatting.
11541 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11543 * linux-low.c (usr_store_inferior_registers): Factor out code
11544 to handle individual registers into...
11545 (store_register): ... this new function.
11547 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11549 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11550 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11551 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11552 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11553 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11554 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11555 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11556 (srv_xmlfiles): Add new XML files.
11558 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11560 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11561 (init_registers_s390_linux32v1): Add prototype.
11562 (init_registers_s390_linux32v2): Likewise.
11563 (init_registers_s390_linux64v1): Likewise.
11564 (init_registers_s390_linux64v2): Likewise.
11565 (init_registers_s390x_linux64v1): Likewise.
11566 (init_registers_s390x_linux64v2): Likewise.
11567 (s390_num_regs): Increment to 52.
11568 (s390_regmap): Add orig_r2 register.
11569 (s390_num_regs_3264): Increment to 68.
11570 (s390_regmap_3264): Add orig_r2 register.
11571 (s390_collect_ptrace_register): Handle orig_r2 register.
11572 (s390_supply_ptrace_register): Likewise.
11573 (s390_fill_last_break): New function.
11574 (s390_store_last_break): Likewise.
11575 (s390_fill_system_call): New function.
11576 (s390_store_system_call): Likewise.
11577 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11579 (s390_check_regset): New function.
11580 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11581 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11582 Update target_regsets for available register sets.
11584 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11585 Jan Kratochvil <jan.kratochvil@redhat.com>
11587 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11588 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11590 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11591 * linux-low.h (struct process_info_private): New member r_debug.
11592 * server.c (handle_qxfer_libraries): Call
11593 the_target->qxfer_libraries_svr4.
11594 (handle_qxfer_libraries_svr4): New function.
11595 (qxfer_packets): New entry "libraries-svr4".
11596 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11597 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11598 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11599 PACKET_qXfer_libraries_svr4.
11601 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11603 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11604 PSW address/mask between 8-byte and 16-byte formats.
11605 (s390_supply_ptrace_register): Likewise.
11606 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11607 basic addressing mode bit.
11609 2011-11-24 Stan Shebs <stan@codesourcery.com>
11611 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11613 2011-11-17 Stan Shebs <stan@codesourcery.com>
11615 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11616 (tracing_start_time): New global.
11617 (tracing_stop_time): New global.
11618 (tracing_user_name): New global.
11619 (tracing_notes): New global.
11620 (tracing_stop_note): New global.
11621 (cmd_qtstart): Set traceframe_usage, start_time.
11622 (stop_tracing): Set stop_time.
11623 (cmd_qtstatus): Report additional status.
11624 (cmd_qtp): New function.
11625 (handle_tracepoint_query): Call it.
11626 (cmd_qtnotes): New function.
11627 (handle_tracepoint_general_set): Call it.
11628 (get_timestamp): Rename from tsv_get_timestamp.
11630 2011-11-14 Stan Shebs <stan@codesourcery.com>
11631 Kwok Cheung Yeung <kcy@codesourcery.com>
11633 * linux-x86-low.c (small_jump_insn): New.
11634 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11635 trampoline and error message, build a trampoline and issue a small
11636 jump instruction to it.
11637 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11638 trampoline and error message.
11639 (x86_get_min_fast_tracepoint_insn_len): New.
11640 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11641 * linux-low.h (struct linux_target_ops): Add arguments to
11642 install_fast_tracepoint_jump_pad operation, add new operation.
11643 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11645 (linux_get_min_fast_tracepoint_insn_len): New function.
11646 (linux_target_op): Add new operation.
11647 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11648 (gdb_trampoline_buffer_end): Ditto.
11649 (gdb_trampoline_buffer_error): Ditto.
11650 (struct ipa_sym_addresses): Add fields for new IPA variables.
11651 (symbol_list): Add entries for new IPA variables.
11652 (struct tracepoint): Add fields to hold the address range of the
11653 trampoline used by the tracepoint.
11654 (trampoline_buffer_head): New static variable.
11655 (trampoline_buffer_tail): Ditto.
11656 (claim_trampoline_space): New function.
11657 (have_fast_tracepoint_trampoline_buffer): New function.
11658 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11660 (install_fast_tracepoint): Ditto, also add error buffer argument.
11661 (cmd_qtminftpilen): New function.
11662 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11663 (fast_tracepoint_from_trampoline_address): New function.
11664 (fast_tracepoint_collecting): Handle trampoline as part of jump
11666 (set_trampoline_buffer_space): New function.
11667 (initialize_tracepoint): Initialize new IPA variables.
11668 * target.h (struct target_ops): Add arguments to
11669 install_fast_tracepoint_jump_pad operation, add new
11670 get_min_fast_tracepoint_insn_len operation.
11671 (target_get_min_fast_tracepoint_insn_len): New.
11672 (install_fast_tracepoint_jump_pad): Add arguments.
11673 * server.h (IPA_BUFSIZ): Define.
11674 * linux-i386-ipa.c: Include extra header files.
11675 (initialize_fast_tracepoint_trampoline_buffer): New function.
11676 (initialize_low_tracepoint): Call it.
11677 * server.h (set_trampoline_buffer_space): Declare.
11678 (claim_trampoline_space): Ditto.
11679 (have_fast_tracepoint_trampoline_buffer): Ditto.
11681 2011-11-14 Yao Qi <yao@codesourcery.com>
11683 * server.c (handle_query): Handle InstallInTrace for qSupported.
11684 * tracepoint.c (add_tracepoint): Sort list.
11685 (install_tracepoint, download_tracepoint): New.
11686 (cmd_qtdp): Call them to install and download tracepoints.
11687 (sort_tracepoints): Removed.
11688 (cmd_qtstart): Update.
11690 2011-11-14 Yao Qi <yao@codesourcery.com>
11692 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11693 * mem-break.h: Declare.
11694 * tracepoint.c (cmd_qtstart): Move some code to ...
11695 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11697 (download_tracepoints): Move some code to ...
11698 (download_tracepoint_1): ... here. New.
11700 2011-11-08 Yao Qi <yao@codesourcery.com>
11702 * remote-utils.c (relocate_instruction): A comment fix.
11704 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11706 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11707 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11708 dr_status_mirror and dr_control_mirror from debug_reg_state.
11709 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11710 (i386_initial_stuff): Remove use of deleted globals.
11711 (i386_get_thread_context, i386_set_thread_context,
11712 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11713 from debug_reg_state.
11715 2011-11-05 Yao Qi <yao@codesourcery.com>
11717 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11718 address as TPOINT's.
11720 2011-11-02 Stan Shebs <stan@codesourcery.com>
11722 * tracepoint.c (agent_mem_read_string): New function.
11723 (eval_agent_expr): Call it for tracenz.
11724 * server.c (handle_query): Report support for tracenz.
11726 2011-11-02 Yao Qi <yao@codesourcery.com>
11728 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11730 2011-11-02 Yao Qi <yao@codesourcery.com>
11732 * target.h: Fix a typo in comment.
11734 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11736 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11737 clobber the breakpoints' shadows with fast tracepoint jumps.
11738 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11739 * target.c (write_inferior_memory): Also pass MYADDR down to
11742 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11744 * configure.ac: Check support for personality routine.
11745 * configure: Regenerate.
11746 * config.in: Likewise.
11747 * linux-low.c: Include <sys/personality.h>.
11748 Define ADDR_NO_RANDOMIZE if necessary.
11749 (linux_create_inferior): Disable address space randomization when
11750 forking inferior, if requested.
11751 (linux_supports_disable_randomization): New function.
11752 (linux_target_ops): Install it.
11753 * server.h (disable_randomization): Declare.
11754 * server.c (disable_randomization): New global variable.
11755 (handle_general_set): Handle QDisableRandomization.
11756 (handle_query): Likewise for qSupported.
11757 (main): Support --disable-randomization and --no-disable-randomization
11758 command line arguments.
11759 * target.h (struct target_ops): Add supports_disable_randomization.
11760 (target_supports_disable_randomization): New macro.
11762 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11764 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11766 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11767 [!PT_GETDSBT] (target_loadmap): New definition.
11768 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11769 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11770 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11771 and PT_GETDSBT to LINUX_LOADMAP.
11772 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11773 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11775 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11777 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11778 (arm_linux_hwbp_cap): New static variable.
11779 (arm_linux_get_hwbp_cap): Replace by ...
11780 (arm_linux_init_hwbp_cap): ... this new function.
11781 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11782 (arm_linux_get_hw_watchpoint_count): Likewise.
11783 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11784 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11785 (arm_prepare_to_resume): Use perror_with_name instead of error.
11787 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11789 * linux-arm-low.c: Include <signal.h>.
11790 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11791 (struct arm_linux_hwbp_cap): New data type.
11792 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11793 (struct arm_linux_hw_breakpoint): New data type.
11794 (MAX_BPTS, MAX_WPTS): Define.
11795 (struct arch_process_info, struct arch_lwp_info): New data types.
11796 (arm_linux_get_hwbp_cap): New function.
11797 (arm_linux_get_hw_breakpoint_count): Likewise.
11798 (arm_linux_get_hw_watchpoint_count): Likewise.
11799 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11800 (arm_hwbp_control_initialize): Likewise.
11801 (arm_hwbp_control_is_enabled): Likewise.
11802 (arm_hwbp_control_is_initialized): Likewise.
11803 (arm_hwbp_control_disable): Likewise.
11804 (arm_linux_hw_breakpoint_equal): Likewise.
11805 (arm_linux_hw_point_initialize): Likewise.
11806 (struct update_registers_data): New data structure.
11807 (update_registers_callback: New function.
11808 (arm_insert_point): Likewise.
11809 (arm_remove_point): Likewise.
11810 (arm_stopped_by_watchpoint): Likewise.
11811 (arm_stopped_data_address): Likewise.
11812 (arm_new_process): Likewise.
11813 (arm_new_thread): Likewise.
11814 (arm_prepare_to_resume): Likewise.
11815 (the_low_target): Register arm_insert_point, arm_remove_point,
11816 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11817 arm_new_thread, and arm_prepare_to_resume.
11819 2011-09-15 Stan Shebs <stan@codesourcery.com>
11821 * server.h (struct emit_ops): Add compare-goto fields.
11822 * tracepoint.c (gdb_agent_op_sizes): New table.
11823 (emit_eq_goto): New function.
11824 (emit_ne_goto): New function.
11825 (emit_lt_goto): New function.
11826 (emit_le_goto): New function.
11827 (emit_gt_goto): New function.
11828 (emit_ge_goto): New function.
11829 (is_goto_target): New function.
11830 (compile_bytecodes): Recognize special cases of compare-goto
11831 combinations and call specialized emitters for them.
11832 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11833 (amd64_emit_ne_goto): New function.
11834 (amd64_emit_lt_goto): New function.
11835 (amd64_emit_le_goto): New function.
11836 (amd64_emit_gt_goto): New function.
11837 (amd64_emit_ge_goto): New function.
11838 (amd64_emit_ops): Add the new functions.
11839 (i386_emit_eq_goto): New function.
11840 (i386_emit_ne_goto): New function.
11841 (i386_emit_lt_goto): New function.
11842 (i386_emit_le_goto): New function.
11843 (i386_emit_gt_goto): New function.
11844 (i386_emit_ge_goto): New function.
11845 (i386_emit_ops): Add the new functions.
11847 2011-09-08 Stan Shebs <stan@codesourcery.com>
11849 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11850 (i386_emit_epilogue): Restore %ebx.
11852 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11854 * server.c (step_thread): Remove definition.
11855 (process_serial_event): Don't handle Hs.
11856 * server.h (step_thread): Remove declaration.
11857 * target.c (set_desired_inferior): Remove use of step_thread.
11859 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11861 * linux-low.c: Include linux-procfs.h.
11862 (linux_attach_lwp_1): Update comments.
11863 (linux_attach): Scan for existing threads when attaching to a
11864 process that is the tgid.
11865 * Makefile.in: Update dependencies.
11867 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11869 * configure.srv: Add linux-procfs.o dependencies.
11871 2011-08-14 Yao Qi <yao@codesourcery.com>
11873 * target.h (struct target_ops): Fix indent.
11874 * win32-low.c (win32_target_ops): Fix comment.
11876 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11877 Yao Qi <yao@codesourcery.com>
11879 * Makefile.in (clean): Remove tic6x-*.c files.
11880 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11881 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11882 (tic6x-c64xp-linux.c): Likewise.
11883 * configure.srv: Add support for tic6x-*-uclinux.
11884 * linux-tic6x-low.c: New.
11885 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11887 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11888 Yao Qi <yao@codesourcery.com>
11890 * target.h (struct target_ops): Add read_loadmap.
11891 * linux-low.c (struct target_loadseg): New type.
11892 (struct target_loadmap): New type.
11893 (linux_read_loadmap): New function.
11894 (linux_target_ops): Add linux_read_loadmap.
11895 * server.c (handle_query): Support qXfer:fdpic:read packet.
11896 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11899 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11901 * win32-low.c: Include <stdint.h>.
11903 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11905 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11906 to the inferior here.
11907 (i386_remove_aligned_watchpoint): Ditto.
11908 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11909 fit part of the watchpoint in the debug registers.
11910 (i386_update_inferior_debug_regs): New.
11911 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11912 registers, and only update the inferior on success.
11913 (i386_low_remove_watchpoint): Ditto.
11915 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11917 * linux-low.c (compare_ints, unique, list_threads, show_process,
11918 linux_core_of_thread): Delete.
11919 (linux_target_ops): Change linux_core_of_thread to
11920 linux_common_core_of_thread.
11921 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11922 * utils.c (malloc_failure): Change type of argument.
11923 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11924 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11925 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11926 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11927 (IPA_OBJS): Add common-utils-ipa.o.
11928 (ptid_h, linux_osdata_h): New macros.
11929 (server_h): Add common/common-utils.h, common/xml-utils.h,
11930 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11932 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11933 ptid.o, buffer.o): New rules.
11934 (linux-low.o): Add common/linux-osdata.h as a dependency.
11935 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11936 * configure.ac: Add AC_HEADER_DIRENT check.
11937 * config.in: Regenerate.
11938 * configure: Regenerate.
11939 * remote-utils.c (xml_escape_text): Delete.
11940 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11941 buffer_xml_printf): Move to common/buffer.c.
11942 * server.c (main): Remove call to initialize_inferiors.
11943 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11944 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11945 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11946 internal_error, gdb_assert, gdb_assert_fail): Delete.
11947 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11948 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11950 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11951 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11952 initialize_inferiors): Delete.
11954 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11956 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11959 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11961 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11963 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11965 2011-05-26 Yao Qi <yao@codesourcery.com>
11967 * Makefile.in (thread-db.o): Track dependence to
11968 common/gdb_thread_db.h.
11969 * thread-db.c: include gdb_thread_db.h from right place.
11971 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11973 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11974 __FILE__ and __LINE__ to internal_error.
11976 2011-05-13 Doug Evans <dje@google.com>
11978 * thread-db.c (try_thread_db_load_from_sdir): New function.
11979 (try_thread_db_load_from_dir): New function.
11980 (thread_db_load_search): Handle $sdir, ignore $pdir.
11981 Remove trying of system directories if search of
11982 libthread-db-search-path fails, that is now done via $sdir.
11984 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11986 * server.c (handle_query): Add EnableDisableTracepoints to the list
11987 of supported features.
11988 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11990 (cmd_qtenable_disable): New.
11991 (cmd_qtstart): Install tracepoints even if disabled.
11992 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11993 receiving a QTEnable or QTDisable packet.
11994 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11995 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11997 (gdb_probe): Skip data collection if static tracepoint is disabled.
11999 2011-05-10 Doug Evans <dje@google.com>
12001 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
12003 2011-05-04 Doug Evans <dje@google.com>
12005 * linux-low.c (linux_join): Skip process lookup.
12006 * spu-low.c (spu_join): Ditto.
12007 * server.c (join_inferiors_callback): Delete.
12008 (process_serial_event): For 'D' packet (detach) call join_inferior
12011 2011-05-04 Joseph Myers <joseph@codesourcery.com>
12013 * README: Don't mention xscale*-*-linux*.
12014 * configure.srv (xscale*-*-linux*): Don't handle target.
12016 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
12018 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
12020 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
12021 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
12022 (i386_emit_void_call_2): Likewise.
12024 2011-04-26 Yao Qi <yao@codesourcery.com>
12026 * linux-low.c: Move common macros to linux-ptrace.h.
12027 Include linux-ptrace.h.
12028 * Makefile.in (linux_ptrace_h): New.
12029 (linux-low.o): Depends on linux-ptrace.h.
12031 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
12033 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
12034 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
12035 (remote_prepare): New function with most of the TCP code from ...
12036 (remote_open): ... here. Detect PORT here unconditionally. Move also
12037 setting transport_is_reliable.
12038 * server.c (run_once): New variable.
12039 (gdbserver_usage): Document it.
12040 (main): Set run_once for `--once'. Call remote_prepare. Exit after
12041 the first run if RUN_ONCE.
12042 * server.h (run_once, remote_prepare): New declarations.
12044 2011-04-19 Tom Tromey <tromey@redhat.com>
12046 * win32-low.c (handle_load_dll): Remove duplicate "the".
12048 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
12050 Remove support for old Cygwin 1.5 versions.
12051 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
12052 function to avoid warning.
12053 (win32_add_one_solib): Use cygwin_conv_path function to avoid
12056 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
12058 * gdbserver/server.h (Macro _): Define it if not available.
12060 2011-03-14 Michael Snyder <msnyder@vmware.com>
12062 * hostio.c (handle_close): Remove unnecessary null test.
12064 2011-03-10 Joel Brobecker <brobecker@adacore.com>
12066 * Makefile.in (maintainer-clean realclean distclean): Remove
12067 "make ... subdir_do" command.
12069 2011-03-10 Michael Snyder <msnyder@vmware.com>
12071 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
12073 * server.c (handle_v_run): Free alloced buffer on early return.
12075 2011-03-09 Yao Qi <yao@codesourcery.com>
12078 2011-03-04 Yao Qi <yao@codesourcery.com>
12080 * Makefile.in: Remove GNU make feature --directory.
12082 2011-03-05 Yao Qi <yao@codesourcery.com>
12084 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12085 (subdir_do): New make target. Copied from gdb/Makefile.
12086 (maintainer-clean, realclean, distclean, clean): Call corresponding
12087 make targets in common/Makefile.
12089 2011-02-11 Yao Qi <yao@codesourcery.com>
12091 * configure.ac: Call AC_PROG_RANLIB.
12092 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12093 * configure: Regenerate.
12095 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12097 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
12099 2011-03-06 Yao Qi <yao@codesourcery.com>
12101 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
12103 2011-03-05 Yao Qi <yao@codesourcery.com>
12105 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
12106 (subdir_do): New make target. Copied from gdb/Makefile.
12107 (maintainer-clean, realclean, distclean, clean): Call corresponding
12108 make targets in common/Makefile.
12110 2011-03-04 Yao Qi <yao@codesourcery.com>
12112 * Makefile.in: Remove GNU make feature --directory.
12114 2011-03-04 Michael Snyder <msnyder@vmware.com>
12116 * server.c (queue_stop_reply): Call xmalloc not malloc.
12118 2011-03-02 Michael Snyder <msnyder@vmware.com>
12120 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
12122 2011-02-28 Michael Snyder <msnyder@vmware.com>
12124 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
12125 (cmd_qtframe): Ditto.
12126 (cmd_qtbuffer): Ditto.
12127 (cmd_bigqtbuffer): Ditto.
12129 * utils.c (decimal2str): Initialize 'width' to nine, then
12130 don't mess with it.
12132 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
12134 * hostio.c (require_data): Free *data, not data.
12136 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12138 * hostio.c (require_data): Use free, not xfree.
12140 2011-02-27 Michael Snyder <msnyder@vmware.com>
12142 * server.c (handle_query): Discard unused value.
12144 * hostio.c (require_data): Free malloc memory before returning
12147 2011-02-26 Michael Snyder <msnyder@vmware.com>
12149 * linux-low.c (list_threads): Call closedir for dirent.
12151 2011-02-27 Michael Snyder <msnyder@vmware.com>
12153 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
12154 a case statement falls through.
12156 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
12158 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
12161 2011-02-26 Michael Snyder <msnyder@vmware.com>
12163 * utils.c (decimal2str): Eliminate dead code and dead param.
12164 (pulongest): Drop dead param from call to decimal2str.
12167 2011-02-24 Joel Brobecker <brobecker@adacore.com>
12169 Revert the following patch (not approved yet):
12170 2011-02-21 Hui Zhu <teawater@gmail.com>
12171 * tracepoint.c (tp_printf): New function.
12172 (eval_agent_expr): Handle gdb_agent_op_printf.
12174 2011-02-21 Hui Zhu <teawater@gmail.com>
12176 * tracepoint.c (tp_printf): New function.
12177 (eval_agent_expr): Handle gdb_agent_op_printf.
12179 2011-02-18 Tom Tromey <tromey@redhat.com>
12181 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
12182 (tracepoint.o): Likewise.
12183 * tracepoint.c (enum gdb_agent_op): Use ax.def.
12184 (gdb_agent_op_names): Likewise.
12186 2011-02-18 Tom Tromey <tromey@redhat.com>
12188 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
12189 gdb_agent_op_rot>: New constants.
12190 (gdb_agent_op_names): Add pick and roll.
12191 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
12194 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
12196 * aclocal.m4: Regenerated with aclocal-1.11.1.
12198 2011-02-14 Pedro Alves <pedro@codesourcery.com>
12200 * server.c (handle_qxfer_traceframe_info): New.
12201 (qxfer_packets): Register "traceframe-info".
12202 (handle_query): Report support for qXfer:traceframe-info:read+.
12203 * tracepoint.c (match_blocktype): New.
12204 (traceframe_find_block_type): Rename to ...
12205 (traceframe_walk_blocks): ... this. Add callback filter argument,
12207 (traceframe_find_block_type): New, reimplemented on top of
12208 traceframe_walk_blocks.
12209 (build_traceframe_info_xml): New.
12210 (traceframe_read_info): New.
12211 * server.h (traceframe_read_info): Declare.
12213 2011-02-11 Yao Qi <yao@codesourcery.com>
12215 * configure.ac: Call AC_PROG_RANLIB.
12216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
12217 * configure: Regenerate.
12219 2011-02-07 Pedro Alves <pedro@codesourcery.com>
12221 * server.c (gdb_read_memory): Change return semantics to allow
12223 (handle_search_memory_1): Adjust.
12224 (process_serial_event) <'m' packet>: Handle partial transfers.
12225 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
12227 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12229 * regcache.c (init_register_cache): Initialize
12230 regcache->register_status.
12231 (free_register_cache): Release regcache->register_status.
12232 (regcache_cpy): Copy register_status.
12233 (registers_to_string): Print 'x's for unavailable registers.
12234 (supply_register): Mark the register's status valid or
12235 unavailable, depending on whether a buffer was passed in or not.
12236 (supply_register_zeroed): New.
12237 (supply_regblock): Mark the registers' status valid or
12238 unavailable, depending on whether a buffer was passed in or not.
12239 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
12240 (struct regcache): New `register_status' field.
12241 (supply_register_zeroed): Declare.
12242 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
12243 supply_register_zeroed, rather than passing a NULL buffer to
12245 * tracepoint.c (fetch_traceframe_registers): Update comment.
12247 2011-01-28 Pedro Alves <pedro@codesourcery.com>
12249 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
12252 2011-01-25 Pedro Alves <pedro@codesourcery.com>
12254 * server.h (decode_xfer_write): Change prototype.
12255 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
12256 and don't extract the annex here.
12257 * server.c (decode_xfer_read): Remove `annex' parameter,
12258 and don't extract the annex here.
12259 (decode_xfer): New.
12260 (struct qxfer): New.
12261 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
12262 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
12263 (handle_qxfer_statictrace): New functions, abstracted out from
12264 handle_query, and made to use the struct qxfer interface.
12265 (handle_threads_qxfer_proper): Rename to ...
12266 (handle_qxfer_threads_proper): ... this.
12267 (handle_threads_qxfer): Rename to ...
12268 (handle_qxfer_threads): ... this. Adjust.
12269 (qxfer_packets): New array.
12270 (handle_qxfer): New function.
12271 (handle_query): Use handle_qxfer.
12273 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
12275 * gdbreplay.c: Shorten lines of >= 80 columns.
12276 * linux-low.c: Ditto.
12277 * linux-ppc-low.c: Ditto.
12278 * linux-s390-low.c: Ditto.
12279 * linux-sparc-low.c: Ditto.
12280 * linux-x86-low.c: Ditto.
12281 * linux-xtensa-low.c: Ditto.
12282 * mem-break.c: Ditto.
12283 * nto-low.c: Ditto.
12284 * regcache.h: Ditto.
12285 * remote-utils.c: Ditto.
12288 * thread-db.c: Ditto.
12289 * tracepoint.c: Ditto.
12291 * win32-low.h: Ditto.
12293 2011-01-05 Joel Brobecker <brobecker@adacore.com>
12295 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
12298 2011-01-01 Joel Brobecker <brobecker@adacore.com>
12300 * server.c (gdbserver_version): Update copyright year in version
12302 * gdbreplay.c (gdbreplay_version): Ditto.
12304 2010-12-29 Jie Zhang <jie.zhang@analog.com>
12306 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
12307 * linux-bfin-low.c: New file.
12308 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
12309 PT_DATA_ADDR for BFIN targets.
12310 * Makefile.in (SFILES): Add linux-bfin-low.c.
12311 (clean): Remove reg-bfin.c.
12312 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
12313 * README: Mention supported Blackfin targets.
12315 2010-12-23 Mike Frysinger <vapier@gentoo.org>
12317 * .gitignore: New file.
12319 2010-11-16 Mike Frysinger <vapier@gentoo.org>
12321 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
12323 2010-10-22 Jie Zhang <jie@codesourcery.com>
12325 * Makefile.in: Add FLAGS_TO_PASS variable.
12326 (install): Remove dependency of install-only and recursively
12327 invoke make for install-only.
12329 2010-10-04 Doug Evans <dje@google.com>
12331 * Makefile.in (uninstall): Use $(DESTDIR).
12333 2010-09-24 Pedro Alves <pedro@codesourcery.com>
12337 * linux-x86-low.c (compat_siginfo_from_siginfo)
12338 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
12339 si_code is < 0. Check for si_code == SI_TIMER before checking for
12342 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12344 * lynx-i386-low.c: New file.
12345 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
12347 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12349 * lynx-low.c (ptrace_request_to_str): Remove handling for
12350 request values that have been removed in LynxOS 5.x.
12352 2010-09-13 Joel Brobecker <brobecker@adacore.com>
12354 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12357 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12359 * configure.ac: Add --enable-inprocess-agent option.
12360 * configure: Rebuilt.
12362 2010-09-06 Yao Qi <yao@codesourcery.com>
12364 * linux-low.c (linux_kill): Remove unused variable.
12365 (linux_stabilize_threads): Likewise.
12366 * server.c (start_inferior): Likewise.
12367 (queue_stop_reply_callback): Likewise.
12368 * tracepoint.c (do_action_at_tracepoint): Likewise.
12370 2010-09-06 Yao Qi <yao@codesourcery.com>
12372 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12375 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12377 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12379 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12381 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12384 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12386 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12387 gdbserver/lynx-ppc-low.c: New files.
12388 * Makefile.in (lynx_low_h): New variable.
12389 (lynx-low.o, lynx-ppc-low.o): New rules.
12390 * configure.ac: On LynxOS, link with -lnetinet.
12391 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12392 * configure: regenerate.
12394 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12396 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12397 * configure.ac: Add check for vasprintf and vsnprintf.
12398 * configure, config.in: Regenerate.
12399 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12401 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12403 * gdbreplay.c: Move include of alloca.h up, next to include of
12405 * server.h: Add include of malloc.h.
12406 * mem-break.c: Remove include of malloc.h.
12407 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12409 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12411 * Makefile.in (memmem.o): Build with -Wno-error.
12413 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12415 * utils.c (xsnprintf): Make non-static.
12416 * server.h: Add xsnprintf declaration.
12417 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12418 replace calls to snprintf by calls to xsnprintf throughout.
12420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12422 * configure.ac: Add configure check for alloca.
12423 * configure, config.in: Regenerate.
12424 * server.h: Include alloca.h if it exists.
12425 * gdbreplay.c: Include alloca.h if it exists.
12427 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12429 * linux-low.c (__SIGRTMIN): Define if not already defined.
12430 (linux_create_inferior): Check for __ANDROID__ rather than
12432 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12433 are already deferred.
12434 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12435 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12436 stopped and already has a pending signal to report.
12437 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12438 a pending signal to report or is moving out of a jump pad.
12439 (linux_init_signals): Check for __ANDROID__ rather than
12442 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12444 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12445 debug_threads check. Avoid a linear search when not doing debug
12448 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12450 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12451 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12452 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12453 (process_event): Change local fd's type to gdb_fildes_t.
12454 (create_file_handler): Adjust prototype.
12455 (delete_file_handler): Adjust prototype.
12456 (handle_file_event): Adjust prototype. Use pfildes.
12457 (create_file_event): Adjsut prototype.
12458 * remote-utils.c (remote_desc, listen_desc): Change type to
12460 * server.h: New gdb_fildes_t typedef.
12461 [USE_WIN32API]: Include winsock2.h.
12462 (delete_file_handler, add_file_handler): Adjust prototypes.
12463 (pfildes): Declare.
12464 * utils.c (pfildes): New.
12466 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12468 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12469 * configure: Regenerate.
12471 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12473 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12474 (linux_done_accessing_memory): ... this.
12475 (linux_target_ops): Adjust.
12476 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12477 * nto-low.c (nto_target_ops): Adjust comment.
12478 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12479 * spu-low.c (spu_target_ops): Adjust comment.
12480 * target.h (target_ops): Rename unprepare_to_access_memory field
12481 to done_accessing_memory.
12482 (unprepare_to_access_memory): Rename to ...
12483 (done_accessing_memory): ... this.
12485 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12487 * linux-low.c (linux_prepare_to_access_memory): New.
12488 (linux_unprepare_to_access_memory): New.
12489 (linux_target_ops): Install them.
12490 * server.c (read_memory): Rename to ...
12491 (gdb_read_memory): ... this. Use
12492 prepare_to_access_memory/prepare_to_access_memory.
12493 (write_memory): Rename to ...
12494 (gdb_write_memory): ... this. Use
12495 prepare_to_access_memory/prepare_to_access_memory.
12496 (handle_search_memory_1): Adjust.
12497 (process_serial_event): Adjust.
12498 * target.h (struct target_ops): New fields
12499 prepare_to_access_memory and unprepare_to_access_memory.
12500 (prepare_to_access_memory, unprepare_to_access_memory): New.
12501 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12502 prepare_to_access_memory/prepare_to_access_memory.
12503 * nto-low.c (nto_target_ops): Adjust.
12504 * spu-low.c (spu_target_ops): Adjust.
12505 * win32-low.c (win32_target_ops): Adjust.
12507 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12509 * Makefile.in (WARN_CFLAGS): Get it from configure.
12510 (WERROR_CFLAGS): New.
12511 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12512 * configure.ac: Introduce --enable-werror, which adds -Werror to
12513 the compiler command line. Enabled by default. Disable with
12514 --disable-werror. Add -Wdeclaration-after-statement
12515 Wpointer-arith and -Wformat-nonliteral to warning flags.
12516 * configure: Regenerate.
12518 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12520 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12522 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12524 * gdbreplay.c (remote_error): New.
12526 (expect): Use gdbchar. Check for error reading from GDB.
12527 Clarify sync error output.
12528 (play): Check for errors writing to GDB.
12529 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12530 * remote-utils.c (getpkt): Check for errors writing to the remote
12533 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12535 * linux-low.c (linux_wait_1): Move non-debugging code out of
12536 `debug_threads' control.
12538 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12540 * linux-low.c (linux_wait_1): Don't set last_status here.
12541 * server.c (push_event, queue_stop_reply_callback): Assert we're
12542 not pushing a TARGET_WAITKIND_IGNORE event.
12543 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12544 (myresume, handle_target_event): Set the thread's last_resume_kind
12545 and last_status from the target returned status.
12547 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12551 * linux-x86-low.c (update_debug_registers_callback): New.
12552 (i386_dr_low_set_addr): Use it.
12553 (i386_dr_low_get_addr): New.
12554 (i386_dr_low_set_control): Use update_debug_registers_callback.
12555 (i386_dr_low_get_control): New.
12556 (i386_dr_low_get_status): Adjust.
12557 * linux-low.c (linux_stop_lwp): New.
12558 * linux-low.h (linux_stop_lwp): Declare.
12560 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12561 argument instead of a i386_debug_reg_state.
12562 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12563 a i386_debug_reg_state.
12564 (i386_insert_aligned_watchpoint): Adjust.
12565 (i386_remove_aligned_watchpoint): Adjust.
12566 (i386_low_stopped_data_address): Read the debug registers from the
12567 inferior instead of from the mirrors.
12568 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12569 (i386_dr_low_get_addr): Declare.
12570 (i386_dr_low_get_control): Declare.
12571 (i386_dr_low_get_status): Change prototype.
12573 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12574 (i386_dr_low_get_addr): New.
12575 (i386_dr_low_get_control): New.
12576 (i386_dr_low_get_status): Adjust prototype. Return
12578 (i386_initial_stuff): Clear dr_status_mirror and
12580 (i386_get_thread_context): Adjust.
12581 (i386_set_thread_context): Adjust.
12582 (i386_thread_added): Adjust.
12584 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12586 * linux-low.h (linux_thread_area): Delete declaration.
12588 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12590 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12591 after its termination.
12593 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12595 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12596 (gdb_wants_all_stopped): Delete.
12597 (linux_wait_1): Don't call them.
12598 * server.c (handle_v_cont): Tag all threads as want-stopped.
12599 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12600 stopped as "client-wants-stopped".
12602 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12604 * Makefile.in (signals_h): New.
12605 (server_h): Depend on it.
12606 (server.o): Don't depend on $(signals_def).
12607 (signals.o): Depend on $(signals_def).
12609 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12611 * Makefile.in (signals_def): New.
12612 (server_h): Append include/gdb/signals.h and signals_def.
12613 (server.o): Append signals_def.
12615 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12617 * server.c (handle_target_event): Use target_signal_to_host for
12618 resume_info.sig initialization.
12619 * target.h (struct thread_resume) <sig>: New comment.
12621 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12623 * server.c (handle_query): strcpy() the returned string from paddress()
12624 instead of sprintf().
12625 * utils.c (paddress): Return phex_nz().
12627 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12629 * server.c (handle_v_cont): Call mourn_inferior if process
12631 (myresume): Likewise.
12633 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12635 Static tracepoints, and integration with UST.
12637 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12638 * mem-break.c (uninsert_all_breakpoints)
12639 (reinsert_all_breakpoints): New.
12640 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12641 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12642 (gdb_agent_ust_loaded, helper_thread_id)
12643 (gdb_agent_helper_thread_id): New macros.
12644 (struct ipa_sym_addresses): Add addr_ust_loaded,
12645 addr_helper_thread_id, addr_cmd_buf.
12646 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12647 (in_process_agent_loaded_ust): New.
12648 (write_e_ust_not_loaded): New.
12649 (maybe_write_ipa_ust_not_loaded): New.
12650 (struct collect_static_trace_data_action): New.
12651 (enum tracepoint_type) <static_tracepoint>: New.
12652 (struct tracepoint) <handle>: Mention static tracepoints.
12653 (struct static_tracepoint_ctx): New.
12654 (CMD_BUF_SIZE): New.
12655 (add_tracepoint_action): Handle static tracepoint actions.
12656 (unprobe_marker_at): New.
12657 (clear_installed_tracepoints): Handle static tracepoints.
12658 (cmd_qtdp): Handle static tracepoints.
12659 (probe_marker_at): New.
12660 (cmd_qtstart): Handle static tracepoints.
12661 (response_tracepoint): Handle static tracepoints.
12662 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12663 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12664 (get_context_regcache): Handle static tracepoints.
12665 (do_action_at_tracepoint): Handle static tracepoint actions.
12666 (traceframe_find_block_type): Handle static trace data blocks.
12667 (traceframe_read_sdata): New.
12668 (download_tracepoints): Download static tracepoint actions.
12669 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12670 (GDB_PROBE_NAME): New.
12672 (GET_UST_SYM): New.
12675 (ust_marker_to_static_tracepoint): New.
12677 (collect_ust_data_at_tracepoint): New.
12678 (gdb_ust_probe): New.
12679 (UNIX_PATH_MAX, SOCK_DIR): New.
12680 (gdb_ust_connect_sync_socket): New.
12681 (resume_thread, stop_thread): New.
12682 (run_inferior_command): New.
12683 (init_named_socket): New.
12684 (gdb_ust_socket_init): New.
12685 (cstr_to_hexstr): New.
12687 (first_marker, next_marker): New.
12688 (response_ust_marker): New.
12689 (cmd_qtfstm, cmd_qtsstm): New.
12690 (unprobe_marker_at, probe_marker_at): New.
12691 (cmd_qtstmat, gdb_ust_thread): New.
12692 (gdb_ust_init): New.
12693 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12694 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12695 (ST_REGENTRY): New.
12696 (x86_64_st_collect_regmap): New.
12697 (X86_64_NUM_ST_COLLECT_GREGS): New.
12698 (AMD64_RIP_REGNUM): New.
12699 (supply_static_tracepoint_registers): New.
12700 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12701 (ST_REGENTRY): New.
12702 (i386_st_collect_regmap): New.
12703 (i386_NUM_ST_COLLECT_GREGS): New.
12704 (supply_static_tracepoint_registers): New.
12705 * server.c (handle_query): Handle qXfer:statictrace:read.
12706 <qSupported>: Report support for StaticTracepoints, and
12707 qXfer:statictrace:read features.
12708 * server.h (traceframe_read_sdata)
12709 (supply_static_tracepoint_registers): Declare.
12710 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12711 (unpack_varlen_hex): Include in IPA build.
12712 * Makefile.in (ustlibs, ustinc): New.
12713 (IPA_OBJS): Add remote-utils-ipa.o.
12714 ($(IPA_LIB)): Link -ldl and -lpthread.
12716 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12717 * config.in, configure: Regenerate.
12719 2010-06-20 Ian Lance Taylor <iant@google.com>
12720 Pedro Alves <pedro@codesourcery.com>
12722 * linux-x86-low.c (always_true): Delete.
12723 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12724 trying to fool the compiler with always_true.
12726 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12728 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12729 conditions in gdbserver.
12731 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12733 * spu-low.c (spu_read_memory): Wrap around local store limit.
12734 (spu_write_memory): Likewise.
12736 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12738 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12739 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12741 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12743 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12744 uses with LONGEST uses.
12746 2010-06-14 Stan Shebs <stan@codesourcery.com>
12747 Pedro Alves <pedro@codesourcery.com>
12751 * linux-x86-low.c: Include limits.h.
12753 (always_true): New.
12756 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12757 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12758 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12759 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12760 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12761 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12762 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12763 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12764 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12765 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12766 (amd64_emit_void_call_2): New.
12767 (amd64_emit_ops): New.
12768 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12769 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12770 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12771 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12772 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12773 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12774 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12775 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12776 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12777 (i386_emit_stack_adjust, i386_emit_int_call_1)
12778 (i386_emit_void_call_2): New.
12779 (i386_emit_ops): New.
12780 (x86_emit_ops): New.
12781 (the_low_target): Install x86_emit_ops.
12782 * server.h (struct emit_ops): New.
12783 (get_raw_reg_func_addr): Declare.
12784 (current_insn_ptr, emit_error): Declare.
12785 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12786 (set_trace_state_variable_value): New defines.
12787 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12788 addr_get_trace_state_variable_value and
12789 addr_set_trace_state_variable_value.
12790 (symbol_list): New fields for get_raw_reg,
12791 get_trace_state_variable_value and set_trace_state_variable_value.
12792 (condfn): New typedef.
12793 (struct tracepoint): New field `compiled_cond'.
12794 (do_action_at_tracepoint): Clear compiled_cond.
12795 (get_trace_state_variable_value, set_trace_state_variable_value):
12797 (condition_true_at_tracepoint): If there's a compiled condition,
12799 (current_insn_ptr, emit_error): New globals.
12800 (struct bytecode_address): New.
12801 (get_raw_reg_func_addr): New.
12802 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12803 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12804 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12805 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12806 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12807 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12808 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12809 (compile_tracepoint_condition, compile_bytecodes): New.
12810 * target.h (emit_ops): Forward declare.
12811 (struct target_ops): New field emit_ops.
12812 (target_emit_ops): New.
12813 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12814 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12815 * linux-low.c (linux_emit_ops): New.
12816 (linux_target_ops): Install it.
12817 * linux-low.h (struct linux_target_ops): New field emit_ops.
12819 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12821 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12822 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12824 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12825 Stan Shebs <stan@codesourcery.com>
12827 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12828 (all): Depend on $(extra_libraries).
12829 (install-only): Install the IPA.
12830 (IPA_OBJS, IPA_LIB): New.
12831 (clean): Remove the IPA lib.
12832 (IPAGENT_CFLAGS): New.
12833 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12834 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12835 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12836 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12837 * configure.ac: Check for atomic builtins support in the compiler.
12838 (IPA_DEPFILES, extra_libraries): Define.
12839 * configure.srv (ipa_obj): Add description.
12840 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12841 (i[34567]86-*-linux*): Set ipa_obj.
12842 (x86_64-*-linux*): Set ipa_obj.
12843 * linux-low.c (stabilizing_threads): New.
12844 (supports_fast_tracepoints): New.
12845 (linux_detach): Stabilize threads before detaching.
12846 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12847 the lwp is either not stabilizing, or is moving out of a jump pad.
12848 (linux_fast_tracepoint_collecting): New.
12849 (maybe_move_out_of_jump_pad): New.
12850 (enqueue_one_deferred_signal): New.
12851 (dequeue_one_deferred_signal): New.
12852 (linux_wait_for_event_1): If moving out of a jump pad, defer
12853 pending signals to later.
12854 (linux_stabilize_threads): New.
12855 (linux_wait_1): Check if threads need moving out of jump pads, and
12857 (stuck_in_jump_pad_callback): New.
12858 (move_out_of_jump_pad_callback): New.
12859 (lwp_running): New.
12860 (linux_resume_one_lwp): Handle moving out of jump pads.
12861 (linux_set_resume_request): Dequeue deferred signals.
12862 (need_step_over_p): Also step over fast tracepoint jumps.
12863 (start_step_over): Also uninsert fast tracepoint jumps.
12864 (finish_step_over): Also reinsert fast tracepoint jumps.
12865 (linux_install_fast_tracepoint_jump): New.
12866 (linux_target_ops): Install linux_stabilize_threads and
12867 linux_install_fast_tracepoint_jump_pad.
12868 * linux-low.h (linux_target_ops) <get_thread_area,
12869 install_fast_tracepoint_jump_pad>: New fields.
12870 (struct lwp_info) <collecting_fast_tracepoint,
12871 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12872 (linux_get_thread_area): Declare.
12873 * linux-x86-low.c (jump_insn): New.
12874 (x86_get_thread_area): New.
12875 (append_insns): New.
12876 (push_opcode): New.
12877 (amd64_install_fast_tracepoint_jump_pad): New.
12878 (i386_install_fast_tracepoint_jump_pad): New.
12879 (x86_install_fast_tracepoint_jump_pad): New.
12880 (the_low_target): Install x86_get_thread_area and
12881 x86_install_fast_tracepoint_jump_pad.
12882 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12883 (struct fast_tracepoint_jump): New.
12884 (fast_tracepoint_jump_insn): New.
12885 (fast_tracepoint_jump_shadow): New.
12886 (find_fast_tracepoint_jump_at): New.
12887 (fast_tracepoint_jump_here): New.
12888 (delete_fast_tracepoint_jump): New.
12889 (set_fast_tracepoint_jump): New.
12890 (uninsert_fast_tracepoint_jumps_at): New.
12891 (reinsert_fast_tracepoint_jumps_at): New.
12892 (set_breakpoint_at): Use write_inferior_memory.
12893 (uninsert_raw_breakpoint): Use write_inferior_memory.
12894 (check_mem_read): Mask out fast tracepoint jumps.
12895 (check_mem_write): Mask out fast tracepoint jumps.
12896 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12897 (set_fast_tracepoint_jump): Declare.
12898 (delete_fast_tracepoint_jump)
12899 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12900 (reinsert_fast_tracepoint_jumps_at): Declare.
12901 * regcache.c: Don't compile many functions when building the
12902 in-process agent library.
12903 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12904 the register buffer in the heap.
12905 (free_register_cache): If the register buffer isn't owned by the
12906 regcache, don't free it.
12907 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12908 pre-existing register caches.
12909 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12911 (convert_ascii_to_int): : Constify `from' parameter type.
12912 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12913 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12914 the needed buffer in-place.
12915 (relocate_instruction): New.
12916 * server.c (handle_query) <qSymbols>: If the target supports
12917 tracepoints, give it a chance of looking up symbols. Report
12918 support for fast tracepoints.
12919 (handle_status): Stabilize threads.
12920 (process_serial_event): Adjust.
12921 * server.h (struct fast_tracepoint_jump): Forward declare.
12922 (struct process_info) <fast_tracepoint_jumps>: New field.
12923 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12924 (decode_X_packet, decode_M_packet): Adjust.
12925 (relocate_instruction): Declare.
12926 (in_process_agent_loaded): Declare.
12927 (tracepoint_look_up_symbols): Declare.
12928 (struct fast_tpoint_collect_status): Declare.
12929 (fast_tracepoint_collecting): Declare.
12930 (force_unlock_trace_buffer): Declare.
12931 (handle_tracepoint_bkpts): Declare.
12932 (initialize_low_tracepoint)
12933 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12934 * target.h (struct target_ops) <stabilize_threads,
12935 install_fast_tracepoint_jump_pad>: New fields.
12936 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12937 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12938 [HAVE_STDINT_H]: Include stdint.h.
12939 (trace_debug_1): Rename to ...
12940 (trace_vdebug): ... this.
12941 (trace_debug): Rename to ...
12942 (trace_debug_1): ... this. Add `level' parameter.
12943 (trace_debug): New.
12944 (ATTR_USED, ATTR_NOINLINE): New.
12945 (IP_AGENT_EXPORT): New.
12946 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12947 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12948 (about_to_request_buffer_space, trace_buffer_is_full)
12949 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12950 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12951 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12952 (traceframe_write_count, traceframes_created)
12953 (trace_state_variables)
12954 New renaming defines.
12955 (struct ipa_sym_addresses): New.
12956 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12957 (symbol_list): New.
12958 (ipa_sym_addrs): New.
12959 (all_tracepoint_symbols_looked_up): New.
12960 (in_process_agent_loaded): New.
12961 (write_e_ipa_not_loaded): New.
12962 (maybe_write_ipa_not_loaded): New.
12963 (tracepoint_look_up_symbols): New.
12964 (debug_threads) [IN_PROCESS_AGENT]: New.
12965 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12966 (UNKNOWN_SIDE_EFFECTS): New.
12967 (stop_tracing): New.
12968 (flush_trace_buffer): New.
12969 (stop_tracing_bkpt): New.
12970 (flush_trace_buffer_bkpt): New.
12971 (read_inferior_integer): New.
12972 (read_inferior_uinteger): New.
12973 (read_inferior_data_pointer): New.
12974 (write_inferior_data_pointer): New.
12975 (write_inferior_integer): New.
12976 (write_inferior_uinteger): New.
12977 (struct collect_static_trace_data_action): Delete.
12978 (enum tracepoint_type): New.
12979 (struct tracepoint) <type>: New field `type'.
12980 <actions_str, step_actions, step_actions_str>: Only include in
12982 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12983 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12984 (tracepoints): Use IP_AGENT_EXPORT.
12985 (last_tracepoint): Don't include in the IPA.
12986 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12987 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12988 (alloced_trace_state_variables): New.
12989 (trace_state_variables): Use IP_AGENT_EXPORT.
12990 (traceframe_t): Delete unused variable.
12991 (circular_trace_buffer): Don't include in the IPA.
12992 (trace_buffer_start): Delete.
12993 (struct trace_buffer_control): New.
12994 (trace_buffer_free): Delete.
12995 (struct ipa_trace_buffer_control): New.
12996 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12997 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12999 (trace_buffer_ctrl): New.
13000 (TRACE_BUFFER_CTRL_CURR): New.
13001 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
13002 Reimplement as macros.
13003 (trace_buffer_wrap): Delete.
13004 (traceframe_write_count, traceframe_read_count)
13005 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
13006 (struct tracepoint_hit_ctx) <type>: New field.
13007 (struct fast_tracepoint_ctx): New.
13008 (memory_barrier): New.
13010 (record_tracepoint_error): Update atomically in the IPA.
13011 (clear_inferior_trace_buffer): New.
13012 (about_to_request_buffer_space): New.
13013 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
13014 updating the same buffer.
13015 (add_tracepoint): Default the tracepoint's type to trap
13016 tracepoint, and orig_size to -1.
13017 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
13018 internal variables.
13019 (create_trace_state_variable): New parameter `gdb'. Handle it.
13020 (clear_installed_tracepoints): Clear fast tracepoint jumps.
13021 (cmd_qtdp): Handle fast tracepoints.
13022 (cmd_qtdv): Adjust.
13023 (max_jump_pad_size): New.
13024 (gdb_jump_pad_head): New.
13025 (get_jump_space_head): New.
13026 (claim_jump_space): New.
13027 (sort_tracepoints): New.
13028 (MAX_JUMP_SIZE): New.
13029 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
13031 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
13032 support. Upload fast traceframes, and delete internal IPA
13034 (stop_tracing_handler): New.
13035 (flush_trace_buffer_handler): New.
13036 (cmd_qtstop): Upload fast tracepoints.
13037 (response_tracepoint): Handle fast tracepoints.
13038 (tracepoint_finished_step): Upload fast traceframes. Set the
13039 tracepoint hit context's tracepoint type.
13040 (handle_tracepoint_bkpts): New.
13041 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
13042 type. Add comment about fast tracepoints.
13043 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
13044 non-existing action_str field.
13045 (get_context_regcache): Handle fast tracepoints.
13046 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
13048 (fast_tracepoint_from_jump_pad_address): New.
13049 (fast_tracepoint_from_ipa_tpoint_address): New.
13050 (collecting_t): New.
13051 (force_unlock_trace_buffer): New.
13052 (fast_tracepoint_collecting): New.
13054 (gdb_collect): New.
13055 (write_inferior_data_ptr): New.
13056 (target_tp_heap): New.
13057 (target_malloc): New.
13058 (download_agent_expr): New.
13060 (download_tracepoints): New.
13061 (download_trace_state_variables): New.
13062 (upload_fast_traceframes): New.
13063 (IPA_FIRST_TRACEFRAME): New.
13064 (IPA_NEXT_TRACEFRAME_1): New.
13065 (IPA_NEXT_TRACEFRAME): New.
13066 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
13067 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
13068 (gdb_jump_pad_buffer_end): New.
13069 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
13070 (initialize_tracepoint): Adjust.
13071 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
13072 buffer. Initialize the low module.
13073 * utils.c (PREFIX, TOOLNAME): New.
13074 (malloc_failure): Use PREFIX.
13075 (error): In the IPA, an error causes an exit.
13076 (fatal, warning): Use PREFIX.
13077 (internal_error): Use TOOLNAME.
13078 (NUMCELLS): Increase to 10.
13079 * configure, config.in: Regenerate.
13081 2010-06-01 Pedro Alves <pedro@codesourcery.com>
13083 * server.c (handle_query) <qSupported>: Do two passes over the
13084 qSupported string to avoid nesting strtok.
13086 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13088 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
13090 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
13091 -Wl,--dynamic-list.
13092 * configure: Regenerate.
13093 * proc-service.list: New.
13095 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13097 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
13100 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
13102 * gdbreplay.c (remote_open): Check error return from socket() call by
13103 its equality to -1 not by it being negative.
13104 * remote-utils.c (remote_open): Likewise.
13106 2010-05-23 Pedro Alves <pedro@codesourcery.com>
13108 * config.h: Regenerate.
13110 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13112 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
13113 doesn't provide PTRACE_GET_THREAD_AREA.
13115 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
13117 * linux-m68k-low.c: Include <asm/ptrace.h>
13118 (ps_get_thread_area): Implement.
13120 2010-05-03 Doug Evans <dje@google.com>
13122 * event-loop.c (struct callback_event): New struct.
13123 (callback_list): New global.
13124 (append_callback_event, delete_callback_event): New functions.
13125 (process_callback): New function.
13126 (start_event_loop): Call it.
13127 * remote-utils.c (NOT_SCHEDULED): Define.
13128 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
13129 moved out of readchar.
13130 (readchar): Rewrite. Call reschedule before returning.
13131 (reset_readchar): New function.
13132 (remote_close): Call it.
13133 (process_remaining, reschedule): New functions.
13134 * server.h (callback_handler_func): New typedef.
13135 (append_callback_event, delete_callback_event): Declare.
13137 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13139 * proc-service.c (ps_pglobal_lookup): Use
13140 thread_db_look_up_one_symbol.
13141 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
13142 parameter. Use it instead of all_symbols_looked_up.
13143 * server.h (struct process_info) <all_symbols_looked_up>: Delete
13145 (all_symbols_looked_up): Don't declare.
13146 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
13147 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
13149 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
13150 Set all_symbols_looked_up here.
13151 (thread_db_look_up_one_symbol): New.
13152 (thread_db_get_tls_address): Adjust.
13153 (thread_db_load_search, try_thread_db_load_1): Always allocate the
13154 thread_db object on the heap, and tentatively set it in the
13156 (thread_db_init): Don't set all_symbols_looked_up here.
13157 * linux-low.h (thread_db_look_up_one_symbol): Declare.
13159 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13161 * linux-low.c (linux_kill, linux_detach): Adjust.
13162 (status_pending_p_callback): Remove redundant statement. Check
13163 for !TARGET_WAITIKIND_IGNORE, instead of
13164 TARGET_WAITKIND_STOPPED.
13165 (handle_tracepoints): Make sure LWP is locked. Adjust.
13166 (linux_wait_for_event_1): Adjust.
13167 (linux_cancel_breakpoints): New.
13168 (unsuspend_one_lwp): New.
13169 (unsuspend_all_lwps): New.
13170 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
13171 (send_sigstop_callback): Change return type to int, add new
13172 `except' parameter and handle it.
13173 (suspend_and_send_sigstop_callback): New.
13174 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
13175 pass them down. If SUSPEND, also increment the lwp's suspend
13177 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
13178 (need_step_over_p): Don't consider suspended LWPs.
13179 (start_step_over): Adjust.
13180 (proceed_one_lwp): Change return type to int, add new `except'
13181 parameter and handle it.
13182 (unsuspend_and_proceed_one_lwp): New.
13183 (proceed_all_lwps): Use find_inferior instead of
13185 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
13186 also decrement the suspend count of LWPs. Pass `except' down,
13187 instead of hacking its suspend count.
13188 (linux_pause_all): Add `freeze' parameter. Adjust.
13189 (linux_unpause_all): New.
13190 (linux_target_ops): Install linux_unpause_all.
13191 * server.c (handle_status): Adjust.
13192 * target.h (struct target_ops): New fields `unpause_all' and
13193 `cancel_breakpoints'. Add new parameter to `pause_all'.
13194 (pause_all): Add new `freeze' parameter.
13195 (unpause_all): New.
13196 (cancel_breakpoints): New.
13197 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
13198 cancel breakpoints.
13199 (cmd_qtstart): Pause threads.
13200 (stop_tracing): Pause threads, and cancel breakpoints.
13201 * win32-low.c (win32_target_ops): Adjust.
13203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
13205 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
13206 the inferior right away from here...
13207 (linux_wait_1): ... to here, and adjust to check the thread's
13208 last_resume_kind instead of the lwp's step or stop_expected flags.
13210 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13212 * README: Use consistent `GDB' and `GDBserver' spellings.
13214 2010-05-02 Pedro Alves <pedro@codesourcery.com>
13216 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
13217 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
13218 (linux_detach_one_lwp): Assume the lwp is stopped.
13219 (any_thread_of): Delete.
13220 (linux_detach): Stop all lwps here. Don't blindly delete all
13222 (delete_lwp_callback): New.
13223 (linux_mourn): Delete all lwps of the process that is gone.
13224 (linux_wait_1): Don't delete the last lwp of the process here.
13225 * mem-break.h (mark_breakpoints_out): Declare.
13226 * mem-break.c (mark_breakpoints_out): New.
13227 (free_all_breakpoints): Use it.
13228 * server.c (handle_target_event): If the process is gone, mark
13230 * thread-db.c (struct thread_db) <create_bp>: New field.
13231 (thread_db_enable_reporting): Fix prototype. Store a thread event
13232 breakpoint reference in the thread_db struct.
13233 (thread_db_load_search): Clear the thread_db object.
13234 (try_thread_db_load_1): Ditto.
13235 (switch_to_process): New.
13236 (disable_thread_event_reporting): Use it.
13237 (remove_thread_event_breakpoints): New.
13238 (thread_db_detach, thread_db_mourn): Use it.
13240 2010-05-01 Pedro Alves <pedro@codesourcery.com>
13242 * linux-low.c (linux_enable_event_reporting): New.
13243 (linux_wait_for_event_1, handle_extended_wait): Use it.
13245 2010-04-30 Pedro Alves <pedro@codesourcery.com>
13247 * linux-low.c (linux_kill_one_lwp, linux_kill)
13248 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
13249 (send_sigstop): Take an lwp_info as parameter instead. Queue a
13250 SIGSTOP even if the LWP is stopped.
13251 (send_sigstop_callback): New.
13252 (stop_all_lwps): Use send_sigstop_callback instead.
13253 (linux_resume_one_thread): Adjust.
13254 (proceed_one_lwp): Still proceed an LWP that the client has
13255 requested to stop, if we haven't reported it as stopped yet. Make
13256 sure that LWPs the client want stopped, have a pending SIGSTOP.
13258 2010-04-26 Doug Evans <dje@google.com>
13260 * server.c (handle_general_set): Make static.
13262 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
13263 Print received char after testing for error/eof instead of before.
13264 (input_interrupt): Tweak comment.
13266 2010-04-23 Doug Evans <dje@google.com>
13268 * server.c (start_inferior): Print inferior argv if --debug.
13270 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
13272 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
13273 * nto-x86-low.c: Include server.h
13275 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
13277 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
13278 be consistent with other sources of this directory.
13279 (init_registers_amd64): Correct name of source file of this function
13282 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13284 * configure.srv (x86_64-*-mingw*): New configuration for Windows
13285 64-bit executables.
13287 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13289 * win32-i386-low.c: Add 64-bit support.
13290 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
13291 (init_registers_amd64): Declare.
13292 (mappings): Add 64-bit version of array.
13293 (init_windows_x86): New function.
13294 (the_low_target): Change init_arch field to init_windows_x86.
13296 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13298 * win32-low.c: Adapt to support also 64-bit architecture.
13299 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
13300 (get_image_name): Use SIZE_T type for local variable `done'.
13301 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
13302 (toolhelp_get_dll_name): Idem.
13303 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
13304 Use uintptr_t typecast to avoid warning.
13305 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
13306 (handle_exception): Use phex_nz to avoid warning.
13307 (win32_wait): Remove unused local variable `process'.
13309 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
13311 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
13314 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
13316 * configure.ac: Use `ws2_32' library for srv_mingw.
13317 * configure: Regenerate.
13318 * gdbreplay.c: Include winsock2.h instead of winsock.h.
13319 * remote-utils.c: Likewise.
13321 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
13323 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
13324 if __x86_64__ is defined.
13326 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13328 * configure: Regenerate.
13330 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
13332 * server.c (handle_query): Handle 'qGetTIBAddr' query.
13333 * target.h (target_ops): New get_tib_address field.
13334 * win32-low.h (win32_thread_info): Add thread_local_base field.
13335 * win32-low.c (child_add_thread): Add tlb argument.
13336 Set thread_local_base field to TLB.
13337 (get_child_debug_event): Adapt to child_add_thread change.
13338 (win32_get_tib_address): New function.
13339 (win32_target_ops): Set get_tib_address field to
13340 win32_get_tib_address.
13341 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
13343 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13345 * linux-low.c (linux_mourn): Also remove the process.
13346 * server.c (handle_target_event): Don't remove the process here.
13347 * nto-low.c (nto_mourn): New.
13348 (nto_target_ops): Install it.
13349 * spu-low.c (spu_mourn): New.
13350 (spu_target_ops): Install it.
13351 * win32-low.c (win32_mourn): New.
13352 (win32_target_ops): Install it.
13354 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13356 * server.h (buffer_xml_printf): Remove redundant `;'.
13358 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13360 * regcache.c (set_register_cache): Invalidate regcaches before
13361 changing the register cache layout.
13362 (regcache_invalidate_one): Allow a NULL regcache.
13363 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13364 regcaches before changing the register cache layout or the target
13367 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13369 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13370 variable warning on Linux/x86-64.
13372 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13374 GDBserver disconnected tracing support.
13376 * linux-low.c (linux_remove_process): Delete.
13377 (add_lwp): Don't set last_resume_kind here.
13378 (linux_kill): Use `mourn'.
13379 (linux_detach): Use `thread_db_detach', and `mourn'.
13380 (linux_mourn): New.
13381 (linux_attach_lwp_1): Adjust comment.
13382 (linux_attach): last_resume_kind moved the thread_info; adjust.
13383 (status_pending_p_callback): Adjust.
13384 (linux_wait_for_event_1): Adjust.
13385 (count_events_callback, select_singlestep_lwp_callback)
13386 (select_event_lwp_callback, cancel_breakpoints_callback)
13387 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13388 (proceed_one_lwp): Adjust.
13389 (linux_async): Add debug output.
13390 (linux_thread_stopped): New.
13391 (linux_pause_all): New.
13392 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13394 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13395 (thread_db_free): Delete declaration.
13396 (thread_db_detach, thread_db_mourn): Declare.
13397 * thread-db.c (thread_db_init): Use thread_db_mourn.
13398 (thread_db_free): Delete, split in two.
13399 (disable_thread_event_reporting): New.
13400 (thread_db_detach): New.
13401 (thread_db_mourn): New.
13403 * server.h (struct thread_info) <last_resume_kind>: New field.
13404 <attached>: Add comment.
13405 <gdb_detached>: New field.
13406 (handler_func): Change return type to int.
13407 (handle_serial_event, handle_target_event): Ditto.
13408 (gdb_connected): Declare.
13410 (disconnected_tracing): Declare.
13411 (stop_tracing): Declare.
13413 * server.c (handle_query) <qSupported>: Report support for
13414 disconnected tracing.
13415 (queue_stop_reply_callback): Account for running threads.
13416 (gdb_wants_thread_stopped): New.
13417 (gdb_wants_all_threads_stopped): New.
13418 (gdb_reattached_process): New.
13419 (handle_status): Clear the `gdb_detached' flag of all processes.
13420 In all-stop, stop all threads.
13421 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13422 (process_serial_event): If the remote connection breaks, or if an
13423 exit was forced with "monitor exit", force an event loop exit.
13424 Handle disconnected tracing on detach.
13425 (handle_serial_event): Adjust.
13426 (handle_target_event): If GDB isn't connected, forward events back
13427 to the inferior, unless the last process exited, in which case,
13428 exit gdbserver. Adjust interface.
13430 * remote-utils.c (remote_open): Don't block in accept. Instead
13431 register an event loop source on the listen socket file
13432 descriptor. Refactor bits into ...
13433 (listen_desc): ... this new global.
13434 (gdb_connected): ... this new function.
13435 (enable_async_notification): ... this new function.
13436 (handle_accept_event): ... this new function.
13437 (remote_close): Clear remote_desc.
13439 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13441 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13443 (mourn_inferior): Define.
13444 (target_process_qsupported): Avoid the dangling else problem.
13445 (thread_stopped): Define.
13446 (pause_all): Define.
13447 (target_waitstatus_to_string): Declare.
13448 * target.c (target_waitstatus_to_string): New.
13450 * tracepoint.c (tracing): Make extern.
13451 (disconnected_tracing): New.
13452 (stop_tracing): Make extern. Handle tracing stops due to GDB
13454 (cmd_qtdisconnected): New.
13455 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13456 (handle_tracepoint_general_set): Handle QTDisconnected.
13458 * event-loop.c (event_handler_func): Change return type to int.
13459 (process_event): Bail out if the event handler wants the event
13461 (handle_file_event): Ditto.
13462 (start_event_loop): Bail out if the event handler wants the event
13465 * nto-low.c (nto_target_ops): Adjust.
13466 * spu-low.c (spu_wait): Don't remove the process here.
13467 (spu_target_ops): Adjust.
13468 * win32-low.c (win32_wait): Don't remove the process here.
13469 (win32_target_ops): Adjust.
13471 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13473 * regcache.c (realloc_register_cache): Invalidate inferior's
13474 regcache before recreating it.
13476 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13478 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13480 2010-04-09 Stan Shebs <stan@codesourcery.com>
13481 Pedro Alves <pedro@codesourcery.com>
13483 * server.h (LONGEST): New.
13484 (struct thread_info) <while_stepping>: New field.
13485 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13487 (initialize_tracepoint, handle_tracepoint_general_set)
13488 (handle_tracepoint_query, tracepoint_finished_step)
13489 (tracepoint_was_hit, release_while_stepping_state_list):
13490 (current_traceframe): Declare.
13491 * server.c (handle_general_set): Handle tracepoint packets.
13492 (read_memory): New.
13493 (write_memory): New.
13494 (handle_search_memory_1): Use read_memory.
13495 (handle_query): Report support for conditional tracepoints, trace
13496 state variables, and tracepoint sources. Handle tracepoint
13498 (main): Initialize the tracepoints module.
13499 (process_serial_event): Handle traceframe reads/writes.
13501 * linux-low.c (handle_tracepoints): New.
13502 (linux_wait_1): Call it.
13503 (linux_resume_one_lwp): Handle while-stepping.
13504 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13505 (linux_target_ops): Install them.
13506 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13508 * linux-x86-low.c (x86_supports_tracepoints): New.
13509 (the_low_target). Install it.
13511 * mem-break.h (delete_breakpoint): Declare.
13512 * mem-break.c (delete_breakpoint): Make external.
13514 * target.h (struct target_ops): Add `supports_tracepoints',
13515 `read_pc', and `write_pc' fields.
13516 (target_supports_tracepoints): Define.
13517 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13520 * regcache.h (struct regcache) <registers_owned>: New field.
13521 (init_register_cache, regcache_cpy): Declare.
13522 (regcache_read_pc, regcache_write_pc): Declare.
13523 (register_cache_size): Declare.
13524 (supply_regblock): Declare.
13525 * regcache.c (init_register_cache): New.
13526 (new_register_cache): Use it.
13527 (regcache_cpy): New.
13528 (register_cache_size): New.
13529 (supply_regblock): New.
13530 (regcache_read_pc, regcache_write_pc): New.
13532 * tracepoint.c: New.
13534 * Makefile.in (OBS): Add tracepoint.o.
13535 (tracepoint.o): New rule.
13537 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13539 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13541 (i386-mmx.c): Likewise.
13542 (i386-mmx-linux.o): Likewise.
13543 (i386-mmx-linux.c): Likewise.
13545 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13546 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13547 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13548 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13550 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13551 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13552 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13554 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13556 * Makefile.in (clean): Updated.
13558 (i386-avx.c): Likewise.
13559 (i386-avx-linux.o): Likewise.
13560 (i386-avx-linux.c): Likewise.
13561 (amd64-avx.o): Likewise.
13562 (amd64-avx.c): Likewise.
13563 (amd64-avx-linux.o): Likewise.
13564 (amd64-avx-linux.c): Likewise.
13566 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13567 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13568 (srv_amd64_regobj): Add amd64-avx.o.
13569 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13570 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13571 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13572 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13573 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13574 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13575 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13577 * i387-fp.c: Include "i386-xstate.h".
13579 (i387_cache_to_xsave): Likewise.
13580 (i387_xsave_to_cache): Likewise.
13581 (x86_xcr0): Likewise.
13583 * i387-fp.h (i387_cache_to_xsave): Likewise.
13584 (i387_xsave_to_cache): Likewise.
13585 (x86_xcr0): Likewise.
13587 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13588 * linux-crisv32-low.c (target_regsets): Likewise.
13589 * linux-m68k-low.c (target_regsets): Likewise.
13590 * linux-mips-low.c (target_regsets): Likewise.
13591 * linux-ppc-low.c (target_regsets): Likewise.
13592 * linux-s390-low.c (target_regsets): Likewise.
13593 * linux-sh-low.c (target_regsets): Likewise.
13594 * linux-sparc-low.c (target_regsets): Likewise.
13595 * linux-xtensa-low.c (target_regsets): Likewise.
13597 * linux-low.c: Include <sys/uio.h>.
13598 (regsets_fetch_inferior_registers): Support nt_type.
13599 (regsets_store_inferior_registers): Likewise.
13600 (linux_process_qsupported): New.
13601 (linux_target_ops): Add linux_process_qsupported.
13603 * linux-low.h (regset_info): Add nt_type.
13604 (linux_target_ops): Add process_qsupported.
13606 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13608 (init_registers_i386_avx_linux): New.
13609 (init_registers_amd64_avx_linux): Likewise.
13610 (xmltarget_i386_linux_no_xml): Likewise.
13611 (xmltarget_amd64_linux_no_xml): Likewise.
13612 (PTRACE_GETREGSET): Likewise.
13613 (PTRACE_SETREGSET): Likewise.
13614 (x86_fill_xstateregset): Likewise.
13615 (x86_store_xstateregset): Likewise.
13616 (use_xml): Likewise.
13617 (x86_linux_update_xmltarget): Likewise.
13618 (x86_linux_process_qsupported): Likewise.
13619 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13620 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13621 init_registers_i386_linux here. Call
13622 x86_linux_update_xmltarget.
13623 (the_low_target): Add x86_linux_process_qsupported.
13625 * server.c (handle_query): Call target_process_qsupported.
13627 * target.h (target_ops): Add process_qsupported.
13628 (target_process_qsupported): New.
13630 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13632 * inferiors.c (add_thread): Set last_status kind to
13633 TARGET_WAITKIND_IGNORE.
13634 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13635 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13636 (linux_wait_1): Move `thread' local definition to block that uses
13637 it. Don't NULL initialize `event_child'.
13638 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13639 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13640 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13642 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13644 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13645 an extended waitstatus, or by a watchpoint.
13646 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13647 thread was stepping or has been stopped by a watchpoint.
13649 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13651 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13652 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13653 of another, then delete the previous, and validate all
13655 (validate_inserted_breakpoint): New.
13656 (delete_disabled_breakpoints): New.
13657 (validate_breakpoints): New.
13658 (check_mem_read): Validate breakpoints before trusting their
13659 shadow. Delete disabled breakpoints.
13660 (check_mem_write): Validate breakpoints before trusting they
13661 should be inserted. Delete disabled breakpoints.
13662 * mem-break.h (validate_breakpoints):
13663 * server.c (handle_query): Validate breakpoints when we see a
13666 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13668 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13669 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13670 if we could tell there's a GDB breakpoint at stop_pc.
13671 (need_step_over_p): Don't do a step over if we find a GDB
13672 breakpoint at the resume PC.
13674 * mem-break.c (struct raw_breakpoint): New.
13675 (enum bkpt_type): New type `gdb_breakpoint'.
13676 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13677 fields. New field `raw'.
13678 (find_raw_breakpoint_at): New.
13679 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13680 breakpoint instead.
13681 (set_breakpoint_at): Adjust.
13682 (delete_raw_breakpoint): New.
13683 (release_breakpoint): New.
13684 (delete_breakpoint): Rename to...
13685 (delete_breakpoint_1): ... this. Add proc parameter. Use
13686 release_breakpoint. Return ENOENT.
13687 (delete_breakpoint): Reimplement.
13688 (find_breakpoint_at): Delete.
13689 (find_gdb_breakpoint_at): New.
13690 (delete_breakpoint_at): Delete.
13691 (set_gdb_breakpoint_at): New.
13692 (delete_gdb_breakpoint_at): New.
13693 (gdb_breakpoint_here): New.
13694 (set_reinsert_breakpoint): Use release_breakpoint.
13695 (uninsert_breakpoint): Rename to ...
13696 (uninsert_raw_breakpoint): ... this.
13697 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13698 (reinsert_raw_breakpoint): Change parameter type to
13700 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13702 (check_breakpoints): Adjust. Use release_breakpoint.
13703 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13704 (breakpoint_inserted_here): Ditto.
13705 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13706 Don't trust the breakpoint's shadow if it is not inserted.
13707 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13708 (delete_all_breakpoints): Adjust.
13709 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13710 use delete_breakpoint_1.
13712 * mem-break.h (breakpoints_supported): Delete declaration.
13713 (set_gdb_breakpoint_at): Declare.
13714 (gdb_breakpoint_here): Declare.
13715 (delete_breakpoint_at): Delete.
13716 (delete_gdb_breakpoint_at): Declare.
13718 * server.h (struct raw_breakpoint): Forward declare.
13719 (struct process_info): New field `raw_breakpoints'.
13721 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13724 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13726 * linux-low.c (status_pending_p_callback): Fix comment.
13727 (linux_wait_for_event_1): Move most of the internal breakpoint
13728 handling from here...
13729 (linux_wait_1): ... to here.
13730 (count_events_callback): New.
13731 (select_singlestep_lwp_callback): New.
13732 (select_event_lwp_callback): New.
13733 (cancel_breakpoints_callback): New.
13734 (select_event_lwp): New.
13735 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13736 priority to all LWPs that have had events that should be reported
13737 to the client. Cancel breakpoints when about to reporting the
13738 event to the client, not while stopping lwps. No longer cancel
13739 finished single-steps here.
13740 (cancel_finished_single_step): Delete.
13741 (cancel_finished_single_steps): Delete.
13743 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13745 * mem-break.c (enum bkpt_type): New.
13746 (struct breakpoint): New field `type'.
13747 (set_breakpoint_at): Change return type to struct breakpoint
13748 pointer. Set type to `other_breakpoint' by default.
13749 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13750 in the breakpoint list.
13751 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13752 (reinsert_breakpoint): Rename to ...
13753 (reinsert_raw_breakpoint): ... this.
13754 (reinsert_breakpoints_at): Adjust.
13755 * mem-break.h (struct breakpoint): Declare.
13756 (set_breakpoint_at): Change return type to struct breakpoint
13759 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13761 * server.c (handle_query): Assign, not compare.
13763 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13765 Teach linux gdbserver to step-over-breakpoints.
13767 * linux-low.c (can_hardware_single_step): New.
13768 (supports_breakpoints): New.
13769 (handle_extended_wait): If stopping threads, read the stop pc of
13770 the new cloned LWP.
13772 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13773 low target doesn't support retrieving the PC.
13774 (add_lwp): Set last_resume_kind to resume_continue.
13775 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13776 (linux_attach): Don't clear stop_expected. Set the lwp's
13777 last_resume_kind to resume_stop.
13778 (linux_detach_one_lwp): Don't check for removed breakpoints.
13779 (check_removed_breakpoint): Delete.
13780 (status_pending_p): Rename to ...
13781 (status_pending_p_callback): ... this. Don't check for removed
13782 breakpoints. Don't consider threads that are stopped from GDB's
13784 (linux_wait_for_lwp): Always read the stop_pc here.
13785 (cancel_breakpoint): New.
13786 (step_over_bkpt): New global.
13787 (linux_wait_for_event_1): Implement stepping over breakpoints.
13788 (gdb_wants_lwp_stopped): New.
13789 (gdb_wants_all_stopped): New.
13790 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13791 single-step traps here. Store the thread's last reported target
13793 (send_sigstop): Don't clear stop_expected. Always set it,
13795 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13796 (cancel_finished_single_step): New.
13797 (cancel_finished_single_steps): New.
13798 (wait_for_sigstop): Don't cancel finished single-step traps here.
13799 (linux_resume_one_lwp): Don't check for removed breakpoints.
13800 Don't set `step' on non-hardware step archs.
13801 (linux_set_resume_request): Ignore resume_stop requests if already
13802 stopping or stopped. Set the lwp's last_resume_kind.
13803 (resume_status_pending_p): Don't check for removed breakpoints.
13804 (need_step_over_p): New.
13805 (start_step_over): New.
13806 (finish_step_over): New.
13807 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13808 requests. Clear the thread's last reported target waitstatus.
13809 Don't use the `suspended' flag. Don't consider pending breakpoints.
13810 (linux_resume): Start a step-over if necessary.
13811 (proceed_one_lwp): New.
13812 (proceed_all_lwps): New.
13813 (unstop_all_lwps): New.
13814 * linux-low.h (struct lwp_info): Rewrite comment for the
13815 `suspended' flag. Add the `stop_pc' field. Delete the
13816 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13817 Add `'last_resume_kind' and `need_step_over' fields.
13818 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13819 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13820 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13821 (set_raw_breakpoint_at): New.
13822 (set_breakpoint_at): Rewrite to use it.
13823 (reinsert_breakpoint_handler): Delete.
13824 (set_reinsert_breakpoint): New.
13825 (reinsert_breakpoint_by_bp): Delete.
13826 (delete_reinsert_breakpoints): New.
13827 (uninsert_breakpoint): Rewrite.
13828 (uninsert_breakpoints_at): New.
13829 (reinsert_breakpoint): Rewrite.
13830 (reinsert_breakpoints_at): New.
13831 (check_breakpoints): Rewrite.
13832 (breakpoint_here): New.
13833 (breakpoint_inserted_here): New.
13834 (check_mem_read): Adjust.
13835 * mem-break.h (breakpoints_supported, breakpoint_here)
13836 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13837 (reinsert_breakpoint_by_bp): Delete declaration.
13838 (delete_reinsert_breakpoints): Declare.
13839 (reinsert_breakpoint): Delete declaration.
13840 (reinsert_breakpoints_at): Declare.
13841 (uninsert_breakpoint): Delete declaration.
13842 (uninsert_breakpoints_at): Declare.
13843 (check_breakpoints): Adjust prototype.
13844 * server.h: Adjust include order.
13845 (struct thread_info): Declare here. Add a `last_status' field.
13847 2010-03-23 Michael Snyder <msnyder@vmware.com>
13849 * server.c (crc32): New function.
13850 (handle_query): Add handling for 'qCRC:' request.
13852 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13854 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13855 lwp had been stopped by a watchpoint.
13857 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13859 * server.h (internal_error): Declare.
13860 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13861 * utils.c (internal_error): New function.
13863 2010-03-15 Andreas Schwab <schwab@redhat.com>
13865 * configure.srv: Fix typo setting srv_regobj.
13867 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13869 * linux-low.c (fetch_register): Avoid passing a non string literal
13871 (usr_store_inferior_registers): Ditto.
13873 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13875 * linux-low.c (linux_write_memory): Bail out early if peeking
13878 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13880 * linux-low.h (struct lwp_info): New fields
13881 `stopped_by_watchpoint' and `stopped_data_address'.
13882 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13883 here, and cache them in the lwp object.
13884 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13886 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13888 (linux_stopped_by_watchpoint): Rewrite.
13889 (linux_stopped_data_address): Rewrite.
13891 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13893 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13894 switching the current inferior, not before.
13896 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13898 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13899 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13900 i386-linux.c and amd64-linux.c.
13901 (reg-i386.o): Removed.
13902 (reg-i386.c): Likewise.
13903 (reg-i386-linux.o): Likewise.
13904 (reg-i386-linux.c): Likewise.
13905 (reg-x86-64.o): Likewise.
13906 (reg-x86-64.c): Likewise.
13907 (reg-x86-64-linux.o): Likewise.
13908 (reg-x86-64-linux.c): Likewise.
13910 (i386.c): Likewise.
13911 (i386-linux.o): Likewise.
13912 (i386-linux.c): Likewise.
13913 (amd64.o): Likewise.
13914 (amd64.c): Likewise.
13915 (amd64-linux.o): Likewise.
13916 (amd64-linux.c): Likewise.
13918 * configure.srv (srv_i386_regobj): New.
13919 (srv_i386_linux_regobj): Likewise.
13920 (srv_amd64_regobj): Likewise.
13921 (srv_amd64_linux_regobj): Likewise.
13922 (srv_i386_32bit_xmlfiles): Likewise.
13923 (srv_i386_64bit_xmlfiles): Likewise.
13924 (srv_i386_xmlfiles): Likewise.
13925 (srv_amd64_xmlfiles): Likewise.
13926 (srv_i386_linux_xmlfiles): Likewise.
13927 (srv_amd64_linux_xmlfiles): Likewise.
13928 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13929 srv_xmlfiles to $srv_i386_xmlfiles.
13930 (i[34567]86-*-mingw32ce*): Likewise.
13931 (i[34567]86-*-mingw*): Likewise.
13932 (i[34567]86-*-nto*): Likewise.
13933 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13934 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13935 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13936 (x86_64-*-linux*): Likewise.
13938 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13939 (init_registers_amd64_linux): New.
13940 (x86_arch_setup): Replace init_registers_x86_64_linux with
13941 init_registers_amd64_linux.
13943 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13945 * configure.ac: Check for libdl. If it is not available link against
13946 static libthread_db.
13947 * configure: Regenerate.
13949 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13953 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13954 handing a read watchpoint.
13955 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13957 2010-02-12 Doug Evans <dje@google.com>
13959 * linux-low.c (linux_supports_tracefork_flag): Document.
13960 (linux_look_up_symbols): Add comment.
13962 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13964 * regcache.c (supply_register): Clear regcache if buf is NULL.
13966 2010-02-02 Nicolas Roche <roche@sourceware.org>
13967 Joel Brobecker <brobecker@adacore.com>
13969 * inferiors.c (find_inferior): Add function documentation.
13970 (unloaded_dll): Handle the case where the unloaded dll has not
13971 been previously registered in the dll list.
13973 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13975 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13976 (thumb2_breakpoint): New.
13977 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13979 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13981 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13982 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13985 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13987 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13989 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13991 * linux-s390-low.c (s390_collect_ptrace_register)
13992 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13994 2010-01-21 Doug Evans <dje@google.com>
13996 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13997 (PTRACE_ARG4_TYPE): New macro.
13998 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13999 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
14000 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
14001 (usr_store_inferior_registers): Ditto.
14002 (linux_read_memory, linux_write_memory): Ditto.
14003 (linux_test_for_tracefork): Ditto.
14005 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
14006 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
14008 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14010 * proc-service.c (ps_lgetregs): Don't refetch registers from the
14013 2010-01-21 Pedro Alves <pedro@codesourcery.com>
14015 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
14016 prototype to take a regcache. Adjust.
14018 2010-01-20 Pedro Alves <pedro@codesourcery.com>
14020 * regcache.h (struct thread_info): Forward declare.
14021 (struct regcache): New.
14022 (new_register_cache): Adjust prototype.
14023 (get_thread_regcache): Declare.
14024 (free_register_cache): Adjust prototype.
14025 (registers_to_string, registers_from_string): Ditto.
14026 (supply_register, supply_register_by_name, collect_register)
14027 (collect_register_as_string, collect_register_by_name): Ditto.
14028 * regcache.c (struct inferior_regcache_data): Delete.
14029 (get_regcache): Rename to ...
14030 (get_thread_regcache): ... this. Adjust. Switch inferior before
14031 fetching registers.
14032 (regcache_invalidate_one): Adjust.
14033 (regcache_invalidate): Fix prototype.
14034 (new_register_cache): Return the new register cache.
14035 (free_register_cache): Change prototype.
14036 (realloc_register_cache): Adjust.
14037 (registers_to_string): Change prototype to take a regcache. Adjust.
14038 (registers_from_string): Ditto.
14039 (register_data): Ditto.
14040 (supply_register): Ditto.
14041 (supply_register_by_name): Ditto.
14042 (collect_register): Ditto.
14043 (collect_register_as_string): Ditto.
14044 (collect_register_by_name): Ditto.
14045 * server.c (process_serial_event): Adjust.
14046 * linux-low.h (regset_fill_func, regset_store_func): Change
14048 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
14050 * linux-low.c (get_stop_pc): Adjust.
14051 (check_removed_breakpoint): Adjust.
14052 (linux_wait_for_event): Adjust.
14053 (linux_resume_one_lwp): Adjust.
14054 (fetch_register): Add regcache parameter. Adjust.
14055 (usr_store_inferior_registers): Ditto.
14056 (regsets_fetch_inferior_registers): Ditto.
14057 (regsets_store_inferior_registers): Ditto.
14058 (linux_fetch_registers, linux_store_registers): Ditto.
14059 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
14061 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
14063 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
14064 prototype to take a regcache.
14065 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
14066 * remote-utils.c (convert_ascii_to_int, outreg)
14067 (prepare_resume_reply): Change prototype to take a regcache.
14069 * target.h (struct target_ops) <fetch_registers, store_registers>:
14070 Change prototype to take a regcache.
14071 (fetch_inferior_registers, store_inferior_registers): Change
14072 prototype to take a regcache. Adjust.
14073 * proc-service.c (ps_lgetregs): Adjust.
14074 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
14075 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
14076 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
14077 take a regcache. Adjust.
14078 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
14079 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
14080 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
14081 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
14082 * linux-cris-low.c (cris_get_pc, cris_set_pc)
14083 (cris_cannot_fetch_register):
14084 (cris_breakpoint_at): Change prototype to take a regcache.
14086 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
14087 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
14088 to take a regcache. Adjust.
14089 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
14091 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
14092 take a regcache. Adjust.
14093 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
14094 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
14095 (m68k_set_pc): Change prototype to take a regcache. Adjust.
14096 * linux-mips-low.c (mips_get_pc):
14097 (mips_set_pc): Change prototype to take a regcache. Adjust.
14098 (mips_reinsert_addr): Adjust.
14099 (mips_collect_register): Change prototype to take a regcache.
14101 (mips_supply_register):
14102 (mips_collect_register_32bit, mips_supply_register_32bit)
14103 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14104 (mips_store_fpregset): Ditto.
14105 * linux-ppc-low.c (ppc_supply_ptrace_register)
14106 (ppc_supply_ptrace_register): Ditto.
14107 (parse_spufs_run): Adjust.
14108 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
14109 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
14110 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
14111 take a regcache. Adjust.
14112 * linux-s390-low.c (s390_collect_ptrace_register)
14113 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
14114 (s390_set_pc): Change prototype to take a regcache. Adjust.
14115 (s390_arch_setup): Adjust.
14116 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
14117 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
14118 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
14119 (sparc_fill_gregset, sparc_store_gregset_from_stack)
14120 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
14122 (sparc_breakpoint_at): Adjust.
14123 * linux-xtensa-low.c (xtensa_fill_gregset):
14124 (xtensa_store_gregset):
14125 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
14126 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
14127 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
14128 prototype to take a regcache. Adjust.
14129 * win32-arm-low.c (arm_fetch_inferior_register)
14130 (arm_store_inferior_register): Change prototype to take a
14132 * win32-i386-low.c (i386_fetch_inferior_register)
14133 (i386_store_inferior_register): Change prototype to take a
14135 * win32-low.c (child_fetch_inferior_registers)
14136 (child_store_inferior_registers): Change prototype to take a
14138 (win32_wait): Adjust.
14139 (win32_fetch_inferior_registers): Change prototype to take a
14141 (win32_store_inferior_registers): Adjust.
14142 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
14143 store_inferior_register>: Change prototype to take a regcache.
14145 2010-01-20 Doug Evans <dje@google.com>
14147 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
14149 (linux_wait_for_event1, linux_init_signals): Ditto.
14150 (W_STOPCODE): Provide definition if missing.
14152 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
14154 * linux-low.c (linux_core_of_thread): New.
14155 (compare_ints, show_process, list_threads): New.
14156 (linux_qxfer_osdata): Report threads and cores.
14157 (linux_target_op): Register linux_core_of_thread.
14158 * remote-utils.c (prepare_resume_reply): Report the core.
14159 (buffer_xml_printf): Support %d specifier.
14160 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
14162 (handle_query): Handle qXfer:threads. Announce availability
14164 * target.h (struct target_ops): New field core_of_thread.
14166 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
14168 * Makefile.in (clean): Remove new generated files.
14169 (reg-s390.o, reg-s390.c): Remove rules.
14170 (reg-s390x.o, reg-s390x.c): Likewise.
14171 (s390-linux32.o, s390-linux32.c): Add rules.
14172 (s390-linux64.o, s390-linux64.c): Likewise.
14173 (s390x-linux64.o, s390x-linux64.c): Likewise.
14174 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
14175 * linux-s390-low.c: Include <elf.h>.
14176 (HWCAP_S390_HIGH_GPRS): Define if undefined.
14177 (init_registers_s390): Remove prototype.
14178 (init_registers_s390x): Likewise.
14179 (init_registers_s390_linux32): Add prototype.
14180 (init_registers_s390_linux64): Likewise.
14181 (init_registers_s390x_linux64): Likewise.
14182 (s390_num_regs_3264): New define.
14183 (s390_regmap_3264): New global variable.
14184 (s390_cannot_fetch_register): Remove obsolete check.
14185 (s390_cannot_store_register): Likewise.
14186 (s390_collect_ptrace_register): Handle upper/lower register halves.
14187 (s390_supply_ptrace_register): Likewise.
14188 (s390_fill_gregset): Update to register number changes.
14189 (s390_get_hwcap): New routine.
14190 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
14191 Install appropriate regmap and register set.
14193 2010-01-01 Joel Brobecker <brobecker@adacore.com>
14195 * server.c (gdbserver_version): Update copyright year to 2010.
14196 * gdbreplay.c (gdbreplay_version): Likewise.
14198 2009-12-28 Doug Evans <dje@google.com>
14200 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
14201 elf/external.h. Include <elf.h> instead but only if necessary.
14203 2009-12-28 Pedro Alves <pedro@codesourcery.com>
14205 * linux-low.c (linux_remove_process): Remove `detaching'
14206 parameter. Don't release/detach from thread_db here.
14207 (linux_kill): Release/detach from thread_db here, ...
14208 (linux_detach): ... and here, before actually detaching.
14209 (linux_wait_1): ... and here, when a process exits.
14210 * thread-db.c (any_thread_of): New.
14211 (thread_db_free): Switch the current inferior to a thread of the
14214 2009-12-21 Doug Evans <dje@google.com>
14216 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
14218 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
14219 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
14220 warning ifndef __NR_tkill. Move setting of errno there too.
14221 Delete unnecessary resetting of errno after syscall.
14222 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
14224 * configure.ac: Check for dladdr.
14225 * config.in: Regenerate.
14226 * configure: Regenerate.
14227 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
14228 (try_thread_db_load): Update.
14230 * linux-low.c (my_waitpid): Delete unnecessary prototype.
14232 2009-12-18 Doug Evans <dje@google.com>
14234 * event-loop.c: Include unistd.h if it exists.
14236 * linux-low.c (my_waitpid): Move definition away from being in
14237 between linux_tracefork_child/linux_test_for_tracefork.
14239 * gdb_proc_service.h (psaddr_t): Fix type.
14240 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
14241 signature to match glibc.
14243 2009-12-16 Doug Evans <dje@google.com>
14245 * linux-low.c (linux_read_memory): Fix argument to read.
14247 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14249 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
14250 events, don't leave current_inferior pointing at null.
14252 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14254 * win32-low.c (LOG): Delete.
14255 (OUTMSG): Output to stderr.
14256 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
14257 on compile time LOG macro.
14258 (win32_wait): Fix debug output.
14260 2009-11-26 Pedro Alves <pedro@codesourcery.com>
14262 * win32-low.c (win32_add_one_solib): If the dll name is
14263 "ntdll.dll", prepend the system directory to the dll path.
14265 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
14267 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
14269 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
14270 Vladimir Prus <vladimir@codesourcery.com>
14272 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
14273 * configure.ac: Check for __mcoldfire__ and set
14274 gdb_cv_m68k_is_coldfire.
14275 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
14276 reg-cf.o and reg-m68k.o.
14277 * configure: Regenerated.
14279 2009-11-16 Pedro Alves <pedro@codesourcery.com>
14281 * linux-low.c (linux_remove_process): Add `detaching' parameter.
14282 Pass it to thread_db_free.
14283 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
14284 proper `detaching' argument to linux_remove_process.
14285 * linux-low.h (thread_db_free): Add `detaching' parameter.
14286 * thread-db.c (thread_db_init): Pass false as `detaching' argument
14288 (thread_db_free): Add `detaching' parameter. Only
14289 call td_ta_clear_event if detaching from process.
14291 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
14293 * thread-db.c (thread_db_free): Fix typo.
14295 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
14298 * thread-db.c (thread_db_free): Call td_ta_clear_event.
14300 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
14302 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
14303 with an i686 compiler.
14304 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
14306 * configure: Rebuilt.
14308 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
14312 * server.c (handle_search_memory_1): Correct read_addr initialization
14313 in loop for searching subsequent chunks.
14315 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
14317 * configure.ac: New --with-libthread-db option.
14318 * thread-db.c: Allow direct dependence on libthread_db.
14319 (thread_db_free): Adjust.
14320 * config.in: Regenerate.
14321 * configure: Likewise.
14323 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
14326 * thread-db.c (attach_thread): New function.
14327 (maybe_attach_thread): Return success/failure.
14328 (find_new_threads_callback): Adjust.
14329 (thread_db_find_new_threads): Loop until no new threads.
14331 2009-10-13 Pedro Alves <pedro@codesourcery.com>
14333 * proc-service.c (ps_lgetregs): Formatting.
14335 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
14337 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
14338 * configure.ac: Adjust.
14339 * linux-low.h (struct process_info_private): Move members to struct
14341 (thread_db_free, thread_db_handle_monitor_command): New prototype.
14342 * linux-low.c (linux_remove_process): Adjust.
14343 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
14344 * server.c (handle_query): Move code ...
14345 (handle_monitor_command): ... here. New function.
14346 * target.h (struct target_ops): New member.
14347 * thread-db.c (struct thread_db): New.
14348 (libthread_db_search_path): New variable.
14349 (thread_db_create_event, thread_db_enable_reporting)
14350 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
14351 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
14352 (try_thread_db_load_1, dladdr_to_soname): New functions.
14353 (try_thread_db_load, thread_db_load_search): New functions.
14354 (thread_db_init): Search for libthread_db.
14355 (thread_db_free): New function.
14356 (thread_db_handle_monitor_command): Likewise.
14357 * config.in: Regenerate.
14358 * configure: Regenerate.
14360 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14362 * spu-low.c (spu_kill): Wait for inferior to terminate.
14363 Call clear_inferiors.
14364 (spu_detach): Call clear_inferiors.
14366 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14368 * aclocal.m4: Regenerate.
14369 * config.in: Likewise.
14370 * configure: Likewise.
14372 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14374 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14375 (parse_spufs_run): New function.
14376 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14377 (ppc_breakpoint_at): Handle SPU breakpoints.
14379 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14381 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14382 (SPUFS_MAGIC): Define.
14383 (spu_enumerate_spu_ids): New function.
14384 (linux_qxfer_spu): New function.
14385 (linux_target_ops): Install linux_qxfer_spu.
14387 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14389 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14390 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14391 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14392 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14393 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14394 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14395 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14396 (init_registers_powerpc_cell32l): Add prototype.
14397 (init_registers_powerpc_cell64l): Likewise.
14398 (ppc_arch_setup): Detect Cell/B.E. architecture.
14400 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14402 * Makefile.in (datarootdir): New variable.
14404 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14406 * linux-low.c (linux_write_memory): Update debugging output.
14407 * Makefile.in (clean): Add new descriptions.
14408 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14409 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14410 * configure.srv: Add new files for arm*-*-linux*.
14411 * linux-arm-low.c: Add new declarations.
14412 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14413 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14414 (HWCAP_VFPv3D16): New.
14415 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14416 instead of __IWMMXT__.
14417 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14418 (arm_arch_setup): New.
14419 (target_regsets): Remove #ifdef. Add VFP regset.
14420 (the_low_target): Use arm_arch_setup.
14422 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14424 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14425 the main thread again.
14427 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14429 Adding Neutrino gdbserver.
14430 * configure: Regenerated.
14431 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14432 * configure.srv (i[34567]86-*-nto*): New target.
14433 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14434 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14435 (nto_comctrl) [__QNX__]: New function.
14436 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14438 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14440 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14443 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14444 Pedro Alves <pedro@codesourcery.com>
14446 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14447 don't support CONTEXT_EXTENDED_REGISTERS.
14448 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14449 (the_low_target): Install them.
14450 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14451 failing with ERROR_PIPE_NOT_CONNECTED.
14453 2009-06-30 Doug Evans <dje@google.com>
14454 Pierre Muller <muller@ics.u-strasbg.fr>
14456 Add h/w watchpoint support to x86-linux, win32-i386.
14457 * Makefile.in (SFILES): Add i386-low.c
14458 (i386_low_h): Define.
14459 (i386-low.o): Add dependencies.
14460 (linux-x86-low.o): Add i386-low.h dependency.
14461 (win32-i386-low.o): Ditto.
14462 * i386-low.c: New file.
14463 * i386-low.h: New file.
14464 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14465 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14466 * linux-low.c (linux_add_process): Initialize arch_private.
14467 (linux_remove_process): Free arch_private.
14468 (add_lwp): Initialize arch_private.
14469 (delete_lwp): Free arch_private.
14470 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14472 * linux-low.h (process_info_private): New member arch_private.
14473 (lwp_info): New member arch_private.
14474 (linux_target_ops): New members new_process, new_thread,
14476 (ptid_of): New macro.
14477 * linux-x86-low.c: Include stddef.h, i386-low.h.
14478 (arch_process_info): New struct.
14479 (arch_lwp_info): New struct.
14480 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14481 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14482 (i386_dr_low_get_status): New function.
14483 (x86_insert_point, x86_remove_point): New functions.
14484 (x86_stopped_by_watchpoint): New function.
14485 (x86_stopped_data_address): New function.
14486 (x86_linux_new_process, x86_linux_new_thread): New functions.
14487 (x86_linux_prepare_to_resume): New function.
14488 (the_low_target): Add entries for insert_point, remove_point,
14489 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14491 * server.c (debug_hw_points): New global.
14492 (monitor_show_help): Document set debug-hw-points.
14493 (handle_query): Process "set debug-hw-points".
14494 * server.h (debug_hw_points): Declare.
14495 (paddress): Declare.
14496 * utils.c (NUMCELLS, CELLSIZE): New macros.
14497 (get_sell, xsnprintf, paddress): New functions.
14498 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14499 remove_point, stopped_by_watchpoint, stopped_data_address.
14500 * win32-i386-low.c: Include i386-low.h.
14501 (debug_reg_state): Replaces dr.
14502 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14503 (i386_dr_low_get_status): New function.
14504 (i386_insert_point, i386_remove_point): New functions.
14505 (i386_stopped_by_watchpoint): New function.
14506 (i386_stopped_data_address): New function.
14507 (i386_initial_stuff): Update.
14508 (get_thread_context,set_thread_context,i386_thread_added): Update.
14509 (the_low_target): Add entries for insert_point,
14510 remove_point, stopped_by_watchpoint, stopped_data_address.
14511 * win32-low.c (win32_insert_watchpoint): New function.
14512 (win32_remove_watchpoint): New function.
14513 (win32_stopped_by_watchpoint): New function.
14514 (win32_stopped_data_address): New function.
14515 (win32_target_ops): Add entries for insert_watchpoint,
14516 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14517 * win32-low.h (win32_target_ops): New members insert_point,
14518 remove_point, stopped_by_watchpoint, stopped_data_address.
14520 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14522 * server.c (process_serial_event): Re-return unsupported, not
14523 error, if the type isn't recognized. Re-allow supporting only
14524 insert or remove packets. Also call require_running for
14525 breakpoints. Add missing break statement to default case. Tidy.
14526 * target.h (struct target_ops): Rename insert_watchpoint to
14527 insert_point, and remove_watchpoint to remove_point.
14529 * linux-low.h (struct linux_target_ops): Likewise.
14530 * linux-low.c (linux_insert_watchpoint): Rename to ...
14531 (linux_insert_point): ... this. Adjust.
14532 (linux_remove_watchpoint): Rename to ...
14533 (linux_remove_point): ... this. Adjust.
14534 (linux_target_ops): Adjust.
14535 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14536 (cris_insert_point): ... this.
14537 (cris_remove_watchpoint): Rename to ...
14538 (cris_remove_point): ... this.
14539 (the_low_target): Adjust.
14541 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14543 * server.c (handle_v_kill): Pass signal_pid to
14544 kill_inferior if multi_process is zero.
14546 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14548 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14549 * target.h (target_ops): Comment for *_watchpoint to make it clear
14550 the functions can get types '0' and '1'.
14552 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14554 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14555 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14556 * regcache.c (get_regcache): Likewise.
14557 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14558 * win32-low.c (child_fetch_inferior_registers): Remove check for
14561 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14562 Pedro Alves <pedro@codesourcery.com>
14564 * target.h (struct target_ops) <supports_multi_process>: New
14566 (target_supports_multi_process): New.
14567 * server.c (handle_query): Even if GDB reports support, only
14568 enable multi-process if the target also supports it. Report
14569 multi-process support only if the target backend supports it.
14570 * linux-low.c (linux_supports_multi_process): New function.
14571 (linux_target_ops): Install it as target_supports_multi_process
14574 2009-05-24 Doug Evans <dje@google.com>
14576 Global renaming of find_thread_pid to find_thread_ptid.
14577 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14578 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14579 All callers updated.
14581 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14582 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14585 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14586 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14587 (linux_resume_one_lwp): Ditto.
14589 2009-05-23 Doug Evans <dje@google.com>
14591 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14592 from struct inferior_list_entry * to struct lwp_info *.
14593 All callers updated.
14595 2009-05-13 Doug Evans <dje@google.com>
14597 * linux-x86-low.c: Don't include assert.h.
14598 (x86_siginfo_fixup): Use fatal, not assert.
14599 (x86_arch_setup): Fix comment.
14601 2009-05-12 Doug Evans <dje@google.com>
14603 Biarch support for i386/amd64 gdbserver.
14604 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14605 Add linux-x86-low.c.
14606 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14607 (linux-x86-low.o): Add.
14608 * linux-x86-64-low.c: Delete.
14609 * linux-i386-low.c: Delete.
14610 * linux-x86-low.c: New file.
14611 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14613 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14615 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14616 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14617 (linux_child_pid_to_exec_file): New function.
14618 (elf_64_header_p, elf_64_file_p): New functions.
14619 (siginfo_fixup): New function.
14620 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14621 give target a chance to convert layout.
14622 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14623 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14625 2009-05-07 Doug Evans <dje@google.com>
14627 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14628 (regsets_store_inferior_registers): Ditto.
14630 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14634 * linux-low.c (must_set_ptrace_flags): Delete.
14635 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14637 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14638 `lwp->must_set_ptrace_flags' instead.
14639 (linux_wait_for_event_1): Set ptrace options here.
14640 (linux_wait_1): ... not here.
14642 2009-04-30 Doug Evans <dje@google.com>
14644 * inferiors.c (started_inferior_callback): New function.
14645 (attached_inferior_callback): New function.
14646 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14647 * server.c (print_started_pid, print_attached_pid): New functions.
14648 (detach_or_kill_for_exit): New function.
14649 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14650 * server.h (have_started_inferiors_p): Declare.
14651 (have_attached_inferiors_p): Declare.
14653 * inferiors.c (remove_process): Fix memory leak, free process.
14654 * linux-low.c (linux_remove_process): New function.
14655 (linux_kill): Call it instead of remove_process.
14656 (linux_detach, linux_wait_1): Ditto.
14658 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14660 * configure.srv: Add x86 Windows CE target.
14662 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14664 * inferiors.c (get_thread_process): Make global.
14665 * server.h (get_thread_process): Add prototype.
14666 * thread-db.c (find_one_thread): Use get_thread_process
14667 instead of current_process.
14668 (thread_db_get_tls_address): Do not crash if called when
14669 thread layer is not yet initialized.
14671 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14673 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14674 * spu-low.c (current_tid): Rename to ...
14675 (current_ptid): ... this.
14676 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14677 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14678 ptid_get_lwp (current_ptid) instead of current_tid.
14679 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14680 instead of current_tid. Use find_process_pid to verify pid
14681 argument is valid. Pass proper argument to remove_process.
14682 (spu_thread_alive): Compare current_ptid instead of current_tid.
14683 (spu_resume): Likewise.
14685 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14687 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14690 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14692 Implement the multiprocess extensions, and add linux multiprocess
14695 * server.h (ULONGEST): Declare.
14696 (struct ptid, ptid_t): New.
14697 (minus_one_ptid, null_ptid): Declare.
14698 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14699 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14700 (struct inferior_list_entry): Change `id' type from unsigned from
14702 (struct sym_cache, struct breakpoint, struct
14703 process_info_private): Forward declare.
14704 (struct process_info): Declare.
14705 (current_process): Declare.
14706 (all_processes): Declare.
14707 (initialize_inferiors): Declare.
14708 (add_thread): Adjust to use ptid_t.
14709 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14710 (add_process, remove_process, find_thread_pid): Declare.
14711 (find_inferior_id): Adjust to use ptid_t.
14712 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14713 (multi_process): Declare.
14714 (push_event): Adjust to use ptid_t.
14715 (read_ptid, write_ptid): Declare.
14716 (prepare_resume_reply): Adjust to use ptid_t.
14717 (clear_symbol_cache): Declare.
14718 * inferiors.c (all_processes): New.
14719 (null_ptid, minus_one_ptid): New.
14720 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14721 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14722 (add_thread): Change unsigned long to ptid. Remove gdb_id
14724 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14725 (gdb_id_to_thread): Rename to ...
14726 (find_thread_pid): ... this. Change unsigned long to ptid.
14727 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14728 (loaded_dll, pull_pid_from_list): Adjust.
14729 (add_process, remove_process, find_process_pid)
14730 (get_thread_process, current_process, initialize_inferiors): New.
14731 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14732 (struct target_waitstatus) <related_pid>: Ditto.
14733 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14734 return type to int.
14735 (struct target_ops) <join>: Add `pid' argument.
14736 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14737 (struct target_ops) <wait>: Add `ptid' field. Change return type
14739 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14740 (mywait): Add `ptid' argument. Change return type to ptid_t.
14741 (target_pid_to_str): Declare.
14742 * target.c (set_desired_inferior): Adjust to use ptids.
14743 (mywait): Add new `ptid' argument. Adjust.
14744 (target_pid_to_str): New.
14745 * mem-break.h (free_all_breakpoints): Declare.
14746 * mem-break.c (breakpoints): Delelete.
14747 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14748 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14749 to use per-process breakpoint list.
14750 (free_all_breakpoints): New.
14751 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14752 (symbol_cache, all_symbols_looked_up): Delete.
14754 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14756 (prepare_resume_reply): Change ptid argument's type from unsigned
14757 long to ptid_t. Adjust. Implement W;process and X;process.
14758 (free_sym_cache, clear_symbol_cache): New.
14759 (look_up_one_symbol): Adjust to per-process symbol cache. *
14760 * server.c (cont_thread, general_thread, step_thread): Change type
14762 (attached): Delete.
14763 (multi_process): New.
14764 (last_ptid): Change type to ptid_t.
14765 (struct vstop_notif) <ptid>: Change type to ptid_t.
14766 (queue_stop_reply, push_event): Change `ptid' argument's type to
14768 (discard_queued_stop_replies): Add `pid' argument.
14769 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14770 changes. Don't reference the `attached' global.
14771 (attach_inferior): Adjust to mywait interface changes.
14772 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14773 features. Handle and report "multiprocess+". Handle
14775 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14777 (handle_v_kill): New.
14778 (handle_v_stopped): Adjust to use target_pid_to_str.
14779 (handle_v_requests): Allow multiple attaches and runs when
14780 multiprocess extensions are in effect. Handle "vKill".
14781 (myresume): Adjust to use ptids.
14782 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14783 (handle_status): Adjust to discard_queued_stop_replies interface
14785 (first_thread_of, kill_inferior_callback)
14786 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14787 (main): Call initialize_inferiors. Adjust to use ptids, killing
14788 and detaching from all inferiors. Handle multiprocess packet
14790 * linux-low.h: Include gdb_proc_service.h.
14791 (struct process_info_private): New.
14792 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14793 <lwpid_of>: Use ptid_get_lwp.
14794 (get_lwp_thread): Adjust.
14795 (struct lwp_info): Add `dead' member.
14796 (find_lwp_pid): Declare.
14797 * linux-low.c (thread_db_active): Delete.
14798 (new_inferior): Adjust comment.
14799 (inferior_pid): Delete.
14800 (linux_add_process): New.
14801 (handle_extended_wait): Adjust.
14802 (add_lwp): Change unsigned long to ptid.
14803 (linux_create_inferior): Add process to processes table. Adjust
14804 to use ptids. Don't set new_inferior here.
14805 (linux_attach_lwp): Rename to ...
14806 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14807 it. Adjust to use ptids.
14808 (linux_attach_lwp): New.
14809 (linux_attach): Add process to processes table. Don't set
14811 (struct counter): New.
14812 (second_thread_of_pid_p, last_thread_of_process_p): New.
14813 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14814 multiple processes.
14815 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14816 processes. Remove process from process table.
14817 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14818 to multiple processes.
14819 (any_thread_of): New.
14820 (linux_detach): Add `pid' argument, and handle it. Remove process
14821 from processes table.
14822 (linux_join): Add `pid' argument. Handle it.
14823 (linux_thread_alive): Change unsighed long argument to ptid_t.
14824 Consider dead lwps as not being alive.
14825 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14826 threads we're not interested in.
14827 (same_lwp, find_lwp_pid): New.
14828 (linux_wait_for_lwp): Change `pid' argument's type from int to
14830 (linux_wait_for_event): Rename to ...
14831 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14832 from int to ptid_t. Adjust.
14833 (linux_wait_for_event): New.
14834 (linux_wait_1): Add `ptid' argument. Change return type to
14835 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14836 that exit from the process table.
14837 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14839 (mark_lwp_dead): New.
14840 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14841 stopping all threads, mark its main lwp as dead.
14842 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14844 (fetch_register, usr_store_inferior_registers)
14845 (regsets_fetch_inferior_registers)
14846 (regsets_store_inferior_registers, linux_read_memory)
14847 (linux_write_memory): Inline `inferior_pid'.
14848 (linux_look_up_symbols): Adjust to use per-process
14849 `thread_db_active'.
14850 (linux_request_interrupt): Adjust to use ptids.
14851 (linux_read_auxv): Inline `inferior_pid'.
14852 (initialize_low): Don't reference thread_db_active.
14853 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14854 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14855 (ps_getpid): Return the pid of the current inferior.
14856 * thread-db.c (proc_handle, thread_agent): Delete.
14857 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14859 (find_one_thread): Change argument type to ptid_t. Adjust to
14861 (maybe_attach_thread): Adjust to per-process data and ptids.
14862 (thread_db_find_new_threads): Ditto.
14863 (thread_db_init): Ditto.
14864 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14865 processes table. Adjust to use ptids.
14866 (spu_kill, spu_detach): Adjust interface. Remove process from
14868 (spu_join, spu_thread_alive): Adjust interface.
14869 (spu_wait): Adjust interface. Remove process from processes
14870 table. Adjust to use ptids.
14871 * win32-low.c (current_inferior_tid): Delete.
14872 (current_inferior_ptid): New.
14873 (debug_event_ptid): New.
14874 (thread_rec): Take a ptid. Adjust.
14875 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14876 (child_delete_thread): Ditto.
14877 (do_initial_child_stuff): Add `attached' argument. Add process to
14879 (child_fetch_inferior_registers, child_store_inferior_registers):
14881 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14882 (win32_attach): Pass 1 to do_initial_child_stuff.
14883 (win32_kill): Adjust interface. Remove process from processes
14885 (win32_detach): Ditto.
14886 (win32_join): Adjust interface.
14887 (win32_thread_alive): Take a ptid.
14888 (win32_resume): Adjust to use ptids.
14889 (get_child_debug_event): Ditto.
14890 (win32_wait): Adjust interface. Remove exiting process from
14893 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14895 Non-stop mode support.
14897 * server.h (non_stop): Declare.
14898 (gdb_client_data, handler_func): Declare.
14899 (delete_file_handler, add_file_handler, start_event_loop):
14901 (handle_serial_event, handle_target_event, push_event)
14902 (putpkt_notif): Declare.
14903 * target.h (enum resume_kind): New.
14904 (struct thread_resume): Replace `step' field by `kind' field.
14905 (TARGET_WNOHANG): Define.
14906 (struct target_ops) <wait>: Add `options' argument.
14907 <supports_non_stop, async, start_non_stop>: New fields.
14908 (target_supports_non_stop, target_async): New.
14909 (start_non_stop): Declare.
14910 (mywait): Add `options' argument.
14911 * target.c (mywait): Add `options' argument. Print child exit
14912 notifications here.
14913 (start_non_stop): New.
14914 * server.c (non_stop, own_buf, mem_buf): New globals.
14915 (struct vstop_notif): New.
14916 (notif_queue): New global.
14917 (queue_stop_reply, push_event, discard_queued_stop_replies)
14918 (send_next_stop_reply): New.
14919 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14921 (attach_inferior): In non-stop mode, don't wait for the target
14923 (handle_general_set): Handle QNonStop.
14924 (handle_query): When handling qC, return the current general
14925 thread, instead of the first thread of the list.
14926 (handle_query): If the backend supports non-stop mode, include
14927 QNonStop+ in the qSupported query response.
14928 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14930 (handle_v_attach, handle_v_run): Handle non-stop mode.
14931 (handle_v_stopped): New.
14932 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14933 (myresume): Adjust to use resume_kind. Handle non-stop.
14934 (queue_stop_reply_callback): New.
14935 (handle_status): Handle non-stop mode.
14936 (main): Clear non_stop flag on reconnection. Use the event-loop.
14937 Refactor serial protocol handling from here ...
14938 (process_serial_event): ... to this new function. When GDB
14939 selects any thread, select one here. In non-stop mode, wait until
14940 GDB acks all pending events before exiting.
14941 (handle_serial_event, handle_target_event): New.
14942 * remote-utils.c (remote_open): Install remote_desc in the event
14944 (remote_close): Remove remote_desc from the event loop.
14945 (putpkt_binary): Rename to...
14946 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14947 (putpkt_binary): New as wrapper around putpkt_binary_1.
14948 (putpkt_notif): New.
14949 (prepare_resume_reply): In non-stop mode, don't change the
14951 * event-loop.c: New.
14952 * Makefile.in (OBJ): Add event-loop.o.
14953 (event-loop.o): New rule.
14955 * linux-low.h (pid_of): Moved here.
14957 (get_lwp_thread): Use lwpid_of.
14958 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14959 * linux-low.c (pid_of): Delete.
14960 (inferior_pid): Use lwpid_of.
14961 (linux_event_pipe): New.
14962 (target_is_async_p): New.
14964 (handle_extended_wait): Use lwpid_of.
14965 (add_lwp): Don't set lwpid field.
14966 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14967 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14968 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14969 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14970 first. Adjust to linux_wait_for_event interface changes. Use
14972 (linux_detach): Don't delete the main lwp here.
14973 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14974 (status_pending_p): Don't consider explicitly suspended lwps.
14975 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14976 pointer. Add OPTIONS argument. Change return type to int. Use
14977 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14978 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14979 pointer. Add status pointer argument. Return a pid instead of a
14980 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14981 changes. In non-stop mode, don't switch to a random thread.
14982 (linux_wait): Rename to...
14983 (linux_wait_1): ... this. Add target_options argument, and handle
14984 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14985 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14986 clean exit and signal exit code. Don't stop all threads in
14987 non-stop mode. In all-stop mode, only stop all threads when
14988 reporting a stop to GDB. Handle explicit thread stop requests.
14989 (async_file_flush, async_file_mark): New.
14991 (send_sigstop): Use lwpid_of.
14992 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14993 interface changes. In non-stop mode, don't switch to a random
14995 (linux_resume_one_lwp): Use lwpid_of.
14996 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14997 (linux_resume_one_thread): ... this. Handle resume_stop. In
14998 non-stop mode, don't look for pending flag in all threads.
14999 (resume_status_pending_p): Don't consider explicitly suspended
15001 (my_waitpid): Reimplement. Emulate __WALL.
15002 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15004 (sigchld_handler, linux_supports_non_stop, linux_async)
15005 (linux_start_non_stop): New.
15006 (linux_target_ops): Register linux_supports_non_stop, linux_async
15007 and linux_start_non_stop.
15008 (initialize_low): Install SIGCHLD handler.
15009 * thread-db.c (thread_db_create_event, find_one_thread)
15010 (thread_db_get_tls_address): Use lwpid_of.
15011 * win32-low.c (win32_detach): Adjust to use resume_kind.
15012 (win32_wait): Add `options' argument.
15013 * spu-low.c (spu_resume): Adjust to use resume_kind.
15014 (spu_wait): Add `options' argument.
15016 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15018 Decouple target code from remote protocol.
15020 * target.h (enum target_waitkind): New.
15021 (struct target_waitstatus): New.
15022 (struct target_ops) <wait>: Return an unsigned long. Take a
15023 target_waitstatus pointer instead of a char pointer.
15024 (mywait): Likewise.
15025 * target.c (mywait): Change prototype to return an unsigned long.
15026 Take a target_waitstatus pointer instead of a char pointer. Adjust.
15027 * server.h (thread_from_wait, old_thread_from_wait): Delete
15029 (prepare_resume_reply): Change prototype to take a
15031 * server.c (thread_from_wait, old_thread_from_wait): Delete.
15032 (last_status, last_ptid): New.
15033 (start_inferior): Remove "statusptr" argument. Adjust. Return a
15034 pid instead of a signal.
15035 (attach_inferior): Remove "status" and "signal" parameters.
15037 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
15039 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
15040 (handle_v_requests, myresume): Remove "status" and "signal"
15041 parameters. Adjust.
15042 (handle_status): New.
15043 (main): Delete local `status'. Adjust.
15044 * remote-utils.c: Include target.h.
15045 (prepare_resume_reply): Change prototype to take a
15046 target_waitstatus. Adjust.
15048 * linux-low.c (linux_wait): Adjust to new target_ops->wait
15050 * spu-low.c (spu_wait): Adjust.
15051 * win32-low.c (enum target_waitkind, struct target_waitstatus):
15053 (win32_wait): Adjust.
15055 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15057 * target.h (struct thread_resume): Delete leave_stopped member.
15058 (struct target_ops): Add a `n' argument to the `resume' callback.
15059 * server.c (start_inferior): Adjust.
15060 (handle_v_cont, myresume): Adjust.
15061 * linux-low.c (check_removed_breakpoint): Adjust to resume
15062 interface change, and to removed leave_stopped field.
15063 (resume_ptr): Delete.
15064 (struct thread_resume_array): New.
15065 (linux_set_resume_request): Add new `arg' parameter. Adjust to
15066 resume interface change.
15067 (linux_continue_one_thread, linux_queue_one_thread)
15068 (resume_status_pending_p): Check if the resume field is NULL
15069 instead of checking the leave_stopped member.
15070 (linux_resume): Adjust to the target resume interface change.
15071 * spu-low.c (spu_resume): Adjust to the target resume interface
15073 * win32-low.c (win32_detach, win32_resume): Ditto.
15075 2009-04-01 Pedro Alves <pedro@codesourcery.com>
15077 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
15079 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
15081 (linux_continue_one_thread): Only preserve the stepping flag if
15082 there's a pending breakpoint.
15084 2009-03-31 Pedro Alves <pedro@codesourcery.com>
15086 * server.c (main): After the inferior having exited, call
15087 remote_close before exiting gdbserver.
15089 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
15091 Fix size of FPSCR in Power 7 processors.
15092 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
15093 (PPC_FEATURE_HAS_DFP): New #define.
15094 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
15097 2009-03-23 Pedro Alves <pedro@codesourcery.com>
15099 * server.c (handle_query) Whitespace and formatting.
15101 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15103 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
15104 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
15105 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
15106 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
15107 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
15108 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
15109 Makefile.in, configure.ac: Fix whitespace throughout.
15110 * configure: Regenerate.
15112 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15114 * inferiors.c (find_inferior): Make it safe for the callback
15115 function to delete the currently iterated inferior.
15117 2009-03-22 Pedro Alves <pedro@codesourcery.com>
15119 * Makefile.in (linuw_low_h): Move higher.
15120 (thread-db.o): Depend on $(linux_low_h).
15122 2009-03-17 Pedro Alves <pedro@codesourcery.com>
15124 Rename "process" to "lwp" throughout.
15126 * linux-low.c (all_processes): Rename to...
15127 (all_lwps): ... this.
15128 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
15129 (add_process): Rename to ...
15130 (add_lwp): ... this. Adjust.
15131 (linux_create_inferior): Adjust.
15132 (linux_attach_lwp): Adjust.
15133 (linux_attach): Adjust.
15134 (linux_kill_one_process): Rename to ...
15135 (linux_kill_one_lwp): ... this. Adjust.
15136 (linux_kill): Adjust.
15137 (linux_detach_one_process): Rename to ...
15138 (linux_detach_one_lwp): ... this. Adjust.
15139 (linux_detach): Adjust.
15140 (check_removed_breakpoint): Adjust.
15141 (status_pending_p): Adjust.
15142 (linux_wait_for_process): Rename to ...
15143 (linux_wait_for_lwp): ... this. Adjust.
15144 (linux_wait_for_event): Adjust.
15145 (send_sigstop): Adjust.
15146 (wait_for_sigstop): Adjust.
15147 (stop_all_processes): Rename to ...
15148 (stop_all_lwps): ... this.
15149 (linux_resume_one_process): Rename to ...
15150 (linux_resume_one_lwp): ... this. Adjust.
15151 (linux_set_resume_request, linux_continue_one_thread)
15152 (linux_queue_one_thread, resume_status_pending_p)
15153 (usr_store_inferior_registers, regsets_store_inferior_registers)
15154 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
15156 * linux-low.h (get_process): Rename to ...
15157 (get_lwp): ... this. Adjust.
15158 (get_thread_process): Rename to ...
15159 (get_thread_lwp): ... this. Adjust.
15160 (get_process_thread): Rename to ...
15161 (get_lwp_thread): ... this. Adjust.
15162 (struct process_info): Rename to ...
15163 (struct lwp_info): ... this.
15164 (all_processes): Rename to ...
15165 (all_lwps): ... this.
15166 * proc-service.c (ps_lgetregs): Adjust.
15167 * thread-db.c (thread_db_create_event, find_one_thread)
15168 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
15170 2009-03-14 Pedro Alves <pedro@codesourcery.com>
15172 * server.c (handle_query): Handle "qAttached".
15174 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
15176 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
15177 GPLv3, update license URL.
15179 2009-03-01 Doug Evans <dje@google.com>
15181 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
15182 (server_h): Add gdb_signals.h.
15183 (signals.o): Update.
15184 * server.h (target_signal_from_host,target_signal_to_host_p)
15185 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
15187 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
15189 * remote-utils.c (getpkt): Also generate remote-debug
15190 information if noack_mode is set.
15192 2009-02-06 Pedro Alves <pedro@codesourcery.com>
15194 * server.c (handle_query): Report qXfer:siginfo:read and
15195 qXfer:siginfo:write as supported and handle them.
15196 * target.h (struct target_ops) <qxfer_siginfo>: New field.
15197 * linux-low.c (linux_xfer_siginfo): New.
15198 (linux_target_ops): Set it.
15200 2009-01-26 Pedro Alves <pedro@codesourcery.com>
15202 * server.c (gdbserver_usage): Mention --remote-debug.
15203 (main): Accept '--remote-debug' switch.
15205 2009-01-18 Doug Evans <dje@google.com>
15207 * regcache.c (new_register_cache): No need to check result of xcalloc.
15208 * server.c (handle_search_memory): Back out calls to xmalloc,
15209 result is checked and error is returned to user upon failure.
15210 (handle_query): Ditto. Add more checks for result of malloc.
15211 (handle_v_cont): Check result of malloc, report error back to
15213 (handle_v_run): Ditto. Call freeargv.
15214 * server.h (freeargv): Declare.
15215 * utils.c (freeargv): New fn.
15217 2009-01-15 Doug Evans <dje@google.com>
15219 * gdbreplay.c (perror_with_name): Make arg const char *.
15220 * server.h (target_signal_to_name): Make return type const char *.
15221 * thread-db.c (thread_db_err_str): Make return type const char *.
15222 * utils.c (perror_with_name): Make arg const char *.
15224 2009-01-14 Pedro Alves <pedro@codesourcery.com>
15226 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
15227 when handling a EXIT_PROCESS_DEBUG_EVENT.
15229 2009-01-06 Joel Brobecker <brobecker@adacore.com>
15231 * gdbreplay.c (gdbreplay_version): Update copyright year.
15232 * server.c (gdbserver_version): Likewise.
15234 2009-01-05 Doug Evans <dje@google.com>
15236 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
15237 (handle_extended_wait): Improve comment.
15239 2008-12-13 Doug Evans <dje@google.com>
15241 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
15242 * server.h (ATTR_MALLOC): New macro.
15243 (xmalloc,xcalloc,xstrdup): Declare.
15244 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
15245 * inferiors.c: Ditto.
15246 * linux-low.c: Ditto.
15247 * mem-break.c: Ditto.
15248 * regcache.c: Ditto.
15249 * remote-utils.c: Ditto.
15252 * win32-low.c: Ditto.
15254 2008-12-12 Doug Evans <dje@google.com>
15256 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
15257 in debugging printf.
15259 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
15261 2008-12-09 Doug Evans <dje@google.com>
15263 * linux-low.h (struct process_info): Delete member tid, unused.
15264 * thread-db.c (find_one_thread): Update.
15265 (maybe_attach_thread): Update.
15267 2008-12-02 Pedro Alves <pedro@codesourcery.com>
15269 * target.h (struct target_ops): Add qxfer_osdata member.
15270 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
15272 (linux_qxfer_osdata): New functions.
15273 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
15275 * server.c (handle_query): Handle "qXfer:osdata:read:".
15276 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
15277 (buffer_xml_printf): New functions.
15278 * server.h (struct buffer): New.
15279 (buffer_grow_str, buffer_grow_str0): New macros.
15280 (buffer_grow, buffer_free, buffer_init, buffer_finish)
15281 (buffer_xml_printf): Declare.
15283 2008-11-24 Doug Evans <dje@google.com>
15285 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
15287 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
15289 * server.c (handle_v_run): Always use the supplied argument list.
15291 2008-11-19 Bob Wilson <bob.wilson@acm.org>
15293 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
15294 (xtensa_regmap_table): Add entry for scompare1.
15296 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
15298 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
15299 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
15300 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
15301 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
15302 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
15303 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
15304 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
15305 XML target descriptions.
15306 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
15307 when inferior is running on an ISA 2.05 or later processor. Add
15308 special case to return offset for full 64-bit slot of FPSCR when
15311 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
15313 * Makefile.in (SFILES, clean): Added sparc64 files.
15314 (reg-sparc64.o, reg-sparc64.c): New.
15315 * configure.srv (sparc*-*-linux*): New configuration.
15316 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
15317 syscall arguments for SPARC.
15318 (regsets_store_inferior_registers): Likewise.
15319 * linux-sparc-low.c: New file.
15321 2008-10-21 Doug Evans <dje@google.com>
15323 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
15324 (READLINE_DIR,READLINE_DEP): Delete.
15325 (INTERNAL_CFLAGS): Update.
15326 (LINTFLAGS): Update.
15328 2008-10-10 Pedro Alves <pedro@codesourcery.com>
15330 * server.c (handle_v_run): If GDB didn't specify an argv, use the
15331 whole argv from the last run, not just argv[0].
15333 2008-09-08 Pedro Alves <pedro@codesourcery.com>
15335 * regcache.c (new_register_cache): Return NULL if the register
15336 cache size isn't known yet.
15337 (free_register_cache): Avoid dereferencing a NULL regcache.
15339 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15341 * configure.srv: Merge MIPS and MIPS64.
15343 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
15345 * Makefile.in (uninstall): Apply $(EXEEXT) too.
15347 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
15349 * Makefile.in: Add required vsx dependencies.
15351 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
15352 Declare init_registers_powerpc_vsx32l.
15353 Declare init_registers_powerpc_vsx64l.
15354 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
15355 (ppc_arch_setup): Check for VSX in hwcap.
15356 (ppc_fill_vsxregset): New function.
15357 (ppc_store_vsxregset): New function.
15358 Add new VSX entry in regset_info target_regsets.
15360 * configure.srv: Add new VSX dependencies.
15362 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15364 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15365 (remote_open): Set or clear transport_is_reliable.
15366 (putpkt_binary): Don't expect acks in noack mode.
15367 (getpkt): Don't send ack/nac in noack mode.
15368 * server.c (handle_general_set): Handle QStartNoAckMode.
15369 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15371 (main): Reset noack_mode on every connection.
15372 * server.h (noack_mode): Declare.
15374 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15376 * Makefile.in (GDBREPLAY_OBS): New variable.
15377 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15379 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15380 Daniel Jacobowitz <dan@codesourcery.com>
15382 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15383 (usr_store_inferior_registers): Likewise.
15384 (regsets_store_inferior_registers): Likewise.
15386 2008-07-31 Rolf Jansen <rj@surtec.com>
15387 Pedro Alves <pedro@codesourcery.com>
15389 * configure.ac: Check for memmem declaration.
15390 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15391 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15392 (disable_packet_qfThreadInfo): Unconditionally compile.
15393 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15394 * configure, config.in: Regenerate.
15396 2008-07-28 Doug Kwan <dougkwan@google.com>
15398 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15399 (linux_write_memory): Remove declaration of errno.
15401 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15403 * linux-low.c (handle_extended_wait): Do not use "status"
15404 variable uninitialized.
15406 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15408 * server.c (handle_v_attach): Inhibit reporting dll changes.
15410 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15412 * remote-utils.c (prepare_resume_reply): If requested, don't
15413 output "thread:TID" in the T stop reply.
15415 * server.c (disable_packet_vCont, disable_packet_Tthread)
15416 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15417 (handle_query): If requested, disable support for qC, qfThreadInfo
15419 (handle_v_requests): If requested, disable support for vCont.
15420 (gdbserver_show_disableable): New.
15421 (main): Handle --disable-packet and --disable-packet=LIST.
15423 * server.h (disable_packet_vCont, disable_packet_Tthread)
15424 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15426 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15428 * server.c (gdbserver_usage): Mention --version.
15430 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15432 * Makefile.in (gdbreplay.o): New rule.
15434 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15436 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15437 message, not gdbserver.
15439 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15440 Nathan Sidwell <nathan@codesourcery.com>
15441 Joseph Myers <joseph@codesourcery.com>
15443 * acinclude.m4: Include ../../config/acx.m4.
15444 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15445 * configure, config.in: Regenerate.
15446 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15447 * server.c (gdbserver_version): Print PKGVERSION.
15448 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15449 (main): Adjust gdbserver_usage calls.
15450 * gdbreplay.c (version, host_name): Add declarations.
15451 (gdbreplay_version, gdbreplay_usage): New.
15452 (main): Accept --version and --help options.
15454 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15456 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15457 (arm_breakpoint_at): Handle Thumb.
15458 (the_low_target): Add comment.
15460 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15462 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15464 2008-05-09 Doug Evans <dje@google.com>
15466 * server.h (decode_search_memory_packet): Declare.
15467 * remote-utils.c (decode_search_memory_packet): New fn.
15468 * server.c (handle_search_memory_1): New fn.
15469 (handle_search_memory): New fn.
15470 (handle_query): Process qSearch:memory packets.
15472 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15474 * regcache.c (registers_length): Remove.
15475 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15476 full register packet.
15477 * regcache.h (registers_length): Remove prototype.
15478 * server.h (PBUFSIZ): Define to 16384.
15480 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15482 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15483 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15484 powerpc-64l.o, and powerpc-altivec64l.o.
15485 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15486 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15487 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15488 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15489 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15492 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15493 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15494 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15495 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15496 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15497 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15498 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15499 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15500 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15501 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15504 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15505 (init_registers_powerpc_32l): ... this new prototype.
15506 (init_registers_powerpc_32): Remove, replace by ...
15507 (init_registers_powerpc_altivec32l): ... this new prototype.
15508 (init_registers_powerpc_e500): Remove, replace by ...
15509 (init_registers_powerpc_e500l): ... this new prototype.
15510 (init_registers_ppc64): Remove, replace by ...
15511 (init_registers_powerpc_64l): ... this new prototype.
15512 (init_registers_powerpc_64): Remove, replace by ...
15513 (init_registers_powerpc_altivec64l): ... this new prototype.
15514 (ppc_num_regs): Set to 73.
15515 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15516 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15517 (ppc_cannot_store_register): Handle orig_r3 and trap.
15518 (ppc_arch_setup): Update init_registers_... calls.
15519 (ppc_fill_gregset): Handle orig_r3 and trap.
15521 * inferiors.c (clear_inferiors): Reset current_inferior.
15523 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15525 * acinclude.m4: Add override.m4.
15526 * configure: Regenerate.
15528 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15530 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15531 initial call to init_register_ppc64.
15533 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15535 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15536 single powerpc*-*-linux* case.
15537 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15539 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15541 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15542 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15544 * linux-ppc-low.c: Include <elf.h>.
15545 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15546 (ppc_hwcap): New global variable.
15547 (ppc_regmap): Remove __SPE__ #ifdef sections.
15548 (ppc_regmap_e500): New global variable.
15549 (ppc_cannot_store_register): Update __SPE__ special case.
15550 (ppc_get_hwcap): New function.
15551 (ppc_arch_setup): Use it to determine whether inferior supports
15552 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15553 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15554 Do not access registers if target does not support AltiVec.
15555 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15556 Do not access registers if target does not support SPE.
15557 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15559 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15561 * linux-low.c (disabled_regsets, num_regsets): New.
15562 (use_regsets_p): Delete.
15563 (linux_wait_for_process): Clear disabled_regsets.
15564 (regsets_fetch_inferior_registers): Check and set it.
15565 (regsets_store_inferior_registers): Likewise.
15566 (linux_fetch_registers, linux_store_registers): Do not use
15568 (initialize_low): Allocate disabled_regsets.
15570 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15572 * Makefile.in (LIBOBJS): New.
15573 (OBS): Use LIBOBJS.
15574 (memmem.o): New rule.
15575 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15576 * configure: Regenerated.
15578 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15580 * server.c (handle_query): Never return "unsupported" for
15581 qXfer:features:read queries.
15583 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15585 * server.c (get_features_xml): Fix inverted condition.
15586 (handle_query): Always support qXfer:feature:read.
15588 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15590 * server.c (wrapper_argv): New.
15591 (start_inferior): Handle wrapper_argv. If set, expect an extra
15593 (gdbserver_usage): Document --wrapper.
15594 (main): Parse --wrapper.
15596 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15598 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15599 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15600 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15601 (ppc_set_pc): Likewise.
15602 (ppc_arch_setup): New function.
15603 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15604 of collect_register.
15605 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15607 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15609 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15610 instead of linux-ppc64-low.o.
15611 * linux-ppc64-low.c: Remove file.
15612 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15613 (linux-ppc64-low.o): Remove rule.
15615 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15616 (init_registers_powerpc_64): Likewise.
15617 (ppc_regmap): Conditionally define depending on __powerpc64__.
15618 (ppc_cannot_store_register): Do not special-case "fpscr" when
15619 compiled on __powerpc64__.
15620 (ppc_collect_ptrace_register): New function.
15621 (ppc_supply_ptrace_register): New function.
15622 (ppc_breakpoint): Change type to "unsigned int".
15623 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15624 (the_low_target): Conditionally provide initializers for the
15625 arch_setup member depending on __powerpc64__. Install
15626 collect_ptrace_register and supply_ptrace_register members.
15628 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15630 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15631 * server.c (gdbserver_xmltarget): Define.
15632 (get_features_xml): Use it to replace "target.xml" and arch_string.
15634 * configure.srv: Remove srv_xmltarget. Add XML files that were
15635 mentioned there to srv_xmlfiles instead. Remove conditional tests
15636 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15637 srv_xmlfiles and srv_regobj to include all possible choices.
15638 * configure.ac (srv_xmltarget): Remove.
15639 (srv_xmlfiles): Do not add "target.xml".
15640 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15641 checks for supplementary target information.
15642 * configure: Regenerate.
15643 * Makefile.in (XML_TARGET): Remove.
15644 (target.xml): Remove rule.
15645 (clean): Do not clean up target.xml.
15646 (.PRECIOUS): Do not mention target.xml.
15648 * target.h (struct target_ops): Remove arch_string member.
15649 * linux-low.c (linux_arch_string): Remove.
15650 (linux_target_ops): Remove arch_string initializer.
15651 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15652 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15653 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15654 * spu-low.c (spu_arch_string): Remove.
15655 (spu_target_ops): Remove arch_string initializer.
15656 * win32-low.c (win32_arch_string): Remove.
15657 (win32_target_ops): Remove arch_string initializer.
15658 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15659 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15660 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15662 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15664 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15665 by collect_ptrace_register and supply_ptrace_register hooks.
15666 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15667 instead of checking for the_low_target.left_pad_xfer.
15668 (usr_store_inferior_registers): Use collect_ptrace_register callback
15669 instead of checking for the_low_target.left_pad_xfer.
15671 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15672 (s390_supply_ptrace_register): Likewise.
15673 (s390_fill_gregset): Call s390_collect_ptrace_register.
15674 (the_low_target): Update.
15676 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15677 (ppc_supply_ptrace_register): Likewise.
15678 (the_low_target): Update.
15680 * linux-i386-low.c (the_low_target): Update.
15681 * linux-x86-64-low.c (the_low_target): Update.
15683 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15685 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15686 reg-s390.o and reg-s390x.o.
15688 * linux-low.c (new_inferior): New global variable.
15689 (linux_create_inferior, linux_attach): Set it.
15690 (linux_wait_for_process): Call the_low_target.arch_setup after the
15691 target has stopped for the first time.
15692 (initialize_low): Do not call the_low_target.arch_setup.
15694 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15695 (s390_set_pc): Likewise.
15696 (s390_arch_setup): New function.
15697 (the_low_target): Use s390_arch_setup as arch_setup routine.
15699 * regcache.c (realloc_register_cache): New function.
15700 (set_register_cache): Call it for each existing regcache.
15702 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15704 * server.h (init_registers): Remove prototype.
15706 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15707 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15708 instead of init_registers ().
15709 * linux-arm-low.c (init_registers_arm): Add prototype.
15710 (init_registers_arm_with_iwmmxt): Likewise.
15711 (the_low_target): Add initializer for arch_setup field.
15712 * linux-cris-low.c (init_registers_cris): Add prototype.
15713 (the_low_target): Add initializer for arch_setup field.
15714 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15715 (the_low_target): Add initializer for arch_setup field.
15716 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15717 (the_low_target): Add initializer for arch_setup field.
15718 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15719 (the_low_target): Add initializer for arch_setup field.
15720 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15721 (the_low_target): Add initializer for arch_setup field.
15722 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15723 (the_low_target): Add initializer for arch_setup field.
15724 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15725 (init_registers_mips64_linux): Likewise.
15726 (the_low_target): Add initializer for arch_setup field.
15727 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15728 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15729 (the_low_target): Add initializer for arch_setup field.
15730 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15731 (init_registers_powerpc_64): Likewise.
15732 (the_low_target): Add initializer for arch_setup field.
15733 * linux-s390-low.c (init_registers_s390): Add prototype.
15734 (init_registers_s390x): Likewise.
15735 (the_low_target): Add initializer for arch_setup field.
15736 * linux-sh-low.c (init_registers_sh): Add prototype.
15737 (the_low_target): Add initializer for arch_setup field.
15738 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15739 (the_low_target): Add initializer for arch_setup field.
15740 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15741 (the_low_target): Add initializer for arch_setup field.
15743 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15744 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15745 instead of init_registers ().
15746 * win32-arm-low.c (init_registers_arm): Add prototype.
15747 (the_low_target): Add initializer for arch_setup field.
15748 * win32-i386-low.c (init_registers_i386): Add prototype.
15749 (the_low_target): Add initializer for arch_setup field.
15751 * spu-low.c (init_registers_spu): Add prototype.
15752 (initialize_low): Call initialie_registers_spu () instead of
15753 initialize_registers ().
15755 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15757 * server.c (handle_v_requests): When handling the vRun and vAttach
15758 packets, if already debugging a process, don't kill it. Return an
15761 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15763 * server.c (handle_query): Correct length check.
15765 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15767 * win32-low.c (do_initial_child_stuff): Add process handle
15768 parameter. Set current_process_handle and current_process_id from the
15769 parameters. Clear globals.
15770 (win32_create_inferior): Don't set current_process_handle and
15771 current_process_id here. Instead pass them on the call to
15772 do_initial_child_stuff.
15773 (win32_attach): Likewise.
15774 (win32_clear_inferiors): New.
15775 (win32_kill): Don't close the current process handle or the
15776 current thread handle here. Instead call win32_clear_inferiors.
15777 (win32_detach): Don't open a new handle to the process. Call
15778 win32_clear_inferiors.
15779 (win32_join): Don't rely on current_process_handle; open a new
15780 handle using the process id.
15781 (win32_wait): Call win32_clear_inferiors when the inferior process
15784 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15786 * server.c (monitor_show_help): Add "exit".
15788 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15790 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15791 (clean): Add reg-xtensa.c.
15792 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15793 * configure.srv (xtensa*-*-linux*) New target.
15794 * linux-xtensa-low.c: New.
15795 * xtensa-xtregs.c: New.
15797 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15799 * hostio.c: Don't include errno.h.
15800 (errno_to_fileio_errno): Move to hostio-errno.
15801 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15802 error number outputting to the target->hostio_last_error callback.
15803 (hostio_packet_error): Use FILEIO_EINVAL directly.
15804 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15805 calls to hostio_error.
15806 * hostio-errno.c: New.
15807 * server.h (hostio_last_error_from_errno): Declare.
15808 * target.h (target_ops): Add hostio_last_error member.
15809 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15810 as hostio_last_error handler.
15811 * spu-low.c (spu_target_ops): Likewise.
15812 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15813 (wince_hostio_last_error): New functions.
15814 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15815 as hostio_last_error handler.
15816 (win32_target_ops) [!_WIN32_WCE]: Register
15817 hostio_last_error_from_errno as hostio_last_error handler.
15818 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15819 (hostio-errno.o): New rule.
15820 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15821 * configure.srv (srv_hostio_err_objs): New variable. Default to
15823 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15824 * configure: Regenerate.
15826 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15828 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15829 (linux_kill, linux_detach): Clean up the process list.
15830 * remote-utils.c (remote_open): Improve port number parsing.
15831 (putpkt_binary, input_interrupt): Only send interrupts if the target
15833 * server.c (extended_protocol): Make static.
15834 (attached): Define earlier.
15835 (exit_requested, response_needed, program_argv): New variables.
15836 (target_running): New.
15837 (start_inferior): Clear attached here.
15838 (attach_inferior): Set attached here.
15839 (require_running): Define.
15840 (handle_query): Use require_running and target_running. Implement
15842 (handle_v_attach, handle_v_run): New.
15843 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15844 (gdbserver_usage): Update.
15845 (main): Redo argument parsing. Handle --debug and --multi. Handle
15846 --attach along with other options or after the port. Save
15847 program_argv. Support no initial program. Resynchronize
15848 communication with GDB after an error. Handle "monitor exit".
15849 Use require_running and target_running. Always allow the extended
15850 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15851 restart in extended mode.
15852 * README: Refer to the GDB manual. Update --attach usage.
15854 2007-12-20 Andreas Schwab <schwab@suse.de>
15856 * linux-low.c (STACK_SIZE): Define.
15857 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15858 (linux_test_for_tracefork): Likewise.
15860 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15862 * linux-low.c (linux_wait_for_event): Update messages. Do not
15863 reinsert auto-delete breakpoints.
15864 * mem-break.c (struct breakpoint): Change return type of handler to
15866 (set_breakpoint_at): Update handler type.
15867 (reinsert_breakpoint_handler): Return 1 instead of calling
15869 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15871 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15872 * mem-break.h (set_breakpoint_at): Update handler type.
15873 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15874 * win32-low.c (auto_delete_breakpoint): New.
15875 (get_child_debug_event): Use it.
15877 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15879 * configure.ac: Check for pread and pwrite.
15880 * hostio.c (handle_pread): Fall back to lseek and read.
15881 (handle_pwrite): Fall back to lseek and write.
15882 * config.in, configure: Regenerated.
15884 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15886 * server.c (myresume): Add own_buf argument.
15887 (main): Update calls.
15889 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15891 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15892 * remote-utils.c (remote_open): Do not call disable_async_io.
15893 (block_async_io): Delete.
15894 (unblock_async_io): Make static.
15895 (initialize_async_io): New.
15896 * server.c (handle_v_cont): Handle async I/O here.
15897 (myresume): Likewise. Move other common resume tasks here...
15898 (main): ... from here. Call initialize_async_io. Disable async
15899 I/O before the main loop.
15900 * server.h (initialize_async_io): Declare.
15901 (block_async_io, unblock_async_io): Delete prototypes.
15902 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15904 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15906 * remote-utils.c (readchar): Allow binary data in received messages.
15908 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15910 * win32-low.c (attaching): New global.
15911 (win32_create_inferior): Clear the `attaching' global.
15912 (win32_attach): Set the `attaching' global.
15913 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15914 attaching. Only set a breakpoint at the entry point if not
15917 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15919 * server.c (main): Don't report dll events on the initial
15920 connection on attaches.
15922 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15924 * server.c (main): Relax numerical bases supported for the pid of
15925 the --attach command line argument.
15927 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15929 * win32-low.c (win32_attach): Call OpenProcess before
15930 DebugActiveProcess, not after. Add last error output to error
15933 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15935 * win32-low.c (win32_get_thread_context)
15936 (win32_set_thread_context): New functions.
15937 (thread_rec): Use win32_get_thread_context.
15938 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15939 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15942 2007-12-03 Leo Zayas
15943 Pedro Alves <pedro_alves@portugalmail.pt>
15945 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15947 (child_add_thread): Minor cleanup.
15948 (child_continue): Resume artificially suspended threads before
15949 calling ContinueDebugEvent.
15950 (suspend_one_thread): New.
15951 (fake_breakpoint_event): New.
15952 (get_child_debug_event): Change return type to int. Check here if
15953 gdb sent an interrupt request. If a soft interrupt was requested,
15954 fake a breakpoint event. Return 0 if there is no event to handle,
15956 (win32_wait): Don't check here if gdb sent an interrupt request.
15957 Ensure there is a valid event to handle.
15958 (win32_request_interrupt): Add soft interruption method as last
15961 2007-12-03 Leo Zayas
15962 Pedro Alves <pedro_alves@portugalmail.pt>
15964 * win32-low.h (win32_thread_info): Add descriptions to the
15965 structure members. Replace `suspend_count' counter by a
15967 * win32-low.c (thread_rec): Update condition of when to get the
15968 context from the inferior. Rely on ContextFlags being set if it
15969 has already been retrieved. Only suspend the inferior thread if
15970 we haven't already. Warn if that fails.
15971 (continue_one_thread): s/suspend_count/suspended/. Only call
15972 ResumeThread once. Warn if that fails.
15974 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15976 * win32-low.c (win32_wait): Don't read from the inferior when it
15977 has already exited.
15979 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15981 * Makefile.in (win32_low_h): New variable.
15982 (win32-low.o): Add dependency on $(win32_low_h).
15983 (win32-arm-low.o, win32-i386-low.o): New rules.
15985 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15987 * hostio.c: Correct copyright year.
15989 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15991 * Makefile.in (OBS): Add hostio.o.
15992 (hostio.o): New rule.
15993 * server.h (handle_vFile): Declare.
15994 * hostio.c: New file.
15995 * server.c (handle_v_requests): Take packet_len and new_packet_len
15996 for binary packets. Call handle_vFile.
15997 (main): Update call to handle_v_requests.
15999 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
16001 * linux-low.c: Include <sched.h>.
16003 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
16005 * linux-low.c (linux_tracefork_grandchild): New.
16006 (linux_tracefork_child): Use clone.
16007 (linux_test_for_tracefork): Use clone; allocate and free a stack.
16009 2007-10-31 Joel Brobecker <brobecker@adacore.com>
16011 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
16013 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
16015 * linux-low.c (handle_extended_wait): Handle unexpected signals.
16017 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
16019 * inferiors.c (change_inferior_id): Delete.
16020 (add_pid_to_list, pull_pid_from_list): New.
16021 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
16022 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
16023 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
16024 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
16025 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
16026 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
16027 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
16028 (using_threads): Always set to 1.
16029 (handle_extended_wait): New.
16030 (add_process): Do not set TID.
16031 (linux_create_inferior): Set must_set_ptrace_flags.
16032 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
16033 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
16034 (linux_thread_alive): Rename TID argument to LWPID.
16035 (linux_wait_for_process): Handle unknown processes. Do not use TID.
16036 (linux_wait_for_event): Do not use TID or check using_threads. Update
16037 call to dead_thread_notify. Call handle_extended_wait.
16038 (linux_create_inferior): Use PTRACE_SETOPTIONS.
16039 (send_sigstop): Delete sigstop_sent.
16040 (wait_for_sigstop): Avoid TID.
16041 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
16042 (linux_test_for_tracefork): New.
16043 (linux_lookup_signals): Use thread_db_active and
16044 linux_supports_tracefork_flag.
16045 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
16046 * linux-low.h (get_process_thread): Avoid TID.
16047 (struct process_ifo): Move thread_known and tid to the end. Remove
16049 (linux_attach_lwp, thread_db_init): Update prototypes.
16050 * server.h (change_inferior_id): Delete prototype.
16051 (add_pid_to_list, pull_pid_from_list): New prototypes.
16052 * thread-db.c (thread_db_use_events): New.
16053 (find_first_thread): Rename to...
16054 (find_one_thread): ...this. Update callers and messages. Do not
16055 call fatal. Check thread_db_use_events. Do not call
16056 change_inferior_id or new_thread_notify.
16057 (maybe_attach_thread): Update. Do not call new_thread_notify.
16058 (thread_db_init): Set thread_db_use_events. Check use_events.
16059 * utils.c (fatal, warning): Correct message prefix.
16061 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
16063 * Makefile.in (clean): Remove new files.
16064 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
16065 (powerpc-64.o, powerpc-64.c): New rules.
16066 * configure.srv: Use alternate register sets for powerpc64-*-linux*
16067 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
16069 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
16071 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
16072 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
16073 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
16074 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
16075 (target_regsets): Add AltiVec and SPE register sets.
16076 * configure.ac: Check for AltiVec and SPE.
16077 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
16078 (ppc_fill_vrregset, ppc_store_vrregset): New.
16079 (target_regsets): Add AltiVec register set.
16080 * configure: Regenerated.
16082 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
16084 * linux-low.c (O_LARGEFILE): Define.
16085 (linux_read_memory): Use /proc/PID/mem.
16086 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
16087 * configure, config.in: Regenerated.
16089 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
16091 * linux-low.c (linux_wait_for_event): Do not pass signals while
16094 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16096 * win32-low.c (create_process): New.
16097 (win32_create_inferior): Use create_process instead of
16098 CreateProcess. If create_process failed retry appending an ".exe"
16099 suffix. Store the GetLastError result immediatelly after
16100 create_process calls and use it on the call to error.
16102 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
16104 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
16106 2007-08-23 Joel Brobecker <brobecker@adacore.com>
16108 * configure.ac: Switch license to GPLv3.
16110 2007-08-01 Michael Snyder <msnyder@access-company.com>
16112 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
16114 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
16116 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
16118 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
16119 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
16120 CloseToolhelp32Snapshot.
16121 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
16122 CloseToolhelp32Snapshot.
16124 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
16126 * server.c (main): Check for inferior exit before main loop.
16128 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
16130 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
16131 instead of on tmp_desc.
16133 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
16134 Daniel Jacobowitz <dan@codesourcery.com>
16136 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
16137 (add_thread): Minor cleanups.
16138 (clear_inferiors): Move lower in the file. Clear the DLL
16140 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
16141 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
16142 (xml_escape_text): New.
16143 * server.c (handle_query): Handle qXfer:libraries:read. Report it
16145 (handle_v_cont): Report errors.
16146 (gdbserver_version): Update.
16147 (main): Correct size of own_buf. Do not report initial DLL events.
16148 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
16149 (unloaded_dll, xml_escape_text): New.
16150 * win32-low.c (enum target_waitkind): Update comments.
16151 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
16152 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
16153 (win32_EnumProcessModules, win32_GetModuleInformation)
16154 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
16155 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
16156 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
16157 (win32_Module32First, win32_Module32Next, load_toolhelp)
16158 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
16159 (get_child_debug_event): Handle DLL events.
16160 (win32_wait): Likewise.
16162 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16164 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
16165 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
16167 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16169 * win32-low.c (handle_output_debug_string): Ignore event if not
16172 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
16174 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
16176 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
16178 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
16180 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
16182 * inferiors.c (change_inferior_id): Add comment.
16183 * linux-low.c (check_removed_breakpoint): Add an early
16184 prototype. Improve debug output.
16185 (linux_attach): Doc update.
16186 (linux_detach_one_process, linux_detach): Clean up before releasing
16188 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
16189 * linux-low.h (struct process_info): Doc improvement.
16190 * mem-break.c (delete_all_breakpoints): New.
16191 * mem-break.h (delete_all_breakpoints): New prototype.
16192 * thread-db.c (find_first_thread): New.
16193 (thread_db_create_event): Call it instead of
16194 thread_db_find_new_threads. Clean up unused variables.
16195 (maybe_attach_thread): Remove first thread handling.
16196 (thread_db_find_new_threads): Use find_first_thread.
16197 (thread_db_get_tls_address): Likewise.
16199 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
16201 * thread-db.c (thread_db_find_new_threads): Add prototype.
16202 (thread_db_create_event): Check for the main thread before adding
16204 (maybe_attach_thread): Only enable event reporting if TID == 0.
16205 (thread_db_get_tls_address): Check for new threads.
16207 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
16209 * linux-low.c (linux_create_inferior): Try execv before execvp.
16210 * spu-low.c (spu_create_inferior): Likewise.
16212 2007-06-13 Mike Frysinger <vapier@gentoo.org>
16214 * linux-low.c (linux_create_inferior): Change execv to execvp.
16215 * spu-low.c (spu_create_inferior): Likewies.
16217 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
16219 * Makefile.in (clean): Clean new files instead of deleted ones.
16220 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
16221 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
16223 * configure.srv: Specify XML files and new regformats for MIPS and
16225 * linux-mips-low.c (mips_num_regs): Set to only used registers.
16226 (mips_regmap): Do not fetch $0. Remove unused registers. Add
16227 an entry for the restart register.
16228 (mips_cannot_fetch_register, mips_cannot_store_register)
16229 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
16230 register names to match the XML descriptions.
16231 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
16232 restart register instead of $0.
16234 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16235 Markus Deuling <deuling@de.ibm.com>
16237 * remote-utils.c (decode_xfer_write): New function.
16238 * server.h (decode_xfer_write): Add prototype.
16239 * server.c (handle_query): Add PACKET_LEN argument. Support
16240 qXfer:spu:read and qXfer:spu:write packets.
16241 (main): Pass packet_len to handle_query.
16242 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
16243 * target.h (target_ops): Add qxfer_spu.
16245 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
16247 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
16248 accessing non-seekable spufs files.
16250 2007-05-16 Markus Deuling <deuling@de.ibm.com>
16252 * server.c (handle_query): Add reply for qC packet.
16254 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16255 Leo Zayas <lerele@champenstudios@com>
16257 * server.h (check_remote_input_interrupt_request): New function.
16258 * remote_utils.c (INVALID_DESCRIPTOR): New define.
16259 (remote_desc): Initialize with INVALID_DESCRIPTOR.
16260 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
16261 (check_remote_input_interrupt_request): New function.
16262 * server.h (check_remote_input_interrupt_request): Declare.
16263 * win32-low.c (winapi_DebugBreakProcess,
16264 winapi_GenerateConsoleCtrlEvent): New typedefs.
16265 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
16267 (win32_wait): Check for remote interrupt request
16268 with check_remote_input_interrupt_request.
16269 (win32_request_interrupt): New function.
16270 (win32_target_op): Set request_interrupt to win32_request_interrupt.
16272 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16274 * win32-low.c (debug_registers_changed,
16275 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
16276 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
16277 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
16278 (thread_rec): Get context using the low target.
16279 (child_add_thread): Call thread_added on the low target,
16280 which does the same thing.
16282 (do_initial_child_stuff): Remove debug registers references.
16283 Set context using the low target. Resume threads after
16284 setting the contexts.
16285 (child_continue): Remove dead variable. Remove debug
16286 registers references.
16287 (child_fetch_inferior_registers): Go through the low target.
16288 (do_child_store_inferior_registers): Remove.
16289 (child_store_inferior_registers): Go through the low target.
16290 (win32_resume): Remove debug registers references.
16291 Set context using the low target.
16292 (handle_exception): Change return type to void. Don't record
16293 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
16294 first chance exception.
16295 (get_child_debug_event): Change return type to void. Remove
16296 goto loop. Always return after waiting for debug event.
16297 (win32_wait): Convert to switch statement. Handle spurious
16300 * win32-i386-low.c (debug_registers_changed,
16301 debug_registers_used): New.
16302 (initial_stuff): Rename to ...
16303 (i386_initial_stuff): ... this. Clear debug registers
16305 (store_debug_registers): Delete.
16306 (i386_get_thread_context): New.
16307 (load_debug_registers): Delete.
16308 (i386_set_thread_context): New.
16309 (i386_thread_added): New.
16310 (single_step): Rename to ...
16311 (i386_single_step): ... this.
16312 (do_fetch_inferior_registers): Rename to ...
16313 (i386_fetch_inferior_register): ... this.
16314 (i386_store_inferior_register): New.
16315 (the_low_target): Adapt to new interface.
16317 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
16318 (arm_get_thread_context): New.
16319 (arm_set_thread_context): New.
16321 (do_fetch_inferior_registers): Rename to ...
16322 (arm_fetch_inferior_register): ... this.
16323 (arm_store_inferior_register): New.
16324 (arm_wince_breakpoint): Reimplement as unsigned long.
16325 (arm_wince_breakpoint_len): Define.
16326 (the_low_target): Adapt to new interface.
16328 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
16329 load_debug_registers. Add get_thread_context, set_thread_context,
16330 thread_added and store_inferior_register. Rename
16331 fetch_inferior_registers to fetch_inferior_register.
16332 (regptr): Remove declaration.
16334 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16336 * linux-low.c (linux_detach): Change return type to int. Return 0.
16337 * spu-low.c (spu_detach): Likewise.
16339 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16341 * target.h (target_ops): Change return type of detach to int.
16343 (join_inferior): New.
16344 * server.c (main): Don't skip detach support on mingw32.
16345 If the inferior doesn't support detaching return error.
16346 Call join_inferior instead of using waitpid.
16347 * linux-low.c (linux_join): New.
16348 (linux_target_op): Add linux_join.
16349 * spu-low.c (spu_join): New.
16350 (spu_target_ops): Add spu_join.
16351 * win32-low.c (win32_detach): Adapt to new interface.
16352 Reopen current_process_handle before detaching. Issue a child
16353 resume before detaching.
16355 (win32_target_op): Add win32_join.
16357 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16359 * win32-low.c (win32-attach): Fix return value.
16360 * target.h (target_ops): Describe ATTACH return values.
16362 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16364 * win32-low.c (GETPROCADDRESS): Define.
16365 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16366 (winapi_DebugSetProcessKillOnExit): Likewise.
16367 (win32_create_inferior): Force usage of ansi CreateProcessA.
16368 (win32_attach): Use GETPROCADDRESS.
16369 (win32_detach): Likewise.
16371 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16373 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16375 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16377 * win32-low.c: Commit leftover changes from 2007-03-29.
16379 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16381 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16382 fields short instead of int. Add explicit padding.
16383 (i387_cache_to_fsave): Remove unnecessary casts.
16384 (i387_fsave_to_cache): Doc fix.
16385 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16387 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16389 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16390 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16392 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16394 * configure.srv (arm*-*-mingw32ce*): Move near the other
16397 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16399 * configure.ac: Add errno checking.
16400 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16401 sys/file.h and malloc.h.
16402 (AC_CHECK_DECLS): Add perror.
16403 (srv_mingwce): Handle.
16404 * configure.srv (i[34567]86-*-cygwin*): Add
16405 win32-i386-low.o to srv_tgtobj.
16406 (i[34567]86-*-mingw*): Likewise.
16407 (arm*-*-mingw32ce*): Add case.
16408 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16409 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16410 [__MINGW32CE__] (strerror): New function.
16411 [__MINGW32CE__] (errno): Define to GetLastError.
16412 [__MINGW32CE__] (COUNTOF): New macro.
16413 (remote_open): Remove extra close call.
16414 * mem-break.c (delete_breakpoint_at): New function.
16415 * mem-break.h (delete_breakpoint_at): Declare.
16416 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16417 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16418 [USE_WIN32API] (read, write): Add char* casts.
16419 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16420 * server.h: Include wincecompat.h on Windows CE.
16421 [HAVE_ERRNO_H]: Check.
16422 (perror): Declare if not declared.
16423 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16424 (perror_with_name): Remove errno declaration.
16425 * wincecompat.h: New.
16426 * wincecompat.c: New.
16427 * win32-low.h: New.
16428 * win32-arm-low.c: New.
16429 * win32-i386-low.c: New.
16430 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16431 (OUTMSG2): Make it safe.
16433 (COUNTOF): New macro.
16434 (NUM_REGS): Get it from the low target.
16435 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16436 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16437 (thread_rec): Let low target handle debug registers.
16438 (child_add_thread): Likewise.
16439 (child_init_thread_list): Likewise.
16440 (continue_one_thread): Likewise.
16442 (do_child_fetch_inferior_registers): Move to ...
16443 * win32-i386-low.c: ... here, and rename to ...
16444 (do_fetch_inferior_registers): ... this.
16445 * win32-low.c (child_fetch_inferior_registers):
16446 Go through the low target.
16447 (do_child_store_inferior_registers): Use regptr.
16448 (strwinerror): New function.
16449 (win32_create_inferior): Handle Windows CE.
16450 Use strwinerror instead of strerror on Windows error
16451 codes. Add program to the error output.
16452 Don't close the main thread handle on Windows CE.
16453 (win32_attach): Use coredll.dll on Windows CE.
16454 (win32_kill): Close current process and current
16456 (win32_detach): Use coredll.dll on Windows CE.
16457 (win32_resume): Let low target handle debug registers, and
16459 (handle_exception): Add/Remove initial breakpoint. Avoid
16460 non-existant WSTOPSIG on Windows CE.
16461 (win32_read_inferior_memory): Cast to remove warning.
16462 (win32_arch_string): Go through the low target.
16463 (initialize_low): Call set_breakpoint_data with the low
16464 target's breakpoint.
16465 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16466 FOP_REGNUM, mappings): Move to ...
16467 * win32-i386-low.c: ... here.
16468 * win32-low.c (win32_thread_info): Move to ...
16469 * win32-low.h: ... here.
16470 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16471 win32-arm-low.c and wincecompat.c.
16472 (all:): Add $EXEEXT.
16473 (install-only:): Likewise.
16474 (gdbserver:): Likewise.
16475 (gdbreplay:): Likewise.
16476 * config.in: Regenerate.
16477 * configure: Regenerate.
16479 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16481 * win32-low.c: Rename typedef thread_info to
16482 win32_thread_info throughout.
16484 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16486 * win32-i386-low.c: Rename to ...
16487 * win32-low.c: ... this.
16488 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16489 * Makefile.in: Likewise.
16491 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16493 * remote-utils.c (monitor_output): Constify msg parameter.
16494 * server.h (monitor_output): Likewise.
16495 * win32-i386-low.c (handle_output_debug_string): New.
16496 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16497 handle_output_debug_string.
16498 (get_child_debug_event): Likewise.
16500 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16502 * server.c (main): Correct strtoul check.
16504 2007-03-27 Jon Ringle <jon@ringle.org>
16506 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16508 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16510 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16512 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16514 * terminal.h: Check HAVE_SGTTY_H.
16516 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16518 * remote-utils.c (remote_open): Print out the assigned port number.
16520 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16522 * remote-utils.c (monitor_output): New function.
16523 * server.c (debug_threads): Define here.
16524 (monitor_show_help): New function.
16525 (handle_query): Handle qRcmd.
16526 (main): Do not handle 'd' packet.
16527 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16528 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16531 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16533 * Makefile.in (EXEEXT): New.
16534 (clean): Use $(EXEEXT).
16536 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16538 * target.h (target_ops): Rename send_signal to request_interrupt,
16539 and remove enum target_signal parameter.
16540 * linux-low.c (linux_request_interrupt): Rename from
16541 linux_send_signal, and always send SIGINT.
16542 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16543 and always send SIGINT.
16544 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16546 (input_interrupt): Likewise.
16548 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16550 * server.c (get_features_xml): Check if target implemented
16552 * win32-i386-low.c (win32_arch_string): New.
16553 (win32_target_ops): Add win32_arch_string as arch_string member.
16555 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16557 * spu-low.c (spu_arch_string): New.
16558 (spu_target_ops): Add spu_arch_string.
16560 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16562 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16563 * configure.ac: Do not check for terminal.h.
16564 * configure, config.in: Regenerated.
16566 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16568 * Makefile.in (OBS): Add $(XML_BUILTIN).
16569 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16571 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16572 (arm-with-iwmmxt.c): New.
16573 * config.in, configure: Regenerate.
16574 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16575 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16576 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16577 (arm*-*-linux*): Add iWMMXt and regset support.
16578 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16579 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16580 (arm_store_wmmxregset, target_regsets): New.
16581 * server.c (get_features_xml): Take annex argument. Check builtin
16583 (handle_query): Handle multiple annexes.
16585 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16587 * remote-utils.c [USE_WIN32API] (read, write): Define.
16588 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16591 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16593 * linux-i386-low.c (the_low_target): Set arch_string.
16594 * linux-x86-64-low.c (the_low_target): Likewise.
16595 * linux-low.c (linux_arch_string): New.
16596 (linux_target_ops): Add it.
16597 * linux-low.h (struct linux_target_ops): Add arch_string.
16598 * server.c (write_qxfer_response): Use const void * for DATA.
16599 (get_features_xml): New.
16600 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16601 * target.h (struct target_ops): Add arch_string method.
16603 2007-01-03 Denis Pilat <denis.pilat@st.com>
16604 Daniel Jacobowitz <dan@codesourcery.com>
16606 * linux-low.c (linux_kill): Handle being called with no threads.
16607 * win32-i386-low.c (win32_kill): Likewise.
16608 (get_child_debug_event): Clear current_process_handle.
16610 2006-12-30 Denis PILAT <denis.pilat@st.com>
16611 Daniel Jacobowitz <dan@codesourcery.com>
16613 * remote-utils.c (remote_open): Check the type of specified
16614 serial port devices before opening them.
16615 * server.c (main): Kill the inferior if an error occurs during
16616 the first remote_open.
16618 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16620 * README: Update supported targets.
16622 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16624 * Makefile.in (clean): Remove reg-mips64.c.
16625 (reg-mips64.c, reg-mips64.o): New rules.
16626 * configure.srv: Handle mips64. Include regset support for mips.
16627 * linux-mips-low.c (union mips_register): New.
16628 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16629 (mips_breakpoint, mips_breakpoint_at): Use int.
16630 (mips_collect_register, mips_supply_register)
16631 (mips_collect_register_32bit, mips_supply_register_32bit)
16632 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16633 (mips_store_fpregset, target_regsets): New.
16634 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16636 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16638 * configure.srv: Add target "spu*-*-*".
16639 * Makefile.in (clean): Remove reg-spu.c.
16640 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16641 * spu-low.c: New file.
16643 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16645 * configure.ac: Correct td_thr_tls_get_addr test.
16646 * configure: Regenerated.
16648 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16650 * linux-low.c (linux_wait_for_event): Reformat. Use the
16651 pass_signals array.
16652 * remote-utils.c (decode_address_to_semicolon): New.
16653 * server.c (pass_signals, handle_general_set): New.
16654 (handle_query): Mention QPassSignals for qSupported.
16655 (main): Call handle_general_set.
16656 * server.h (pass_signals, decode_address_to_semicolon): New.
16658 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16660 * server.c (handle_query): Correct error handling for read_auxv.
16662 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16664 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16665 and srv_linux_thread_db to yes.
16666 * linux-s390-low.c (s390_fill_gregset): New function.
16667 (target_regsets): Define data structure.
16669 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16671 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16672 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16673 * config.in, configure: Regenerated.
16674 * inferiors.c (gdb_id_to_thread): New function.
16675 (gdb_id_to_thread_id): Use it.
16676 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16677 * linux-low.h (struct process_info): Add th member.
16678 (thread_db_get_tls_address): New prototype.
16679 * remote-utils.c (decode_address): Make non-static.
16680 * server.c (handle_query): Handle qGetTLSAddr.
16681 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16682 * target.h (struct target_ops): Add get_tls_address.
16683 * thread-db.c (maybe_attach_thread): Save the thread handle.
16684 (thread_db_get_tls_address): New.
16686 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16688 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16689 (linux_resume_one_process): Take a siginfo_t *. Update all
16690 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16691 (struct pending_signals): Add a siginfo_t.
16692 (linux_wait_for_process): Always set last_status.
16693 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16694 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16695 * linux-low.h (struct process_info): Add last_status.
16697 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16699 * remote-utils.c (try_rle): New function.
16700 (putpkt_binary): Use it.
16702 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16704 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16705 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16706 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16707 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16708 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16711 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16713 * server.c (terminal_fd): New variable.
16714 (old_foreground_pgrp): Likewise.
16715 (restore_old_foreground_pgrp): New function.
16716 (start_inferior): Record the terminal file descriptor in terminal_fd
16717 and its original foreground group in old_foreground_pgrp. Register
16718 restore_old_foreground_pgrp with atexit().
16720 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16722 * server.c (handle_query): Correct qPart to qXfer.
16724 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16726 * configure.ac: Check for more headers which are missing on
16727 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16728 * configure.srv: Add Cygwin and mingw32.
16729 * remote-utils.c: Don't include headers unconditionally which
16730 are missing on mingw32. Include <winsock.h> for mingw32.
16731 (remote_open): Adjust for mingw32 support. Flush
16732 standard error after writing to it.
16733 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16734 (unblock_async_io, enable_async_io, disable_async_io)
16735 (readchar, getpkt): Update for Winsock support.
16736 (prepare_resume_reply): Expect a protocol signal number.
16737 * server.c: Disable <sys/wait.h> on mingw32.
16738 (start_inferior): Adjust for mingw32 support. Flush
16739 standard error after writing to it.
16740 (attach_inferior): Likewise. Use protocol signal
16742 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16744 * win32-i386-low.c: New file.
16745 * Makefile.in (XM_CLIBS): Set.
16746 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16747 (win32-i386-low.o): New dependency rule.
16748 * linux-low.c (linux_wait): Use target signal numbers.
16749 * target.h (struct target_ops): Doc fix.
16750 * server.h (target_signal_to_name): New prototype.
16751 * gdbreplay.c: Don't include headers unconditionally which
16752 are missing on mingw32. Include <winsock.h> for mingw32.
16753 (remote_close, remote_open): Adjust for Winsock support.
16754 * configure, config.in: Regenerated.
16756 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16758 * server.c (decode_xfer_read, write_qxfer_response): New.
16759 (handle_query): Take a packet length argument. Handle
16760 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16761 the qSupported response.
16762 (main): Update call to handle_query.
16764 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16766 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16767 (putpkt_binary): Renamed from putpkt and adjusted for binary
16769 (putpkt): New wrapper for putpkt_binary.
16770 (readchar): Don't mask off the high bit.
16771 (decode_X_packet): New function.
16772 * server.c (main): Call putpkt_binary if a handler sets the packet
16773 length. Save the length of the incoming packet. Handle 'X'.
16774 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16776 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16778 * server.c (handle_query): Handle qSupported.
16780 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16782 * remote-utils.c (all_symbols_looked_up): New variable.
16783 (look_up_one_symbol): Check it.
16784 * server.h (look_up_one_symbol): New declaration.
16785 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16787 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16789 * Makefile.in (linux-arm-low.o): Update dependencies.
16790 * linux-arm-low.c: Include "gdb_proc_service.h".
16791 (PTRACE_GET_THREAD_AREA): Define.
16792 (ps_get_thread_area): New function.
16794 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16796 * configure.srv (m68k*-*-uclinux*): New target.
16797 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16798 (linux_resume_one_process): Remove extraneous cast.
16799 (linux_read_offsets): New.
16800 (linux_target_op): Add linux_read_offsets on mmuless systems.
16801 * server.c (handle_query): Add qOffsets logic.
16802 * target.h (struct target_ops): Add read_offsets.
16804 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16806 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16807 (PTRACE_GET_THREAD_AREA): Define.
16808 (ps_get_thread_area): New function.
16809 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16810 (linux-x86-64-low.o): Update.
16812 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16814 * configure.ac: Remove checks for prfpregset_t.
16815 * gdb_proc_service.h: New file.
16816 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16817 new "gdb_proc_service.h".
16818 * proc-service.c: Likewise.
16819 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16820 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16821 * Makefile.in (gdb_proc_service_h): Updated.
16822 * configure, config.in: Regenerated.
16824 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16826 * remote-utils.c (prepare_resume_reply): Move declaration
16827 of gdb_id_from_wait to the top of the block.
16829 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16831 * linux-low.c (regsets_store_inferior_registers): Read the regset
16832 from the target before filling it.
16834 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16836 * server.c (attach_inferior): Return SIGTRAP for a successful
16839 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16841 * Makefile.in (OBS): Add version.o.
16842 (STAGESTUFF): Delete.
16843 (version.o): Add dependencies.
16844 (version.c): Replace rule.
16845 (clean): Remove version.c.
16846 * server.c (gdbserver_version): New.
16847 (gdbserver_usage): Use printf.
16848 (main): Handle --version and --help.
16849 * server.h (version, host_name): Add declarations.
16851 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16863 * linux-x86-64-low.c:
16865 * linux-s390-low.c:
16866 * linux-ppc64-low.c:
16868 * linux-mips-low.c:
16869 * linux-m68k-low.c:
16870 * linux-m32r-low.c:
16873 * linux-ia64-low.c:
16874 * linux-i386-low.c:
16875 * linux-crisv32-low.c:
16887 * gdbserver.1: Add (C) after Copyright. Update the FSF
16890 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16892 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16893 (arm_breakpoint_at): Recognize both breakpoints.
16894 (the_low_target): Use the correct breakpoint instruction.
16896 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16898 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16899 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16900 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16901 (the_low_target): Update.
16903 2005-10-25 Andreas Schwab <schwab@suse.de>
16905 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16907 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16908 (ia64_num_regs): Reduce to 462.
16910 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16912 * acinclude.m4: Correct quoting.
16913 * aclocal.m4: Regenerated.
16915 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16916 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16917 (thread_db_init): Call thread_db_err_str.
16918 * configure.ac: Check for TD_VERSION.
16919 * config.in, configure: Regenerated.
16921 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16923 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16925 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16927 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16928 is not available. Define HAVE_PTRACE_GETREGS if it is.
16929 * config.in, configure: Regenerated.
16930 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16931 * linux-i386-low.c, linux-m68k-low.c: Update to use
16932 HAVE_PTRACE_GETREGS.
16933 * linux-low.c (regsets_fetch_inferior_registers)
16934 (regsets_store_inferior_registers): Only return 0 if we processed
16936 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16937 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16939 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16941 * inferiors.c (struct thread_info): Add gdb_id.
16942 (add_thread): Add gdb_id argument.
16943 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16944 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16945 calls to add_thread.
16946 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16947 * server.c (handle_query): Use thread_to_gdb_id.
16948 (handle_v_cont, main): Use gdb_id_to_thread_id.
16949 * server.h (add_thread): Update prototype.
16950 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16953 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16955 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16956 left-padded registers.
16957 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16958 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16960 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16962 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16963 * configure: Regenerate.
16964 * config.in: Regenerate.
16965 * server.h (NEED_DECLARATION_STRERROR):
16966 Replace with !HAVE_DECL_STRERROR.
16968 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16970 * linux-low.c (linux_wait, linux_send_signal): Don't test
16971 an unsigned long variable for > 0 if it could be MAX_ULONG.
16972 * server.c (myresume): Likewise.
16973 * target.c (set_desired_inferior): Likewise.
16975 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16977 * configure.ac: Simplify and improve check for socklen_t.
16978 * configure, config.in: Regenerate.
16980 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16982 * acconfig.h: Remove.
16983 * configure.ac: Add a test for socklen_t. Use three-argument
16984 AC_DEFINE throughout.
16985 * config.in: Regenerated using autoheader 2.59.
16986 * configure: Regenerated.
16988 * gdbreplay.c (socklen_t): Provide a default.
16989 (remote_open): Use socklen_t.
16990 * remote-utils.c (socklen_t): Provide a default.
16991 (remote_open): Use socklen_t.
16992 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16995 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16997 * linux-low.c (linux_read_memory, linux_write_memory)
16998 (linux_read_auxv): Likewise.
16999 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
17000 (check_mem_write): Likewise.
17001 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
17003 * regcache.c (struct inferior_rgcache_data, registers_to_string)
17004 (registers_from_string, register_data): Likewise.
17005 * server.c (handle_query, main): Likewise.
17006 * server.h (convert_ascii_to_int, convert_int_to_ascii)
17007 (decode_M_packet): Likewise.
17008 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
17009 * target.h (struct target_ops): Update read_memory, write_memory,
17011 (read_inferior_memory, write_inferior_memory): Update.
17012 * linux-low.h (struct linux_target_ops): Change type of breakpoint
17013 to unsigned char *.
17014 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
17015 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
17016 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
17017 linux-s390-low.c, linux-sh-low.c: Update for changes in
17018 read_inferior_memory and the_low_target->breakpoint.
17020 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
17022 * Makefile.in (SFILES): Add linux-ppc64-low.c.
17023 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
17024 * configure.srv: Add powerpc64-*-linux*.
17025 * linux-ppc64-low.c: New file.
17027 2005-05-23 Orjan Friberg <orjanf@axis.com>
17029 * linux-cris-low.c: New file with support for CRIS.
17030 * linux-crisv32-low.c: Ditto for CRISv32.
17031 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
17032 (clean): Add reg-cris.c and reg-crisv32.c.
17033 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
17034 reg-crisv32.o, and reg-crisv32.c to make rules.
17035 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
17036 recognized targets.
17038 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
17040 * linux-low.c (fetch_register): Ensure buffer size is a multiple
17041 of sizeof (PTRACE_XFER_TYPE).
17042 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
17044 2005-05-12 Orjan Friberg <orjanf@axis.com>
17046 * target.h (struct target_ops): Add insert_watchpoint,
17047 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
17048 pointers for hardware watchpoint support.
17049 * linux-low.h (struct linux_target_ops): Ditto.
17050 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
17051 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
17052 to linux_target_ops.
17053 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
17055 * server.c (main): Recognize 'Z' and 'z' packets.
17057 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
17059 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
17060 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
17061 (the_low_target): Add new members.
17063 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17065 * proc-service.c (ps_lgetregs): Search all_processes instead of
17068 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
17070 * server.c (start_inferior): Change return type to int.
17071 (attach_inferior): Change sigptr to int *.
17072 (handle_v_cont, handle_v_requests): Change signal to int *.
17073 (main): Change signal to int.
17075 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
17077 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
17078 * configure.srv: Add m32r*-*-linux*.
17079 * linux-m32r-low.c: New file.
17081 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
17083 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
17085 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
17087 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
17088 Take unsigned long arguments for PIDs.
17089 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
17090 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
17091 (wait_for_sigstop, linux_resume_one_process)
17092 (regsets_fetch_inferior_registers, linux_send_signal)
17093 (linux_read_auxv): Likewise. Update the types of variables holding
17094 PIDs. Update format string specifiers.
17095 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
17096 * remote-utils.c (prepare_resume_reply): Likewise.
17097 * server.c (cont_thread, general_thread, step_thread)
17098 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
17100 (handle_query): Update format specifiers.
17101 (handle_v_cont, main): Use strtoul for thread IDs.
17102 * server.h (struct inferior_list_entry): Use unsigned long for ID.
17103 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
17104 (general_thread, step_thread, thread_from_wait)
17105 (old_thread_from_wait): Update.
17106 * target.h (struct thread_resume): Use unsigned long for THREAD.
17107 (struct target_ops): Use unsigned long for arguments to attach and
17110 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
17112 * acinclude.m4: Include bfd/bfd.m4 directly.
17113 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
17114 <agriffis@toolchain.org>.
17115 * aclocal.m4, configure: Regenerated.
17117 2005-01-07 Andrew Cagney <cagney@gnu.org>
17119 * configure.ac: Rename configure.in, require autoconf 2.59.
17120 * configure: Re-generate.
17122 2004-12-08 Daniel Jacobowitz <dan@debian.org>
17124 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
17125 LIBS when finished.
17126 * aclocal.m4: Regenerated.
17127 * configure: Regenerated.
17129 2004-11-21 Andreas Schwab <schwab@suse.de>
17131 * linux-m68k-low.c (m68k_num_gregs): Define.
17132 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
17133 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
17134 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
17135 (m68k_breakpoint_at): New. Add to the_low_target.
17137 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
17138 srv_linux_thread_db to yes.
17140 2004-10-20 Joel Brobecker <brobecker@gnat.com>
17142 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
17143 (ARCH_SET_FS): Likewise.
17144 (ARCH_GET_FS): Likewise.
17145 (ARCH_GET_GS): Likewise.
17147 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17149 * linux-i386-low.c (ps_get_thread_area): New.
17150 * linux-x86-64-low.c (ps_get_thread_area): New.
17151 * linux-low.c: Include <sys/syscall.h>.
17152 (linux_kill_one_process): Don't kill the first thread here.
17153 (linux_kill): Kill the first thread here.
17154 (kill_lwp): New function.
17155 (send_sigstop, linux_send_signal): Use it.
17156 * proc-service.c: Clean up #ifdefs.
17157 (fpregset_info): Delete.
17158 (ps_lgetregs): Update and enable implementation.
17159 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
17161 * remote-utils.c (struct sym_cache, symbol_cache): New.
17162 (input_interrupt): Print a clearer message.
17163 (async_io_enabled): New variable.
17164 (enable_async_io, disable_async_io): Use it. Update comments.
17165 (look_up_one_symbol): Use the symbol cache.
17166 * thread-db.c (thread_db_look_up_symbols): New function.
17167 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
17169 2004-10-16 Daniel Jacobowitz <dan@debian.org>
17171 * configure.in: Test for -rdynamic.
17172 * configure: Regenerated.
17173 * Makefile (INTERNAL_LDFLAGS): New.
17174 (gdbserver, gdbreplay): Use it.
17176 2004-09-02 Andrew Cagney <cagney@gnu.org>
17178 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
17180 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
17182 * linux-low.c (linux_wait): Clear all_processes list also.
17184 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17186 * linux-low.c: Include <errno.h>. Remove extern declaration of
17189 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
17191 * gdbreplay.c, server.h, utils.c: Update copyright years.
17193 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17195 * server.c (main): Print child status or termination signal from
17196 variable 'signal', not 'sig'.
17198 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
17200 * linux-low.c (linux_read_memory): Change return type to
17201 int. Check for and return error from ptrace().
17202 * target.c (read_inferior_memory): Change return type to int. Pass
17203 back return status from the_target->read_memory().
17204 * target.h (struct target_ops): Adapt *read_memory() prototype.
17206 (read_inferior_memory): Adapt prototype.
17207 * server.c (main): Return an error packet if
17208 read_inferior_memory() returns an error.
17210 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
17212 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
17213 Unify with other clean targets.
17215 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17217 * server.c (handle_v_cont): Call set_desired_inferior.
17219 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17221 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
17223 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17225 * linux-low.c (linux_wait): Unblock async I/O.
17226 (linux_resume): Block and enable async I/O.
17227 * remote-utils.c (block_async_io, unblock_async_io): New functions.
17228 * server.h (block_async_io, unblock_async_io): Add prototypes.
17230 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17232 * remote-utils.c (remote_open): Print a status notice after
17233 opening a TCP port.
17234 * server.c (attach_inferior): Print a status notice after
17237 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
17239 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
17241 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
17243 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
17245 * server.c, target.h: Update copyright years.
17247 2004-02-25 Roland McGrath <roland@redhat.com>
17249 * target.h (struct target_ops): New member `read_auxv'.
17250 * server.c (handle_query): Handle qPart:auxv:read: query using that.
17251 * linux-low.c (linux_read_auxv): New function.
17252 (linux_target_ops): Initialize `read_auxv' member to that.
17254 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
17256 Committed by Jim Blandy <jimb@redhat.com>.
17258 * linux-s390-low.c (s390_num_regs): Update.
17259 (s390_regmap): Remove control registers. Use __s390x__ predefine
17260 instead of GPR_SIZE to distiguish s390 and s390x targets.
17262 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
17264 * linux-low.c: Update copyright year.
17265 (check_removed_breakpoint): Clear pending_is_breakpoint.
17266 (linux_set_resume_request, linux_queue_one_thread)
17267 (resume_status_pending_p): New functions.
17268 (linux_continue_one_thread): Use process->resume.
17269 (linux_resume): Only resume threads if there are no pending events.
17270 * linux-low.h (struct process_info): Add resume request
17273 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
17275 * regcache.c (new_register_cache): Clear the allocated register
17276 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
17278 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
17280 * linux-low.c (linux_resume): Take a struct thread_resume *
17282 (linux_wait): Update call.
17283 (resume_ptr): New static variable.
17284 (linux_continue_one_thread): Renamed from
17285 linux_continue_one_process. Use resume_ptr.
17286 (linux_resume): Use linux_continue_one_thread.
17287 * server.c (handle_v_cont, handle_v_requests): New functions.
17288 (myresume): New function.
17289 (main): Handle 'v' case.
17290 * target.h (struct thread_resume): New type.
17291 (struct target_ops): Change argument of "resume" to struct
17293 (myresume): Delete macro.
17295 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
17297 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
17298 (uninstall): Support DESTDIR.
17300 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
17302 * configure.srv: Add xscale*linux copy of arm*linux entry.
17304 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
17306 * linux-arm-low.c (arm_reinsert_addr): New function.
17307 (the_low_target): Add arm_reinsert_addr.
17309 2003-07-08 Mark Kettenis <kettenis@gnu.org>
17311 * mem-break.c: Remove whitespace at end of file.
17313 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17315 * configure.in: Check whether we need to prototype strerror.
17316 * server.h: Optionally prototype strerror.
17317 * gdbreplay.c (perror_with_name): Use strerror.
17318 * linux-low.c (linux_attach_lwp): Use strerror.
17319 * utils.c (perror_with_name): Use strerror.
17320 * config.in, configure: Regenerated.
17322 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
17324 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
17325 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
17327 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
17329 * Makefile.in (SFILES): Update.
17330 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
17331 low-sun3.c: Remove files.
17333 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
17335 * linux-low.c: Move comment to linux_thread_alive where it belonged.
17336 (linux_detach_one_process, linux_detach): New functions.
17337 (linux_target_ops): Add linux_detach.
17338 * server.c (main): Handle 'D' packet.
17339 * target.h (struct target_ops): Add "detach" member.
17340 (detach_inferior): Define.
17342 2003-06-13 Mark Kettenis <kettenis@gnu.org>
17344 From Kelley Cook <kelleycook@wideopenwest.com>:
17345 * configure.srv: Accept i[34567]86 variants.
17347 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
17349 * linux-low.c (linux_wait_for_event): Correct comment typos.
17350 (linux_resume_one_process): Call check_removed_breakpoint.
17351 (linux_send_signal): New function.
17352 (linux_target_ops): Add linux_send_signal.
17353 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
17355 * target.h (struct target_ops): Add send_signal.
17357 2003-05-29 Jim Blandy <jimb@redhat.com>
17359 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17360 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17361 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17362 away part of the register's value.
17364 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17366 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17367 (linux_wait_for_event, linux_init_signals): Likewise.
17369 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17371 * configure.in: Check for stdlib.h.
17372 * configure: Regenerated.
17373 * config.in: Regenerated.
17375 2003-01-04 Andreas Schwab <schwab@suse.de>
17377 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17379 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17381 * Makefile.in: Remove obsolete code.
17383 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17385 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17386 defined(PT_FPR0_HI).
17388 2002-11-17 Stuart Hughes <seh@zee2.com>
17390 * linux-arm-low.c (arm_num_regs): Increase.
17391 (arm_regmap): Include status register.
17393 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17395 * linux-low.c (register_addr): Remove incorrect -1 check.
17397 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17399 * linux-low.c (linux_create_inferior): Call setpgid. Return
17401 (unstopped_p, linux_signal_pid): Remove.
17402 (linux_target_ops): Remove linux_signal_pid.
17403 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17404 global instead of target method.
17405 * target.h (struct target_ops): Remove signal_pid. Update comment
17406 for create_inferior.
17407 * server.c (signal_pid): New variable.
17408 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17409 gdbserver. Set the child to be the foreground process group.
17410 (attach_inferior): Set signal_pid.
17412 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17414 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17416 2002-08-20 Jim Blandy <jimb@redhat.com>
17418 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17421 2002-08-01 Andrew Cagney <cagney@redhat.com>
17423 * Makefile.in: Make chill references obsolete.
17425 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17427 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17428 * configure: Regenerate.
17429 * config.in: Regenerate.
17431 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17433 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17434 (perror_with_name, remote_close, remote_open, expect, play): Static.
17436 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17438 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17439 byte offsets instead of an array of indexes.
17440 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17442 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17444 * regcache.c: Add comment.
17446 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17448 * thread-db.c: New file.
17449 * proc-service.c: New file.
17450 * acinclude.m4: New file.
17451 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17452 proc-service.o, and thread-db.o.
17453 (linux-low.o): Add USE_THREAD_DB.
17454 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17455 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17456 * aclocal.m4: Regenerated.
17457 * config.in: Regenerated.
17458 * configure: Regenerated.
17459 * configure.in: Check for proc_service.h, sys/procfs.h,
17460 thread_db.h, and linux/elf.h headrs.
17461 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17462 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17463 Check for -lthread_db and thread support.
17464 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17465 PowerPC, and SuperH.
17466 * i387-fp.c: Constify arguments.
17467 * i387-fp.h: Likewise.
17468 * inferiors.c: (struct thread_info): Renamed from
17469 `struct inferior_info'. Remove PID member. Use generic inferior
17470 list header. All uses updated.
17471 (inferiors, signal_pid): Removed.
17472 (all_threads): New variable.
17473 (get_thread): Define.
17474 (add_inferior_to_list): New function.
17475 (for_each_inferior): New function.
17476 (change_inferior_id): New function.
17477 (add_inferior): Removed.
17478 (remove_inferior): New function.
17479 (add_thread): New function.
17480 (free_one_thread): New function.
17481 (remove_thread): New function.
17482 (clear_inferiors): Use for_each_inferior and free_one_thread.
17483 (find_inferior): New function.
17484 (find_inferior_id): New function.
17485 (inferior_target_data): Update argument type.
17486 (set_inferior_target_data): Likewise.
17487 (inferior_regcache_data): Likewise.
17488 (set_inferior_regcache_data): Likewise.
17489 * linux-low.c (linux_bp_reinsert): Remove.
17490 (all_processes, stopping_threads, using_thrads)
17491 (struct pending_signals, debug_threads, pid_of): New.
17492 (inferior_pid): Replace with macro.
17493 (struct inferior_linux_data): Remove.
17494 (get_stop_pc, add_process): New functions.
17495 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17496 Use add_process and add_thread.
17497 (linux_attach_lwp): New function, based on old linux_attach. Use
17498 add_process and add_thread. Set stop_expected for new threads.
17499 (linux_attach): New function.
17500 (linux_kill_one_process): New function.
17501 (linux_kill): Kill all LWPs.
17502 (linux_thread_alive): Use find_inferior_id.
17503 (check_removed_breakpoints, status_pending_p): New functions.
17504 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17505 Update. Use WNOHANG. Wait for cloned processes also. Update process
17506 struct for the found process.
17507 (linux_wait_for_event): New function.
17508 (linux_wait): Use it. Support LWPs.
17509 (send_sigstop, wait_for_sigstop, stop_all_processes)
17510 (linux_resume_one_process, linux_continue_one_process): New functions.
17511 (linux_resume): Support LWPs.
17512 (REGISTER_RAW_SIZE): Remove.
17513 (fetch_register): Use register_size instead. Call supply_register.
17514 (usr_store_inferior_registers): Likewise. Call collect_register.
17515 Fix recursive case.
17516 (regsets_fetch_inferior_registers): Improve error message.
17517 (regsets_store_inferior_registers): Add debugging.
17518 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17519 (unstopped_p, linux_signal_pid): New functions.
17520 (linux_target_ops): Add linux_signal_pid.
17521 (linux_init_signals): New function.
17522 (initialize_low): Call it. Initialize using_threads.
17523 * regcache.c (inferior_regcache_data): Add valid
17525 (get_regcache): Fetch registers lazily. Add fetch argument
17526 and update all callers.
17527 (regcache_invalidate_one, regcache_invalidate): New
17529 (new_register_cache): Renamed from create_register_cache.
17530 Return the new regcache.
17531 (free_register_cache): Change argument to a void *.
17532 (registers_to_string, registers_from_string): Call get_regcache
17533 with fetch flag set.
17534 (register_data): Make static. Pass fetch flag to get_regcache.
17535 (supply_register): Call get_regcache with fetch flag clear.
17536 (collect_register): Call get_regcache with fetch flag set.
17537 (collect_register_as_string): New function.
17538 * regcache.h: Update.
17539 * remote-utils.c (putpkt): Flush after debug output and use
17541 Handle input interrupts while waiting for an ACK.
17542 (input_interrupt): Use signal_pid method.
17543 (getpkt): Flush after debug output and use stderr.
17544 (outreg): Use collect_register_as_string.
17545 (new_thread_notify, dead_thread_notify): New functions.
17546 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17547 and general_thread.
17548 (look_up_one_symbol): Flush after debug output.
17549 * server.c (step_thread, server_waiting): New variables.
17550 (start_inferior): Don't use signal_pid. Update call to mywait.
17551 (attach_inferior): Update call to mywait.
17552 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17553 (main): Don't fetch/store registers explicitly. Use
17554 set_desired_inferior. Support proposed ``Hs'' packet. Update
17556 * server.h: Update.
17557 (struct inferior_list, struct_inferior_list_entry): New.
17558 * target.c (set_desired_inferior): New.
17559 (write_inferior_memory): Constify.
17560 (mywait): New function.
17561 * target.h: Update.
17562 (struct target_ops): New signal_pid method.
17563 (mywait): Removed macro, added prototype.
17565 * linux-low.h (regset_func): Removed.
17566 (regset_fill_func, regset_store_func): New.
17567 (enum regset_type): New.
17568 (struct regset_info): Add type field. Use new operation types.
17569 (struct linux_target_ops): stop_pc renamed to get_pc.
17570 Add decr_pc_after_break and breakpoint_at.
17571 (get_process, get_thread_proess, get_process_thread)
17572 (strut process_info, all_processes, linux_attach_lwp)
17573 (thread_db_init): New.
17575 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17576 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17577 (the_low_target): Add new members.
17578 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17579 (i386_store_fpxregset): Constify.
17580 (target_regsets): Add new kind identifier.
17581 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17582 (i386_set_pc): Add debugging.
17583 (i386_breakpoint_at): New function.
17584 (the_low_target): Add new members.
17585 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17586 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17587 (mips_breakpoint_at): New.
17588 (the_low_target): Add new members.
17589 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17590 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17591 (the_low_target): Add new members.
17592 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17593 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17594 (the_low_target): Add new members.
17595 * linux-x86-64-low.c (target_regsets): Add new kind
17598 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17600 From Martin Pool <mbp@samba.org>:
17601 * server.c (gdbserver_usage): New function.
17604 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17606 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17607 stop_at -> stop_pc.
17609 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17611 * Makefile.in: Remove obsolete code.
17613 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17615 * linux-low.c (regsets_fetch_inferior_registers),
17616 (regsets_store_inferior_registers): Removed cast to int from
17618 * regcache.h: Added declaration of struct inferior_info.
17620 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17622 * inferiors.c (struct inferior_info): Add regcache_data.
17623 (add_inferior): Call create_register_cache.
17624 (clear_inferiors): Call free_register_cache.
17625 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17626 * regcache.c (struct inferior_regcache_data): New.
17627 (registers): Remove.
17628 (get_regcache): New function.
17629 (create_register_cache, free_register_cache): New functions.
17630 (set_register_cache): Don't initialize the register cache here.
17631 (registers_to_string, registers_from_string, register_data): Call
17633 * regcache.h: Add prototypes.
17634 * server.h: Likewise.
17636 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17638 * mem-break.c: New file.
17639 * mem-break.h: New file.
17640 * Makefile.in: Add mem-break.o rule; update server.h
17642 * inferiors.c (struct inferior_info): Add target_data
17644 (clear_inferiors): Free target_data member if set.
17645 (inferior_target_data, set_inferior_target_data): New functions.
17646 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17647 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17648 * linux-low.c (linux_bp_reinsert): New variable.
17649 (struct inferior_linux_data): New.
17650 (linux_create_inferior): Use set_inferior_target_data.
17651 (linux_attach): Likewise. Call add_inferior.
17652 (linux_wait_for_one_inferior): New function.
17653 (linux_wait): Call it.
17654 (linux_write_memory): Add const.
17655 (initialize_low): Call set_breakpoint_data.
17656 * linux-low.h (struct linux_target_ops): Add breakpoint
17658 * server.c (attach_inferior): Remove extra add_inferior
17660 * server.h: Include mem-break.h. Update inferior.c
17662 * target.c (read_inferior_memory)
17663 (write_inferior_memory): New functions.
17664 * target.h (read_inferior_memory)
17665 (write_inferior_memory): Change macros to prototypes.
17666 (struct target_ops): Update comments. Add const to write_memory
17669 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17671 * linux-low.c (usr_store_inferior_registers): Support
17672 registers which are allowed to fail to store.
17673 * linux-low.h (linux_target_ops): Likewise.
17674 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17675 (ppc_cannot_store_register): FPSCR may not be storable.
17677 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17679 * server.h: Include <string.h> if HAVE_STRING_H.
17680 * ChangeLog: Correct paths in last ChangeLog entry.
17682 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17684 * linux-low.h: Remove obsolete prototypes.
17685 (struct linux_target_ops): New.
17686 (extern the_low_target): New.
17687 * linux-low.c (num_regs, regmap): Remove declarations.
17688 (register_addr): Use the_low_target explicitly.
17689 (fetch_register): Likewise.
17690 (usr_fetch_inferior_registers): Likewise.
17691 (usr_store_inferior_registers): Likewise.
17692 * linux-arm-low.c (num_regs): Remove.
17693 (arm_num_regs): Define.
17694 (arm_regmap): Renamed from regmap, made static.
17695 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17697 (arm_cannot_store_register): Renamed from cannot_store_register,
17699 (the_low_target): New.
17700 * linux-i386-low.c (num_regs): Remove.
17701 (i386_num_regs): Define.
17702 (i386_regmap): Renamed from regmap, made static.
17703 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17705 (i386_cannot_store_register): Renamed from cannot_store_register,
17707 (the_low_target): New.
17708 * linux-ia64-low.c (num_regs): Remove.
17709 (ia64_num_regs): Define.
17710 (ia64_regmap): Renamed from regmap, made static.
17711 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17713 (ia64_cannot_store_register): Renamed from cannot_store_register,
17715 (the_low_target): New.
17716 * linux-m68k-low.c (num_regs): Remove.
17717 (m68k_num_regs): Define.
17718 (m68k_regmap): Renamed from regmap, made static.
17719 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17721 (m68k_cannot_store_register): Renamed from cannot_store_register,
17723 (the_low_target): New.
17724 * linux-mips-low.c (num_regs): Remove.
17725 (mips_num_regs): Define.
17726 (mips_regmap): Renamed from regmap, made static.
17727 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17729 (mips_cannot_store_register): Renamed from cannot_store_register,
17731 (the_low_target): New.
17732 * linux-ppc-low.c (num_regs): Remove.
17733 (ppc_num_regs): Define.
17734 (ppc_regmap): Renamed from regmap, made static.
17735 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17737 (ppc_cannot_store_register): Renamed from cannot_store_register,
17739 (the_low_target): New.
17740 * linux-s390-low.c (num_regs): Remove.
17741 (s390_num_regs): Define.
17742 (s390_regmap): Renamed from regmap, made static.
17743 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17745 (s390_cannot_store_register): Renamed from cannot_store_register,
17747 (the_low_target): New.
17748 * linux-sh-low.c (num_regs): Remove.
17749 (sh_num_regs): Define.
17750 (sh_regmap): Renamed from regmap, made static.
17751 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17753 (sh_cannot_store_register): Renamed from cannot_store_register,
17755 (the_low_target): New.
17756 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17757 (the_low_target): New.
17759 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17761 * Makefile.in: Add stamp-h target.
17762 * configure.in: Create stamp-h.
17763 * configure: Regenerated.
17765 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17767 * inferiors.c: New file.
17768 * target.c: New file.
17769 * target.h: New file.
17770 * Makefile.in: Add target.o and inferiors.o. Update
17772 * linux-low.c (inferior_pid): New static variable,
17773 moved from server.c.
17774 (linux_create_inferior): Renamed from create_inferior.
17775 Call add_inferior. Return 0 on success instead of a PID.
17776 (linux_attach): Renamed from myattach.
17777 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17778 (linux_thread_alive): Renamed from mythread_alive.
17779 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17781 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17782 (regsets_store_inferior_registers): Correct error message.
17783 Add missing ``return 0''.
17784 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17785 (linux_store_registers): Renamed from store_inferior_registers.
17786 (linux_read_memory): Renamed from read_inferior_memory.
17787 (linux_write_memory): Renamed from write_inferior_memory.
17788 (linux_target_ops): New structure.
17789 (initialize_low): Call set_target_ops ().
17790 * remote-utils.c (unhexify): New function.
17791 (hexify): New function.
17792 (input_interrupt): Send signals to ``signal_pid''.
17793 * server.c (inferior_pid): Remove.
17794 (start_inferior): Update create_inferior call.
17795 (attach_inferior): Call add_inferior.
17796 (handle_query): New function.
17797 (main): Call handle_query for `q' packets.
17798 * server.h: Include "target.h". Remove obsolete prototypes.
17799 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17803 * Makefile.in: Add WARN_CFLAGS. Update configury
17805 * configure.in: Check for <string.h>
17806 * configure: Regenerate.
17807 * config.in: Regenerate.
17808 * gdbreplay.c: Include needed system headers.
17809 (remote_open): Remove strchr prototype.
17810 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17811 * regcache.c (supply_register): Change buf argument to const void *.
17812 (supply_register_by_name): Likewise.
17813 (collect_register): Change buf argument to void *.
17814 (collect_register_by_name): Likewise.
17815 * regcache.h: Add missing prototypes.
17816 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17817 * server.c (handle_query): New function.
17818 (attached): New static variable, moved out of main.
17819 (main): Quiet longjmp clobber warnings.
17820 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17821 * utils.c (error): Remove NORETURN.