1 2019-06-04 Pedro Alves <palves@redhat.com>
3 * server.c (captured_main): Use make_unique_xstrdup.
5 2019-06-02 Tom Tromey <tom@tromey.com>
7 * gdbreplay.c (fromhex): Remove.
8 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
10 2019-05-29 Tom Tromey <tromey@adacore.com>
14 2019-05-06 Kevin Buettner <kevinb@redhat.com>
16 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
17 sign extension code on 32-bit builds.
19 2019-05-03 Eli Zaretskii <eliz@gnu.org>
22 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
24 2019-04-19 Tom Tromey <tom@tromey.com>
26 * server.c (struct vstop_notif): Derive from notif_event.
28 (queue_stop_reply): Update.
29 (remove_all_on_match_ptid): Change type. Rewrite.
30 (discard_queued_stop_replies): Rewrite.
31 (in_queued_stop_replies_ptid): Change type.
32 (in_queued_stop_replies): Rewrite.
34 (queue_stop_reply_callback): Update.
35 (captured_main): Don't call initialize_notif.
36 (push_stop_notification): Update.
37 * notif.c (notif_write_event, handle_notif_ack)
38 (notif_event_enque, notif_push): Update.
39 (notif_event_xfree, initialize_notif): Remove.
40 * notif.h (struct notif_event): Include <list>, not
42 (struct notif_server) <queue>: Now a std::list.
43 (notif_event_p): Remove typedef.
44 (initialize_notif): Don't declare.
45 (struct notif_event): Add virtual destructor.
47 2019-04-17 Alan Hayward <alan.hayward@arm.com>
49 * ax.c (ax_vdebug): Call debug_printf.
50 * debug.c (debug_write): New function.
51 * debug.h (debug_write): New declaration.
52 * linux-low.c (sigchld_handler): Call debug_write.
54 2019-04-17 Alan Hayward <alan.hayward@arm.com>
56 * debug.c (debug_set_output): New function.
57 (debug_vprintf): Send output to debug_file.
58 (debug_flush): Likewise.
59 * debug.h (debug_set_output): New declaration.
60 * server.c (handle_monitor_command): Add debug-file option.
61 (captured_main): Likewise.
63 2019-04-17 Alan Hayward <alan.hayward@arm.com>
65 * debug.c (remote_debug): Add definition.
66 * debug.h (remote_debug): Add declaration.
67 * hostio.c (remote_debug): Remove declaration.
68 * remote-utils.c (struct ui_file): Likewise.
69 (remote_debug): Likewise.
70 * remote-utils.h (remote_debug): Likewise,
71 * server.c (remote_debug): Remove definition.
73 2019-04-10 Kevin Buettner <kevinb@redhat.com>
75 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
76 when using a 64-bit gdbserver.
78 2019-04-09 Tom Tromey <tromey@adacore.com>
80 * linux-low.c (select_event_lwp): Use find_thread_in_random.
82 2019-04-08 Tom Tromey <tom@tromey.com>
84 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
86 (linux_resume_one_lwp): Likewise.
88 2019-04-08 Tom Tromey <tom@tromey.com>
90 * gdbreplay.c: Update.
91 * linux-low.c: Update.
94 2019-04-08 Tom Tromey <tom@tromey.com>
96 * server.c: Use C++ exception handling.
97 * linux-low.c: Use C++ exception handling.
98 * gdbreplay.c: Use C++ exception handling.
100 2019-04-08 Tom Tromey <tom@tromey.com>
102 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
103 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
104 (captured_main, main): Update.
105 * gdbreplay.c (main): Update.
107 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
109 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
110 value in argument pointer, return 1 if the entry is found and 0
111 otherwise. Move comment.
112 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
113 * linux-low.h (linux_get_auxv): Declare.
114 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
116 2019-04-05 Tom Tromey <tromey@adacore.com>
118 * server.c (gdbserver_usage): Use upper-case for metasyntactic
121 2019-03-28 Alan Hayward <alan.hayward@arm.com>
123 * linux-low.c (AT_HWCAP2): Add define if not already included.
125 2019-03-26 Alan Hayward <alan.hayward@arm.com>
127 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
128 (aarch64_arch_setup): Call linux_get_hwcap.
129 * linux-arm-low.c (arm_get_hwcap): Remove function.
130 (arm_read_description): Call linux_get_hwcap.
131 * linux-low.c (linux_get_auxv): New function.
132 (linux_get_hwcap): Likewise.
133 (linux_get_hwcap2): Likewise.
134 * linux-low.h (linux_get_hwcap): New declaration.
135 (linux_get_hwcap2): Likewise.
136 * linux-ppc-low.c (ppc_get_auxv): Remove function.
137 (ppc_arch_setup): Call linux_get_hwcap.
138 * linux-s390-low.c (s390_get_hwcap): Remove function.
139 (s390_arch_setup): Call linux_get_hwcap.
141 2019-03-22 Alan Hayward <alan.hayward@arm.com>
142 Jiong Wang <jiong.wang@arm.com>
144 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
145 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
147 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
149 2019-03-22 Alan Hayward <alan.hayward@arm.com>
150 Jiong Wang <jiong.wang@arm.com>
152 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
153 (aarch64_get_hwcap): New function.
154 (aarch64_arch_setup): Read APIA hwcap.
156 2019-03-22 Alan Hayward <alan.hayward@arm.com>
157 Jiong Wang <jiong.wang@arm.com>
159 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
160 (initialize_low_tracepoint): Likewise.
161 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
162 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
163 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
164 (aarch64_linux_read_description): Likewise.
165 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
167 2019-03-12 John Baldwin <jhb@FreeBSD.org>
169 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
170 i386_create_target_description for 'segments' parameter.
171 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
172 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
173 * win32-i386-low.c (i386_arch_setup): Likewise.
175 2019-03-12 Tom Tromey <tromey@adacore.com>
177 * linux-low.c (iterate_over_lwps): Update.
179 2019-03-06 Tom Tromey <tom@tromey.com>
181 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
182 (captured_main): Use SCOPE_EXIT.
184 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
186 * configure.srv: Use '$enable_unittest' instead of '$development'
187 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
190 2019-02-27 Tom Tromey <tromey@adacore.com>
192 * gdbreplay.c (logchar): Handle \r\n.
194 2019-02-07 Alan Hayward <alan.hayward@arm.com>
196 * linux-low.c (linux_attach): Add process before lwp.
197 * server.c (attach_inferior): Check if already attached.
199 2019-02-07 Tom Tromey <tom@tromey.com>
201 * x86-tdesc.h: Rename include guard.
202 * x86-low.h: Add include guard.
203 * wincecompat.h: Rename include guard.
204 * win32-low.h: Add include guard.
205 * utils.h: Rename include guard.
206 * tracepoint.h: Rename include guard.
207 * tdesc.h: Rename include guard.
208 * target.h: Rename include guard.
209 * server.h: Rename include guard.
210 * remote-utils.h: Rename include guard.
211 * regcache.h: Rename include guard.
212 * nto-low.h: Rename include guard.
213 * notif.h: Add include guard.
214 * mem-break.h: Rename include guard.
215 * lynx-low.h: Add include guard.
216 * linux-x86-tdesc.h: Add include guard.
217 * linux-s390-tdesc.h: Add include guard.
218 * linux-ppc-tdesc-init.h: Add include guard.
219 * linux-low.h: Add include guard.
220 * linux-aarch64-tdesc.h: Add include guard.
221 * linux-aarch32-low.h: Add include guard.
222 * inferiors.h: Rename include guard.
223 * i387-fp.h: Rename include guard.
224 * hostio.h: Rename include guard.
225 * gdbthread.h: Rename include guard.
226 * gdb_proc_service.h: Rename include guard.
227 * event-loop.h: Rename include guard.
228 * dll.h: Rename include guard.
229 * debug.h: Rename include guard.
230 * ax.h: Rename include guard.
232 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
235 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
236 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
238 2019-01-25 Tom Tromey <tom@tromey.com>
240 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
242 2019-01-25 Tom Tromey <tom@tromey.com>
244 * win32-low.c: Fix common/ includes.
245 * win32-i386-low.c: Fix common/ includes.
246 * tracepoint.c: Fix common/ includes.
247 * thread-db.c: Fix common/ includes.
248 * target.h: Fix common/ includes.
249 * symbol.c: Fix common/ includes.
250 * spu-low.c: Fix common/ includes.
251 * server.h: Fix common/ includes.
252 * server.c: Fix common/ includes.
253 * remote-utils.c: Fix common/ includes.
254 * regcache.h: Fix common/ includes.
255 * regcache.c: Fix common/ includes.
256 * nto-x86-low.c: Fix common/ includes.
257 * notif.h: Fix common/ includes.
258 * mem-break.h: Fix common/ includes.
259 * lynx-low.c: Fix common/ includes.
260 * lynx-i386-low.c: Fix common/ includes.
261 * linux-x86-tdesc-selftest.c: Fix common/ includes.
262 * linux-x86-low.c: Fix common/ includes.
263 * linux-low.c: Fix common/ includes.
264 * inferiors.h: Fix common/ includes.
265 * i387-fp.c: Fix common/ includes.
266 * hostio.c: Fix common/ includes.
267 * hostio-errno.c: Fix common/ includes.
268 * gdbthread.h: Fix common/ includes.
269 * gdbreplay.c: Fix common/ includes.
270 * fork-child.c: Fix common/ includes.
271 * event-loop.c: Fix common/ includes.
273 (enum gdb_agent_op): Fix common/ includes.
275 2019-01-21 Tom Tromey <tom@tromey.com>
277 * tracepoint.c: Fix includes.
278 * remote-utils.c: Fix includes.
279 * linux-x86-low.c: Fix includes.
281 2019-01-01 Joel Brobecker <brobecker@adacore.com>
283 * gdbreplay.c (gdbreplay_version): Update copyright year in
285 * server.c (gdbserver_version): Likewise.
287 2018-12-05 Alan Hayward <alan.hayward@arm.com>
289 * linux-low.c (add_lwp): Switch ordering.
291 2018-11-29 Tom Tromey <tom@tromey.com>
293 * win32-low.c (win32_join): Take pid, not process.
294 * target.h (struct target_ops) <join>: Change argument type.
295 (join_inferior): Change argument name.
296 * spu-low.c (spu_join): Take pid, not process.
297 * server.c (handle_detach): Preserve pid before destroying
299 * lynx-low.c (lynx_join): Take pid, not process.
300 * linux-low.c (linux_join): Take pid, not process.
302 2018-11-23 Alan Hayward <alan.hayward@arm.com>
304 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
305 (aarch64_cannot_fetch_register): Likewise.
306 (struct linux_target_ops): Update references.
308 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
310 * linux-ppc-low.c: Include nat/linux-ptrace.h.
312 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
314 * configure.srv (ipa_ppc_linux_regobj): Add
315 powerpc-isa207-htm-vsx32l-ipa.o and
316 powerpc-isa207-htm-vsx64l-ipa.o.
317 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
318 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
319 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
320 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
321 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
322 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
323 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
324 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
325 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
326 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
327 (init_registers_powerpc_isa207_htm_vsx32l)
328 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
329 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
330 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
331 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
332 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
333 (ppc_store_tm_ctarregset): New functions.
334 (ppc_regsets): Add entries for HTM regsets.
335 (ppc_arch_setup): Set htm in features struct when needed. Set
336 sizes for the HTM regsets.
337 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
338 (initialize_low_arch): Call
339 init_registers_powerpc_isa207_htm_vsx32l and
340 init_registers_powerpc_isa207_htm_vsx64l.
341 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
342 PPC_TDESC_ISA207_HTM_VSX.
343 (initialize_low_tracepoint): Call
344 init_registers_powerpc_isa207_htm_vsx32l and
345 init_registers_powerpc_isa207_htm_vsx64l.
347 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
349 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
350 rs6000/power-linux-pmu.xml to srv_xmlfiles.
351 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
352 (ppc_store_pmuregset): New functions.
353 (ppc_regsets): Add entries for ebb and pmu regsets.
354 (ppc_arch_setup): Set isa207 in features struct if the ebb and
355 pmu regsets are available. Set sizes for these regsets.
357 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
359 * configure.srv (ipa_ppc_linux_regobj): Add
360 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
361 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
362 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
363 rs6000/powerpc-isa207-vsx32l.xml, and
364 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
365 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
366 <PPC_TDESC_ISA207_VSX>: New enum value.
367 (init_registers_powerpc_isa207_vsx32l): Declare.
368 (init_registers_powerpc_isa207_vsx64l): Declare.
369 * linux-ppc-low.c (ppc_fill_tarregset): New function.
370 (ppc_store_tarregset): New function.
371 (ppc_regsets): Add entry for the TAR regset.
372 (ppc_arch_setup): Set isa207 in features struct when needed. Set
373 size for the TAR regsets.
374 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
375 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
376 and init_registers_powerpc_isa207_vsx64l.
377 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
378 (initialize_low_tracepoint): Call
379 init_registers_powerpc_isa207_vsx32l and
380 init_registers_powerpc_isa207_vsx64l.
382 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
383 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
385 * configure.srv (ipa_ppc_linux_regobj): Add
386 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
387 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
388 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
389 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
390 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
391 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
392 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
393 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
394 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
395 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
396 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
397 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
398 (ppc_hwcap): Add comment.
399 (ppc_hwcap2): New global.
400 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
401 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
402 (ppc_regsets): Add entries for the DSCR and PPR regsets.
403 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
404 when needed. Set sizes for the the DSCR and PPR regsets.
405 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
406 (initialize_low_arch): Call
407 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
408 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
409 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
410 PPC_TDESC_ISA205_PPR_DSCR_VSX.
411 (initialize_low_tracepoint): Call
412 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
413 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
415 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
417 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
419 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
420 Simon Marchi <simark@simark.ca>
422 * acinclude.m4: Include "../selftest.m4".
423 * configure: Regenerate.
424 * configure.ac: Use "GDB_AC_SELFTEST".
425 * configure.srv: Use "$enable_unittests" instead of
426 "$development" when checking whether unit tests have been
428 * server.c (captured_main): Update message informing that
429 selftests have been disabled.
431 2018-10-04 Tom Tromey <tom@tromey.com>
433 * configure: Rebuild.
435 2018-10-04 Tom Tromey <tom@tromey.com>
437 * server.c (handle_status): Rename inner "thread".
438 (process_serial_event): Declare "res" in 'm' case.
439 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
440 (iterate_over_lwps): Rename inner "thread".
441 (linux_qxfer_libraries_svr4): Rename inner "len".
442 * gdbthread.h (find_thread_in_random): Rename inner "thread".
444 2018-10-01 Gary Benson <gbenson@redhat.com>
446 * gdb_proc_service.h: Moved common code to
447 common/gdb_proc_service.h.
449 2018-10-01 Gary Benson <gbenson@redhat.com>
451 * gdb_proc_service.h: Synchronize comments and whitespace with
452 GDB's version of this file.
454 2018-09-25 Tom Tromey <tom@tromey.com>
456 * configure: Rebuild.
457 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
459 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
461 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
462 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
463 ($(IPA_LIB)): Sort IPA_OBJS.
465 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
467 * Makefile.in: Remove references to $(ADD_DEPS).
469 2018-09-16 Tom Tromey <tom@tromey.com>
471 * remote-utils.c (remote_open): Use GNU style for metasyntactic
473 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
476 2018-09-05 Tom Tromey <tom@tromey.com>
478 * configure: Rebuild.
480 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
483 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
485 2018-08-27 Tom Tromey <tom@tromey.com>
488 * configure: Rebuild.
490 2018-08-27 Tom Tromey <tom@tromey.com>
492 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
493 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
494 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
495 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
496 (s390x_emit_stack_adjust): Add casts to unsigned char.
498 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
502 * server.h (struct client_state) <disable_randomization>:
505 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
507 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
509 (mips_supply_ptrace_register): Likewise.
511 2018-07-22 Tom Tromey <tom@tromey.com>
513 * configure: Rebuild.
515 2018-07-22 Tom Tromey <tom@tromey.com>
517 * win32-low.c (win32_create_inferior): Remove unused variables.
518 * gdbreplay.c (remote_open): Remove unused variable.
519 * remote-utils.c (remote_prepare): Remove unused variable.
520 * x86-tdesc.h (X86_TDESC_H): Define.
521 (amd64_expedite_regs): Define conditionally.
522 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
523 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
524 * remote-utils.c (readchar): Remove unused variable.
526 2018-07-13 Pedro Alves <palves@redhat.com>
528 * linux-low.c (linux_kill): Change parameter to process_info
529 pointer instead of pid. Adjust.
530 * lynx-low.c (lynx_kill): Likewise.
531 * nto-low.c (nto_kill): Likewise.
532 * spu-low.c (spu_kill): Likewise.
533 * win32-low.c (win32_kill): Likewise.
534 * server.c (handle_v_kill, kill_inferior_callback)
535 (detach_or_kill_for_exit): Adjust.
536 * target.c (kill_inferior): Change parameter to process_info
537 pointer instead of pid. Adjust.
538 * target.h (struct target_ops) <kill>: Change parameter to
539 process_info pointer instead of pid. Adjust all implementations
541 (kill_inferior): Likewise.
543 2018-07-13 Pedro Alves <palves@redhat.com>
545 * linux-low.c (linux_detach, linux_join): Change parameter to
546 process_info pointer instead of pid. Adjust.
547 * lynx-low.c (lynx_detach, lynx_join): Likewise.
548 * nto-low.c (nto_detach): Likewise.
549 * spu-low.c (spu_detach, spu_join): Likewise.
550 * win32-low.c (win32_detach, win32_join): Likewise.
551 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
552 * target.h (struct target_ops) <detach, join>: Change parameter to
553 process_info pointer instead of pid. Adjust all implementations
555 (detach_inferior, join_inferior): Rename 'pid' parameter to
558 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
559 Jan Kratochvil <jan.kratochvil@redhat.com>
560 Paul Fertser <fercerpav@gmail.com>
561 Tsutomu Seki <sekiriki@gmail.com>
563 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
564 (OBS): Add 'common/netstuff.o'.
565 (GDBREPLAY_OBS): Likewise.
566 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
567 (remote_open): Implement support for IPv6
569 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
571 (handle_accept_event): Accept connections from IPv6 sources.
572 (remote_prepare): Handle IPv6-style hostnames; implement
573 support for IPv6 connections.
574 (remote_open): Implement support for printing connections from
577 2018-07-11 Pedro Alves <palves@redhat.com>
580 * mem-break.c (any_persistent_commands): Add process_info
581 parameter and use it instead of relying on the current process.
582 Change return type to bool.
583 * mem-break.h (any_persistent_commands): Add process_info
584 parameter and change return type to bool.
585 * server.c (handle_detach): Remove require_running_or_return call.
586 Look up the process_info for the process we're about to detach.
587 If not found, return back error to GDB. Adjust
588 any_persistent_commands call to pass down a process pointer.
590 2018-07-11 Pedro Alves <palves@redhat.com>
592 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
593 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
594 instead of collect_register_by_name.
595 * regcache.c (regcache_raw_get_unsigned_by_name): New.
596 * regcache.h (regcache_raw_get_unsigned_by_name): New.
598 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
599 Pedro Alves <palves@redhat.com>
601 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
603 2018-07-03 Tom Tromey <tom@tromey.com>
605 * linux-low.c: Update.
606 * lynx-low.c: Update.
607 * mem-break.c: Update.
609 * remote-utils.c: Update.
613 * win32-low.c: Update.
615 2018-07-03 Tom Tromey <tom@tromey.com>
619 2018-07-03 Tom Tromey <tom@tromey.com>
621 * linux-low.c: Update.
623 2018-07-03 Tom Tromey <tom@tromey.com>
627 2018-07-03 Tom Tromey <tom@tromey.com>
629 * linux-low.c: Update.
630 * linux-mips-low.c: Update.
631 * lynx-low.c: Update.
633 * remote-utils.c: Update.
637 * thread-db.c: Update.
639 2018-07-03 Tom Tromey <tom@tromey.com>
641 * linux-low.c: Update.
642 * linux-mips-low.c: Update.
643 * lynx-low.c: Update.
644 * mem-break.c: Update.
646 * remote-utils.c: Update.
650 * tracepoint.c: Update.
652 2018-07-03 Tom Tromey <tom@tromey.com>
654 * linux-low.c: Update.
655 * linux-ppc-low.c: Update.
656 * linux-x86-low.c: Update.
657 * proc-service.c: Update.
660 * thread-db.c: Update.
661 * win32-low.c: Update.
663 2018-07-03 Tom Tromey <tom@tromey.com>
665 * linux-low.c: Update.
666 * lynx-low.c: Update.
668 * remote-utils.c: Update.
670 * thread-db.c: Update.
671 * win32-low.c: Update.
673 2018-06-29 Joel Brobecker <brobecker@adacore.com>
675 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
676 parameter in call to 'amd64_create_target_description'.
678 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
680 * x86-tdesc.h: Remove executable permission flag.
682 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
684 * configure.ac: Remove AC_PREREQ, add missing quoting.
685 * configure: Re-generate.
686 * config.in: Re-generate.
687 * aclocal.m4: Re-generate.
689 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
691 * tracepoint.h (current_traceframe): Remove declaration.
693 2018-06-18 Alan Hayward <alan.hayward@arm.com>
695 * linux-aarch64-low.c (is_sve_tdesc): New function.
696 (aarch64_sve_regs_copy_to_regcache): Likewise.
697 (aarch64_sve_regs_copy_from_regcache): Likewise.
698 (aarch64_regs_info): Add SVE checks.
699 (initialize_low_arch): Initialize SVE.
701 2018-06-18 Alan Hayward <alan.hayward@arm.com>
703 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
705 2018-06-11 Alan Hayward <alan.hayward@arm.com>
707 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
708 (initialize_low_tracepoint): Likewise
709 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
710 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
712 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
714 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
716 2018-06-11 Alan Hayward <alan.hayward@arm.com>
718 * server.h (PBUFSIZ): Increase size
720 2018-06-11 Alan Hayward <alan.hayward@arm.com>
722 * regcache.c (regcache::raw_compare): New function.
723 * regcache.h (regcache::raw_compare): New declaration.
725 2018-06-11 Alan Hayward <alan.hayward@arm.com>
727 * regcache.c (new_register_cache): Use new.
728 (free_register_cache): Use delete.
729 (register_data): Use const.
730 (supply_register): Move body inside regcache.
731 (regcache::raw_supply): New override function.
732 (collect_register): Move body inside regcache.
733 (regcache::raw_collect): New override function.
734 (regcache::get_register_status): New override function.
735 * regcache.h (struct regcache): Inherit from reg_buffer_common.
737 2018-06-09 Tom Tromey <tom@tromey.com>
739 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
741 (event_queue): Use std::queue.
742 (gdb_event_xfree): Remove.
743 (initialize_event_loop, process_event, wait_for_event): Update.
745 2018-06-08 Stan Cox <scox@redhat.com>
747 * win32-low.c (win32_create_inferior): last_ptid and last_status
748 moved to client_state.
750 2018-06-08 Pedro Alves <palves@redhat.com>
752 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
753 common/common-exceptions.o, common/common-utils.o,
754 common/errors.o, common/print-utils.o and utils.o.
755 * gdbreplay.c: Include "common-defs.h" instead of the two
756 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
757 string.h or alloca.h.
758 (perror_with_name): Delete.
759 (remote_open): Use xstrdup instead of strdup.
760 (main): Rename to ...
761 (captured_main): ... this.
764 2018-06-08 Tom Tromey <tom@tromey.com>
766 * linux-low.c (linux_low_read_btrace): Update.
768 2018-06-04 Stan Cox <scox@redhat.com>
770 * server.h (struct client_state): New.
771 * server.c (cont_thread, general_thread, multi_process)
772 (report_fork_events, report_vfork_events, report_exec_events)
773 (report_thread_events, swbreak_feature, hwbreak_feature)
774 (vCont_supported, disable_randomization, pass_signals)
775 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
776 Moved to client_state.
777 * remote-utils.c (remote_debug, noack_mode)
778 (transport_is_reliable): Moved to client_state.
779 * tracepoint.c (current_traceframe): Moved to client_state.
782 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
783 linux-low.c, remote-utils.h, target.c: Use client_state.
785 2018-05-31 Alan Hayward <alan.hayward@arm.com>
787 * configure.srv: Add new c/h file.
789 2018-05-31 Alan Hayward <alan.hayward@arm.com>
791 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
794 2018-05-25 Maciej W. Rozycki <macro@mips.com>
796 * gdb.arch/mips-fpregset-core.exp: New test.
797 * gdb.arch/mips-fpregset-core.c: New test source.
799 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
802 * hostio.c (require_int): Do not report overflow for integers
803 between 0xfffffff and 0x7fffffff.
805 2018-05-22 Maciej W. Rozycki <macro@mips.com>
807 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
808 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
809 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
811 (the_low_target): Wire them.
813 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
815 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
816 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
817 mode. Call collect_register_by_name with vscr using
818 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
819 (ppc_store_vrregset): Add and set vscr_offset variable as in
820 ppc_fill_vrregset. Call supply_register_by_name with vscr using
823 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
825 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
826 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
827 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
829 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
831 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
832 (ppc_store_vsxregset): Likewise.
833 (ppc_fill_vrregset): Likewise.
834 (ppc_store_vrregset): Likewise.
835 (ppc_fill_evrregset): Likewise.
836 (ppc_store_evrregset): Likewise.
837 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
838 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
841 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
843 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
844 wordsize of the inferior. Call ppc_linux_target_wordsize.
846 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
848 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
849 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
850 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
851 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
852 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
853 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
854 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
855 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
856 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
857 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
858 (tdesc_powerpc_e500l): Remove.
859 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
860 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
861 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
862 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
864 (ppc_arch_setup): Remove target description matching code. Fill a
865 ppc_linux_features struct and call ppc_linux_match_description
868 2018-05-22 Maciej W. Rozycki <macro@mips.com>
870 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
871 width of the requested register exceeds the width of the
873 (mips_cannot_store_register): Likewise.
875 2018-05-21 Maciej W. Rozycki <macro@mips.com>
877 * linux-mips-low.c (mips_fetch_register): New function. Update
879 (mips_store_gregset): Supply 0 rather than $restart for $zero.
880 (the_low_target): Wire `mips_fetch_register'.
882 2018-05-10 Joel Brobecker <brobecker@adacore.com>
884 * lynx-i386-low.c (LYNXOS_178): New macro.
885 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
886 the layout on LynxOS-178.
887 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
888 handle floating point registers that are not supported by
891 2018-05-10 Tom Tromey <tom@tromey.com>
893 * configure: Rebuild.
895 2018-05-10 Joel Brobecker <brobecker@adacore.com>
898 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
899 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
900 Use it to set the expedite_regs field in the given tdesc.
901 * x86-tdesc.h: New file.
902 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
903 Adjust following the addition of the new expedite_regs parameter
905 * linux-tic6x-low.c (tic6x_read_description): Likewise.
906 * linux-x86-tdesc.c: #include "x86-tdesc.h".
907 (i386_linux_read_description, amd64_linux_read_description):
908 Adjust following the addition of the new expedite_regs parameter
910 * lynx-i386-low.c: #include "x86-tdesc.h".
911 (lynx_i386_arch_setup): Adjust following the addition of the new
912 expedite_regs parameter to init_target_desc.
913 * nto-x86-low.c: #include "x86-tdesc.h".
914 (nto_x86_arch_setup): Adjust following the addition of the new
915 expedite_regs parameter to init_target_desc.
916 * win32-i386-low.c: #include "x86-tdesc.h".
917 (i386_arch_setup): Adjust following the addition of the new
918 expedite_regs parameter to init_target_desc.
920 2018-05-10 Joel Brobecker <brobecker@adacore.com>
923 * win32-low.c (win32_create_inferior): Add call to my_wait
924 setting last_status global.
926 2018-05-10 Joel Brobecker <brobecker@adacore.com>
929 * win32-low.c (create_process): Only call gdb_tilde_expand if
930 inferior_cwd is not NULL.
932 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
934 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
935 registers to the cache if their values have changed.
936 (i387_xsave_to_cache): Provide default values for x87 control
937 registers when these features are available, but disabled.
938 * regcache.c (supply_register_by_name_zeroed): New function.
939 * regcache.h (supply_register_by_name_zeroed): Declare new
942 2018-05-07 Tom Tromey <tom@tromey.com>
944 * configure: Rebuild.
946 2018-05-04 Tom Tromey <tom@tromey.com>
948 * configure: Rebuild.
950 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
951 Pedro Alves <palves@redhat.com>
953 * linux-aarch64-low.c (aarch64_stopped_data_address):
956 2018-04-27 Tom Tromey <tom@tromey.com>
958 * configure: Rebuild.
960 2018-04-23 Tom Tromey <tom@tromey.com>
962 * configure: Rebuild.
964 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
966 * Makefile.in (depcomp): Add "..".
967 (all_deps_files): New and use it.
969 2018-04-18 Alan Hayward <alan.hayward@arm.com>
971 * configure.srv (aarch64*-*-linux*): Don't include xml.
972 (i[34567]86-*-cygwin*): Likewise.
973 (i[34567]86-*-linux*): Likewise.
974 (i[34567]86-*-lynxos*): Likewise.
975 (i[34567]86-*-mingw32ce*): Likewise.
976 (i[34567]86-*-mingw*): Likewise.
977 (i[34567]86-*-nto*): Likewise.
978 (tic6x-*-uclinux): Likewise.
979 (x86_64-*-linux*): Likewise.
980 (x86_64-*-mingw*): Likewise.
981 (x86_64-*-cygwin*): Likewise.
983 2018-04-18 Alan Hayward <alan.hayward@arm.com>
985 * tdesc.c: Remove xml parameter.
987 2018-04-18 Alan Hayward <alan.hayward@arm.com>
989 * server.c (get_features_xml): Remove cast.
990 * tdesc.c (void target_desc::accept): Fill in function.
991 (tdesc_get_features_xml): Remove old xml creation.
992 (print_xml_feature::visit_pre): Add xml vistor.
993 * tdesc.h (struct target_desc): Make xmltarget mutable.
994 (tdesc_get_features_xml): Remove declaration.
996 2018-04-18 Alan Hayward <alan.hayward@arm.com>
998 * tdesc.c (tdesc_architecture_name): Add new function.
999 (tdesc_osabi_name): Likewise.
1000 (tdesc_get_features_xml): Use new functions.
1002 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1004 * tdesc.c (tdesc_create_flags): Remove.
1005 (tdesc_add_flag): Likewise.
1006 (tdesc_named_type): Likewise.
1007 (tdesc_create_union): Likewise.
1008 (tdesc_create_struct): Likewise.
1009 (tdesc_create_vector): Likewise.
1010 (tdesc_add_bitfield): Likewise.
1011 (tdesc_add_field): Likewise.
1012 (tdesc_set_struct_size): Likewise.
1014 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1016 * tdesc.c (~target_desc): Remove implictly deleted items.
1017 (init_target_desc): Iterate all features.
1018 (tdesc_get_features_xml): Use vector.
1019 (tdesc_create_feature): Create feature.
1020 * tdesc.h (tdesc_feature) Remove
1021 (target_desc): Add features.
1023 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1025 * Makefile.in: Add common/tdesc.c
1026 * tdesc.c (init_target_desc): init all reg_defs from register
1028 (tdesc_create_reg): Create tdesc_reg.
1029 * tdesc.h (tdesc_feature): Add register vector.
1031 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1033 * tdesc.h (struct target_desc) <features>: Change type to
1034 std::vector<std::string>.
1035 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1037 (tdesc_get_features_xml): Likewise.
1038 (tdesc_create_feature): Likewise.
1040 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1042 * regcache.c (find_register_by_number): Return a ref.
1043 (find_regno): Use references.
1044 (register_size): Likewise.
1045 (register_data): Likewise.
1046 * tdesc.c (target_desc::~target_desc): Remove free calls.
1047 (target_desc::operator==): Use std::vector compare.
1048 (init_target_desc): Use reference.
1049 (tdesc_create_reg): Use reg constructors.
1050 * tdesc.h (struct target_desc): Replace pointer with object.
1052 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1054 * regcache.c (find_register_by_number): Make static.
1055 (find_regno): Use find_register_by_number
1056 * regcache.h (struct reg): Remove declaration.
1058 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1060 * tdesc.c (target_desc::~target_desc): Move to here.
1061 (target_desc::operator==): Likewise.
1062 * tdesc.h (target_desc::~target_desc): Move from here.
1063 (target_desc::operator==): Likewise.
1065 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1067 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1069 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1071 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1073 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1074 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1075 and init_registers_s390_gs_linux64.
1077 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1079 * linux-s390-low.c (s390_fill_gs): Remove function.
1080 (s390_fill_gsbc): Remove function.
1081 (s390_regsets): Set fill functions for the guarded storage regsets
1084 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1086 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1087 the word size. Add comment.
1088 (s390_get_wordsize): New function.
1089 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1090 pswm with it. Instead, use s390_get_wordsize to determine the
1091 word size first and derive the correct tdesc from that directly.
1093 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1095 * Makefile.in: Include silent-rules.mk.
1096 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1097 (COMPILE): Add ECHO_CXX.
1098 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1099 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1100 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1101 (version-generated.c): Add ECHO_GEN.
1102 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1103 (IPAGENT_COMPILE): Add ECHO_CXX.
1104 (%-generated.c): Add ECHO_REGDAT.
1106 2018-03-14 Tom Tromey <tom@tromey.com>
1109 * ax.c (ax_printf): Special case for NULL.
1111 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1113 * linux-low.c (linux_qxfer_libraries_svr4): Use
1114 xml_escape_text_append.
1116 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1118 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1120 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1122 * server.c (handle_general_set): Remove unnecessary xstrdup.
1124 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1126 * server.c (parse_debug_format_options): Adjust to
1127 delim_string_to_char_ptr_vec changes.
1128 * thread-db.c (thread_db_load_search): Adjust to
1129 dirnames_to_char_ptr_vec changes.
1131 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1133 * target.h (target_enable_btrace, target_disable_btrace)
1134 (target_read_btrace, target_read_btrace_conf): Turn macro into
1135 inline function. Throw error if target method is not defined.
1136 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1137 check for btrace target method. Be prepared to handle exceptions
1138 from btrace target methods.
1140 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1142 * server.c (captured_main): Change order of error message printed
1143 when the current working directory cannot be found.
1145 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1147 * server.c: Include "filenames.h" and "pathstuff.h".
1148 (program_name): Delete variable.
1149 (program_path): New anonymous class.
1150 (get_exec_wrapper): Use "program_path" instead of
1152 (handle_v_run): Likewise.
1153 (captured_main): Likewise.
1154 (process_serial_event): Likewise.
1156 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1158 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1159 (OBJS): Add "pathstuff.o".
1160 * server.c (current_directory): New global variable.
1161 (captured_main): Initialize "current_directory".
1163 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1165 * tdesc.c: Use common/tdesc.h.
1166 * tdesc.h: Likewise.
1168 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1169 Simon Marchi <simon.marchi@ericsson.com>
1171 * Makefile.in: Switch order of make rules.
1173 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1175 * Makefile.in: Add common directory in build.
1176 * configure.ac: Add common reference.
1177 * configure: Regenerate.
1179 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1181 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1182 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1183 * spu-low.c (spu_target_ops): Likewise.
1184 * win32-low.c (win32_target_ops): Likewise.
1185 * server.c (supported_btrace_packets): Report packets unconditionally.
1186 * target.h (target_ops) <supports_btrace>: Remove.
1187 (target_supports_btrace): Remove.
1189 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1191 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1192 (handle_btrace_disable): Change return type to void. Use exceptions
1194 (handle_btrace_general_set): Catch exception and copy message to
1197 2018-02-08 Tom Tromey <tom@tromey.com>
1199 * linux-low.c (install_software_single_step_breakpoints): Use
1200 make_scoped_restore.
1201 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1202 (do_restore_current_thread_cleanup): Remove.
1203 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1206 2018-02-08 Tom Tromey <tom@tromey.com>
1208 * mem-break.c (set_raw_breakpoint_at): Use
1209 gdb::unique_xmalloc_ptr.
1211 2018-01-30 Pedro Alves <palves@redhat.com>
1214 * target.c (target_terminal::terminal_state): Rename to ...
1215 (target_terminal::m_terminal_state): ... this.
1217 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1219 * linux-low.c (handle_extended_wait): Surround call to
1220 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1222 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1224 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1225 linux_ptrace_attach_fail_reason_string now returning an
1227 (linux_attach): Likewise.
1228 * thread-db.c (attach_thread): Likewise.
1230 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1233 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1234 checking for fs_base/gs_base fields in struct user_regs_struct.
1235 * configure: Regenerate.
1237 2018-01-16 Yao Qi <yao.qi@linaro.org>
1240 * linux-low.c (fetch_register): Call supply_register instead of
1243 2018-01-08 Yao Qi <yao.qi@linaro.org>
1244 Simon Marchi <simon.marchi@ericsson.com>
1246 * Makefile.in (OBS): Remove selftest.o.
1247 * configure.ac: Set srv_selftest_objs if $development is true.
1248 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1249 * configure: Re-generated.
1250 * server.c (captured_main): Wrap variable selftest_filter with
1253 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1255 * server.c (parse_debug_format_options): Return std::string.
1256 (handle_monitor_command, captured_main): Adjust.
1258 2018-01-05 Pedro Alves <palves@redhat.com>
1261 * server.c (captured_main): Pass quiet=false to
1262 save_original_signals_state.
1264 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1266 * gdbreplay.c (gdbreplay_version): Update copyright year in
1268 * server.c (gdbserver_version): Likewise.
1270 2017-12-08 Tom Tromey <tom@tromey.com>
1272 * ax.c (ax_printf): Update.
1274 2017-12-07 Yao Qi <yao.qi@linaro.org>
1276 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1277 aarch64_linux_read_description.
1278 * linux-amd64-ipa.c (idx2mask): New array.
1279 (get_ipa_tdesc): Move idx2mask out.
1280 (initialize_low_tracepoint): Initialize target descriptions.
1281 * linux-i386-ipa.c (idx2mask): New array.
1282 (get_ipa_tdesc): Move idx2mask out.
1283 (initialize_low_tracepoint): Initialize target descriptions.
1285 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1287 * tdesc.c (struct tdesc_type): Change return type.
1288 (tdesc_add_flag): Change parameter type.
1289 (tdesc_add_bitfield): Likewise.
1290 (tdesc_add_field): Likewise.
1291 (tdesc_set_struct_size): Likewise.
1293 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1295 * regcache.c (registers_to_string): Remove unused variable.
1297 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1299 * inferiors.c (for_each_inferior_with_data): Remove.
1300 * inferiors.h (for_each_inferior_with_data): Remove.
1301 * server.c (handle_qxfer_threads_worker): Change parameter type.
1302 (handle_qxfer_threads_proper): Use for_each_thread.
1304 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1306 * inferiors.c (for_each_inferior): Remove.
1307 (clear_inferiors): Use for_each_thread.
1308 * inferiors.h (for_each_inferior): Remove.
1309 * linux-low.c (linux_wait_for_event_filtered): Use
1311 (linux_stabilize_threads): Likewise.
1312 * regcache.c (regcache_release): Likewise.
1313 * server.c (gdb_wants_all_threads_stopped): Likewise.
1314 (clear_pending_status_callback): Remove.
1315 (handle_status): Use for_each_thread.
1316 (captured_main): Likewise.
1317 * win32-low.c (child_init_thread_list): Likewise.
1318 (win32_clear_inferiors): Likewise.
1319 (fake_breakpoint_event): Likewise.
1321 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1323 * inferiors.h (find_inferior): Remove.
1324 * inferiors.c (find_inferior): Remove.
1326 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1328 * linux-low.c (resume_status_pending_p): Update comment.
1329 (need_step_over_p): Update comment.
1331 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1333 * linux-low.c (proceed_one_lwp): Return void, change parameter
1335 (unsuspend_and_proceed_one_lwp): Likewise.
1336 (proceed_all_lwps): Use for_each_thread.
1337 (unstop_all_lwps): Likewise.
1339 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1341 * linux-low.c (linux_resume_one_thread): Return void, take
1343 (linux_resume): Use for_each_thread.
1345 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1347 * linux-low.c (send_sigstop_callback): Return void, change
1348 parameter type. Rename to...
1349 (send_sigstop): ... this.
1350 (suspend_and_send_sigstop_callback): Return void, change parameter
1352 (suspend_and_send_sigstop): ... this.
1353 (stop_all_lwps): Use for_each_thread.
1355 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1357 * linux-low.c (lwp_running): Return bool, remove unused
1359 (linux_stabilize_threads): Use find_thread.
1361 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1363 * linux-low.c (select_singlestep_lwp_callback): Remove.
1364 (count_events_callback): Remove.
1365 (select_event_lwp_callback): Remove.
1366 (select_event_lwp): Use find_thread/for_each_thread.
1368 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1370 * linux-low.c (not_stopped_callback): Return bool, take filter
1372 (linux_wait_for_event_filtered): Use find_thread.
1373 (linux_wait_1): Likewise.
1375 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1377 * linux-low.c (same_lwp): Remove.
1378 (find_lwp_pid): Use find_thread.
1380 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1382 * linux-low.c (delete_lwp_callback): Remove.
1383 (linux_mourn): Use for_each_thread.
1385 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1387 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1388 args parameter, don't check for pid.
1389 (linux_detach): Use for_each_thread.
1391 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1393 * linux-low.c (struct counter): Remove.
1394 (second_thread_of_pid_p): Remove.
1395 (last_thread_of_process_p): Use find_thread.
1397 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1399 * inferiors.c (find_inferior_in_random): Remove.
1400 * inferiors.h (find_inferior_in_random): Remove.
1401 * linux-low.c (status_pending_p_callback): Return bool, accept
1402 parameter ptid directly.
1403 (linux_wait_for_event_filtered): Use find_thread_in_random.
1404 (linux_wait_1): Likewise.
1406 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1408 * inferiors.c (find_inferior_id): Remove.
1409 (find_thread_ptid): Move implemention from find_inferior_id to
1411 * inferiors.h (find_inferior_id): Remove.
1412 * server.c (handle_status): Use find_thread_ptid.
1413 (process_serial_event): Likewise.
1414 * thread-db.c (find_one_thread): Likewise.
1415 (thread_db_thread_handle): Likewise.
1416 * win32-low.c (thread_rec): Likewise.
1417 (child_delete_thread): Likewise.
1418 (win32_thread_alive): Likewise.
1419 (get_child_debug_event): Likewise.
1421 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1423 * linux-mips-low.c (update_watch_registers_callback): Return
1424 void, remove pid_p parameter, don't check for pid.
1425 (mips_insert_point, mips_remove_point): Use for_each_thread.
1427 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1429 * lynx.low (lynx_delete_thread_callback): Remove.
1430 (lynx_mourn): Use for_each_thread.
1432 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1434 * regcache.c (regcache_invalidate_one): Remove.
1435 (regcache_invalidate_pid): use for_each_thread.
1437 2017-11-26 Tom Tromey <tom@tromey.com>
1439 * linux-low.c (linux_create_inferior): Update.
1441 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1443 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1445 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1447 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1448 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1449 * linux-aarch64-tdesc-selftest.c: New file.
1450 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1452 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1454 * configure.srv: Add new file.
1455 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1456 * linux-aarch64-tdesc-selftest.c: New file.
1457 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1459 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1461 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1462 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1463 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1465 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1467 * configure.srv: Add new files.
1468 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1469 aarch64_linux_read_description.
1470 * linux-aarch64-low.c (aarch64_linux_read_description):
1471 Merge with aarch64_arch_setup.
1472 (aarch64_arch_setup): Call aarch64_linux_read_description.
1473 * linux-aarch64-tdesc.c: New file.
1474 * linux-aarch64-tdesc.h: New file.
1476 2017-11-24 Yao Qi <yao.qi@linaro.org>
1478 * configure.srv: Set $srv_regobj for tic6x-linux.
1479 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1480 (tic6x_read_description): Move some code to tic6x_arch_setup.
1481 (tic6x_tdesc_test): New function.
1482 (initialize_low_arch): Call selftests::register_test.
1484 2017-11-22 Yao Qi <yao.qi@linaro.org>
1486 * remote-utils.c (prepare_resume_reply): Use memcpy.
1488 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1490 * linux-low.c (kill_one_lwp_callback): Return void, take
1491 argument directly, don't filter on pid.
1492 (linux_kill): Use for_each_thread.
1494 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1496 * linux-low.c (need_step_over_p): Return bool, remove dummy
1498 (linux_resume, proceed_all_lwps): Use find_thread.
1500 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1502 * linux-low.c (resume_status_pending_p): Return bool, remove
1504 (linux_resume): Use find_thread.
1506 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1508 * linux-low.c (struct thread_resume_array): Remove.
1509 (linux_set_resume_request): Return void, take arguments
1511 (linux_resume): Use for_each_thread.
1513 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1515 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1516 return bool, remove data argument.
1517 (linux_stabilize_threads): Use find_thread.
1519 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1521 * linux-low.c (unsuspend_one_lwp): Remove.
1522 (unsuspend_all_lwps): Use for_each_thread, inline code from
1525 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1527 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1528 * linux-low.c (struct iterate_over_lwps_args): Remove.
1529 (iterate_over_lwps_filter): Remove.
1530 (iterate_over_lwps): Use find_thread.
1532 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1534 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1535 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1536 code from reset_lwp_ptrace_options_callback.
1538 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1540 * linux-arm-low.c (struct update_registers_data): Remove.
1541 (update_registers_callback): Return void, take arguments
1542 directly, don't check thread's pid.
1543 (arm_insert_point, arm_remove_point): Use for_each_thread.
1545 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1547 * win32-low.c (continue_one_thread): Return void, take argument
1549 (child_continue): Use for_each_thread.
1551 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1553 * win32-i386-low.c (update_debug_registers_callback): Rename
1555 (update_debug_registers): ... this, return void, remove pid_p arg.
1556 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1558 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1560 * inferiors.h (struct process_info): Add constructor, initialize
1562 <syscalls_to_catch>: Change type to std::vector<int>.
1563 * inferiors.c (add_process): Allocate process_info with new.
1564 (remove_process): Free process_info with delete.
1565 * linux-low.c (handle_extended_wait): Adjust.
1566 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1567 * server.c (handle_general_set): Adjust.
1569 2017-11-16 Pedro Alves <palves@redhat.com>
1571 * remote-utils.c (remote_close): Block SIGIO signals instead of
1572 uninstalling the SIGIO handler.
1574 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1576 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1578 2017-11-16 Yao Qi <yao.qi@linaro.org>
1580 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1581 (tic6x_store_gregset): Likewise.
1582 (tic6x_usrregs_info): Move it up.
1584 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1586 * Makefile.in: Update arch rules.
1587 * configure.srv: Explicitly mark arch/ files.
1589 2017-11-13 Andreas Schwab <schwab@suse.de>
1591 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1593 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1595 2017-11-06 Pedro Alves <palves@redhat.com>
1597 * config.in, configure: Regenerate.
1599 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1601 * target.c (struct thread_search): Remove.
1602 (thread_search_callback): Remove.
1603 (prepare_to_access_memory): Use for_each_thread instead of
1604 find_inferior. Inline code from thread_search_callback.
1606 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1608 * server.c (struct visit_actioned_threads_data): Remove.
1609 (visit_actioned_threads): Change prototype to take arguments
1611 (resume): Use find_thread instead of find_inferior.
1613 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1615 * server.c (queue_stop_reply_callback): Change prototype, return
1617 (find_status_pending_thread_callback): Remove.
1618 (handle_status): Replace find_inferior with find_thread and
1621 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1623 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1625 (aarch64_store_gregset): Likewise.
1626 (aarch64_fill_fpregset): Likewise.
1627 (aarch64_store_fpregset): Likewise.
1629 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1631 * gdbthread.h (find_thread, for_each_thread): New functions.
1632 * inferiors.c (thread_of_pid): Remove.
1633 (find_any_thread_of_pid): Use find_thread.
1634 * linux-low.c (num_lwps): Use for_each_thread.
1636 2017-10-17 Yao Qi <yao.qi@linaro.org>
1638 * Makefile.in: Remove one rule.
1639 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1641 2017-10-17 Yao Qi <yao.qi@linaro.org>
1643 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1644 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1646 2017-10-17 Yao Qi <yao.qi@linaro.org>
1648 * configure.srv: Rename arm.o with arch/arm.o.
1650 2017-10-17 Yao Qi <yao.qi@linaro.org>
1652 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1653 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1654 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1655 (arch-i386.o, arch-amd64.o): Remove rules.
1656 (arch/%.o): New rule.
1657 Update POSTCOMPILE and COMPILE.pre.
1658 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1659 * configure: Re-generated.
1660 * configure.srv: Replace arch-i386.o with arch/i386.o.
1661 Replace arch-amd64.o with arch/amd64.o.
1663 2017-10-16 Yao Qi <yao.qi@linaro.org>
1665 * configure: Regenerated.
1667 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1669 * inferiors.h: (struct inferior_list): Remove.
1670 (struct inferior_list_entry); Remove.
1671 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1672 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1673 get_first_inferior): Remove.
1674 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1675 find_inferior_id, find_inferior_in_random): Change signature.
1676 * inferiors.c (all_threads): Change type to
1677 std::list<thread_info *>.
1678 (get_thread): Remove macro.
1679 (find_inferior, find_inferior_id): Change signature, implement
1681 (find_inferior_in_random): Change signature, implement using
1682 find_thread_in_random.
1683 (for_each_inferior, for_each_inferior_with_data): Change
1684 signature, implement using for_each_thread.
1685 (add_inferior_to_list, remove_inferior): Remove.
1686 (add_thread, get_first_thread, thread_of_pid,
1687 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1688 (get_first_inferior, one_inferior_p, clear_inferior_list):
1690 (clear_inferiors, get_thread_process): Update.
1691 * gdbthread.h: Include <list>.
1692 (struct thread_info) <entry>: Remove field.
1694 (all_threads): Change type to std::list<thread_info *>.
1695 (get_first_inferior): Add doc.
1696 (find_thread, for_each_thread, find_thread_in_random): New
1698 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1699 * linux-arm-low.c (update_registers_callback): Update.
1700 * linux-low.c (second_thread_of_pid_p): Update.
1701 (kill_one_lwp_callback, linux_detach_lwp_callback,
1702 delete_lwp_callback, status_pending_p_callback, same_lwp,
1703 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1704 iterate_over_lwps, not_stopped_callback,
1705 resume_stopped_resumed_lwps, count_events_callback,
1706 select_singlestep_lwp_callback, select_event_lwp_callback,
1707 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1708 suspend_and_send_sigstop_callback, wait_for_sigstop,
1709 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1710 lwp_running, linux_set_resume_request, resume_status_pending_p,
1711 need_step_over_p, start_step_over, linux_resume_one_thread,
1712 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1713 reset_lwp_ptrace_options_callback): Update.
1714 * linux-mips-low.c (update_watch_registers_callback): Update.
1715 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1717 (free_register_cache_thread_one): Remove.
1718 (regcache_release): Update.
1719 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1720 handle_qxfer_threads_worker): Update.
1721 (handle_query): Update, use list iterator.
1722 (visit_actioned_threads, handle_pending_status,
1723 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1724 clear_pending_status_callback, set_pending_status_callback,
1725 find_status_pending_thread_callback, handle_status,
1726 process_serial_event): Update.
1727 * target.c (thread_search_callback): Update.
1728 * thread-db.c (thread_db_get_tls_address): Update.
1729 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1731 * win32-i386-low.c (update_debug_registers_callback): Update.
1732 * win32-low.c (delete_thread_info, child_delete_thread,
1733 continue_one_thread, suspend_one_thread,
1734 get_child_debug_event): Adjust.
1736 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1738 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1739 * inferiors.h: Include <list>.
1740 (struct process_info) <entry>: Remove field.
1742 (pid_of): Change macro to function.
1743 (ptid_of, lwpid_of): Remove macro.
1744 (all_processes): Change type to std::list<process_info *>.
1745 (ALL_PROCESSES): Remove macro.
1746 (for_each_process, find_process): New function.
1747 * inferiors.c (all_processes): Change type to
1748 std::list<process_info *>.
1749 (find_thread_process): Adjust.
1750 (add_process): Likewise.
1751 (remove_process): Likewise.
1752 (find_process_pid): Likewise.
1753 (get_first_process): Likewise.
1754 (started_inferior_callback): Remove.
1755 (have_started_inferiors_p): Adjust.
1756 (attached_inferior_callback): Remove.
1757 (have_attached_inferiors_p): Adjust.
1758 * linux-low.c (check_zombie_leaders): Likewise.
1759 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1760 (x86_linux_update_xmltarget): Adjust.
1761 * server.c (handle_query): Likewise.
1762 (gdb_reattached_process): Remove.
1763 (handle_status): Adjust.
1764 (kill_inferior_callback): Likewise.
1765 (detach_or_kill_inferior): Remove.
1766 (print_started_pid): Likewise.
1767 (print_attached_pid): Likewise.
1768 (detach_or_kill_for_exit): Update.
1769 (process_serial_event): Likewise.
1770 * linux-arm-low.c (arm_new_fork): Likewise.
1772 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1774 * dll.h: Include <list>.
1775 (struct dll_info): Add constructor.
1776 <entry>: Remove field.
1777 (all_dlls): Change type to std::list<dll_info>.
1778 * dll.c: Include <algorithm>.
1779 (get_dll): Remove macro.
1780 (all_dlls): Change type to std::list<dll_info *>.
1781 (free_one_dll): Remove.
1782 (match_dll): Likewise.
1783 (loaded_dll): Adjust.
1784 (unloaded_dll): Adjust to all_dlls type change, use
1785 std::find_if. Inline code from match_dll.
1786 (clear_dlls): Adjust to all_dlls type change.
1787 * server.c (emit_dll_description): Remove.
1788 (handle_qxfer_libraries): Adjust to all_dlls type change,
1789 integrate emit_dll_description's functionality.
1791 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1793 * linux-low.h (struct linux_target_ops) <delete_process>: New
1795 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1796 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1797 (struct linux_target_ops): Add delete_process callback.
1798 * linux-arm-low.c (arm_delete_process): New.
1799 (struct linux_target_ops): Add delete_process callback.
1800 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1801 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1802 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1803 * linux-mips-low.c (mips_linux_delete_process): New.
1804 (struct linux_target_ops): Add delete_process callback.
1805 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1806 * linux-s390-low.c (struct linux_target_ops): Likewise.
1807 * linux-sh-low.c (struct linux_target_ops): Likewise.
1808 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1809 * linux-tile-low.c (struct linux_target_ops): Likewise.
1810 * linux-x86-low.c (x86_linux_delete_process): New.
1811 (struct linux_target_ops): Add delete_process callback.
1812 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1814 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1816 * linux-aarch64-low.c (the_low_target): Add thread delete
1818 * linux-arm-low.c (arm_delete_thread): New function.
1819 (the_low_target): Add thread delete callback.
1820 * linux-bfin-low.c (the_low_target): Likewise.
1821 * linux-crisv32-low.c (the_low_target): Likewise.
1822 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1824 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1826 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1827 * linux-mips-low.c (mips_linux_delete_thread): New function.
1828 (the_low_target): Add thread delete callback.
1829 * linux-ppc-low.c (the_low_target): Likewise.
1830 * linux-s390-low.c (the_low_target): Likewise.
1831 * linux-sh-low.c (the_low_target): Likewise.
1832 * linux-tic6x-low.c (the_low_target): Likewise.
1833 * linux-tile-low.c (the_low_target): Likewise.
1834 * linux-x86-low.c (the_low_target): Likewise.
1835 * linux-xtensa-low.c (the_low_target): Likewise.
1837 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1839 * win32-low.c: Include "common-inferior.h".
1841 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1843 * inferiors.c (set_inferior_cwd): New function.
1844 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1845 (handle_query): Inform that QSetWorkingDir is supported.
1846 * win32-low.c (create_process): Pass the inferior's cwd to
1849 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1851 * inferiors.c (current_inferior_cwd): New global variable.
1852 (get_inferior_cwd): New function.
1853 * inferiors.h (struct process_info) <cwd>: New field.
1855 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1857 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1858 (OBS): Add gdb_tilde_expand.o.
1860 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1862 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1863 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1865 2017-09-29 Pedro Alves <palves@redhat.com>
1867 * ax.c (gdb_parse_agent_expr): Constify.
1868 * ax.h (gdb_parse_agent_expr): Constify.
1869 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1871 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1872 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1873 * remote-utils.h (read_ptid): Constify.
1874 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1875 (process_point_options, process_serial_event): Constify.
1876 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1877 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1878 (cmd_qtbuffer): Constify.
1880 2017-09-29 Pedro Alves <palves@redhat.com>
1882 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1885 2017-09-29 Pedro Alves <palves@redhat.com>
1887 * linux-low.c (handle_extended_wait): Pass parent thread instead
1888 of process to thread_db_notice_clone.
1889 * linux-low.h (thread_db_notice_clone): Replace parent process
1890 parameter with parent thread parameter.
1891 * thread-db.c (find_one_thread): Add comment.
1892 (thread_db_notice_clone): Replace parent process parameter with
1893 parent thread parameter. Temporarily switch to the parent thread.
1895 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1897 * gdbthread.h: Include "common-gdbthread.h".
1898 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1899 "if" when validating the ptid.
1900 * remote-utils.c: Include "gdbthread.h".
1901 (prepare_resume_reply): Use "switch_to_thread".
1902 * target.c (done_accessing_memory): Likewise.
1904 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1906 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1907 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1908 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1909 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1910 s390x-gs-linux64-ipa.o to ipa_obj.
1911 * linux-s390-low.c (HWCAP_S390_GS): New define.
1912 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1914 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1915 (s390_arch_setup): Check for guarded-storage support and choose
1917 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1918 init_registers_s390x_gs_linux64.
1919 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1921 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1922 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1924 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1926 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1928 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1930 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1931 (thread_db_thread_handle): Declare.
1932 * linux-low.c (linux_target_ops): Initialize thread_handle.
1933 * server.c (handle_qxfer_threads_worker): Add support for
1935 * target.h (struct target_ops): Add new function pointer,
1937 (target_thread_handle): Define.
1938 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1940 (thread_db_thread_handle): New function.
1942 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1944 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1945 * linux-low.h (thread_db_notice_clone): Declare.
1946 * thread-db.c (thread_db_notice_clone): New function.
1948 2017-09-21 Pedro Alves <palves@redhat.com>
1950 * server.c (gdb_read_memory, handle_status, process_serial_event)
1951 (handle_serial_event, handle_target_event): Adjust to
1952 set_desired_thread prototype change.
1953 * target.c (set_desired_thread): Remove 'use_general' parameter
1955 * target.h (set_desired_thread): Remove 'use_general' parameter.
1957 2017-09-20 Tom Tromey <tom@tromey.com>
1959 * target.c (target_terminal::terminal_state): Define.
1960 (target_terminal::init): Rename from target_terminal_init.
1961 (target_terminal::inferior): Rename from
1962 target_terminal_inferior.
1963 (target_terminal::ours): Rename from target_terminal_ours.
1964 (target_terminal::ours_for_output, target_terminal::info): New.
1966 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1968 * server.c (accumulate_file_name_length): Remove.
1969 (emit_dll_description): Adjust to std::string change.
1970 (handle_qxfer_libraries): Use std::string to hold document.
1972 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1974 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1975 return type of xml_escape_text.
1976 * server.c (emit_dll_description): Likewise.
1978 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1980 * server.c (captured_main): Accept argument for --selftest.
1981 Update run_tests call.
1982 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1983 when registering selftests.
1985 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1987 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1988 instead of "VEC" for "target_desc.reg_defs".
1989 (regcache_cpy): Likewise.
1990 (registers_to_string): Likewise.
1991 (registers_from_string): Likewise.
1992 (find_regno): Likewise.
1993 (supply_regblock): Likewise.
1994 (regcache_raw_read_unsigned): Likewise.
1995 * tdesc.c (init_target_desc): Likewise.
1996 (tdesc_create_reg): Likewise.
1997 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1998 (struct target_desc) <reg_defs>: Convert to "std::vector".
1999 (target_desc): Do not initialize "reg_defs".
2000 (~target_desc): Update code to use "std::vector" instead of "VEC"
2001 for "target_desc.reg_defs".
2002 (operator==): Likewise.
2004 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2006 * inferiors.h (thread_to_gdb_id): Remove.
2007 * inferiors.c (thread_to_gdb_id): Remove.
2008 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2009 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2010 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2012 * nto-low.c (nto_fetch_registers, nto_store_registers,
2013 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2015 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2017 * inferiors.h (gdb_id_to_thread_id): Remove.
2018 * inferiors.c (gdb_id_to_thread_id): Remove.
2019 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2020 removal. Move pid declaration closer to where it's used.
2022 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2024 * server.c (handle_detach): New function.
2025 (process_serial_event): Move code out, call handle_detach.
2027 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2029 * server.c (require_running): Rename to ...
2030 (require_running_or_return): ... this ...
2031 (require_running_or_break): ... and this.
2032 (handle_query, process_serial_event): Adjust.
2034 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2036 * linux-low.c (linux_set_resume_request): Remove unused
2039 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2041 * server.c (first_thread_of): Remove.
2042 (process_serial_event): Replace usage of first_thread_of with
2043 find_any_thread_of_pid.
2044 * tracepoint.c (same_process_p): Remove.
2045 (gdb_agent_about_to_close): Replace usage of same_process_p with
2046 find_any_thread_of_pid.
2047 * linux-x86-low.c (same_process_callback): Remove.
2048 (x86_arch_setup_process_callback): Replace usage of
2049 same_process_callback with find_any_thread_of_pid.
2050 * thread-db.c (any_thread_of): Remove.
2051 (switch_to_process): Replace usage of any_thread_of with
2052 find_any_thread_of_pid.
2053 * inferiors.c (thread_pid_matches_callback): Remove.
2054 (find_thread_process): Adjust to use find_any_thread_of_pid.
2056 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2058 * regcache.c (get_thread_regcache): Guard calls to "memset"
2061 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2063 * linux-low.c (handle_extended_wait): Use
2064 "allocate_target_description" instead of "XNEW".
2065 * linux-x86-low.c (initialize_low_arch): Likewise.
2067 2017-09-05 Yao Qi <yao.qi@linaro.org>
2069 * configure.srv (srv_i386_regobj): Remove.
2070 (srv_amd64_regobj): Remove.
2071 (srv_regobj): Set it to "" for x86 non-linux targets.
2072 * linux-x86-tdesc.c (i386_linux_read_description):
2073 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2074 (init_registers_i386): Remove the declaration.
2075 (tdesc_i386): Remove the declaration.
2076 (lynx_i386_arch_setup): Call i386_create_target_description.
2077 * nto-x86-low.c: Likewise.
2078 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2079 [!__x86_64__]: include arch/i386.h.
2080 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2082 2017-09-05 Yao Qi <yao.qi@linaro.org>
2084 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2085 i386/amd64-XXX-linux from it.
2087 2017-09-05 Yao Qi <yao.qi@linaro.org>
2089 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2091 (ipa_amd64_linux_regobj): Remove.
2092 (ipa_x32_linux_regobj): Remove.
2094 2017-09-05 Yao Qi <yao.qi@linaro.org>
2096 * Makefile.in (arch-amd64.o): New rule.
2097 * configure.srv: Append arch-amd64.o.
2098 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2099 (get_ipa_tdesc): Call amd64_linux_read_description.
2100 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2101 and init_registers_amd64_XXX.
2102 * linux-x86-low.c (x86_linux_read_description): Call
2103 amd64_linux_read_description.
2104 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2105 (initialize_low_arch): Don't call init_registers_x32_XXX and
2106 init_registers_amd64_XXX.
2107 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2108 and tdesc_amd64_XXX.
2109 [__x86_64__] (amd64_tdesc_test): New function.
2110 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2111 and init_registers_amd64_XXX.
2112 * linux-x86-tdesc.c: Include arch/amd64.h.
2113 (xcr0_to_tdesc_idx): New function.
2114 (i386_linux_read_description): New function.
2115 (amd64_get_ipa_tdesc_idx): New function.
2116 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2117 (amd64_get_ipa_tdesc): Declare.
2119 2017-09-05 Yao Qi <yao.qi@linaro.org>
2121 * configure.srv (srv_i386_linux_xmlfiles): Remove
2122 i386/i386-XXX-linux.xml from it.
2124 2017-09-05 Yao Qi <yao.qi@linaro.org>
2126 * configure.srv: Set srv_i386_linux_regobj empty if $development
2128 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2129 initialize_low_tdesc.
2130 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2131 with #if initialize_low_tdesc.
2132 * linux-x86-tdesc-selftest.c: New file.
2133 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2135 2017-09-05 Yao Qi <yao.qi@linaro.org>
2137 * Makefile.in (arch-i386.o): New rule.
2138 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2139 (x86_64-*-linux*): Likewise.
2140 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2141 include arch/i386.h.
2142 (i386_linux_read_description): Remove code and call
2143 i386_create_target_description.
2144 * tdesc.c (allocate_target_description): New function.
2145 * tdesc.h (set_tdesc_architecture): Remove declaration.
2146 (set_tdesc_osabi): Likewise.
2148 2017-09-05 Yao Qi <yao.qi@linaro.org>
2150 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2151 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2152 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2154 * server.c (get_features_xml): Call tdesc_get_features_xml.
2155 * tdesc.c (set_tdesc_architecture): New function.
2156 (set_tdesc_osabi): New function.
2157 (tdesc_get_features_xml): New function.
2158 (tdesc_create_feature): Add an argument.
2159 * tdesc.h (struct target_desc) <features>: New field.
2160 <arch, osabi>: New field.
2161 (~target_desc): xfree features, arch, and osabi.
2162 (target_desc::oerator==): Don't compare .xmltarget.
2163 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2164 (set_tdesc_osabi): Likewise.
2165 (tdesc_get_features_xml): Likewise.
2167 2017-09-05 Yao Qi <yao.qi@linaro.org>
2169 * linux-x86-tdesc.c: Include selftest.h.
2170 (i386_tdesc_test): New function.
2171 (initialize_low_tdesc): Call selftests::register_test.
2172 * tdesc.h: Include regdef.h.
2173 (target_desc): Override operator == and !=.
2175 2017-09-05 Yao Qi <yao.qi@linaro.org>
2177 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2178 (ipa_obj): Likewise.
2179 * linux-i386-ipa.c: Include common/x86-xstate.h
2180 (get_ipa_tdesc): Call i386_linux_read_description.
2181 (initialize_low_tracepoint): Don't call init_registers_XXX
2182 functions, call initialize_low_tdesc instead.
2183 * linux-x86-low.c (x86_linux_read_description): Call
2184 i386_linux_read_description.
2185 (initialize_low_arch): Don't call init_registers_i386_XXX
2186 functions, call initialize_low_tdesc.
2187 * linux-x86-tdesc.c: New file.
2188 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2189 (i386_get_ipa_tdesc_idx): Declare.
2190 (i386_get_ipa_tdesc): Declare.
2191 (initialize_low_tdesc): Declare.
2193 2017-09-05 Yao Qi <yao.qi@linaro.org>
2195 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2198 2017-09-05 Yao Qi <yao.qi@linaro.org>
2200 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2201 * regcache.c (get_thread_regcache): Use VEC_length.
2202 (init_register_cache): Likewise.
2203 (regcache_cpy): Likewise.
2204 (registers_to_string): Iterate reg_defs via VEC_iterate.
2205 (find_regno): Likewise.
2206 (find_register_by_number): Use VEC_index.
2207 (register_size): Call find_register_by_number.
2208 (register_data): Call find_register_by_number.
2209 (supply_regblock): Use VEC_length.
2210 (regcache_raw_read_unsigned): Likewise.
2211 * tdesc.c (init_target_desc): Iterate reg_defs via
2213 (default_description): Update initializer.
2214 (copy_target_description): Don't update field num_registers.
2215 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2216 <num_registers>: Remove.
2218 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2220 * Makefile.in (.SECONDARY): Define target.
2222 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2224 * linux-low.c (linux_wait_1): Adjust.
2225 * server.c (queue_stop_reply_callback): Adjust.
2227 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2229 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2230 QEnvironmentUnset and QEnvironmentReset packets.
2231 (handle_query): Inform remote that QEnvironmentHexEncoded,
2232 QEnvironmentUnset and QEnvironmentReset are supported.
2234 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2236 * inferiors.h (inferior_target_data): Rename to ...
2237 (thread_target_data): ... this.
2238 (inferior_regcache_data): Rename to ...
2239 (thread_regcache_data): ... this.
2240 (set_inferior_regcache_data): Rename to ...
2241 (set_thread_regcache_data): ... this.
2242 * inferiors.c (inferior_target_data): Rename to ...
2243 (thread_target_data): ... this.
2244 (inferior_regcache_data): Rename to ...
2245 (thread_regcache_data): ... this.
2246 (set_inferior_regcache_data): Rename to ...
2247 (set_thread_regcache_data): ... this.
2248 (free_one_thread): Update.
2249 * linux-low.h (get_thread_lwp): Update.
2250 * regcache.c (get_thread_regcache): Update.
2251 (regcache_invalidate_thread): Update.
2252 (free_register_cache_thread): Update.
2253 * win32-i386-low.c (update_debug_registers_callback): Update.
2254 (win32_get_current_dr): Update.
2255 * win32-low.c (thread_rec): Update.
2256 (delete_thread_info): Update.
2257 (continue_one_thread): Update.
2258 (suspend_one_thread): Update.
2260 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2262 * inferiors.c (set_inferior_target_data): Remove.
2263 * inferiors.h (set_inferior_target_data): Remove.
2265 2017-08-18 Yao Qi <yao.qi@linaro.org>
2267 * Makefile.in (OBS): Add selftest.o.
2268 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2269 * configure, config.in: Re-generated.
2270 * server.c: Include common/sefltest.h.
2271 (captured_main): Handle option --selftest.
2273 2017-08-09 Yao Qi <yao.qi@linaro.org>
2275 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2276 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2277 i386-avx-mpx.o and i386-mmx.o.
2278 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2279 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2280 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2281 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2282 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2283 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2284 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2285 i386/amd64-avx-mpx.xml.
2287 2017-08-09 Yao Qi <yao.qi@linaro.org>
2289 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2290 and x32-avx-avx512.o.
2291 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2292 i386/x32-avx-avx512.xml.
2294 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2296 * tracepoint.h (enum class fast_tpoint_collect_result): New
2298 (fast_tracepoint_collecting): Change return type to
2299 fast_tpoint_collect_result.
2300 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2301 * linux-low.h: Include tracepoint.h.
2302 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2303 fast_tpoint_collect_result.
2304 * linux-low.c (handle_tracepoints): Adjust.
2305 (linux_fast_tracepoint_collecting): Change return type to
2306 fast_tpoint_collect_result.
2307 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2308 linux_wait_1, stuck_in_jump_pad_callback,
2309 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2310 proceed_one_lwp): Adjust to type change.
2312 2017-07-10 Yao Qi <yao.qi@linaro.org>
2314 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2316 2017-06-29 Yao Qi <yao.qi@linaro.org>
2318 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2320 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2322 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2324 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2326 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2328 * linux-low.c (linux_create_inferior): Adjust code to access the
2329 environment information via 'gdb_environ' class.
2330 * lynx-low.c (lynx_create_inferior): Likewise.
2331 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2332 (get_environ): Return a pointer to 'our_environ'.
2333 (captured_main): Initialize 'our_environ'.
2334 * server.h (get_environ): Adjust prototype.
2335 * spu-low.c (spu_create_inferior): Adjust code to access the
2336 environment information via 'gdb_environ' class.
2338 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2340 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2341 usage of "register" keyword.
2343 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2345 * configure: Re-generate.
2347 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2349 * configure: Re-generate.
2351 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2353 * Makefile.in (COMPILE.pre): Add "-x c++".
2355 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2357 * fork-child.c: Conditionally include <signal.h>.
2359 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2361 * server.c (handle_general_set): Handle new packet
2362 "QStartupWithShell".
2363 (handle_query): Add "QStartupWithShell" to the list of supported
2365 (gdbserver_usage): Add help text explaining the
2366 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2368 (captured_main): Recognize and act upon the presence of the new
2371 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2372 Pedro Alves <palves@redhat.com>
2374 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2375 * configure: Regenerate.
2376 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2378 (i[34567]86-*-lynxos*): Likewise.
2379 (spu*-*-*): Likewise.
2380 * fork-child.c: New file.
2381 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2383 (linux_ptrace_fun): New function.
2384 (linux_create_inferior): Adjust function prototype to reflect
2385 change on "target.h". Adjust function code to use
2387 (linux_request_interrupt): Delete "signal_pid".
2388 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2389 (lynx_ptrace_fun): New function.
2390 (lynx_create_inferior): Adjust function prototype to reflect
2391 change on "target.h". Adjust function code to use
2393 * nto-low.c (nto_create_inferior): Adjust function prototype and
2394 code to reflect change on "target.h". Update comments.
2395 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2396 "common-terminal.h" and "environ.h".
2397 (terminal_fd): Moved to fork-child.c.
2398 (old_foreground_pgrp): Likewise.
2399 (restore_old_foreground_pgrp): Likewise.
2400 (last_status): Make it global.
2401 (last_ptid): Likewise.
2402 (our_environ): New variable.
2403 (startup_with_shell): Likewise.
2404 (program_name): Likewise.
2405 (program_argv): Rename to...
2406 (program_args): ...this.
2407 (wrapper_argv): New variable.
2408 (start_inferior): Delete function.
2409 (get_exec_wrapper): New function.
2410 (get_exec_file): Likewise.
2411 (get_environ): Likewise.
2412 (prefork_hook): Likewise.
2413 (post_fork_inferior): Likewise.
2414 (postfork_hook): Likewise.
2415 (postfork_child_hook): Likewise.
2416 (handle_v_run): Update code to deal with arguments coming from the
2417 remote host. Update calls from "start_inferior" to
2419 (captured_main): Likewise. Initialize environment variable. Call
2421 * server.h (post_fork_inferior): New prototype.
2422 (get_environ): Likewise.
2423 (last_status): Declare.
2424 (last_ptid): Likewise.
2425 (signal_pid): Likewise.
2426 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2427 (spu_ptrace_fun): New function.
2428 (spu_create_inferior): Adjust function prototype to reflect change
2429 on "target.h". Adjust function code to use "fork_inferior".
2430 * target.c (target_terminal_init): New function.
2431 (target_terminal_inferior): Likewise.
2432 (target_terminal_ours): Likewise.
2433 * target.h: Include <vector>.
2434 (struct target_ops) <create_inferior>: Update prototype.
2435 (create_inferior): Update macro.
2436 * utils.c (gdb_flush_out_err): New function.
2437 * win32-low.c (win32_create_inferior): Adjust function prototype
2438 and code to reflect change on "target.h".
2440 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2442 * inferiors.c (switch_to_thread): New function.
2444 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2446 * Makefile.in (SFILE): Add "common/job-control.c".
2447 (OBS): Add "job-control.o".
2449 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2451 * Makefile: Remove "@host_makefile_frag@".
2453 2017-05-05 Pedro Alves <palves@redhat.com>
2455 * configure: Regenerate.
2457 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2459 * configure: Regenerate.
2461 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2463 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2464 software_single_step change of return type to
2465 std::vector<CORE_ADDR>.
2466 * linux-low.c (install_software_single_step_breakpoints):
2468 * linux-low.h (install_software_single_step_breakpoints):
2471 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2473 * remote-utils.c: Include "gdb_termios.h" instead of
2475 * terminal.h: Delete file.
2477 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2479 * server.c: Include <vector>.
2480 <program_argv, wrapper_argv>: Convert to std::vector.
2481 (start_inferior): Rewrite function to use C++.
2482 (handle_v_run): Likewise. Update code that calculates the argv
2483 based on the vRun packet; use C++.
2484 (captured_main): Likewise.
2486 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2488 * server.c (handle_v_cont): Initialize thread_resume::thread
2491 2017-04-05 Pedro Alves <palves@redhat.com>
2493 * configure: Regenerate.
2495 2017-04-05 Pedro Alves <palves@redhat.com>
2497 * gdbreplay.c (sync_error): Constify.
2498 * linux-x86-low.c (push_opcode): Constify.
2500 2017-04-05 Pedro Alves <palves@redhat.com>
2502 * win32-low.c (get_child_debug_event)
2503 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2504 Report TARGET_WAITKIND_SPURIOUS instead.
2506 2017-04-05 Pedro Alves <palves@redhat.com>
2508 * remote-utils.c (remote_prepare, remote_open): Constify.
2509 * remote-utils.h (remote_prepare, remote_open): Constify.
2510 * server.c (captured_main): Constify 'port' handling.
2512 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2514 * Makefile.in (clean): Clear .deps.
2516 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2518 * .gitignore: Remove generated files, replace with wildcard.
2519 * (clean): Replace removal of generated files with wildcard.
2520 (version.c): Replace with...
2521 (version-generated.c): ...this.
2522 (xml-builtin.c): Replace with...
2523 (xml-builtin-generated.c): ...this.
2524 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2525 (%.c: *regformats*): Replace with...
2526 (%-generated.c: *regformats*): ...this.
2528 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2530 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2531 (xtensa_fill_gregset): Call collect_register_by_name for
2533 (xtensa_store_gregset): Call supply_register_by_name for
2536 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2538 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2539 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2540 (xtensa_store_gregset): Call supply_register for all registers in
2541 a0_regnum..a0_regnum + C0_NREGS range.
2543 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2545 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2546 (ax-ipa.o: ax.c): Remove.
2547 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2548 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2549 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2550 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2551 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2553 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2555 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2556 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2557 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2558 (errors-ipa.o: ../common/errors.c): Remove.
2559 (format-ipa.o: ../common/format.c): Remove.
2560 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2562 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2564 * Makefile.in (%-ipa.o: %.c): New rule.
2565 (tracepoint-ipa.o: tracepoint.c): Remove.
2566 (utils-ipa.o: utils.c): Remove.
2567 (remote-utils-ipa.o: remote-utils.c): Remove.
2568 (regcache-ipa.o: regcache.c): Remove.
2569 (i386-linux-ipa.o: i386-linux.c): Remove.
2570 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2571 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2572 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2573 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2574 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2575 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2576 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2577 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2578 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2579 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2580 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2581 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2582 (aarch64-ipa.o: aarch64.c): Remove.
2583 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2584 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2585 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2586 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2587 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2588 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2589 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2590 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2591 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2592 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2593 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2594 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2595 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2596 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2597 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2598 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2599 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2600 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2601 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2602 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2603 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2604 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2605 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2606 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2607 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2608 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2609 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2610 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2611 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2612 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2613 (tdesc-ipa.o: tdesc.c): Remove.
2614 (x32-linux-ipa.o: x32-linux.c): Remove.
2615 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2616 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2620 * Makefile.in (%.o: ../arch/%.c): New rule.
2621 (arm.o: ../arch/arm.c): Remove.
2622 (arm-linux.o: ../arch/arm-linux.c): Remove.
2623 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2624 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2626 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2628 * Makefile.in (%.o: ../nat/%.c): New rule.
2629 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2630 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2631 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2632 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2633 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2634 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2635 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2636 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2637 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2638 (linux-personality.o: ../nat/linux-personality.c): Remove.
2639 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2640 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2641 (x86-linux.o: ../nat/x86-linux.c): Remove.
2642 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2643 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2645 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2647 * Makefile.in (%.o: ../common/%.c): New rule.
2648 (signals.o: ../common/signals.c): Remove.
2649 (print-utils.o: ../common/print-utils.c): Remove.
2650 (rsp-low.o: ../common/rsp-low.c): Remove.
2651 (common-utils.o: ../common/common-utils.c): Remove.
2652 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2653 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2654 (vec.o: ../common/vec.c): Remove.
2655 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2656 (xml-utils.o: ../common/xml-utils.c): Remove.
2657 (ptid.o: ../common/ptid.c): Remove.
2658 (buffer.o: ../common/buffer.c): Remove.
2659 (format.o: ../common/format.c): Remove.
2660 (filestuff.o: ../common/filestuff.c): Remove.
2661 (agent.o: ../common/agent.c): Remove.
2662 (errors.o: ../common/errors.c): Remove.
2663 (environ.o: ../common/environ.c): Remove.
2664 (common-debug.o: ../common/common-debug.c): Remove.
2665 (cleanups.o: ../common/cleanups.c): Remove.
2666 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2667 (fileio.o: ../common/fileio.c): Remove.
2668 (common-regcache.o: ../common/common-regcache.c): Remove.
2669 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2670 (new-op.o: ../common/new-op.c): Remove.
2671 (btrace-common.o: ../common/btrace-common.c): Remove.
2673 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2675 * Makefile.in (%.o: ../target/%.c): New rule.
2676 (waitstatus.o: ../target/waitstatus.c): Remove.
2678 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2681 (%.c: ../regformats/%.dat,
2682 (%.c: ../regformats/arm/%.dat,
2683 (%.c: ../regformats/i386/%.dat,
2684 (%.c: ../regformats/rs6000/%.dat): New rules.
2685 (aarch64.c): Remove.
2686 (reg-arm.c): Remove.
2687 (arm-with-iwmmxt.c): Remove.
2688 (arm-with-vfpv2.c): Remove.
2689 (arm-with-vfpv3.c): Remove.
2690 (arm-with-neon.c): Remove.
2691 (reg-bfin.c): Remove.
2692 (reg-cris.c): Remove.
2693 (reg-crisv32.c): Remove.
2695 (i386-linux.c): Remove.
2696 (i386-avx.c): Remove.
2697 (i386-avx-linux.c): Remove.
2698 (i386-avx-avx512.c): Remove.
2699 (i386-avx-avx512-linux.c): Remove.
2700 (i386-mpx.c): Remove.
2701 (i386-mpx-linux.c): Remove.
2702 (i386-avx-mpx-avx512-pku.c): Remove.
2703 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2704 (i386-avx-mpx.c): Remove.
2705 (i386-avx-mpx-linux.c): Remove.
2706 (i386-mmx.c): Remove.
2707 (i386-mmx-linux.c): Remove.
2708 (reg-ia64.c): Remove.
2709 (reg-m32r.c): Remove.
2710 (reg-m68k.c): Remove.
2712 (mips-linux.c): Remove.
2713 (mips-dsp-linux.c): Remove.
2714 (mips64-linux.c): Remove.
2715 (mips64-dsp-linux.c): Remove.
2716 (nios2-linux.c): Remove.
2717 (powerpc-32.c): Remove.
2718 (powerpc-32l.c): Remove.
2719 (powerpc-altivec32l.c): Remove.
2720 (powerpc-cell32l.c): Remove.
2721 (powerpc-vsx32l.c): Remove.
2722 (powerpc-isa205-32l.c): Remove.
2723 (powerpc-isa205-altivec32l.c): Remove.
2724 (powerpc-isa205-vsx32l.c): Remove.
2725 (powerpc-e500l.c): Remove.
2726 (powerpc-64l.c): Remove.
2727 (powerpc-altivec64l.c): Remove.
2728 (powerpc-cell64l.c): Remove.
2729 (powerpc-vsx64l.c): Remove.
2730 (powerpc-isa205-64l.c): Remove.
2731 (powerpc-isa205-altivec64l.c): Remove.
2732 (powerpc-isa205-vsx64l.c): Remove.
2733 (s390-linux32.c): Remove.
2734 (s390-linux32v1.c): Remove.
2735 (s390-linux32v2.c): Remove.
2736 (s390-linux64.c): Remove.
2737 (s390-linux64v1.c): Remove.
2738 (s390-linux64v2.c): Remove.
2739 (s390-te-linux64.c): Remove.
2740 (s390-vx-linux64.c): Remove.
2741 (s390-tevx-linux64.c): Remove.
2742 (s390x-linux64.c): Remove.
2743 (s390x-linux64v1.c): Remove.
2744 (s390x-linux64v2.c): Remove.
2745 (s390x-te-linux64.c): Remove.
2746 (s390x-vx-linux64.c): Remove.
2747 (s390x-tevx-linux64.c): Remove.
2748 (tic6x-c64xp-linux.c): Remove.
2749 (tic6x-c64x-linux.c): Remove.
2750 (tic6x-c62x-linux.c): Remove.
2752 (reg-sparc64.c): Remove.
2753 (reg-spu.c): Remove.
2755 (amd64-linux.c): Remove.
2756 (amd64-avx.c): Remove.
2757 (amd64-avx-linux.c): Remove.
2758 (amd64-avx-avx512.c): Remove.
2759 (amd64-avx-avx512-linux.c): Remove.
2760 (amd64-mpx.c): Remove.
2761 (amd64-mpx-linux.c): Remove.
2762 (amd64-avx-mpx-avx512-pku.c): Remove.
2763 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2764 (amd64-avx-mpx.c): Remove.
2765 (amd64-avx-mpx-linux.c): Remove.
2767 (x32-linux.c): Remove.
2768 (x32-avx.c): Remove.
2769 (x32-avx-linux.c): Remove.
2770 (x32-avx-avx512.c): Remove.
2771 (x32-avx-avx512-linux.c): Remove.
2772 (reg-xtensa.c): Remove.
2773 (reg-tilegx.c): Remove.
2774 (reg-tilegx32.c): Remove.
2776 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2778 * Makefile.in (SFILES): Add "common/environ.c".
2779 (OBJS): Add "common/environ.h".
2781 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2783 * configure.ac: Check if the fs_base and gs_base members of
2784 `struct user_regs_struct' exist.
2785 * config.in: Regenerated.
2786 * configure: Likewise.
2788 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2790 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2792 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2793 (get_next_pcs_syscall_next_pc): Likewise.
2795 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2797 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2798 * nto-x86-low.c: Likewise.
2800 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2802 * Makefile.in: Include disable-implicit-rules.mk.
2804 2016-11-23 Pedro Alves <palves@redhat.com>
2806 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2807 (debug_vprintf): Use std::chrono::steady_clock instead of
2808 gettimeofday. Use '.' instead of ':'.
2809 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2810 (get_timestamp): Use std::chrono::steady_clock instead of
2813 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2815 * Makefile.in: Fix whitespace formatting.
2817 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2819 * Makefile.in (SFILES, OBS): Flatten list and order
2822 2016-11-23 Pedro Alves <palves@redhat.com>
2824 * event-loop.c (handle_file_event): Use warning.
2825 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2826 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2829 2016-11-23 Pedro Alves <palves@redhat.com>
2831 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2833 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2834 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2835 debug_printf and debug_flush for debug output.
2836 * server.c (handle_general_set): Likewise.
2837 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2840 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2842 * Makefile.in (.c.o): Replace rule with ...
2843 (%.o: %.c): ... this one.
2845 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2847 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2848 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2850 * configure.ac: Remove checks for the make program.
2851 * configure: Re-generate.
2853 2016-10-28 Pedro Alves <palves@redhat.com>
2855 * Makefile.in (CXX_DIALECT): Get from configure.
2856 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2857 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2858 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2859 * config.in: Regenerate.
2860 * configure: Regenerate.
2862 2016-10-27 Yao Qi <yao.qi@linaro.org>
2864 * linux-low.c (linux_supports_range_stepping): Return true if
2865 can_software_single_step return true.
2867 2016-10-27 Yao Qi <yao.qi@linaro.org>
2869 * inferiors.c (find_inferior_in_random): New function.
2870 * inferiors.h (find_inferior_in_random): Declare.
2871 * linux-low.c (linux_wait_for_event_filtered): Call
2872 find_inferior_in_random instead of find_inferior.
2874 2016-10-27 Yao Qi <yao.qi@linaro.org>
2876 * linux-low.c (linux_wait_1): If single-step breakpoints are
2877 inserted, remove them.
2879 2016-10-26 Pedro Alves <palves@redhat.com>
2881 * linux-low.c (handle_extended_wait): Link parent/child fork
2883 (linux_wait_1): Unlink them.
2884 (linux_set_resume_request): Ignore resume requests for
2885 already-resumed and unhandled fork child threads.
2886 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2887 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2889 (handle_v_requests) <vCont>: Don't call require_running.
2890 * server.h (in_queued_stop_replies): New declaration.
2892 2016-10-24 Yao Qi <yao.qi@linaro.org>
2895 * linux-aarch64-low.c (append_insns): Cast the return value to
2898 2016-10-10 Yao Qi <yao.qi@linaro.org>
2900 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2902 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2904 * target.c (target_supports_multi_process): New function, moved
2906 * target.h (target_supports_multi_process): ... here. Remove
2909 2016-10-05 Tom Tromey <tom@tromey.com>
2912 * tracepoint.c (handle_tracepoint_bkpts): Check
2913 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2915 2016-10-05 Yao Qi <yao.qi@linaro.org>
2917 * configure.srv: Update the path of arm-*.xml files.
2919 2016-10-05 Terry Guo <terry.guo@arm.com>
2920 Yao Qi <yao.qi@linaro.org>
2922 * Makefile.in: Adjust the path of rules.
2923 * configure.srv: Update the path of xml files.
2924 * regformats/arm-with-iwmmxt.dat: Regenerated.
2925 * regformats/arm-with-neon.dat: Likewise.
2926 * regformats/arm-with-vfpv2.dat: Likewise.
2927 * regformats/arm-with-vfpv3.dat Likewise.
2929 2016-09-30 Yao Qi <yao.qi@linaro.org>
2932 * target.c (target_stop_and_wait): Don't call
2933 target_continue_no_signal, use resume_stop instead.
2935 2016-09-26 Yao Qi <yao.qi@linaro.org>
2937 * linux-low.c (linux_wait_1): Call debug_exit.
2939 2016-09-23 Pedro Alves <palves@redhat.com>
2941 * Makefile.in (SFILES): Add common/new-op.c.
2942 (OBS): Add common/new-op.o.
2943 (new-op.o): New rule.
2945 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2947 * .gitinore: Ignore more files.
2949 2016-09-21 Yao Qi <yao.qi@linaro.org>
2951 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2954 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2956 * server.c (start_inferior): Call target_mourn_inferior instead of
2957 mourn_inferior; pass ptid_t argument to it.
2959 (handle_target_event): Likewise.
2960 * target.c (target_mourn_inferior): New function.
2961 * target.h (mourn_inferior): Delete macro.
2963 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2965 * linux-low.c (lwp_is_stepping): New function.
2967 2016-09-06 Carl Love <cel@us.ibm.com>
2969 * server.c (start_inferior): Fixed comment, requested comment change
2970 didn't get updated correctly. Removed reference to ptrace () call as
2971 it is only true on Linux systems.
2973 2016-09-06 Carl Love <cel@us.ibm.com>
2975 * server.c (start_inferior): Do not call
2976 function target_post_create_inferior () if the
2977 inferior process has already exited.
2979 2016-09-05 Pedro Alves <palves@redhat.com>
2981 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2982 (COMPILE.pre, CC_LD): Use CXX directly.
2983 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2984 * acinclude.m4: Don't include build-with-cxx.m4.
2985 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2986 * configure: Regenerate.
2988 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2991 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2992 call writing data to own_buf.
2994 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2996 * target.c (mywait): Call target_wait instead of
2998 (target_wait): New function.
3000 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3002 * server.c (start_inferior): New variable 'ptid'. Replace calls
3003 to the_target->resume by target_continue{,_no_signal}, depending
3005 * target.c (target_stop_and_wait): Call target_continue_no_signal
3006 instead of the_target->resume.
3007 (target_continue): New function.
3009 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3011 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3013 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3016 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3018 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3019 * linux-arm-low.c (ps_get_thread_area): Likewise.
3020 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3021 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3022 * linux-mips-low.c (ps_get_thread_area): Likewise.
3023 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3024 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3025 * linux-x86-low.c (ps_get_thread_area): Likewise.
3026 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3028 2016-08-19 Pedro Alves <palves@redhat.com>
3030 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3032 2016-08-19 Pedro Alves <palves@redhat.com>
3034 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3035 comment. Use memcpy instead of casting through unsigned long.
3037 2016-08-19 Pedro Alves <palves@redhat.com>
3039 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3040 allocating around 0x80000000.
3042 2016-08-19 Pedro Alves <palves@redhat.com>
3045 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3046 (x32-avx512-linux-ipa.o): New rules.
3047 * configure.ac (x86_64-*-linux*): New x32 check.
3048 * configure.srv (ipa_x32_linux_regobj): New.
3049 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3050 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3052 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3054 * configure: Regenerate.
3056 2016-08-09 Pedro Alves <palves@redhat.com>
3059 * Makefile.in (OBS): Add signals-state-save-restore.o.
3060 (signals-state-save-restore.o): New rule.
3061 * config.in: Regenerate.
3062 * configure: Regenerate.
3063 * linux-low.c: Include "signals-state-save-restore.h".
3064 (linux_create_inferior): Call
3065 restore_original_signals_state.
3066 * server.c: Include "dispositions-save-restore.h".
3067 (captured_main): Call save_original_signals_state.
3069 2016-08-05 Pedro Alves <palves@redhat.com>
3071 * configure: Regenerate.
3073 2016-08-04 Yao Qi <yao.qi@linaro.org>
3075 * linux-low.c (regsets_fetch_inferior_registers): Check
3076 errno is ESRCH or not.
3078 2016-08-02 Yao Qi <yao.qi@linaro.org>
3080 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3081 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3082 (thread_db_load_search): Update.
3083 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3084 td_ta_set_event and td_ta_event_getmsg.
3086 2016-07-26 Pedro Alves <palves@redhat.com>
3089 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3090 of unsigned long for 64-bit registers and use uint32_t instead of
3091 unsigned int for 32-bit registers.
3093 2016-07-26 Pedro Alves <palves@redhat.com>
3095 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3098 2016-07-21 Tom Tromey <tom@tromey.com>
3100 * configure: Rebuild.
3102 2016-07-21 Yao Qi <yao.qi@linaro.org>
3104 * mem-break.c (find_gdb_breakpoint): Cast bp to
3105 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3107 2016-07-21 Yao Qi <yao.qi@linaro.org>
3109 * server.c (handle_v_requests): Support s and S actions
3110 if target_supports_software_single_step return true.
3112 2016-07-21 Yao Qi <yao.qi@linaro.org>
3114 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3115 is resume_step, call maybe_hw_step.
3116 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3118 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3120 (proceed_one_lwp): If resume request is resume_step, install
3121 reinsert breakpoints and call maybe_hw_step.
3123 2016-07-21 Yao Qi <yao.qi@linaro.org>
3125 * linux-low.c (proceed_one_lwp): Declare.
3126 (linux_resume_one_thread): Remove local variable 'step'.
3127 Lift code enqueue signal. Call proceed_one_lwp instead of
3128 linux_resume_one_lwp.
3130 2016-07-21 Yao Qi <yao.qi@linaro.org>
3132 * linux-low.c (linux_resume_one_thread): Call
3133 enqueue_pending_signal.
3135 2016-07-21 Yao Qi <yao.qi@linaro.org>
3137 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3138 * inferiors.c (do_restore_current_thread_cleanup): New function.
3139 (make_cleanup_restore_current_thread): Likewise.
3140 * linux-low.c (install_software_single_step_breakpoints): Call
3141 make_cleanup_restore_current_thread. Switch current_thread to
3144 2016-07-21 Yao Qi <yao.qi@linaro.org>
3146 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3147 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3148 (clone_one_breakpoint): Likewise.
3149 (delete_reinsert_breakpoints): Change parameter to thread.
3151 (has_reinsert_breakpoints): Likewise.
3152 (uninsert_reinsert_breakpoints): Likewise.
3153 (reinsert_reinsert_breakpoints): Likewise.
3154 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3155 (delete_reinsert_breakpoints): Likewise.
3156 (reinsert_reinsert_breakpoints): Likewise.
3157 (uninsert_reinsert_breakpoints): Likewise.
3158 (has_reinsert_breakpoints): Likewise.
3160 2016-07-21 Yao Qi <yao.qi@linaro.org>
3162 * inferiors.c (get_thread_process): Make parameter const.
3163 * inferiors.h (get_thread_process): Update declaration.
3164 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3165 Add new parameters child_thread and parent_thread. Callers
3167 * mem-break.h (clone_all_breakpoints): Update declaration.
3169 2016-07-21 Yao Qi <yao.qi@linaro.org>
3171 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3172 <command_list, handler>: Remove.
3173 (struct gdb_breakpoint): New.
3174 (struct other_breakpoint): New.
3175 (struct reinsert_breakpoint): New.
3176 (is_gdb_breakpoint): New function.
3177 (any_persistent_commands): Update command_list if
3178 is_gdb_breakpoint returns true.
3179 (set_breakpoint): Create breakpoints according to their types.
3180 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3181 (set_gdb_breakpoint_1): Likewise.
3182 (set_gdb_breakpoint): Likewise.
3183 (clear_breakpoint_conditions): Change parameter type to
3184 'struct gdb_breakpoint *'.
3185 (clear_breakpoint_commands): Likewise.
3186 (clear_breakpoint_conditions_and_commands): Likewise.
3187 (add_condition_to_breakpoint): Likewise.
3188 (add_breakpoint_condition): Likewise.
3189 (add_commands_to_breakpoint): Likewise.
3190 (check_breakpoints): Check other_breakpoint.
3191 (clone_one_breakpoint): Clone breakpopint according to its type.
3192 * mem-break.h (struct gdb_breakpoint): Declare.
3193 (set_gdb_breakpoint): Update declaration.
3194 (clear_breakpoint_conditions_and_commands): Likewise.
3195 (add_breakpoint_condition): Likewise.
3196 (add_breakpoint_commands): Likewise.
3197 * server.c (process_point_options): Change parameter type to
3198 'struct gdb_breakpoint *'.
3200 2016-07-21 Yao Qi <yao.qi@linaro.org>
3202 * mem-break.c (set_breakpoint_at): Rename it to ...
3203 (set_breakpoint_type_at): ... it.
3204 (set_breakpoint_at): Call set_breakpoint_type_at.
3205 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3206 * mem-break.h (set_breakpoint_at): Update comments.
3208 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3210 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3212 (nios2_store_gregset): Likewise.
3214 2016-07-01 Pedro Alves <palves@redhat.com>
3215 Antoine Tremblay <antoine.tremblay@ericsson.com>
3217 * linux-low.c: Change interface to take the target lwp_info
3218 pointer directly and return void. Handle detaching from a zombie
3220 (linux_detach_lwp_callback): New function.
3221 (linux_detach): Detach from the leader thread after detaching from
3224 2016-06-28 Yao Qi <yao.qi@linaro.org>
3226 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3227 for variable new_offset.
3228 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3229 (aarch64_ftrace_insn_reloc_cb): Likewise.
3230 (aarch64_ftrace_insn_reloc_tb): Likewise.
3231 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3232 PRIx64 instead of PRIx32.
3234 2016-06-28 Yao Qi <yao.qi@linaro.org>
3236 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3237 (the_low_target): Install arm_get_syscall_trapinfo.
3239 2016-06-28 Yao Qi <yao.qi@linaro.org>
3241 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3243 (the_low_target): Install aarch64_get_syscall_trapinfo.
3245 2016-06-28 Yao Qi <yao.qi@linaro.org>
3247 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3249 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3250 Remove parameter sysno.
3251 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3254 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3256 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3257 (s390_emit_ne_goto): Likewise.
3258 (s390_emit_lt_goto): Likewise.
3259 (s390_emit_le_goto): Likewise.
3260 (s390_emit_gt_goto): Likewise.
3261 (s390_emit_ge_goto): Likewise.
3262 (s390x_emit_eq_goto): Likewise.
3263 (s390x_emit_ne_goto): Likewise.
3264 (s390x_emit_lt_goto): Likewise.
3265 (s390x_emit_le_goto): Likewise.
3266 (s390x_emit_gt_goto): Likewise.
3267 (s390x_emit_ge_goto): Likewise.
3268 (s390_emit_ops_impl): Mark variable static.
3269 (s390x_emit_ops): Likewise.
3271 2016-06-17 Yao Qi <yao.qi@linaro.org>
3273 * linux-low.c (handle_extended_wait): Call
3274 uninsert_reinsert_breakpoints for the parent process. Remove
3275 reinsert breakpoints from the child process. Reinsert them to
3276 the parent process when vfork is done.
3277 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3278 (reinsert_reinsert_breakpoints): New function.
3279 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3280 (reinsert_reinsert_breakpoints): Declare.
3282 2016-06-17 Yao Qi <yao.qi@linaro.org>
3284 * linux-low.c (handle_extended_wait): If the parent is doing
3285 step-over, remove the reinsert breakpoints from the forked child.
3287 2016-06-17 Yao Qi <yao.qi@linaro.org>
3289 * linux-low.c (unsuspend_all_lwps): Declare.
3290 (linux_low_filter_event): If thread exited, call finish_step_over.
3291 If step-over is finished, unsuspend other threads.
3293 2016-06-17 Yao Qi <yao.qi@linaro.org>
3295 * linux-low.c (linux_resume_one_lwp_throw): Assert
3296 has_reinsert_breakpoints returns false.
3297 * mem-break.c (delete_disabled_breakpoints): Assert
3298 bp type isn't reinsert_breakpoint.
3300 2016-06-17 Yao Qi <yao.qi@linaro.org>
3302 * linux-low.c (maybe_hw_step): New function.
3303 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3304 (finish_step_over): Switch current_thread to lwp temporarily,
3305 and assert has_reinsert_breakpoints returns true.
3306 (proceed_one_lwp): Call maybe_hw_step.
3307 * mem-break.c (has_reinsert_breakpoints): New function.
3308 * mem-break.h (has_reinsert_breakpoints): Declare.
3310 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3312 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3314 2016-05-17 Yao Qi <yao.qi@linaro.org>
3316 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3317 instead of find_inferior.
3319 2016-05-05 Yao Qi <yao.qi@linaro.org>
3321 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3322 Initialize res to zero.
3324 2016-05-05 Yao Qi <yao.qi@linaro.org>
3326 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3329 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3331 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3332 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3333 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3335 2016-04-28 Par Olsson <par.olsson@windriver.com>
3336 Simon Marchi <simon.marchi@ericsson.com>
3338 * tracepoint.c (write_inferior_int8): New function.
3339 (cmd_qtenable_disable): Write enable flag using
3340 write_inferior_int8.
3342 2016-04-25 Yao Qi <yao.qi@linaro.org>
3344 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3345 (need_step_over_p): Return zero if the LWP has pending signals
3346 can be delivered on software single step target.
3348 2016-04-25 Yao Qi <yao.qi@linaro.org>
3350 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3351 return instead of error.
3353 2016-04-22 Yao Qi <yao.qi@linaro.org>
3355 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3358 2016-04-22 Yao Qi <yao.qi@linaro.org>
3360 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3361 signal when stepping over breakpoint with software single
3364 2016-04-21 Pedro Alves <palves@redhat.com>
3366 * linux-s390-low.c (s390_collect_ptrace_register)
3367 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3369 (s390_check_regset): Use void * instead of gdb_byte *.
3371 2016-04-20 Pedro Alves <palves@redhat.com>
3373 * configure: Renegerate.
3375 2016-04-20 Yao Qi <yao.qi@linaro.org>
3377 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3378 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3380 (arm_store_gregset): Likewise.
3382 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3384 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3385 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3386 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3387 (amd64-avx-mpx-linux.c): New rules.
3388 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3389 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3390 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3391 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3392 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3393 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3394 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3395 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3396 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3397 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3398 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3399 * linux-x86-low.c (x86_linux_read_description): Add case for
3400 X86_XSTATE_AVX_MPX_MASK.
3401 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3402 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3403 init_registers_i386_avx_mpx_linux.
3404 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3405 (initialize_low_tracepoint): Call
3406 init_registers_i386_avx_mpx_linux.
3407 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3408 (initialize_low_tracepoint): Call
3409 init_registers_amd64_avx_mpx_linux.
3410 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3411 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3412 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3415 2016-04-18 Pedro Alves <palves@redhat.com>
3417 * configure: Regenerate.
3419 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3422 (aarch64_emit_sub): Likewise.
3424 2016-04-12 Pedro Alves <palves@redhat.com>
3426 * utils.c (prepare_to_throw_exception): Delete.
3428 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3430 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3432 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3434 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3436 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3438 * linux-aarch64-ipa.c: Add <elf.h> include.
3439 * linux-ppc-ipa.c: Add <elf.h> include.
3440 * linux-s390-ipa.c: Add <elf.h> include.
3442 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3444 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3445 (get_raw_reg_ptr): Likewise.
3446 (get_trace_state_variable_value_ptr): Likewise.
3447 (set_trace_state_variable_value_ptr): Likewise.
3448 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3451 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3452 Marcin Kościelnicki <koriakin@0x04.net>
3455 * linux-ppc-low.c (emit_insns): New function.
3456 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3457 (ppc_emit_prologue): New function.
3458 (ppc_emit_epilogue): New function.
3459 (ppc_emit_add): New function.
3460 (ppc_emit_sub): New function.
3461 (ppc_emit_mul): New function.
3462 (ppc_emit_lsh): New function.
3463 (ppc_emit_rsh_signed): New function.
3464 (ppc_emit_rsh_unsigned): New function.
3465 (ppc_emit_ext): New function.
3466 (ppc_emit_zero_ext): New function.
3467 (ppc_emit_log_not): New function.
3468 (ppc_emit_bit_and): New function.
3469 (ppc_emit_bit_or): New function.
3470 (ppc_emit_bit_xor): New function.
3471 (ppc_emit_bit_not): New function.
3472 (ppc_emit_equal): New function.
3473 (ppc_emit_less_signed): New function.
3474 (ppc_emit_less_unsigned): New function.
3475 (ppc_emit_ref): New function.
3476 (ppc_emit_const): New function.
3477 (ppc_emit_reg): New function.
3478 (ppc_emit_pop): New function.
3479 (ppc_emit_stack_flush): New function.
3480 (ppc_emit_swap): New function.
3481 (ppc_emit_stack_adjust): New function.
3482 (ppc_emit_call): New function.
3483 (ppc_emit_int_call_1): New function.
3484 (ppc_emit_void_call_2): New function.
3485 (ppc_emit_if_goto): New function.
3486 (ppc_emit_goto): New function.
3487 (ppc_emit_eq_goto): New function.
3488 (ppc_emit_ne_goto): New function.
3489 (ppc_emit_lt_goto): New function.
3490 (ppc_emit_le_goto): New function.
3491 (ppc_emit_gt_goto): New function.
3492 (ppc_emit_ge_goto): New function.
3493 (ppc_write_goto_address): New function.
3494 (ppc_emit_ops_impl): New static variable.
3495 (ppc64v1_emit_prologue): New function.
3496 (ppc64v2_emit_prologue): New function.
3497 (ppc64_emit_epilogue): New function.
3498 (ppc64_emit_add): New function.
3499 (ppc64_emit_sub): New function.
3500 (ppc64_emit_mul): New function.
3501 (ppc64_emit_lsh): New function.
3502 (ppc64_emit_rsh_signed): New function.
3503 (ppc64_emit_rsh_unsigned): New function.
3504 (ppc64_emit_ext): New function.
3505 (ppc64_emit_zero_ext): New function.
3506 (ppc64_emit_log_not): New function.
3507 (ppc64_emit_bit_and): New function.
3508 (ppc64_emit_bit_or): New function.
3509 (ppc64_emit_bit_xor): New function.
3510 (ppc64_emit_bit_not): New function.
3511 (ppc64_emit_equal): New function.
3512 (ppc64_emit_less_signed): New function.
3513 (ppc64_emit_less_unsigned): New function.
3514 (ppc64_emit_ref): New function.
3515 (ppc64_emit_const): New function.
3516 (ppc64v1_emit_reg): New function.
3517 (ppc64v2_emit_reg): New function.
3518 (ppc64_emit_pop): New function.
3519 (ppc64_emit_stack_flush): New function.
3520 (ppc64_emit_swap): New function.
3521 (ppc64v1_emit_call): New function.
3522 (ppc64v2_emit_call): New function.
3523 (ppc64v1_emit_int_call_1): New function.
3524 (ppc64v2_emit_int_call_1): New function.
3525 (ppc64v1_emit_void_call_2): New function.
3526 (ppc64v2_emit_void_call_2): New function.
3527 (ppc64_emit_if_goto): New function.
3528 (ppc64_emit_eq_goto): New function.
3529 (ppc64_emit_ne_goto): New function.
3530 (ppc64_emit_lt_goto): New function.
3531 (ppc64_emit_le_goto): New function.
3532 (ppc64_emit_gt_goto): New function.
3533 (ppc64_emit_ge_goto): New function.
3534 (ppc64v1_emit_ops_impl): New static variable.
3535 (ppc64v2_emit_ops_impl): New static variable.
3536 (ppc_emit_ops): New function.
3537 (linux_low_target): Wire in ppc_emit_ops.
3539 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3540 Marcin Kościelnicki <koriakin@0x04.net>
3543 * Makefile.in: Add powerpc-*-ipa.o
3544 * configure.srv: Add ipa_obj for powerpc*-linux.
3545 * linux-ppc-ipa.c: New file.
3546 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3548 (PPC_FIELD): New macro.
3549 (PPC_SEXT): New macro.
3550 (PPC_OP6): New macro.
3551 (PPC_BO): New macro.
3552 (PPC_LI): New macro.
3553 (PPC_BD): New macro.
3554 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3555 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3556 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3557 (ppc_get_thread_area): New function.
3558 (is_elfv2_inferior): New function.
3559 (gen_ds_form): New function.
3560 (GEN_STD): New macro.
3561 (GEN_STDU): New macro.
3562 (GEN_LD): New macro.
3563 (GEN_LDU): New macro.
3564 (gen_d_form): New function.
3565 (GEN_ADDI): New macro.
3566 (GEN_ADDIS): New macro.
3567 (GEN_LI): New macro.
3568 (GEN_LIS): New macro.
3569 (GEN_ORI): New macro.
3570 (GEN_ORIS): New macro.
3571 (GEN_LWZ): New macro.
3572 (GEN_STW): New macro.
3573 (GEN_STWU): New macro.
3574 (gen_xfx_form): New function.
3575 (GEN_MFSPR): New macro.
3576 (GEN_MTSPR): New macro.
3577 (GEN_MFCR): New macro.
3578 (GEN_MTCR): New macro.
3579 (GEN_SYNC): New macro.
3580 (GEN_LWSYNC): New macro.
3581 (gen_x_form): New function.
3582 (GEN_OR): New macro.
3583 (GEN_MR): New macro.
3584 (GEN_LWARX): New macro.
3585 (GEN_STWCX): New macro.
3586 (GEN_CMPW): New macro.
3587 (gen_md_form): New function.
3588 (GEN_RLDICL): New macro.
3589 (GEN_RLDICR): New macro.
3590 (gen_i_form): New function.
3592 (GEN_BL): New macro.
3593 (gen_b_form): New function.
3594 (GEN_BNE): New macro.
3595 (GEN_LOAD): New macro.
3596 (GEN_STORE): New macro.
3597 (gen_limm): New function.
3598 (gen_atomic_xchg): New function.
3599 (gen_call): New function.
3600 (ppc_relocate_instruction): New function.
3601 (ppc_install_fast_tracepoint_jump_pad): New function.
3602 (ppc_get_min_fast_tracepoint_insn_len): New function.
3603 (ppc_get_ipa_tdesc_idx): New function.
3604 (the_low_target): Wire in the new functions.
3605 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3607 * linux-ppc-tdesc.h: New file.
3609 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3611 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3612 (alloc_jump_pad_buffer): New function.
3613 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3614 (alloc_jump_pad_buffer): New function.
3615 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3616 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3617 (alloc_jump_pad_buffer): New function.
3618 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3619 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3620 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3621 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3623 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3625 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3626 * linux-amd64-ipa.c: Likewise.
3627 * linux-i386-ipa.c: Likewise.
3628 * linux-s390-ipa.c: Likewise.
3629 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3630 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3631 set_trace_state_variable_value_ptr.
3632 (struct ipa_sym_addresses): Likewise.
3633 (symbol_list): Likewise.
3634 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3635 accessing gdb_collect directly.
3636 (gdb_collect_ptr_type): New typedef.
3637 (get_raw_reg_ptr_type): New typedef.
3638 (get_trace_state_variable_value_ptr_type): New typedef.
3639 (set_trace_state_variable_value_ptr_type): New typedef.
3640 (gdb_collect_ptr): New global.
3641 (get_raw_reg_ptr): New global.
3642 (get_trace_state_variable_value_ptr): New global.
3643 (set_trace_state_variable_value_ptr): New global.
3644 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3645 accessing get_raw_reg directly.
3646 (get_get_tsv_func_addr): Likewise for
3647 get_trace_state_variable_value_ptr.
3648 (get_set_tsv_func_addr): Likewise for
3649 set_trace_state_variable_value_ptr.
3650 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3652 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3654 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3656 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3658 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3660 (relocate_instruction): Remove own_buf.
3661 * server.c (own_buf): Make global.
3662 (handle_v_requests): Make global.
3663 * server.h (own_buf): New declaration.
3664 (handle_v_requests): New prototype.
3666 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3669 * linux-s390-low.c (add_insns): New function.
3670 (s390_emit_prologue): New function.
3671 (s390_emit_epilogue): New function.
3672 (s390_emit_add): New function.
3673 (s390_emit_sub): New function.
3674 (s390_emit_mul): New function.
3675 (s390_emit_lsh): New function.
3676 (s390_emit_rsh_signed): New function.
3677 (s390_emit_rsh_unsigned): New function.
3678 (s390_emit_ext): New function.
3679 (s390_emit_log_not): New function.
3680 (s390_emit_bit_and): New function.
3681 (s390_emit_bit_or): New function.
3682 (s390_emit_bit_xor): New function.
3683 (s390_emit_bit_not): New function.
3684 (s390_emit_equal): New function.
3685 (s390_emit_less_signed): New function.
3686 (s390_emit_less_unsigned): New function.
3687 (s390_emit_ref): New function.
3688 (s390_emit_if_goto): New function.
3689 (s390_emit_goto): New function.
3690 (s390_write_goto_address): New function.
3691 (s390_emit_litpool): New function.
3692 (s390_emit_const): New function.
3693 (s390_emit_call): New function.
3694 (s390_emit_reg): New function.
3695 (s390_emit_pop): New function.
3696 (s390_emit_stack_flush): New function.
3697 (s390_emit_zero_ext): New function.
3698 (s390_emit_swap): New function.
3699 (s390_emit_stack_adjust): New function.
3700 (s390_emit_set_r2): New function.
3701 (s390_emit_int_call_1): New function.
3702 (s390_emit_void_call_2): New function.
3703 (s390_emit_eq_goto): New function.
3704 (s390_emit_ne_goto): New function.
3705 (s390_emit_lt_goto): New function.
3706 (s390_emit_le_goto): New function.
3707 (s390_emit_gt_goto): New function.
3708 (s390_emit_ge_goto): New function.
3709 (s390x_emit_prologue): New function.
3710 (s390x_emit_epilogue): New function.
3711 (s390x_emit_add): New function.
3712 (s390x_emit_sub): New function.
3713 (s390x_emit_mul): New function.
3714 (s390x_emit_lsh): New function.
3715 (s390x_emit_rsh_signed): New function.
3716 (s390x_emit_rsh_unsigned): New function.
3717 (s390x_emit_ext): New function.
3718 (s390x_emit_log_not): New function.
3719 (s390x_emit_bit_and): New function.
3720 (s390x_emit_bit_or): New function.
3721 (s390x_emit_bit_xor): New function.
3722 (s390x_emit_bit_not): New function.
3723 (s390x_emit_equal): New function.
3724 (s390x_emit_less_signed): New function.
3725 (s390x_emit_less_unsigned): New function.
3726 (s390x_emit_ref): New function.
3727 (s390x_emit_if_goto): New function.
3728 (s390x_emit_const): New function.
3729 (s390x_emit_call): New function.
3730 (s390x_emit_reg): New function.
3731 (s390x_emit_pop): New function.
3732 (s390x_emit_stack_flush): New function.
3733 (s390x_emit_zero_ext): New function.
3734 (s390x_emit_swap): New function.
3735 (s390x_emit_stack_adjust): New function.
3736 (s390x_emit_int_call_1): New function.
3737 (s390x_emit_void_call_2): New function.
3738 (s390x_emit_eq_goto): New function.
3739 (s390x_emit_ne_goto): New function.
3740 (s390x_emit_lt_goto): New function.
3741 (s390x_emit_le_goto): New function.
3742 (s390x_emit_gt_goto): New function.
3743 (s390x_emit_ge_goto): New function.
3744 (s390_emit_ops): New function.
3745 (struct linux_target_ops): Fill in emit_ops hook.
3747 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3750 * Makefile.in: Add s390 IPA files.
3751 * configure.srv: Build IPA for s390.
3752 * linux-s390-ipa.c: New file.
3753 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3754 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3755 (tdesc_s390_linux32): Likewise.
3756 (init_registers_s390_linux32v1): Likewise.
3757 (tdesc_s390_linux32v1): Likewise.
3758 (init_registers_s390_linux32v2): Likewise.
3759 (tdesc_s390_linux32v2): Likewise.
3760 (init_registers_s390_linux64): Likewise.
3761 (tdesc_s390_linux64): Likewise.
3762 (init_registers_s390_linux64v1): Likewise.
3763 (tdesc_s390_linux64v1): Likewise.
3764 (init_registers_s390_linux64v2): Likewise.
3765 (tdesc_s390_linux64v2): Likewise.
3766 (init_registers_s390_te_linux64): Likewise.
3767 (tdesc_s390_te_linux64): Likewise.
3768 (init_registers_s390_vx_linux64): Likewise.
3769 (tdesc_s390_vx_linux64): Likewise.
3770 (init_registers_s390_tevx_linux64): Likewise.
3771 (tdesc_s390_tevx_linux64): Likewise.
3772 (init_registers_s390x_linux64): Likewise.
3773 (tdesc_s390x_linux64): Likewise.
3774 (init_registers_s390x_linux64v1): Likewise.
3775 (tdesc_s390x_linux64v1): Likewise.
3776 (init_registers_s390x_linux64v2): Likewise.
3777 (tdesc_s390x_linux64v2): Likewise.
3778 (init_registers_s390x_te_linux64): Likewise.
3779 (tdesc_s390x_te_linux64): Likewise.
3780 (init_registers_s390x_vx_linux64): Likewise.
3781 (tdesc_s390x_vx_linux64): Likewise.
3782 (init_registers_s390x_tevx_linux64): Likewise.
3783 (tdesc_s390x_tevx_linux64): Likewise.
3784 (have_hwcap_s390_vx): New static variable.
3785 (s390_arch_setup): Fill have_hwcap_s390_vx.
3786 (s390_get_thread_area): New function.
3787 (s390_ft_entry_gpr_esa): New const.
3788 (s390_ft_entry_gpr_zarch): New const.
3789 (s390_ft_entry_misc): New const.
3790 (s390_ft_entry_fr): New const.
3791 (s390_ft_entry_vr): New const.
3792 (s390_ft_main_31): New const.
3793 (s390_ft_main_64): New const.
3794 (s390_ft_exit_fr): New const.
3795 (s390_ft_exit_vr): New const.
3796 (s390_ft_exit_misc): New const.
3797 (s390_ft_exit_gpr_esa): New const.
3798 (s390_ft_exit_gpr_zarch): New const.
3799 (append_insns): New function.
3800 (s390_relocate_instruction): New function.
3801 (s390_install_fast_tracepoint_jump_pad): New function.
3802 (s390_get_min_fast_tracepoint_insn_len): New function.
3803 (s390_get_ipa_tdesc_idx): New function.
3804 (struct linux_target_ops): Wire in the above functions.
3805 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3806 * linux-s390-tdesc.h: New file.
3808 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3810 * linux-s390-low.c (s390_supports_tracepoints): New function.
3811 (struct linux_target_ops): Fill supports_tracepoints hook.
3813 2016-03-18 Yao Qi <yao.qi@linaro.org>
3815 * linux-low.c (lwp_signal_can_be_delivered): New function.
3816 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3818 2016-03-18 Yao Qi <yao.qi@linaro.org>
3820 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3821 0 if signal is enqueued. Remove 'signal' from one debugging
3822 message. Move one debugging message to some lines below.
3823 Remove code setting 'signal' to 0.
3825 2016-03-18 Yao Qi <yao.qi@linaro.org>
3827 * linux-low.c (linux_low_filter_event): Remove redundant
3828 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3830 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3832 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3833 (struct linux_target_ops): Wire in the above.
3835 2016-03-03 Yao Qi <yao.qi@linaro.org>
3837 * linux-low.c: Update comments to start_step_over.
3839 2016-03-03 Yao Qi <yao.qi@linaro.org>
3842 * linux-low.c (handle_extended_wait): Set child suspended
3843 if event_lwp->bp_reinsert isn't zero.
3845 2016-03-02 Yao Qi <yao.qi@linaro.org>
3847 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3848 enqueue_pending_signal.
3850 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3852 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3855 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3857 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3858 (s390_regmap_3264) [!__s390x__]: New global.
3859 (s390_collect_ptrace_register): Skip map entries containing -1.
3860 (s390_supply_ptrace_register): Ditto.
3861 (s390_fill_gprs_high): New function.
3862 (s390_store_gprs_high): New function.
3863 (s390_regsets): Add NT_S390_HIGH_GPRS.
3864 (s390_get_hwcap): Enable on 31-bit.
3865 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3866 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3867 Detect NT_S390_HIGH_GPRS.
3868 (s390_usrregs_info_3264): Enable on 31-bit.
3869 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3870 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3872 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3875 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3876 * configure.srv: Ditto.
3877 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3878 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3879 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3880 (init_registers_amd64_linux): Remove prototype.
3881 (tdesc_amd64_linux): Remove declaration.
3882 (get_ipa_tdesc): New function.
3883 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3884 initialize remaining tdescs.
3885 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3886 (init_registers_i386_linux): Remove prototype.
3887 (tdesc_i386_linux): Remove declaration.
3888 (get_ipa_tdesc): New function.
3889 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3890 initialize remaining tdescs.
3891 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3892 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3893 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3894 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3895 (x86_get_ipa_tdesc_idx): New function.
3896 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3897 * linux-x86-tdesc.h: New file.
3898 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3899 (target_get_ipa_tdesc_idx): New macro.
3900 * tracepoint.c (ipa_tdesc_idx): New macro.
3901 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3902 (symbol_list): Add ipa_tdesc_idx.
3903 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3904 (ipa_tdesc): Remove.
3905 (ipa_tdesc_idx): New variable.
3906 (get_context_regcache): Use get_ipa_tdesc.
3907 (gdb_collect): Ditto.
3909 * tracepoint.h (get_ipa_tdesc): New prototype.
3910 (ipa_tdesc): Remove.
3912 2016-02-24 Pedro Alves <palves@redhat.com>
3914 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3915 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3916 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3917 Factor out common code between the USE_SIGTRAP_SIGINFO and
3918 !USE_SIGTRAP_SIGINFO blocks.
3919 (linux_low_filter_event): Call save_stop_reason instead of
3920 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3922 (linux_wait_1): Update comments.
3924 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3926 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3927 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3928 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3929 ppc_insert_point, ppc_remove_point.
3931 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3933 * linux-s390-low.c (s390_supports_z_point_type): New function.
3934 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3936 2016-02-16 Yao Qi <yao.qi@linaro.org>
3938 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3939 PC. Get pc from regcache_read_pc.
3941 2016-02-12 Yao Qi <yao.qi@linaro.org>
3943 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3944 or linux_get_pc_32bit.
3945 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3947 2016-02-12 Yao Qi <yao.qi@linaro.org>
3949 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3950 arm_linux_get_next_pcs_fixup.
3952 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3954 * tracepoint.c (x_tracepoint_action_download): Change
3955 write_inferior_data_ptr to write_inferior_data_pointer.
3956 (cmd_qtstart): Likewise.
3957 (write_inferior_data_ptr): Remove.
3958 (download_agent_expr): Change write_inferior_data_ptr to
3959 write_inferior_data_pointer.
3960 (download_tracepoint_1): Likewise.
3961 (download_tracepoint): Likewise.
3962 (download_trace_state_variables): Likewise.
3964 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3965 Marcin Kościelnicki <koriakin@0x04.net>
3967 * tracepoint.c (struct tracepoint_action_ops): Remove.
3968 (struct tracepoint_action): Remove ops.
3969 (m_tracepoint_action_download, r_tracepoint_action_download)
3970 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3971 size and offset accordingly.
3972 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3973 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3974 (tracepoint_action_send, tracepoint_action_download): New functions.
3975 Helpers for trace action handlers.
3976 (add_tracepoint_action): Remove setup actions ops.
3977 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3979 2016-02-10 Yao Qi <yao.qi@linaro.org>
3981 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3983 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3985 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3987 * configure: Regenerate.
3989 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3991 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3992 void * to gdb_byte *.
3993 * linux-low.c (siginfo_fixup): Likewise.
3994 (linux_xfer_siginfo): Likewise.
3995 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3997 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3999 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4001 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4003 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4005 * linux-x86-low.c [__x86_64__]: Include
4006 "nat/amd64-linux-siginfo.h".
4007 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4008 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4009 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4010 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4011 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4012 (cpt_si_fd, si_timerid, si_overrun): Move from
4013 nat/amd64-linux-siginfo.c.
4014 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4016 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4018 * server.c (skip_to_semicolon): Remove.
4019 (process_point_options): Use strchrnul instead of
4022 2016-01-26 Yao Qi <yao.qi@linaro.org>
4024 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4025 * linux-low.c (install_software_single_step_breakpoints): Don't
4026 call regcache_read_pc.
4027 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4030 2016-01-26 Yao Qi <yao.qi@linaro.org>
4032 * linux-low.c (install_software_single_step_breakpoints): Call
4033 regcache_read_pc instead of get_pc.
4035 2016-01-26 Yao Qi <yao.qi@linaro.org>
4037 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4038 (unblock_async_io): Rename to ...
4039 (block_unblock_async_io): ... it. New function.
4040 (enable_async_io): Don't install SIGIO handler. Unblock it
4042 (disable_async_io): Don't ignore SIGIO. Block it instead.
4043 (initialize_async_io): Install SIGIO handler. Don't call
4046 2016-01-26 Yao Qi <yao.qi@linaro.org>
4048 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4049 first character is '\003', call *the_target->request_interrupt.
4051 2016-01-25 Yao Qi <yao.qi@linaro.org>
4053 * remote-utils.c (new_thread_notify): Remove.
4054 (dead_thread_notify): Likewise.
4055 * remote-utils.h (new_thread_notify): Remove declaration.
4056 (dead_thread_notify): Likewise.
4058 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4060 * gdb.trace/pending.exp: Fix expected message on continue.
4062 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4064 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4065 it works properly on big-endian machines where sizeof (CORE_ADDR)
4068 2016-01-21 Pedro Alves <palves@redhat.com>
4070 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4071 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4072 * configure: Regenerate.
4074 2016-01-21 Yao Qi <yao.qi@linaro.org>
4076 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4077 is_thumb and set it according to CPSR saved on the stack.
4078 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4079 arm_sigreturn_next_pc.
4081 2016-01-18 Yao Qi <yao.qi@linaro.org>
4083 * linux-low.c (linux_set_pc_64bit): New function.
4084 (linux_get_pc_64bit): New function.
4085 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4087 * linux-sparc-low.c (debug_threads): Remove declaration.
4088 (sparc_get_pc): Remove.
4089 (the_low_target): Use linux_get_pc_64bit instead of
4091 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4092 (the_low_target): Use linux_get_pc_64bit and
4095 2016-01-18 Yao Qi <yao.qi@linaro.org>
4097 * linux-arm-low.c (debug_threads): Remove declaration.
4098 (arm_get_pc, arm_set_pc): Remove.
4099 (the_low_target): Use linux_get_pc_32bit and
4101 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4102 (the_low_target): Use linux_get_pc_32bit and
4104 * linux-cris-low.c (debug_threads): Remove declaration.
4105 (cris_get_pc, cris_set_pc,): Remove.
4106 (the_low_target): Use linux_get_pc_32bit and
4108 * linux-crisv32-low.c (debug_threads): Remove declaration.
4109 (cris_get_pc, cris_set_pc): Remove.
4110 (the_low_target): Use linux_get_pc_32bit and
4112 * linux-low.c: Include inttypes.h.
4113 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4114 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4115 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4116 (the_low_target): Use linux_get_pc_32bit and
4118 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4119 (the_low_target): Use linux_get_pc_32bit and
4121 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4122 (the_low_target): Use linux_get_pc_32bit and
4124 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4125 (the_low_target): Use linux_get_pc_32bit and
4127 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4128 (the_low_target): Use linux_get_pc_32bit and
4131 2016-01-18 Gary Benson <gbenson@redhat.com>
4133 * configure.ac (AC_FUNC_FORK): New check.
4134 * config.in: Regenerate.
4135 * configure: Likewise.
4137 2016-01-14 Yao Qi <yao.qi@linaro.org>
4139 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4140 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4141 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4142 arm_get_next_pcs_ctor.
4144 2016-01-12 Josh Stone <jistone@redhat.com>
4145 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4147 * inferiors.h: Include "gdb_vecs.h".
4148 (struct process_info): Add syscalls_to_catch.
4149 * inferiors.c (remove_process): Free syscalls_to_catch.
4150 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4151 syscall_return stops.
4152 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4153 * server.c (handle_general_set): Handle QCatchSyscalls.
4154 (handle_query): Report support for QCatchSyscalls.
4155 * target.h (struct target_ops): Add supports_catch_syscall.
4156 (target_supports_catch_syscall): New macro.
4157 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4158 (struct lwp_info): Add syscall_state.
4159 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4160 Maintain syscall_state and syscalls_to_catch across exec.
4161 (get_syscall_trapinfo): New function, proxy to the_low_target.
4162 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4163 (linux_low_filter_event): Toggle syscall_state entry/return for
4164 syscall traps, and set it ignored for all others.
4165 (gdb_catching_syscalls_p): New function.
4166 (gdb_catch_this_syscall_p): New function.
4167 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4168 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4169 (linux_supports_catch_syscall): New function.
4170 (linux_target_ops): Install it.
4171 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4172 (the_low_target): Install it.
4174 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4176 * acinclude.m4: Include new ../warning.m4 file.
4177 * configure: Regenerated.
4178 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4180 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4182 * ax.c (is_goto_target): Mark static.
4183 * linux-low.c (register_addr): Likewise.
4184 (linux_fetch_registers, linux_store_registers): Likewise.
4185 * mem-break.c (any_persistent_commands): Fix old prototype.
4186 (add_commands_to_breakpoint): Mark static.
4187 * regcache.c (find_register_by_name): Delete unused func.
4188 * remote-utils.c (hex_or_minus_one): Mark static.
4189 * server.c (monitor_show_help): Mark static.
4190 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4191 handle_v_requests): Likewise.
4193 2016-01-12 Pedro Alves <palves@redhat.com>
4195 Remove use of the registered trademark symbol throughout.
4197 2016-01-08 Yao Qi <yao.qi@linaro.org>
4199 * remote-utils.c (getpkt): If c is '\003', call target hook
4202 2016-01-06 Yao Qi <yao.qi@linaro.org>
4204 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4205 linux-aarch32-low.c.
4206 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4207 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4208 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4209 (thumb2_breakpoint): Declare.
4210 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4211 linux-aarch32-low.h.
4212 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4213 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4214 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4216 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4218 * gdbreplay.c (gdbreplay_version): Change copyright year in
4220 * server.c (gdbserver_version): Likewise.
4222 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4224 * server.c (crc32_table): Delete.
4225 (crc32): Use libiberty's xcrc32 function.
4227 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4229 * lynx-low.c (lynx_delete_thread_callback): New function.
4230 (lynx_mourn): Properly delete our process and all of its
4231 threads. Remove call to clear_inferiors.
4233 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4235 * target.c (thread_search_callback): Add check that
4236 the thread_stopped target callback is not NULL before
4239 2015-12-21 Yao Qi <yao.qi@linaro.org>
4241 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4244 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4246 * server.c (handle_query): Call target_supports_software_single_step.
4248 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4250 * linux-low.c (single_step): New function.
4251 (linux_resume_one_lwp_throw): Call single_step.
4252 (start_step_over): Likewise.
4254 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4256 * Makefile.in (SFILES): Append arch/arm-linux.c,
4257 arch/arm-get-next-pcs.c.
4258 (arm-linux.o): New rule.
4259 (arm-get-next-pcs.o): New rule.
4260 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4262 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4263 to linux-aarch32-low.c.
4264 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4265 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4266 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4267 (thumb2_breakpoint_len): Likewise.
4268 (arm_is_thumb_mode): Make non-static.
4269 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4270 from linux-aarch32-low.c.
4271 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4272 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4273 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4274 (thumb2_breakpoint_len): Likewise.
4275 (arm_is_thumb_mode): New declaration.
4276 * linux-arm-low.c: Include arch/arm-linux.h
4277 aarch/arm-get-next-pcs.h, sys/syscall.h.
4278 (get_next_pcs_ops): New struct.
4279 (get_next_pcs_addr_bits_remove): New function.
4280 (get_next_pcs_is_thumb): New function.
4281 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4282 (arm_sigreturn_next_pc): Likewise.
4283 (get_next_pcs_syscall_next_pc): Likewise.
4284 (arm_gdbserver_get_next_pcs): Likewise.
4285 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4287 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4288 * server.h: Include gdb_vecs.h.
4290 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4292 * Makefile.in (SFILES): Append common/common-regcache.c.
4293 (OBS): Append common-regcache.o.
4294 (common-regcache.o): New rule.
4295 * regcache.c (init_register_cache): Initialize cache to
4297 (regcache_raw_read_unsigned): New function.
4298 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4299 register_status enum.
4301 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4303 * linux-aarch64-low.c (the_low_targets): Rename
4304 breakpoint_reinsert_addr to get_next_pcs.
4305 * linux-arm-low.c (the_low_targets): Likewise.
4306 * linux-bfin-low.c (the_low_targets): Likewise.
4307 * linux-cris-low.c (the_low_targets): Likewise.
4308 * linux-crisv32-low.c (the_low_targets): Likewise.
4309 * linux-low.c (can_software_single_step): Likewise.
4310 (install_software_single_step_breakpoints): New function.
4311 (start_step_over): Use install_software_single_step_breakpoints.
4312 * linux-low.h: New CORE_ADDR vector.
4313 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4315 * linux-mips-low.c (the_low_targets): Likewise.
4316 * linux-nios2-low.c (the_low_targets): Likewise.
4317 * linux-sparc-low.c (the_low_targets): Likewise.
4319 2015-12-17 Pedro Alves <palves@redhat.com>
4321 * linux-low.c (linux_kill_one_lwp): Remove references to
4323 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4325 (linux_init_signals): Delete.
4326 (initialize_low): Adjust.
4327 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4329 2015-12-16 Pedro Alves <palves@redhat.com>
4331 * configure.ac (compiler warning flags): When testing a
4332 -Wno-foo option, check whether -Wfoo works instead.
4333 * configure: Regenerate.
4335 2015-12-11 Don Breazeal <donb@codesourcery.com>
4337 * server.c (process_serial_event): Don't exit from gdbserver
4338 in remote mode if there are still active inferiors.
4340 2015-12-11 Yao Qi <yao.qi@linaro.org>
4342 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4343 arm_breakpoint_at if the process is 32-bit.
4345 2015-12-11 Yao Qi <yao.qi@linaro.org>
4347 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4350 2015-12-07 Yao Qi <yao.qi@linaro.org>
4352 * configure.srv: Append arm.o to srv_tgtobj for
4353 aarch64*-*-linux* target.
4354 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4355 from linux-arm-low.c.
4356 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4357 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4358 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4359 (thumb2_breakpoint_len): Likewise.
4360 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4361 (arm_breakpoint_kinds): Likewise.
4362 (arm_breakpoint_kind_from_pc): Likewise.
4363 (arm_sw_breakpoint_from_kind): Likewise.
4364 (arm_breakpoint_kind_from_current_state): Likewise.
4365 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4366 (arm_sw_breakpoint_from_kind): Declare.
4367 (arm_breakpoint_kind_from_current_state): Declare.
4368 (arm_breakpoint_at): Declare.
4369 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4370 arm_sw_breakpoint_from_kind if process is 32-bit.
4371 (aarch64_breakpoint_kind_from_pc): New function.
4372 (aarch64_breakpoint_kind_from_current_state): New function.
4373 (the_low_target): Initialize fields breakpoint_kind_from_pc
4374 and breakpoint_kind_from_current_state.
4375 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4376 linux-aarch32-low.c.
4377 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4378 (arm_breakpoint, arm_breakpoint_len): Likewise.
4379 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4380 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4381 (arm_is_thumb_mode): Likewise.
4382 (arm_breakpoint_at): Likewise.
4383 (arm_breakpoint_kind_from_pc): Likewise.
4384 (arm_sw_breakpoint_from_kind): Likewise.
4385 (arm_breakpoint_kind_from_current_state): Likewise.
4388 2015-08-04 Yao Qi <yao.qi@linaro.org>
4390 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4391 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4392 * server.c (extended_protocol): Remove "static".
4393 * server.h (extended_protocol): Declare it.
4395 2015-12-04 Josh Stone <jistone@redhat.com>
4397 * target.h (struct target_ops) <arch_setup>: Rename to ...
4398 (struct target_ops) <post_create_inferior>: ... this.
4399 (target_arch_setup): Rename to ...
4400 (target_post_create_inferior): ... this, calling post_create_inferior.
4401 * server.c (start_inferior): Update target_arch_setup calls to
4402 target_post_create_inferior.
4403 * linux-low.c (linux_low_ptrace_options): Forward declare.
4404 (linux_arch_setup): Update its comment for general use.
4405 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4406 (struct linux_target_ops): Use linux_post_create_inferior.
4407 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4408 to post_create_inferior.
4409 * nto-low.c (struct nto_target_ops): Likewise.
4410 * spu-low.c (struct spu_target_ops): Likewise.
4411 * win32-low.c (struct win32_target_ops): Likewise.
4413 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4415 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4417 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4419 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4420 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4421 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4422 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4423 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4424 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4425 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4426 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4427 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4428 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4429 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4430 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4432 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4434 * linux-low.c (linux_look_up_symbols): Don't call
4435 linux_supports_traceclone.
4436 * linux-low.h (thread_db_init): Remove use_events argument.
4437 * thread-db.c (thread_db_use_event): Remove global variable.
4438 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4439 (struct thread_db) <td_create_bp>: Remove field.
4440 (thread_db_create_event): Remove function.
4441 (thread_db_enable_reporting): Likewise.
4442 (find_one_thread): Don't check for thread_db_use_events.
4443 (attach_thread): Likewise.
4444 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4445 (try_thread_db_load_1): Don't check for thread_db_use_events.
4446 (thread_db_init): Remove use_events argument and thread events
4448 (remove_thread_event_breakpoints): Remove function.
4449 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4451 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4453 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4455 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4456 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4457 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4458 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4459 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4461 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4463 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4464 * linux-low.c (can_hardware_single_step): Use
4465 supports_hardware_single_step.
4466 (can_software_single_step): New function.
4467 (start_step_over): Call can_software_single_step.
4468 (linux_supports_hardware_single_step): New function.
4469 (struct target_ops) <supports_software_single_step>: Initialize.
4470 * linux-low.h (struct linux_target_ops)
4471 <supports_hardware_single_step>: Initialize.
4472 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4473 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4474 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4475 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4476 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4477 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4478 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4479 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4480 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4481 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4483 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4484 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4486 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4487 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4488 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4490 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4491 * target.h (struct target_ops): <supports_software_single_step>:
4493 (target_supports_software_single_step): New macro.
4495 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4497 * linux-low.c (linux_wait_1): Fix pc advance condition.
4498 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4499 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4501 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4503 * linux-arm-low.c (arm_is_thumb_mode): New function.
4504 (arm_breakpoint_at): Use arm_is_thumb_mode.
4505 (arm_breakpoint_kind_from_current_state): New function.
4506 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4508 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4509 (linux_breakpoint_kind_from_current_state): New function.
4510 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4511 * linux-low.h (struct linux_target_ops)
4512 <breakpoint_kind_from_current_state>: New field.
4513 * target.h (struct target_ops): Likewise.
4514 (target_breakpoint_kind_from_current_state): New macro.
4516 2015-11-30 Pedro Alves <palves@redhat.com>
4518 * linux-low.c (linux_resume): Wake up the event loop before
4521 2015-11-30 Pedro Alves <palves@redhat.com>
4523 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4525 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4527 * target.c (struct thread_search): New structure.
4528 (thread_search_callback): New function.
4529 (prev_general_thread): New global.
4530 (prepare_to_access_memory, done_accessing_memory): New functions.
4531 * target.h (prepare_to_access_memory, done_accessing_memory):
4532 Replace macros with function declarations.
4534 2015-11-30 Pedro Alves <palves@redhat.com>
4537 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4538 report TARGET_WAITKIND_NO_RESUMED.
4539 * remote-utils.c (prepare_resume_reply): Handle
4540 TARGET_WAITKIND_NO_RESUMED.
4541 * server.c (report_no_resumed): New global.
4542 (handle_query) <qSupported>: Handle "no-resumed+". Report
4543 "no-resumed+" support.
4544 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4545 return error if the client doesn't support no-resumed events.
4546 (push_stop_notification): New function.
4547 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4548 events if the client supports them.
4550 2015-11-30 Pedro Alves <palves@redhat.com>
4552 * linux-low.c (thread_still_has_status_pending_p): Don't check
4554 (lwp_resumed): New function.
4555 (status_pending_p_callback): Return early if the LWP is not
4556 supposed to be resumed.
4558 2015-11-30 Pedro Alves <palves@redhat.com>
4560 * linux-low.c (handle_extended_wait): Assert that the LWP's
4561 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4562 thread create events, leave the new child's status pending.
4563 (linux_low_filter_event): If GDB wants to hear about thread exit
4564 events, leave the LWP marked dead and don't delete it.
4565 (linux_wait_for_event_filtered): Don't check for thread exit.
4566 (filter_exit_event): New function.
4567 (linux_wait_1): Use it, when returning an exit event.
4568 (linux_resume_one_lwp_throw): Assert that the LWP's
4569 waitstatus is TARGET_WAITKIND_IGNORE.
4570 * remote-utils.c (prepare_resume_reply): Handle
4571 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4572 * server.c (report_thread_events): New global.
4573 (handle_general_set): Handle QThreadEvents.
4574 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4575 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4576 TARGET_WAITKIND_THREAD_EXITED.
4577 * server.h (report_thread_events): Declare.
4579 2015-11-30 Pedro Alves <palves@redhat.com>
4581 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4582 the thread's last_resume_kind was resume_stop.
4584 2015-11-30 Pedro Alves <palves@redhat.com>
4586 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4589 2015-11-30 Pedro Alves <palves@redhat.com>
4591 * server.c (handle_v_requests): Handle vCtrlC.
4593 2015-11-30 Pedro Alves <palves@redhat.com>
4595 * gdbthread.h (find_any_thread_of_pid): Declare.
4596 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4598 * server.c (handle_query): If current_thread is NULL, look for
4599 another thread of the selected process.
4601 2015-11-26 Daniel Colascione <dancol@dancol.org>
4602 Simon Marchi <simon.marchi@ericsson.com>
4604 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4605 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4607 * target.h (struct target_ops) <thread_name>: New field.
4608 (target_thread_name): New macro.
4610 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4612 * regcache.h (regcache_invalidate_pid): Add declaration.
4613 * regcache.c (regcache_invalidate_pid): New function, extracted
4614 from regcache_invalidate.
4615 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4616 Add trivial documentation comment.
4617 * lynx-low.c: Use regcache_invalidate_pid instead of
4618 regcache_invalidate.
4620 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4622 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4623 and Elf64_auxv_t if the target is Android.
4625 2015-11-22 Doug Evans <xdje42@gmail.com>
4627 * target.h: #include <sys/types.h>.
4629 2015-11-19 Pedro Alves <palves@redhat.com>
4631 * linux-low.c (linux_process_qsupported): Change prototype.
4633 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4635 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4636 and adjust to loop over all features.
4637 * server.c (handle_query) <qSupported>: Adjust to call
4638 target_process_qsupported once, passing it a vector of unprocessed
4640 * target.h (struct target_ops) <process_qsupported>: Change
4642 (target_process_qsupported): Adjust.
4644 2015-11-19 Pedro Alves <palves@redhat.com>
4646 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4648 * configure: Regenerate.
4650 2015-11-19 Pedro Alves <palves@redhat.com>
4652 * configure: Regenerate.
4654 2015-11-19 Yao Qi <yao.qi@linaro.org>
4656 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4659 2015-11-19 Yao Qi <yao.qi@linaro.org>
4661 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4662 (struct aarch64_operand): Move enum out.
4664 2015-11-19 Yao Qi <yao.qi@linaro.org>
4666 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4667 struct user_fpsimd_state *.
4668 (aarch64_store_fpregset): Likewise.
4670 2015-11-19 Yao Qi <yao.qi@linaro.org>
4672 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4673 struct user_pt_regs *.
4674 (aarch64_store_gregset): Likewise.
4676 2015-11-18 Pedro Alves <palves@redhat.com>
4678 * Makefile.in (all_object_files): Add $IPA_OBJS.
4680 2015-11-17 Pedro Alves <palves@redhat.com>
4682 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4683 GDB_SIGNAL_0 and gdb_signal_to_string.
4685 2015-11-17 Pedro Alves <palves@redhat.com>
4687 * win32-low.c (handle_output_debug_string): Remove parameter.
4688 (win32_kill): Remove our_status local and adjust call to
4689 handle_output_debug_string.
4690 (get_child_debug_event): Adjust call to
4691 handle_output_debug_string.
4693 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4695 * linux-mips-low.c (mips_fill_gregset): Add cast.
4696 (mips_store_gregset): Likewise.
4697 (mips_fill_fpregset): Likewise.
4698 (mips_store_fpregset): Likewise.
4700 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4702 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4705 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4707 * linux-mips-low.c (mips_linux_new_thread): Change type of
4708 watch_type to enum target_hw_bp_type.
4710 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4712 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4713 Change return type to arm_hwbp_type.
4715 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4717 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4718 (arm_store_gregset): Likewise.
4719 * linux-arm-low.c (arm_get_hwcap): Likewise.
4720 (arm_read_description): Likewise.
4722 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4724 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4726 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4728 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4729 (ppc_fill_vsxregset): Likewise.
4730 (ppc_store_vsxregset): Likewise.
4731 (ppc_fill_vrregset): Likewise.
4732 (ppc_store_vrregset): Likewise.
4733 (ppc_fill_evrregset): Likewise.
4734 (ppc_store_evrregset): Likewise.
4736 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4738 * linux-ppc-low.c (ppc_usrregs_info): Remove
4739 forward-declaration.
4740 (ppc_arch_setup): Move lower in file.
4742 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4744 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4745 (ps_pdwrite): Likewise.
4747 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4749 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4750 to after assert checks.
4752 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4754 * proc-service.c (ps_pdread): Add/adjust casts.
4755 (ps_pdwrite): Add/adjust casts.
4757 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4759 * server.c (handle_search_memory_1): Cast return value of
4762 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4764 * server.c (write_qxfer_response): Change type of data to
4767 2015-10-29 Pedro Alves <palves@redhat.com>
4769 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4771 2015-10-29 Pedro Alves <palves@redhat.com>
4773 * tracepoint.c (clear_installed_tracepoints): Add casts.
4775 2015-10-29 Pedro Alves <palves@redhat.com>
4777 * server.c (handle_v_cont, process_serial_event): Add enum
4778 gdb_signal casts to signal parsing code.
4780 2015-10-29 Pedro Alves <palves@redhat.com>
4782 * linux-low.h (NULL_REGSET): Define.
4783 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4784 * linux-arm-low.c (arm_regsets): Likewise.
4785 * linux-crisv32-low.c (cris_regsets): Likewise.
4786 * linux-m68k-low.c (m68k_regsets): Likewise.
4787 * linux-mips-low.c (mips_regsets): Likewise.
4788 * linux-nios2-low.c (nios2_regsets): Likewise.
4789 * linux-ppc-low.c (ppc_regsets): Likewise.
4790 * linux-s390-low.c (s390_regsets): Likewise.
4791 * linux-sh-low.c (sh_regsets): Likewise.
4792 * linux-sparc-low.c (sparc_regsets): Likewise.
4793 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4794 * linux-tile-low.c (tile_regsets): Likewise.
4795 * linux-x86-low.c (x86_regsets): Likewise.
4796 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4798 2015-10-29 Pedro Alves <palves@redhat.com>
4800 * linux-low.h (NULL_REGSET): Define.
4801 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4802 * linux-arm-low.c (arm_regsets): Likewise.
4803 * linux-crisv32-low.c (cris_regsets): Likewise.
4804 * linux-m68k-low.c (m68k_regsets): Likewise.
4805 * linux-mips-low.c (mips_regsets): Likewise.
4806 * linux-nios2-low.c (nios2_regsets): Likewise.
4807 * linux-ppc-low.c (ppc_regsets): Likewise.
4808 * linux-s390-low.c (s390_regsets): Likewise.
4809 * linux-sh-low.c (sh_regsets): Likewise.
4810 * linux-sparc-low.c (sparc_regsets): Likewise.
4811 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4812 * linux-tile-low.c (tile_regsets): Likewise.
4813 * linux-x86-low.c (x86_regsets): Likewise.
4814 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4816 2015-10-26 Doug Evans <dje@google.com>
4818 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4820 2015-10-26 Doug Evans <dje@google.com>
4822 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4824 2015-10-26 Doug Evans <dje@google.com>
4826 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4828 (attach_thread, find_new_threads_callback): Ditto.
4830 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4832 * mem-break.h (set_breakpoint_data): Remove.
4834 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4836 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4837 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4838 (initialize_low): Remove set_breakpoint_data call.
4839 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4840 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4841 (initialize_low): Remove set_breakpoint_data call.
4842 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4843 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4844 (initialize_low): Remove set_breakpoint_data call.
4846 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4848 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4849 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4850 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4851 * target.h (target_breakpoint_kind_from_pc): New macro.
4853 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4855 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4856 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4857 the default breakpoint kind.
4859 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4861 * linux-arm-low.c (arm_supports_z_point_type): Add software
4864 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4866 * linux-arm-low.c: Refactor breakpoint definitions.
4867 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4868 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4870 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4872 * Makefile.in: Add arm.c/o.
4873 * configure.srv: Likewise.
4874 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4875 (arm_breakpoint_kind_from_pc): New function.
4876 (arm_sw_breakpoint_from_kind): Return proper kind.
4877 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4879 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4881 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4883 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4884 (struct raw_breakpoint) <size>: Remove.
4885 (struct raw_breakpoint) <kind>: Add.
4886 (bp_size): New function.
4887 (bp_opcode): Likewise.
4888 (find_raw_breakpoint_at): Adjust for kind.
4889 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4890 (remove_memory_breakpoint): Adjust for kind call bp_size.
4891 (set_raw_breakpoint_at): Adjust for kind.
4892 (set_breakpoint): Likewise.
4893 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4894 (delete_raw_breakpoint): Adjust for kind.
4895 (delete_breakpoint): Likewise.
4896 (find_gdb_breakpoint): Likewise.
4897 (set_gdb_breakpoint_1): Likewise.
4898 (set_gdb_breakpoint): Likewise.
4899 (delete_gdb_breakpoint_1): Likewise.
4900 (delete_gdb_breakpoint): Likewise.
4901 (uninsert_raw_breakpoint): Likewise.
4902 (reinsert_raw_breakpoint): Likewise.
4903 (set_breakpoint_data): Remove.
4904 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4905 (check_mem_read): Adjust for kind call bp_size.
4906 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4907 (clone_one_breakpoint): Adjust for kind.
4908 * mem-break.h (set_gdb_breakpoint): Likewise.
4909 (delete_gdb_breakpoint): Likewise.
4910 * server.c (process_serial_event): Likewise.
4912 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4914 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4915 (struct linux_target_ops) <breakpoint>: Remove.
4916 (struct linux_target_ops) <breakpoint_len>: Remove.
4917 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4918 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4919 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4920 (arm_sw_breakpoint_from_kind): New function.
4921 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4922 (struct linux_target_ops) <breakpoint>: Remove.
4923 (struct linux_target_ops) <breakpoint_len>: Remove.
4924 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4925 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4926 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4927 (struct linux_target_ops) <breakpoint>: Remove.
4928 (struct linux_target_ops) <breakpoint_len>: Remove.
4929 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4930 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4931 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4932 (struct linux_target_ops) <breakpoint>: Remove.
4933 (struct linux_target_ops) <breakpoint_len>: Remove.
4934 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4935 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4936 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4937 and sw_breakpoint_from_kind to increment the pc.
4938 (linux_breakpoint_kind_from_pc): New function.
4939 (linux_sw_breakpoint_from_kind): New function.
4940 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4941 (initialize_low): Call breakpoint_kind_from_pc and
4942 sw_breakpoint_from_kind to replace breakpoint_data/len.
4943 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4945 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4946 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4947 (struct linux_target_ops) <breakpoint>: Remove.
4948 (struct linux_target_ops) <breakpoint_len>: Remove.
4949 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4950 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4951 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4952 (struct linux_target_ops) <breakpoint>: Remove.
4953 (struct linux_target_ops) <breakpoint_len>: Remove.
4954 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4955 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4956 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4957 (struct linux_target_ops) <breakpoint>: Remove.
4958 (struct linux_target_ops) <breakpoint_len>: Remove.
4959 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4960 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4961 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4962 (struct linux_target_ops) <breakpoint>: Remove.
4963 (struct linux_target_ops) <breakpoint_len>: Remove.
4964 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4965 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4966 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4967 (struct linux_target_ops) <breakpoint>: Remove.
4968 (struct linux_target_ops) <breakpoint_len>: Remove.
4969 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4970 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4971 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4972 (struct linux_target_ops) <breakpoint>: Remove.
4973 (struct linux_target_ops) <breakpoint_len>: Remove.
4974 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4975 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4976 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4977 (struct linux_target_ops) <breakpoint>: Remove.
4978 (struct linux_target_ops) <breakpoint_len>: Remove.
4979 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4980 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4981 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4982 (struct linux_target_ops) <breakpoint>: Remove.
4983 (struct linux_target_ops) <breakpoint_len>: Remove.
4984 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4985 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4986 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4987 (struct linux_target_ops) <breakpoint>: Remove.
4988 (struct linux_target_ops) <breakpoint_len>: Remove.
4989 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4990 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4991 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4992 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4993 (struct linux_target_ops) <breakpoint>: Remove.
4994 (struct linux_target_ops) <breakpoint_len>: Remove.
4995 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4996 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4997 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4998 (struct linux_target_ops) <breakpoint>: Remove.
4999 (struct linux_target_ops) <breakpoint_len>: Remove.
5000 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5003 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5005 * linux-cris-low.c (cris_get_pc): Remove void arg.
5007 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5009 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5012 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5014 * inferiors.c (thread_pid_matches_callback): New function.
5015 (find_thread_process): New function.
5016 (remove_thread): Reset current_thread.
5017 (remove_process): Assert threads have been removed first.
5019 2015-10-15 Yao Qi <yao.qi@linaro.org>
5021 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5023 (aarch64_remove_point): Likewise.
5024 * regcache.c (regcache_register_size): New function.
5026 2015-10-12 Yao Qi <yao.qi@linaro.org>
5028 * linux-aarch64-low.c: Update all callers as emit_load_store
5029 is renamed to aarch64_emit_load_store.
5031 2015-10-12 Yao Qi <yao.qi@linaro.org>
5033 * linux-aarch64-low.c: Update all callers of function renaming
5034 from emit_insn to aarch64_emit_insn.
5036 2015-10-12 Yao Qi <yao.qi@linaro.org>
5038 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5039 arch/aarch64-insn.h.
5040 (struct aarch64_memory_operand): Likewise.
5042 (emit_insn): Move to arch/aarch64-insn.c.
5043 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5044 (emit_load_store): Move to arch/aarch64-insn.c.
5045 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5046 (can_encode_int32): Remove.
5048 2015-10-12 Yao Qi <yao.qi@linaro.org>
5050 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5051 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5052 (aarch64_relocate_instruction): Likewise.
5053 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5054 (struct aarch64_insn_visitor): Likewise.
5056 2015-10-12 Yao Qi <yao.qi@linaro.org>
5058 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5059 (struct aarch64_insn_visitor): New.
5060 (struct aarch64_insn_relocation_data): New.
5061 (aarch64_ftrace_insn_reloc_b): New function.
5062 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5063 (aarch64_ftrace_insn_reloc_cb): Likewise.
5064 (aarch64_ftrace_insn_reloc_tb): Likewise.
5065 (aarch64_ftrace_insn_reloc_adr): Likewise.
5066 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5067 (aarch64_ftrace_insn_reloc_others): Likewise.
5069 (aarch64_relocate_instruction): Use visitor.
5071 2015-10-12 Yao Qi <yao.qi@linaro.org>
5073 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5074 int. Add argument buf.
5075 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5076 aarch64_relocate_instruction.
5078 2015-10-12 Yao Qi <yao.qi@linaro.org>
5080 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5081 argument insn. Remove local variable insn. Don't call
5083 (aarch64_install_fast_tracepoint_jump_pad): Call
5086 2015-09-30 Yao Qi <yao.qi@linaro.org>
5088 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5089 (emit_load_store_pair): Likewise.
5091 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5093 * dll.c (match_dll): Add cast(s).
5094 (unloaded_dll): Likewise.
5095 * linux-low.c (second_thread_of_pid_p): Likewise.
5096 (delete_lwp_callback): Likewise.
5097 (count_events_callback): Likewise.
5098 (select_event_lwp_callback): Likewise.
5099 (linux_set_resume_request): Likewise.
5100 * server.c (accumulate_file_name_length): Likewise.
5101 (emit_dll_description): Likewise.
5102 (handle_qxfer_threads_worker): Likewise.
5103 (visit_actioned_threads): Likewise.
5104 * thread-db.c (any_thread_of): Likewise.
5105 * tracepoint.c (same_process_p): Likewise.
5106 (match_blocktype): Likewise.
5107 (build_traceframe_info_xml): Likewise.
5109 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5111 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5113 (gdb_unparse_agent_expr): Likewise.
5114 * hostio.c (require_data): Likewise.
5115 (handle_pread): Likewise.
5116 * linux-low.c (disable_regset): Likewise.
5117 (fetch_register): Likewise.
5118 (store_register): Likewise.
5119 (get_dynamic): Likewise.
5120 (linux_qxfer_libraries_svr4): Likewise.
5121 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5122 (set_fast_tracepoint_jump): Likewise.
5123 (uninsert_fast_tracepoint_jumps_at): Likewise.
5124 (reinsert_fast_tracepoint_jumps_at): Likewise.
5125 (validate_inserted_breakpoint): Likewise.
5126 (clone_agent_expr): Likewise.
5127 * regcache.c (init_register_cache): Likewise.
5128 * remote-utils.c (putpkt_binary_1): Likewise.
5129 (decode_M_packet): Likewise.
5130 (decode_X_packet): Likewise.
5131 (look_up_one_symbol): Likewise.
5132 (relocate_instruction): Likewise.
5133 (monitor_output): Likewise.
5134 * server.c (handle_search_memory): Likewise.
5135 (handle_qxfer_exec_file): Likewise.
5136 (handle_qxfer_libraries): Likewise.
5137 (handle_qxfer): Likewise.
5138 (handle_query): Likewise.
5139 (handle_v_cont): Likewise.
5140 (handle_v_run): Likewise.
5141 (captured_main): Likewise.
5142 * target.c (write_inferior_memory): Likewise.
5143 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5144 * tracepoint.c (init_trace_buffer): Likewise.
5145 (add_tracepoint_action): Likewise.
5146 (add_traceframe): Likewise.
5147 (add_traceframe_block): Likewise.
5148 (cmd_qtdpsrc): Likewise.
5149 (cmd_qtdv): Likewise.
5150 (cmd_qtstatus): Likewise.
5151 (response_source): Likewise.
5152 (response_tsv): Likewise.
5153 (cmd_qtnotes): Likewise.
5154 (gdb_collect): Likewise.
5155 (initialize_tracepoint): Likewise.
5157 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5159 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5160 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5161 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5163 (enum aarch64_condition_codes): New enum.
5164 (w0): New static global.
5167 (struct aarch64_memory_operand) <type>: New
5168 MEMORY_OPERAND_POSTINDEX type.
5169 (postindex_memory_operand): New helper function.
5170 (emit_ret): New function.
5171 (emit_load_store_pair): New function, factored out of emit_stp
5172 with support for MEMORY_OPERAND_POSTINDEX.
5173 (emit_stp): Rewrite using emit_load_store_pair.
5174 (emit_ldp): New function.
5175 (emit_load_store): Likewise.
5176 (emit_ldr): Mention post-index instruction in comment.
5177 (emit_ldrh): New function.
5178 (emit_ldrb): New function.
5179 (emit_ldrsw): Mention post-index instruction in comment.
5180 (emit_str): Likewise.
5181 (emit_subs): New function.
5182 (emit_cmp): Likewise.
5183 (emit_and): Likewise.
5184 (emit_orr): Likewise.
5185 (emit_orn): Likewise.
5186 (emit_eor): Likewise.
5187 (emit_mvn): Likewise.
5188 (emit_lslv): Likewise.
5189 (emit_lsrv): Likewise.
5190 (emit_asrv): Likewise.
5191 (emit_mul): Likewise.
5192 (emit_sbfm): Likewise.
5193 (emit_sbfx): Likewise.
5194 (emit_ubfm): Likewise.
5195 (emit_ubfx): Likewise.
5196 (emit_csinc): Likewise.
5197 (emit_cset): Likewise.
5198 (emit_nop): Likewise.
5199 (emit_ops_insns): New helper function.
5200 (emit_pop): Likewise.
5201 (emit_push): Likewise.
5202 (aarch64_emit_prologue): New function.
5203 (aarch64_emit_epilogue): Likewise.
5204 (aarch64_emit_add): Likewise.
5205 (aarch64_emit_sub): Likewise.
5206 (aarch64_emit_mul): Likewise.
5207 (aarch64_emit_lsh): Likewise.
5208 (aarch64_emit_rsh_signed): Likewise.
5209 (aarch64_emit_rsh_unsigned): Likewise.
5210 (aarch64_emit_ext): Likewise.
5211 (aarch64_emit_log_not): Likewise.
5212 (aarch64_emit_bit_and): Likewise.
5213 (aarch64_emit_bit_or): Likewise.
5214 (aarch64_emit_bit_xor): Likewise.
5215 (aarch64_emit_bit_not): Likewise.
5216 (aarch64_emit_equal): Likewise.
5217 (aarch64_emit_less_signed): Likewise.
5218 (aarch64_emit_less_unsigned): Likewise.
5219 (aarch64_emit_ref): Likewise.
5220 (aarch64_emit_if_goto): Likewise.
5221 (aarch64_emit_goto): Likewise.
5222 (aarch64_write_goto_address): Likewise.
5223 (aarch64_emit_const): Likewise.
5224 (aarch64_emit_call): Likewise.
5225 (aarch64_emit_reg): Likewise.
5226 (aarch64_emit_pop): Likewise.
5227 (aarch64_emit_stack_flush): Likewise.
5228 (aarch64_emit_zero_ext): Likewise.
5229 (aarch64_emit_swap): Likewise.
5230 (aarch64_emit_stack_adjust): Likewise.
5231 (aarch64_emit_int_call_1): Likewise.
5232 (aarch64_emit_void_call_2): Likewise.
5233 (aarch64_emit_eq_goto): Likewise.
5234 (aarch64_emit_ne_goto): Likewise.
5235 (aarch64_emit_lt_goto): Likewise.
5236 (aarch64_emit_le_goto): Likewise.
5237 (aarch64_emit_gt_goto): Likewise.
5238 (aarch64_emit_ge_got): Likewise.
5239 (aarch64_emit_ops_impl): New static global variable.
5240 (aarch64_emit_ops): New target function, return
5241 &aarch64_emit_ops_impl.
5242 (struct linux_target_ops): Install it.
5244 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5246 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5247 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5249 * linux-aarch64-ipa.c: New file.
5250 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5252 (aarch64_get_thread_area): New target method.
5253 (extract_signed_bitfield): New helper function.
5254 (aarch64_decode_ldr_literal): New function.
5255 (enum aarch64_opcodes): New enum.
5256 (struct aarch64_register): New struct.
5257 (struct aarch64_operand): New struct.
5258 (x0): New static global.
5267 (aarch64_register): New helper function.
5268 (register_operand): Likewise.
5269 (immediate_operand): Likewise.
5270 (struct aarch64_memory_operand): New struct.
5271 (offset_memory_operand): New helper function.
5272 (preindex_memory_operand): Likewise.
5273 (enum aarch64_system_control_registers): New enum.
5274 (ENCODE): New macro.
5275 (emit_insn): New helper function.
5276 (emit_b): New function.
5277 (emit_bcond): Likewise.
5278 (emit_cb): Likewise.
5279 (emit_tb): Likewise.
5280 (emit_blr): Likewise.
5281 (emit_stp): Likewise.
5282 (emit_ldp_q_offset): Likewise.
5283 (emit_stp_q_offset): Likewise.
5284 (emit_load_store): Likewise.
5285 (emit_ldr): Likewise.
5286 (emit_ldrsw): Likewise.
5287 (emit_str): Likewise.
5288 (emit_ldaxr): Likewise.
5289 (emit_stxr): Likewise.
5290 (emit_stlr): Likewise.
5291 (emit_data_processing_reg): Likewise.
5292 (emit_data_processing): Likewise.
5293 (emit_add): Likewise.
5294 (emit_sub): Likewise.
5295 (emit_mov): Likewise.
5296 (emit_movk): Likewise.
5297 (emit_mov_addr): Likewise.
5298 (emit_mrs): Likewise.
5299 (emit_msr): Likewise.
5300 (emit_sevl): Likewise.
5301 (emit_wfe): Likewise.
5302 (append_insns): Likewise.
5303 (can_encode_int32_in): New helper function.
5304 (aarch64_relocate_instruction): New function.
5305 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5306 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5307 (struct linux_target_ops): Install aarch64_get_thread_area,
5308 aarch64_install_fast_tracepoint_jump_pad and
5309 aarch64_get_min_fast_tracepoint_insn_len.
5311 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5313 * Makefile.in (aarch64-insn.o): New rule.
5314 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5316 2015-09-21 Yao Qi <yao.qi@linaro.org>
5318 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5320 2015-09-21 Yao Qi <yao.qi@linaro.org>
5322 * tracepoint.c (max_jump_pad_size): Remove.
5324 2015-09-18 Yao Qi <yao.qi@linaro.org>
5326 * linux-aarch64-low.c: Don't include sys/uio.h.
5327 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5329 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5331 * tracepoint.c (eval_result_type): Change prototype.
5332 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5334 2015-09-15 Pedro Alves <palves@redhat.com>
5336 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5337 Check whether to report exec events instead of checking whether
5338 multiprocess is enabled.
5340 2015-09-15 Pedro Alves <palves@redhat.com>
5343 * remote-utils.c (prepare_resume_reply): Merge
5344 TARGET_WAITKIND_VFORK_DONE switch case with the
5345 TARGET_WAITKIND_FORKED case.
5347 2015-09-15 Yao Qi <yao.qi@linaro.org>
5349 * server.c (handle_query): Check string comparison using
5350 "else if" instead of "if".
5352 2015-09-15 Yao Qi <yao.qi@linaro.org>
5354 * server.c (vCont_supported): New global variable.
5355 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5356 matches. Append ";vContSupported+" to own_buf.
5357 (handle_v_requests): Append ";s;S" to own_buf if target supports
5358 hardware single step or vCont_supported is false.
5359 (capture_main): Set vCont_supported to zero.
5361 2015-09-15 Yao Qi <yao.qi@linaro.org>
5363 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5365 (linux_supports_hardware_single_step): ... New function.
5366 (linux_target_ops): Update.
5367 * lynx-low.c (lynx_target_ops): Set field
5368 supports_hardware_single_step to target_can_do_hardware_single_step.
5369 * nto-low.c (nto_target_ops): Likewise.
5370 * spu-low.c (spu_target_ops): Likewise.
5371 * win32-low.c (win32_target_ops): Likewise.
5372 * target.c (target_can_do_hardware_single_step): New function.
5373 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5374 Remove. <supports_hardware_single_step>: New field.
5375 (target_supports_conditional_breakpoints): Remove.
5376 (target_supports_hardware_single_step): New macro.
5377 (target_can_do_hardware_single_step): Declare.
5378 * server.c (handle_query): Use target_supports_hardware_single_step
5379 instead of target_supports_conditional_breakpoints.
5381 2015-09-15 Yao Qi <yao.qi@linaro.org>
5383 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5385 (struct linux_target_ops the_low_target): Install
5386 aarch64_linux_siginfo_fixup.
5388 2015-09-11 Don Breazeal <donb@codesourcery.com>
5389 Luis Machado <lgustavo@codesourcery.com>
5391 * linux-low.c (linux_mourn): Static declaration.
5392 (linux_arch_setup): Move in front of
5393 handle_extended_wait.
5394 (linux_arch_setup_thread): New function.
5395 (handle_extended_wait): Handle exec events. Call
5396 linux_arch_setup_thread. Make event_lwp argument a
5397 pointer-to-a-pointer.
5398 (check_zombie_leaders): Do not check stopped threads.
5399 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5400 (linux_low_filter_event): Add lwp and thread for exec'ing
5401 non-leader thread if leader thread has been deleted.
5402 Refactor code into linux_arch_setup_thread and call it.
5403 Pass child lwp pointer by reference to handle_extended_wait.
5404 (linux_wait_for_event_filtered): Update comment.
5405 (linux_wait_1): Prevent clobbering exec event status.
5406 (linux_supports_exec_events): New function.
5407 (linux_target_ops) <supports_exec_events>: Initialize new member.
5408 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5410 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5411 * server.c (report_exec_events): New global variable.
5412 (handle_query): Handle qSupported query for exec-events feature.
5413 (captured_main): Initialize report_exec_events.
5414 * server.h (report_exec_events): Declare new global variable.
5415 * target.h (struct target_ops) <supports_exec_events>: New
5417 (target_supports_exec_events): New macro.
5418 * win32-low.c (win32_target_ops) <supports_exec_events>:
5419 Initialize new member.
5421 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5423 * linux-low.c (linux_low_enable_btrace): Remove.
5424 (linux_target_ops): Replace linux_low_enable_btrace with
5425 linux_enable_btrace.
5427 2015-09-03 Yao Qi <yao.qi@linaro.org>
5429 * linux-aarch64-low.c (aarch64_insert_point): Call
5430 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5433 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5435 * linux-low.c (check_stopped_by_breakpoint): Use
5436 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5438 2015-08-27 Pedro Alves <palves@redhat.com>
5440 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5442 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5444 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5445 the XNEW-family equivalent.
5446 (compile_bytecodes): Likewise.
5447 * dll.c (loaded_dll): Likewise.
5448 * event-loop.c (append_callback_event): Likewise.
5449 (create_file_handler): Likewise.
5450 (create_file_event): Likewise.
5451 * hostio.c (handle_open): Likewise.
5452 * inferiors.c (add_thread): Likewise.
5453 (add_process): Likewise.
5454 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5455 * linux-arm-low.c (arm_new_process): Likewise.
5456 (arm_new_thread): Likewise.
5457 * linux-low.c (add_to_pid_list): Likewise.
5458 (linux_add_process): Likewise.
5459 (handle_extended_wait): Likewise.
5460 (add_lwp): Likewise.
5461 (enqueue_one_deferred_signal): Likewise.
5462 (enqueue_pending_signal): Likewise.
5463 (linux_resume_one_lwp_throw): Likewise.
5464 (linux_resume_one_thread): Likewise.
5465 (linux_read_memory): Likewise.
5466 (linux_write_memory): Likewise.
5467 * linux-mips-low.c (mips_linux_new_process): Likewise.
5468 (mips_linux_new_thread): Likewise.
5469 (mips_add_watchpoint): Likewise.
5470 * linux-x86-low.c (initialize_low_arch): Likewise.
5471 * lynx-low.c (lynx_add_process): Likewise.
5472 * mem-break.c (set_raw_breakpoint_at): Likewise.
5473 (set_breakpoint): Likewise.
5474 (add_condition_to_breakpoint): Likewise.
5475 (add_commands_to_breakpoint): Likewise.
5476 (clone_agent_expr): Likewise.
5477 (clone_one_breakpoint): Likewise.
5478 * regcache.c (new_register_cache): Likewise.
5479 * remote-utils.c (look_up_one_symbol): Likewise.
5480 * server.c (queue_stop_reply): Likewise.
5481 (start_inferior): Likewise.
5482 (queue_stop_reply_callback): Likewise.
5483 (handle_target_event): Likewise.
5484 * spu-low.c (fetch_ppc_memory): Likewise.
5485 (store_ppc_memory): Likewise.
5486 * target.c (set_target_ops): Likewise.
5487 * thread-db.c (thread_db_load_search): Likewise.
5488 (try_thread_db_load_1): Likewise.
5489 * tracepoint.c (add_tracepoint): Likewise.
5490 (add_tracepoint_action): Likewise.
5491 (create_trace_state_variable): Likewise.
5492 (cmd_qtdpsrc): Likewise.
5493 (cmd_qtro): Likewise.
5494 (add_while_stepping_state): Likewise.
5495 * win32-low.c (child_add_thread): Likewise.
5496 (get_image_name): Likewise.
5498 2015-08-25 Yao Qi <yao.qi@linaro.org>
5500 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5502 2015-08-25 Yao Qi <yao.qi@linaro.org>
5504 * Makefile.in (aarch64-linux.o): New rule.
5505 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5507 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5508 (aarch64_init_debug_reg_state): Make it extern.
5509 (aarch64_linux_prepare_to_resume): Remove.
5511 2015-08-25 Yao Qi <yao.qi@linaro.org>
5513 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5514 lwp_arch_private_info and ptid_of_lwp.
5516 2015-08-25 Yao Qi <yao.qi@linaro.org>
5518 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5519 Find proc_info by find_process_pid. All callers updated.
5521 2015-08-25 Yao Qi <yao.qi@linaro.org>
5523 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5525 (debug_reg_change_callback): Remove.
5526 (aarch64_notify_debug_reg_change): Remove.
5528 2015-08-25 Yao Qi <yao.qi@linaro.org>
5530 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5531 Call current_lwp_ptid.
5533 2015-08-25 Yao Qi <yao.qi@linaro.org>
5535 * linux-aarch64-low.c (debug_reg_change_callback): Use
5538 2015-08-25 Yao Qi <yao.qi@linaro.org>
5540 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5542 2015-08-25 Yao Qi <yao.qi@linaro.org>
5544 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5546 2015-08-25 Yao Qi <yao.qi@linaro.org>
5548 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5551 2015-08-25 Yao Qi <yao.qi@linaro.org>
5553 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5555 (debug_reg_change_callback): Remove argument entry and add argument
5556 lwp. Remove local variable thread. Don't print thread id in the
5557 debugging output. Don't check whether pid of thread equals to pid.
5558 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5559 iterate_over_lwps instead find_inferior.
5561 2015-08-24 Pedro Alves <palves@redhat.com>
5563 * inferiors.c (get_first_process): New function.
5564 * inferiors.h (get_first_process): New declaration.
5565 * remote-utils.c (read_ptid): Default to the first process in the
5566 list, instead of to the current thread's process.
5568 2015-08-24 Pedro Alves <palves@redhat.com>
5570 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5571 * event-loop.c: Likewise.
5572 * remote-utils.c: Likewise.
5573 * tracepoint.c: Likewise.
5575 2015-08-24 Pedro Alves <palves@redhat.com>
5577 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5580 2015-08-21 Pedro Alves <palves@redhat.com>
5582 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5583 instead of literal 1.
5585 2015-08-21 Pedro Alves <palves@redhat.com>
5587 * tdesc.c (default_description): Explicitly zero-initialize.
5589 2015-08-21 Pedro Alves <palves@redhat.com>
5592 * inferiors.c (remove_thread): Discard any pending stop reply for
5594 * server.c (remove_all_on_match_pid): Rename to ...
5595 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5597 (discard_queued_stop_replies): Change parameter to a ptid. Now
5599 (handle_v_kill, kill_inferior_callback, captured_main)
5600 (process_serial_event): Adjust.
5601 * server.h (discard_queued_stop_replies): Declare.
5603 2015-08-21 Pedro Alves <palves@redhat.com>
5605 * linux-low.c (wait_for_sigstop): Always switch to no thread
5606 selected if the previously current thread dies.
5607 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5608 process instead of the current thread's.
5609 * remote-utils.c (input_interrupt): Don't check if there's no
5611 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5612 current thread to the general thread fails, error out.
5613 (handle_qxfer_auxv, handle_qxfer_libraries)
5614 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5615 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5616 (handle_query): Check if there's a thread selected instead of
5617 checking whether there's any thread in the thread list.
5618 (handle_qxfer_threads, handle_qxfer_btrace)
5619 (handle_qxfer_btrace_conf): Don't error out early if there's no
5620 thread in the thread list.
5621 (handle_v_cont, myresume): Don't set the current thread to the
5623 (process_serial_event) <Hg handling>: Also set thread_id if the
5624 previous general thread is still alive.
5625 (process_serial_event) <g/G handling>: If setting the current
5626 thread to the general thread fails, error out.
5627 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5628 thread's lwp instead of the current thread's.
5629 * target.c (set_desired_thread): If the desired thread was not
5630 found, leave the current thread pointing to NULL. Return an int
5631 (boolean) indicating success.
5632 * target.h (set_desired_thread): Change return type to int.
5634 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5636 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5637 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5639 (ps_get_thread_area): New function.
5641 2015-08-19 Gary Benson <gbenson@redhat.com>
5643 * hostio.c (handle_pread): Do not attempt to read more data
5644 than hostio_reply_with_data can fit in a packet.
5646 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5648 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5650 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5652 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5654 2015-08-06 Pedro Alves <palves@redhat.com>
5656 * tracepoint.c (expr_eval_result): Now an int.
5658 2015-08-06 Pedro Alves <palves@redhat.com>
5660 * gdbthread.h (struct regcache): Forward declare.
5661 (struct thread_info) <regcache_data>: Now a struct regcache
5663 * inferiors.c (inferior_regcache_data)
5664 (set_inferior_regcache_data): Now work with struct regcache
5666 * inferiors.h (struct regcache): Forward declare.
5667 (inferior_regcache_data, set_inferior_regcache_data): Now work
5668 with struct regcache pointers.
5669 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5670 (free_register_cache_thread): Remove struct regcache pointer
5673 2015-08-06 Pedro Alves <palves@redhat.com>
5675 * server.c (captured_main): On error, print the exception message
5676 to stderr, and if run_once is set, throw a quit.
5678 2015-08-06 Pedro Alves <palves@redhat.com>
5680 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5683 2015-08-06 Pedro Alves <palves@redhat.com>
5685 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5686 reading beyond the passed in buffer length.
5688 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5690 * tracepoint.c (symbol_list) <required>: Remove.
5692 2015-08-06 Pedro Alves <palves@redhat.com>
5694 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5695 count if stopping and suspending threads.
5696 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5697 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5698 (linux_detach): Complete an ongoing step-over.
5699 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5701 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5702 (linux_wait_1): If passing a signal to the inferior after
5703 finishing a step-over, unsuspend and re-resume all lwps. If we
5704 see a single-step event but the thread should be continuing, don't
5705 pass the trap to gdb.
5706 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5707 internal_error instead of gdb_assert.
5708 (enqueue_pending_signal): New function.
5709 (check_ptrace_stopped_lwp_gone): Add debug output.
5710 (start_step_over): Use internal_error instead of gdb_assert.
5711 (complete_ongoing_step_over): New function.
5712 (linux_resume_one_thread): Don't resume a suspended thread.
5713 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5716 2015-08-06 Pedro Alves <palves@redhat.com>
5718 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5719 (linux_thread_alive): Use lwp_is_marked_dead.
5720 (extended_event_reported): Delete.
5721 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5722 instead of extended_event_reported.
5723 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5725 (lwp_is_marked_dead): New function.
5726 (lwp_running): Use lwp_is_marked_dead.
5727 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5730 2015-08-06 Pedro Alves <palves@redhat.com>
5732 * linux-low.c (linux_wait_1): Move fork event output out of the
5733 !report_to_gdb check. Pass event_child->waitstatus to
5734 target_waitstatus_to_string instead of ourstatus.
5736 2015-08-04 Yao Qi <yao.qi@linaro.org>
5738 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5739 if current_thread is 32 bit.
5741 2015-08-04 Yao Qi <yao.qi@linaro.org>
5743 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5744 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5745 * server.c (extended_protocol): Remove "static".
5746 * server.h (extended_protocol): Declare it.
5748 2015-08-04 Yao Qi <yao.qi@linaro.org>
5750 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5751 both aarch64 and aarch32.
5752 (aarch64_set_pc): Likewise.
5754 2015-08-04 Yao Qi <yao.qi@linaro.org>
5756 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5757 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5758 arm-with-neon.xml to srv_xmlfiles.
5759 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5760 (is_64bit_tdesc): New function.
5761 (aarch64_linux_read_description): New function.
5762 (aarch64_arch_setup): Call aarch64_linux_read_description.
5763 (regs_info): Rename to regs_info_aarch64.
5764 (aarch64_regs_info): Return right regs_info.
5765 (initialize_low_arch): Call initialize_low_arch_aarch32.
5767 2015-08-04 Yao Qi <yao.qi@linaro.org>
5769 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5770 * linux-aarch32-low.c: New file.
5771 * linux-aarch32-low.h: New file.
5772 * linux-arm-low.c (arm_fill_gregset): Move it to
5773 linux-aarch32-low.c.
5774 (arm_store_gregset): Likewise.
5775 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5776 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5777 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5778 (regs_info): Rename to regs_info_arm.
5779 (arm_regs_info): Return regs_info_aarch32 if
5780 have_ptrace_getregset is 1 and target description is
5781 arm_with_neon or arm_with_vfpv3.
5782 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5783 Call initialize_low_arch_aarch32 instead.
5785 2015-08-04 Yao Qi <yao.qi@linaro.org>
5787 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5788 * linux-low.c: ... here.
5789 * linux-low.h (have_ptrace_getregset): Declare it.
5791 2015-08-04 Pedro Alves <palves@redhat.com>
5793 * thread-db.c (struct thread_db): Use new typedefs.
5794 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5796 (disable_thread_event_reporting): Cast result of dlsym to
5797 destination function pointer type.
5798 (thread_db_mourn): Use td_ta_delete_ftype.
5800 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5802 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5804 (CDX_BREAKPOINT): Define for R2.
5805 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5806 (the_low_target): Add comments.
5808 2015-07-30 Yao Qi <yao.qi@linaro.org>
5810 * linux-arm-low.c (arm_hwcap): Remove it.
5811 (arm_read_description): New local variable arm_hwcap. Don't
5812 set arm_hwcap to zero.
5814 2015-07-30 Yao Qi <yao.qi@linaro.org>
5816 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5817 Use regcache->tdesc instead.
5818 (arm_store_wmmxregset): Likewise.
5819 (arm_fill_vfpregset): Likewise.
5820 (arm_store_vfpregset): Likewise.
5822 2015-07-30 Yao Qi <yao.qi@linaro.org>
5824 * linux-arm-low.c: Include arch/arm.h.
5825 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5826 (arm_store_gregset): Likewise.
5828 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5830 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5831 ptrace's 4th parameter.
5833 2015-07-27 Yao Qi <yao.qi@linaro.org>
5835 * configure.srv (case aarch64*-*-linux*): Don't set
5838 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5840 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5842 * linux-arm-low.c: Likewise.
5843 * linux-cris-low.c: Likewise.
5844 * linux-crisv32-low.c: Likewise.
5845 * linux-low.c: Likewise.
5846 * linux-m68k-low.c: Likewise.
5847 * linux-mips-low.c: Likewise.
5848 * linux-nios2-low.c: Likewise.
5849 * linux-s390-low.c: Likewise.
5850 * linux-sparc-low.c: Likewise.
5851 * linux-tic6x-low.c: Likewise.
5852 * linux-tile-low.c: Likewise.
5853 * linux-x86-low.c: Likewise.
5855 2015-07-24 Pedro Alves <palves@redhat.com>
5857 * config.in: Regenerate.
5858 * configure: Regenerate.
5860 2015-07-24 Pedro Alves <palves@redhat.com>
5862 * acinclude.m4: Include ../ptrace.m4.
5863 * configure.ac: Call GDB_AC_PTRACE.
5864 * config.in, configure: Regenerate.
5866 2015-07-24 Yao Qi <yao.qi@linaro.org>
5868 * linux-low.c (linux_create_inferior): Remove setting to
5869 proc->priv->new_inferior.
5870 (linux_attach): Likewise.
5871 (linux_low_filter_event): Likewise.
5872 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5874 2015-07-24 Yao Qi <yao.qi@linaro.org>
5876 * linux-low.c (linux_arch_setup): New function.
5877 (linux_low_filter_event): If proc->tdesc is NULL and
5878 proc->attached is true, call the_low_target.arch_setup.
5879 Otherwise, keep status pending, and return.
5880 (linux_resume_one_lwp_throw): Don't call get_pc if
5881 thread->while_stepping isn't NULL. Don't call
5882 get_thread_regcache if proc->tdesc is NULL.
5883 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5884 (linux_target_ops): Install arch_setup.
5885 * server.c (start_inferior): Call the_target->arch_setup.
5886 * target.h (struct target_ops) <arch_setup>: New field.
5887 (target_arch_setup): New marco.
5888 * lynx-low.c (lynx_target_ops): Update.
5889 * nto-low.c (nto_target_ops): Update.
5890 * spu-low.c (spu_target_ops): Update.
5891 * win32-low.c (win32_target_ops): Update.
5893 2015-07-24 Yao Qi <yao.qi@linaro.org>
5895 * linux-low.c (linux_add_process): Don't set
5896 proc->priv->new_inferior.
5897 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5898 (linux_attach): Likewise.
5900 2015-07-24 Yao Qi <yao.qi@linaro.org>
5902 * server.c (start_inferior): Code refactor.
5904 2015-07-24 Yao Qi <yao.qi@linaro.org>
5906 * server.c (process_serial_event): Set general_thread.
5908 2015-07-21 Yao Qi <yao.qi@linaro.org>
5910 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5911 aarch64_linux_get_debug_reg_capacity.
5913 2015-07-17 Yao Qi <yao.qi@linaro.org>
5915 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5916 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5917 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5918 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5919 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5920 (AARCH64_HWP_ALIGNMENT): Likewise.
5921 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5922 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5923 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5924 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5925 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5926 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5927 (struct aarch64_debug_reg_state): Likewise.
5928 (struct arch_lwp_info): Likewise.
5929 (aarch64_align_watchpoint): Likewise.
5930 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5931 (aarch64_watchpoint_length): Likewise.
5932 (aarch64_point_encode_ctrl_reg): Likewise
5933 (aarch64_point_is_aligned): Likewise.
5934 (aarch64_align_watchpoint): Likewise.
5935 (aarch64_linux_set_debug_regs):
5936 (aarch64_dr_state_insert_one_point): Likewise.
5937 (aarch64_dr_state_remove_one_point): Likewise.
5938 (aarch64_handle_breakpoint): Likewise.
5939 (aarch64_handle_aligned_watchpoint): Likewise.
5940 (aarch64_handle_unaligned_watchpoint): Likewise.
5941 (aarch64_handle_watchpoint): Likewise.
5943 2015-07-17 Yao Qi <yao.qi@linaro.org>
5945 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5946 and don't aarch64_get_debug_reg_state. All callers update.
5947 (aarch64_handle_aligned_watchpoint): Likewise.
5948 (aarch64_handle_unaligned_watchpoint): Likewise.
5949 (aarch64_handle_watchpoint): Likewise.
5950 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5951 (aarch64_remove_point): Likewise.
5953 2015-07-17 Yao Qi <yao.qi@linaro.org>
5955 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5957 (aarch64_handle_unaligned_watchpoint): Likewise.
5959 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5961 Revert the previous 3 commits:
5962 Move gdb_regex* to common/
5963 Move linux_find_memory_regions_full & co.
5964 gdbserver build-id attribute generator
5966 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5967 Jan Kratochvil <jan.kratochvil@redhat.com>
5969 gdbserver build-id attribute generator.
5970 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5971 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5972 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5974 (get_dynamic): Use find_pdhr to traverse program headers.
5975 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5976 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5977 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5978 (get_hex_build_id): New.
5979 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5980 to reply XML document.
5982 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5983 Jan Kratochvil <jan.kratochvil@redhat.com>
5985 * target.c: Include target/target-utils.h and fcntl.h.
5986 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5987 (target_fileio_read_stralloc): New functions.
5989 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5991 * Makefile.in (OBS): Add gdb_regex.o.
5993 * config.in: Rebuilt.
5994 * configure: Rebuilt.
5996 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5997 Jan Kratochvil <jan.kratochvil@redhat.com>
5999 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6000 * Makefile.in (OBS): Add target-utils.o.
6001 (linux-maps.o, target-utils.o): New.
6002 * configure.srv (srv_linux_obj): Add linux-maps.o.
6004 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6006 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6008 (the_low_target): Install it.
6010 2015-07-14 Pedro Alves <palves@redhat.com>
6012 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6013 Instead, ignore ECHILD, and throw an error for other errnos.
6015 2015-07-10 Pedro Alves <palves@redhat.com>
6017 * event-loop.c (struct callback_event) <data>: Change type to
6018 gdb_client_data instance instead of gdb_client_data pointer.
6019 (append_callback_event): Adjust.
6021 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6023 * linux-aarch64-low.c: Add comments for each linux_target_ops
6024 method. Remove comments already covered in target_ops and
6025 linux_target_ops definitions.
6026 (the_low_target): Add comments for each unimplemented method.
6028 2015-07-09 Yao Qi <yao.qi@linaro.org>
6030 * linux-aarch64-low.c (aarch64_regmap): Remove.
6031 (aarch64_usrregs_info): Remove.
6032 (regs_info): Set field usrregs to NULL.
6034 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6036 * linux-low.c: Include "rsp-low.h"
6037 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6038 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6039 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6040 (handle_btrace_enable_pt): New.
6041 (handle_btrace_general_set): Support "pt".
6042 (handle_btrace_conf_general_set): Support "pt:size".
6044 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6046 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6049 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6051 * linux-aarch64-low.c: Remove comment about endianness.
6052 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6053 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6056 2015-06-24 Gary Benson <gbenson@redhat.com>
6058 * linux-i386-ipa.c (stdint.h): Do not include.
6059 * lynx-i386-low.c (stdint.h): Likewise.
6060 * lynx-ppc-low.c (stdint.h): Likewise.
6061 * mem-break.c (stdint.h): Likewise.
6062 * thread-db.c (stdint.h): Likewise.
6063 * tracepoint.c (stdint.h): Likewise.
6064 * win32-low.c (stdint.h): Likewise.
6066 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6068 * server.c (write_qxfer_response): Update call to
6069 remote_escape_output.
6071 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6072 Jan Kratochvil <jan.kratochvil@redhat.com>
6074 Merge multiple hex conversions.
6075 * gdbreplay.c (tohex): Rename to 'fromhex'.
6076 (logchar): Use fromhex.
6078 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6080 * server.c (handle_qxfer_libraries): Set `version' attribute for
6083 2015-06-10 Gary Benson <gbenson@redhat.com>
6085 * target.h (struct target_ops) <multifs_open>: New field.
6086 <multifs_unlink>: Likewise.
6087 <multifs_readlink>: Likewise.
6088 * linux-low.c (nat/linux-namespaces.h): New include.
6089 (linux_target_ops): Initialize the_target->multifs_open,
6090 the_target->multifs_unlink and the_target->multifs_readlink.
6091 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6092 * hostio.c (hostio_fs_pid): New static variable.
6093 (hostio_handle_new_gdb_connection): New function.
6094 (handle_setfs): Likewise.
6095 (handle_open): Use the_target->multifs_open as appropriate.
6096 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6097 (handle_readlink): Use the_target->multifs_readlink as
6099 (handle_vFile): Handle vFile:setfs packets.
6100 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6101 after target_handle_new_gdb_connection.
6103 2015-06-10 Gary Benson <gbenson@redhat.com>
6105 * configure.ac (AC_CHECK_FUNCS): Add setns.
6106 * config.in: Regenerate.
6107 * configure: Likewise.
6108 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6109 (linux-namespaces.o): New rule.
6110 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6112 2015-06-09 Gary Benson <gbenson@redhat.com>
6114 * hostio.c (handle_open): Process mode argument with
6115 fileio_to_host_mode.
6117 2015-06-01 Yao Qi <yao.qi@linaro.org>
6119 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6120 * linux-x86-low.c: Likewise.
6122 2015-05-28 Don Breazeal <donb@codesourcery.com>
6124 * linux-low.c (handle_extended_wait): Initialize
6125 thread_info.last_resume_kind for new fork children.
6127 2015-05-15 Pedro Alves <palves@redhat.com>
6129 * target.h (target_handle_new_gdb_connection): Rewrite using if
6130 wrapped in do/while.
6132 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6134 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6135 * configure, config.in: Regenerate.
6136 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6139 2015-05-12 Don Breazeal <donb@codesourcery.com>
6141 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6142 PTRACE_EVENT_VFORK_DONE.
6143 (linux_low_ptrace_options, extended_event_reported): Add vfork
6145 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6146 and "vforkdone" for RSP 'T' Stop Reply Packet.
6147 * server.h (report_vfork_events): Declare
6150 2015-05-12 Don Breazeal <donb@codesourcery.com>
6152 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6153 (the_low_target) <new_fork>: Initialize new member.
6154 * linux-arm-low.c (arm_new_fork): New function.
6155 (the_low_target) <new_fork>: Initialize new member.
6156 * linux-low.c (handle_extended_wait): Call new target function
6158 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6159 * linux-mips-low.c (mips_add_watchpoint): New function
6160 extracted from mips_insert_point.
6161 (the_low_target) <new_fork>: Initialize new member.
6162 (mips_linux_new_fork): New function.
6163 (mips_insert_point): Call mips_add_watchpoint.
6164 * linux-x86-low.c (x86_linux_new_fork): New function.
6165 (the_low_target) <new_fork>: Initialize new member.
6167 2015-05-12 Don Breazeal <donb@codesourcery.com>
6169 * linux-low.c (handle_extended_wait): Implement return value,
6170 rename argument 'event_child' to 'event_lwp', handle
6171 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6172 (linux_low_ptrace_options): New function.
6173 (linux_low_filter_event): Call linux_low_ptrace_options,
6174 use different argument fo linux_enable_event_reporting,
6175 use return value from handle_extended_wait.
6176 (extended_event_reported): New function.
6177 (linux_wait_1): Call extended_event_reported and set
6178 status to report fork events.
6179 (linux_write_memory): Add pid to debug message.
6180 (reset_lwp_ptrace_options_callback): New function.
6181 (linux_handle_new_gdb_connection): New function.
6182 (linux_target_ops): Initialize new structure member.
6183 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6184 * lynx-low.c: Initialize new structure member.
6185 * remote-utils.c (prepare_resume_reply): Implement stop reason
6186 "fork" for "T" stop message.
6187 * server.c (handle_query): Call handle_new_gdb_connection.
6188 * server.h (report_fork_events): Declare global flag.
6189 * target.h (struct target_ops) <handle_new_gdb_connection>:
6191 (target_handle_new_gdb_connection): New macro.
6192 * win32-low.c: Initialize new structure member.
6194 2015-05-12 Don Breazeal <donb@codesourcery.com>
6196 * mem-break.c (APPEND_TO_LIST): Define macro.
6197 (clone_agent_expr): New function.
6198 (clone_one_breakpoint): New function.
6199 (clone_all_breakpoints): New function.
6200 * mem-break.h: Declare new functions.
6202 2015-05-12 Don Breazeal <donb@codesourcery.com>
6204 * linux-low.c (linux_supports_fork_events): New function.
6205 (linux_supports_vfork_events): New function.
6206 (linux_target_ops): Initialize new structure members.
6207 (initialize_low): Call linux_check_ptrace_features.
6208 * lynx-low.c (lynx_target_ops): Initialize new structure
6210 * server.c (report_fork_events, report_vfork_events):
6212 (handle_query): Add new features to qSupported packet and
6214 (captured_main): Initialize new global variables.
6215 * target.h (struct target_ops) <supports_fork_events>:
6217 <supports_vfork_events>: New member.
6218 (target_supports_fork_events): New macro.
6219 (target_supports_vfork_events): New macro.
6220 * win32-low.c (win32_target_ops): Initialize new structure
6223 2015-05-12 Gary Benson <gbenson@redhat.com>
6225 * server.c (handle_qxfer_exec_file): Use current process
6228 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6230 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6231 Remove HAVE_PTRACE_GETREGS conditionals.
6232 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6233 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6235 2015-05-08 Yao Qi <yao.qi@linaro.org>
6237 * linux-low.c (linux_supports_conditional_breakpoints): New
6239 (linux_target_ops): Install new target method.
6240 * lynx-low.c (lynx_target_ops): Install NULL hook for
6241 supports_conditional_breakpoints.
6242 * nto-low.c (nto_target_ops): Likewise.
6243 * spu-low.c (spu_target_ops): Likewise.
6244 * win32-low.c (win32_target_ops): Likewise.
6245 * server.c (handle_query): Check
6246 target_supports_conditional_breakpoints.
6247 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6249 (target_supports_conditional_breakpoints): New macro.
6251 2015-05-06 Pedro Alves <palves@redhat.com>
6254 * server.c (start_inferior): If the process exits, mourn it.
6256 2015-04-21 Gary Benson <gbenson@redhat.com>
6258 * hostio.c (fileio_open_flags_to_host): Factored out to
6259 fileio_to_host_openflags in common/fileio.c. Single use
6262 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6264 * linux-xtensa-low.c (xtensa_fill_gregset)
6265 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6268 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6270 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6271 (regs_info): Replace usrregs pointer with NULL.
6273 2015-04-17 Gary Benson <gbenson@redhat.com>
6275 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6276 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6277 * server.c (handle_qxfer_exec_file): New function.
6278 (qxfer_packets): Add exec-file entry.
6279 (handle_query): Report qXfer:exec-file:read as supported packet.
6281 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6283 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6285 2015-04-09 Gary Benson <gbenson@redhat.com>
6287 * hostio-errno.c (errno_to_fileio_error): Remove function.
6288 Update caller to use remote_fileio_to_fio_error.
6290 2015-04-09 Yao Qi <yao.qi@linaro.org>
6292 * linux-low.c (linux_insert_point): Call
6293 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6294 (linux_remove_point): Call remove_memory_breakpoint if type is
6296 * linux-x86-low.c (x86_insert_point): Don't call
6297 insert_memory_breakpoint.
6298 (x86_remove_point): Don't call remove_memory_breakpoint.
6300 2015-04-01 Pedro Alves <palves@redhat.com>
6301 Cleber Rosa <crosa@redhat.com>
6303 * server.c (gdbserver_usage): Reorganize and extend the usage
6306 2015-03-24 Pedro Alves <palves@redhat.com>
6308 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6309 output. Also dump TRAP_TRACE.
6310 (linux_low_filter_event): In debug output, distinguish a
6311 resume_stop SIGSTOP from a delayed SIGSTOP.
6313 2015-03-24 Gary Benson <gbenson@redhat.com>
6315 * linux-x86-low.c (x86_linux_new_thread): Moved to
6317 (x86_linux_prepare_to_resume): Likewise.
6319 2015-03-24 Gary Benson <gbenson@redhat.com>
6321 * Makefile.in (x86-linux-dregs.o): New rule.
6322 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6323 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6324 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6325 (x86_linux_dr_get): Likewise.
6326 (x86_linux_dr_set): Likewise.
6327 (update_debug_registers_callback): Likewise.
6328 (x86_linux_dr_set_addr): Likewise.
6329 (x86_linux_dr_get_addr): Likewise.
6330 (x86_linux_dr_set_control): Likewise.
6331 (x86_linux_dr_get_control): Likewise.
6332 (x86_linux_dr_get_status): Likewise.
6333 (x86_linux_update_debug_registers): Likewise.
6335 2015-03-24 Gary Benson <gbenson@redhat.com>
6337 * linux-x86-low.c (x86_linux_update_debug_registers):
6338 New function, factored out from...
6339 (x86_linux_prepare_to_resume): ...this.
6341 2015-03-24 Gary Benson <gbenson@redhat.com>
6343 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6344 (x86_linux_dr_set): Likewise.
6345 (update_debug_registers_callback): Likewise.
6346 (x86_linux_dr_set_addr): Likewise.
6347 (x86_linux_dr_get_addr): Likewise.
6348 (x86_linux_dr_set_control): Likewise.
6349 (x86_linux_dr_get_control): Likewise.
6350 (x86_linux_dr_get_status): Likewise.
6351 (x86_linux_prepare_to_resume): Likewise.
6353 2015-03-24 Gary Benson <gbenson@redhat.com>
6355 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6356 Use perror_with_name. Pass string through gettext.
6357 (x86_linux_dr_set): Likewise.
6359 2015-03-24 Gary Benson <gbenson@redhat.com>
6361 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6362 (x86_linux_dr_set_addr): ...this.
6363 (x86_dr_low_get_addr): Rename to...
6364 (x86_linux_dr_get_addr): ...this.
6365 (x86_dr_low_set_control): Rename to...
6366 (x86_linux_dr_set_control): ...this.
6367 (x86_dr_low_get_control): Rename to...
6368 (x86_linux_dr_get_control): ...this.
6369 (x86_dr_low_get_status): Rename to...
6370 (x86_linux_dr_get_status): ...this.
6371 (x86_dr_low): Update with new function names.
6373 2015-03-24 Gary Benson <gbenson@redhat.com>
6375 * Makefile.in (x86-linux.o): New rule.
6376 * configure.srv: Add x86-linux.o to relevant targets.
6377 * linux-low.c (lwp_set_arch_private_info): New function.
6378 (lwp_arch_private_info): Likewise.
6379 * linux-x86-low.c: Include nat/x86-linux.h.
6380 (arch_lwp_info): Removed structure.
6381 (update_debug_registers_callback):
6382 Use lwp_set_debug_registers_changed.
6383 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6384 and lwp_set_debug_registers_changed.
6385 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6387 2015-03-24 Gary Benson <gbenson@redhat.com>
6389 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6390 * linux-arm-low.c (arm_new_thread): Likewise.
6391 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6392 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6393 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6394 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6396 2015-03-24 Gary Benson <gbenson@redhat.com>
6398 * linux-low.c (ptid_of_lwp): New function.
6399 (lwp_is_stopped): Likewise.
6400 (lwp_stop_reason): Likewise.
6401 * linux-x86-low.c (update_debug_registers_callback):
6403 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6406 2015-03-24 Gary Benson <gbenson@redhat.com>
6408 * linux-low.h (linux_stop_lwp): Remove declaration.
6410 2015-03-24 Gary Benson <gbenson@redhat.com>
6412 * linux-low.h: Include nat/linux-nat.h.
6413 * linux-low.c (iterate_over_lwps_args): New structure.
6414 (iterate_over_lwps_filter): New function.
6415 (iterate_over_lwps): Likewise.
6416 * linux-x86-low.c (update_debug_registers_callback):
6417 Update signature to what iterate_over_lwps expects.
6418 Remove PID check that iterate_over_lwps now performs.
6419 (x86_dr_low_set_addr): Use iterate_over_lwps.
6420 (x86_dr_low_set_control): Likewise.
6422 2015-03-24 Gary Benson <gbenson@redhat.com>
6424 * linux-x86-low.c (x86_debug_reg_state): New function.
6425 (x86_linux_prepare_to_resume): Use the above.
6427 2015-03-24 Gary Benson <gbenson@redhat.com>
6429 * linux-low.c (current_lwp_ptid): New function.
6430 * linux-x86-low.c: Include nat/linux-nat.h.
6431 (x86_dr_low_get_addr): Use current_lwp_ptid.
6432 (x86_dr_low_get_control): Likewise.
6433 (x86_dr_low_get_status): Likewise.
6435 2015-03-20 Pedro Alves <palves@redhat.com>
6437 * tracepoint.c (cmd_qtstatus): Make "str" const.
6439 2015-03-20 Pedro Alves <palves@redhat.com>
6441 * server.c (handle_general_set): Make "req_str" const.
6443 2015-03-19 Pedro Alves <palves@redhat.com>
6445 * linux-low.c (linux_resume_one_lwp): Rename to ...
6446 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6447 instead call perror_with_name.
6448 (check_ptrace_stopped_lwp_gone): New function.
6449 (linux_resume_one_lwp): Reimplement as wrapper around
6450 linux_resume_one_lwp_throw that swallows errors if the LWP is
6453 2015-03-19 Pedro Alves <palves@redhat.com>
6455 * linux-low.c (count_events_callback, select_event_lwp_callback):
6456 No longer check whether the thread has resume_stop as last resume
6459 2015-03-19 Pedro Alves <palves@redhat.com>
6461 * linux-low.c (count_events_callback, select_event_lwp_callback):
6462 Use the lwp's status_pending_p field, not the thread's.
6464 2015-03-19 Pedro Alves <palves@redhat.com>
6466 * linux-low.c (select_event_lwp_callback): Update comments to
6467 no longer mention SIGTRAP.
6469 2015-03-18 Gary Benson <gbenson@redhat.com>
6471 * server.c (handle_query): Do not report vFile:fstat as supported.
6473 2015-03-11 Gary Benson <gbenson@redhat.com>
6475 * hostio.c (sys/types.h): New include.
6476 (sys/stat.h): Likewise.
6477 (common-remote-fileio.h): Likewise.
6478 (handle_fstat): New function.
6479 (handle_vFile): Handle vFile:fstat packets.
6481 2015-03-11 Gary Benson <gbenson@redhat.com>
6483 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6484 struct stat.st_blocks and struct stat.st_blksize.
6485 * configure: Regenerate.
6486 * config.in: Likewise.
6487 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6488 (OBS): Add common-remote-fileio.o.
6489 (common-remote-fileio.o): New rule.
6491 2015-03-09 Pedro Alves <palves@redhat.com>
6493 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6494 'struct sockaddr' pointer in 'accept' call.
6496 2015-03-09 Pedro Alves <palves@redhat.com>
6499 2015-03-07 Pedro Alves <palves@redhat.com>
6500 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6501 or <winsock2.h> here. Instead include "gdb_socket.h".
6502 (remote_open): Use union gdb_sockaddr_u.
6503 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6504 or <winsock2.h> here. Instead include "gdb_socket.h".
6505 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6506 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6508 (init_named_socket, gdb_agent_helper_thread): Use union
6511 2015-03-07 Pedro Alves <palves@redhat.com>
6513 * configure.ac (build_warnings): Move
6514 -Wdeclaration-after-statement to the C-specific set.
6515 * configure: Regenerate.
6517 2015-03-07 Pedro Alves <palves@redhat.com>
6519 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6520 or <winsock2.h> here. Instead include "gdb_socket.h".
6521 (remote_open): Use union gdb_sockaddr_u.
6522 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6523 or <winsock2.h> here. Instead include "gdb_socket.h".
6524 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6525 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6527 (init_named_socket, gdb_agent_helper_thread): Use union
6530 2015-03-07 Pedro Alves <palves@redhat.com>
6532 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6535 2015-03-06 Yao Qi <yao.qi@linaro.org>
6537 * linux-aarch64-low.c (aarch64_insert_point): Use
6538 show_debug_regs as a boolean.
6539 (aarch64_remove_point): Likewise.
6541 2015-03-05 Pedro Alves <palves@redhat.com>
6543 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6544 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6545 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6546 * nto-low.c (nto_target_ops): Likewise.
6547 * spu-low.c (spu_target_ops): Likewise.
6548 * win32-low.c (win32_target_ops): Likewise.
6550 2015-03-04 Pedro Alves <palves@redhat.com>
6552 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6553 Decide whether a breakpoint triggered based on the SIGTRAP's
6555 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6556 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6557 (linux_low_filter_event): Check for breakpoints before checking
6559 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6561 (linux_stopped_by_sw_breakpoint)
6562 (linux_supports_stopped_by_sw_breakpoint)
6563 (linux_stopped_by_hw_breakpoint)
6564 (linux_supports_stopped_by_hw_breakpoint): New functions.
6565 (linux_target_ops): Install new target methods.
6567 2015-03-04 Pedro Alves <palves@redhat.com>
6569 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6570 * server.c (swbreak_feature, hwbreak_feature): New globals.
6571 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6572 (captured_main): Clear swbreak_feature and hwbreak_feature.
6573 * server.h (swbreak_feature, hwbreak_feature): Declare.
6574 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6575 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6576 supports_stopped_by_hw_breakpoint>: New fields.
6577 (target_supports_stopped_by_sw_breakpoint)
6578 (target_stopped_by_sw_breakpoint)
6579 (target_supports_stopped_by_hw_breakpoint)
6580 (target_stopped_by_hw_breakpoint): Declare.
6582 2015-03-04 Pedro Alves <palves@redhat.com>
6584 enum lwp_stop_reason -> enum target_stop_reason
6585 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6586 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6587 (linux_wait_1, stuck_in_jump_pad_callback)
6588 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6589 (linux_stopped_by_watchpoint):
6590 * linux-low.h (enum lwp_stop_reason): Delete.
6591 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6592 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6594 2015-03-04 Yao Qi <yao.qi@linaro.org>
6596 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6598 2015-03-03 Gary Benson <gbenson@redhat.com>
6600 * hostio.c (handle_vFile): Fix prefix lengths.
6602 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6604 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6607 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6609 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6610 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6611 (clean): Add "rm -f" for above C files.
6612 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6613 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6614 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6615 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6616 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6617 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6618 (init_registers_s390x_vx_linux64)
6619 (init_registers_s390x_tevx_linux64)
6620 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6621 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6623 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6624 (s390_store_vxrs_high): New functions.
6625 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6627 (s390_arch_setup): Add logic for selecting one of the new target
6628 descriptions. Activate the new vector regsets if applicable.
6629 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6630 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6631 and init_registers_s390x_tevx_linux64.
6633 2015-03-01 Pedro Alves <palves@redhat.com>
6635 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6638 2015-02-27 Pedro Alves <palves@redhat.com>
6640 * linux-x86-low.c (u_debugreg_offset): New function.
6641 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6643 2015-02-27 Pedro Alves <palves@redhat.com>
6645 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6646 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6647 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6648 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6649 (ps_lsetfpregs, ps_getpid)
6650 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6651 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6652 (ps_lsetxregs, ps_plog): Declare.
6654 2015-02-27 Pedro Alves <palves@redhat.com>
6656 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6657 IP_AGENT_EXPORT_FUNC.
6658 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6659 IP_AGENT_EXPORT_FUNC.
6660 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6661 (IP_AGENT_EXPORT): Delete.
6662 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6663 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6664 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6665 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6666 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6667 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6668 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6669 (traceframe_read_count, traceframe_write_count)
6670 (traceframes_created, trace_state_variables, get_raw_reg)
6671 (get_trace_state_variable_value, set_trace_state_variable_value)
6672 (ust_loaded, helper_thread_id, cmd_buf): Use
6673 IPA_SYM_EXPORTED_NAME.
6674 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6675 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6676 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6677 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6678 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6679 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6680 EXTERN_C_PUSH/EXTERN_C_POP.
6681 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6682 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6683 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6684 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6685 (traceframe_write_count, traceframe_read_count)
6686 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6687 (about_to_request_buffer_space, get_trace_state_variable_value)
6688 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6689 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6690 EXTERN_C_PUSH/EXTERN_C_POP.
6691 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6692 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6693 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6694 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6695 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6696 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6697 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6698 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6700 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6701 (IP_AGENT_EXPORT_VAR_DECL): Define.
6703 (gdb_agent_get_raw_reg): Declare.
6705 2015-02-27 Tom Tromey <tromey@redhat.com>
6706 Pedro Alves <palves@redhat.com>
6708 Rename symbols whose names are reserved C++ keywords throughout.
6710 2015-02-27 Pedro Alves <palves@redhat.com>
6712 * Makefile.in (COMPILER): New, get it from autoconf.
6713 (CXX): Get from autoconf instead.
6714 (COMPILE.pre): Use COMPILER.
6715 (CC-LD): Rename to ...
6716 (CC_LD): ... this. Use COMPILER.
6717 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6718 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6719 * acinclude.m4: Include build-with-cxx.m4.
6720 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6721 Disable -Werror by default if building in C++ mode.
6722 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6723 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6724 the C++ compiler. Save/restore CXXFLAGS too.
6725 * configure: Regenerate.
6727 2015-02-27 Pedro Alves <palves@redhat.com>
6729 * acinclude.m4: Include libiberty.m4.
6730 * configure.ac: Call libiberty_INIT.
6731 * config.in, configure: Regenerate.
6733 2015-02-26 Pedro Alves <palves@redhat.com>
6735 * linux-low.c (linux_wait_1): When incrementing the PC past a
6736 program breakpoint always use the_low_target.breakpoint_len as
6737 increment, rather than the maximum between that and
6738 the_low_target.decr_pc_after_break.
6740 2015-02-23 Pedro Alves <palves@redhat.com>
6742 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6743 thread was doing a step-over; always adjust the PC if
6744 we stepped over a permanent breakpoint.
6745 (linux_wait_1): If we stepped over breakpoint that was on top of a
6746 permanent breakpoint, manually advance the PC past it.
6748 2015-02-23 Pedro Alves <palves@redhat.com>
6750 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6752 (x86_fill_gregset, x86_store_gregset): Use it when handling
6755 2015-02-20 Pedro Alves <palves@redhat.com>
6757 * thread-db.c: Include "nat/linux-procfs.h".
6758 (thread_db_init): Skip listing new threads if the kernel supports
6759 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6761 2015-02-20 Pedro Alves <palves@redhat.com>
6763 * linux-low.c (status_pending_p_callback): Use ptid_match.
6765 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6767 PR breakpoints/16812
6768 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6769 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6770 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6772 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6774 PR breakpoints/15956
6775 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6777 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6779 * linux-low.c (linux_low_btrace_conf): Print size.
6780 * server.c (handle_btrace_conf_general_set): New.
6781 (hanle_general_set): Call handle_btrace_conf_general_set.
6782 (handle_query): Report Qbtrace-conf:bts:size as supported.
6784 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6786 * linux-low.c (linux_low_enable_btrace): Update parameters.
6787 (linux_low_btrace_conf): New.
6788 (linux_target_ops)<to_btrace_conf>: Initialize.
6789 * server.c (current_btrace_conf): New.
6790 (handle_btrace_enable): Rename to ...
6791 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6792 to target_enable_btrace. Update comment. Update users.
6793 (handle_qxfer_btrace_conf): New.
6794 (qxfer_packets): Add btrace-conf entry.
6795 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6796 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6797 (target_ops)<read_btrace_conf>: New.
6798 (target_enable_btrace): Update parameters.
6799 (target_read_btrace_conf): New.
6801 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6803 * server.c (handle_btrace_general_set): Remove call to
6804 target_supports_btrace.
6805 (supported_btrace_packets): New.
6806 (handle_query): Call supported_btrace_packets.
6807 * target.h: include btrace-common.h.
6808 (btrace_target_info): Removed.
6809 (supports_btrace, target_supports_btrace): Update parameters.
6811 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6813 * Makefile.in (SFILES): Add common/btrace-common.c.
6814 (OBS): Add common/btrace-common.o.
6815 (btrace-common.o): Add build rules.
6816 * linux-low: Include btrace-common.h.
6817 (linux_low_read_btrace): Use struct btrace_data. Call
6818 btrace_data_init and btrace_data_fini.
6820 2015-02-06 Pedro Alves <palves@redhat.com>
6822 * thread-db.c (find_new_threads_callback): Add debug output.
6824 2015-02-04 Pedro Alves <palves@redhat.com>
6826 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6827 (resume_stopped_resumed_lwps): New function.
6828 (linux_wait_for_event_filtered): Use it.
6830 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6832 * Makefile.in (SFILES): Add linux-personality.c.
6833 (linux-personality.o): New rule.
6834 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6835 list of objects to be built.
6836 * linux-low.c: Include nat/linux-personality.h.
6837 (linux_create_inferior): Remove code to disable address space
6838 randomization (moved to ../nat/linux-personality.c). Create
6839 cleanup to disable address space randomization.
6841 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6843 * Makefile.in (posix-strerror.o): New rule.
6844 (mingw-strerror.o): Likewise.
6845 * configure: Regenerated.
6846 * configure.ac: Source file ../common/common.host. Initialize new
6847 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6849 2015-01-14 Yao Qi <yao@codesourcery.com>
6851 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6852 (ppc-linux.o): New rule.
6853 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6854 * configure.ac: AC_CHECK_FUNCS(getauxval).
6855 * config.in: Re-generated.
6856 * configure: Re-generated.
6857 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6858 ppc64_64bit_inferior_p
6860 2015-01-14 Yao Qi <yao@codesourcery.com>
6862 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6863 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6864 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6865 (PT_ORIG_R3, PT_TRAP): Likewise.
6866 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6867 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6868 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6870 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6872 * i387-fp.c (i387_cache_to_xsave): In look over
6873 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6874 zmmh_low_space field by use of zmmh_high_space.
6876 2015-01-09 Pedro Alves <palves@redhat.com>
6878 * linux-low.c (step_over_bkpt): Move higher up in the file.
6879 (handle_extended_wait): Don't store the stop_pc here.
6880 (get_stop_pc): Adjust comments and rename to ...
6881 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6882 stopped for a software breakpoint or hardware breakpoint.
6883 (thread_still_has_status_pending_p): New function.
6884 (status_pending_p_callback): Use
6885 thread_still_has_status_pending_p. If the event is no longer
6886 interesting, resume the LWP.
6887 (handle_tracepoints): Add assert.
6888 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6889 (wstatus_maybe_breakpoint): New function.
6890 (cancel_breakpoint): Delete function.
6891 (check_stopped_by_watchpoint): New function, factored out from
6892 linux_low_filter_event.
6893 (lp_status_maybe_breakpoint): Delete function.
6894 (linux_low_filter_event): Remove filter_ptid argument.
6895 Leave thread group exits pending here. Store the LWP's stop PC.
6896 Always leave events pending.
6897 (linux_wait_for_event_filtered): Pull all events out of the
6898 kernel, and leave them all pending.
6899 (count_events_callback, select_event_lwp_callback): Consider all
6901 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6902 (select_event_lwp): Only give preference to the stepping LWP in
6903 all-stop mode. Adjust comments.
6904 (ignore_event): New function.
6905 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6906 references to cancel_breakpoints. Adjust to renames. Also give
6907 equal priority to all LWPs that have had events in non-stop mode.
6908 If reporting a software breakpoint event, unadjust the LWP's PC.
6909 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6910 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6912 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6913 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6914 (linux_stopped_by_watchpoint): Adjust.
6915 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6916 * linux-low.h (enum lwp_stop_reason): New.
6917 (struct lwp_info) <stop_pc>: Adjust comment.
6918 <stopped_by_watchpoint>: Delete field.
6919 <stop_reason>: New field.
6920 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6921 * mem-break.c (software_breakpoint_inserted_here)
6922 (hardware_breakpoint_inserted_here): New function.
6923 * mem-break.h (software_breakpoint_inserted_here)
6924 (hardware_breakpoint_inserted_here): Declare.
6925 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6926 (cancel_breakpoints): Delete.
6927 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6928 (upload_fast_traceframes): Remove references to
6931 2015-01-09 Pedro Alves <palves@redhat.com>
6933 * thread-db.c (find_new_threads_callback): Ignore thread if the
6934 kernel thread ID is -1.
6936 2015-01-09 Pedro Alves <palves@redhat.com>
6938 * linux-low.c (linux_attach_fail_reason_string): Move to
6939 nat/linux-ptrace.c, and rename.
6940 (linux_attach_lwp): Update comment.
6941 (attach_proc_task_lwp_callback): New function.
6942 (linux_attach): Adjust to rename and use
6943 linux_proc_attach_tgid_threads.
6944 (linux_attach_fail_reason_string): Delete declaration.
6946 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6948 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6949 * server.c (gdbserver_version): Likewise.
6951 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6953 * remote-utils.c: Include ctype.h.
6954 (input_interrupt): Explicitly handle the case when the char
6955 received is the NUL byte. Improve the printing of non-ASCII
6958 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6960 * linux-low.c (linux_low_filter_event): Update call to
6961 linux_enable_event_reporting following the addition of
6962 a new parameter to that function.
6964 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6967 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6968 (AARCH64_FPCR_REGNO): Likewise.
6969 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6970 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6971 (aarch64_store_fpregset): Likewise.
6973 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6975 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6976 Remove FIXME comment about assumption about N.
6978 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6980 * configure.ac: If large-file support is disabled in GDBserver,
6981 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6982 * configure: Regenerate.
6984 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6986 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6987 warning upon ENODATA from ptrace.
6988 * linux-s390-low.c (s390_store_tdb): New.
6989 (s390_regsets): Add regset for NT_S390_TDB.
6991 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6993 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6994 without a fill_function.
6995 * linux-s390-low.c (s390_fill_last_break): Remove.
6996 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6997 (s390_arch_setup): Use regset's size instead of fill_function for
7000 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7002 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7003 the regset's store function when ptrace returned an error.
7004 * regcache.c (get_thread_regcache): Invalidate register cache
7005 before fetching inferior's registers.
7007 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7009 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7010 while-loop as for-loop.
7011 (regsets_store_inferior_registers): Likewise.
7013 2014-11-28 Yao Qi <yao@codesourcery.com>
7015 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7016 * config.in, configure: Re-generate.
7017 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7020 2014-11-21 Yao Qi <yao@codesourcery.com>
7022 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7023 (AC_CHECK_HEADERS): Remove malloc.h.
7024 * configure: Re-generated.
7025 * config.in: Re-generated.
7026 * server.h: Don't include alloca.h and malloc.h.
7027 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7028 Don't include malloc.h.
7030 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7032 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7033 corresponding ERRNO check in same block.
7035 2014-11-12 Pedro Alves <palves@redhat.com>
7037 * server.c (cont_thread): Update comment.
7038 (start_inferior, attach_inferior): No longer clear cont_thread.
7039 (handle_v_cont): No longer set cont_thread.
7040 (captured_main): Clear cont_thread each time a GDB connects.
7042 2014-11-12 Pedro Alves <palves@redhat.com>
7044 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7045 thread, and don't resume all threads if the Hc thread has exited.
7047 2014-11-12 Pedro Alves <palves@redhat.com>
7049 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7050 the process group instead of to a specific LWP.
7052 2014-10-15 Pedro Alves <palves@redhat.com>
7055 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7057 (arm_set_thread_context): Delete.
7058 (the_low_target): Adjust.
7059 * win32-i386-low.c (debug_registers_changed)
7060 (debug_registers_used): Delete.
7061 (update_debug_registers_callback): New function.
7062 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7063 needing to update their debug registers.
7064 (win32_get_current_dr): New function.
7065 (x86_dr_low_get_addr, x86_dr_low_get_control)
7066 (x86_dr_low_get_status): Fetch the debug register from the thread
7068 (i386_initial_stuff): Adjust.
7069 (i386_get_thread_context): Remove current_event parameter. Don't
7070 clear debug_registers_changed nor copy DR values to
7072 (i386_set_thread_context): Delete.
7073 (i386_prepare_to_resume): New function.
7074 (i386_thread_added): Mark the thread as needing to update irs
7076 (the_low_target): Remove i386_set_thread_context and install
7077 i386_prepare_to_resume.
7078 * win32-low.c (win32_get_thread_context): Adjust.
7079 (win32_set_thread_context): Use SetThreadContext
7081 (win32_prepare_to_resume): New function.
7082 (win32_require_context): New function, factored out from ...
7083 (thread_rec): ... this.
7084 (continue_one_thread): Call win32_prepare_to_resume on each thread
7085 we're about to continue.
7086 (win32_resume): Call win32_prepare_to_resume on the event thread.
7087 * win32-low.h (struct win32_thread_info)
7088 <debug_registers_changed>: New field.
7089 (struct win32_target_ops): Change prototype of set_thread_context,
7090 delete set_thread_context and add prepare_to_resume.
7091 (win32_require_context): New declaration.
7093 2014-10-08 Gary Benson <gbenson@redhat.com>
7095 * server.h: Do not include common-exceptions.h.
7097 2014-10-08 Gary Benson <gbenson@redhat.com>
7099 * server.h: Do not include cleanups.h.
7101 2014-09-30 James Hogan <james.hogan@imgtec.com>
7103 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7106 2014-09-23 Yao Qi <yao@codesourcery.com>
7108 * linux-low.c (lp_status_maybe_breakpoint): New function.
7109 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7110 (count_events_callback): Likewise.
7111 (select_event_lwp_callback): Likewise.
7112 (cancel_breakpoints_callback): Likewise.
7114 2014-09-19 Don Breazeal <donb@codesourcery.com>
7116 * linux-low.c (handle_extended_wait): Call
7117 linux_ptrace_get_extended_event.
7118 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7119 linux_is_extended_waitstatus.
7121 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7123 * Makefile.in (CPPFLAGS): Define.
7124 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7125 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7127 2014-09-16 Gary Benson <gbenson@redhat.com>
7129 * inferiors.h (current_inferior): Renamed as...
7130 (current_thread): New variable. All uses updated.
7131 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7132 (maybe_move_out_of_jump_pad): Likewise.
7133 (cancel_breakpoint): Likewise.
7134 (linux_low_filter_event): Likewise.
7135 (wait_for_sigstop): Likewise.
7136 (linux_resume_one_lwp): Likewise.
7137 (need_step_over_p): Likewise.
7138 (start_step_over): Likewise.
7139 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7140 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7141 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7142 and save_inferior as saved_thread.
7143 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7145 (regcache_invalidate_thread): Likewise.
7146 * remote-utils.c (prepare_resume_reply): Likewise.
7147 * thread-db.c (thread_db_get_tls_address): Likewise.
7148 (disable_thread_event_reporting): Likewise.
7149 (remove_thread_event_breakpoints): Likewise.
7150 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7152 * target.h (set_desired_inferior): Renamed as...
7153 (set_desired_thread): New declaration. All uses updated.
7154 * server.c (myresume): Updated comment to reference thread instead
7156 (handle_serial_event): Likewise.
7157 (handle_target_event): Likewise.
7159 2014-09-12 Tom Tromey <tromey@redhat.com>
7160 Gary Benson <gbenson@redhat.com>
7162 * regcache.h: Include common-regcache.h.
7163 (regcache_read_pc): Don't declare.
7164 * regcache.c (get_thread_regcache_for_ptid): New function.
7166 2014-09-11 Tom Tromey <tromey@redhat.com>
7167 Gary Benson <gbenson@redhat.com>
7169 * symbol.c: New file.
7170 * Makefile.in (SFILES): Add symbol.c.
7171 (OBS): Add symbol.o.
7173 2014-09-11 Gary Benson <gbenson@redhat.com>
7175 * target.c (target_stop_ptid, target_continue_ptid): New
7178 2014-09-11 Tom Tromey <tromey@redhat.com>
7179 Gary Benson <gbenson@redhat.com>
7181 * target.h: Include target/target.h.
7182 * target.c (target_read_memory, target_read_uint32)
7183 (target_write_memory): New functions.
7185 2014-09-11 Gary Benson <gbenson@redhat.com>
7187 * server.h (debug_hw_points): Don't declare.
7188 * server.c (debug_hw_points): Don't define. Replace all uses
7189 with show_debug_regs.
7190 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7191 all uses with show_debug_regs.
7193 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7195 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7196 endianness into account.
7197 (ppc_supply_ptrace_register): Likewise.
7199 2014-09-03 James Hogan <james.hogan@imgtec.com>
7201 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7202 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7204 2014-09-03 Gary Benson <gbenson@redhat.com>
7206 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7207 ALL_DEBUG_ADDRESS_REGISTERS.
7209 2014-09-02 Gary Benson <gbenson@redhat.com>
7211 * i386-low.h: Renamed as...
7212 * x86-low.h: New file. All type, function and variable name
7213 prefixes changed from "i386_" to "x86_". All references updated.
7214 * i386-low.c: Renamed as...
7215 * x86-low.c: New file. All type, function and variable name
7216 prefixes changed from "i386_" to "x86_". All references updated.
7218 2014-09-02 Gary Benson <gbenson@redhat.com>
7220 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7221 (x86_linux_new_thread): Likewise.
7223 2014-08-29 Gary Benson <gbenson@redhat.com>
7225 * server.h (setjmp.h): Do not include.
7226 (toplevel): Do not declare.
7227 (common-exceptions.h): Include.
7228 (cleanups.h): Likewise.
7229 * server.c (toplevel): Do not define.
7230 (exit_code): New static global.
7231 (detach_or_kill_for_exit_cleanup): New function.
7232 (main): New function. Original main renamed to...
7233 (captured_main): New function.
7234 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7236 2014-08-29 Gary Benson <gbenson@redhat.com>
7238 * Makefile.in (SFILES): Add common/common-exceptions.c.
7239 (OBS): Add common-exceptions.o.
7240 (common-exceptions.o): New rule.
7241 * utils.c (prepare_to_throw_exception): New function.
7243 2014-08-29 Gary Benson <gbenson@redhat.com>
7245 * config.in: Regenerate.
7246 * configure: Likewise.
7248 2014-08-29 Gary Benson <gbenson@redhat.com>
7250 * Makefile.in (SFILES): Add common/cleanups.c.
7252 (cleanups.o): New rule.
7254 2014-08-29 Gary Benson <gbenson@redhat.com>
7256 * utils.c (internal_vwarning): New function.
7258 2014-08-28 Gary Benson <gbenson@redhat.com>
7260 * utils.h (fatal): Remove declaration.
7261 * utils.c (fatal): Remove function.
7263 2014-08-28 Gary Benson <gbenson@redhat.com>
7265 * tracepoint.c (gdb_agent_init): Replace fatal with
7267 (initialize_tracepoint): Likewise.
7269 2014-08-28 Gary Benson <gbenson@redhat.com>
7271 * remote-utils.c (remote_prepare): Replace fatal with error.
7273 2014-08-28 Gary Benson <gbenson@redhat.com>
7275 * linux-low.c (linux_async): Replace fatal with warning.
7277 (linux_start_non_stop): Return -1 if linux_async failed.
7279 2014-08-28 Gary Benson <gbenson@redhat.com>
7281 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7283 (i386_dr_low_get_addr): Remove vague comment.
7284 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7287 2014-08-28 Gary Benson <gbenson@redhat.com>
7289 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7290 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7292 (linux_resume_one_lwp): Likewise.
7293 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7295 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7296 with internal_error.
7297 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7298 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7299 (find_register_by_name): Replace fatal with internal_error.
7300 (find_regno): Likewise.
7301 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7302 * thread-db.c (thread_db_create_event): Likewise.
7303 (thread_db_load_search): Likewise.
7304 (try_thread_db_load_1): Likewise.
7305 * tracepoint.c (get_jump_space_head): Replace fatal with
7307 (claim_trampoline_space): Likewise.
7308 (have_fast_tracepoint_trampoline_buffer): Likewise.
7309 (cmd_qtstart): Likewise.
7310 (stop_tracing): Likewise.
7311 (fast_tracepoint_collecting): Likewise.
7312 (target_malloc): Likewise.
7313 (download_tracepoint): Likewise.
7314 (download_trace_state_variables): Replace check with gdb_assert.
7315 (upload_fast_traceframes): Replace fatal with internal_error.
7317 2014-08-19 Tom Tromey <tromey@redhat.com>
7318 Gary Benson <gbenson@redhat.com>
7320 * Makefile.in (SFILES): Add common/common-debug.c.
7321 (OBS): Add common-debug.o.
7322 (common-debug.o): New rule.
7323 * debug.h (debug_printf): Don't declare.
7324 * debug.c (debug_printf): Renamed and rewritten as...
7325 (debug_vprintf): New function.
7327 2014-08-19 Gary Benson <gbenson@redhat.com>
7329 * utils.h: Do not include print-utils.h.
7331 2014-08-19 Tom Tromey <tromey@redhat.com>
7332 Gary Benson <gbenson@redhat.com>
7334 * server.h: Add static assertion.
7335 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7337 2014-08-19 Tom Tromey <tromey@redhat.com>
7338 Gary Benson <gbenson@redhat.com>
7340 * Makefile.in (SFILES): Add common/errors.c.
7341 (OBS): Add errors.o.
7342 (IPA_OBS): Add errors-ipa.o.
7343 (errors.o): New rule.
7344 (errors-ipa.o): Likewise.
7345 * utils.h (perror_with_name, error, warning): Don't declare.
7346 * utils.c (warning): Renamed and rewritten as...
7347 (vwarning): New function.
7348 (error): Renamed and rewritten as...
7349 (verror): New function.
7350 (internal_error): Renamed and rewritten as...
7351 (internal_verror): New function.
7353 2014-08-07 Gary Benson <gbenson@redhat.com>
7355 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7356 * configure: Regenerate.
7357 * config.in: Likewise.
7358 * server.h: Do not include errno.h.
7359 * event-loop.c: Likewise.
7360 * hostio-errno.c: Likewise.
7361 * linux-low.c: Likewise.
7362 * remote-utils.c: Likewise.
7363 * spu-low.c: Likewise.
7364 * utils.c: Likewise.
7365 * gdbreplay.c: Unconditionally include errno.h.
7367 2014-08-07 Gary Benson <gbenson@redhat.com>
7369 * server.h: Do not include string.h.
7370 * event-loop.c: Likewise.
7371 * linux-low.c: Likewise.
7372 * regcache.c: Likewise.
7373 * remote-utils.c: Likewise.
7374 * spu-low.c: Likewise.
7375 * utils.c: Likewise.
7377 2014-08-07 Gary Benson <gbenson@redhat.com>
7379 * server.h: Do not include gdb_assert.h.
7381 2014-08-07 Gary Benson <gbenson@redhat.com>
7383 * server.h: Do not include common-utils.h.
7385 2014-08-07 Gary Benson <gbenson@redhat.com>
7387 * server.h: Do not include ptid.h.
7388 * notif.h: Likewise.
7390 2014-08-07 Gary Benson <gbenson@redhat.com>
7392 * server.h: Do not include gdb_locale.h.
7394 2014-08-07 Gary Benson <gbenson@redhat.com>
7396 * server.h: Do not include gdb/signals.h.
7397 * win32-low.c: Likewise.
7399 2014-08-07 Gary Benson <gbenson@redhat.com>
7401 * server.h: Do not include pathmax.h.
7403 2014-08-07 Gary Benson <gbenson@redhat.com>
7405 * server.h: Do not include libiberty.h.
7406 * linux-bfin-low.c: Likewise.
7408 2014-08-07 Gary Benson <gbenson@redhat.com>
7410 * server.h: Do not include ansidecl.h.
7412 2014-08-07 Gary Benson <gbenson@redhat.com>
7414 * linux-x86-low.c: Do not include stddef.h.
7415 * lynx-ppc-low.c: Likewise.
7416 * tracepoint.c: Likewise.
7418 2014-08-07 Gary Benson <gbenson@redhat.com>
7420 * server.h: Do not include stdarg.h.
7421 * nto-low.c: Likewise.
7423 2014-08-07 Gary Benson <gbenson@redhat.com>
7425 * server.h: Do not include stdlib.h.
7426 * inferiors.c: Likewise.
7427 * linux-low.c: Likewise.
7428 * regcache.c: Likewise.
7429 * spu-low.c: Likewise.
7430 * tracepoint.c: Likewise.
7431 * utils.c: Likewise.
7433 2014-08-07 Gary Benson <gbenson@redhat.com>
7435 * server.h: Do not include stdio.h.
7436 * linux-low.c: Likewise.
7437 * remote-utils.c: Likewise.
7438 * spu-low.c: Likewise.
7439 * utils.c: Likewise.
7440 * wincecompat.c: Likewise.
7442 2014-08-06 Gary Benson <gbenson@redhat.com>
7444 * regcache.c (init_register_cache): Move conditionals inside if.
7446 2014-08-06 Gary Benson <gbenson@redhat.com>
7448 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7450 2014-07-31 Gary Benson <gbenson@redhat.com>
7452 * ax.h: Do not include server.h.
7453 * gdbthread.h: Likewise.
7454 * lynx-low.h: Likewise.
7455 * notif.h: Likewise.
7457 2014-07-30 Gary Benson <gbenson@redhat.com>
7459 * server.h: Include common-defs.h.
7460 Do not include config.h or build-gnulib-gdbserver/config.h.
7462 2014-07-30 Gary Benson <gbenson@redhat.com>
7464 * hostio-errno.c: Move server.h to top of includes list.
7465 * inferiors.c: Likewise.
7466 * linux-x86-low.c: Likewise.
7467 * notif.c: Include server.h.
7469 2014-07-24 Tom Tromey <tromey@redhat.com>
7470 Gary Benson <gbenson@redhat.com>
7472 * server.h (CORE_ADDR): Now unsigned.
7474 2014-07-16 Pedro Alves <palves@redhat.com>
7476 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7478 2014-07-15 Pedro Alves <palves@redhat.com>
7480 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7483 2014-07-11 Pedro Alves <palves@redhat.com>
7485 * linux-low.c (kill_wait_lwp): New function, based on
7486 kill_one_lwp_callback, but use my_waitpid directly.
7487 (kill_one_lwp_callback, linux_kill): Use it.
7489 2014-06-23 Pedro Alves <palves@redhat.com>
7491 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7492 before setting DR0..DR3.
7494 2014-06-20 Gary Benson <gbenson@redhat.com>
7496 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7497 * configure: Regenerated.
7498 * config.in: Likewise.
7500 2014-06-20 Gary Benson <gbenson@redhat.com>
7502 * Makefile.in (SFILES): Update locations for files moved
7504 (object file files): Reordered.
7506 2014-06-20 Gary Benson <gbenson@redhat.com>
7508 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7509 (i386_dr_low_set_addr): Likewise.
7510 (i386_dr_low_get_addr): Likewise.
7511 (i386_dr_low_can_set_control): Likewise.
7512 (i386_dr_low_set_control): Likewise.
7513 (i386_dr_low_get_control): Likewise.
7514 (i386_dr_low_get_status): Likewise.
7515 (i386_get_debug_register_length): Likewise.
7516 * linux-x86-low.c (i386_dr_low_set_addr):
7517 Changed signature. Made static.
7518 (i386_dr_low_get_addr): Likewise.
7519 (i386_dr_low_set_control): Likewise.
7520 (i386_dr_low_get_control): Likewise.
7521 (i386_dr_low_get_status): Likewise.
7522 (i386_dr_low): New global variable.
7523 * win32-i386-low.c (i386_dr_low_set_addr):
7524 Changed signature. Made static.
7525 (i386_dr_low_get_addr): Likewise.
7526 (i386_dr_low_set_control): Likewise.
7527 (i386_dr_low_get_control): Likewise.
7528 (i386_dr_low_get_status): Likewise.
7529 (i386_dr_low): New global variable.
7531 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7533 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7534 * Makefile.in (AR, AR_FLAGS): Define.
7535 * configure: Regenerate.
7537 2014-06-19 Gary Benson <gbenson@redhat.com>
7539 * Makefile.in (i386-dregs.o): New rule.
7540 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7541 * i386-low.c (target.h): Remove include.
7542 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7543 (DR_CONTROL_SHIFT): Likewise.
7544 (DR_CONTROL_SIZE): Likewise.
7545 (DR_RW_EXECUTE): Likewise.
7546 (DR_RW_WRITE): Likewise.
7547 (DR_RW_READ): Likewise.
7548 (DR_RW_IORW): Likewise.
7549 (DR_LEN_1): Likewise.
7550 (DR_LEN_2): Likewise.
7551 (DR_LEN_4): Likewise.
7552 (DR_LEN_8): Likewise.
7553 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7554 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7555 (DR_ENABLE_SIZE): Likewise.
7556 (DR_LOCAL_SLOWDOWN): Likewise.
7557 (DR_GLOBAL_SLOWDOWN): Likewise.
7558 (DR_CONTROL_RESERVED): Likewise.
7559 (I386_DR_CONTROL_MASK): Likewise.
7560 (I386_DR_VACANT): Likewise.
7561 (I386_DR_LOCAL_ENABLE): Likewise.
7562 (I386_DR_GLOBAL_ENABLE): Likewise.
7563 (I386_DR_DISABLE): Likewise.
7564 (I386_DR_SET_RW_LEN): Likewise.
7565 (I386_DR_GET_RW_LEN): Likewise.
7566 (I386_DR_WATCH_HIT): Likewise.
7567 (i386_wp_op_t): Likewise.
7568 (i386_show_dr): Likewise.
7569 (i386_length_and_rw_bits): Likewise.
7570 (i386_insert_aligned_watchpoint): Likewise.
7571 (i386_remove_aligned_watchpoint): Likewise.
7572 (i386_handle_nonaligned_watchpoint): Likewise.
7573 i386_update_inferior_debug_regs(): Likewise.
7574 (i386_dr_insert_watchpoint): Likewise.
7575 (i386_dr_remove_watchpoint): Likewise.
7576 (i386_dr_region_ok_for_watchpoint): Likewise.
7577 (i386_dr_stopped_data_address): Likewise.
7578 (i386_dr_stopped_by_watchpoint): Likewise.
7580 2014-06-19 Gary Benson <gbenson@redhat.com>
7582 * i386-low.c (i386_dr_show): Renamed to
7583 i386_show_dr and made static. All uses updated.
7584 (i386_dr_length_and_rw_bits): Renamed to
7585 i386_length_and_rw_bits and made static.
7587 (i386_dr_insert_aligned_watchpoint): Renamed to
7588 i386_insert_aligned_watchpoint and made static.
7590 (i386_dr_remove_aligned_watchpoint): Renamed to
7591 i386_remove_aligned_watchpoint and made static.
7593 (i386_dr_update_inferior_debug_regs): Renamed to
7594 i386_update_inferior_debug_regs and made static.
7597 2014-06-18 Gary Benson <gbenson@redhat.com>
7599 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7600 (i386_dr_low_can_set_control): Likewise.
7601 (i386_get_debug_register_length): Likewise.
7602 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7603 (i386_dr_low_can_set_control): Likewise.
7604 (i386_get_debug_register_length): Likewise.
7606 2014-06-17 Gary Benson <gbenson@redhat.com>
7608 * i386-low.h (i386-dregs.h): New include.
7609 (DR_FIRSTADDR): Now in i386-dregs.h.
7610 (DR_LASTADDR): Likewise.
7611 (DR_NADDR): Likewise.
7612 (DR_STATUS): Likewise.
7613 (DR_CONTROL): Likewise.
7614 (i386_debug_reg_state): Likewise.
7615 (i386_dr_insert_watchpoint): Likewise.
7616 (i386_dr_remove_watchpoint): Likewise.
7617 (i386_dr_region_ok_for_watchpoint): Likewise.
7618 (i386_dr_stopped_data_address): Likewise.
7619 (i386_dr_stopped_by_watchpoint): Likewise.
7620 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7622 2014-06-18 Gary Benson <gbenson@redhat.com>
7624 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7625 i386_dr_insert_watchpoint.
7626 (i386_low_remove_watchpoint): Renamed to
7627 i386_dr_remove_watchpoint.
7628 (i386_low_region_ok_for_watchpoint): Renamed to
7629 i386_dr_region_ok_for_watchpoint.
7630 (i386_low_stopped_data_address): Renamed to
7631 i386_dr_stopped_data_address.
7632 (i386_low_stopped_by_watchpoint): Renamed to
7633 i386_dr_stopped_by_watchpoint.
7634 * i386-low.c (i386_show_dr): Renamed to
7635 i386_dr_show and made nonstatic. All uses updated.
7636 (i386_length_and_rw_bits): Renamed to
7637 i386_dr_length_and_rw_bits and made nonstatic.
7639 (i386_insert_aligned_watchpoint): Renamed to
7640 i386_dr_insert_aligned_watchpoint and made nonstatic.
7642 (i386_remove_aligned_watchpoint): Renamed to
7643 i386_dr_remove_aligned_watchpoint and made nonstatic.
7645 (i386_update_inferior_debug_regs): Renamed to
7646 i386_dr_update_inferior_debug_regs and made nonstatic.
7648 (i386_low_insert_watchpoint): Renamed to
7649 i386_dr_insert_watchpoint. All uses updated.
7650 (i386_low_remove_watchpoint): Renamed to
7651 i386_dr_remove_watchpoint. All uses updated.
7652 (i386_low_region_ok_for_watchpoint): Renamed to
7653 i386_dr_region_ok_for_watchpoint. All uses updated.
7654 (i386_low_stopped_data_address): Renamed to
7655 i386_dr_stopped_data_address. All uses updated.
7656 (i386_low_stopped_by_watchpoint): Renamed to
7657 i386_dr_stopped_by_watchpoint. All uses updated.
7659 2014-06-18 Gary Benson <gbenson@redhat.com>
7661 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7662 (i386_dr_low_can_set_control): Likewise.
7663 (i386_insert_aligned_watchpoint): New check.
7665 2014-06-18 Gary Benson <gbenson@redhat.com>
7667 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7670 2014-06-18 Gary Benson <gbenson@redhat.com>
7672 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7673 instead of fatal and error.
7674 (i386_handle_nonaligned_watchpoint): Likewise.
7676 2014-06-18 Gary Benson <gbenson@redhat.com>
7678 * i386-low.c (i386_get_debug_register_length): New macro.
7679 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7680 (i386_show_dr): Use debug_printf instead of fprintf. Use
7681 phex to format values.
7683 2014-06-18 Gary Benson <gbenson@redhat.com>
7685 * i386-low.h: Comment changes.
7686 * i386-low.c: Likewise.
7688 2014-06-18 Gary Benson <gbenson@redhat.com>
7690 * i386-low.c: Whitespace changes.
7692 2014-06-12 Tom Tromey <tromey@redhat.com>
7694 * utils.c (freeargv): Remove.
7696 2014-06-12 Tom Tromey <tromey@redhat.com>
7698 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7699 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7700 (parse_debug_format_options): Likewise.
7701 (gdbserver_usage): Likewise.
7702 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7703 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7704 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7706 ($(LIBGNU)): Depend on libiberty.
7707 (all-lib): Recurse into all subdirs.
7708 (install-only): Invoke "install" target in subdirs.
7709 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7711 * configure: Rebuild.
7712 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7713 for vasprintf, vsnprintf, or gettimeofday.
7714 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7717 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7719 * development.sh: Delete.
7720 * Makefile.in (config.status): Adjust dependency on development.sh.
7721 * configure.ac: Adjust development.sh source call.
7722 * configure: Regenerate.
7724 2014-06-02 Pedro Alves <palves@redhat.com>
7726 * ax.c (gdb_free_agent_expr): New function.
7727 * ax.h (gdb_free_agent_expr): New declaration.
7728 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7730 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7732 (clear_breakpoint_conditions_and_commands): New function.
7733 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7734 (clear_breakpoint_conditions_and_commands): New declaration.
7736 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7738 * linux-aarch64-low.c (asm/ptrace.h): Include.
7740 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7742 Fix TLS access for -static -pthread.
7743 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7744 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7745 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7747 2014-05-20 Pedro Alves <palves@redhat.com>
7749 * linux-aarch64-low.c (aarch64_insert_point)
7750 (aarch64_remove_point): No longer check whether the type is
7751 supported here. Adjust to new interface.
7752 (the_low_target): Install aarch64_supports_z_point_type as
7753 supports_z_point_type method.
7754 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7755 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7756 instead of a Z packet char. Adjust.
7757 (arm_supports_z_point_type): New function.
7758 (arm_insert_point, arm_remove_point): Adjust to new interface.
7759 (the_low_target): Install arm_supports_z_point_type.
7760 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7761 (cris_insert_point, cris_remove_point): Adjust to new interface.
7762 Don't check whether the type is supported here.
7763 (the_low_target): Install cris_supports_z_point_type.
7764 * linux-low.c (linux_supports_z_point_type): New function.
7765 (linux_insert_point, linux_remove_point): Adjust to new interface.
7766 * linux-low.h (struct linux_target_ops) <insert_point,
7767 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7768 raw_breakpoint pointer parameter.
7769 <supports_z_point_type>: New method.
7770 * linux-mips-low.c (mips_supports_z_point_type): New function.
7771 (mips_insert_point, mips_remove_point): Adjust to new interface.
7772 Use mips_supports_z_point_type.
7773 (the_low_target): Install mips_supports_z_point_type.
7774 * linux-ppc-low.c (the_low_target): Install NULL as
7775 supports_z_point_type method.
7776 * linux-s390-low.c (the_low_target): Install NULL as
7777 supports_z_point_type method.
7778 * linux-sparc-low.c (the_low_target): Install NULL as
7779 supports_z_point_type method.
7780 * linux-x86-low.c (x86_supports_z_point_type): New function.
7781 (x86_insert_point): Adjust to new insert_point interface. Use
7782 insert_memory_breakpoint. Adjust to new
7783 i386_low_insert_watchpoint interface.
7784 (x86_remove_point): Adjust to remove_point interface. Use
7785 remove_memory_breakpoint. Adjust to new
7786 i386_low_remove_watchpoint interface.
7787 (the_low_target): Install x86_supports_z_point_type.
7788 * lynx-low.c (lynx_target_ops): Install NULL as
7789 supports_z_point_type callback.
7790 * nto-low.c (nto_supports_z_point_type): New.
7791 (nto_insert_point, nto_remove_point): Adjust to new interface.
7792 (nto_target_ops): Install nto_supports_z_point_type.
7793 * mem-break.c: Adjust intro comment.
7794 (struct raw_breakpoint) <raw_type, size>: New fields.
7795 <inserted>: Update comment.
7796 <shlib_disabled>: Delete field.
7797 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7798 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7799 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7800 (raw_bkpt_type_to_target_hw_bp_type): New function.
7801 (find_enabled_raw_code_breakpoint_at): New function.
7802 (find_raw_breakpoint_at): New type and size parameters. Use them.
7803 (insert_memory_breakpoint): New function, based off
7804 set_raw_breakpoint_at.
7805 (remove_memory_breakpoint): New function.
7806 (set_raw_breakpoint_at): Reimplement.
7807 (set_breakpoint): New, based on set_breakpoint_at.
7808 (set_breakpoint_at): Reimplement.
7809 (delete_raw_breakpoint): Go through the_target->remove_point
7810 instead of assuming memory breakpoints.
7811 (find_gdb_breakpoint_at): Delete.
7812 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7813 (find_gdb_breakpoint): New function.
7814 (set_gdb_breakpoint_at): Delete.
7815 (z_type_supported): New function.
7816 (set_gdb_breakpoint_1): New function, loosely based off
7817 set_gdb_breakpoint_at.
7818 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7819 (delete_gdb_breakpoint_at): Delete.
7820 (delete_gdb_breakpoint_1): New function, loosely based off
7821 delete_gdb_breakpoint_at.
7822 (delete_gdb_breakpoint): New function.
7823 (clear_gdb_breakpoint_conditions): Rename to ...
7824 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7826 (add_condition_to_breakpoint): Make static.
7827 (add_breakpoint_condition): Take a struct breakpoint pointer
7828 instead of an address. Adjust.
7829 (gdb_condition_true_at_breakpoint): Rename to ...
7830 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7832 (gdb_condition_true_at_breakpoint): Reimplement.
7833 (add_breakpoint_commands): Take a struct breakpoint pointer
7834 instead of an address. Adjust.
7835 (gdb_no_commands_at_breakpoint): Rename to ...
7836 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7837 parameter. Return true if no breakpoint was found. Change debug
7839 (gdb_no_commands_at_breakpoint): Reimplement.
7840 (run_breakpoint_commands): Rename to ...
7841 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7842 and change return type to boolean.
7843 (run_breakpoint_commands): New function.
7844 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7845 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7846 breakpoint. Go through the_target->remove_point instead of
7847 assuming memory breakpoint.
7848 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7849 software and hardware breakpoints.
7850 (reinsert_raw_breakpoint): Go through the_target->insert_point
7851 instead of assuming memory breakpoint.
7852 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7853 software and hardware breakpoints.
7854 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7855 Check both software and hardware breakpoints.
7856 (validate_inserted_breakpoint): Assert the breakpoint is a
7857 software breakpoint. Set the inserted flag to -1 instead of
7858 setting shlib_disabled.
7859 (delete_disabled_breakpoints): Adjust.
7860 (validate_breakpoints): Only validate software breakpoints.
7861 Adjust to inserted flag change.
7862 (check_mem_read, check_mem_write): Skip breakpoint types other
7863 than software breakpoints. Adjust to inserted flag change.
7864 * mem-break.h (enum raw_bkpt_type): New enum.
7865 (raw_breakpoint, struct process_info): Forward declare.
7866 (Z_packet_to_target_hw_bp_type): Delete declaration.
7867 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7868 (set_gdb_breakpoint, delete_gdb_breakpoint)
7869 (clear_breakpoint_conditions): New declarations.
7870 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7871 (breakpoint_inserted_here): Update comment.
7872 (add_breakpoint_condition, add_breakpoint_commands): Replace
7873 address parameter with a breakpoint pointer parameter.
7874 (gdb_breakpoint_here): Update comment.
7875 (delete_gdb_breakpoint_at): Delete.
7876 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7877 * server.c (process_point_options): Take a struct breakpoint
7878 pointer instead of an address. Adjust.
7879 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7880 delete_gdb_breakpoint.
7881 * spu-low.c (spu_target_ops): Install NULL as
7882 supports_z_point_type method.
7883 * target.h: Include mem-break.h.
7884 (struct target_ops) <prepare_to_access_memory>: Update comment.
7885 <supports_z_point_type>: New field.
7886 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7887 instead of a char. Also take a raw breakpoint pointer.
7888 * win32-arm-low.c (the_low_target): Install NULL as
7889 supports_z_point_type.
7890 * win32-i386-low.c (i386_supports_z_point_type): New function.
7891 (i386_insert_point, i386_remove_point): Adjust to new interface.
7892 (the_low_target): Install i386_supports_z_point_type.
7893 * win32-low.c (win32_supports_z_point_type): New function.
7894 (win32_insert_point, win32_remove_point): Adjust to new interface.
7895 (win32_target_ops): Install win32_supports_z_point_type.
7896 * win32-low.h (struct win32_target_ops):
7897 <supports_z_point_type>: New method.
7898 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7899 instead of a char. Also take a raw breakpoint pointer.
7901 2014-05-20 Pedro Alves <palves@redhat.com>
7903 * mem-break.h: Include break-common.h.
7904 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7905 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7906 (Z_packet_to_target_hw_bp_type): New declaration.
7907 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7908 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7909 (Z_PACKET_ACCESS_WP): Delete macros.
7910 (Z_packet_to_hw_type): Delete function.
7911 * i386-low.h: Don't include break-common.h here.
7912 (Z_packet_to_hw_type): Delete declaration.
7913 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7914 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7915 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7916 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7917 * linux-aarch64-low.c: Don't include break-common.h here.
7918 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7919 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7920 (Z_packet_to_target_hw_bp_type): Delete function.
7921 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7923 (mips_insert_point, mips_remove_point): Use
7924 Z_packet_to_target_hw_bp_type.
7926 2014-05-20 Pedro Alves <palves@redhat.com>
7928 * linux-aarch64-low.c: Include break-common.h.
7929 (enum target_point_type): Delete.
7930 (Z_packet_to_point_type): Rename to ...
7931 (Z_packet_to_target_hw_bp_type): ... this, and return a
7932 target_hw_bp_type instead.
7933 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7934 instead of an enum target_point_type.
7935 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7937 (aarch64_dr_state_insert_one_point)
7938 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7939 (aarch64_handle_aligned_watchpoint)
7940 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7941 Take an enum target_hw_bp_type instead of an enum
7943 (aarch64_supports_z_point_type): New function.
7944 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7945 use Z_packet_to_target_hw_bp_type.
7947 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7949 * configure.ac: Only use -Werror by default when DEVELOPMENT
7951 * configure: Regenerate.
7953 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7955 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7956 * linux-x86-low.c (X86_64_USER_REGS): New.
7957 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7959 2014-04-28 Yao Qi <yao@codesourcery.com>
7961 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7964 2014-04-25 Pedro Alves <palves@redhat.com>
7967 * linux-low.c (linux_attach_fail_reason_string): New function.
7968 (linux_attach_lwp): Delete.
7969 (linux_attach_lwp_1): Rename to ...
7970 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7971 argument. Remove "initial" parameter. Return int instead of
7972 void. Don't error or warn here.
7973 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7974 failure to attach to the tgid. Call warning when failing to
7976 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7977 argument. Remove "initial" parameter. Return int instead of
7978 void. Don't error or warn here.
7979 (linux_attach_fail_reason_string): New declaration.
7980 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7981 interface change. Use linux_attach_fail_reason_string.
7983 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7984 Walfred Tedeschi <walfred.tedeschi@intel.com>
7986 * Makefile.in: Added rules to handle new files
7987 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7988 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7989 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7990 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7991 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7992 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7994 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7995 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7996 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7997 i386/x32-avx512.xml.
7998 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7999 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8000 i386/x32-avx512-linux.xml.
8001 * i387-fp.c (num_avx512_k_registers): New constant for number
8003 (num_avx512_zmmh_low_registers): New constant for number of
8004 lower ZMM registers (0-15).
8005 (num_avx512_zmmh_high_registers): New constant for number of
8006 higher ZMM registers (16-31).
8007 (num_avx512_ymmh_registers): New contant for number of higher
8008 YMM registers (ymm16-31 added by avx521 on x86_64).
8009 (num_avx512_xmm_registers): New constant for number of higher
8010 XMM registers (xmm16-31 added by AVX512 on x86_64).
8011 (struct i387_xsave): Add space for AVX512 registers.
8012 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8013 Add code to handle AVX512 registers.
8014 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8015 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8016 prototypei from generated file.
8017 (tdesc_amd64_avx512_linux): Likewise.
8018 (init_registers_x32_avx512_linux): Likewise.
8019 (tdesc_x32_avx512_linux): Likewise.
8020 (init_registers_i386_avx512_linux): Likewise.
8021 (tdesc_i386_avx512_linux): Likewise.
8022 (x86_64_regmap): Add AVX512 registers.
8023 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8025 (initialize_low_arch): Add code to initialize AVX512 registers.
8027 2014-04-23 Pedro Alves <palves@redhat.com>
8029 * mem-break.c (find_gdb_breakpoint_at): Make static.
8030 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8032 2014-04-23 Pedro Alves <palves@redhat.com>
8034 * i386-low.c: Don't include break-common.h here.
8035 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8036 prototype to take target_hw_bp_type as argument instead of a Z
8038 * i386-low.h: Include break-common.h here.
8039 (Z_packet_to_hw_type): Declare.
8040 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8042 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8043 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8044 (x86_remove_point): Convert the packet number to a
8045 target_hw_bp_type before calling i386_low_remove_watchpoint.
8046 * win32-i386-low.c (i386_insert_point): Convert the packet number
8047 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8048 (i386_remove_point): Convert the packet number to a
8049 target_hw_bp_type before calling i386_low_remove_watchpoint.
8051 2014-04-23 Pedro Alves <palves@redhat.com>
8053 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8055 2014-04-10 Pedro Alves <palves@redhat.com>
8057 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8058 Check if the condition or command is NULL before checking if the
8059 breakpoint is known. On success, return true.
8060 * mem-break.h (add_breakpoint_condition): Document return.
8061 (add_breakpoint_commands): Add describing comment.
8062 * server.c (skip_to_semicolon): New function.
8063 (process_point_options): Use it.
8065 2014-04-09 Pedro Alves <palves@redhat.com>
8067 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8070 2014-02-27 Pedro Alves <palves@redhat.com>
8073 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8075 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8077 (last_thread_of_process_p): Take a PID argument instead of a
8079 (linux_wait_for_lwp): Delete.
8080 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8082 (linux_low_filter_event): New function, party factored out from
8083 linux_wait_for_event.
8084 (linux_wait_for_event): Rename to ...
8085 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8086 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8087 sigsuspend. Check for zombie leaders.
8088 (linux_wait_for_event): Reimplement as wrapper around
8089 linux_wait_for_event_filtered.
8090 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8091 a normal or signal exit is seen, it's the whole process exiting.
8092 (wait_for_sigstop): No longer a for_each_inferior callback.
8093 Rewrite on top of linux_wait_for_event_filtered.
8094 (stop_all_lwps): Call wait_for_sigstop directly.
8095 * server.c (resume, handle_target_event): Handle
8096 TARGET_WAITKIND_NO_RESUMED.
8098 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8100 * win32-low.c (psapi_get_dll_name,
8101 * win32_CreateToolhelp32Snapshot): Delete.
8102 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8103 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8105 (handle_load_dll): Add function description.
8106 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8108 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8110 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8112 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8113 base address when calling win32_add_one_solib.
8114 (handle_load_dll): Delete local variable load_addr.
8115 Remove 0x1000 offset applied to DLL base address when calling
8116 win32_add_one_solib.
8117 (handle_unload_dll): Add comment.
8119 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8121 * win32-low.c (win32_add_all_dlls): Renames
8122 win32_ensure_ntdll_loaded. Rewrite function documentation.
8123 Adjust implementation to always load all DLLs.
8124 Add 0x1000 offset to DLL base address when calling
8125 win32_add_one_solib.
8126 (child_initialization_done): New static global.
8127 (do_initial_child_stuff): Set child_initialization_done to
8128 zero during child initialization, and 1 after. Replace call
8129 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8131 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8132 (handle_unload_dll): Add function documentation.
8133 (get_child_debug_event): Ignore load and unload DLL events
8134 during child initialization.
8136 2014-02-20 Doug Evans <dje@google.com>
8138 Remove global all_lwps.
8139 * inferiors.h (ptid_of): Move here from linux-low.h.
8140 (pid_of, lwpid_of): Ditto.
8141 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8142 parameter is a struct thread_info * now.
8143 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8144 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8145 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8147 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8148 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8149 * linux-arm-low.c (update_registers_callback): Update, "entry"
8150 parameter is a struct thread_info * now.
8151 Fetch lwpid from current_inferior directly.
8152 (arm_insert_point): Pass &all_threads to find_inferior instead of
8154 (arm_remove_point): Ditto.
8155 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8156 (arm_prepare_to_resume): Fetch pid from thread.
8157 (arm_read_description): Fetch lwpid from current_inferior directly.
8158 * linux-low.c (all_lwps): Delete.
8159 (delete_lwp): Delete call to remove_inferior.
8160 (handle_extended_wait): Fetch lwpid from thread.
8161 (add_lwp): Don't set lwp->entry.id. Remove call to
8162 add_inferior_to_list.
8163 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8164 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8165 (kill_one_lwp_callback): Ditto.
8166 (linux_kill): Don't dereference NULL pointer.
8167 Fetch ptid,lwpid from thread.
8168 (get_detach_signal): Fetch ptid from thread.
8169 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8170 Simplify call to regcache_invalidate_thread.
8171 (delete_lwp_callback): Update, "entry" parameter is a
8172 struct thread_info * now. Fetch pid from thread.
8173 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8174 (status_pending_p_callback): Update, "entry" parameter is a
8175 struct thread_info * now. Fetch ptid from thread.
8176 (find_lwp_pid): Update, "entry" parameter is a
8177 struct thread_info * now.
8178 (linux_wait_for_lwp): Fetch pid from thread.
8179 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8180 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8181 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8182 (dequeue_one_deferred_signal): Ditto.
8183 (cancel_breakpoint): Fetch ptid from current_inferior.
8184 (linux_wait_for_event): Pass &all_threads to find_inferior,
8185 not &all_lwps. Fetch ptid, lwpid from thread.
8186 (count_events_callback): Update, "entry" parameter is a
8187 struct thread_info * now.
8188 (select_singlestep_lwp_callback): Ditto.
8189 (select_event_lwp_callback): Ditto.
8190 (cancel_breakpoints_callback): Ditto.
8191 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8193 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8194 (unsuspend_one_lwp): Update, "entry" parameter is a
8195 struct thread_info * now.
8196 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8198 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8199 Fetch lwpid from thread, not lwp.
8200 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8201 Pass &all_threads to find_inferior, not &all_lwps.
8202 (send_sigstop): Fetch lwpid from thread, not lwp.
8203 (send_sigstop_callback): Update, "entry" parameter is a
8204 struct thread_info * now.
8205 (suspend_and_send_sigstop_callback): Ditto.
8206 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8207 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8208 struct thread_info * now.
8209 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8211 (lwp_running): Update, "entry" parameter is a
8212 struct thread_info * now.
8213 (stop_all_lwps): Fetch ptid from thread.
8214 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8215 (linux_resume_one_lwp): Fetch lwpid from thread.
8216 (linux_set_resume_request): Update, "entry" parameter is a
8217 struct thread_info * now. Fetch pid, lwpid from thread.
8218 (resume_status_pending_p): Update, "entry" parameter is a
8219 struct thread_info * now.
8220 (need_step_over_p): Ditto. Fetch lwpid from thread.
8221 (start_step_over): Fetch lwpid from thread.
8222 (linux_resume_one_thread): Update, "entry" parameter is a
8223 struct thread_info * now. Fetch lwpid from thread.
8224 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8225 (proceed_one_lwp): Update, "entry" parameter is a
8226 struct thread_info * now. Fetch lwpid from thread.
8227 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8228 struct thread_info * now.
8229 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8230 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8231 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8233 (regsets_store_inferior_registers): Ditto.
8234 (fetch_register, store_register): Ditto.
8235 (linux_read_memory, linux_write_memory): Ditto.
8236 (linux_request_interrupt): Ditto.
8237 (linux_read_auxv): Ditto.
8238 (linux_xfer_siginfo): Ditto.
8239 (linux_qxfer_spu): Ditto.
8240 (linux_qxfer_libraries_svr4): Ditto.
8241 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8242 moved to inferiors.h.
8244 (get_thread_lwp): Update.
8245 (struct lwp_info): Delete member "entry". Simplify comment for
8248 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8249 current_inferior directly.
8250 (update_watch_registers_callback): Update, "entry" parameter is a
8251 struct thread_info * now. Fetch pid from thread.
8252 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8253 (mips_insert_point): Fetch lwpid from current_inferior.
8254 Pass &all_threads to find_inferior, not &all_lwps.
8255 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8256 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8258 (mips_stopped_data_address): Ditto.
8259 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8261 * linux-tile-low.c (tile_arch_setup): Ditto.
8262 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8263 (update_debug_registers_callback): Update, "entry" parameter is a
8264 struct thread_info * now. Fetch pid from thread.
8265 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8266 Pass &all_threads to find_inferior, not &all_lwps.
8267 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8268 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8269 Pass &all_threads to find_inferior, not &all_lwps.
8270 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8271 (i386_dr_low_get_status): Ditto.
8272 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8273 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8274 (x86_linux_read_description): Ditto.
8275 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8277 2014-02-20 Doug Evans <dje@google.com>
8279 * inferiors.c (get_first_inferior): Fix buglet.
8281 2014-02-19 Doug Evans <dje@google.com>
8283 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8284 * inferiors.c (add_thread): Change result type to struct thread_info *.
8285 All callers updated.
8286 (add_lwp): Call add_thread here instead of in callers.
8287 All callers updated.
8288 * linux-low.h (get_lwp_thread): Rewrite.
8289 (struct lwp_info): New member "thread".
8291 2014-02-19 Doug Evans <dje@google.com>
8293 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8294 All callers updated.
8296 2014-02-19 Doug Evans <dje@google.com>
8298 * inferiors.c (add_thread): Fix whitespace.
8300 2014-02-19 Doug Evans <dje@google.com>
8302 * dll.c (clear_dlls): Replace accessing list implemention details
8304 * gdbthread.h (get_first_thread): Declare.
8305 * inferiors.c (for_each_inferior_with_data): New function.
8306 (get_first_thread): New function.
8307 (find_thread_ptid): Simplify.
8308 (get_first_inferior): New function.
8309 (clear_list): Delete.
8310 (one_inferior_p): New function.
8311 (clear_inferior_list): New function.
8312 (clear_inferiors): Update.
8313 * inferiors.h (for_each_inferior_with_data): Declare.
8314 (clear_inferior_list): Declare.
8315 (one_inferior_p): Declare.
8316 (get_first_inferior): Declare.
8317 * linux-low.c (linux_wait_for_event): Replace accessing list
8318 implemention details with API function.
8319 * server.c (target_running): Ditto.
8320 (accumulate_file_name_length): New function.
8321 (emit_dll_description): New function.
8322 (handle_qxfer_libraries): Replace accessing list implemention
8323 details with API function.
8324 (handle_qxfer_threads_worker): New function.
8325 (handle_qxfer_threads_proper): Replace accessing list implemention
8326 details with API function.
8327 (handle_query): Ditto.
8328 (visit_actioned_threads_callback_ftype): New typedef.
8329 (visit_actioned_threads_data): New struct.
8330 (visit_actioned_threads): Rewrite to be find_inferior callback.
8331 (resume): Call find_inferior.
8332 (handle_status): Replace accessing list implemention
8333 details with API function.
8334 (process_serial_event): Replace accessing list implemention details
8336 * target.c (set_desired_inferior): Replace accessing list implemention
8337 details with API function.
8338 * tracepoint.c (same_process_p): New function.
8339 (gdb_agent_about_to_close): Replace accessing list implemention
8340 details with API function.
8341 * win32-low.c (child_delete_thread): Replace accessing list
8342 implemention details with API function.
8343 (match_dll_by_basename): New function.
8344 (dll_is_loaded_by_basename): New function.
8345 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8346 details call to dll_is_loaded_by_basename.
8348 2014-02-19 Doug Evans <dje@google.com>
8350 * dll.h (struct dll_info): Add comment.
8351 * gdbthread.h (struct thread_info): Add comment.
8352 (current_ptid): Simplify.
8353 * inferiors.c (add_process): Update.
8354 (remove_process): Update.
8355 * inferiors.h (struct process_info): Rename member "head" to "entry".
8356 * linux-low.c (delete_lwp): Update.
8358 (last_thread_of_process_p): Update.
8359 (kill_one_lwp_callback, linux_kill): Update.
8360 (status_pending_p_callback): Update.
8361 (wait_for_sigstop): Update. Simplify read of ptid.
8362 (start_step_over): Update.
8363 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8364 (get_lwp_thread): Update.
8365 (struct lwp_info): Rename member "head" to "entry".
8366 * regcache.h (inferior_list_entry): Delete.
8367 * server.c (kill_inferior_callback): Update.
8368 (detach_or_kill_inferior_callback): Update.
8369 (print_started_pid): Update.
8370 (print_attached_pid): Update.
8371 (process_serial_event): Simplify read of ptid.
8372 * thread-db.c (thread_db_create_event): Update.
8373 (thread_db_get_tls_address): Update.
8374 * win32-low.c (current_inferior_ptid): Simplify.
8376 2014-02-19 Tom Tromey <tromey@redhat.com>
8378 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8380 (target_supports_btrace): Update.
8382 2014-02-14 Yao Qi <yao@codesourcery.com>
8384 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8385 (rsp-low-ipa.o): New target.
8387 2014-02-12 Tom Tromey <tromey@redhat.com>
8389 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8390 convert_ascii_to_int.
8391 * regcache.c (registers_to_string): Likewise.
8392 * remote-utils.c (decode_M_packet): Likewise.
8393 * server.c (process_serial_event): Likewise.
8395 2014-02-12 Tom Tromey <tromey@redhat.com>
8397 * server.c (handle_query, handle_v_run): Use hex2bin, not
8399 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8401 2014-02-12 Tom Tromey <tromey@redhat.com>
8403 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8404 convert_int_to_ascii.
8405 * regcache.c (registers_to_string, collect_register_as_string):
8407 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8409 * server.c (process_serial_event): Likewise.
8410 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8411 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8413 2014-02-12 Tom Tromey <tromey@redhat.com>
8415 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8416 bin2hex, not hexify.
8417 * tracepoint.c (cmd_qtstatus): Likewise.
8419 2014-02-12 Tom Tromey <tromey@redhat.com>
8421 * remote-utils.c (monitor_output): Pass explicit length to
8424 2014-02-12 Tom Tromey <tromey@redhat.com>
8426 * tracepoint.c: Include rsp-low.h.
8427 * server.c: Include rsp-low.h.
8428 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8429 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8431 * remote-utils.c: Include rsp-low.h.
8432 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8433 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8434 (convert_int_to_ascii, convert_ascii_to_int): Move to
8436 * regcache.c: Include rsp-low.h.
8437 * ax.c: Include rsp-low.h.
8438 * Makefile.in (SFILES): Add common/rsp-low.c.
8439 (OBS): Add rsp-low.o.
8440 (rsp-low.o): New target.
8442 2014-02-12 Tom Tromey <tromey@redhat.com>
8444 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8445 Include print-utils.h.
8446 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8447 (plongest, thirty_two, phex_nz): Remove.
8448 * Makefile.in (SFILES): Add common/print-utils.c.
8449 (OBS): Add print-utils.o.
8450 (print-utils-ipa.o): New target.
8451 (print-utils.o): New target.
8452 (IPA_OBJS): Add print-utils-ipa.o.
8454 2014-02-06 Tom Tromey <tromey@redhat.com>
8456 * Makefile.in (SFILES): Fix indentation.
8458 2014-02-05 Doug Evans <dje@google.com>
8460 * linux-low.c (linux_wait_for_event): Improve comment.
8461 (linux_wait_1): Keep current_inferior in sync with event_child.
8463 2014-01-22 Doug Evans <dje@google.com>
8465 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8467 2014-01-22 Doug Evans <dje@google.com>
8469 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8470 * configure: Regenerate.
8471 * config.in: Regenerate.
8472 * Makefile.in (SFILES): Add debug.c.
8474 * debug.c: New file.
8475 * debug.h: New file.
8476 * linux-aarch64-low.c (*): Update all debugging printfs to use
8477 debug_printf instead of fprintf.
8478 * linux-arm-low.c (*): Ditto.
8479 * linux-cris-low.c (*): Ditto.
8480 * linux-crisv32-low.c (*): Ditto.
8481 * linux-m32r-low.c (*): Ditto.
8482 * linux-sparc-low.c (*): Ditto.
8483 * linux-x86.c (*): Ditto.
8484 * linux-low.c (*): Ditto.
8485 (linux_wait_1): Add calls to debug_enter, debug_exit.
8486 (linux_wait): Remove redundant debugging printf.
8487 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8488 (linux_resume, unstop_all_lwps): Ditto.
8489 * mem-break.c (*): Update all debugging printfs to use
8490 debug_printf instead of fprintf.
8491 * remote-utils.c (*): Ditto.
8492 * thread-db.c (*): Ditto.
8493 * server.c #include <ctype.h>, "gdb_vecs.h".
8494 (debug_threads): Moved to debug.c.
8495 (*): Update all debugging printfs to use debug_printf instead of
8497 (start_inferior): Replace call to fflush with call to debug_flush.
8498 (monitor_show_help): Mention set debug-format.
8499 (parse_debug_format_options): New function.
8500 (handle_monitor_command): Handle "monitor set debug-format".
8501 (gdbserver_usage): Mention --debug-format.
8502 (main): Parse --debug-format.
8503 * server.h (debug_threads): Declaration moved to debug.h.
8505 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8506 trace_debug_1 that uses debug_printf.
8507 (tracepoint_look_up_symbols): Update all debugging printfs to use
8508 debug_printf instead of fprintf.
8510 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8512 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8515 2014-01-17 Pedro Alves <palves@redhat.com>
8518 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8519 defined after including gdb_proc_service.h.
8521 2014-01-16 Doug Evans <dje@google.com>
8523 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8524 (match_dll): Use it.
8526 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8528 * target.h (target_ops) <read_btrace>: Change parameters and
8529 return type to allow error reporting.
8530 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8531 trace reading errors on.
8532 * linux-low.c (linux_low_read_btrace): Pass trace reading
8534 (linux_low_disable_btrace): New.
8536 2014-01-15 Doug Evans <dje@google.com>
8538 * inferiors.c (thread_id_to_gdb_id): Delete.
8539 * inferiors.h (thread_id_to_gdb_id): Delete.
8541 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8543 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8544 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8547 2014-01-08 Pedro Alves <palves@redhat.com>
8549 * server.c (handle_status): Don't discard previous queued stop
8550 replies or thread's pending status here.
8551 (main) <disconnection>: Do it here instead.
8553 2014-01-08 Pedro Alves <palves@redhat.com>
8555 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8556 * server.c (visit_actioned_threads, handle_pending_status): New
8558 (handle_v_cont): Factor out parts to ...
8559 (resume): ... this new function. If in all-stop, and a thread
8560 being resumed has a pending status, report it without actually
8562 (myresume): Adjust to use the new 'resume' function.
8563 (clear_pending_status_callback, set_pending_status_callback)
8564 (find_status_pending_thread_callback): New functions.
8565 (handle_status): Handle the case of multiple threads having
8566 interesting statuses to report. Report threads' real last signal
8567 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8568 with an interesting thread to report the status for, instead of
8569 always reporting the status of the first thread.
8571 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8573 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8574 * gdbreplay.c (gdbreplay_version): Likewise.
8576 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8578 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8579 iov.iov_len with the real length in use.
8581 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8583 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8584 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8585 for all targets that use win32-low.c.
8586 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8587 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8589 2013-12-13 Pedro Alves <palves@redhat.com>
8591 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8592 if equal to TARGET_WAITKIND_LOADED.
8593 * win32-low.c (cached_status): New static global.
8594 (win32_wait): Add declaration.
8595 (do_initial_child_stuff): Flush all initial pending debug events
8596 up to the initial breakpoint.
8597 (win32_wait): If CACHED_STATUS was set, return that instead
8598 of doing a real wait. Remove the code resuming the execution
8599 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8600 during the initial phase. Also remove the code changing
8601 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8602 TARGET_WAITKIND_STOPPED.
8604 2013-12-11 Yao Qi <yao@codesourcery.com>
8606 * notif.c (handle_notif_ack): Return 0 if no notification
8609 2013-11-20 Doug Evans <dje@google.com>
8611 * linux-low.c (linux_set_resume_request): Fix comment.
8613 2013-11-20 Doug Evans <dje@google.com>
8615 * linux-low.c (resume_status_pending_p): Tweak comment.
8617 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8619 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8620 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8621 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8622 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8623 (srv_amd64_regobj): Add amd64-mpx.o.
8624 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8625 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8626 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8627 * i387-fp.c (num_pl_bnd_register) Added constant.
8628 (num_pl_bnd_cfg_registers) Added constant.
8629 (struct i387_xsave) Added reserved area and MPX fields.
8630 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8631 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8633 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8634 (init_registers_amd64_mpx_linux): Declare new function.
8635 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8636 (x86_64_regmap): Add MPX registers.
8637 (x86_linux_read_description): Add MPX case.
8638 (initialize_low_arch): Initialize MPX targets.
8640 2013-11-18 Tom Tromey <tromey@redhat.com>
8642 * configure: Rebuild.
8643 * configure.ac: Don't check for stdlib.h.
8644 * gdbreplay.c: Unconditionally include stdlib.h.
8646 2013-11-18 Tom Tromey <tromey@redhat.com>
8648 * config.in: Rebuild.
8649 * configure: Rebuild.
8650 * configure.ac: Don't use AC_HEADER_DIRENT.
8652 2013-11-18 Tom Tromey <tromey@redhat.com>
8654 * server.h: Don't check HAVE_STRING_H.
8655 * gdbreplay.c: Don't check HAVE_STRING_H.
8656 * configure: Rebuild.
8658 2013-11-18 Tom Tromey <tromey@redhat.com>
8660 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8663 2013-11-08 Tom Tromey <tromey@redhat.com>
8665 * configure, config.in: Rebuild.
8666 * configure.ac: Remove unused configury.
8668 2013-11-08 Tom Tromey <tromey@redhat.com>
8670 * acinclude.m4: Include common.m4, codeset.m4.
8671 * configure, config.in: Rebuild.
8672 * configure.ac: Use GDB_AC_COMMON.
8674 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8676 * linux-s390-low.c (HWCAP_S390_TE): New define.
8677 (s390_arch_setup): Consider the TE field in the HWCAP for
8678 determining 'have_regset_tdb'.
8680 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8683 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8686 2013-10-02 Pedro Alves <palves@redhat.com>
8688 * server.c (process_serial_event): Don't output "GDBserver
8689 exiting" if GDB is connected through stdio.
8690 * target.c (mywait): Likewise, be silent if GDB is connected
8693 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8695 * lynx-low.c (lynx_add_threads_after_attach): New function.
8696 (lynx_attach): Remove call to add_thread. Add call to
8697 lynx_add_threads_after_attach instead.
8699 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8701 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8702 * config.in, configure: Regenerated.
8704 2013-09-18 Yao Qi <yao@codesourcery.com>
8707 * server.c (start_inferior): Clear 'resume_info'.
8709 2013-09-16 Jiong Wang <jiwang@tilera.com>
8711 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8714 2013-09-16 Jiong Wang <jiwang@tilera.com>
8716 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8717 linux-tile-low.o to srv_tgtobj.
8719 2013-09-16 Will Newton <will.newton@linaro.org>
8721 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8724 2013-09-06 Pedro Alves <palves@redhat.com>
8726 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8727 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8728 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8729 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8730 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8731 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8733 2013-09-06 Pedro Alves <palves@redhat.com>
8735 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8736 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8738 2013-09-06 Pedro Alves <palves@redhat.com>
8740 * linux-amd64-ipa.c: Include tracepoint.h.
8741 * linux-i386-ipa.c: Include tracepoint.h.
8743 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8745 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8746 (ps_get_thread_area): New function.
8748 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8750 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8751 (initialize_low_arch): Call init_registers_crisv32 rather than
8752 init_register_crisv32.
8754 2013-09-05 Pedro Alves <palves@redhat.com>
8756 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8758 * hostio.h: ... this new file.
8759 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8760 win32-low.c: Include hostio.h.
8762 2013-09-05 Pedro Alves <palves@redhat.com>
8764 * server.h (gdb_client_data, handler_func, callback_handler_func)
8765 (delete_file_handler, add_file_handler, append_callback_event)
8766 (delete_callback_event, start_event_loop, initialize_event_loop):
8767 Move to event-loop.h and include it.
8768 * event-loop.h: New file.
8770 2013-09-05 Pedro Alves <palves@redhat.com>
8772 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8773 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8774 (loaded_dll, unloaded_dll): Move to ...
8775 * dll.h: ... this new file.
8776 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8778 2013-09-05 Pedro Alves <palves@redhat.com>
8780 * server.h (current_process, get_thread_process, all_processes)
8781 (add_inferior_to_list, for_each_inferior, current_inferior)
8782 (remove_inferior, add_process, remove_process, find_process_pid)
8783 (have_started_inferiors_p, have_attached_inferiors_p)
8784 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8785 (clear_inferiors, find_inferior, find_inferior_id)
8786 (inferior_target_data, set_inferior_target_data)
8787 (inferior_regcache_data, set_inferior_regcache_data): Move to
8788 inferiors.h, and include it.
8789 * inferiors.h: New file.
8791 2013-09-05 Pedro Alves <palves@redhat.com>
8793 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8797 2013-09-05 Pedro Alves <palves@redhat.com>
8799 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8801 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8802 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8803 (handle_tracepoint_general_set, handle_tracepoint_query)
8804 (tracepoint_finished_step, tracepoint_was_hit)
8805 (release_while_stepping_state_list, current_traceframe)
8806 (in_readonly_region, traceframe_read_mem)
8807 (fetch_traceframe_registers, traceframe_read_sdata)
8808 (traceframe_read_info, struct fast_tpoint_collect_status)
8809 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8810 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8811 (supply_fast_tracepoint_registers)
8812 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8813 (ipa_tdesc, claim_trampoline_space)
8814 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8815 (agent_mem_read, agent_get_trace_state_variable_value)
8816 (agent_set_trace_state_variable_value, agent_tsv_read)
8817 (agent_mem_read_string, get_raw_reg_func_addr)
8818 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8819 * tracepoint.h: ... this new file.
8821 2013-09-05 Pedro Alves <palves@redhat.com>
8823 * server.h (perror_with_name, error, fatal, warning, paddress)
8824 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8826 * utils.h: New file.
8828 2013-09-05 Pedro Alves <palves@redhat.com>
8830 * server.h (remote_debug, noack_mode, transport_is_reliable)
8831 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8832 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8833 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8834 (write_enn, initialize_async_io, enable_async_io)
8835 (disable_async_io, check_remote_input_interrupt_request)
8836 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8837 (dead_thread_notify, prepare_resume_reply)
8838 (decode_address_to_semicolon, decode_address, decode_m_packet)
8839 (decode_M_packet, decode_X_packet, decode_xfer_write)
8840 (decode_search_memory_packet, unhexify, hexify)
8841 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8842 (look_up_one_symbol, relocate_instruction)
8843 (monitor_output): Move to remote-utils.h, and include it.
8844 * remote-utils.h: New file.
8846 2013-09-05 Pedro Alves <palves@redhat.com>
8848 * server.h (_): Delete.
8850 2013-09-02 Pedro Alves <palves@redhat.com>
8852 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8853 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8855 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8857 2013-09-02 Pierre Muller <muller@sourceware.org>
8859 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8860 or WriteProcessMemory complete successfully and handle
8861 ERROR_PARTIAL_COPY error.
8863 2013-09-02 Pedro Alves <palves@redhat.com>
8865 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8866 error instead of EIO.
8868 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8871 * linux-low.c: Include filestuff.h.
8872 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8873 * lynx-low.c: Include filestuff.h.
8874 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8875 * server.c: Include filestuff.h.
8876 (main): Call notice_open_fds.
8877 * spu-low.c: Include filestuff.h.
8878 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8880 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8882 * Makefile.in: Explain why ../target and ../nat are not
8883 listed as include file search paths.
8884 (linux-waitpid.o): New object file rule.
8885 * configure.srv (srv_native_linux_obj): New variable.
8886 Replace all occurrences of linux native object files with
8887 $srv_native_linux_obj.
8888 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8889 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8890 (linux_enable_event_reporting): Remove declaration.
8891 (my_waitpid): Moved to common/linux-waitpid.c.
8892 (linux_wait_for_event): Pass ptid when calling
8893 linux_enable_event_reporting.
8894 (linux_supports_tracefork_flag): Remove.
8895 (linux_enable_event_reporting): Likewise.
8896 (linux_tracefork_grandchild): Remove.
8897 (STACK_SIZE): Moved to common/linux-ptrace.c.
8898 (linux_tracefork_child): Remove.
8899 (linux_test_for_tracefork): Remove.
8900 (linux_look_up_symbols): Call linux_supports_traceclone.
8901 (initialize_low): Remove call to linux_test_for_tracefork.
8902 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8903 common/linux-ptrace.h.
8904 (PTRACE_TYPE_ARG4): Likewise.
8905 Include linux-ptrace.h.
8907 2013-08-21 Pedro Alves <palves@redhat.com>
8909 * config.in: Renegerate.
8911 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8913 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8914 (SFILES): Remove $(srcdir)/common/target-common.c and
8915 add $(srcdir)/target/waitstatus.c.
8916 (OBS): Remove target-common.o and add waitstatus.o.
8917 (server_h): Remove $(srcdir)/../common/target-common.h and
8918 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8919 and $(srcdir)/../target/waitstatus.h.
8920 (target-common.o): Remove.
8921 (waitstatus.o): New target object file.
8922 * target.h: Do not include target-common.h and
8923 include target/resume.h, target/wait.h and
8924 target/waitstatus.h.
8926 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8928 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8929 to PTRACE_TYPE_ARG3.
8930 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8931 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8933 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8934 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8936 2013-07-27 Jie Zhang <jie@codesourcery.com>
8937 Daniel Jacobowitz <dan@codesourcery.com>
8938 Yao Qi <yao@codesourcery.com>
8940 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8941 (mips-linux-watch.o): New rule.
8942 (mips_linux_watch_h): New variable.
8943 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8945 * linux-mips-low.c: Include mips-linux-watch.h.
8946 (struct arch_process_info, struct arch_lwp_info): New.
8947 (update_watch_registers_callback): New function.
8948 (mips_linux_new_process, mips_linux_new_thread) New functions.
8949 (mips_linux_prepare_to_resume, mips_insert_point): New
8951 (mips_remove_point, mips_stopped_by_watchpoint): New
8953 (rsp_bp_type_to_target_hw_bp_type): New function.
8954 (mips_stopped_data_address): New function.
8955 (the_low_target): Add watchpoint support functions.
8957 2013-07-27 Yao Qi <yao@codesourcery.com>
8959 * i386-low.c: Include break-common.h.
8960 (enum target_hw_bp_type): Remove.
8962 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8964 * Makefile.in (SFILES): /common/target-common.c.
8965 (OBS): Add target-common.o.
8966 (server_h): Add $(srcdir)/../common/target-common.h.
8967 (target-common.o): New target.
8968 * server.c (queue_stop_reply_callback): Free
8969 status string after use.
8970 * target.c (target_waitstatus_to_string): Remove.
8971 * target.h: Include target-common.h.
8972 (resume_kind): Likewise.
8973 (target_waitkind): Likewise.
8974 (target_waitstatus): Likewise.
8975 (TARGET_WNOHANG): Likewise.
8977 2013-07-04 Yao Qi <yao@codesourcery.com>
8979 * Makefile.in (host_alias): Use @host_noncanonical@.
8980 (target_alias): Use @target_noncanonical@.
8981 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8982 ACX_NONCANONICAL_HOST.
8983 * configure: Regenerated.
8986 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8988 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8989 * configure: Rebuild.
8990 * Makefile.in (version_host, version_target): Get from configure.
8991 (version.c): Use $(version_host) and $(version_target).
8993 2013-07-03 Pedro Alves <palves@redhat.com>
8995 * Makefile.in (config.status): Depend on development.sh.
8996 * acinclude.m4: Include libmcheck.m4.
8997 * configure: Regenerate.
8999 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9001 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9002 attribute inside the parentheses.
9003 (winapi_DebugSetProcessKillOnExit): Ditto.
9004 (winapi_DebugBreakProcess): Ditto.
9005 (winapi_GenerateConsoleCtrlEvent): Ditto.
9007 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9009 * notif.h (notif_event): Add a dummy member to avoid compiler
9012 2013-07-01 Pedro Alves <palves@redhat.com>
9014 * hostio.c (HOSTIO_PATH_MAX): Define.
9015 (require_filename, handle_open, handle_unlink, handle_readlink):
9018 2013-07-01 Pedro Alves <palves@redhat.com>
9020 * server.h: Include "pathmax.h".
9021 * linux-low.c: Don't include sys/param.h.
9022 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9024 * win32-low.c: Don't include sys/param.h.
9025 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9027 2013-07-01 Pedro Alves <palves@redhat.com>
9029 * event-loop.c: Don't check HAVE_UNISTD_H before including
9031 * gdbreplay.c: Likewise.
9032 * remote-utils.c: Likewise.
9033 * server.c: Likewise.
9034 * configure.ac: Don't check for unistd.h.
9035 * configure: Regenerate.
9037 2013-06-28 Tom Tromey <tromey@redhat.com>
9039 * Makefile.in (version.c): Use version.in, not
9042 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9044 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9045 * configure: Rebuild.
9046 * Makefile.in (version_host, version_target): Get from configure.
9047 (version.c): Use $(version_host) and $(version_target).
9049 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9051 Fix trace-status to output user name without trailing colon.
9052 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9054 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9056 Fix trace-status to output proper start-time and stop-time.
9057 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9058 output start time and stop time in hex as gdb expects.
9060 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9062 * tracepoint.c (build_traceframe_info_xml): Output trace state
9063 variables present in the trace buffer.
9065 2013-06-24 Tom Tromey <tromey@redhat.com>
9067 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9069 (version.o): Remove.
9070 * gdbreplay.c: Include version.h.
9071 (version, host_name): Don't declare.
9072 * server.h: Include version.h.
9073 (version, host_name): Don't declare.
9075 2013-06-12 Pedro Alves <palves@redhat.com>
9077 * linux-x86-low.c (linux_is_elf64): Delete global.
9078 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9079 with local linux_pid_exe_is_elf_64_file use.
9081 2013-06-11 Pedro Alves <palves@redhat.com>
9083 * linux-low.c (regset_disabled, disable_regset): New functions.
9084 (regsets_fetch_inferior_registers)
9085 (regsets_store_inferior_registers): Use them.
9086 (initialize_regsets_info); Don't allocate the disabled_regsets
9088 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9091 2013-06-11 Pedro Alves <palves@redhat.com>
9093 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9096 2013-06-11 Pedro Alves <palves@redhat.com>
9098 * linux-x86-low.c (initialize_low_arch): Call
9099 init_registers_x32_avx_linux.
9101 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9103 Fix compatibility with Android Bionic.
9104 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9107 2013-06-07 Pedro Alves <palves@redhat.com>
9110 * Makefile.in (OBS): Add tdesc.o.
9111 (IPA_OBJS): Add tdesc-ipa.o.
9112 (tdesc-ipa.o): New rule.
9113 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9115 * linux-low.c (new_inferior): Delete.
9116 (disabled_regsets, num_regsets): Delete.
9117 (linux_add_process): Adjust to set the new per-process
9119 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9120 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9121 was a stop. When calling arch_setup, switch the current inferior
9122 to the thread that got an event.
9123 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9124 (regsets_fetch_inferior_registers)
9125 (regsets_store_inferior_registers): New regsets_info parameter.
9127 (linux_register_in_regsets): New regs_info parameter. Adjust to
9129 (register_addr, fetch_register, store_register): New usrregs_info
9130 parameter. Adjust to use it.
9131 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9132 parameter regs_info. Adjust to use it.
9133 (linux_fetch_registers): Get the current inferior's regs_info, and
9135 (linux_store_registers): Ditto.
9136 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9137 (initialize_low): Don't initialize the target_regsets here. Call
9138 initialize_low_arch.
9139 * linux-low.h (target_regsets): Delete declaration.
9140 (struct regsets_info): New.
9141 (struct usrregs_info): New.
9142 (struct regs_info): New.
9143 (struct process_info_private) <new_inferior>: New field.
9144 (struct linux_target_ops): Delete the num_regs, regmap, and
9145 regset_bitmap fields. New field regs_info.
9146 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9147 * i387-fp.c (num_xmm_registers): Delete.
9148 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9149 calls to new interface.
9150 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9151 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9152 Infer the number of xmm registers from the regcache's target
9154 * i387-fp.h (num_xmm_registers): Delete.
9155 * inferiors.c (add_thread): Don't install the thread's regcache
9157 * proc-service.c (gregset_info): Fetch the current inferior's
9158 regs_info. Adjust to use it.
9159 * regcache.c: Include tdesc.h.
9160 (register_bytes, reg_defs, num_registers)
9161 (gdbserver_expedite_regs): Delete.
9162 (get_thread_regcache): If the thread doesn't have a regcache yet,
9163 create one, instead of aborting gdbserver.
9164 (regcache_invalidate_one): Rename to ...
9165 (regcache_invalidate_thread): ... this.
9166 (regcache_invalidate_one): New.
9167 (regcache_invalidate): Only invalidate registers of the current
9169 (init_register_cache): Add target_desc parameter, and use it.
9170 (new_register_cache): Ditto. Assert the target description has a
9171 non zero registers_size.
9172 (regcache_cpy): Add assertions. Adjust.
9173 (realloc_register_cache, set_register_cache): Delete.
9174 (registers_to_string, registers_from_string): Adjust.
9175 (find_register_by_name, find_regno, find_register_by_number)
9176 (register_cache_size): Add target_desc parameter, and use it.
9177 (free_register_cache_thread, free_register_cache_thread_one)
9178 (regcache_release, register_cache_size): New.
9179 (register_size): Add target_desc parameter, and use it.
9180 (register_data, supply_register, supply_register_zeroed)
9181 (supply_regblock, supply_register_by_name, collect_register)
9182 (collect_register_as_string, collect_register_by_name): Adjust.
9183 * regcache.h (struct target_desc): Forward declare.
9184 (struct regcache) <tdesc>: New field.
9185 (init_register_cache, new_register_cache): Add target_desc
9187 (regcache_invalidate_thread): Declare.
9188 (regcache_invalidate_one): Delete declaration.
9189 (regcache_release): Declare.
9190 (find_register_by_number, register_cache_size, register_size)
9191 (find_regno): Add target_desc parameter.
9192 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9194 * remote-utils.c: Include tdesc.h.
9195 (outreg, prepare_resume_reply): Adjust.
9196 * server.c: Include tdesc.h.
9197 (gdbserver_xmltarget): Delete declaration.
9198 (get_features_xml, process_serial_event): Adjust.
9199 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9201 (struct process_info) <tdesc>: New field.
9202 (ipa_tdesc): Declare.
9203 * tdesc.c: New file.
9204 * tdesc.h: New file.
9205 * tracepoint.c: Include tdesc.h.
9206 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9207 (get_context_regcache): Adjust to pass ipa_tdesc down.
9208 (do_action_at_tracepoint): Adjust to get the register cache size
9209 from the context regcache's description.
9210 (traceframe_walk_blocks): Adjust to get the register cache size
9211 from the current trace frame's description.
9212 (traceframe_get_pc): Adjust to get current trace frame's
9213 description and pass it down.
9214 (gdb_collect): Adjust to get the register cache size from the
9216 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9217 (gdbserver_xmltarget): Delete.
9218 (initialize_low_tracepoint): Set the ipa's target description.
9219 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9220 (initialize_low_tracepoint): Set the ipa's target description.
9221 * linux-x86-low.c: Include tdesc.h.
9222 [__x86_64__] (is_64bit_tdesc): New.
9223 (ps_get_thread_area, x86_get_thread_area): Use it.
9224 (i386_cannot_store_register): Rename to ...
9225 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9226 (i386_cannot_fetch_register): Rename to ...
9227 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9228 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9230 (target_regsets): Rename to ...
9231 (x86_regsets): ... this.
9232 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9234 (x86_siginfo_fixup): Use is_64bit_tdesc.
9235 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9236 (tdesc_x32_avx_linux, tdesc_x32_linux)
9237 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9239 (x86_linux_update_xmltarget): Delete.
9240 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9241 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9242 (AMD64_LINUX_USER64_CS): New.
9243 (x86_linux_read_description): New, based on
9244 x86_linux_update_xmltarget.
9245 (same_process_callback): New.
9246 (x86_arch_setup_process_callback): New.
9247 (x86_linux_update_xmltarget): New.
9248 (x86_regsets_info): New.
9249 (amd64_linux_regs_info): New.
9250 (i386_linux_usrregs_info): New.
9251 (i386_linux_regs_info): New.
9252 (x86_linux_regs_info): New.
9253 (x86_arch_setup): Reimplement.
9254 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9255 (x86_emit_ops): Ditto.
9256 (the_low_target): Adjust. Install x86_linux_regs_info,
9257 x86_cannot_fetch_register, and x86_cannot_store_register.
9258 (initialize_low_arch): New.
9259 * linux-ia64-low.c (tdesc_ia64): Declare.
9260 (ia64_fetch_register): Adjust.
9261 (ia64_usrregs_info, regs_info): New globals.
9262 (ia64_regs_info): New function.
9263 (the_low_target): Adjust.
9264 (initialize_low_arch): New function.
9265 * linux-sparc-low.c (tdesc_sparc64): Declare.
9266 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9268 (sparc_arch_setup): New function.
9269 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9270 (the_low_target): Adjust.
9271 (initialize_low_arch): New function.
9272 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9273 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9274 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9275 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9276 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9277 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9278 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9279 (tdesc_powerpc_isa205_vsx64l): Declare.
9280 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9281 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9282 (ppc_set_pc, ppc_get_hwcap): Adjust.
9283 (ppc_usrregs_info): Forward declare.
9284 (!__powerpc64__) ppc_regmap_adjusted: New global.
9285 (ppc_arch_setup): Adjust to the current process'es target
9287 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9288 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9289 (ppc_store_evrregset): Adjust.
9290 (target_regsets): Rename to ...
9291 (ppc_regsets): ... this, and make static.
9292 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9293 (ppc_regs_info): New function.
9294 (the_low_target): Adjust.
9295 (initialize_low_arch): New function.
9296 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9297 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9298 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9299 (tdesc_s390x_linux64v2): Declare.
9300 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9301 (s390_fill_gregset, s390_store_last_break): Adjust.
9302 (target_regsets): Rename to ...
9303 (s390_regsets): ... this, and make static.
9304 (s390_get_pc, s390_set_pc): Adjust.
9305 (s390_get_hwcap): New target_desc parameter, and use it.
9306 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9307 (s390_arch_setup): Adjust to set the current process'es target
9308 description. Don't adjust the regmap.
9309 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9310 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9311 (regs_info_3264): New globals.
9312 (s390_regs_info): New function.
9313 (the_low_target): Adjust.
9314 (initialize_low_arch): New function.
9315 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9316 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9317 [__mips64] (init_registers_mips_linux)
9318 (init_registers_mips_dsp_linux): Delete defines.
9319 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9320 (have_dsp): New global.
9321 (mips_read_description): New, based on mips_arch_setup.
9322 (mips_arch_setup): Reimplement.
9323 (get_usrregs_info): New function.
9324 (mips_cannot_fetch_register, mips_cannot_store_register)
9325 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9326 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9327 (target_regsets): Rename to ...
9328 (mips_regsets): ... this, and make static.
9329 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9330 (dsp_regs_info, regs_info): New globals.
9331 (mips_regs_info): New function.
9332 (the_low_target): Adjust.
9333 (initialize_low_arch): New function.
9334 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9335 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9337 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9338 (arm_read_description): New, with bits factored from
9340 (arm_arch_setup): Reimplement.
9341 (target_regsets): Rename to ...
9342 (arm_regsets): ... this, and make static.
9343 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9344 (arm_regs_info): New function.
9345 (the_low_target): Adjust.
9346 (initialize_low_arch): New function.
9347 * linux-m68k-low.c (tdesc_m68k): Declare.
9348 (target_regsets): Rename to ...
9349 (m68k_regsets): ... this, and make static.
9350 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9351 (m68k_regs_info): New function.
9352 (m68k_arch_setup): New function.
9353 (the_low_target): Adjust.
9354 (initialize_low_arch): New function.
9355 * linux-sh-low.c (tdesc_sharch): Declare.
9356 (target_regsets): Rename to ...
9357 (sh_regsets): ... this, and make static.
9358 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9359 (sh_regs_info, sh_arch_setup): New functions.
9360 (the_low_target): Adjust.
9361 (initialize_low_arch): New function.
9362 * linux-bfin-low.c (tdesc_bfin): Declare.
9363 (bfin_arch_setup): New function.
9364 (bfin_usrregs_info, regs_info): New globals.
9365 (bfin_regs_info): New function.
9366 (the_low_target): Adjust.
9367 (initialize_low_arch): New function.
9368 * linux-cris-low.c (tdesc_cris): Declare.
9369 (cris_arch_setup): New function.
9370 (cris_usrregs_info, regs_info): New globals.
9371 (cris_regs_info): New function.
9372 (the_low_target): Adjust.
9373 (initialize_low_arch): New function.
9374 * linux-cris-low.c (tdesc_crisv32): Declare.
9375 (cris_arch_setup): New function.
9376 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9377 (cris_regs_info): New function.
9378 (the_low_target): Adjust.
9379 (initialize_low_arch): New function.
9380 * linux-m32r-low.c (tdesc_m32r): Declare.
9381 (m32r_arch_setup): New function.
9382 (m32r_usrregs_info, regs_info): New globals.
9383 (m32r_regs_info): Adjust.
9384 (initialize_low_arch): New function.
9385 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9386 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9387 (tic6x_usrregs_info): Forward declare.
9388 (tic6x_read_description): New function, based on ...
9389 (tic6x_arch_setup): ... this. Reimplement.
9390 (target_regsets): Rename to ...
9391 (tic6x_regsets): ... this, and make static.
9392 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9393 (tic6x_regs_info): New function.
9394 (the_low_target): Adjust.
9395 (initialize_low_arch): New function.
9396 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9397 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9398 (target_regsets): Rename to ...
9399 (xtensa_regsets): ... this, and make static.
9400 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9402 (xtensa_arch_setup, xtensa_regs_info): New functions.
9403 (the_low_target): Adjust.
9404 (initialize_low_arch): New function.
9405 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9406 (nios2_arch_setup): Set the current process'es tdesc.
9407 (target_regsets): Rename to ...
9408 (nios2_regsets): ... this.
9409 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9410 (nios2_regs_info): New function.
9411 (the_low_target): Adjust.
9412 (initialize_low_arch): New function.
9413 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9414 (aarch64_arch_setup): Set the current process'es tdesc.
9415 (target_regsets): Rename to ...
9416 (aarch64_regsets): ... this.
9417 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9418 (aarch64_regs_info): New function.
9419 (the_low_target): Adjust.
9420 (initialize_low_arch): New function.
9421 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9423 (target_regsets): Rename to ...
9424 (tile_regsets): ... this.
9425 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9426 (tile_regs_info): New function.
9427 (tile_arch_setup): Set the current process'es tdesc.
9428 (the_low_target): Adjust.
9429 (initialize_low_arch): New function.
9430 * spu-low.c (tdesc_spu): Declare.
9431 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9432 * win32-arm-low.c (tdesc_arm): Declare.
9433 (arm_arch_setup): New function.
9434 (the_low_target): Install arm_arch_setup instead of
9436 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9437 (init_windows_x86): Rename to ...
9438 (i386_arch_setup): ... this. Set `win32_tdesc'.
9439 (the_low_target): Adjust.
9440 * win32-low.c (win32_tdesc): New global.
9441 (child_add_thread): Don't create the thread cache here.
9442 (do_initial_child_stuff): Set the new process'es tdesc.
9443 * win32-low.h (struct target_desc): Forward declare.
9444 (win32_tdesc): Declare.
9445 * lynx-i386-low.c (tdesc_i386): Declare global.
9446 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9447 * lynx-low.c (lynx_tdesc): New global.
9448 (lynx_add_process): Set the new process'es tdesc.
9449 * lynx-low.h (struct target_desc): Forward declare.
9450 (lynx_tdesc): Declare global.
9451 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9452 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9453 * nto-low.c (nto_tdesc): New global.
9454 (do_attach): Set the new process'es tdesc.
9455 * nto-low.h (struct target_desc): Forward declare.
9456 (nto_tdesc): Declare.
9457 * nto-x86-low.c (tdesc_i386): Declare.
9458 (nto_x86_arch_setup): Set `nto_tdesc'.
9460 2013-06-04 Gary Benson <gbenson@redhat.com>
9462 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9463 to qSupported response when appropriate.
9464 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9465 with nonzero-length annex.
9466 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9467 arguments supplied in annex.
9469 2013-05-31 Doug Evans <dje@google.com>
9472 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9473 64 bits in 64-cross-32 environment.
9475 2013-05-28 Pedro Alves <palves@redhat.com>
9477 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9478 (aarch64-without-fpu.c): Delete rule.
9479 * configure.srv (aarch64*-*-linux*): Remove references to
9480 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9481 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9484 2013-05-24 Pedro Alves <palves@redhat.com>
9486 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9487 instead of strchr/decode_address. Error if the range isn't split
9488 with a ','. Don't assume there's be a ':' in the action.
9490 2013-05-23 Yao Qi <yao@codesourcery.com>
9491 Pedro Alves <palves@redhat.com>
9493 * linux-low.c (lwp_in_step_range): New function.
9494 (linux_wait_1): If the thread was range stepping and stopped
9495 outside the stepping range, report the stop to GDB. Otherwise,
9496 continue stepping. Add range stepping debug output.
9497 (linux_set_resume_request): Copy the step range from the resume
9499 (linux_supports_range_stepping): New.
9500 (linux_target_ops) <supports_range_stepping>: Set to
9501 linux_supports_range_stepping.
9502 * linux-low.h (struct linux_target_ops)
9503 <supports_range_stepping>: New field.
9504 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9505 * linux-x86-low.c (x86_supports_range_stepping): New.
9506 (the_low_target) <supports_range_stepping>: Set to
9507 x86_supports_range_stepping.
9508 * server.c (handle_v_cont): Handle 'r' action.
9509 (handle_v_requests): Append ";r" if the target supports range
9511 * target.h (struct thread_resume) <step_range_start,
9512 step_range_end>: New fields.
9513 (struct target_ops) <supports_range_stepping>:
9515 (target_supports_range_stepping): New macro.
9517 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9519 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9520 confusion in comment.
9522 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9524 * lynx-low.c (struct process_info_private): New type.
9525 (lynx_add_process): New function.
9526 (lynx_create_inferior, lynx_attach): Replace calls to
9527 add_process by calls to lynx_add_process.
9528 (lynx_resume): If PTID is null, then try using
9529 current_process()->private->last_wait_event_ptid.
9531 (lynx_clear_inferiors): Delete. The contents of that function
9532 has been inlined in lynx_mourn;
9533 (lynx_wait_1): Save the ptid in the process's private data.
9534 (lynx_mourn): Free the process' private data. Replace call
9535 to lynx_clear_inferiors by call to clear_inferiors.
9537 2013-05-17 Yao Qi <yao@codesourcery.com>
9539 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9542 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9544 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9545 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9546 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9547 PT_TEXT_END_ADDR guards. Update comments.
9548 (linux_target_op) <read_offsets>: Conditionally define to
9549 linux_read_offsets if the target is UCLIBC and if it defines
9550 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9552 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9553 Andrew Jenner <andrew@codesourcery.com>
9555 * Makefile.in (SFILES): Add linux-nios2-low.c.
9556 (clean): Add action to delete nios2-linux.c.
9557 (nios2-linux.c): New rule.
9558 * configure.srv: Add nios2*-*-linux*.
9559 * linux-nios2-low.c: New.
9561 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9563 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9565 2013-04-25 Hui Zhu <hui@codesourcery.com>
9568 * ax.c (ax_printf): Add fflush.
9570 2013-04-22 Tom Tromey <tromey@redhat.com>
9572 * Makefile.in (SFILES): Add filestuff.c.
9573 (OBS): Add filestuff.o.
9574 (filestuff.o): New target.
9575 * config.in, configure: Rebuild.
9576 * configure.ac: Check for fdwalk, pipe2.
9578 2013-04-17 Pedro Alves <palves@redhat.com>
9580 * configure.ac (USE_THREAD_DB): Delete variable.
9581 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9582 Don't AC_SUBST USE_THREAD_DB.
9583 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9584 * config.in, configure: Regenerate.
9586 2013-04-16 Pedro Alves <palves@redhat.com>
9588 * linux-low.h (struct lwp_info) <thread_known>: Move under
9589 the USE_THREAD_DB #ifdef.
9591 2013-04-16 Pedro Alves <palves@redhat.com>
9593 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9594 (linux-low.o): Delete rule.
9595 * linux-low.h: Always include "gdb_thread_db.h" instead of
9596 conditionally including thread_db.h.
9597 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9600 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9602 * Makefile.in (install-only): Fix make install regression.
9604 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9606 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9607 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9609 * gdbserver.1: Remove.
9611 2013-03-22 Pedro Alves <palves@redhat.com>
9613 * linux-low.c (handle_extended_wait): Don't call
9614 linux_enable_event_reporting.
9616 2013-03-15 Tony Theodore <tonyt@logyst.com>
9619 * Makefile.in (SHELL): Use @SHELL@.
9621 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9623 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9626 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9628 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9629 Remove extraneous NULL element.
9631 2013-03-13 Yao Qi <yao@codesourcery.com>
9633 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9634 'V' block in trace frame.
9636 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9638 * target.h (struct target_ops): Add btrace ops.
9639 (target_supports_btrace): New macro.
9640 (target_enable_btrace): New macro.
9641 (target_disable_btrace): New macro.
9642 (target_read_btrace): New macro.
9643 * gdbthread.h (struct thread_info): Add btrace field.
9644 * server.c: Include btrace-common.h.
9645 (handle_btrace_general_set): New function.
9646 (handle_btrace_enable): New function.
9647 (handle_btrace_disable): New function.
9648 (handle_general_set): Call handle_btrace_general_set.
9649 (handle_qxfer_btrace): New function.
9650 (struct qxfer qxfer_packets[]): Add btrace entry.
9651 * inferiors.c (remove_thread): Disable btrace.
9652 * linux-low: Include linux-btrace.h.
9653 (linux_low_enable_btrace): New function.
9654 (linux_low_read_btrace): New function.
9655 (linux_target_ops): Add btrace ops.
9656 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9657 Add srv_linux_btrace=yes.
9658 (x86_64-*-linux*): Add linux-btrace.o.
9659 Add srv_linux_btrace=yes.
9660 * configure.ac: Define HAVE_LINUX_BTRACE.
9661 * config.in: Regenerated.
9662 * configure: Regenerated.
9664 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9666 * server.c (handle_qxfer): Preserve error message if -3 is
9668 (qxfer): Document the -3 return value.
9670 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9672 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9673 (linux_btrace_h): New variable.
9674 (linux-btrace.o): New rule.
9676 2013-03-08 Stan Shebs <stan@codesourcery.com>
9677 Hafiz Abid Qadeer <abidh@codesourcery.com>
9679 * tracepoint.c (trace_buffer_size): New global.
9680 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9681 (init_trace_buffer): Change to one-argument function. Allocate
9682 trace buffer memory.
9683 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9684 handle QTBuffer:size packet.
9685 (cmd_bigqtbuffer_size): New function.
9686 (initialize_tracepoint): Call init_trace_buffer with
9687 DEFAULT_TRACE_BUFFER_SIZE.
9688 * server.c (handle_query): Add QTBuffer:size in the
9691 2013-03-07 Yao Qi <yao@codesourcery.com>
9693 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9694 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9696 (cmd_qtsp): Adjust condition. Do post increment.
9697 Set cur_action and cur_step_action back to 0.
9699 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9702 * linux-low.c (linux_write_memory): Return early success if LEN is
9705 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9707 * configure.srv: Add x86_64-*-cygwin* as target.
9709 2013-02-28 Tom Tromey <tromey@redhat.com>
9711 * configure.ac: Invoke AC_SYS_LARGEFILE.
9712 * configure, config.in: Rebuild.
9714 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9716 * win32-low.c: Throughout, fix format strings and casts of
9717 printf-like functions to avoid type related warnings on all
9719 (get_child_debug_event): Print dwDebugEventCode as hex since
9720 that's how it's usually documented.
9722 2013-02-28 Yao Qi <yao@codesourcery.com>
9724 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9727 2013-02-27 Jiong Wang <jiwang@tilera.com>
9729 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9730 (reg-tilegx32.c): New rule.
9731 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9732 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9733 different register info initializer according to elf class.
9734 (init_registers_tilgx32): New function. The tilegx32 register info
9736 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9737 (tile_store_gregset): Likewise.
9739 2013-02-27 Yao Qi <yao@codesourcery.com>
9741 * server.c (process_point_options): Print debug message when
9742 debug_threads is true.
9744 2013-02-26 Yao Qi <yao@codesourcery.com>
9746 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9748 2013-02-19 Pedro Alves <palves@redhat.com>
9749 Kai Tietz <ktietz@redhat.com>
9753 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9754 instead of strtoul to extract address from packet.
9755 (process_serial_event) <'z'>: Likewise.
9757 2013-02-18 Yao Qi <yao@codesourcery.com>
9759 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9761 2013-02-14 Pedro Alves <palves@redhat.com>
9765 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9766 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9768 2013-02-14 Pedro Alves <palves@redhat.com>
9770 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9772 2013-02-14 Pedro Alves <palves@redhat.com>
9774 * tracepoint.c (save_string): Delete.
9775 (add_tracepoint_action): Use savestring instead of save_string.
9777 2013-02-12 Pedro Alves <palves@redhat.com>
9779 * linux-xtensa-low.c: Ditto.
9780 * xtensa-xtregs.c: Ditto.
9782 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9784 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9787 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9789 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9790 aarch64_num_wp_regs and aarch64_num_bp_regs to
9791 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9793 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9795 * linux-aarch64-low.c (ps_get_thread_area): Replace
9796 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9798 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9799 Marcus Shawcroft <marcus.shawcroft@arm.com>
9800 Nigel Stephens <nigel.stephens@arm.com>
9801 Yufeng Zhang <yufeng.zhang@arm.com>
9803 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9804 (aarch64.c, aarch64-without-fpu.c): New targets.
9805 * configure.srv (aarch64*-*-linux*): New.
9806 * linux-aarch64-low.c: New file.
9808 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9810 * linux-low.c (handle_extended_wait, linux_create_inferior)
9811 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9812 (dequeue_one_deferred_signal, linux_resume_one_thread)
9813 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9814 (linux_tracefork_grandchild, linux_test_for_tracefork)
9815 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9816 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9817 where the argument is 0.
9819 2013-01-25 Yao Qi <yao@codesourcery.com>
9821 * event-loop.c: Include "queue.h".
9822 (gdb_event_p): New typedef.
9823 (struct gdb_event) <next_event>: Remove.
9824 (event_queue): Change to QUEUE(gdb_event_p).
9825 (async_queue_event): Remove.
9826 (gdb_event_xfree): New.
9827 (initialize_event_loop): New.
9828 (process_event): Use API from QUEUE.
9829 (wait_for_event): Likewise.
9830 * server.c (main): Call initialize_event_loop.
9831 * server.h (initialize_event_loop): Declare.
9833 2013-01-18 Yao Qi <yao@codesourcery.com>
9835 * ax.h (struct eval_agent_expr_context): New.
9836 (gdb_eval_agent_expr): Update declaration.
9837 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9838 TFRAME. Add new argument CTX.
9839 * server.h (struct eval_agent_expr_context): Declare.
9840 (agent_mem_read, agent_tsv_read): Update declaration.
9841 (agent_mem_read_string): Likewise.
9842 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9843 (add_traceframe_block): Add new argument TPOINT.
9844 Increase TPOINT->traceframe_usage.
9845 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9846 eval_tracepoint_agent_expr.
9847 (condition_true_at_tracepoint): Likewise.
9848 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9849 (agent_mem_read_string, agent_tsv_read): Likewise.
9851 2013-01-16 Yao Qi <yao@codesourcery.com>
9853 * linux-low.c (linux_resume_one_lwp): Don't check
9854 'lwp->bp_reinsert != 0'.
9856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9857 Pedro Alves <palves@redhat.com>
9859 * lynx-low.c (ptrace_request_to_str): Define a temporary
9860 macro and use it to simplify this function's implementation.
9862 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9864 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9867 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9869 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9871 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9873 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9875 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9877 * lynx-low.c (lynx_resume): Use the resume_info parameter
9878 to determine the ptid for the lynx_ptrace call, unless
9879 it is equal to minus_one_ptid, in which case we use the
9880 ptid of the current_inferior.
9881 (lynx_wait_1): After having received a thread create/exit
9882 event, resume the inferior's execution using the signaling
9883 thread's ptid, rather than the old ptid.
9885 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9887 * lynx-low.c (lynx_resume): Delete variable ret.
9889 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9891 * gdbreplay.c (gdbreplay_version): Update copyright year.
9892 * server.c (gdbserver_version): Likewise.
9894 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9896 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9899 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9901 * lynx-low.c (ptrace_request_to_str): Add handling for
9904 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9906 * lynx-low.c (lynx_attach): Delete variable new_process.
9908 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9910 * lynx-low.c (lynx_create_inferior): Delete variable
9913 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9915 * lynx-low.c (ptrace_request_to_str): Do not handle
9916 PTRACE_GETTHREADLIST if this macro does not exist.
9918 2012-12-15 Yao Qi <yao@codesourcery.com>
9920 * Makefile.in (OBS): Add notif.o.
9921 * notif.c, notif.h: New.
9922 * server.c: Include "notif.h".
9923 (struct vstop_notif) <next>: Remove.
9925 (queue_stop_reply): Update.
9926 (push_event, send_next_stop_reply): Remove.
9927 (discard_queued_stop_replies): Update.
9928 (notif_stop): New variable.
9929 (handle_v_stopped): Remove.
9930 (handle_v_requests): Don't call handle_v_stopped. Call
9931 handle_ack_notif instead.
9932 (queue_stop_reply_callback): Call notif_event_enque instead
9933 of queue_stop_reply.
9934 (handle_status): Don't call send_next_stop_reply, call
9935 notif_write_event instead.
9936 (kill_inferior_callback): Likewise.
9937 (detach_or_kill_inferior_callback): Likewise.
9938 (main): Call initialize_notif.
9939 (process_serial_event): Call QUEUE_is_empty.
9940 (handle_target_event): Call notif_push instead of push event.
9941 * server.h (push_event): Remove declaration.
9943 2012-12-10 Tom Tromey <tromey@redhat.com>
9945 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9946 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9949 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9950 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9951 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9952 (amd64-linux-ipa.o, ax.o): Rewrite.
9953 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9954 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9955 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9956 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9957 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9958 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9959 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9960 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9961 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9962 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9963 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9964 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9965 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9966 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9967 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9968 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9969 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9970 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9971 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9972 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9973 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9974 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9975 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9976 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9977 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9978 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9979 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9980 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9981 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9982 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9983 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9984 (reg-tilegx.o): Remove.
9985 (all_object_files): New macro.
9986 Include .deps files.
9987 * aclocal.m4, configure: Rebuild.
9988 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9989 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9990 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9992 2012-12-05 Tom Tromey <tromey@redhat.com>
9995 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9997 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9999 * configure.ac: Check for linux/perf_event.h.
10000 * config.in: Regenerated.
10001 * configure: Regenerated.
10003 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10005 * hostio.c (handle_readlink): Decrease buffer size
10006 parameter passed to readlink by one byte.
10008 2012-11-26 Yao Qi <yao@codesourcery.com>
10010 * configure.ac (build_warnings): Append '-Wempty-body'.
10011 * configure: Regenerated.
10012 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10015 2012-11-15 Pierre Muller <muller@sourceware.org>
10017 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10018 * config.in: Regenerate.
10019 * configure: Regenerate.
10020 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10021 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10022 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10023 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10025 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10026 instead of <sys/wait.h> header.
10027 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10029 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10031 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10032 (various make rules): Remove -DGDBSERVER
10034 2012-11-09 Yao Qi <yao@codesourcery.com>
10036 * spu-low.c (current_ptid): Move it to ..
10037 * gdbthread.h: ... here. New.
10038 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10039 * server.c (myresume, process_serial_event): Likewise.
10040 * thread-db.c (thread_db_find_new_threads): Likewise.
10041 * tracepoint.c (run_inferior_command): Likewise.
10043 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10045 * server.c (handle_search_memory_1): Include access length in
10048 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10050 * linux-crisv32-low.c: Fix compile errors.
10052 2012-09-04 Yao Qi <yao@codesourcery.com>
10054 * tracepoint.c (cmd_qtsv): Adjust debug message.
10055 Don't check CUR_TPOINT.
10057 2012-08-28 Yao Qi <yao@codesourcery.com>
10059 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10060 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10061 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10062 Remove declarations of xmalloc, xreallloc, xstrdup and
10064 * Makefile.in (libiberty_h): New.
10065 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10066 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10068 2012-08-23 Yao Qi <yao@codesourcery.com>
10070 * server.h: Remove declaration of 'xsnprintf'.
10072 2012-08-22 Keith Seitz <keiths@redhat.com>
10074 * server.h: Include build-gnulib-gbserver/config.h.
10075 * gdbreplay.c: Likewise.
10077 2012-08-08 Doug Evans <dje@google.com>
10079 * Makefile.in (SFILES): Add gdb_vecs.c.
10080 (OBS): Add gdb_vecs.o.
10081 (gdb_vecs_h, host_defs_h): New variables.
10082 (thread-db.o): Add $(gdb_vecs_h) dependency.
10083 (gdb_vecs.o): New rule.
10084 * thread-db.c: #include "gdb_vecs.h".
10085 (thread_db_load_search): Use a vector to iterate over path elements.
10086 Handle text appearing after "$pdir".
10088 * configure.ac: Add check for strstr.
10089 * config.in: Regenerate.
10090 * configure: Regenerate.
10092 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10094 * hostio.c (handle_pread): If pread fails, fall back to attempting
10096 (handle_pwrite): Likewise for pwrite.
10098 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10100 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10101 between unsupported TYPE and unimplementable ADDR/LEN combination.
10102 (arm_insert_point): Act on new return value.
10104 2012-07-31 Pedro Alves <palves@redhat.com>
10106 * server.c (process_point_options): Only skip tokens if we find
10107 one that is unrecognized. Don't treat 'X' specially while
10108 skipping unrecognized tokens.
10110 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10112 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10113 to 4-byte-align HW breakpoint addresses for Thumb.
10115 2012-07-27 Yao Qi <yao@codesourcery.com>
10119 * server.h: Declare gdb_agent_about_to_close.
10120 * target.c (kill_inferior): Include "agent.h".
10121 New. Send command 'kill'.
10122 * target.h (kill_inferior): Removed macro.
10123 * tracepoint.c (gdb_agent_about_to_close): New.
10124 (gdb_agent_helper_thread): Handle command 'close'.
10125 Wait endlessly until the inferior stops.
10126 Install gdb_agent_remove_socket to atexit hook.
10127 (agent_socket_name): New static variable.
10128 (gdb_agent_socket_init): Replace local variable 'name' with
10129 'agent_socket_name'.
10130 (gdb_agent_remove_socket): New.
10132 2012-07-27 Yao Qi <yao@codesourcery.com>
10134 * server.c (process_point_options): Stop at 'X' when parsing.
10136 2012-07-19 Michael Eager <eager@eagercon.com>
10138 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10140 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10141 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10142 hardware breakpoint.
10144 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10146 * gdbserver/linux-low.c (initialize_low): Call
10147 linux_ptrace_init_warnings.
10149 2012-07-02 Doug Evans <dje@google.com>
10151 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10154 2012-07-02 Stan Shebs <stan@codesourcery.com>
10156 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10157 (ax.o): Add it to build rule.
10159 (OBS): Add format.o.
10160 (IPA_OBS): Add format.o.
10161 * server.c (handle_query): Claim support for breakpoint commands.
10162 (process_point_options): Add command case.
10163 (process_serial_event): Leave running if there are printfs in
10165 * mem-break.h (any_persistent_commands): Declare.
10166 (add_breakpoint_commands): Declare.
10167 (gdb_no_commands_at_breakpoint): Declare.
10168 (run_breakpoint_commands): Declare.
10169 * mem-break.c (struct point_command_list): New struct.
10170 (struct breakpoint): New field command_list.
10171 (any_persistent_commands): New function.
10172 (add_commands_to_breakpoint): New function.
10173 (add_breakpoint_commands): New function.
10174 (gdb_no_commands_at_breakpoint): New function.
10175 (run_breakpoint_commands): New function.
10176 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10178 * ax.c: Include format.h.
10179 (ax_printf): New function.
10180 (gdb_eval_agent_expr): Add printf opcode.
10182 2012-06-13 Yao Qi <yao@codesourcery.com>
10184 * server.c (start_inferior): Remove duplicated writes to fields
10185 'last_resume_kind' and 'last_status' of 'current_inferior'.
10187 2012-06-12 Yao Qi <yao@codesourcery.com>
10188 Pedro Alves <palves@redhat.com>
10190 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10192 * server.c (handle_v_cont): Extend comment.
10194 2012-06-11 Yao Qi <yao@codesourcery.com>
10196 * linux-low.c (linux_attach): Add 'static'.
10198 2012-06-06 Yao Qi <yao@codesourcery.com>
10200 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10202 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10204 Fix gcc -flto compilation warning.
10205 * server.c (main): Make variable multi_mode and attach volatile.
10207 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10209 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10210 if the platform doesn't know about it.
10212 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10214 * Makefile.in (SFILES): Add linux-tile-low.c.
10215 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10216 * configure.srv: Handle tilegx-*-linux*.
10217 * linux-tile-low.c: New file.
10219 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10221 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10223 2012-05-24 Pedro Alves <palves@redhat.com>
10227 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10229 2012-05-24 Pedro Alves <palves@redhat.com>
10233 Replace target_signal with gdb_signal throughout.
10235 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10237 * linux-low.c (linux_store_registers): Avoid the copying sequence
10238 when no data has been retrieved by ptrace.
10240 2012-05-22 Will Deacon <will.deacon@arm.com>
10242 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10243 Include asm/ptrace.h.
10244 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10247 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10249 * linux-low.c (linux_store_registers): Don't re-retrieve data
10250 with ptrace that has already been obtained from /proc. Always
10251 copy any data retrieved with ptrace to the buffer supplied.
10253 2012-05-11 Yao Qi <yao@codesourcery.com>
10254 Pedro Alves <palves@redhat.com>
10256 * linux-low.c (enum stopping_threads_kind): New.
10257 (stopping_threads): Change type to `enum stopping_threads_kind'.
10258 (handle_extended_wait): If stopping and suspending threads, leave
10259 the new_lwp suspended too.
10260 (linux_wait_for_event): Adjust.
10261 (stop_all_lwps): Set `stopping_threads' to
10262 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10263 whether we're suspending threads or just stopping them. Assert no
10266 2012-04-29 Yao Qi <yao@codesourcery.com>
10268 * server.h: Move some code to ...
10269 * gdbthread.h: ... here. New.
10270 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10271 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10272 (nto-low.o, win32-low.o): Likewise.
10273 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10274 * regcache.c, remote-utils.c, server.c: Likewise.
10275 * target.c, tracepoint.c, win32-low.c: Likewise.
10277 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10279 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10280 (PTRACE_ARG4_TYPE): Likewise.
10281 (PTRACE_XFER_TYPE): Likewise.
10282 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10283 ptrace to PTRACE_ARG3_TYPE.
10284 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10285 (PTRACE_ARG4_TYPE): Likewise.
10286 (PTRACE_XFER_TYPE): Likewise.
10287 (linux_detach_one_lwp): Cast fourth argument of
10288 ptrace to long then PTRACE_ARG4_TYPE.
10289 (regsets_fetch_inferior_registers): Cast third argument of
10290 ptrace to long then PTRACE_ARG3_TYPE.
10291 (regsets_store_inferior_registers): Likewise.
10293 2012-04-20 Pedro Alves <palves@redhat.com>
10295 * configure: Regenerate.
10297 2012-04-19 Pedro Alves <palves@redhat.com>
10299 * Makefile.in (GNULIB_BUILDDIR): New.
10300 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10301 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10302 (all, install-only, uninstall, clean-info, all-lib, clean): No
10303 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10304 (maintainer-clean realclean distclean): Use subdir_do.
10306 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10307 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10308 * acinclude.m4: Include acx_configure_dir.m4.
10309 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10310 calls. Call AC_PROG_RANLIB. Configure gnulib using
10313 (GNULIB_STDINT_H): Adjust.
10314 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10315 * gdbreplay.c: Include build-gnulib/config.h.
10316 * server.h: Likewise.
10317 * aclocal.m4: Regenerate.
10318 * config.in: Regenerate.
10319 * configure: Regenerate.
10321 2012-04-19 Pedro Alves <palves@redhat.com>
10323 * Makefile.in (LIBGNU, INCGNU): Adjust.
10324 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10325 (all, install-only, uninstall, clean-info, all-lib, clean)
10326 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10327 * configure.ac: Adjust AC_OUTPUT output.
10328 * aclocal.m4: Regenerate.
10329 * configure: Regenerate.
10331 2012-04-19 Pedro Alves <palves@redhat.com>
10333 * Makefile.in (generated_files): New.
10334 (server_h): Remove the explicit dependency on config.h, and depend
10335 on $generated_files.
10337 2012-04-19 Pedro Alves <palves@redhat.com>
10339 * Makefile.in (INCGNU): Add -Ignulib.
10341 2012-04-19 Pedro Alves <palves@redhat.com>
10343 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10344 (INCGNU): ... this, and spell out -I here.
10345 (GNULIB_LIB): Rename to ...
10346 (LIBGNU): ... this.
10347 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10349 2012-04-19 Pedro Alves <palves@redhat.com>
10351 * config.in: Regenerate.
10353 2012-04-19 Pedro Alves <palves@redhat.com>
10355 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10356 * server.h (memmem): Remove declaration.
10357 * config.in: Regenerate.
10358 * configure: Regenerate.
10360 2012-04-19 Yao Qi <yao@codesourcery.com>
10362 * Makefile.in (SFILES): Add common/vec.c.
10366 2012-04-19 Yao Qi <yao@codesourcery.com>
10368 * remote-utils.c (prepare_resume_reply): Replace with macro
10369 target_core_of_thread.
10370 * server.c (handle_qxfer_threads_proper): Likewise.
10371 * target.h (traget_core_of_thread): New macro.
10373 2012-04-18 Pedro Alves <palves@redhat.com>
10375 * aclocal.m4: Regenerate.
10376 * configure: Regenerate.
10378 2012-04-16 Yao Qi <yao@codesourcery.com>
10380 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10381 duplicated on address.
10383 2012-04-16 Yao Qi <yao@codesourcery.com>
10385 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10386 (struct tracepoint_action_ops) <send>: New field.
10387 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10388 (agent_expr_send, x_tracepoint_action_send): New.
10389 (l_tracepoint_action_send): New.
10390 (cmd_qtdp): Download and install tracepoint
10391 according to `use_agent'.
10392 (run_inferior_command): Add one more parameter `len'.
10394 (tracepoint_send_agent): New.
10395 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10397 2012-04-16 Yao Qi <yao@codesourcery.com>
10399 * tracepoint.c (download_tracepoints): Moved to ...
10400 (cmd_qtstart): ... here.
10402 2012-04-14 Yao Qi <yao@codesourcery.com>
10404 * tracepoint.c: Include inttypes.h.
10405 (struct collect_memory_action): Use sized types.
10406 (struct tracepoint): Likewise.
10407 (cmd_qtdp, stop_tracing): Update print specifiers.
10408 (cmd_qtp, response_tracepoint): Likewise.
10409 (collect_data_at_tracepoint): Likewise.
10410 (collect_data_at_step): Likewise.
10412 2012-04-14 Yao Qi <yao@codesourcery.com>
10414 Import gnulib module inttypes.
10415 * aclocal.m4, config.in, configure: Regenerated.
10417 2012-04-14 Yao Qi <yao@codesourcery.com>
10419 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10420 Makefile and config.status at last.
10422 2012-04-13 Yao Qi <yao@codesourcery.com>
10424 * tracepoint.c: Include stdint.h unconditionally.
10426 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10428 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10429 on BFD_HAVE_SYS_PROCFS_TYPE.
10430 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10431 * configure: Regenerate.
10432 * config.in: Likewise.
10434 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10436 * Makefile.in (clean): Also remove x32.c x32-linux.c
10437 x32-avx.c x32-avx-linux.c.
10438 (x32.o): New target.
10440 (x32-linux.o): Likewise.
10441 (x32-linux.c): Likewise.
10442 (x32-avx.o): Likewise.
10443 (x32-avx.c): Likewise.
10444 (x32-avx-linux.o): Likewise.
10445 (x32-avx-linux.c): Likewise.
10447 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10448 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10449 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10450 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10451 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10452 i386/x32-avx-linux.xml.
10454 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10455 (init_registers_x32_avx_linux): Likwise.
10456 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10457 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10459 2012-04-13 Pedro Alves <palves@redhat.com>
10461 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10462 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10463 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10464 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10467 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10469 * linux-x86-low.c (compat_x32_clock_t): New.
10470 (compat_x32_siginfo_t): Likewise.
10471 (compat_x32_siginfo_from_siginfo): Likewise.
10472 (siginfo_from_compat_x32_siginfo): Likewise.
10473 (linux_is_elf64): Likewise.
10474 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10475 and siginfo_from_compat_x32_siginfo for x32.
10476 (x86_arch_setup): Set linux_is_elf64.
10478 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10481 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10483 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10484 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10485 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10486 compatible with process.
10488 2012-04-12 Yao Qi <yao@codesourcery.com>
10490 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10491 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10492 (install-only, install-info, clean): Handle sub dir gnulib.
10493 (all-lib, am--refresh): New targets.
10494 (memmem.o): Remove target.
10495 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10496 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10497 (AC_REPLACE_FUNCS): Remove memmem.
10498 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10499 (AC_OUTPUT): Generate Makefile in gnulib/.
10500 * aclocal.m4, config.in, configure: Regenerated.
10502 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10504 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10506 2012-04-05 Pedro Alves <palves@redhat.com>
10508 -Werror=strict-aliasing
10510 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10513 2012-04-04 Pedro Alves <palves@redhat.com>
10515 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10516 (sparc_store_gregset_from_stack, sparc_store_gregset)
10517 (sparc_breakpoint_at): Fix formatting.
10519 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10521 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10523 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10524 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10525 * config.in: Regenerate.
10526 * configure: Likewise.
10528 2012-03-29 Pedro Alves <palves@redhat.com>
10530 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10531 Correct ptrace arguments.
10533 2012-03-28 Pedro Alves <palves@redhat.com>
10535 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10536 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10537 (IA64_FR1_REGNUM): New defines.
10538 (ia64_fetch_register): New.
10539 (the_low_target): Install it.
10540 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10542 * linux-low.c (linux_fetch_registers): Try the
10543 the_low_target.fetch_register hook first.
10545 * linux-arm-low.c (the_low_target): Adjust.
10546 * linux-bfin-low.c (the_low_target): Adjust.
10547 * linux-cris-low.c (the_low_target): Adjust.
10548 * linux-crisv32-low.c (the_low_target): Adjust.
10549 * linux-m32r-low.c (the_low_target): Adjust.
10550 * linux-m68k-low.c (the_low_target): Adjust.
10551 * linux-mips-low.c (the_low_target): Adjust.
10552 * linux-ppc-low.c (the_low_target): Adjust.
10553 * linux-s390-low.c (the_low_target): Adjust.
10554 * linux-sh-low.c (the_low_target): Adjust.
10555 * linux-sparc-low.c (the_low_target): Adjust.
10556 * linux-tic6x-low.c (the_low_target): Adjust.
10557 * linux-x86-low.c (the_low_target): Adjust.
10558 * linux-xtensa-low.c (the_low_target): Adjust.
10560 2012-03-26 Pedro Alves <palves@redhat.com>
10562 * server.c (handle_qxfer_libraries): Don't bail early if
10563 the_target->qxfer_libraries_svr4 is not NULL.
10565 2012-03-26 Pedro Alves <palves@redhat.com>
10567 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10569 2012-03-23 Pedro Alves <palves@redhat.com>
10571 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10572 "library-list-svr4" element's start tag when the the DSO list is
10575 2012-03-23 Pedro Alves <palves@redhat.com>
10577 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10578 a variable whose type size is the same as the inferior's pointer
10581 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10583 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10585 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10586 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10587 * linux-low.h: Include <signal.h>.
10588 (struct siginfo): Remove forward declaration.
10589 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10592 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10594 * .gitignore: Ignore more files.
10596 2012-03-19 Pedro Alves <palves@redhat.com>
10597 Jan Kratochvil <jan.kratochvil@redhat.com>
10599 * server.c (cont_thread, general_thread): Add describing comments.
10600 (start_inferior): Clear `cont_thread'.
10601 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10604 2012-03-15 Yao Qi <yao@codesourcery.com>
10606 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10608 (cmd_qtdp): ... here.
10610 2012-03-15 Yao Qi <yao@codesourcery.com>
10612 * tracepoint.c (struct tracepoint_action_ops): New.
10613 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10614 (m_tracepoint_action_download): New.
10615 (r_tracepoint_action_download): New.
10616 (x_tracepoint_action_download): New.
10617 (l_tracepoint_action_download): New.
10618 (add_tracepoint_action): Install `action->ops' according type.
10619 (download_tracepoint_1): Move code `download' function pointer
10620 of various tracepoint_action_ops.
10622 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10624 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10625 linux_ptrace_attach_warnings.
10627 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10629 * Makefile.in (linux-ptrace.o): New.
10630 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10631 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10632 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10633 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10634 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10636 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10638 2012-03-08 Yao Qi <yao@codesourcery.com>
10639 Pedro Alves <palves@redhat.com>
10641 Fix PR server/13392.
10642 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10643 offset of JMP insn.
10644 * tracepoint.c (remove_tracepoint): New.
10645 (cmd_qtdp): Call remove_tracepoint when failed to install.
10647 2012-03-07 Pedro Alves <palves@redhat.com>
10649 * linux-low.c (get_detach_signal): New.
10650 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10651 Pass on pending signals to PTRACE_DETACH. Check the result of the
10653 * server.c (program_signals, program_signals_p): New.
10654 (handle_general_set): Handle QProgramSignals.
10655 * server.h (program_signals, program_signals_p): Declare.
10657 2012-03-05 Pedro Alves <palves@redhat.com>
10658 Jan Kratochvil <jan.kratochvil@redhat.com>
10660 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10663 2012-03-03 Yao Qi <yao@codesourcery.com>
10665 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10666 agent_look_up_symbols.
10668 2012-03-03 Yao Qi <yao@codesourcery.com>
10670 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10671 (linux-x86-low.o): Likewise.
10672 * server.h: Remove in_process_agent_loaded.
10673 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10677 2012-03-03 Yao Qi <yao@codesourcery.com>
10679 * tracepoint.c (gdb_agent_capability): New global.
10680 (in_process_agent_loaded_ust): Renamed to
10681 `in_process_agent_supports_ust'.
10683 (in_process_agent_supports_ust): Call agent_capability_check.
10684 (clear_installed_tracepoints): Assert that agent supports
10687 2012-03-03 Yao Qi <yao@codesourcery.com>
10689 * linux-low.c (linux_supports_agent): New.
10690 (linux_target_ops): Initialize field `supports_agent' with
10691 linux_supports_agent.
10692 * target.h (struct target_ops) <supports_agent>: New.
10693 (target_supports_agent): New macro.
10694 * server.c (handle_general_set): Handle packet 'QAgent'.
10695 (handle_query): Send `QAgent+'.
10696 * Makefile.in (server.o): Depends on agent.h.
10698 2012-03-03 Yao Qi <yao@codesourcery.com>
10700 * Makefile.in (OBS): Add agent.o.
10701 Add new rule for agent.o.
10702 Track dependence of tracepoint.c on agent.h.
10703 * tracepoint.c (run_inferior_command_1):
10704 (run_inferior_command): Call agent_run_command.
10705 (gdb_ust_connect_sync_socket): Deleted. Move it to
10707 (resume_thread, stop_thread): Likewise.
10708 (gdb_ust_socket_init): Renamed to ...
10709 (gdb_agent_socket_init): ... New.
10710 (gdb_ust_thread): Renamed to ...
10711 (gdb_agent_helper_thread): ... New.
10712 (gdb_ust_init): Move some code to ...
10713 (gdb_agent_init): ... here. New.
10714 [HAVE_UST]: Call gdb_ust_init.
10715 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10716 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10717 * config.in, configure: Regenerated.
10719 2012-03-02 Pedro Alves <palves@redhat.com>
10721 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10722 * linux-low.c (struct simple_pid_list): New.
10723 (stopped_pids): New a struct simple_pid_list pointer.
10724 (add_to_pid_list, pull_pid_from_list): New.
10725 (handle_extended_wait): Don't assume the first signal new children
10726 report is SIGSTOP. Adjust call to pull_pid_from_list.
10727 (linux_wait_for_lwp): Adjust.
10729 2012-03-02 Yao Qi <yao@codesourcery.com>
10731 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10734 2012-03-02 Yao Qi <yao@codesourcery.com>
10736 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10737 `stop_pc' and `tpoint'. Update caller.
10739 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10741 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10742 * linux-low.c (use_linux_regsets): New macro.
10743 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10744 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10745 (linux_register_in_regsets): New function.
10746 (usr_fetch_inferior_registers): Skip registers covered by
10748 (usr_store_inferior_registers): Likewise.
10749 (usr_fetch_inferior_registers): New macro.
10750 (usr_store_inferior_registers): Likewise.
10751 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10752 (linux_store_registers): Likewise.
10753 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10755 (init_registers_mips64_dsp_linux): Likewise.
10756 (init_registers_mips_linux): New macro.
10757 (init_registers_mips_dsp_linux): Likewise.
10758 (mips_dsp_num_regs): Likewise.
10759 (DSP_BASE, DSP_CONTROL): New fallback macros.
10760 (mips_base_regs): New macro.
10761 (mips_regmap): Use it. Fix the size.
10762 (mips_dsp_regmap): New variable.
10763 (mips_dsp_regset_bitmap): Likewise.
10764 (mips_arch_setup): New function.
10765 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10767 (mips_cannot_store_register): Likewise.
10768 (the_low_target): Update .arch_setup, .num_regs and .regmap
10769 initializers. Add .regset_bitmap initializer.
10770 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10772 * linux-bfin-low.c (the_low_target): Likewise.
10773 * linux-cris-low.c (the_low_target): Likewise.
10774 * linux-crisv32-low.c (the_low_target): Likewise.
10775 * linux-ia64-low.c (the_low_target): Likewise.
10776 * linux-m32r-low.c (the_low_target): Likewise.
10777 * linux-m68k-low.c (the_low_target): Likewise.
10778 * linux-ppc-low.c (the_low_target): Likewise.
10779 * linux-s390-low.c (the_low_target): Likewise.
10780 * linux-sh-low.c (the_low_target): Likewise.
10781 * linux-sparc-low.c (the_low_target): Likewise.
10782 * linux-tic6x-low.c (the_low_target): Likewise.
10783 * linux-x86-low.c (the_low_target): Likewise.
10784 * linux-xtensa-low.c (the_low_target): Likewise.
10785 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10786 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10787 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10789 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10790 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10792 2012-02-29 Yao Qi <yao@codesourcery.com>
10793 Pedro Alves <palves@redhat.com>
10795 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10796 `step_over_finished' is true.
10798 2012-02-27 Pedro Alves <palves@redhat.com>
10800 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10801 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10803 2012-02-27 Pedro Alves <palves@redhat.com>
10806 * linux-low.c (pid_is_stopped): New.
10807 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10809 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10811 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10814 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10816 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10818 2012-02-24 Luis Machado <lgustavo@codesourcery>
10820 * server.c (handle_query): Advertise support for target-side
10821 breakpoint condition evaluation.
10822 (process_point_options): New function.
10823 (process_serial_event): When inserting a breakpoint, check for
10824 a target-side condition that should be evaluated.
10826 * mem-break.c: Include regcache.h and ax.h.
10827 (point_cond_list_t): New data structure.
10828 (breakpoint) <cond_list>: New field.
10829 (find_gdb_breakpoint_at): Make non-static.
10830 (delete_gdb_breakpoint_at): Clear any target-side
10832 (clear_gdb_breakpoint_conditions): New function.
10833 (add_condition_to_breakpoint): Likewise.
10834 (add_breakpoint_condition): Likewise.
10835 (gdb_condition_true_at_breakpoint): Likewise.
10836 (gdb_breakpoint_here): Return result directly instead
10837 of going through a local variable.
10839 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10840 (clear_gdb_breakpoint_conditions): Likewise.
10841 (add_breakpoint_condition): Likewise.
10842 (gdb_condition_true_at_breakpoint): Likewise.
10844 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10845 (need_step_over_p): Take target-side breakpoint condition into
10848 2012-02-24 Luis Machado <lgustavo@codesourcery>
10850 * server.h: Include tracepoint.h.
10851 (agent_mem_read, agent_get_trace_state_variable_value,
10852 agent_set_trace_state_variable_value,
10853 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10854 get_set_tsv_func_addr): New prototypes.
10856 * ax.h: New include file.
10857 * ax.c: New source file.
10859 * tracepoint.c: Include ax.h.
10860 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10861 agent_expr, eval_result_type): Move to ax.h.
10862 (parse_agent_expr): Rename to ...
10863 (gdb_parse_agent_expr): ... this, make it non-static and move
10865 (unparse_agent_expr) Rename to ...
10866 (gdb_unparse_agent_expr): ... this, make it non-static and move
10868 (eval_agent_expr): Rename to ...
10869 (eval_tracepoint_agent_expr): ... this.
10870 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10871 forward declarations.
10872 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10873 (agent_get_trace_state_variable_value): New function.
10874 (agent_set_trace_state_variable_value): New function.
10875 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10876 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10877 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10878 (condition_true_at_tracepoint): Likewise.
10879 (parse_agent_expr): Rename to ...
10880 (gdb_parse_agent_expr): ... this and move to ax.c.
10881 (unparse_agent_expr): Rename to ...
10882 (gdb_unparse_agent_expr): ... this and move to ax.c.
10883 (gdb_agent_op_name): Move to ax.c.
10884 (eval_agent_expr): Rename to ...
10885 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10887 (eval_tracepoint_agent_expr): New function.
10888 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10890 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10892 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10893 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10894 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10895 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10896 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10897 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10898 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10899 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10900 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10901 (compile_bytecodes): Remove forward declaration.
10902 (is_goto_target): Move to ax.c.
10903 (compile_bytecodes): Move to ax.c and call
10904 agent_get_trace_state_variable_value (...) and
10905 agent_set_trace_state_variable_value (...).
10907 * Makefile.in: Update ax.c and IPA dependencies.
10909 2012-02-24 Pedro Alves <palves@redhat.com>
10911 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10912 (cmd_bigqtbuffer_circular): ... this. Only handle
10913 'QTBuffer:circular:'.
10914 (handle_tracepoint_general_set): Adjust.
10916 2012-02-16 Yao Qi <yao@codesourcery.com>
10918 * inferiors.c: Move code to ...
10919 * dll.c: .... here. New.
10920 * server.h: Declare clear_dlls.
10921 * Makefile.in (SFILES): Add dll.c.
10925 2012-02-11 Yao Qi <yao@codesourcery.com>
10927 * server.c: (handle_monitor_command): Add a new parameter
10929 (handle_query): Update caller.
10931 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10933 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10934 * configure, config.in: Regenerate.
10935 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10938 2012-02-02 Pedro Alves <palves@redhat.com>
10940 Try SIGKILL first, then PTRACE_KILL.
10941 * linux-low.c (linux_kill_one_lwp): New.
10942 (linux_kill_one_lwp): Rename to ...
10943 (kill_one_lwp_callback): ... this. Use the new
10944 linux_kill_one_lwp.
10946 2012-02-02 Pedro Alves <palves@redhat.com>
10948 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10951 2012-01-27 Pedro Alves <palves@redhat.com>
10953 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10954 (elf_64_file_p): Make static.
10955 (linux_pid_exe_is_elf_64_file): New.
10956 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10957 Delete declarations.
10958 (linux_pid_exe_is_elf_64_file): Declare.
10959 * linux-x86-low.c (x86_arch_setup): Use
10960 linux_pid_exe_is_elf_64_file.
10962 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10964 * linux-low.c (linux_wait_for_event_1): Rename to ...
10965 (linux_wait_for_event): ... here and merge it with former
10966 linux_wait_for_event - new variable wait_ptid, use it.
10967 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10969 2012-01-23 Pedro Alves <palves@redhat.com>
10971 * server.c (main): Avoid yet another case of infinite loop while
10972 detaching/killing after a longjmp.
10974 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10977 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10979 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10981 * hostio.c (handle_readlink): New function.
10982 (handle_vFile): Call it to handle "vFile:readlink" packets.
10984 2012-01-20 Pedro Alves <palves@redhat.com>
10985 Ulrich Weigand <ulrich.weigand@linaro.org>
10987 * server.c (handle_v_requests): Only support vAttach and vRun to
10988 start multiple processes when in extended protocol mode.
10990 2012-01-17 Pedro Alves <palves@redhat.com>
10992 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10993 memalign plus mprotect to allocate the scratch buffer.
10995 2012-01-13 Pedro Alves <palves@redhat.com>
10997 * server.c (attach_inferior): Clear `cont_thread'.
10999 2012-01-13 Pedro Alves <palves@redhat.com>
11001 * server.c (main): Avoid infinite loop while detaching/killing
11004 2012-01-09 Doug Evans <dje@google.com>
11006 * server.c (start_inferior): Set last_ptid in --wrapper case.
11008 2012-01-06 Yao Qi <yao@codesourcery.com>
11010 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11012 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11014 2012-01-04 Yao Qi <yao@codesourcery.com>
11016 * tracepoint.c (cmd_qtdp): Print debug message
11017 for static tracepoint.
11019 2012-01-04 Yao Qi <yao@codesourcery.com>
11021 * tracepoint.c (trace_vdebug): Differentiate debug message
11022 between gdbserver and IPA.
11024 2012-01-03 Yao Qi <yao@codesourcery.com>
11026 * tracepoint.c (tracepoint_was_hit): Don't collect for
11029 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11031 * terminal.h: Reformat copyright header.
11033 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11035 * server.c (gdbserver_version): Update copyright year.
11036 * gdbreplay.c (gdbreplay_version): Likewise.
11038 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11040 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11043 2011-12-18 Hui Zhu <teawater@gmail.com>
11044 * linux-low.c (linux_create_inferior): Save return value to ret.
11046 2011-12-18 Hui Zhu <teawater@gmail.com>
11048 * linux-low.c (linux_create_inferior): Save return value to ret.
11050 2011-12-16 Doug Evans <dje@google.com>
11052 * linux-low.c (linux_create_inferior): If stdio connection,
11053 redirect stdin from /dev/null, stdout to stderr.
11054 * remote-utils.c (remote_is_stdio): New static global.
11055 (remote_connection_is_stdio): New function.
11056 (remote_prepare): Handle stdio connection.
11057 (remote_open): Ditto.
11058 (remote_close): Don't close stdin for stdio connections.
11059 (read_prim,write_prim): New functions. Replace all calls to
11060 read/write to these.
11061 * server.c (main): Watch for "-" argument. Move call to
11062 remote_prepare before start_inferior.
11063 * server.h (STDIO_CONNECTION_NAME): New macro.
11064 (remote_connection_is_stdio): Declare.
11066 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11067 in debugging output.
11069 2011-12-15 Yao Qi <yao@codesourcery.com>
11071 * tracepoint.c: Include sys/syscall.h.
11072 (gdb_ust_thread): Remove preprocessor conditional.
11074 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11076 * linux-low.c (linux_detach_one_lwp): Call
11077 the_low_target.prepare_to_resume before detaching.
11079 2011-12-14 Yao Qi <yao@codesourcery.com>
11081 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11084 2011-12-14 Yao Qi <yao@codesourcery.com>
11086 * i386-low.c (i386_low_stopped_data_address): Initialize local
11087 variable `control'.
11089 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11093 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11094 DR_CONTROL unless necessary. Extend comments.
11095 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11096 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11098 2011-12-13 Yao Qi <yao@codesourcery.com>
11100 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11102 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11104 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11106 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11107 Print new debug message for such case.
11109 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11111 Fix overlapping memcpy.
11112 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11113 the read_inferior_memory transfer.
11114 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11115 write_inferior_memory transfer.
11116 (set_fast_tracepoint_jump): New variable buf. Use it for the
11117 read_inferior_memory and write_inferior_memory transfers.
11118 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11119 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11120 Use it for the write_inferior_memory transfer.
11121 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11124 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11126 * linux-low.c (fetch_register, store_register): Make code
11127 consistent, fix formatting.
11129 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11131 * linux-low.c (usr_store_inferior_registers): Factor out code
11132 to handle individual registers into...
11133 (store_register): ... this new function.
11135 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11137 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11138 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11139 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11140 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11141 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11142 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11143 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11144 (srv_xmlfiles): Add new XML files.
11146 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11148 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11149 (init_registers_s390_linux32v1): Add prototype.
11150 (init_registers_s390_linux32v2): Likewise.
11151 (init_registers_s390_linux64v1): Likewise.
11152 (init_registers_s390_linux64v2): Likewise.
11153 (init_registers_s390x_linux64v1): Likewise.
11154 (init_registers_s390x_linux64v2): Likewise.
11155 (s390_num_regs): Increment to 52.
11156 (s390_regmap): Add orig_r2 register.
11157 (s390_num_regs_3264): Increment to 68.
11158 (s390_regmap_3264): Add orig_r2 register.
11159 (s390_collect_ptrace_register): Handle orig_r2 register.
11160 (s390_supply_ptrace_register): Likewise.
11161 (s390_fill_last_break): New function.
11162 (s390_store_last_break): Likewise.
11163 (s390_fill_system_call): New function.
11164 (s390_store_system_call): Likewise.
11165 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11167 (s390_check_regset): New function.
11168 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11169 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11170 Update target_regsets for available register sets.
11172 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11173 Jan Kratochvil <jan.kratochvil@redhat.com>
11175 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11176 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11178 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11179 * linux-low.h (struct process_info_private): New member r_debug.
11180 * server.c (handle_qxfer_libraries): Call
11181 the_target->qxfer_libraries_svr4.
11182 (handle_qxfer_libraries_svr4): New function.
11183 (qxfer_packets): New entry "libraries-svr4".
11184 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11185 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11186 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11187 PACKET_qXfer_libraries_svr4.
11189 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11191 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11192 PSW address/mask between 8-byte and 16-byte formats.
11193 (s390_supply_ptrace_register): Likewise.
11194 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11195 basic addressing mode bit.
11197 2011-11-24 Stan Shebs <stan@codesourcery.com>
11199 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11201 2011-11-17 Stan Shebs <stan@codesourcery.com>
11203 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11204 (tracing_start_time): New global.
11205 (tracing_stop_time): New global.
11206 (tracing_user_name): New global.
11207 (tracing_notes): New global.
11208 (tracing_stop_note): New global.
11209 (cmd_qtstart): Set traceframe_usage, start_time.
11210 (stop_tracing): Set stop_time.
11211 (cmd_qtstatus): Report additional status.
11212 (cmd_qtp): New function.
11213 (handle_tracepoint_query): Call it.
11214 (cmd_qtnotes): New function.
11215 (handle_tracepoint_general_set): Call it.
11216 (get_timestamp): Rename from tsv_get_timestamp.
11218 2011-11-14 Stan Shebs <stan@codesourcery.com>
11219 Kwok Cheung Yeung <kcy@codesourcery.com>
11221 * linux-x86-low.c (small_jump_insn): New.
11222 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11223 trampoline and error message, build a trampoline and issue a small
11224 jump instruction to it.
11225 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11226 trampoline and error message.
11227 (x86_get_min_fast_tracepoint_insn_len): New.
11228 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11229 * linux-low.h (struct linux_target_ops): Add arguments to
11230 install_fast_tracepoint_jump_pad operation, add new operation.
11231 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11233 (linux_get_min_fast_tracepoint_insn_len): New function.
11234 (linux_target_op): Add new operation.
11235 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11236 (gdb_trampoline_buffer_end): Ditto.
11237 (gdb_trampoline_buffer_error): Ditto.
11238 (struct ipa_sym_addresses): Add fields for new IPA variables.
11239 (symbol_list): Add entries for new IPA variables.
11240 (struct tracepoint): Add fields to hold the address range of the
11241 trampoline used by the tracepoint.
11242 (trampoline_buffer_head): New static variable.
11243 (trampoline_buffer_tail): Ditto.
11244 (claim_trampoline_space): New function.
11245 (have_fast_tracepoint_trampoline_buffer): New function.
11246 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11248 (install_fast_tracepoint): Ditto, also add error buffer argument.
11249 (cmd_qtminftpilen): New function.
11250 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11251 (fast_tracepoint_from_trampoline_address): New function.
11252 (fast_tracepoint_collecting): Handle trampoline as part of jump
11254 (set_trampoline_buffer_space): New function.
11255 (initialize_tracepoint): Initialize new IPA variables.
11256 * target.h (struct target_ops): Add arguments to
11257 install_fast_tracepoint_jump_pad operation, add new
11258 get_min_fast_tracepoint_insn_len operation.
11259 (target_get_min_fast_tracepoint_insn_len): New.
11260 (install_fast_tracepoint_jump_pad): Add arguments.
11261 * server.h (IPA_BUFSIZ): Define.
11262 * linux-i386-ipa.c: Include extra header files.
11263 (initialize_fast_tracepoint_trampoline_buffer): New function.
11264 (initialize_low_tracepoint): Call it.
11265 * server.h (set_trampoline_buffer_space): Declare.
11266 (claim_trampoline_space): Ditto.
11267 (have_fast_tracepoint_trampoline_buffer): Ditto.
11269 2011-11-14 Yao Qi <yao@codesourcery.com>
11271 * server.c (handle_query): Handle InstallInTrace for qSupported.
11272 * tracepoint.c (add_tracepoint): Sort list.
11273 (install_tracepoint, download_tracepoint): New.
11274 (cmd_qtdp): Call them to install and download tracepoints.
11275 (sort_tracepoints): Removed.
11276 (cmd_qtstart): Update.
11278 2011-11-14 Yao Qi <yao@codesourcery.com>
11280 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11281 * mem-break.h: Declare.
11282 * tracepoint.c (cmd_qtstart): Move some code to ...
11283 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11285 (download_tracepoints): Move some code to ...
11286 (download_tracepoint_1): ... here. New.
11288 2011-11-08 Yao Qi <yao@codesourcery.com>
11290 * remote-utils.c (relocate_instruction): A comment fix.
11292 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11294 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11295 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11296 dr_status_mirror and dr_control_mirror from debug_reg_state.
11297 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11298 (i386_initial_stuff): Remove use of deleted globals.
11299 (i386_get_thread_context, i386_set_thread_context,
11300 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11301 from debug_reg_state.
11303 2011-11-05 Yao Qi <yao@codesourcery.com>
11305 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11306 address as TPOINT's.
11308 2011-11-02 Stan Shebs <stan@codesourcery.com>
11310 * tracepoint.c (agent_mem_read_string): New function.
11311 (eval_agent_expr): Call it for tracenz.
11312 * server.c (handle_query): Report support for tracenz.
11314 2011-11-02 Yao Qi <yao@codesourcery.com>
11316 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11318 2011-11-02 Yao Qi <yao@codesourcery.com>
11320 * target.h: Fix a typo in comment.
11322 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11324 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11325 clobber the breakpoints' shadows with fast tracepoint jumps.
11326 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11327 * target.c (write_inferior_memory): Also pass MYADDR down to
11330 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11332 * configure.ac: Check support for personality routine.
11333 * configure: Regenerate.
11334 * config.in: Likewise.
11335 * linux-low.c: Include <sys/personality.h>.
11336 Define ADDR_NO_RANDOMIZE if necessary.
11337 (linux_create_inferior): Disable address space randomization when
11338 forking inferior, if requested.
11339 (linux_supports_disable_randomization): New function.
11340 (linux_target_ops): Install it.
11341 * server.h (disable_randomization): Declare.
11342 * server.c (disable_randomization): New global variable.
11343 (handle_general_set): Handle QDisableRandomization.
11344 (handle_query): Likewise for qSupported.
11345 (main): Support --disable-randomization and --no-disable-randomization
11346 command line arguments.
11347 * target.h (struct target_ops): Add supports_disable_randomization.
11348 (target_supports_disable_randomization): New macro.
11350 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11352 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11354 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11355 [!PT_GETDSBT] (target_loadmap): New definition.
11356 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11357 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11358 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11359 and PT_GETDSBT to LINUX_LOADMAP.
11360 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11361 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11363 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11365 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11366 (arm_linux_hwbp_cap): New static variable.
11367 (arm_linux_get_hwbp_cap): Replace by ...
11368 (arm_linux_init_hwbp_cap): ... this new function.
11369 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11370 (arm_linux_get_hw_watchpoint_count): Likewise.
11371 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11372 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11373 (arm_prepare_to_resume): Use perror_with_name instead of error.
11375 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11377 * linux-arm-low.c: Include <signal.h>.
11378 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11379 (struct arm_linux_hwbp_cap): New data type.
11380 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11381 (struct arm_linux_hw_breakpoint): New data type.
11382 (MAX_BPTS, MAX_WPTS): Define.
11383 (struct arch_process_info, struct arch_lwp_info): New data types.
11384 (arm_linux_get_hwbp_cap): New function.
11385 (arm_linux_get_hw_breakpoint_count): Likewise.
11386 (arm_linux_get_hw_watchpoint_count): Likewise.
11387 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11388 (arm_hwbp_control_initialize): Likewise.
11389 (arm_hwbp_control_is_enabled): Likewise.
11390 (arm_hwbp_control_is_initialized): Likewise.
11391 (arm_hwbp_control_disable): Likewise.
11392 (arm_linux_hw_breakpoint_equal): Likewise.
11393 (arm_linux_hw_point_initialize): Likewise.
11394 (struct update_registers_data): New data structure.
11395 (update_registers_callback: New function.
11396 (arm_insert_point): Likewise.
11397 (arm_remove_point): Likewise.
11398 (arm_stopped_by_watchpoint): Likewise.
11399 (arm_stopped_data_address): Likewise.
11400 (arm_new_process): Likewise.
11401 (arm_new_thread): Likewise.
11402 (arm_prepare_to_resume): Likewise.
11403 (the_low_target): Register arm_insert_point, arm_remove_point,
11404 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11405 arm_new_thread, and arm_prepare_to_resume.
11407 2011-09-15 Stan Shebs <stan@codesourcery.com>
11409 * server.h (struct emit_ops): Add compare-goto fields.
11410 * tracepoint.c (gdb_agent_op_sizes): New table.
11411 (emit_eq_goto): New function.
11412 (emit_ne_goto): New function.
11413 (emit_lt_goto): New function.
11414 (emit_le_goto): New function.
11415 (emit_gt_goto): New function.
11416 (emit_ge_goto): New function.
11417 (is_goto_target): New function.
11418 (compile_bytecodes): Recognize special cases of compare-goto
11419 combinations and call specialized emitters for them.
11420 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11421 (amd64_emit_ne_goto): New function.
11422 (amd64_emit_lt_goto): New function.
11423 (amd64_emit_le_goto): New function.
11424 (amd64_emit_gt_goto): New function.
11425 (amd64_emit_ge_goto): New function.
11426 (amd64_emit_ops): Add the new functions.
11427 (i386_emit_eq_goto): New function.
11428 (i386_emit_ne_goto): New function.
11429 (i386_emit_lt_goto): New function.
11430 (i386_emit_le_goto): New function.
11431 (i386_emit_gt_goto): New function.
11432 (i386_emit_ge_goto): New function.
11433 (i386_emit_ops): Add the new functions.
11435 2011-09-08 Stan Shebs <stan@codesourcery.com>
11437 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11438 (i386_emit_epilogue): Restore %ebx.
11440 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11442 * server.c (step_thread): Remove definition.
11443 (process_serial_event): Don't handle Hs.
11444 * server.h (step_thread): Remove declaration.
11445 * target.c (set_desired_inferior): Remove use of step_thread.
11447 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11449 * linux-low.c: Include linux-procfs.h.
11450 (linux_attach_lwp_1): Update comments.
11451 (linux_attach): Scan for existing threads when attaching to a
11452 process that is the tgid.
11453 * Makefile.in: Update dependencies.
11455 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11457 * configure.srv: Add linux-procfs.o dependencies.
11459 2011-08-14 Yao Qi <yao@codesourcery.com>
11461 * target.h (struct target_ops): Fix indent.
11462 * win32-low.c (win32_target_ops): Fix comment.
11464 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11465 Yao Qi <yao@codesourcery.com>
11467 * Makefile.in (clean): Remove tic6x-*.c files.
11468 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11469 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11470 (tic6x-c64xp-linux.c): Likewise.
11471 * configure.srv: Add support for tic6x-*-uclinux.
11472 * linux-tic6x-low.c: New.
11473 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11475 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11476 Yao Qi <yao@codesourcery.com>
11478 * target.h (struct target_ops): Add read_loadmap.
11479 * linux-low.c (struct target_loadseg): New type.
11480 (struct target_loadmap): New type.
11481 (linux_read_loadmap): New function.
11482 (linux_target_ops): Add linux_read_loadmap.
11483 * server.c (handle_query): Support qXfer:fdpic:read packet.
11484 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11487 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11489 * win32-low.c: Include <stdint.h>.
11491 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11493 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11494 to the inferior here.
11495 (i386_remove_aligned_watchpoint): Ditto.
11496 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11497 fit part of the watchpoint in the debug registers.
11498 (i386_update_inferior_debug_regs): New.
11499 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11500 registers, and only update the inferior on success.
11501 (i386_low_remove_watchpoint): Ditto.
11503 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11505 * linux-low.c (compare_ints, unique, list_threads, show_process,
11506 linux_core_of_thread): Delete.
11507 (linux_target_ops): Change linux_core_of_thread to
11508 linux_common_core_of_thread.
11509 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11510 * utils.c (malloc_failure): Change type of argument.
11511 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11512 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11513 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11514 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11515 (IPA_OBJS): Add common-utils-ipa.o.
11516 (ptid_h, linux_osdata_h): New macros.
11517 (server_h): Add common/common-utils.h, common/xml-utils.h,
11518 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11520 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11521 ptid.o, buffer.o): New rules.
11522 (linux-low.o): Add common/linux-osdata.h as a dependency.
11523 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11524 * configure.ac: Add AC_HEADER_DIRENT check.
11525 * config.in: Regenerate.
11526 * configure: Regenerate.
11527 * remote-utils.c (xml_escape_text): Delete.
11528 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11529 buffer_xml_printf): Move to common/buffer.c.
11530 * server.c (main): Remove call to initialize_inferiors.
11531 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11532 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11533 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11534 internal_error, gdb_assert, gdb_assert_fail): Delete.
11535 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11536 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11538 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11539 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11540 initialize_inferiors): Delete.
11542 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11544 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11547 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11549 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11551 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11553 2011-05-26 Yao Qi <yao@codesourcery.com>
11555 * Makefile.in (thread-db.o): Track dependence to
11556 common/gdb_thread_db.h.
11557 * thread-db.c: include gdb_thread_db.h from right place.
11559 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11561 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11562 __FILE__ and __LINE__ to internal_error.
11564 2011-05-13 Doug Evans <dje@google.com>
11566 * thread-db.c (try_thread_db_load_from_sdir): New function.
11567 (try_thread_db_load_from_dir): New function.
11568 (thread_db_load_search): Handle $sdir, ignore $pdir.
11569 Remove trying of system directories if search of
11570 libthread-db-search-path fails, that is now done via $sdir.
11572 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11574 * server.c (handle_query): Add EnableDisableTracepoints to the list
11575 of supported features.
11576 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11578 (cmd_qtenable_disable): New.
11579 (cmd_qtstart): Install tracepoints even if disabled.
11580 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11581 receiving a QTEnable or QTDisable packet.
11582 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11583 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11585 (gdb_probe): Skip data collection if static tracepoint is disabled.
11587 2011-05-10 Doug Evans <dje@google.com>
11589 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11591 2011-05-04 Doug Evans <dje@google.com>
11593 * linux-low.c (linux_join): Skip process lookup.
11594 * spu-low.c (spu_join): Ditto.
11595 * server.c (join_inferiors_callback): Delete.
11596 (process_serial_event): For 'D' packet (detach) call join_inferior
11599 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11601 * README: Don't mention xscale*-*-linux*.
11602 * configure.srv (xscale*-*-linux*): Don't handle target.
11604 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11606 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11608 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11609 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11610 (i386_emit_void_call_2): Likewise.
11612 2011-04-26 Yao Qi <yao@codesourcery.com>
11614 * linux-low.c: Move common macros to linux-ptrace.h.
11615 Include linux-ptrace.h.
11616 * Makefile.in (linux_ptrace_h): New.
11617 (linux-low.o): Depends on linux-ptrace.h.
11619 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11621 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11622 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11623 (remote_prepare): New function with most of the TCP code from ...
11624 (remote_open): ... here. Detect PORT here unconditionally. Move also
11625 setting transport_is_reliable.
11626 * server.c (run_once): New variable.
11627 (gdbserver_usage): Document it.
11628 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11629 the first run if RUN_ONCE.
11630 * server.h (run_once, remote_prepare): New declarations.
11632 2011-04-19 Tom Tromey <tromey@redhat.com>
11634 * win32-low.c (handle_load_dll): Remove duplicate "the".
11636 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11638 Remove support for old Cygwin 1.5 versions.
11639 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11640 function to avoid warning.
11641 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11644 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11646 * gdbserver/server.h (Macro _): Define it if not available.
11648 2011-03-14 Michael Snyder <msnyder@vmware.com>
11650 * hostio.c (handle_close): Remove unnecessary null test.
11652 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11654 * Makefile.in (maintainer-clean realclean distclean): Remove
11655 "make ... subdir_do" command.
11657 2011-03-10 Michael Snyder <msnyder@vmware.com>
11659 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11661 * server.c (handle_v_run): Free alloced buffer on early return.
11663 2011-03-09 Yao Qi <yao@codesourcery.com>
11666 2011-03-04 Yao Qi <yao@codesourcery.com>
11668 * Makefile.in: Remove GNU make feature --directory.
11670 2011-03-05 Yao Qi <yao@codesourcery.com>
11672 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11673 (subdir_do): New make target. Copied from gdb/Makefile.
11674 (maintainer-clean, realclean, distclean, clean): Call corresponding
11675 make targets in common/Makefile.
11677 2011-02-11 Yao Qi <yao@codesourcery.com>
11679 * configure.ac: Call AC_PROG_RANLIB.
11680 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11681 * configure: Regenerate.
11683 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11685 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11687 2011-03-06 Yao Qi <yao@codesourcery.com>
11689 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11691 2011-03-05 Yao Qi <yao@codesourcery.com>
11693 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11694 (subdir_do): New make target. Copied from gdb/Makefile.
11695 (maintainer-clean, realclean, distclean, clean): Call corresponding
11696 make targets in common/Makefile.
11698 2011-03-04 Yao Qi <yao@codesourcery.com>
11700 * Makefile.in: Remove GNU make feature --directory.
11702 2011-03-04 Michael Snyder <msnyder@vmware.com>
11704 * server.c (queue_stop_reply): Call xmalloc not malloc.
11706 2011-03-02 Michael Snyder <msnyder@vmware.com>
11708 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11710 2011-02-28 Michael Snyder <msnyder@vmware.com>
11712 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11713 (cmd_qtframe): Ditto.
11714 (cmd_qtbuffer): Ditto.
11715 (cmd_bigqtbuffer): Ditto.
11717 * utils.c (decimal2str): Initialize 'width' to nine, then
11718 don't mess with it.
11720 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11722 * hostio.c (require_data): Free *data, not data.
11724 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11726 * hostio.c (require_data): Use free, not xfree.
11728 2011-02-27 Michael Snyder <msnyder@vmware.com>
11730 * server.c (handle_query): Discard unused value.
11732 * hostio.c (require_data): Free malloc memory before returning
11735 2011-02-26 Michael Snyder <msnyder@vmware.com>
11737 * linux-low.c (list_threads): Call closedir for dirent.
11739 2011-02-27 Michael Snyder <msnyder@vmware.com>
11741 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11742 a case statement falls through.
11744 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11746 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11749 2011-02-26 Michael Snyder <msnyder@vmware.com>
11751 * utils.c (decimal2str): Eliminate dead code and dead param.
11752 (pulongest): Drop dead param from call to decimal2str.
11755 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11757 Revert the following patch (not approved yet):
11758 2011-02-21 Hui Zhu <teawater@gmail.com>
11759 * tracepoint.c (tp_printf): New function.
11760 (eval_agent_expr): Handle gdb_agent_op_printf.
11762 2011-02-21 Hui Zhu <teawater@gmail.com>
11764 * tracepoint.c (tp_printf): New function.
11765 (eval_agent_expr): Handle gdb_agent_op_printf.
11767 2011-02-18 Tom Tromey <tromey@redhat.com>
11769 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11770 (tracepoint.o): Likewise.
11771 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11772 (gdb_agent_op_names): Likewise.
11774 2011-02-18 Tom Tromey <tromey@redhat.com>
11776 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11777 gdb_agent_op_rot>: New constants.
11778 (gdb_agent_op_names): Add pick and roll.
11779 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11782 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11784 * aclocal.m4: Regenerated with aclocal-1.11.1.
11786 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11788 * server.c (handle_qxfer_traceframe_info): New.
11789 (qxfer_packets): Register "traceframe-info".
11790 (handle_query): Report support for qXfer:traceframe-info:read+.
11791 * tracepoint.c (match_blocktype): New.
11792 (traceframe_find_block_type): Rename to ...
11793 (traceframe_walk_blocks): ... this. Add callback filter argument,
11795 (traceframe_find_block_type): New, reimplemented on top of
11796 traceframe_walk_blocks.
11797 (build_traceframe_info_xml): New.
11798 (traceframe_read_info): New.
11799 * server.h (traceframe_read_info): Declare.
11801 2011-02-11 Yao Qi <yao@codesourcery.com>
11803 * configure.ac: Call AC_PROG_RANLIB.
11804 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11805 * configure: Regenerate.
11807 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11809 * server.c (gdb_read_memory): Change return semantics to allow
11811 (handle_search_memory_1): Adjust.
11812 (process_serial_event) <'m' packet>: Handle partial transfers.
11813 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11815 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11817 * regcache.c (init_register_cache): Initialize
11818 regcache->register_status.
11819 (free_register_cache): Release regcache->register_status.
11820 (regcache_cpy): Copy register_status.
11821 (registers_to_string): Print 'x's for unavailable registers.
11822 (supply_register): Mark the register's status valid or
11823 unavailable, depending on whether a buffer was passed in or not.
11824 (supply_register_zeroed): New.
11825 (supply_regblock): Mark the registers' status valid or
11826 unavailable, depending on whether a buffer was passed in or not.
11827 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11828 (struct regcache): New `register_status' field.
11829 (supply_register_zeroed): Declare.
11830 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11831 supply_register_zeroed, rather than passing a NULL buffer to
11833 * tracepoint.c (fetch_traceframe_registers): Update comment.
11835 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11837 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11840 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11842 * server.h (decode_xfer_write): Change prototype.
11843 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11844 and don't extract the annex here.
11845 * server.c (decode_xfer_read): Remove `annex' parameter,
11846 and don't extract the annex here.
11847 (decode_xfer): New.
11848 (struct qxfer): New.
11849 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11850 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11851 (handle_qxfer_statictrace): New functions, abstracted out from
11852 handle_query, and made to use the struct qxfer interface.
11853 (handle_threads_qxfer_proper): Rename to ...
11854 (handle_qxfer_threads_proper): ... this.
11855 (handle_threads_qxfer): Rename to ...
11856 (handle_qxfer_threads): ... this. Adjust.
11857 (qxfer_packets): New array.
11858 (handle_qxfer): New function.
11859 (handle_query): Use handle_qxfer.
11861 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11863 * gdbreplay.c: Shorten lines of >= 80 columns.
11864 * linux-low.c: Ditto.
11865 * linux-ppc-low.c: Ditto.
11866 * linux-s390-low.c: Ditto.
11867 * linux-sparc-low.c: Ditto.
11868 * linux-x86-low.c: Ditto.
11869 * linux-xtensa-low.c: Ditto.
11870 * mem-break.c: Ditto.
11871 * nto-low.c: Ditto.
11872 * regcache.h: Ditto.
11873 * remote-utils.c: Ditto.
11876 * thread-db.c: Ditto.
11877 * tracepoint.c: Ditto.
11879 * win32-low.h: Ditto.
11881 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11883 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11886 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11888 * server.c (gdbserver_version): Update copyright year in version
11890 * gdbreplay.c (gdbreplay_version): Ditto.
11892 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11894 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11895 * linux-bfin-low.c: New file.
11896 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11897 PT_DATA_ADDR for BFIN targets.
11898 * Makefile.in (SFILES): Add linux-bfin-low.c.
11899 (clean): Remove reg-bfin.c.
11900 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11901 * README: Mention supported Blackfin targets.
11903 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11905 * .gitignore: New file.
11907 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11909 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11911 2010-10-22 Jie Zhang <jie@codesourcery.com>
11913 * Makefile.in: Add FLAGS_TO_PASS variable.
11914 (install): Remove dependency of install-only and recursively
11915 invoke make for install-only.
11917 2010-10-04 Doug Evans <dje@google.com>
11919 * Makefile.in (uninstall): Use $(DESTDIR).
11921 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11925 * linux-x86-low.c (compat_siginfo_from_siginfo)
11926 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11927 si_code is < 0. Check for si_code == SI_TIMER before checking for
11930 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11932 * lynx-i386-low.c: New file.
11933 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11935 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11937 * lynx-low.c (ptrace_request_to_str): Remove handling for
11938 request values that have been removed in LynxOS 5.x.
11940 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11942 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11945 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11947 * configure.ac: Add --enable-inprocess-agent option.
11948 * configure: Rebuilt.
11950 2010-09-06 Yao Qi <yao@codesourcery.com>
11952 * linux-low.c (linux_kill): Remove unused variable.
11953 (linux_stabilize_threads): Likewise.
11954 * server.c (start_inferior): Likewise.
11955 (queue_stop_reply_callback): Likewise.
11956 * tracepoint.c (do_action_at_tracepoint): Likewise.
11958 2010-09-06 Yao Qi <yao@codesourcery.com>
11960 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11963 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11965 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11967 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11969 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11972 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11974 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11975 gdbserver/lynx-ppc-low.c: New files.
11976 * Makefile.in (lynx_low_h): New variable.
11977 (lynx-low.o, lynx-ppc-low.o): New rules.
11978 * configure.ac: On LynxOS, link with -lnetinet.
11979 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11980 * configure: regenerate.
11982 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11984 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11985 * configure.ac: Add check for vasprintf and vsnprintf.
11986 * configure, config.in: Regenerate.
11987 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11989 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11991 * gdbreplay.c: Move include of alloca.h up, next to include of
11993 * server.h: Add include of malloc.h.
11994 * mem-break.c: Remove include of malloc.h.
11995 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11997 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11999 * Makefile.in (memmem.o): Build with -Wno-error.
12001 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12003 * utils.c (xsnprintf): Make non-static.
12004 * server.h: Add xsnprintf declaration.
12005 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12006 replace calls to snprintf by calls to xsnprintf throughout.
12008 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12010 * configure.ac: Add configure check for alloca.
12011 * configure, config.in: Regenerate.
12012 * server.h: Include alloca.h if it exists.
12013 * gdbreplay.c: Include alloca.h if it exists.
12015 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12017 * linux-low.c (__SIGRTMIN): Define if not already defined.
12018 (linux_create_inferior): Check for __ANDROID__ rather than
12020 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12021 are already deferred.
12022 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12023 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12024 stopped and already has a pending signal to report.
12025 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12026 a pending signal to report or is moving out of a jump pad.
12027 (linux_init_signals): Check for __ANDROID__ rather than
12030 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12032 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12033 debug_threads check. Avoid a linear search when not doing debug
12036 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12038 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12039 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12040 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12041 (process_event): Change local fd's type to gdb_fildes_t.
12042 (create_file_handler): Adjust prototype.
12043 (delete_file_handler): Adjust prototype.
12044 (handle_file_event): Adjust prototype. Use pfildes.
12045 (create_file_event): Adjsut prototype.
12046 * remote-utils.c (remote_desc, listen_desc): Change type to
12048 * server.h: New gdb_fildes_t typedef.
12049 [USE_WIN32API]: Include winsock2.h.
12050 (delete_file_handler, add_file_handler): Adjust prototypes.
12051 (pfildes): Declare.
12052 * utils.c (pfildes): New.
12054 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12056 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12057 * configure: Regenerate.
12059 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12061 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12062 (linux_done_accessing_memory): ... this.
12063 (linux_target_ops): Adjust.
12064 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12065 * nto-low.c (nto_target_ops): Adjust comment.
12066 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12067 * spu-low.c (spu_target_ops): Adjust comment.
12068 * target.h (target_ops): Rename unprepare_to_access_memory field
12069 to done_accessing_memory.
12070 (unprepare_to_access_memory): Rename to ...
12071 (done_accessing_memory): ... this.
12073 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12075 * linux-low.c (linux_prepare_to_access_memory): New.
12076 (linux_unprepare_to_access_memory): New.
12077 (linux_target_ops): Install them.
12078 * server.c (read_memory): Rename to ...
12079 (gdb_read_memory): ... this. Use
12080 prepare_to_access_memory/prepare_to_access_memory.
12081 (write_memory): Rename to ...
12082 (gdb_write_memory): ... this. Use
12083 prepare_to_access_memory/prepare_to_access_memory.
12084 (handle_search_memory_1): Adjust.
12085 (process_serial_event): Adjust.
12086 * target.h (struct target_ops): New fields
12087 prepare_to_access_memory and unprepare_to_access_memory.
12088 (prepare_to_access_memory, unprepare_to_access_memory): New.
12089 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12090 prepare_to_access_memory/prepare_to_access_memory.
12091 * nto-low.c (nto_target_ops): Adjust.
12092 * spu-low.c (spu_target_ops): Adjust.
12093 * win32-low.c (win32_target_ops): Adjust.
12095 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12097 * Makefile.in (WARN_CFLAGS): Get it from configure.
12098 (WERROR_CFLAGS): New.
12099 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12100 * configure.ac: Introduce --enable-werror, which adds -Werror to
12101 the compiler command line. Enabled by default. Disable with
12102 --disable-werror. Add -Wdeclaration-after-statement
12103 Wpointer-arith and -Wformat-nonliteral to warning flags.
12104 * configure: Regenerate.
12106 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12108 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12110 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12112 * gdbreplay.c (remote_error): New.
12114 (expect): Use gdbchar. Check for error reading from GDB.
12115 Clarify sync error output.
12116 (play): Check for errors writing to GDB.
12117 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12118 * remote-utils.c (getpkt): Check for errors writing to the remote
12121 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12123 * linux-low.c (linux_wait_1): Move non-debugging code out of
12124 `debug_threads' control.
12126 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12128 * linux-low.c (linux_wait_1): Don't set last_status here.
12129 * server.c (push_event, queue_stop_reply_callback): Assert we're
12130 not pushing a TARGET_WAITKIND_IGNORE event.
12131 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12132 (myresume, handle_target_event): Set the thread's last_resume_kind
12133 and last_status from the target returned status.
12135 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12139 * linux-x86-low.c (update_debug_registers_callback): New.
12140 (i386_dr_low_set_addr): Use it.
12141 (i386_dr_low_get_addr): New.
12142 (i386_dr_low_set_control): Use update_debug_registers_callback.
12143 (i386_dr_low_get_control): New.
12144 (i386_dr_low_get_status): Adjust.
12145 * linux-low.c (linux_stop_lwp): New.
12146 * linux-low.h (linux_stop_lwp): Declare.
12148 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12149 argument instead of a i386_debug_reg_state.
12150 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12151 a i386_debug_reg_state.
12152 (i386_insert_aligned_watchpoint): Adjust.
12153 (i386_remove_aligned_watchpoint): Adjust.
12154 (i386_low_stopped_data_address): Read the debug registers from the
12155 inferior instead of from the mirrors.
12156 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12157 (i386_dr_low_get_addr): Declare.
12158 (i386_dr_low_get_control): Declare.
12159 (i386_dr_low_get_status): Change prototype.
12161 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12162 (i386_dr_low_get_addr): New.
12163 (i386_dr_low_get_control): New.
12164 (i386_dr_low_get_status): Adjust prototype. Return
12166 (i386_initial_stuff): Clear dr_status_mirror and
12168 (i386_get_thread_context): Adjust.
12169 (i386_set_thread_context): Adjust.
12170 (i386_thread_added): Adjust.
12172 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12174 * linux-low.h (linux_thread_area): Delete declaration.
12176 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12178 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12179 after its termination.
12181 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12183 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12184 (gdb_wants_all_stopped): Delete.
12185 (linux_wait_1): Don't call them.
12186 * server.c (handle_v_cont): Tag all threads as want-stopped.
12187 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12188 stopped as "client-wants-stopped".
12190 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12192 * Makefile.in (signals_h): New.
12193 (server_h): Depend on it.
12194 (server.o): Don't depend on $(signals_def).
12195 (signals.o): Depend on $(signals_def).
12197 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12199 * Makefile.in (signals_def): New.
12200 (server_h): Append include/gdb/signals.h and signals_def.
12201 (server.o): Append signals_def.
12203 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12205 * server.c (handle_target_event): Use target_signal_to_host for
12206 resume_info.sig initialization.
12207 * target.h (struct thread_resume) <sig>: New comment.
12209 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12211 * server.c (handle_query): strcpy() the returned string from paddress()
12212 instead of sprintf().
12213 * utils.c (paddress): Return phex_nz().
12215 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12217 * server.c (handle_v_cont): Call mourn_inferior if process
12219 (myresume): Likewise.
12221 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12223 Static tracepoints, and integration with UST.
12225 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12226 * mem-break.c (uninsert_all_breakpoints)
12227 (reinsert_all_breakpoints): New.
12228 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12229 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12230 (gdb_agent_ust_loaded, helper_thread_id)
12231 (gdb_agent_helper_thread_id): New macros.
12232 (struct ipa_sym_addresses): Add addr_ust_loaded,
12233 addr_helper_thread_id, addr_cmd_buf.
12234 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12235 (in_process_agent_loaded_ust): New.
12236 (write_e_ust_not_loaded): New.
12237 (maybe_write_ipa_ust_not_loaded): New.
12238 (struct collect_static_trace_data_action): New.
12239 (enum tracepoint_type) <static_tracepoint>: New.
12240 (struct tracepoint) <handle>: Mention static tracepoints.
12241 (struct static_tracepoint_ctx): New.
12242 (CMD_BUF_SIZE): New.
12243 (add_tracepoint_action): Handle static tracepoint actions.
12244 (unprobe_marker_at): New.
12245 (clear_installed_tracepoints): Handle static tracepoints.
12246 (cmd_qtdp): Handle static tracepoints.
12247 (probe_marker_at): New.
12248 (cmd_qtstart): Handle static tracepoints.
12249 (response_tracepoint): Handle static tracepoints.
12250 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12251 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12252 (get_context_regcache): Handle static tracepoints.
12253 (do_action_at_tracepoint): Handle static tracepoint actions.
12254 (traceframe_find_block_type): Handle static trace data blocks.
12255 (traceframe_read_sdata): New.
12256 (download_tracepoints): Download static tracepoint actions.
12257 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12258 (GDB_PROBE_NAME): New.
12260 (GET_UST_SYM): New.
12263 (ust_marker_to_static_tracepoint): New.
12265 (collect_ust_data_at_tracepoint): New.
12266 (gdb_ust_probe): New.
12267 (UNIX_PATH_MAX, SOCK_DIR): New.
12268 (gdb_ust_connect_sync_socket): New.
12269 (resume_thread, stop_thread): New.
12270 (run_inferior_command): New.
12271 (init_named_socket): New.
12272 (gdb_ust_socket_init): New.
12273 (cstr_to_hexstr): New.
12275 (first_marker, next_marker): New.
12276 (response_ust_marker): New.
12277 (cmd_qtfstm, cmd_qtsstm): New.
12278 (unprobe_marker_at, probe_marker_at): New.
12279 (cmd_qtstmat, gdb_ust_thread): New.
12280 (gdb_ust_init): New.
12281 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12282 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12283 (ST_REGENTRY): New.
12284 (x86_64_st_collect_regmap): New.
12285 (X86_64_NUM_ST_COLLECT_GREGS): New.
12286 (AMD64_RIP_REGNUM): New.
12287 (supply_static_tracepoint_registers): New.
12288 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12289 (ST_REGENTRY): New.
12290 (i386_st_collect_regmap): New.
12291 (i386_NUM_ST_COLLECT_GREGS): New.
12292 (supply_static_tracepoint_registers): New.
12293 * server.c (handle_query): Handle qXfer:statictrace:read.
12294 <qSupported>: Report support for StaticTracepoints, and
12295 qXfer:statictrace:read features.
12296 * server.h (traceframe_read_sdata)
12297 (supply_static_tracepoint_registers): Declare.
12298 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12299 (unpack_varlen_hex): Include in IPA build.
12300 * Makefile.in (ustlibs, ustinc): New.
12301 (IPA_OBJS): Add remote-utils-ipa.o.
12302 ($(IPA_LIB)): Link -ldl and -lpthread.
12304 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12305 * config.in, configure: Regenerate.
12307 2010-06-20 Ian Lance Taylor <iant@google.com>
12308 Pedro Alves <pedro@codesourcery.com>
12310 * linux-x86-low.c (always_true): Delete.
12311 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12312 trying to fool the compiler with always_true.
12314 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12316 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12317 conditions in gdbserver.
12319 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12321 * spu-low.c (spu_read_memory): Wrap around local store limit.
12322 (spu_write_memory): Likewise.
12324 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12326 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12327 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12329 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12331 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12332 uses with LONGEST uses.
12334 2010-06-14 Stan Shebs <stan@codesourcery.com>
12335 Pedro Alves <pedro@codesourcery.com>
12339 * linux-x86-low.c: Include limits.h.
12341 (always_true): New.
12344 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12345 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12346 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12347 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12348 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12349 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12350 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12351 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12352 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12353 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12354 (amd64_emit_void_call_2): New.
12355 (amd64_emit_ops): New.
12356 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12357 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12358 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12359 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12360 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12361 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12362 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12363 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12364 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12365 (i386_emit_stack_adjust, i386_emit_int_call_1)
12366 (i386_emit_void_call_2): New.
12367 (i386_emit_ops): New.
12368 (x86_emit_ops): New.
12369 (the_low_target): Install x86_emit_ops.
12370 * server.h (struct emit_ops): New.
12371 (get_raw_reg_func_addr): Declare.
12372 (current_insn_ptr, emit_error): Declare.
12373 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12374 (set_trace_state_variable_value): New defines.
12375 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12376 addr_get_trace_state_variable_value and
12377 addr_set_trace_state_variable_value.
12378 (symbol_list): New fields for get_raw_reg,
12379 get_trace_state_variable_value and set_trace_state_variable_value.
12380 (condfn): New typedef.
12381 (struct tracepoint): New field `compiled_cond'.
12382 (do_action_at_tracepoint): Clear compiled_cond.
12383 (get_trace_state_variable_value, set_trace_state_variable_value):
12385 (condition_true_at_tracepoint): If there's a compiled condition,
12387 (current_insn_ptr, emit_error): New globals.
12388 (struct bytecode_address): New.
12389 (get_raw_reg_func_addr): New.
12390 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12391 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12392 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12393 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12394 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12395 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12396 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12397 (compile_tracepoint_condition, compile_bytecodes): New.
12398 * target.h (emit_ops): Forward declare.
12399 (struct target_ops): New field emit_ops.
12400 (target_emit_ops): New.
12401 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12402 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12403 * linux-low.c (linux_emit_ops): New.
12404 (linux_target_ops): Install it.
12405 * linux-low.h (struct linux_target_ops): New field emit_ops.
12407 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12409 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12410 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12412 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12413 Stan Shebs <stan@codesourcery.com>
12415 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12416 (all): Depend on $(extra_libraries).
12417 (install-only): Install the IPA.
12418 (IPA_OBJS, IPA_LIB): New.
12419 (clean): Remove the IPA lib.
12420 (IPAGENT_CFLAGS): New.
12421 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12422 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12423 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12424 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12425 * configure.ac: Check for atomic builtins support in the compiler.
12426 (IPA_DEPFILES, extra_libraries): Define.
12427 * configure.srv (ipa_obj): Add description.
12428 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12429 (i[34567]86-*-linux*): Set ipa_obj.
12430 (x86_64-*-linux*): Set ipa_obj.
12431 * linux-low.c (stabilizing_threads): New.
12432 (supports_fast_tracepoints): New.
12433 (linux_detach): Stabilize threads before detaching.
12434 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12435 the lwp is either not stabilizing, or is moving out of a jump pad.
12436 (linux_fast_tracepoint_collecting): New.
12437 (maybe_move_out_of_jump_pad): New.
12438 (enqueue_one_deferred_signal): New.
12439 (dequeue_one_deferred_signal): New.
12440 (linux_wait_for_event_1): If moving out of a jump pad, defer
12441 pending signals to later.
12442 (linux_stabilize_threads): New.
12443 (linux_wait_1): Check if threads need moving out of jump pads, and
12445 (stuck_in_jump_pad_callback): New.
12446 (move_out_of_jump_pad_callback): New.
12447 (lwp_running): New.
12448 (linux_resume_one_lwp): Handle moving out of jump pads.
12449 (linux_set_resume_request): Dequeue deferred signals.
12450 (need_step_over_p): Also step over fast tracepoint jumps.
12451 (start_step_over): Also uninsert fast tracepoint jumps.
12452 (finish_step_over): Also reinsert fast tracepoint jumps.
12453 (linux_install_fast_tracepoint_jump): New.
12454 (linux_target_ops): Install linux_stabilize_threads and
12455 linux_install_fast_tracepoint_jump_pad.
12456 * linux-low.h (linux_target_ops) <get_thread_area,
12457 install_fast_tracepoint_jump_pad>: New fields.
12458 (struct lwp_info) <collecting_fast_tracepoint,
12459 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12460 (linux_get_thread_area): Declare.
12461 * linux-x86-low.c (jump_insn): New.
12462 (x86_get_thread_area): New.
12463 (append_insns): New.
12464 (push_opcode): New.
12465 (amd64_install_fast_tracepoint_jump_pad): New.
12466 (i386_install_fast_tracepoint_jump_pad): New.
12467 (x86_install_fast_tracepoint_jump_pad): New.
12468 (the_low_target): Install x86_get_thread_area and
12469 x86_install_fast_tracepoint_jump_pad.
12470 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12471 (struct fast_tracepoint_jump): New.
12472 (fast_tracepoint_jump_insn): New.
12473 (fast_tracepoint_jump_shadow): New.
12474 (find_fast_tracepoint_jump_at): New.
12475 (fast_tracepoint_jump_here): New.
12476 (delete_fast_tracepoint_jump): New.
12477 (set_fast_tracepoint_jump): New.
12478 (uninsert_fast_tracepoint_jumps_at): New.
12479 (reinsert_fast_tracepoint_jumps_at): New.
12480 (set_breakpoint_at): Use write_inferior_memory.
12481 (uninsert_raw_breakpoint): Use write_inferior_memory.
12482 (check_mem_read): Mask out fast tracepoint jumps.
12483 (check_mem_write): Mask out fast tracepoint jumps.
12484 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12485 (set_fast_tracepoint_jump): Declare.
12486 (delete_fast_tracepoint_jump)
12487 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12488 (reinsert_fast_tracepoint_jumps_at): Declare.
12489 * regcache.c: Don't compile many functions when building the
12490 in-process agent library.
12491 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12492 the register buffer in the heap.
12493 (free_register_cache): If the register buffer isn't owned by the
12494 regcache, don't free it.
12495 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12496 pre-existing register caches.
12497 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12499 (convert_ascii_to_int): : Constify `from' parameter type.
12500 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12501 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12502 the needed buffer in-place.
12503 (relocate_instruction): New.
12504 * server.c (handle_query) <qSymbols>: If the target supports
12505 tracepoints, give it a chance of looking up symbols. Report
12506 support for fast tracepoints.
12507 (handle_status): Stabilize threads.
12508 (process_serial_event): Adjust.
12509 * server.h (struct fast_tracepoint_jump): Forward declare.
12510 (struct process_info) <fast_tracepoint_jumps>: New field.
12511 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12512 (decode_X_packet, decode_M_packet): Adjust.
12513 (relocate_instruction): Declare.
12514 (in_process_agent_loaded): Declare.
12515 (tracepoint_look_up_symbols): Declare.
12516 (struct fast_tpoint_collect_status): Declare.
12517 (fast_tracepoint_collecting): Declare.
12518 (force_unlock_trace_buffer): Declare.
12519 (handle_tracepoint_bkpts): Declare.
12520 (initialize_low_tracepoint)
12521 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12522 * target.h (struct target_ops) <stabilize_threads,
12523 install_fast_tracepoint_jump_pad>: New fields.
12524 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12525 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12526 [HAVE_STDINT_H]: Include stdint.h.
12527 (trace_debug_1): Rename to ...
12528 (trace_vdebug): ... this.
12529 (trace_debug): Rename to ...
12530 (trace_debug_1): ... this. Add `level' parameter.
12531 (trace_debug): New.
12532 (ATTR_USED, ATTR_NOINLINE): New.
12533 (IP_AGENT_EXPORT): New.
12534 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12535 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12536 (about_to_request_buffer_space, trace_buffer_is_full)
12537 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12538 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12539 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12540 (traceframe_write_count, traceframes_created)
12541 (trace_state_variables)
12542 New renaming defines.
12543 (struct ipa_sym_addresses): New.
12544 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12545 (symbol_list): New.
12546 (ipa_sym_addrs): New.
12547 (all_tracepoint_symbols_looked_up): New.
12548 (in_process_agent_loaded): New.
12549 (write_e_ipa_not_loaded): New.
12550 (maybe_write_ipa_not_loaded): New.
12551 (tracepoint_look_up_symbols): New.
12552 (debug_threads) [IN_PROCESS_AGENT]: New.
12553 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12554 (UNKNOWN_SIDE_EFFECTS): New.
12555 (stop_tracing): New.
12556 (flush_trace_buffer): New.
12557 (stop_tracing_bkpt): New.
12558 (flush_trace_buffer_bkpt): New.
12559 (read_inferior_integer): New.
12560 (read_inferior_uinteger): New.
12561 (read_inferior_data_pointer): New.
12562 (write_inferior_data_pointer): New.
12563 (write_inferior_integer): New.
12564 (write_inferior_uinteger): New.
12565 (struct collect_static_trace_data_action): Delete.
12566 (enum tracepoint_type): New.
12567 (struct tracepoint) <type>: New field `type'.
12568 <actions_str, step_actions, step_actions_str>: Only include in
12570 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12571 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12572 (tracepoints): Use IP_AGENT_EXPORT.
12573 (last_tracepoint): Don't include in the IPA.
12574 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12575 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12576 (alloced_trace_state_variables): New.
12577 (trace_state_variables): Use IP_AGENT_EXPORT.
12578 (traceframe_t): Delete unused variable.
12579 (circular_trace_buffer): Don't include in the IPA.
12580 (trace_buffer_start): Delete.
12581 (struct trace_buffer_control): New.
12582 (trace_buffer_free): Delete.
12583 (struct ipa_trace_buffer_control): New.
12584 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12585 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12587 (trace_buffer_ctrl): New.
12588 (TRACE_BUFFER_CTRL_CURR): New.
12589 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12590 Reimplement as macros.
12591 (trace_buffer_wrap): Delete.
12592 (traceframe_write_count, traceframe_read_count)
12593 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12594 (struct tracepoint_hit_ctx) <type>: New field.
12595 (struct fast_tracepoint_ctx): New.
12596 (memory_barrier): New.
12598 (record_tracepoint_error): Update atomically in the IPA.
12599 (clear_inferior_trace_buffer): New.
12600 (about_to_request_buffer_space): New.
12601 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12602 updating the same buffer.
12603 (add_tracepoint): Default the tracepoint's type to trap
12604 tracepoint, and orig_size to -1.
12605 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12606 internal variables.
12607 (create_trace_state_variable): New parameter `gdb'. Handle it.
12608 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12609 (cmd_qtdp): Handle fast tracepoints.
12610 (cmd_qtdv): Adjust.
12611 (max_jump_pad_size): New.
12612 (gdb_jump_pad_head): New.
12613 (get_jump_space_head): New.
12614 (claim_jump_space): New.
12615 (sort_tracepoints): New.
12616 (MAX_JUMP_SIZE): New.
12617 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12619 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12620 support. Upload fast traceframes, and delete internal IPA
12622 (stop_tracing_handler): New.
12623 (flush_trace_buffer_handler): New.
12624 (cmd_qtstop): Upload fast tracepoints.
12625 (response_tracepoint): Handle fast tracepoints.
12626 (tracepoint_finished_step): Upload fast traceframes. Set the
12627 tracepoint hit context's tracepoint type.
12628 (handle_tracepoint_bkpts): New.
12629 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12630 type. Add comment about fast tracepoints.
12631 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12632 non-existing action_str field.
12633 (get_context_regcache): Handle fast tracepoints.
12634 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12636 (fast_tracepoint_from_jump_pad_address): New.
12637 (fast_tracepoint_from_ipa_tpoint_address): New.
12638 (collecting_t): New.
12639 (force_unlock_trace_buffer): New.
12640 (fast_tracepoint_collecting): New.
12642 (gdb_collect): New.
12643 (write_inferior_data_ptr): New.
12644 (target_tp_heap): New.
12645 (target_malloc): New.
12646 (download_agent_expr): New.
12648 (download_tracepoints): New.
12649 (download_trace_state_variables): New.
12650 (upload_fast_traceframes): New.
12651 (IPA_FIRST_TRACEFRAME): New.
12652 (IPA_NEXT_TRACEFRAME_1): New.
12653 (IPA_NEXT_TRACEFRAME): New.
12654 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12655 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12656 (gdb_jump_pad_buffer_end): New.
12657 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12658 (initialize_tracepoint): Adjust.
12659 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12660 buffer. Initialize the low module.
12661 * utils.c (PREFIX, TOOLNAME): New.
12662 (malloc_failure): Use PREFIX.
12663 (error): In the IPA, an error causes an exit.
12664 (fatal, warning): Use PREFIX.
12665 (internal_error): Use TOOLNAME.
12666 (NUMCELLS): Increase to 10.
12667 * configure, config.in: Regenerate.
12669 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12671 * server.c (handle_query) <qSupported>: Do two passes over the
12672 qSupported string to avoid nesting strtok.
12674 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12676 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12678 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12679 -Wl,--dynamic-list.
12680 * configure: Regenerate.
12681 * proc-service.list: New.
12683 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12685 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12688 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12690 * gdbreplay.c (remote_open): Check error return from socket() call by
12691 its equality to -1 not by it being negative.
12692 * remote-utils.c (remote_open): Likewise.
12694 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12696 * config.h: Regenerate.
12698 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12700 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12701 doesn't provide PTRACE_GET_THREAD_AREA.
12703 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12705 * linux-m68k-low.c: Include <asm/ptrace.h>
12706 (ps_get_thread_area): Implement.
12708 2010-05-03 Doug Evans <dje@google.com>
12710 * event-loop.c (struct callback_event): New struct.
12711 (callback_list): New global.
12712 (append_callback_event, delete_callback_event): New functions.
12713 (process_callback): New function.
12714 (start_event_loop): Call it.
12715 * remote-utils.c (NOT_SCHEDULED): Define.
12716 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12717 moved out of readchar.
12718 (readchar): Rewrite. Call reschedule before returning.
12719 (reset_readchar): New function.
12720 (remote_close): Call it.
12721 (process_remaining, reschedule): New functions.
12722 * server.h (callback_handler_func): New typedef.
12723 (append_callback_event, delete_callback_event): Declare.
12725 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12727 * proc-service.c (ps_pglobal_lookup): Use
12728 thread_db_look_up_one_symbol.
12729 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12730 parameter. Use it instead of all_symbols_looked_up.
12731 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12733 (all_symbols_looked_up): Don't declare.
12734 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12735 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12737 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12738 Set all_symbols_looked_up here.
12739 (thread_db_look_up_one_symbol): New.
12740 (thread_db_get_tls_address): Adjust.
12741 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12742 thread_db object on the heap, and tentatively set it in the
12744 (thread_db_init): Don't set all_symbols_looked_up here.
12745 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12747 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12749 * linux-low.c (linux_kill, linux_detach): Adjust.
12750 (status_pending_p_callback): Remove redundant statement. Check
12751 for !TARGET_WAITIKIND_IGNORE, instead of
12752 TARGET_WAITKIND_STOPPED.
12753 (handle_tracepoints): Make sure LWP is locked. Adjust.
12754 (linux_wait_for_event_1): Adjust.
12755 (linux_cancel_breakpoints): New.
12756 (unsuspend_one_lwp): New.
12757 (unsuspend_all_lwps): New.
12758 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12759 (send_sigstop_callback): Change return type to int, add new
12760 `except' parameter and handle it.
12761 (suspend_and_send_sigstop_callback): New.
12762 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12763 pass them down. If SUSPEND, also increment the lwp's suspend
12765 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12766 (need_step_over_p): Don't consider suspended LWPs.
12767 (start_step_over): Adjust.
12768 (proceed_one_lwp): Change return type to int, add new `except'
12769 parameter and handle it.
12770 (unsuspend_and_proceed_one_lwp): New.
12771 (proceed_all_lwps): Use find_inferior instead of
12773 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12774 also decrement the suspend count of LWPs. Pass `except' down,
12775 instead of hacking its suspend count.
12776 (linux_pause_all): Add `freeze' parameter. Adjust.
12777 (linux_unpause_all): New.
12778 (linux_target_ops): Install linux_unpause_all.
12779 * server.c (handle_status): Adjust.
12780 * target.h (struct target_ops): New fields `unpause_all' and
12781 `cancel_breakpoints'. Add new parameter to `pause_all'.
12782 (pause_all): Add new `freeze' parameter.
12783 (unpause_all): New.
12784 (cancel_breakpoints): New.
12785 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12786 cancel breakpoints.
12787 (cmd_qtstart): Pause threads.
12788 (stop_tracing): Pause threads, and cancel breakpoints.
12789 * win32-low.c (win32_target_ops): Adjust.
12791 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12793 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12794 the inferior right away from here...
12795 (linux_wait_1): ... to here, and adjust to check the thread's
12796 last_resume_kind instead of the lwp's step or stop_expected flags.
12798 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12800 * README: Use consistent `GDB' and `GDBserver' spellings.
12802 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12804 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12805 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12806 (linux_detach_one_lwp): Assume the lwp is stopped.
12807 (any_thread_of): Delete.
12808 (linux_detach): Stop all lwps here. Don't blindly delete all
12810 (delete_lwp_callback): New.
12811 (linux_mourn): Delete all lwps of the process that is gone.
12812 (linux_wait_1): Don't delete the last lwp of the process here.
12813 * mem-break.h (mark_breakpoints_out): Declare.
12814 * mem-break.c (mark_breakpoints_out): New.
12815 (free_all_breakpoints): Use it.
12816 * server.c (handle_target_event): If the process is gone, mark
12818 * thread-db.c (struct thread_db) <create_bp>: New field.
12819 (thread_db_enable_reporting): Fix prototype. Store a thread event
12820 breakpoint reference in the thread_db struct.
12821 (thread_db_load_search): Clear the thread_db object.
12822 (try_thread_db_load_1): Ditto.
12823 (switch_to_process): New.
12824 (disable_thread_event_reporting): Use it.
12825 (remove_thread_event_breakpoints): New.
12826 (thread_db_detach, thread_db_mourn): Use it.
12828 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12830 * linux-low.c (linux_enable_event_reporting): New.
12831 (linux_wait_for_event_1, handle_extended_wait): Use it.
12833 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12835 * linux-low.c (linux_kill_one_lwp, linux_kill)
12836 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12837 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12838 SIGSTOP even if the LWP is stopped.
12839 (send_sigstop_callback): New.
12840 (stop_all_lwps): Use send_sigstop_callback instead.
12841 (linux_resume_one_thread): Adjust.
12842 (proceed_one_lwp): Still proceed an LWP that the client has
12843 requested to stop, if we haven't reported it as stopped yet. Make
12844 sure that LWPs the client want stopped, have a pending SIGSTOP.
12846 2010-04-26 Doug Evans <dje@google.com>
12848 * server.c (handle_general_set): Make static.
12850 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12851 Print received char after testing for error/eof instead of before.
12852 (input_interrupt): Tweak comment.
12854 2010-04-23 Doug Evans <dje@google.com>
12856 * server.c (start_inferior): Print inferior argv if --debug.
12858 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12860 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12861 * nto-x86-low.c: Include server.h
12863 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12865 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12866 be consistent with other sources of this directory.
12867 (init_registers_amd64): Correct name of source file of this function
12870 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12872 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12873 64-bit executables.
12875 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12877 * win32-i386-low.c: Add 64-bit support.
12878 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12879 (init_registers_amd64): Declare.
12880 (mappings): Add 64-bit version of array.
12881 (init_windows_x86): New function.
12882 (the_low_target): Change init_arch field to init_windows_x86.
12884 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12886 * win32-low.c: Adapt to support also 64-bit architecture.
12887 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12888 (get_image_name): Use SIZE_T type for local variable `done'.
12889 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12890 (toolhelp_get_dll_name): Idem.
12891 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12892 Use uintptr_t typecast to avoid warning.
12893 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12894 (handle_exception): Use phex_nz to avoid warning.
12895 (win32_wait): Remove unused local variable `process'.
12897 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12899 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12902 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12904 * configure.ac: Use `ws2_32' library for srv_mingw.
12905 * configure: Regenerate.
12906 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12907 * remote-utils.c: Likewise.
12909 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12911 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12912 if __x86_64__ is defined.
12914 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12916 * configure: Regenerate.
12918 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12920 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12921 * target.h (target_ops): New get_tib_address field.
12922 * win32-low.h (win32_thread_info): Add thread_local_base field.
12923 * win32-low.c (child_add_thread): Add tlb argument.
12924 Set thread_local_base field to TLB.
12925 (get_child_debug_event): Adapt to child_add_thread change.
12926 (win32_get_tib_address): New function.
12927 (win32_target_ops): Set get_tib_address field to
12928 win32_get_tib_address.
12929 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12931 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12933 * linux-low.c (linux_mourn): Also remove the process.
12934 * server.c (handle_target_event): Don't remove the process here.
12935 * nto-low.c (nto_mourn): New.
12936 (nto_target_ops): Install it.
12937 * spu-low.c (spu_mourn): New.
12938 (spu_target_ops): Install it.
12939 * win32-low.c (win32_mourn): New.
12940 (win32_target_ops): Install it.
12942 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12944 * server.h (buffer_xml_printf): Remove redundant `;'.
12946 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12948 * regcache.c (set_register_cache): Invalidate regcaches before
12949 changing the register cache layout.
12950 (regcache_invalidate_one): Allow a NULL regcache.
12951 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12952 regcaches before changing the register cache layout or the target
12955 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12957 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12958 variable warning on Linux/x86-64.
12960 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12962 GDBserver disconnected tracing support.
12964 * linux-low.c (linux_remove_process): Delete.
12965 (add_lwp): Don't set last_resume_kind here.
12966 (linux_kill): Use `mourn'.
12967 (linux_detach): Use `thread_db_detach', and `mourn'.
12968 (linux_mourn): New.
12969 (linux_attach_lwp_1): Adjust comment.
12970 (linux_attach): last_resume_kind moved the thread_info; adjust.
12971 (status_pending_p_callback): Adjust.
12972 (linux_wait_for_event_1): Adjust.
12973 (count_events_callback, select_singlestep_lwp_callback)
12974 (select_event_lwp_callback, cancel_breakpoints_callback)
12975 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12976 (proceed_one_lwp): Adjust.
12977 (linux_async): Add debug output.
12978 (linux_thread_stopped): New.
12979 (linux_pause_all): New.
12980 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12982 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12983 (thread_db_free): Delete declaration.
12984 (thread_db_detach, thread_db_mourn): Declare.
12985 * thread-db.c (thread_db_init): Use thread_db_mourn.
12986 (thread_db_free): Delete, split in two.
12987 (disable_thread_event_reporting): New.
12988 (thread_db_detach): New.
12989 (thread_db_mourn): New.
12991 * server.h (struct thread_info) <last_resume_kind>: New field.
12992 <attached>: Add comment.
12993 <gdb_detached>: New field.
12994 (handler_func): Change return type to int.
12995 (handle_serial_event, handle_target_event): Ditto.
12996 (gdb_connected): Declare.
12998 (disconnected_tracing): Declare.
12999 (stop_tracing): Declare.
13001 * server.c (handle_query) <qSupported>: Report support for
13002 disconnected tracing.
13003 (queue_stop_reply_callback): Account for running threads.
13004 (gdb_wants_thread_stopped): New.
13005 (gdb_wants_all_threads_stopped): New.
13006 (gdb_reattached_process): New.
13007 (handle_status): Clear the `gdb_detached' flag of all processes.
13008 In all-stop, stop all threads.
13009 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13010 (process_serial_event): If the remote connection breaks, or if an
13011 exit was forced with "monitor exit", force an event loop exit.
13012 Handle disconnected tracing on detach.
13013 (handle_serial_event): Adjust.
13014 (handle_target_event): If GDB isn't connected, forward events back
13015 to the inferior, unless the last process exited, in which case,
13016 exit gdbserver. Adjust interface.
13018 * remote-utils.c (remote_open): Don't block in accept. Instead
13019 register an event loop source on the listen socket file
13020 descriptor. Refactor bits into ...
13021 (listen_desc): ... this new global.
13022 (gdb_connected): ... this new function.
13023 (enable_async_notification): ... this new function.
13024 (handle_accept_event): ... this new function.
13025 (remote_close): Clear remote_desc.
13027 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13029 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13031 (mourn_inferior): Define.
13032 (target_process_qsupported): Avoid the dangling else problem.
13033 (thread_stopped): Define.
13034 (pause_all): Define.
13035 (target_waitstatus_to_string): Declare.
13036 * target.c (target_waitstatus_to_string): New.
13038 * tracepoint.c (tracing): Make extern.
13039 (disconnected_tracing): New.
13040 (stop_tracing): Make extern. Handle tracing stops due to GDB
13042 (cmd_qtdisconnected): New.
13043 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13044 (handle_tracepoint_general_set): Handle QTDisconnected.
13046 * event-loop.c (event_handler_func): Change return type to int.
13047 (process_event): Bail out if the event handler wants the event
13049 (handle_file_event): Ditto.
13050 (start_event_loop): Bail out if the event handler wants the event
13053 * nto-low.c (nto_target_ops): Adjust.
13054 * spu-low.c (spu_wait): Don't remove the process here.
13055 (spu_target_ops): Adjust.
13056 * win32-low.c (win32_wait): Don't remove the process here.
13057 (win32_target_ops): Adjust.
13059 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13061 * regcache.c (realloc_register_cache): Invalidate inferior's
13062 regcache before recreating it.
13064 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13066 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13068 2010-04-09 Stan Shebs <stan@codesourcery.com>
13069 Pedro Alves <pedro@codesourcery.com>
13071 * server.h (LONGEST): New.
13072 (struct thread_info) <while_stepping>: New field.
13073 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13075 (initialize_tracepoint, handle_tracepoint_general_set)
13076 (handle_tracepoint_query, tracepoint_finished_step)
13077 (tracepoint_was_hit, release_while_stepping_state_list):
13078 (current_traceframe): Declare.
13079 * server.c (handle_general_set): Handle tracepoint packets.
13080 (read_memory): New.
13081 (write_memory): New.
13082 (handle_search_memory_1): Use read_memory.
13083 (handle_query): Report support for conditional tracepoints, trace
13084 state variables, and tracepoint sources. Handle tracepoint
13086 (main): Initialize the tracepoints module.
13087 (process_serial_event): Handle traceframe reads/writes.
13089 * linux-low.c (handle_tracepoints): New.
13090 (linux_wait_1): Call it.
13091 (linux_resume_one_lwp): Handle while-stepping.
13092 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13093 (linux_target_ops): Install them.
13094 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13096 * linux-x86-low.c (x86_supports_tracepoints): New.
13097 (the_low_target). Install it.
13099 * mem-break.h (delete_breakpoint): Declare.
13100 * mem-break.c (delete_breakpoint): Make external.
13102 * target.h (struct target_ops): Add `supports_tracepoints',
13103 `read_pc', and `write_pc' fields.
13104 (target_supports_tracepoints): Define.
13105 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13108 * regcache.h (struct regcache) <registers_owned>: New field.
13109 (init_register_cache, regcache_cpy): Declare.
13110 (regcache_read_pc, regcache_write_pc): Declare.
13111 (register_cache_size): Declare.
13112 (supply_regblock): Declare.
13113 * regcache.c (init_register_cache): New.
13114 (new_register_cache): Use it.
13115 (regcache_cpy): New.
13116 (register_cache_size): New.
13117 (supply_regblock): New.
13118 (regcache_read_pc, regcache_write_pc): New.
13120 * tracepoint.c: New.
13122 * Makefile.in (OBS): Add tracepoint.o.
13123 (tracepoint.o): New rule.
13125 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13127 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13129 (i386-mmx.c): Likewise.
13130 (i386-mmx-linux.o): Likewise.
13131 (i386-mmx-linux.c): Likewise.
13133 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13134 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13135 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13136 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13138 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13139 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13140 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13142 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13144 * Makefile.in (clean): Updated.
13146 (i386-avx.c): Likewise.
13147 (i386-avx-linux.o): Likewise.
13148 (i386-avx-linux.c): Likewise.
13149 (amd64-avx.o): Likewise.
13150 (amd64-avx.c): Likewise.
13151 (amd64-avx-linux.o): Likewise.
13152 (amd64-avx-linux.c): Likewise.
13154 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13155 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13156 (srv_amd64_regobj): Add amd64-avx.o.
13157 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13158 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13159 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13160 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13161 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13162 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13163 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13165 * i387-fp.c: Include "i386-xstate.h".
13167 (i387_cache_to_xsave): Likewise.
13168 (i387_xsave_to_cache): Likewise.
13169 (x86_xcr0): Likewise.
13171 * i387-fp.h (i387_cache_to_xsave): Likewise.
13172 (i387_xsave_to_cache): Likewise.
13173 (x86_xcr0): Likewise.
13175 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13176 * linux-crisv32-low.c (target_regsets): Likewise.
13177 * linux-m68k-low.c (target_regsets): Likewise.
13178 * linux-mips-low.c (target_regsets): Likewise.
13179 * linux-ppc-low.c (target_regsets): Likewise.
13180 * linux-s390-low.c (target_regsets): Likewise.
13181 * linux-sh-low.c (target_regsets): Likewise.
13182 * linux-sparc-low.c (target_regsets): Likewise.
13183 * linux-xtensa-low.c (target_regsets): Likewise.
13185 * linux-low.c: Include <sys/uio.h>.
13186 (regsets_fetch_inferior_registers): Support nt_type.
13187 (regsets_store_inferior_registers): Likewise.
13188 (linux_process_qsupported): New.
13189 (linux_target_ops): Add linux_process_qsupported.
13191 * linux-low.h (regset_info): Add nt_type.
13192 (linux_target_ops): Add process_qsupported.
13194 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13196 (init_registers_i386_avx_linux): New.
13197 (init_registers_amd64_avx_linux): Likewise.
13198 (xmltarget_i386_linux_no_xml): Likewise.
13199 (xmltarget_amd64_linux_no_xml): Likewise.
13200 (PTRACE_GETREGSET): Likewise.
13201 (PTRACE_SETREGSET): Likewise.
13202 (x86_fill_xstateregset): Likewise.
13203 (x86_store_xstateregset): Likewise.
13204 (use_xml): Likewise.
13205 (x86_linux_update_xmltarget): Likewise.
13206 (x86_linux_process_qsupported): Likewise.
13207 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13208 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13209 init_registers_i386_linux here. Call
13210 x86_linux_update_xmltarget.
13211 (the_low_target): Add x86_linux_process_qsupported.
13213 * server.c (handle_query): Call target_process_qsupported.
13215 * target.h (target_ops): Add process_qsupported.
13216 (target_process_qsupported): New.
13218 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13220 * inferiors.c (add_thread): Set last_status kind to
13221 TARGET_WAITKIND_IGNORE.
13222 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13223 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13224 (linux_wait_1): Move `thread' local definition to block that uses
13225 it. Don't NULL initialize `event_child'.
13226 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13227 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13228 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13230 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13232 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13233 an extended waitstatus, or by a watchpoint.
13234 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13235 thread was stepping or has been stopped by a watchpoint.
13237 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13239 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13240 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13241 of another, then delete the previous, and validate all
13243 (validate_inserted_breakpoint): New.
13244 (delete_disabled_breakpoints): New.
13245 (validate_breakpoints): New.
13246 (check_mem_read): Validate breakpoints before trusting their
13247 shadow. Delete disabled breakpoints.
13248 (check_mem_write): Validate breakpoints before trusting they
13249 should be inserted. Delete disabled breakpoints.
13250 * mem-break.h (validate_breakpoints):
13251 * server.c (handle_query): Validate breakpoints when we see a
13254 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13256 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13257 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13258 if we could tell there's a GDB breakpoint at stop_pc.
13259 (need_step_over_p): Don't do a step over if we find a GDB
13260 breakpoint at the resume PC.
13262 * mem-break.c (struct raw_breakpoint): New.
13263 (enum bkpt_type): New type `gdb_breakpoint'.
13264 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13265 fields. New field `raw'.
13266 (find_raw_breakpoint_at): New.
13267 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13268 breakpoint instead.
13269 (set_breakpoint_at): Adjust.
13270 (delete_raw_breakpoint): New.
13271 (release_breakpoint): New.
13272 (delete_breakpoint): Rename to...
13273 (delete_breakpoint_1): ... this. Add proc parameter. Use
13274 release_breakpoint. Return ENOENT.
13275 (delete_breakpoint): Reimplement.
13276 (find_breakpoint_at): Delete.
13277 (find_gdb_breakpoint_at): New.
13278 (delete_breakpoint_at): Delete.
13279 (set_gdb_breakpoint_at): New.
13280 (delete_gdb_breakpoint_at): New.
13281 (gdb_breakpoint_here): New.
13282 (set_reinsert_breakpoint): Use release_breakpoint.
13283 (uninsert_breakpoint): Rename to ...
13284 (uninsert_raw_breakpoint): ... this.
13285 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13286 (reinsert_raw_breakpoint): Change parameter type to
13288 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13290 (check_breakpoints): Adjust. Use release_breakpoint.
13291 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13292 (breakpoint_inserted_here): Ditto.
13293 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13294 Don't trust the breakpoint's shadow if it is not inserted.
13295 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13296 (delete_all_breakpoints): Adjust.
13297 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13298 use delete_breakpoint_1.
13300 * mem-break.h (breakpoints_supported): Delete declaration.
13301 (set_gdb_breakpoint_at): Declare.
13302 (gdb_breakpoint_here): Declare.
13303 (delete_breakpoint_at): Delete.
13304 (delete_gdb_breakpoint_at): Declare.
13306 * server.h (struct raw_breakpoint): Forward declare.
13307 (struct process_info): New field `raw_breakpoints'.
13309 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13312 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13314 * linux-low.c (status_pending_p_callback): Fix comment.
13315 (linux_wait_for_event_1): Move most of the internal breakpoint
13316 handling from here...
13317 (linux_wait_1): ... to here.
13318 (count_events_callback): New.
13319 (select_singlestep_lwp_callback): New.
13320 (select_event_lwp_callback): New.
13321 (cancel_breakpoints_callback): New.
13322 (select_event_lwp): New.
13323 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13324 priority to all LWPs that have had events that should be reported
13325 to the client. Cancel breakpoints when about to reporting the
13326 event to the client, not while stopping lwps. No longer cancel
13327 finished single-steps here.
13328 (cancel_finished_single_step): Delete.
13329 (cancel_finished_single_steps): Delete.
13331 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13333 * mem-break.c (enum bkpt_type): New.
13334 (struct breakpoint): New field `type'.
13335 (set_breakpoint_at): Change return type to struct breakpoint
13336 pointer. Set type to `other_breakpoint' by default.
13337 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13338 in the breakpoint list.
13339 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13340 (reinsert_breakpoint): Rename to ...
13341 (reinsert_raw_breakpoint): ... this.
13342 (reinsert_breakpoints_at): Adjust.
13343 * mem-break.h (struct breakpoint): Declare.
13344 (set_breakpoint_at): Change return type to struct breakpoint
13347 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13349 * server.c (handle_query): Assign, not compare.
13351 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13353 Teach linux gdbserver to step-over-breakpoints.
13355 * linux-low.c (can_hardware_single_step): New.
13356 (supports_breakpoints): New.
13357 (handle_extended_wait): If stopping threads, read the stop pc of
13358 the new cloned LWP.
13360 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13361 low target doesn't support retrieving the PC.
13362 (add_lwp): Set last_resume_kind to resume_continue.
13363 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13364 (linux_attach): Don't clear stop_expected. Set the lwp's
13365 last_resume_kind to resume_stop.
13366 (linux_detach_one_lwp): Don't check for removed breakpoints.
13367 (check_removed_breakpoint): Delete.
13368 (status_pending_p): Rename to ...
13369 (status_pending_p_callback): ... this. Don't check for removed
13370 breakpoints. Don't consider threads that are stopped from GDB's
13372 (linux_wait_for_lwp): Always read the stop_pc here.
13373 (cancel_breakpoint): New.
13374 (step_over_bkpt): New global.
13375 (linux_wait_for_event_1): Implement stepping over breakpoints.
13376 (gdb_wants_lwp_stopped): New.
13377 (gdb_wants_all_stopped): New.
13378 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13379 single-step traps here. Store the thread's last reported target
13381 (send_sigstop): Don't clear stop_expected. Always set it,
13383 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13384 (cancel_finished_single_step): New.
13385 (cancel_finished_single_steps): New.
13386 (wait_for_sigstop): Don't cancel finished single-step traps here.
13387 (linux_resume_one_lwp): Don't check for removed breakpoints.
13388 Don't set `step' on non-hardware step archs.
13389 (linux_set_resume_request): Ignore resume_stop requests if already
13390 stopping or stopped. Set the lwp's last_resume_kind.
13391 (resume_status_pending_p): Don't check for removed breakpoints.
13392 (need_step_over_p): New.
13393 (start_step_over): New.
13394 (finish_step_over): New.
13395 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13396 requests. Clear the thread's last reported target waitstatus.
13397 Don't use the `suspended' flag. Don't consider pending breakpoints.
13398 (linux_resume): Start a step-over if necessary.
13399 (proceed_one_lwp): New.
13400 (proceed_all_lwps): New.
13401 (unstop_all_lwps): New.
13402 * linux-low.h (struct lwp_info): Rewrite comment for the
13403 `suspended' flag. Add the `stop_pc' field. Delete the
13404 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13405 Add `'last_resume_kind' and `need_step_over' fields.
13406 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13407 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13408 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13409 (set_raw_breakpoint_at): New.
13410 (set_breakpoint_at): Rewrite to use it.
13411 (reinsert_breakpoint_handler): Delete.
13412 (set_reinsert_breakpoint): New.
13413 (reinsert_breakpoint_by_bp): Delete.
13414 (delete_reinsert_breakpoints): New.
13415 (uninsert_breakpoint): Rewrite.
13416 (uninsert_breakpoints_at): New.
13417 (reinsert_breakpoint): Rewrite.
13418 (reinsert_breakpoints_at): New.
13419 (check_breakpoints): Rewrite.
13420 (breakpoint_here): New.
13421 (breakpoint_inserted_here): New.
13422 (check_mem_read): Adjust.
13423 * mem-break.h (breakpoints_supported, breakpoint_here)
13424 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13425 (reinsert_breakpoint_by_bp): Delete declaration.
13426 (delete_reinsert_breakpoints): Declare.
13427 (reinsert_breakpoint): Delete declaration.
13428 (reinsert_breakpoints_at): Declare.
13429 (uninsert_breakpoint): Delete declaration.
13430 (uninsert_breakpoints_at): Declare.
13431 (check_breakpoints): Adjust prototype.
13432 * server.h: Adjust include order.
13433 (struct thread_info): Declare here. Add a `last_status' field.
13435 2010-03-23 Michael Snyder <msnyder@vmware.com>
13437 * server.c (crc32): New function.
13438 (handle_query): Add handling for 'qCRC:' request.
13440 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13442 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13443 lwp had been stopped by a watchpoint.
13445 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13447 * server.h (internal_error): Declare.
13448 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13449 * utils.c (internal_error): New function.
13451 2010-03-15 Andreas Schwab <schwab@redhat.com>
13453 * configure.srv: Fix typo setting srv_regobj.
13455 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13457 * linux-low.c (fetch_register): Avoid passing a non string literal
13459 (usr_store_inferior_registers): Ditto.
13461 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13463 * linux-low.c (linux_write_memory): Bail out early if peeking
13466 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13468 * linux-low.h (struct lwp_info): New fields
13469 `stopped_by_watchpoint' and `stopped_data_address'.
13470 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13471 here, and cache them in the lwp object.
13472 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13474 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13476 (linux_stopped_by_watchpoint): Rewrite.
13477 (linux_stopped_data_address): Rewrite.
13479 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13481 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13482 switching the current inferior, not before.
13484 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13486 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13487 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13488 i386-linux.c and amd64-linux.c.
13489 (reg-i386.o): Removed.
13490 (reg-i386.c): Likewise.
13491 (reg-i386-linux.o): Likewise.
13492 (reg-i386-linux.c): Likewise.
13493 (reg-x86-64.o): Likewise.
13494 (reg-x86-64.c): Likewise.
13495 (reg-x86-64-linux.o): Likewise.
13496 (reg-x86-64-linux.c): Likewise.
13498 (i386.c): Likewise.
13499 (i386-linux.o): Likewise.
13500 (i386-linux.c): Likewise.
13501 (amd64.o): Likewise.
13502 (amd64.c): Likewise.
13503 (amd64-linux.o): Likewise.
13504 (amd64-linux.c): Likewise.
13506 * configure.srv (srv_i386_regobj): New.
13507 (srv_i386_linux_regobj): Likewise.
13508 (srv_amd64_regobj): Likewise.
13509 (srv_amd64_linux_regobj): Likewise.
13510 (srv_i386_32bit_xmlfiles): Likewise.
13511 (srv_i386_64bit_xmlfiles): Likewise.
13512 (srv_i386_xmlfiles): Likewise.
13513 (srv_amd64_xmlfiles): Likewise.
13514 (srv_i386_linux_xmlfiles): Likewise.
13515 (srv_amd64_linux_xmlfiles): Likewise.
13516 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13517 srv_xmlfiles to $srv_i386_xmlfiles.
13518 (i[34567]86-*-mingw32ce*): Likewise.
13519 (i[34567]86-*-mingw*): Likewise.
13520 (i[34567]86-*-nto*): Likewise.
13521 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13522 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13523 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13524 (x86_64-*-linux*): Likewise.
13526 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13527 (init_registers_amd64_linux): New.
13528 (x86_arch_setup): Replace init_registers_x86_64_linux with
13529 init_registers_amd64_linux.
13531 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13533 * configure.ac: Check for libdl. If it is not available link against
13534 static libthread_db.
13535 * configure: Regenerate.
13537 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13541 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13542 handing a read watchpoint.
13543 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13545 2010-02-12 Doug Evans <dje@google.com>
13547 * linux-low.c (linux_supports_tracefork_flag): Document.
13548 (linux_look_up_symbols): Add comment.
13550 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13552 * regcache.c (supply_register): Clear regcache if buf is NULL.
13554 2010-02-02 Nicolas Roche <roche@sourceware.org>
13555 Joel Brobecker <brobecker@adacore.com>
13557 * inferiors.c (find_inferior): Add function documentation.
13558 (unloaded_dll): Handle the case where the unloaded dll has not
13559 been previously registered in the dll list.
13561 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13563 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13564 (thumb2_breakpoint): New.
13565 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13567 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13569 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13570 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13573 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13575 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13577 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13579 * linux-s390-low.c (s390_collect_ptrace_register)
13580 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13582 2010-01-21 Doug Evans <dje@google.com>
13584 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13585 (PTRACE_ARG4_TYPE): New macro.
13586 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13587 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13588 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13589 (usr_store_inferior_registers): Ditto.
13590 (linux_read_memory, linux_write_memory): Ditto.
13591 (linux_test_for_tracefork): Ditto.
13593 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13594 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13596 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13598 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13601 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13603 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13604 prototype to take a regcache. Adjust.
13606 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13608 * regcache.h (struct thread_info): Forward declare.
13609 (struct regcache): New.
13610 (new_register_cache): Adjust prototype.
13611 (get_thread_regcache): Declare.
13612 (free_register_cache): Adjust prototype.
13613 (registers_to_string, registers_from_string): Ditto.
13614 (supply_register, supply_register_by_name, collect_register)
13615 (collect_register_as_string, collect_register_by_name): Ditto.
13616 * regcache.c (struct inferior_regcache_data): Delete.
13617 (get_regcache): Rename to ...
13618 (get_thread_regcache): ... this. Adjust. Switch inferior before
13619 fetching registers.
13620 (regcache_invalidate_one): Adjust.
13621 (regcache_invalidate): Fix prototype.
13622 (new_register_cache): Return the new register cache.
13623 (free_register_cache): Change prototype.
13624 (realloc_register_cache): Adjust.
13625 (registers_to_string): Change prototype to take a regcache. Adjust.
13626 (registers_from_string): Ditto.
13627 (register_data): Ditto.
13628 (supply_register): Ditto.
13629 (supply_register_by_name): Ditto.
13630 (collect_register): Ditto.
13631 (collect_register_as_string): Ditto.
13632 (collect_register_by_name): Ditto.
13633 * server.c (process_serial_event): Adjust.
13634 * linux-low.h (regset_fill_func, regset_store_func): Change
13636 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13638 * linux-low.c (get_stop_pc): Adjust.
13639 (check_removed_breakpoint): Adjust.
13640 (linux_wait_for_event): Adjust.
13641 (linux_resume_one_lwp): Adjust.
13642 (fetch_register): Add regcache parameter. Adjust.
13643 (usr_store_inferior_registers): Ditto.
13644 (regsets_fetch_inferior_registers): Ditto.
13645 (regsets_store_inferior_registers): Ditto.
13646 (linux_fetch_registers, linux_store_registers): Ditto.
13647 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13649 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13651 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13652 prototype to take a regcache.
13653 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13654 * remote-utils.c (convert_ascii_to_int, outreg)
13655 (prepare_resume_reply): Change prototype to take a regcache.
13657 * target.h (struct target_ops) <fetch_registers, store_registers>:
13658 Change prototype to take a regcache.
13659 (fetch_inferior_registers, store_inferior_registers): Change
13660 prototype to take a regcache. Adjust.
13661 * proc-service.c (ps_lgetregs): Adjust.
13662 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13663 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13664 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13665 take a regcache. Adjust.
13666 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13667 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13668 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13669 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13670 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13671 (cris_cannot_fetch_register):
13672 (cris_breakpoint_at): Change prototype to take a regcache.
13674 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13675 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13676 to take a regcache. Adjust.
13677 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13679 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13680 take a regcache. Adjust.
13681 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13682 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13683 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13684 * linux-mips-low.c (mips_get_pc):
13685 (mips_set_pc): Change prototype to take a regcache. Adjust.
13686 (mips_reinsert_addr): Adjust.
13687 (mips_collect_register): Change prototype to take a regcache.
13689 (mips_supply_register):
13690 (mips_collect_register_32bit, mips_supply_register_32bit)
13691 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13692 (mips_store_fpregset): Ditto.
13693 * linux-ppc-low.c (ppc_supply_ptrace_register)
13694 (ppc_supply_ptrace_register): Ditto.
13695 (parse_spufs_run): Adjust.
13696 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13697 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13698 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13699 take a regcache. Adjust.
13700 * linux-s390-low.c (s390_collect_ptrace_register)
13701 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13702 (s390_set_pc): Change prototype to take a regcache. Adjust.
13703 (s390_arch_setup): Adjust.
13704 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13705 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13706 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13707 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13708 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13710 (sparc_breakpoint_at): Adjust.
13711 * linux-xtensa-low.c (xtensa_fill_gregset):
13712 (xtensa_store_gregset):
13713 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13714 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13715 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13716 prototype to take a regcache. Adjust.
13717 * win32-arm-low.c (arm_fetch_inferior_register)
13718 (arm_store_inferior_register): Change prototype to take a
13720 * win32-i386-low.c (i386_fetch_inferior_register)
13721 (i386_store_inferior_register): Change prototype to take a
13723 * win32-low.c (child_fetch_inferior_registers)
13724 (child_store_inferior_registers): Change prototype to take a
13726 (win32_wait): Adjust.
13727 (win32_fetch_inferior_registers): Change prototype to take a
13729 (win32_store_inferior_registers): Adjust.
13730 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13731 store_inferior_register>: Change prototype to take a regcache.
13733 2010-01-20 Doug Evans <dje@google.com>
13735 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13737 (linux_wait_for_event1, linux_init_signals): Ditto.
13738 (W_STOPCODE): Provide definition if missing.
13740 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13742 * linux-low.c (linux_core_of_thread): New.
13743 (compare_ints, show_process, list_threads): New.
13744 (linux_qxfer_osdata): Report threads and cores.
13745 (linux_target_op): Register linux_core_of_thread.
13746 * remote-utils.c (prepare_resume_reply): Report the core.
13747 (buffer_xml_printf): Support %d specifier.
13748 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13750 (handle_query): Handle qXfer:threads. Announce availability
13752 * target.h (struct target_ops): New field core_of_thread.
13754 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13756 * Makefile.in (clean): Remove new generated files.
13757 (reg-s390.o, reg-s390.c): Remove rules.
13758 (reg-s390x.o, reg-s390x.c): Likewise.
13759 (s390-linux32.o, s390-linux32.c): Add rules.
13760 (s390-linux64.o, s390-linux64.c): Likewise.
13761 (s390x-linux64.o, s390x-linux64.c): Likewise.
13762 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13763 * linux-s390-low.c: Include <elf.h>.
13764 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13765 (init_registers_s390): Remove prototype.
13766 (init_registers_s390x): Likewise.
13767 (init_registers_s390_linux32): Add prototype.
13768 (init_registers_s390_linux64): Likewise.
13769 (init_registers_s390x_linux64): Likewise.
13770 (s390_num_regs_3264): New define.
13771 (s390_regmap_3264): New global variable.
13772 (s390_cannot_fetch_register): Remove obsolete check.
13773 (s390_cannot_store_register): Likewise.
13774 (s390_collect_ptrace_register): Handle upper/lower register halves.
13775 (s390_supply_ptrace_register): Likewise.
13776 (s390_fill_gregset): Update to register number changes.
13777 (s390_get_hwcap): New routine.
13778 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13779 Install appropriate regmap and register set.
13781 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13783 * server.c (gdbserver_version): Update copyright year to 2010.
13784 * gdbreplay.c (gdbreplay_version): Likewise.
13786 2009-12-28 Doug Evans <dje@google.com>
13788 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13789 elf/external.h. Include <elf.h> instead but only if necessary.
13791 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13793 * linux-low.c (linux_remove_process): Remove `detaching'
13794 parameter. Don't release/detach from thread_db here.
13795 (linux_kill): Release/detach from thread_db here, ...
13796 (linux_detach): ... and here, before actually detaching.
13797 (linux_wait_1): ... and here, when a process exits.
13798 * thread-db.c (any_thread_of): New.
13799 (thread_db_free): Switch the current inferior to a thread of the
13802 2009-12-21 Doug Evans <dje@google.com>
13804 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13806 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13807 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13808 warning ifndef __NR_tkill. Move setting of errno there too.
13809 Delete unnecessary resetting of errno after syscall.
13810 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13812 * configure.ac: Check for dladdr.
13813 * config.in: Regenerate.
13814 * configure: Regenerate.
13815 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13816 (try_thread_db_load): Update.
13818 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13820 2009-12-18 Doug Evans <dje@google.com>
13822 * event-loop.c: Include unistd.h if it exists.
13824 * linux-low.c (my_waitpid): Move definition away from being in
13825 between linux_tracefork_child/linux_test_for_tracefork.
13827 * gdb_proc_service.h (psaddr_t): Fix type.
13828 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13829 signature to match glibc.
13831 2009-12-16 Doug Evans <dje@google.com>
13833 * linux-low.c (linux_read_memory): Fix argument to read.
13835 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13837 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13838 events, don't leave current_inferior pointing at null.
13840 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13842 * win32-low.c (LOG): Delete.
13843 (OUTMSG): Output to stderr.
13844 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13845 on compile time LOG macro.
13846 (win32_wait): Fix debug output.
13848 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13850 * win32-low.c (win32_add_one_solib): If the dll name is
13851 "ntdll.dll", prepend the system directory to the dll path.
13853 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13855 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13857 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13858 Vladimir Prus <vladimir@codesourcery.com>
13860 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13861 * configure.ac: Check for __mcoldfire__ and set
13862 gdb_cv_m68k_is_coldfire.
13863 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13864 reg-cf.o and reg-m68k.o.
13865 * configure: Regenerated.
13867 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13869 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13870 Pass it to thread_db_free.
13871 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13872 proper `detaching' argument to linux_remove_process.
13873 * linux-low.h (thread_db_free): Add `detaching' parameter.
13874 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13876 (thread_db_free): Add `detaching' parameter. Only
13877 call td_ta_clear_event if detaching from process.
13879 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13881 * thread-db.c (thread_db_free): Fix typo.
13883 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13886 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13888 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13890 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13891 with an i686 compiler.
13892 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13894 * configure: Rebuilt.
13896 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13900 * server.c (handle_search_memory_1): Correct read_addr initialization
13901 in loop for searching subsequent chunks.
13903 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13905 * configure.ac: New --with-libthread-db option.
13906 * thread-db.c: Allow direct dependence on libthread_db.
13907 (thread_db_free): Adjust.
13908 * config.in: Regenerate.
13909 * configure: Likewise.
13911 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13914 * thread-db.c (attach_thread): New function.
13915 (maybe_attach_thread): Return success/failure.
13916 (find_new_threads_callback): Adjust.
13917 (thread_db_find_new_threads): Loop until no new threads.
13919 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13921 * proc-service.c (ps_lgetregs): Formatting.
13923 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13925 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13926 * configure.ac: Adjust.
13927 * linux-low.h (struct process_info_private): Move members to struct
13929 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13930 * linux-low.c (linux_remove_process): Adjust.
13931 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13932 * server.c (handle_query): Move code ...
13933 (handle_monitor_command): ... here. New function.
13934 * target.h (struct target_ops): New member.
13935 * thread-db.c (struct thread_db): New.
13936 (libthread_db_search_path): New variable.
13937 (thread_db_create_event, thread_db_enable_reporting)
13938 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13939 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13940 (try_thread_db_load_1, dladdr_to_soname): New functions.
13941 (try_thread_db_load, thread_db_load_search): New functions.
13942 (thread_db_init): Search for libthread_db.
13943 (thread_db_free): New function.
13944 (thread_db_handle_monitor_command): Likewise.
13945 * config.in: Regenerate.
13946 * configure: Regenerate.
13948 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13950 * spu-low.c (spu_kill): Wait for inferior to terminate.
13951 Call clear_inferiors.
13952 (spu_detach): Call clear_inferiors.
13954 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13956 * aclocal.m4: Regenerate.
13957 * config.in: Likewise.
13958 * configure: Likewise.
13960 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13962 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13963 (parse_spufs_run): New function.
13964 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13965 (ppc_breakpoint_at): Handle SPU breakpoints.
13967 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13969 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13970 (SPUFS_MAGIC): Define.
13971 (spu_enumerate_spu_ids): New function.
13972 (linux_qxfer_spu): New function.
13973 (linux_target_ops): Install linux_qxfer_spu.
13975 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13977 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13978 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13979 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13980 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13981 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13982 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13983 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13984 (init_registers_powerpc_cell32l): Add prototype.
13985 (init_registers_powerpc_cell64l): Likewise.
13986 (ppc_arch_setup): Detect Cell/B.E. architecture.
13988 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13990 * Makefile.in (datarootdir): New variable.
13992 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13994 * linux-low.c (linux_write_memory): Update debugging output.
13995 * Makefile.in (clean): Add new descriptions.
13996 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13997 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13998 * configure.srv: Add new files for arm*-*-linux*.
13999 * linux-arm-low.c: Add new declarations.
14000 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14001 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14002 (HWCAP_VFPv3D16): New.
14003 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14004 instead of __IWMMXT__.
14005 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14006 (arm_arch_setup): New.
14007 (target_regsets): Remove #ifdef. Add VFP regset.
14008 (the_low_target): Use arm_arch_setup.
14010 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14012 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14013 the main thread again.
14015 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14017 Adding Neutrino gdbserver.
14018 * configure: Regenerated.
14019 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14020 * configure.srv (i[34567]86-*-nto*): New target.
14021 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14022 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14023 (nto_comctrl) [__QNX__]: New function.
14024 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14026 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14028 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14031 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14032 Pedro Alves <pedro@codesourcery.com>
14034 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14035 don't support CONTEXT_EXTENDED_REGISTERS.
14036 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14037 (the_low_target): Install them.
14038 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14039 failing with ERROR_PIPE_NOT_CONNECTED.
14041 2009-06-30 Doug Evans <dje@google.com>
14042 Pierre Muller <muller@ics.u-strasbg.fr>
14044 Add h/w watchpoint support to x86-linux, win32-i386.
14045 * Makefile.in (SFILES): Add i386-low.c
14046 (i386_low_h): Define.
14047 (i386-low.o): Add dependencies.
14048 (linux-x86-low.o): Add i386-low.h dependency.
14049 (win32-i386-low.o): Ditto.
14050 * i386-low.c: New file.
14051 * i386-low.h: New file.
14052 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14053 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14054 * linux-low.c (linux_add_process): Initialize arch_private.
14055 (linux_remove_process): Free arch_private.
14056 (add_lwp): Initialize arch_private.
14057 (delete_lwp): Free arch_private.
14058 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14060 * linux-low.h (process_info_private): New member arch_private.
14061 (lwp_info): New member arch_private.
14062 (linux_target_ops): New members new_process, new_thread,
14064 (ptid_of): New macro.
14065 * linux-x86-low.c: Include stddef.h, i386-low.h.
14066 (arch_process_info): New struct.
14067 (arch_lwp_info): New struct.
14068 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14069 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14070 (i386_dr_low_get_status): New function.
14071 (x86_insert_point, x86_remove_point): New functions.
14072 (x86_stopped_by_watchpoint): New function.
14073 (x86_stopped_data_address): New function.
14074 (x86_linux_new_process, x86_linux_new_thread): New functions.
14075 (x86_linux_prepare_to_resume): New function.
14076 (the_low_target): Add entries for insert_point, remove_point,
14077 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14079 * server.c (debug_hw_points): New global.
14080 (monitor_show_help): Document set debug-hw-points.
14081 (handle_query): Process "set debug-hw-points".
14082 * server.h (debug_hw_points): Declare.
14083 (paddress): Declare.
14084 * utils.c (NUMCELLS, CELLSIZE): New macros.
14085 (get_sell, xsnprintf, paddress): New functions.
14086 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14087 remove_point, stopped_by_watchpoint, stopped_data_address.
14088 * win32-i386-low.c: Include i386-low.h.
14089 (debug_reg_state): Replaces dr.
14090 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14091 (i386_dr_low_get_status): New function.
14092 (i386_insert_point, i386_remove_point): New functions.
14093 (i386_stopped_by_watchpoint): New function.
14094 (i386_stopped_data_address): New function.
14095 (i386_initial_stuff): Update.
14096 (get_thread_context,set_thread_context,i386_thread_added): Update.
14097 (the_low_target): Add entries for insert_point,
14098 remove_point, stopped_by_watchpoint, stopped_data_address.
14099 * win32-low.c (win32_insert_watchpoint): New function.
14100 (win32_remove_watchpoint): New function.
14101 (win32_stopped_by_watchpoint): New function.
14102 (win32_stopped_data_address): New function.
14103 (win32_target_ops): Add entries for insert_watchpoint,
14104 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14105 * win32-low.h (win32_target_ops): New members insert_point,
14106 remove_point, stopped_by_watchpoint, stopped_data_address.
14108 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14110 * server.c (process_serial_event): Re-return unsupported, not
14111 error, if the type isn't recognized. Re-allow supporting only
14112 insert or remove packets. Also call require_running for
14113 breakpoints. Add missing break statement to default case. Tidy.
14114 * target.h (struct target_ops): Rename insert_watchpoint to
14115 insert_point, and remove_watchpoint to remove_point.
14117 * linux-low.h (struct linux_target_ops): Likewise.
14118 * linux-low.c (linux_insert_watchpoint): Rename to ...
14119 (linux_insert_point): ... this. Adjust.
14120 (linux_remove_watchpoint): Rename to ...
14121 (linux_remove_point): ... this. Adjust.
14122 (linux_target_ops): Adjust.
14123 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14124 (cris_insert_point): ... this.
14125 (cris_remove_watchpoint): Rename to ...
14126 (cris_remove_point): ... this.
14127 (the_low_target): Adjust.
14129 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14131 * server.c (handle_v_kill): Pass signal_pid to
14132 kill_inferior if multi_process is zero.
14134 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14136 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14137 * target.h (target_ops): Comment for *_watchpoint to make it clear
14138 the functions can get types '0' and '1'.
14140 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14142 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14143 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14144 * regcache.c (get_regcache): Likewise.
14145 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14146 * win32-low.c (child_fetch_inferior_registers): Remove check for
14149 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14150 Pedro Alves <pedro@codesourcery.com>
14152 * target.h (struct target_ops) <supports_multi_process>: New
14154 (target_supports_multi_process): New.
14155 * server.c (handle_query): Even if GDB reports support, only
14156 enable multi-process if the target also supports it. Report
14157 multi-process support only if the target backend supports it.
14158 * linux-low.c (linux_supports_multi_process): New function.
14159 (linux_target_ops): Install it as target_supports_multi_process
14162 2009-05-24 Doug Evans <dje@google.com>
14164 Global renaming of find_thread_pid to find_thread_ptid.
14165 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14166 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14167 All callers updated.
14169 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14170 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14173 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14174 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14175 (linux_resume_one_lwp): Ditto.
14177 2009-05-23 Doug Evans <dje@google.com>
14179 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14180 from struct inferior_list_entry * to struct lwp_info *.
14181 All callers updated.
14183 2009-05-13 Doug Evans <dje@google.com>
14185 * linux-x86-low.c: Don't include assert.h.
14186 (x86_siginfo_fixup): Use fatal, not assert.
14187 (x86_arch_setup): Fix comment.
14189 2009-05-12 Doug Evans <dje@google.com>
14191 Biarch support for i386/amd64 gdbserver.
14192 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14193 Add linux-x86-low.c.
14194 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14195 (linux-x86-low.o): Add.
14196 * linux-x86-64-low.c: Delete.
14197 * linux-i386-low.c: Delete.
14198 * linux-x86-low.c: New file.
14199 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14201 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14203 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14204 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14205 (linux_child_pid_to_exec_file): New function.
14206 (elf_64_header_p, elf_64_file_p): New functions.
14207 (siginfo_fixup): New function.
14208 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14209 give target a chance to convert layout.
14210 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14211 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14213 2009-05-07 Doug Evans <dje@google.com>
14215 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14216 (regsets_store_inferior_registers): Ditto.
14218 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14222 * linux-low.c (must_set_ptrace_flags): Delete.
14223 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14225 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14226 `lwp->must_set_ptrace_flags' instead.
14227 (linux_wait_for_event_1): Set ptrace options here.
14228 (linux_wait_1): ... not here.
14230 2009-04-30 Doug Evans <dje@google.com>
14232 * inferiors.c (started_inferior_callback): New function.
14233 (attached_inferior_callback): New function.
14234 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14235 * server.c (print_started_pid, print_attached_pid): New functions.
14236 (detach_or_kill_for_exit): New function.
14237 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14238 * server.h (have_started_inferiors_p): Declare.
14239 (have_attached_inferiors_p): Declare.
14241 * inferiors.c (remove_process): Fix memory leak, free process.
14242 * linux-low.c (linux_remove_process): New function.
14243 (linux_kill): Call it instead of remove_process.
14244 (linux_detach, linux_wait_1): Ditto.
14246 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14248 * configure.srv: Add x86 Windows CE target.
14250 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14252 * inferiors.c (get_thread_process): Make global.
14253 * server.h (get_thread_process): Add prototype.
14254 * thread-db.c (find_one_thread): Use get_thread_process
14255 instead of current_process.
14256 (thread_db_get_tls_address): Do not crash if called when
14257 thread layer is not yet initialized.
14259 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14261 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14262 * spu-low.c (current_tid): Rename to ...
14263 (current_ptid): ... this.
14264 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14265 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14266 ptid_get_lwp (current_ptid) instead of current_tid.
14267 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14268 instead of current_tid. Use find_process_pid to verify pid
14269 argument is valid. Pass proper argument to remove_process.
14270 (spu_thread_alive): Compare current_ptid instead of current_tid.
14271 (spu_resume): Likewise.
14273 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14275 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14278 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14280 Implement the multiprocess extensions, and add linux multiprocess
14283 * server.h (ULONGEST): Declare.
14284 (struct ptid, ptid_t): New.
14285 (minus_one_ptid, null_ptid): Declare.
14286 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14287 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14288 (struct inferior_list_entry): Change `id' type from unsigned from
14290 (struct sym_cache, struct breakpoint, struct
14291 process_info_private): Forward declare.
14292 (struct process_info): Declare.
14293 (current_process): Declare.
14294 (all_processes): Declare.
14295 (initialize_inferiors): Declare.
14296 (add_thread): Adjust to use ptid_t.
14297 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14298 (add_process, remove_process, find_thread_pid): Declare.
14299 (find_inferior_id): Adjust to use ptid_t.
14300 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14301 (multi_process): Declare.
14302 (push_event): Adjust to use ptid_t.
14303 (read_ptid, write_ptid): Declare.
14304 (prepare_resume_reply): Adjust to use ptid_t.
14305 (clear_symbol_cache): Declare.
14306 * inferiors.c (all_processes): New.
14307 (null_ptid, minus_one_ptid): New.
14308 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14309 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14310 (add_thread): Change unsigned long to ptid. Remove gdb_id
14312 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14313 (gdb_id_to_thread): Rename to ...
14314 (find_thread_pid): ... this. Change unsigned long to ptid.
14315 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14316 (loaded_dll, pull_pid_from_list): Adjust.
14317 (add_process, remove_process, find_process_pid)
14318 (get_thread_process, current_process, initialize_inferiors): New.
14319 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14320 (struct target_waitstatus) <related_pid>: Ditto.
14321 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14322 return type to int.
14323 (struct target_ops) <join>: Add `pid' argument.
14324 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14325 (struct target_ops) <wait>: Add `ptid' field. Change return type
14327 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14328 (mywait): Add `ptid' argument. Change return type to ptid_t.
14329 (target_pid_to_str): Declare.
14330 * target.c (set_desired_inferior): Adjust to use ptids.
14331 (mywait): Add new `ptid' argument. Adjust.
14332 (target_pid_to_str): New.
14333 * mem-break.h (free_all_breakpoints): Declare.
14334 * mem-break.c (breakpoints): Delelete.
14335 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14336 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14337 to use per-process breakpoint list.
14338 (free_all_breakpoints): New.
14339 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14340 (symbol_cache, all_symbols_looked_up): Delete.
14342 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14344 (prepare_resume_reply): Change ptid argument's type from unsigned
14345 long to ptid_t. Adjust. Implement W;process and X;process.
14346 (free_sym_cache, clear_symbol_cache): New.
14347 (look_up_one_symbol): Adjust to per-process symbol cache. *
14348 * server.c (cont_thread, general_thread, step_thread): Change type
14350 (attached): Delete.
14351 (multi_process): New.
14352 (last_ptid): Change type to ptid_t.
14353 (struct vstop_notif) <ptid>: Change type to ptid_t.
14354 (queue_stop_reply, push_event): Change `ptid' argument's type to
14356 (discard_queued_stop_replies): Add `pid' argument.
14357 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14358 changes. Don't reference the `attached' global.
14359 (attach_inferior): Adjust to mywait interface changes.
14360 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14361 features. Handle and report "multiprocess+". Handle
14363 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14365 (handle_v_kill): New.
14366 (handle_v_stopped): Adjust to use target_pid_to_str.
14367 (handle_v_requests): Allow multiple attaches and runs when
14368 multiprocess extensions are in effect. Handle "vKill".
14369 (myresume): Adjust to use ptids.
14370 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14371 (handle_status): Adjust to discard_queued_stop_replies interface
14373 (first_thread_of, kill_inferior_callback)
14374 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14375 (main): Call initialize_inferiors. Adjust to use ptids, killing
14376 and detaching from all inferiors. Handle multiprocess packet
14378 * linux-low.h: Include gdb_proc_service.h.
14379 (struct process_info_private): New.
14380 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14381 <lwpid_of>: Use ptid_get_lwp.
14382 (get_lwp_thread): Adjust.
14383 (struct lwp_info): Add `dead' member.
14384 (find_lwp_pid): Declare.
14385 * linux-low.c (thread_db_active): Delete.
14386 (new_inferior): Adjust comment.
14387 (inferior_pid): Delete.
14388 (linux_add_process): New.
14389 (handle_extended_wait): Adjust.
14390 (add_lwp): Change unsigned long to ptid.
14391 (linux_create_inferior): Add process to processes table. Adjust
14392 to use ptids. Don't set new_inferior here.
14393 (linux_attach_lwp): Rename to ...
14394 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14395 it. Adjust to use ptids.
14396 (linux_attach_lwp): New.
14397 (linux_attach): Add process to processes table. Don't set
14399 (struct counter): New.
14400 (second_thread_of_pid_p, last_thread_of_process_p): New.
14401 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14402 multiple processes.
14403 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14404 processes. Remove process from process table.
14405 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14406 to multiple processes.
14407 (any_thread_of): New.
14408 (linux_detach): Add `pid' argument, and handle it. Remove process
14409 from processes table.
14410 (linux_join): Add `pid' argument. Handle it.
14411 (linux_thread_alive): Change unsighed long argument to ptid_t.
14412 Consider dead lwps as not being alive.
14413 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14414 threads we're not interested in.
14415 (same_lwp, find_lwp_pid): New.
14416 (linux_wait_for_lwp): Change `pid' argument's type from int to
14418 (linux_wait_for_event): Rename to ...
14419 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14420 from int to ptid_t. Adjust.
14421 (linux_wait_for_event): New.
14422 (linux_wait_1): Add `ptid' argument. Change return type to
14423 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14424 that exit from the process table.
14425 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14427 (mark_lwp_dead): New.
14428 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14429 stopping all threads, mark its main lwp as dead.
14430 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14432 (fetch_register, usr_store_inferior_registers)
14433 (regsets_fetch_inferior_registers)
14434 (regsets_store_inferior_registers, linux_read_memory)
14435 (linux_write_memory): Inline `inferior_pid'.
14436 (linux_look_up_symbols): Adjust to use per-process
14437 `thread_db_active'.
14438 (linux_request_interrupt): Adjust to use ptids.
14439 (linux_read_auxv): Inline `inferior_pid'.
14440 (initialize_low): Don't reference thread_db_active.
14441 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14442 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14443 (ps_getpid): Return the pid of the current inferior.
14444 * thread-db.c (proc_handle, thread_agent): Delete.
14445 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14447 (find_one_thread): Change argument type to ptid_t. Adjust to
14449 (maybe_attach_thread): Adjust to per-process data and ptids.
14450 (thread_db_find_new_threads): Ditto.
14451 (thread_db_init): Ditto.
14452 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14453 processes table. Adjust to use ptids.
14454 (spu_kill, spu_detach): Adjust interface. Remove process from
14456 (spu_join, spu_thread_alive): Adjust interface.
14457 (spu_wait): Adjust interface. Remove process from processes
14458 table. Adjust to use ptids.
14459 * win32-low.c (current_inferior_tid): Delete.
14460 (current_inferior_ptid): New.
14461 (debug_event_ptid): New.
14462 (thread_rec): Take a ptid. Adjust.
14463 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14464 (child_delete_thread): Ditto.
14465 (do_initial_child_stuff): Add `attached' argument. Add process to
14467 (child_fetch_inferior_registers, child_store_inferior_registers):
14469 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14470 (win32_attach): Pass 1 to do_initial_child_stuff.
14471 (win32_kill): Adjust interface. Remove process from processes
14473 (win32_detach): Ditto.
14474 (win32_join): Adjust interface.
14475 (win32_thread_alive): Take a ptid.
14476 (win32_resume): Adjust to use ptids.
14477 (get_child_debug_event): Ditto.
14478 (win32_wait): Adjust interface. Remove exiting process from
14481 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14483 Non-stop mode support.
14485 * server.h (non_stop): Declare.
14486 (gdb_client_data, handler_func): Declare.
14487 (delete_file_handler, add_file_handler, start_event_loop):
14489 (handle_serial_event, handle_target_event, push_event)
14490 (putpkt_notif): Declare.
14491 * target.h (enum resume_kind): New.
14492 (struct thread_resume): Replace `step' field by `kind' field.
14493 (TARGET_WNOHANG): Define.
14494 (struct target_ops) <wait>: Add `options' argument.
14495 <supports_non_stop, async, start_non_stop>: New fields.
14496 (target_supports_non_stop, target_async): New.
14497 (start_non_stop): Declare.
14498 (mywait): Add `options' argument.
14499 * target.c (mywait): Add `options' argument. Print child exit
14500 notifications here.
14501 (start_non_stop): New.
14502 * server.c (non_stop, own_buf, mem_buf): New globals.
14503 (struct vstop_notif): New.
14504 (notif_queue): New global.
14505 (queue_stop_reply, push_event, discard_queued_stop_replies)
14506 (send_next_stop_reply): New.
14507 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14509 (attach_inferior): In non-stop mode, don't wait for the target
14511 (handle_general_set): Handle QNonStop.
14512 (handle_query): When handling qC, return the current general
14513 thread, instead of the first thread of the list.
14514 (handle_query): If the backend supports non-stop mode, include
14515 QNonStop+ in the qSupported query response.
14516 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14518 (handle_v_attach, handle_v_run): Handle non-stop mode.
14519 (handle_v_stopped): New.
14520 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14521 (myresume): Adjust to use resume_kind. Handle non-stop.
14522 (queue_stop_reply_callback): New.
14523 (handle_status): Handle non-stop mode.
14524 (main): Clear non_stop flag on reconnection. Use the event-loop.
14525 Refactor serial protocol handling from here ...
14526 (process_serial_event): ... to this new function. When GDB
14527 selects any thread, select one here. In non-stop mode, wait until
14528 GDB acks all pending events before exiting.
14529 (handle_serial_event, handle_target_event): New.
14530 * remote-utils.c (remote_open): Install remote_desc in the event
14532 (remote_close): Remove remote_desc from the event loop.
14533 (putpkt_binary): Rename to...
14534 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14535 (putpkt_binary): New as wrapper around putpkt_binary_1.
14536 (putpkt_notif): New.
14537 (prepare_resume_reply): In non-stop mode, don't change the
14539 * event-loop.c: New.
14540 * Makefile.in (OBJ): Add event-loop.o.
14541 (event-loop.o): New rule.
14543 * linux-low.h (pid_of): Moved here.
14545 (get_lwp_thread): Use lwpid_of.
14546 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14547 * linux-low.c (pid_of): Delete.
14548 (inferior_pid): Use lwpid_of.
14549 (linux_event_pipe): New.
14550 (target_is_async_p): New.
14552 (handle_extended_wait): Use lwpid_of.
14553 (add_lwp): Don't set lwpid field.
14554 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14555 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14556 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14557 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14558 first. Adjust to linux_wait_for_event interface changes. Use
14560 (linux_detach): Don't delete the main lwp here.
14561 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14562 (status_pending_p): Don't consider explicitly suspended lwps.
14563 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14564 pointer. Add OPTIONS argument. Change return type to int. Use
14565 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14566 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14567 pointer. Add status pointer argument. Return a pid instead of a
14568 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14569 changes. In non-stop mode, don't switch to a random thread.
14570 (linux_wait): Rename to...
14571 (linux_wait_1): ... this. Add target_options argument, and handle
14572 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14573 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14574 clean exit and signal exit code. Don't stop all threads in
14575 non-stop mode. In all-stop mode, only stop all threads when
14576 reporting a stop to GDB. Handle explicit thread stop requests.
14577 (async_file_flush, async_file_mark): New.
14579 (send_sigstop): Use lwpid_of.
14580 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14581 interface changes. In non-stop mode, don't switch to a random
14583 (linux_resume_one_lwp): Use lwpid_of.
14584 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14585 (linux_resume_one_thread): ... this. Handle resume_stop. In
14586 non-stop mode, don't look for pending flag in all threads.
14587 (resume_status_pending_p): Don't consider explicitly suspended
14589 (my_waitpid): Reimplement. Emulate __WALL.
14590 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14592 (sigchld_handler, linux_supports_non_stop, linux_async)
14593 (linux_start_non_stop): New.
14594 (linux_target_ops): Register linux_supports_non_stop, linux_async
14595 and linux_start_non_stop.
14596 (initialize_low): Install SIGCHLD handler.
14597 * thread-db.c (thread_db_create_event, find_one_thread)
14598 (thread_db_get_tls_address): Use lwpid_of.
14599 * win32-low.c (win32_detach): Adjust to use resume_kind.
14600 (win32_wait): Add `options' argument.
14601 * spu-low.c (spu_resume): Adjust to use resume_kind.
14602 (spu_wait): Add `options' argument.
14604 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14606 Decouple target code from remote protocol.
14608 * target.h (enum target_waitkind): New.
14609 (struct target_waitstatus): New.
14610 (struct target_ops) <wait>: Return an unsigned long. Take a
14611 target_waitstatus pointer instead of a char pointer.
14612 (mywait): Likewise.
14613 * target.c (mywait): Change prototype to return an unsigned long.
14614 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14615 * server.h (thread_from_wait, old_thread_from_wait): Delete
14617 (prepare_resume_reply): Change prototype to take a
14619 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14620 (last_status, last_ptid): New.
14621 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14622 pid instead of a signal.
14623 (attach_inferior): Remove "status" and "signal" parameters.
14625 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14627 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14628 (handle_v_requests, myresume): Remove "status" and "signal"
14629 parameters. Adjust.
14630 (handle_status): New.
14631 (main): Delete local `status'. Adjust.
14632 * remote-utils.c: Include target.h.
14633 (prepare_resume_reply): Change prototype to take a
14634 target_waitstatus. Adjust.
14636 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14638 * spu-low.c (spu_wait): Adjust.
14639 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14641 (win32_wait): Adjust.
14643 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14645 * target.h (struct thread_resume): Delete leave_stopped member.
14646 (struct target_ops): Add a `n' argument to the `resume' callback.
14647 * server.c (start_inferior): Adjust.
14648 (handle_v_cont, myresume): Adjust.
14649 * linux-low.c (check_removed_breakpoint): Adjust to resume
14650 interface change, and to removed leave_stopped field.
14651 (resume_ptr): Delete.
14652 (struct thread_resume_array): New.
14653 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14654 resume interface change.
14655 (linux_continue_one_thread, linux_queue_one_thread)
14656 (resume_status_pending_p): Check if the resume field is NULL
14657 instead of checking the leave_stopped member.
14658 (linux_resume): Adjust to the target resume interface change.
14659 * spu-low.c (spu_resume): Adjust to the target resume interface
14661 * win32-low.c (win32_detach, win32_resume): Ditto.
14663 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14665 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14667 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14669 (linux_continue_one_thread): Only preserve the stepping flag if
14670 there's a pending breakpoint.
14672 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14674 * server.c (main): After the inferior having exited, call
14675 remote_close before exiting gdbserver.
14677 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14679 Fix size of FPSCR in Power 7 processors.
14680 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14681 (PPC_FEATURE_HAS_DFP): New #define.
14682 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14685 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14687 * server.c (handle_query) Whitespace and formatting.
14689 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14691 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14692 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14693 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14694 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14695 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14696 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14697 Makefile.in, configure.ac: Fix whitespace throughout.
14698 * configure: Regenerate.
14700 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14702 * inferiors.c (find_inferior): Make it safe for the callback
14703 function to delete the currently iterated inferior.
14705 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14707 * Makefile.in (linuw_low_h): Move higher.
14708 (thread-db.o): Depend on $(linux_low_h).
14710 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14712 Rename "process" to "lwp" throughout.
14714 * linux-low.c (all_processes): Rename to...
14715 (all_lwps): ... this.
14716 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14717 (add_process): Rename to ...
14718 (add_lwp): ... this. Adjust.
14719 (linux_create_inferior): Adjust.
14720 (linux_attach_lwp): Adjust.
14721 (linux_attach): Adjust.
14722 (linux_kill_one_process): Rename to ...
14723 (linux_kill_one_lwp): ... this. Adjust.
14724 (linux_kill): Adjust.
14725 (linux_detach_one_process): Rename to ...
14726 (linux_detach_one_lwp): ... this. Adjust.
14727 (linux_detach): Adjust.
14728 (check_removed_breakpoint): Adjust.
14729 (status_pending_p): Adjust.
14730 (linux_wait_for_process): Rename to ...
14731 (linux_wait_for_lwp): ... this. Adjust.
14732 (linux_wait_for_event): Adjust.
14733 (send_sigstop): Adjust.
14734 (wait_for_sigstop): Adjust.
14735 (stop_all_processes): Rename to ...
14736 (stop_all_lwps): ... this.
14737 (linux_resume_one_process): Rename to ...
14738 (linux_resume_one_lwp): ... this. Adjust.
14739 (linux_set_resume_request, linux_continue_one_thread)
14740 (linux_queue_one_thread, resume_status_pending_p)
14741 (usr_store_inferior_registers, regsets_store_inferior_registers)
14742 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14744 * linux-low.h (get_process): Rename to ...
14745 (get_lwp): ... this. Adjust.
14746 (get_thread_process): Rename to ...
14747 (get_thread_lwp): ... this. Adjust.
14748 (get_process_thread): Rename to ...
14749 (get_lwp_thread): ... this. Adjust.
14750 (struct process_info): Rename to ...
14751 (struct lwp_info): ... this.
14752 (all_processes): Rename to ...
14753 (all_lwps): ... this.
14754 * proc-service.c (ps_lgetregs): Adjust.
14755 * thread-db.c (thread_db_create_event, find_one_thread)
14756 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14758 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14760 * server.c (handle_query): Handle "qAttached".
14762 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14764 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14765 GPLv3, update license URL.
14767 2009-03-01 Doug Evans <dje@google.com>
14769 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14770 (server_h): Add gdb_signals.h.
14771 (signals.o): Update.
14772 * server.h (target_signal_from_host,target_signal_to_host_p)
14773 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14775 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14777 * remote-utils.c (getpkt): Also generate remote-debug
14778 information if noack_mode is set.
14780 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14782 * server.c (handle_query): Report qXfer:siginfo:read and
14783 qXfer:siginfo:write as supported and handle them.
14784 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14785 * linux-low.c (linux_xfer_siginfo): New.
14786 (linux_target_ops): Set it.
14788 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14790 * server.c (gdbserver_usage): Mention --remote-debug.
14791 (main): Accept '--remote-debug' switch.
14793 2009-01-18 Doug Evans <dje@google.com>
14795 * regcache.c (new_register_cache): No need to check result of xcalloc.
14796 * server.c (handle_search_memory): Back out calls to xmalloc,
14797 result is checked and error is returned to user upon failure.
14798 (handle_query): Ditto. Add more checks for result of malloc.
14799 (handle_v_cont): Check result of malloc, report error back to
14801 (handle_v_run): Ditto. Call freeargv.
14802 * server.h (freeargv): Declare.
14803 * utils.c (freeargv): New fn.
14805 2009-01-15 Doug Evans <dje@google.com>
14807 * gdbreplay.c (perror_with_name): Make arg const char *.
14808 * server.h (target_signal_to_name): Make return type const char *.
14809 * thread-db.c (thread_db_err_str): Make return type const char *.
14810 * utils.c (perror_with_name): Make arg const char *.
14812 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14814 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14815 when handling a EXIT_PROCESS_DEBUG_EVENT.
14817 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14819 * gdbreplay.c (gdbreplay_version): Update copyright year.
14820 * server.c (gdbserver_version): Likewise.
14822 2009-01-05 Doug Evans <dje@google.com>
14824 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14825 (handle_extended_wait): Improve comment.
14827 2008-12-13 Doug Evans <dje@google.com>
14829 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14830 * server.h (ATTR_MALLOC): New macro.
14831 (xmalloc,xcalloc,xstrdup): Declare.
14832 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14833 * inferiors.c: Ditto.
14834 * linux-low.c: Ditto.
14835 * mem-break.c: Ditto.
14836 * regcache.c: Ditto.
14837 * remote-utils.c: Ditto.
14840 * win32-low.c: Ditto.
14842 2008-12-12 Doug Evans <dje@google.com>
14844 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14845 in debugging printf.
14847 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14849 2008-12-09 Doug Evans <dje@google.com>
14851 * linux-low.h (struct process_info): Delete member tid, unused.
14852 * thread-db.c (find_one_thread): Update.
14853 (maybe_attach_thread): Update.
14855 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14857 * target.h (struct target_ops): Add qxfer_osdata member.
14858 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14860 (linux_qxfer_osdata): New functions.
14861 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14863 * server.c (handle_query): Handle "qXfer:osdata:read:".
14864 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14865 (buffer_xml_printf): New functions.
14866 * server.h (struct buffer): New.
14867 (buffer_grow_str, buffer_grow_str0): New macros.
14868 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14869 (buffer_xml_printf): Declare.
14871 2008-11-24 Doug Evans <dje@google.com>
14873 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14875 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14877 * server.c (handle_v_run): Always use the supplied argument list.
14879 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14881 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14882 (xtensa_regmap_table): Add entry for scompare1.
14884 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14886 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14887 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14888 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14889 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14890 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14891 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14892 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14893 XML target descriptions.
14894 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14895 when inferior is running on an ISA 2.05 or later processor. Add
14896 special case to return offset for full 64-bit slot of FPSCR when
14899 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14901 * Makefile.in (SFILES, clean): Added sparc64 files.
14902 (reg-sparc64.o, reg-sparc64.c): New.
14903 * configure.srv (sparc*-*-linux*): New configuration.
14904 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14905 syscall arguments for SPARC.
14906 (regsets_store_inferior_registers): Likewise.
14907 * linux-sparc-low.c: New file.
14909 2008-10-21 Doug Evans <dje@google.com>
14911 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14912 (READLINE_DIR,READLINE_DEP): Delete.
14913 (INTERNAL_CFLAGS): Update.
14914 (LINTFLAGS): Update.
14916 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14918 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14919 whole argv from the last run, not just argv[0].
14921 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14923 * regcache.c (new_register_cache): Return NULL if the register
14924 cache size isn't known yet.
14925 (free_register_cache): Avoid dereferencing a NULL regcache.
14927 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14929 * configure.srv: Merge MIPS and MIPS64.
14931 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14933 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14935 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14937 * Makefile.in: Add required vsx dependencies.
14939 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14940 Declare init_registers_powerpc_vsx32l.
14941 Declare init_registers_powerpc_vsx64l.
14942 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14943 (ppc_arch_setup): Check for VSX in hwcap.
14944 (ppc_fill_vsxregset): New function.
14945 (ppc_store_vsxregset): New function.
14946 Add new VSX entry in regset_info target_regsets.
14948 * configure.srv: Add new VSX dependencies.
14950 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14952 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14953 (remote_open): Set or clear transport_is_reliable.
14954 (putpkt_binary): Don't expect acks in noack mode.
14955 (getpkt): Don't send ack/nac in noack mode.
14956 * server.c (handle_general_set): Handle QStartNoAckMode.
14957 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14959 (main): Reset noack_mode on every connection.
14960 * server.h (noack_mode): Declare.
14962 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14964 * Makefile.in (GDBREPLAY_OBS): New variable.
14965 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14967 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14968 Daniel Jacobowitz <dan@codesourcery.com>
14970 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14971 (usr_store_inferior_registers): Likewise.
14972 (regsets_store_inferior_registers): Likewise.
14974 2008-07-31 Rolf Jansen <rj@surtec.com>
14975 Pedro Alves <pedro@codesourcery.com>
14977 * configure.ac: Check for memmem declaration.
14978 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14979 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14980 (disable_packet_qfThreadInfo): Unconditionally compile.
14981 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14982 * configure, config.in: Regenerate.
14984 2008-07-28 Doug Kwan <dougkwan@google.com>
14986 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14987 (linux_write_memory): Remove declaration of errno.
14989 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14991 * linux-low.c (handle_extended_wait): Do not use "status"
14992 variable uninitialized.
14994 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14996 * server.c (handle_v_attach): Inhibit reporting dll changes.
14998 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15000 * remote-utils.c (prepare_resume_reply): If requested, don't
15001 output "thread:TID" in the T stop reply.
15003 * server.c (disable_packet_vCont, disable_packet_Tthread)
15004 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15005 (handle_query): If requested, disable support for qC, qfThreadInfo
15007 (handle_v_requests): If requested, disable support for vCont.
15008 (gdbserver_show_disableable): New.
15009 (main): Handle --disable-packet and --disable-packet=LIST.
15011 * server.h (disable_packet_vCont, disable_packet_Tthread)
15012 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15014 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15016 * server.c (gdbserver_usage): Mention --version.
15018 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15020 * Makefile.in (gdbreplay.o): New rule.
15022 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15024 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15025 message, not gdbserver.
15027 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15028 Nathan Sidwell <nathan@codesourcery.com>
15029 Joseph Myers <joseph@codesourcery.com>
15031 * acinclude.m4: Include ../../config/acx.m4.
15032 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15033 * configure, config.in: Regenerate.
15034 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15035 * server.c (gdbserver_version): Print PKGVERSION.
15036 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15037 (main): Adjust gdbserver_usage calls.
15038 * gdbreplay.c (version, host_name): Add declarations.
15039 (gdbreplay_version, gdbreplay_usage): New.
15040 (main): Accept --version and --help options.
15042 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15044 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15045 (arm_breakpoint_at): Handle Thumb.
15046 (the_low_target): Add comment.
15048 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15050 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15052 2008-05-09 Doug Evans <dje@google.com>
15054 * server.h (decode_search_memory_packet): Declare.
15055 * remote-utils.c (decode_search_memory_packet): New fn.
15056 * server.c (handle_search_memory_1): New fn.
15057 (handle_search_memory): New fn.
15058 (handle_query): Process qSearch:memory packets.
15060 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15062 * regcache.c (registers_length): Remove.
15063 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15064 full register packet.
15065 * regcache.h (registers_length): Remove prototype.
15066 * server.h (PBUFSIZ): Define to 16384.
15068 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15070 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15071 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15072 powerpc-64l.o, and powerpc-altivec64l.o.
15073 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15074 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15075 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15076 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15077 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15080 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15081 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15082 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15083 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15084 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15085 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15086 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15087 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15088 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15089 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15092 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15093 (init_registers_powerpc_32l): ... this new prototype.
15094 (init_registers_powerpc_32): Remove, replace by ...
15095 (init_registers_powerpc_altivec32l): ... this new prototype.
15096 (init_registers_powerpc_e500): Remove, replace by ...
15097 (init_registers_powerpc_e500l): ... this new prototype.
15098 (init_registers_ppc64): Remove, replace by ...
15099 (init_registers_powerpc_64l): ... this new prototype.
15100 (init_registers_powerpc_64): Remove, replace by ...
15101 (init_registers_powerpc_altivec64l): ... this new prototype.
15102 (ppc_num_regs): Set to 73.
15103 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15104 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15105 (ppc_cannot_store_register): Handle orig_r3 and trap.
15106 (ppc_arch_setup): Update init_registers_... calls.
15107 (ppc_fill_gregset): Handle orig_r3 and trap.
15109 * inferiors.c (clear_inferiors): Reset current_inferior.
15111 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15113 * acinclude.m4: Add override.m4.
15114 * configure: Regenerate.
15116 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15118 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15119 initial call to init_register_ppc64.
15121 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15123 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15124 single powerpc*-*-linux* case.
15125 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15127 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15129 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15130 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15132 * linux-ppc-low.c: Include <elf.h>.
15133 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15134 (ppc_hwcap): New global variable.
15135 (ppc_regmap): Remove __SPE__ #ifdef sections.
15136 (ppc_regmap_e500): New global variable.
15137 (ppc_cannot_store_register): Update __SPE__ special case.
15138 (ppc_get_hwcap): New function.
15139 (ppc_arch_setup): Use it to determine whether inferior supports
15140 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15141 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15142 Do not access registers if target does not support AltiVec.
15143 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15144 Do not access registers if target does not support SPE.
15145 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15147 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15149 * linux-low.c (disabled_regsets, num_regsets): New.
15150 (use_regsets_p): Delete.
15151 (linux_wait_for_process): Clear disabled_regsets.
15152 (regsets_fetch_inferior_registers): Check and set it.
15153 (regsets_store_inferior_registers): Likewise.
15154 (linux_fetch_registers, linux_store_registers): Do not use
15156 (initialize_low): Allocate disabled_regsets.
15158 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15160 * Makefile.in (LIBOBJS): New.
15161 (OBS): Use LIBOBJS.
15162 (memmem.o): New rule.
15163 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15164 * configure: Regenerated.
15166 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15168 * server.c (handle_query): Never return "unsupported" for
15169 qXfer:features:read queries.
15171 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15173 * server.c (get_features_xml): Fix inverted condition.
15174 (handle_query): Always support qXfer:feature:read.
15176 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15178 * server.c (wrapper_argv): New.
15179 (start_inferior): Handle wrapper_argv. If set, expect an extra
15181 (gdbserver_usage): Document --wrapper.
15182 (main): Parse --wrapper.
15184 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15186 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15187 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15188 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15189 (ppc_set_pc): Likewise.
15190 (ppc_arch_setup): New function.
15191 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15192 of collect_register.
15193 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15195 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15197 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15198 instead of linux-ppc64-low.o.
15199 * linux-ppc64-low.c: Remove file.
15200 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15201 (linux-ppc64-low.o): Remove rule.
15203 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15204 (init_registers_powerpc_64): Likewise.
15205 (ppc_regmap): Conditionally define depending on __powerpc64__.
15206 (ppc_cannot_store_register): Do not special-case "fpscr" when
15207 compiled on __powerpc64__.
15208 (ppc_collect_ptrace_register): New function.
15209 (ppc_supply_ptrace_register): New function.
15210 (ppc_breakpoint): Change type to "unsigned int".
15211 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15212 (the_low_target): Conditionally provide initializers for the
15213 arch_setup member depending on __powerpc64__. Install
15214 collect_ptrace_register and supply_ptrace_register members.
15216 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15218 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15219 * server.c (gdbserver_xmltarget): Define.
15220 (get_features_xml): Use it to replace "target.xml" and arch_string.
15222 * configure.srv: Remove srv_xmltarget. Add XML files that were
15223 mentioned there to srv_xmlfiles instead. Remove conditional tests
15224 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15225 srv_xmlfiles and srv_regobj to include all possible choices.
15226 * configure.ac (srv_xmltarget): Remove.
15227 (srv_xmlfiles): Do not add "target.xml".
15228 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15229 checks for supplementary target information.
15230 * configure: Regenerate.
15231 * Makefile.in (XML_TARGET): Remove.
15232 (target.xml): Remove rule.
15233 (clean): Do not clean up target.xml.
15234 (.PRECIOUS): Do not mention target.xml.
15236 * target.h (struct target_ops): Remove arch_string member.
15237 * linux-low.c (linux_arch_string): Remove.
15238 (linux_target_ops): Remove arch_string initializer.
15239 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15240 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15241 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15242 * spu-low.c (spu_arch_string): Remove.
15243 (spu_target_ops): Remove arch_string initializer.
15244 * win32-low.c (win32_arch_string): Remove.
15245 (win32_target_ops): Remove arch_string initializer.
15246 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15247 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15248 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15250 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15252 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15253 by collect_ptrace_register and supply_ptrace_register hooks.
15254 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15255 instead of checking for the_low_target.left_pad_xfer.
15256 (usr_store_inferior_registers): Use collect_ptrace_register callback
15257 instead of checking for the_low_target.left_pad_xfer.
15259 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15260 (s390_supply_ptrace_register): Likewise.
15261 (s390_fill_gregset): Call s390_collect_ptrace_register.
15262 (the_low_target): Update.
15264 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15265 (ppc_supply_ptrace_register): Likewise.
15266 (the_low_target): Update.
15268 * linux-i386-low.c (the_low_target): Update.
15269 * linux-x86-64-low.c (the_low_target): Update.
15271 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15273 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15274 reg-s390.o and reg-s390x.o.
15276 * linux-low.c (new_inferior): New global variable.
15277 (linux_create_inferior, linux_attach): Set it.
15278 (linux_wait_for_process): Call the_low_target.arch_setup after the
15279 target has stopped for the first time.
15280 (initialize_low): Do not call the_low_target.arch_setup.
15282 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15283 (s390_set_pc): Likewise.
15284 (s390_arch_setup): New function.
15285 (the_low_target): Use s390_arch_setup as arch_setup routine.
15287 * regcache.c (realloc_register_cache): New function.
15288 (set_register_cache): Call it for each existing regcache.
15290 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15292 * server.h (init_registers): Remove prototype.
15294 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15295 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15296 instead of init_registers ().
15297 * linux-arm-low.c (init_registers_arm): Add prototype.
15298 (init_registers_arm_with_iwmmxt): Likewise.
15299 (the_low_target): Add initializer for arch_setup field.
15300 * linux-cris-low.c (init_registers_cris): Add prototype.
15301 (the_low_target): Add initializer for arch_setup field.
15302 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15303 (the_low_target): Add initializer for arch_setup field.
15304 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15305 (the_low_target): Add initializer for arch_setup field.
15306 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15307 (the_low_target): Add initializer for arch_setup field.
15308 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15309 (the_low_target): Add initializer for arch_setup field.
15310 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15311 (the_low_target): Add initializer for arch_setup field.
15312 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15313 (init_registers_mips64_linux): Likewise.
15314 (the_low_target): Add initializer for arch_setup field.
15315 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15316 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15317 (the_low_target): Add initializer for arch_setup field.
15318 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15319 (init_registers_powerpc_64): Likewise.
15320 (the_low_target): Add initializer for arch_setup field.
15321 * linux-s390-low.c (init_registers_s390): Add prototype.
15322 (init_registers_s390x): Likewise.
15323 (the_low_target): Add initializer for arch_setup field.
15324 * linux-sh-low.c (init_registers_sh): Add prototype.
15325 (the_low_target): Add initializer for arch_setup field.
15326 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15327 (the_low_target): Add initializer for arch_setup field.
15328 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15329 (the_low_target): Add initializer for arch_setup field.
15331 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15332 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15333 instead of init_registers ().
15334 * win32-arm-low.c (init_registers_arm): Add prototype.
15335 (the_low_target): Add initializer for arch_setup field.
15336 * win32-i386-low.c (init_registers_i386): Add prototype.
15337 (the_low_target): Add initializer for arch_setup field.
15339 * spu-low.c (init_registers_spu): Add prototype.
15340 (initialize_low): Call initialie_registers_spu () instead of
15341 initialize_registers ().
15343 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15345 * server.c (handle_v_requests): When handling the vRun and vAttach
15346 packets, if already debugging a process, don't kill it. Return an
15349 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15351 * server.c (handle_query): Correct length check.
15353 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15355 * win32-low.c (do_initial_child_stuff): Add process handle
15356 parameter. Set current_process_handle and current_process_id from the
15357 parameters. Clear globals.
15358 (win32_create_inferior): Don't set current_process_handle and
15359 current_process_id here. Instead pass them on the call to
15360 do_initial_child_stuff.
15361 (win32_attach): Likewise.
15362 (win32_clear_inferiors): New.
15363 (win32_kill): Don't close the current process handle or the
15364 current thread handle here. Instead call win32_clear_inferiors.
15365 (win32_detach): Don't open a new handle to the process. Call
15366 win32_clear_inferiors.
15367 (win32_join): Don't rely on current_process_handle; open a new
15368 handle using the process id.
15369 (win32_wait): Call win32_clear_inferiors when the inferior process
15372 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15374 * server.c (monitor_show_help): Add "exit".
15376 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15378 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15379 (clean): Add reg-xtensa.c.
15380 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15381 * configure.srv (xtensa*-*-linux*) New target.
15382 * linux-xtensa-low.c: New.
15383 * xtensa-xtregs.c: New.
15385 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15387 * hostio.c: Don't include errno.h.
15388 (errno_to_fileio_errno): Move to hostio-errno.
15389 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15390 error number outputting to the target->hostio_last_error callback.
15391 (hostio_packet_error): Use FILEIO_EINVAL directly.
15392 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15393 calls to hostio_error.
15394 * hostio-errno.c: New.
15395 * server.h (hostio_last_error_from_errno): Declare.
15396 * target.h (target_ops): Add hostio_last_error member.
15397 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15398 as hostio_last_error handler.
15399 * spu-low.c (spu_target_ops): Likewise.
15400 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15401 (wince_hostio_last_error): New functions.
15402 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15403 as hostio_last_error handler.
15404 (win32_target_ops) [!_WIN32_WCE]: Register
15405 hostio_last_error_from_errno as hostio_last_error handler.
15406 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15407 (hostio-errno.o): New rule.
15408 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15409 * configure.srv (srv_hostio_err_objs): New variable. Default to
15411 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15412 * configure: Regenerate.
15414 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15416 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15417 (linux_kill, linux_detach): Clean up the process list.
15418 * remote-utils.c (remote_open): Improve port number parsing.
15419 (putpkt_binary, input_interrupt): Only send interrupts if the target
15421 * server.c (extended_protocol): Make static.
15422 (attached): Define earlier.
15423 (exit_requested, response_needed, program_argv): New variables.
15424 (target_running): New.
15425 (start_inferior): Clear attached here.
15426 (attach_inferior): Set attached here.
15427 (require_running): Define.
15428 (handle_query): Use require_running and target_running. Implement
15430 (handle_v_attach, handle_v_run): New.
15431 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15432 (gdbserver_usage): Update.
15433 (main): Redo argument parsing. Handle --debug and --multi. Handle
15434 --attach along with other options or after the port. Save
15435 program_argv. Support no initial program. Resynchronize
15436 communication with GDB after an error. Handle "monitor exit".
15437 Use require_running and target_running. Always allow the extended
15438 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15439 restart in extended mode.
15440 * README: Refer to the GDB manual. Update --attach usage.
15442 2007-12-20 Andreas Schwab <schwab@suse.de>
15444 * linux-low.c (STACK_SIZE): Define.
15445 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15446 (linux_test_for_tracefork): Likewise.
15448 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15450 * linux-low.c (linux_wait_for_event): Update messages. Do not
15451 reinsert auto-delete breakpoints.
15452 * mem-break.c (struct breakpoint): Change return type of handler to
15454 (set_breakpoint_at): Update handler type.
15455 (reinsert_breakpoint_handler): Return 1 instead of calling
15457 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15459 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15460 * mem-break.h (set_breakpoint_at): Update handler type.
15461 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15462 * win32-low.c (auto_delete_breakpoint): New.
15463 (get_child_debug_event): Use it.
15465 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15467 * configure.ac: Check for pread and pwrite.
15468 * hostio.c (handle_pread): Fall back to lseek and read.
15469 (handle_pwrite): Fall back to lseek and write.
15470 * config.in, configure: Regenerated.
15472 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15474 * server.c (myresume): Add own_buf argument.
15475 (main): Update calls.
15477 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15479 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15480 * remote-utils.c (remote_open): Do not call disable_async_io.
15481 (block_async_io): Delete.
15482 (unblock_async_io): Make static.
15483 (initialize_async_io): New.
15484 * server.c (handle_v_cont): Handle async I/O here.
15485 (myresume): Likewise. Move other common resume tasks here...
15486 (main): ... from here. Call initialize_async_io. Disable async
15487 I/O before the main loop.
15488 * server.h (initialize_async_io): Declare.
15489 (block_async_io, unblock_async_io): Delete prototypes.
15490 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15492 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15494 * remote-utils.c (readchar): Allow binary data in received messages.
15496 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15498 * win32-low.c (attaching): New global.
15499 (win32_create_inferior): Clear the `attaching' global.
15500 (win32_attach): Set the `attaching' global.
15501 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15502 attaching. Only set a breakpoint at the entry point if not
15505 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15507 * server.c (main): Don't report dll events on the initial
15508 connection on attaches.
15510 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15512 * server.c (main): Relax numerical bases supported for the pid of
15513 the --attach command line argument.
15515 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15517 * win32-low.c (win32_attach): Call OpenProcess before
15518 DebugActiveProcess, not after. Add last error output to error
15521 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15523 * win32-low.c (win32_get_thread_context)
15524 (win32_set_thread_context): New functions.
15525 (thread_rec): Use win32_get_thread_context.
15526 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15527 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15530 2007-12-03 Leo Zayas
15531 Pedro Alves <pedro_alves@portugalmail.pt>
15533 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15535 (child_add_thread): Minor cleanup.
15536 (child_continue): Resume artificially suspended threads before
15537 calling ContinueDebugEvent.
15538 (suspend_one_thread): New.
15539 (fake_breakpoint_event): New.
15540 (get_child_debug_event): Change return type to int. Check here if
15541 gdb sent an interrupt request. If a soft interrupt was requested,
15542 fake a breakpoint event. Return 0 if there is no event to handle,
15544 (win32_wait): Don't check here if gdb sent an interrupt request.
15545 Ensure there is a valid event to handle.
15546 (win32_request_interrupt): Add soft interruption method as last
15549 2007-12-03 Leo Zayas
15550 Pedro Alves <pedro_alves@portugalmail.pt>
15552 * win32-low.h (win32_thread_info): Add descriptions to the
15553 structure members. Replace `suspend_count' counter by a
15555 * win32-low.c (thread_rec): Update condition of when to get the
15556 context from the inferior. Rely on ContextFlags being set if it
15557 has already been retrieved. Only suspend the inferior thread if
15558 we haven't already. Warn if that fails.
15559 (continue_one_thread): s/suspend_count/suspended/. Only call
15560 ResumeThread once. Warn if that fails.
15562 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15564 * win32-low.c (win32_wait): Don't read from the inferior when it
15565 has already exited.
15567 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15569 * Makefile.in (win32_low_h): New variable.
15570 (win32-low.o): Add dependency on $(win32_low_h).
15571 (win32-arm-low.o, win32-i386-low.o): New rules.
15573 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15575 * hostio.c: Correct copyright year.
15577 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15579 * Makefile.in (OBS): Add hostio.o.
15580 (hostio.o): New rule.
15581 * server.h (handle_vFile): Declare.
15582 * hostio.c: New file.
15583 * server.c (handle_v_requests): Take packet_len and new_packet_len
15584 for binary packets. Call handle_vFile.
15585 (main): Update call to handle_v_requests.
15587 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15589 * linux-low.c: Include <sched.h>.
15591 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15593 * linux-low.c (linux_tracefork_grandchild): New.
15594 (linux_tracefork_child): Use clone.
15595 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15597 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15599 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15601 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15603 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15605 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15607 * inferiors.c (change_inferior_id): Delete.
15608 (add_pid_to_list, pull_pid_from_list): New.
15609 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15610 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15611 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15612 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15613 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15614 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15615 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15616 (using_threads): Always set to 1.
15617 (handle_extended_wait): New.
15618 (add_process): Do not set TID.
15619 (linux_create_inferior): Set must_set_ptrace_flags.
15620 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15621 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15622 (linux_thread_alive): Rename TID argument to LWPID.
15623 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15624 (linux_wait_for_event): Do not use TID or check using_threads. Update
15625 call to dead_thread_notify. Call handle_extended_wait.
15626 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15627 (send_sigstop): Delete sigstop_sent.
15628 (wait_for_sigstop): Avoid TID.
15629 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15630 (linux_test_for_tracefork): New.
15631 (linux_lookup_signals): Use thread_db_active and
15632 linux_supports_tracefork_flag.
15633 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15634 * linux-low.h (get_process_thread): Avoid TID.
15635 (struct process_ifo): Move thread_known and tid to the end. Remove
15637 (linux_attach_lwp, thread_db_init): Update prototypes.
15638 * server.h (change_inferior_id): Delete prototype.
15639 (add_pid_to_list, pull_pid_from_list): New prototypes.
15640 * thread-db.c (thread_db_use_events): New.
15641 (find_first_thread): Rename to...
15642 (find_one_thread): ...this. Update callers and messages. Do not
15643 call fatal. Check thread_db_use_events. Do not call
15644 change_inferior_id or new_thread_notify.
15645 (maybe_attach_thread): Update. Do not call new_thread_notify.
15646 (thread_db_init): Set thread_db_use_events. Check use_events.
15647 * utils.c (fatal, warning): Correct message prefix.
15649 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15651 * Makefile.in (clean): Remove new files.
15652 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15653 (powerpc-64.o, powerpc-64.c): New rules.
15654 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15655 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15657 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15659 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15660 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15661 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15662 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15663 (target_regsets): Add AltiVec and SPE register sets.
15664 * configure.ac: Check for AltiVec and SPE.
15665 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15666 (ppc_fill_vrregset, ppc_store_vrregset): New.
15667 (target_regsets): Add AltiVec register set.
15668 * configure: Regenerated.
15670 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15672 * linux-low.c (O_LARGEFILE): Define.
15673 (linux_read_memory): Use /proc/PID/mem.
15674 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15675 * configure, config.in: Regenerated.
15677 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15679 * linux-low.c (linux_wait_for_event): Do not pass signals while
15682 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15684 * win32-low.c (create_process): New.
15685 (win32_create_inferior): Use create_process instead of
15686 CreateProcess. If create_process failed retry appending an ".exe"
15687 suffix. Store the GetLastError result immediatelly after
15688 create_process calls and use it on the call to error.
15690 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15692 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15694 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15696 * configure.ac: Switch license to GPLv3.
15698 2007-08-01 Michael Snyder <msnyder@access-company.com>
15700 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15702 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15704 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15706 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15707 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15708 CloseToolhelp32Snapshot.
15709 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15710 CloseToolhelp32Snapshot.
15712 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15714 * server.c (main): Check for inferior exit before main loop.
15716 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15718 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15719 instead of on tmp_desc.
15721 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15722 Daniel Jacobowitz <dan@codesourcery.com>
15724 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15725 (add_thread): Minor cleanups.
15726 (clear_inferiors): Move lower in the file. Clear the DLL
15728 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15729 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15730 (xml_escape_text): New.
15731 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15733 (handle_v_cont): Report errors.
15734 (gdbserver_version): Update.
15735 (main): Correct size of own_buf. Do not report initial DLL events.
15736 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15737 (unloaded_dll, xml_escape_text): New.
15738 * win32-low.c (enum target_waitkind): Update comments.
15739 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15740 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15741 (win32_EnumProcessModules, win32_GetModuleInformation)
15742 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15743 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15744 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15745 (win32_Module32First, win32_Module32Next, load_toolhelp)
15746 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15747 (get_child_debug_event): Handle DLL events.
15748 (win32_wait): Likewise.
15750 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15752 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15753 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15755 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15757 * win32-low.c (handle_output_debug_string): Ignore event if not
15760 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15762 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15764 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15766 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15768 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15770 * inferiors.c (change_inferior_id): Add comment.
15771 * linux-low.c (check_removed_breakpoint): Add an early
15772 prototype. Improve debug output.
15773 (linux_attach): Doc update.
15774 (linux_detach_one_process, linux_detach): Clean up before releasing
15776 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15777 * linux-low.h (struct process_info): Doc improvement.
15778 * mem-break.c (delete_all_breakpoints): New.
15779 * mem-break.h (delete_all_breakpoints): New prototype.
15780 * thread-db.c (find_first_thread): New.
15781 (thread_db_create_event): Call it instead of
15782 thread_db_find_new_threads. Clean up unused variables.
15783 (maybe_attach_thread): Remove first thread handling.
15784 (thread_db_find_new_threads): Use find_first_thread.
15785 (thread_db_get_tls_address): Likewise.
15787 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15789 * thread-db.c (thread_db_find_new_threads): Add prototype.
15790 (thread_db_create_event): Check for the main thread before adding
15792 (maybe_attach_thread): Only enable event reporting if TID == 0.
15793 (thread_db_get_tls_address): Check for new threads.
15795 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15797 * linux-low.c (linux_create_inferior): Try execv before execvp.
15798 * spu-low.c (spu_create_inferior): Likewise.
15800 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15802 * linux-low.c (linux_create_inferior): Change execv to execvp.
15803 * spu-low.c (spu_create_inferior): Likewies.
15805 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15807 * Makefile.in (clean): Clean new files instead of deleted ones.
15808 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15809 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15811 * configure.srv: Specify XML files and new regformats for MIPS and
15813 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15814 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15815 an entry for the restart register.
15816 (mips_cannot_fetch_register, mips_cannot_store_register)
15817 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15818 register names to match the XML descriptions.
15819 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15820 restart register instead of $0.
15822 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15823 Markus Deuling <deuling@de.ibm.com>
15825 * remote-utils.c (decode_xfer_write): New function.
15826 * server.h (decode_xfer_write): Add prototype.
15827 * server.c (handle_query): Add PACKET_LEN argument. Support
15828 qXfer:spu:read and qXfer:spu:write packets.
15829 (main): Pass packet_len to handle_query.
15830 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15831 * target.h (target_ops): Add qxfer_spu.
15833 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15835 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15836 accessing non-seekable spufs files.
15838 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15840 * server.c (handle_query): Add reply for qC packet.
15842 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15843 Leo Zayas <lerele@champenstudios@com>
15845 * server.h (check_remote_input_interrupt_request): New function.
15846 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15847 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15848 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15849 (check_remote_input_interrupt_request): New function.
15850 * server.h (check_remote_input_interrupt_request): Declare.
15851 * win32-low.c (winapi_DebugBreakProcess,
15852 winapi_GenerateConsoleCtrlEvent): New typedefs.
15853 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15855 (win32_wait): Check for remote interrupt request
15856 with check_remote_input_interrupt_request.
15857 (win32_request_interrupt): New function.
15858 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15860 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15862 * win32-low.c (debug_registers_changed,
15863 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15864 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15865 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15866 (thread_rec): Get context using the low target.
15867 (child_add_thread): Call thread_added on the low target,
15868 which does the same thing.
15870 (do_initial_child_stuff): Remove debug registers references.
15871 Set context using the low target. Resume threads after
15872 setting the contexts.
15873 (child_continue): Remove dead variable. Remove debug
15874 registers references.
15875 (child_fetch_inferior_registers): Go through the low target.
15876 (do_child_store_inferior_registers): Remove.
15877 (child_store_inferior_registers): Go through the low target.
15878 (win32_resume): Remove debug registers references.
15879 Set context using the low target.
15880 (handle_exception): Change return type to void. Don't record
15881 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15882 first chance exception.
15883 (get_child_debug_event): Change return type to void. Remove
15884 goto loop. Always return after waiting for debug event.
15885 (win32_wait): Convert to switch statement. Handle spurious
15888 * win32-i386-low.c (debug_registers_changed,
15889 debug_registers_used): New.
15890 (initial_stuff): Rename to ...
15891 (i386_initial_stuff): ... this. Clear debug registers
15893 (store_debug_registers): Delete.
15894 (i386_get_thread_context): New.
15895 (load_debug_registers): Delete.
15896 (i386_set_thread_context): New.
15897 (i386_thread_added): New.
15898 (single_step): Rename to ...
15899 (i386_single_step): ... this.
15900 (do_fetch_inferior_registers): Rename to ...
15901 (i386_fetch_inferior_register): ... this.
15902 (i386_store_inferior_register): New.
15903 (the_low_target): Adapt to new interface.
15905 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15906 (arm_get_thread_context): New.
15907 (arm_set_thread_context): New.
15909 (do_fetch_inferior_registers): Rename to ...
15910 (arm_fetch_inferior_register): ... this.
15911 (arm_store_inferior_register): New.
15912 (arm_wince_breakpoint): Reimplement as unsigned long.
15913 (arm_wince_breakpoint_len): Define.
15914 (the_low_target): Adapt to new interface.
15916 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15917 load_debug_registers. Add get_thread_context, set_thread_context,
15918 thread_added and store_inferior_register. Rename
15919 fetch_inferior_registers to fetch_inferior_register.
15920 (regptr): Remove declaration.
15922 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15924 * linux-low.c (linux_detach): Change return type to int. Return 0.
15925 * spu-low.c (spu_detach): Likewise.
15927 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15929 * target.h (target_ops): Change return type of detach to int.
15931 (join_inferior): New.
15932 * server.c (main): Don't skip detach support on mingw32.
15933 If the inferior doesn't support detaching return error.
15934 Call join_inferior instead of using waitpid.
15935 * linux-low.c (linux_join): New.
15936 (linux_target_op): Add linux_join.
15937 * spu-low.c (spu_join): New.
15938 (spu_target_ops): Add spu_join.
15939 * win32-low.c (win32_detach): Adapt to new interface.
15940 Reopen current_process_handle before detaching. Issue a child
15941 resume before detaching.
15943 (win32_target_op): Add win32_join.
15945 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15947 * win32-low.c (win32-attach): Fix return value.
15948 * target.h (target_ops): Describe ATTACH return values.
15950 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15952 * win32-low.c (GETPROCADDRESS): Define.
15953 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15954 (winapi_DebugSetProcessKillOnExit): Likewise.
15955 (win32_create_inferior): Force usage of ansi CreateProcessA.
15956 (win32_attach): Use GETPROCADDRESS.
15957 (win32_detach): Likewise.
15959 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15961 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15963 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15965 * win32-low.c: Commit leftover changes from 2007-03-29.
15967 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15969 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15970 fields short instead of int. Add explicit padding.
15971 (i387_cache_to_fsave): Remove unnecessary casts.
15972 (i387_fsave_to_cache): Doc fix.
15973 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15975 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15977 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15978 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15980 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15982 * configure.srv (arm*-*-mingw32ce*): Move near the other
15985 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15987 * configure.ac: Add errno checking.
15988 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15989 sys/file.h and malloc.h.
15990 (AC_CHECK_DECLS): Add perror.
15991 (srv_mingwce): Handle.
15992 * configure.srv (i[34567]86-*-cygwin*): Add
15993 win32-i386-low.o to srv_tgtobj.
15994 (i[34567]86-*-mingw*): Likewise.
15995 (arm*-*-mingw32ce*): Add case.
15996 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15997 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15998 [__MINGW32CE__] (strerror): New function.
15999 [__MINGW32CE__] (errno): Define to GetLastError.
16000 [__MINGW32CE__] (COUNTOF): New macro.
16001 (remote_open): Remove extra close call.
16002 * mem-break.c (delete_breakpoint_at): New function.
16003 * mem-break.h (delete_breakpoint_at): Declare.
16004 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16005 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16006 [USE_WIN32API] (read, write): Add char* casts.
16007 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16008 * server.h: Include wincecompat.h on Windows CE.
16009 [HAVE_ERRNO_H]: Check.
16010 (perror): Declare if not declared.
16011 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16012 (perror_with_name): Remove errno declaration.
16013 * wincecompat.h: New.
16014 * wincecompat.c: New.
16015 * win32-low.h: New.
16016 * win32-arm-low.c: New.
16017 * win32-i386-low.c: New.
16018 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16019 (OUTMSG2): Make it safe.
16021 (COUNTOF): New macro.
16022 (NUM_REGS): Get it from the low target.
16023 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16024 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16025 (thread_rec): Let low target handle debug registers.
16026 (child_add_thread): Likewise.
16027 (child_init_thread_list): Likewise.
16028 (continue_one_thread): Likewise.
16030 (do_child_fetch_inferior_registers): Move to ...
16031 * win32-i386-low.c: ... here, and rename to ...
16032 (do_fetch_inferior_registers): ... this.
16033 * win32-low.c (child_fetch_inferior_registers):
16034 Go through the low target.
16035 (do_child_store_inferior_registers): Use regptr.
16036 (strwinerror): New function.
16037 (win32_create_inferior): Handle Windows CE.
16038 Use strwinerror instead of strerror on Windows error
16039 codes. Add program to the error output.
16040 Don't close the main thread handle on Windows CE.
16041 (win32_attach): Use coredll.dll on Windows CE.
16042 (win32_kill): Close current process and current
16044 (win32_detach): Use coredll.dll on Windows CE.
16045 (win32_resume): Let low target handle debug registers, and
16047 (handle_exception): Add/Remove initial breakpoint. Avoid
16048 non-existant WSTOPSIG on Windows CE.
16049 (win32_read_inferior_memory): Cast to remove warning.
16050 (win32_arch_string): Go through the low target.
16051 (initialize_low): Call set_breakpoint_data with the low
16052 target's breakpoint.
16053 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16054 FOP_REGNUM, mappings): Move to ...
16055 * win32-i386-low.c: ... here.
16056 * win32-low.c (win32_thread_info): Move to ...
16057 * win32-low.h: ... here.
16058 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16059 win32-arm-low.c and wincecompat.c.
16060 (all:): Add $EXEEXT.
16061 (install-only:): Likewise.
16062 (gdbserver:): Likewise.
16063 (gdbreplay:): Likewise.
16064 * config.in: Regenerate.
16065 * configure: Regenerate.
16067 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16069 * win32-low.c: Rename typedef thread_info to
16070 win32_thread_info throughout.
16072 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16074 * win32-i386-low.c: Rename to ...
16075 * win32-low.c: ... this.
16076 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16077 * Makefile.in: Likewise.
16079 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16081 * remote-utils.c (monitor_output): Constify msg parameter.
16082 * server.h (monitor_output): Likewise.
16083 * win32-i386-low.c (handle_output_debug_string): New.
16084 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16085 handle_output_debug_string.
16086 (get_child_debug_event): Likewise.
16088 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16090 * server.c (main): Correct strtoul check.
16092 2007-03-27 Jon Ringle <jon@ringle.org>
16094 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16096 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16098 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16100 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16102 * terminal.h: Check HAVE_SGTTY_H.
16104 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16106 * remote-utils.c (remote_open): Print out the assigned port number.
16108 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16110 * remote-utils.c (monitor_output): New function.
16111 * server.c (debug_threads): Define here.
16112 (monitor_show_help): New function.
16113 (handle_query): Handle qRcmd.
16114 (main): Do not handle 'd' packet.
16115 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16116 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16119 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16121 * Makefile.in (EXEEXT): New.
16122 (clean): Use $(EXEEXT).
16124 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16126 * target.h (target_ops): Rename send_signal to request_interrupt,
16127 and remove enum target_signal parameter.
16128 * linux-low.c (linux_request_interrupt): Rename from
16129 linux_send_signal, and always send SIGINT.
16130 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16131 and always send SIGINT.
16132 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16134 (input_interrupt): Likewise.
16136 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16138 * server.c (get_features_xml): Check if target implemented
16140 * win32-i386-low.c (win32_arch_string): New.
16141 (win32_target_ops): Add win32_arch_string as arch_string member.
16143 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16145 * spu-low.c (spu_arch_string): New.
16146 (spu_target_ops): Add spu_arch_string.
16148 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16150 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16151 * configure.ac: Do not check for terminal.h.
16152 * configure, config.in: Regenerated.
16154 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16156 * Makefile.in (OBS): Add $(XML_BUILTIN).
16157 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16159 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16160 (arm-with-iwmmxt.c): New.
16161 * config.in, configure: Regenerate.
16162 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16163 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16164 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16165 (arm*-*-linux*): Add iWMMXt and regset support.
16166 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16167 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16168 (arm_store_wmmxregset, target_regsets): New.
16169 * server.c (get_features_xml): Take annex argument. Check builtin
16171 (handle_query): Handle multiple annexes.
16173 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16175 * remote-utils.c [USE_WIN32API] (read, write): Define.
16176 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16179 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16181 * linux-i386-low.c (the_low_target): Set arch_string.
16182 * linux-x86-64-low.c (the_low_target): Likewise.
16183 * linux-low.c (linux_arch_string): New.
16184 (linux_target_ops): Add it.
16185 * linux-low.h (struct linux_target_ops): Add arch_string.
16186 * server.c (write_qxfer_response): Use const void * for DATA.
16187 (get_features_xml): New.
16188 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16189 * target.h (struct target_ops): Add arch_string method.
16191 2007-01-03 Denis Pilat <denis.pilat@st.com>
16192 Daniel Jacobowitz <dan@codesourcery.com>
16194 * linux-low.c (linux_kill): Handle being called with no threads.
16195 * win32-i386-low.c (win32_kill): Likewise.
16196 (get_child_debug_event): Clear current_process_handle.
16198 2006-12-30 Denis PILAT <denis.pilat@st.com>
16199 Daniel Jacobowitz <dan@codesourcery.com>
16201 * remote-utils.c (remote_open): Check the type of specified
16202 serial port devices before opening them.
16203 * server.c (main): Kill the inferior if an error occurs during
16204 the first remote_open.
16206 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16208 * README: Update supported targets.
16210 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16212 * Makefile.in (clean): Remove reg-mips64.c.
16213 (reg-mips64.c, reg-mips64.o): New rules.
16214 * configure.srv: Handle mips64. Include regset support for mips.
16215 * linux-mips-low.c (union mips_register): New.
16216 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16217 (mips_breakpoint, mips_breakpoint_at): Use int.
16218 (mips_collect_register, mips_supply_register)
16219 (mips_collect_register_32bit, mips_supply_register_32bit)
16220 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16221 (mips_store_fpregset, target_regsets): New.
16222 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16224 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16226 * configure.srv: Add target "spu*-*-*".
16227 * Makefile.in (clean): Remove reg-spu.c.
16228 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16229 * spu-low.c: New file.
16231 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16233 * configure.ac: Correct td_thr_tls_get_addr test.
16234 * configure: Regenerated.
16236 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16238 * linux-low.c (linux_wait_for_event): Reformat. Use the
16239 pass_signals array.
16240 * remote-utils.c (decode_address_to_semicolon): New.
16241 * server.c (pass_signals, handle_general_set): New.
16242 (handle_query): Mention QPassSignals for qSupported.
16243 (main): Call handle_general_set.
16244 * server.h (pass_signals, decode_address_to_semicolon): New.
16246 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16248 * server.c (handle_query): Correct error handling for read_auxv.
16250 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16252 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16253 and srv_linux_thread_db to yes.
16254 * linux-s390-low.c (s390_fill_gregset): New function.
16255 (target_regsets): Define data structure.
16257 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16259 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16260 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16261 * config.in, configure: Regenerated.
16262 * inferiors.c (gdb_id_to_thread): New function.
16263 (gdb_id_to_thread_id): Use it.
16264 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16265 * linux-low.h (struct process_info): Add th member.
16266 (thread_db_get_tls_address): New prototype.
16267 * remote-utils.c (decode_address): Make non-static.
16268 * server.c (handle_query): Handle qGetTLSAddr.
16269 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16270 * target.h (struct target_ops): Add get_tls_address.
16271 * thread-db.c (maybe_attach_thread): Save the thread handle.
16272 (thread_db_get_tls_address): New.
16274 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16276 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16277 (linux_resume_one_process): Take a siginfo_t *. Update all
16278 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16279 (struct pending_signals): Add a siginfo_t.
16280 (linux_wait_for_process): Always set last_status.
16281 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16282 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16283 * linux-low.h (struct process_info): Add last_status.
16285 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16287 * remote-utils.c (try_rle): New function.
16288 (putpkt_binary): Use it.
16290 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16292 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16293 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16294 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16295 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16296 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16299 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16301 * server.c (terminal_fd): New variable.
16302 (old_foreground_pgrp): Likewise.
16303 (restore_old_foreground_pgrp): New function.
16304 (start_inferior): Record the terminal file descriptor in terminal_fd
16305 and its original foreground group in old_foreground_pgrp. Register
16306 restore_old_foreground_pgrp with atexit().
16308 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16310 * server.c (handle_query): Correct qPart to qXfer.
16312 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16314 * configure.ac: Check for more headers which are missing on
16315 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16316 * configure.srv: Add Cygwin and mingw32.
16317 * remote-utils.c: Don't include headers unconditionally which
16318 are missing on mingw32. Include <winsock.h> for mingw32.
16319 (remote_open): Adjust for mingw32 support. Flush
16320 standard error after writing to it.
16321 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16322 (unblock_async_io, enable_async_io, disable_async_io)
16323 (readchar, getpkt): Update for Winsock support.
16324 (prepare_resume_reply): Expect a protocol signal number.
16325 * server.c: Disable <sys/wait.h> on mingw32.
16326 (start_inferior): Adjust for mingw32 support. Flush
16327 standard error after writing to it.
16328 (attach_inferior): Likewise. Use protocol signal
16330 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16332 * win32-i386-low.c: New file.
16333 * Makefile.in (XM_CLIBS): Set.
16334 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16335 (win32-i386-low.o): New dependency rule.
16336 * linux-low.c (linux_wait): Use target signal numbers.
16337 * target.h (struct target_ops): Doc fix.
16338 * server.h (target_signal_to_name): New prototype.
16339 * gdbreplay.c: Don't include headers unconditionally which
16340 are missing on mingw32. Include <winsock.h> for mingw32.
16341 (remote_close, remote_open): Adjust for Winsock support.
16342 * configure, config.in: Regenerated.
16344 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16346 * server.c (decode_xfer_read, write_qxfer_response): New.
16347 (handle_query): Take a packet length argument. Handle
16348 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16349 the qSupported response.
16350 (main): Update call to handle_query.
16352 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16354 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16355 (putpkt_binary): Renamed from putpkt and adjusted for binary
16357 (putpkt): New wrapper for putpkt_binary.
16358 (readchar): Don't mask off the high bit.
16359 (decode_X_packet): New function.
16360 * server.c (main): Call putpkt_binary if a handler sets the packet
16361 length. Save the length of the incoming packet. Handle 'X'.
16362 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16364 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16366 * server.c (handle_query): Handle qSupported.
16368 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16370 * remote-utils.c (all_symbols_looked_up): New variable.
16371 (look_up_one_symbol): Check it.
16372 * server.h (look_up_one_symbol): New declaration.
16373 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16375 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16377 * Makefile.in (linux-arm-low.o): Update dependencies.
16378 * linux-arm-low.c: Include "gdb_proc_service.h".
16379 (PTRACE_GET_THREAD_AREA): Define.
16380 (ps_get_thread_area): New function.
16382 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16384 * configure.srv (m68k*-*-uclinux*): New target.
16385 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16386 (linux_resume_one_process): Remove extraneous cast.
16387 (linux_read_offsets): New.
16388 (linux_target_op): Add linux_read_offsets on mmuless systems.
16389 * server.c (handle_query): Add qOffsets logic.
16390 * target.h (struct target_ops): Add read_offsets.
16392 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16394 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16395 (PTRACE_GET_THREAD_AREA): Define.
16396 (ps_get_thread_area): New function.
16397 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16398 (linux-x86-64-low.o): Update.
16400 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16402 * configure.ac: Remove checks for prfpregset_t.
16403 * gdb_proc_service.h: New file.
16404 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16405 new "gdb_proc_service.h".
16406 * proc-service.c: Likewise.
16407 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16408 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16409 * Makefile.in (gdb_proc_service_h): Updated.
16410 * configure, config.in: Regenerated.
16412 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16414 * remote-utils.c (prepare_resume_reply): Move declaration
16415 of gdb_id_from_wait to the top of the block.
16417 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16419 * linux-low.c (regsets_store_inferior_registers): Read the regset
16420 from the target before filling it.
16422 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16424 * server.c (attach_inferior): Return SIGTRAP for a successful
16427 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16429 * Makefile.in (OBS): Add version.o.
16430 (STAGESTUFF): Delete.
16431 (version.o): Add dependencies.
16432 (version.c): Replace rule.
16433 (clean): Remove version.c.
16434 * server.c (gdbserver_version): New.
16435 (gdbserver_usage): Use printf.
16436 (main): Handle --version and --help.
16437 * server.h (version, host_name): Add declarations.
16439 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16451 * linux-x86-64-low.c:
16453 * linux-s390-low.c:
16454 * linux-ppc64-low.c:
16456 * linux-mips-low.c:
16457 * linux-m68k-low.c:
16458 * linux-m32r-low.c:
16461 * linux-ia64-low.c:
16462 * linux-i386-low.c:
16463 * linux-crisv32-low.c:
16475 * gdbserver.1: Add (C) after Copyright. Update the FSF
16478 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16480 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16481 (arm_breakpoint_at): Recognize both breakpoints.
16482 (the_low_target): Use the correct breakpoint instruction.
16484 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16486 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16487 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16488 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16489 (the_low_target): Update.
16491 2005-10-25 Andreas Schwab <schwab@suse.de>
16493 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16495 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16496 (ia64_num_regs): Reduce to 462.
16498 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16500 * acinclude.m4: Correct quoting.
16501 * aclocal.m4: Regenerated.
16503 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16504 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16505 (thread_db_init): Call thread_db_err_str.
16506 * configure.ac: Check for TD_VERSION.
16507 * config.in, configure: Regenerated.
16509 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16511 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16513 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16515 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16516 is not available. Define HAVE_PTRACE_GETREGS if it is.
16517 * config.in, configure: Regenerated.
16518 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16519 * linux-i386-low.c, linux-m68k-low.c: Update to use
16520 HAVE_PTRACE_GETREGS.
16521 * linux-low.c (regsets_fetch_inferior_registers)
16522 (regsets_store_inferior_registers): Only return 0 if we processed
16524 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16525 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16527 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16529 * inferiors.c (struct thread_info): Add gdb_id.
16530 (add_thread): Add gdb_id argument.
16531 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16532 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16533 calls to add_thread.
16534 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16535 * server.c (handle_query): Use thread_to_gdb_id.
16536 (handle_v_cont, main): Use gdb_id_to_thread_id.
16537 * server.h (add_thread): Update prototype.
16538 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16541 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16543 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16544 left-padded registers.
16545 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16546 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16548 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16550 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16551 * configure: Regenerate.
16552 * config.in: Regenerate.
16553 * server.h (NEED_DECLARATION_STRERROR):
16554 Replace with !HAVE_DECL_STRERROR.
16556 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16558 * linux-low.c (linux_wait, linux_send_signal): Don't test
16559 an unsigned long variable for > 0 if it could be MAX_ULONG.
16560 * server.c (myresume): Likewise.
16561 * target.c (set_desired_inferior): Likewise.
16563 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16565 * configure.ac: Simplify and improve check for socklen_t.
16566 * configure, config.in: Regenerate.
16568 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16570 * acconfig.h: Remove.
16571 * configure.ac: Add a test for socklen_t. Use three-argument
16572 AC_DEFINE throughout.
16573 * config.in: Regenerated using autoheader 2.59.
16574 * configure: Regenerated.
16576 * gdbreplay.c (socklen_t): Provide a default.
16577 (remote_open): Use socklen_t.
16578 * remote-utils.c (socklen_t): Provide a default.
16579 (remote_open): Use socklen_t.
16580 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16583 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16585 * linux-low.c (linux_read_memory, linux_write_memory)
16586 (linux_read_auxv): Likewise.
16587 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16588 (check_mem_write): Likewise.
16589 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16591 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16592 (registers_from_string, register_data): Likewise.
16593 * server.c (handle_query, main): Likewise.
16594 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16595 (decode_M_packet): Likewise.
16596 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16597 * target.h (struct target_ops): Update read_memory, write_memory,
16599 (read_inferior_memory, write_inferior_memory): Update.
16600 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16601 to unsigned char *.
16602 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16603 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16604 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16605 linux-s390-low.c, linux-sh-low.c: Update for changes in
16606 read_inferior_memory and the_low_target->breakpoint.
16608 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16610 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16611 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16612 * configure.srv: Add powerpc64-*-linux*.
16613 * linux-ppc64-low.c: New file.
16615 2005-05-23 Orjan Friberg <orjanf@axis.com>
16617 * linux-cris-low.c: New file with support for CRIS.
16618 * linux-crisv32-low.c: Ditto for CRISv32.
16619 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16620 (clean): Add reg-cris.c and reg-crisv32.c.
16621 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16622 reg-crisv32.o, and reg-crisv32.c to make rules.
16623 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16624 recognized targets.
16626 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16628 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16629 of sizeof (PTRACE_XFER_TYPE).
16630 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16632 2005-05-12 Orjan Friberg <orjanf@axis.com>
16634 * target.h (struct target_ops): Add insert_watchpoint,
16635 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16636 pointers for hardware watchpoint support.
16637 * linux-low.h (struct linux_target_ops): Ditto.
16638 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16639 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16640 to linux_target_ops.
16641 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16643 * server.c (main): Recognize 'Z' and 'z' packets.
16645 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16647 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16648 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16649 (the_low_target): Add new members.
16651 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16653 * proc-service.c (ps_lgetregs): Search all_processes instead of
16656 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16658 * server.c (start_inferior): Change return type to int.
16659 (attach_inferior): Change sigptr to int *.
16660 (handle_v_cont, handle_v_requests): Change signal to int *.
16661 (main): Change signal to int.
16663 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16665 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16666 * configure.srv: Add m32r*-*-linux*.
16667 * linux-m32r-low.c: New file.
16669 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16671 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16673 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16675 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16676 Take unsigned long arguments for PIDs.
16677 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16678 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16679 (wait_for_sigstop, linux_resume_one_process)
16680 (regsets_fetch_inferior_registers, linux_send_signal)
16681 (linux_read_auxv): Likewise. Update the types of variables holding
16682 PIDs. Update format string specifiers.
16683 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16684 * remote-utils.c (prepare_resume_reply): Likewise.
16685 * server.c (cont_thread, general_thread, step_thread)
16686 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16688 (handle_query): Update format specifiers.
16689 (handle_v_cont, main): Use strtoul for thread IDs.
16690 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16691 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16692 (general_thread, step_thread, thread_from_wait)
16693 (old_thread_from_wait): Update.
16694 * target.h (struct thread_resume): Use unsigned long for THREAD.
16695 (struct target_ops): Use unsigned long for arguments to attach and
16698 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16700 * acinclude.m4: Include bfd/bfd.m4 directly.
16701 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16702 <agriffis@toolchain.org>.
16703 * aclocal.m4, configure: Regenerated.
16705 2005-01-07 Andrew Cagney <cagney@gnu.org>
16707 * configure.ac: Rename configure.in, require autoconf 2.59.
16708 * configure: Re-generate.
16710 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16712 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16713 LIBS when finished.
16714 * aclocal.m4: Regenerated.
16715 * configure: Regenerated.
16717 2004-11-21 Andreas Schwab <schwab@suse.de>
16719 * linux-m68k-low.c (m68k_num_gregs): Define.
16720 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16721 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16722 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16723 (m68k_breakpoint_at): New. Add to the_low_target.
16725 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16726 srv_linux_thread_db to yes.
16728 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16730 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16731 (ARCH_SET_FS): Likewise.
16732 (ARCH_GET_FS): Likewise.
16733 (ARCH_GET_GS): Likewise.
16735 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16737 * linux-i386-low.c (ps_get_thread_area): New.
16738 * linux-x86-64-low.c (ps_get_thread_area): New.
16739 * linux-low.c: Include <sys/syscall.h>.
16740 (linux_kill_one_process): Don't kill the first thread here.
16741 (linux_kill): Kill the first thread here.
16742 (kill_lwp): New function.
16743 (send_sigstop, linux_send_signal): Use it.
16744 * proc-service.c: Clean up #ifdefs.
16745 (fpregset_info): Delete.
16746 (ps_lgetregs): Update and enable implementation.
16747 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16749 * remote-utils.c (struct sym_cache, symbol_cache): New.
16750 (input_interrupt): Print a clearer message.
16751 (async_io_enabled): New variable.
16752 (enable_async_io, disable_async_io): Use it. Update comments.
16753 (look_up_one_symbol): Use the symbol cache.
16754 * thread-db.c (thread_db_look_up_symbols): New function.
16755 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16757 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16759 * configure.in: Test for -rdynamic.
16760 * configure: Regenerated.
16761 * Makefile (INTERNAL_LDFLAGS): New.
16762 (gdbserver, gdbreplay): Use it.
16764 2004-09-02 Andrew Cagney <cagney@gnu.org>
16766 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16768 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16770 * linux-low.c (linux_wait): Clear all_processes list also.
16772 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16774 * linux-low.c: Include <errno.h>. Remove extern declaration of
16777 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16779 * gdbreplay.c, server.h, utils.c: Update copyright years.
16781 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16783 * server.c (main): Print child status or termination signal from
16784 variable 'signal', not 'sig'.
16786 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16788 * linux-low.c (linux_read_memory): Change return type to
16789 int. Check for and return error from ptrace().
16790 * target.c (read_inferior_memory): Change return type to int. Pass
16791 back return status from the_target->read_memory().
16792 * target.h (struct target_ops): Adapt *read_memory() prototype.
16794 (read_inferior_memory): Adapt prototype.
16795 * server.c (main): Return an error packet if
16796 read_inferior_memory() returns an error.
16798 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16800 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16801 Unify with other clean targets.
16803 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16805 * server.c (handle_v_cont): Call set_desired_inferior.
16807 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16809 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16811 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16813 * linux-low.c (linux_wait): Unblock async I/O.
16814 (linux_resume): Block and enable async I/O.
16815 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16816 * server.h (block_async_io, unblock_async_io): Add prototypes.
16818 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16820 * remote-utils.c (remote_open): Print a status notice after
16821 opening a TCP port.
16822 * server.c (attach_inferior): Print a status notice after
16825 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16827 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16829 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16831 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16833 * server.c, target.h: Update copyright years.
16835 2004-02-25 Roland McGrath <roland@redhat.com>
16837 * target.h (struct target_ops): New member `read_auxv'.
16838 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16839 * linux-low.c (linux_read_auxv): New function.
16840 (linux_target_ops): Initialize `read_auxv' member to that.
16842 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16844 Committed by Jim Blandy <jimb@redhat.com>.
16846 * linux-s390-low.c (s390_num_regs): Update.
16847 (s390_regmap): Remove control registers. Use __s390x__ predefine
16848 instead of GPR_SIZE to distiguish s390 and s390x targets.
16850 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16852 * linux-low.c: Update copyright year.
16853 (check_removed_breakpoint): Clear pending_is_breakpoint.
16854 (linux_set_resume_request, linux_queue_one_thread)
16855 (resume_status_pending_p): New functions.
16856 (linux_continue_one_thread): Use process->resume.
16857 (linux_resume): Only resume threads if there are no pending events.
16858 * linux-low.h (struct process_info): Add resume request
16861 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16863 * regcache.c (new_register_cache): Clear the allocated register
16864 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16866 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16868 * linux-low.c (linux_resume): Take a struct thread_resume *
16870 (linux_wait): Update call.
16871 (resume_ptr): New static variable.
16872 (linux_continue_one_thread): Renamed from
16873 linux_continue_one_process. Use resume_ptr.
16874 (linux_resume): Use linux_continue_one_thread.
16875 * server.c (handle_v_cont, handle_v_requests): New functions.
16876 (myresume): New function.
16877 (main): Handle 'v' case.
16878 * target.h (struct thread_resume): New type.
16879 (struct target_ops): Change argument of "resume" to struct
16881 (myresume): Delete macro.
16883 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16885 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16886 (uninstall): Support DESTDIR.
16888 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16890 * configure.srv: Add xscale*linux copy of arm*linux entry.
16892 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16894 * linux-arm-low.c (arm_reinsert_addr): New function.
16895 (the_low_target): Add arm_reinsert_addr.
16897 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16899 * mem-break.c: Remove whitespace at end of file.
16901 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16903 * configure.in: Check whether we need to prototype strerror.
16904 * server.h: Optionally prototype strerror.
16905 * gdbreplay.c (perror_with_name): Use strerror.
16906 * linux-low.c (linux_attach_lwp): Use strerror.
16907 * utils.c (perror_with_name): Use strerror.
16908 * config.in, configure: Regenerated.
16910 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16912 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16913 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16915 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16917 * Makefile.in (SFILES): Update.
16918 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16919 low-sun3.c: Remove files.
16921 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16923 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16924 (linux_detach_one_process, linux_detach): New functions.
16925 (linux_target_ops): Add linux_detach.
16926 * server.c (main): Handle 'D' packet.
16927 * target.h (struct target_ops): Add "detach" member.
16928 (detach_inferior): Define.
16930 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16932 From Kelley Cook <kelleycook@wideopenwest.com>:
16933 * configure.srv: Accept i[34567]86 variants.
16935 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16937 * linux-low.c (linux_wait_for_event): Correct comment typos.
16938 (linux_resume_one_process): Call check_removed_breakpoint.
16939 (linux_send_signal): New function.
16940 (linux_target_ops): Add linux_send_signal.
16941 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16943 * target.h (struct target_ops): Add send_signal.
16945 2003-05-29 Jim Blandy <jimb@redhat.com>
16947 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16948 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16949 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16950 away part of the register's value.
16952 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16954 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16955 (linux_wait_for_event, linux_init_signals): Likewise.
16957 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16959 * configure.in: Check for stdlib.h.
16960 * configure: Regenerated.
16961 * config.in: Regenerated.
16963 2003-01-04 Andreas Schwab <schwab@suse.de>
16965 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16967 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16969 * Makefile.in: Remove obsolete code.
16971 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16973 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16974 defined(PT_FPR0_HI).
16976 2002-11-17 Stuart Hughes <seh@zee2.com>
16978 * linux-arm-low.c (arm_num_regs): Increase.
16979 (arm_regmap): Include status register.
16981 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16983 * linux-low.c (register_addr): Remove incorrect -1 check.
16985 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16987 * linux-low.c (linux_create_inferior): Call setpgid. Return
16989 (unstopped_p, linux_signal_pid): Remove.
16990 (linux_target_ops): Remove linux_signal_pid.
16991 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16992 global instead of target method.
16993 * target.h (struct target_ops): Remove signal_pid. Update comment
16994 for create_inferior.
16995 * server.c (signal_pid): New variable.
16996 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16997 gdbserver. Set the child to be the foreground process group.
16998 (attach_inferior): Set signal_pid.
17000 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17002 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17004 2002-08-20 Jim Blandy <jimb@redhat.com>
17006 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17009 2002-08-01 Andrew Cagney <cagney@redhat.com>
17011 * Makefile.in: Make chill references obsolete.
17013 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17015 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17016 * configure: Regenerate.
17017 * config.in: Regenerate.
17019 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17021 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17022 (perror_with_name, remote_close, remote_open, expect, play): Static.
17024 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17026 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17027 byte offsets instead of an array of indexes.
17028 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17030 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17032 * regcache.c: Add comment.
17034 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17036 * thread-db.c: New file.
17037 * proc-service.c: New file.
17038 * acinclude.m4: New file.
17039 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17040 proc-service.o, and thread-db.o.
17041 (linux-low.o): Add USE_THREAD_DB.
17042 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17043 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17044 * aclocal.m4: Regenerated.
17045 * config.in: Regenerated.
17046 * configure: Regenerated.
17047 * configure.in: Check for proc_service.h, sys/procfs.h,
17048 thread_db.h, and linux/elf.h headrs.
17049 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17050 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17051 Check for -lthread_db and thread support.
17052 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17053 PowerPC, and SuperH.
17054 * i387-fp.c: Constify arguments.
17055 * i387-fp.h: Likewise.
17056 * inferiors.c: (struct thread_info): Renamed from
17057 `struct inferior_info'. Remove PID member. Use generic inferior
17058 list header. All uses updated.
17059 (inferiors, signal_pid): Removed.
17060 (all_threads): New variable.
17061 (get_thread): Define.
17062 (add_inferior_to_list): New function.
17063 (for_each_inferior): New function.
17064 (change_inferior_id): New function.
17065 (add_inferior): Removed.
17066 (remove_inferior): New function.
17067 (add_thread): New function.
17068 (free_one_thread): New function.
17069 (remove_thread): New function.
17070 (clear_inferiors): Use for_each_inferior and free_one_thread.
17071 (find_inferior): New function.
17072 (find_inferior_id): New function.
17073 (inferior_target_data): Update argument type.
17074 (set_inferior_target_data): Likewise.
17075 (inferior_regcache_data): Likewise.
17076 (set_inferior_regcache_data): Likewise.
17077 * linux-low.c (linux_bp_reinsert): Remove.
17078 (all_processes, stopping_threads, using_thrads)
17079 (struct pending_signals, debug_threads, pid_of): New.
17080 (inferior_pid): Replace with macro.
17081 (struct inferior_linux_data): Remove.
17082 (get_stop_pc, add_process): New functions.
17083 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17084 Use add_process and add_thread.
17085 (linux_attach_lwp): New function, based on old linux_attach. Use
17086 add_process and add_thread. Set stop_expected for new threads.
17087 (linux_attach): New function.
17088 (linux_kill_one_process): New function.
17089 (linux_kill): Kill all LWPs.
17090 (linux_thread_alive): Use find_inferior_id.
17091 (check_removed_breakpoints, status_pending_p): New functions.
17092 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17093 Update. Use WNOHANG. Wait for cloned processes also. Update process
17094 struct for the found process.
17095 (linux_wait_for_event): New function.
17096 (linux_wait): Use it. Support LWPs.
17097 (send_sigstop, wait_for_sigstop, stop_all_processes)
17098 (linux_resume_one_process, linux_continue_one_process): New functions.
17099 (linux_resume): Support LWPs.
17100 (REGISTER_RAW_SIZE): Remove.
17101 (fetch_register): Use register_size instead. Call supply_register.
17102 (usr_store_inferior_registers): Likewise. Call collect_register.
17103 Fix recursive case.
17104 (regsets_fetch_inferior_registers): Improve error message.
17105 (regsets_store_inferior_registers): Add debugging.
17106 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17107 (unstopped_p, linux_signal_pid): New functions.
17108 (linux_target_ops): Add linux_signal_pid.
17109 (linux_init_signals): New function.
17110 (initialize_low): Call it. Initialize using_threads.
17111 * regcache.c (inferior_regcache_data): Add valid
17113 (get_regcache): Fetch registers lazily. Add fetch argument
17114 and update all callers.
17115 (regcache_invalidate_one, regcache_invalidate): New
17117 (new_register_cache): Renamed from create_register_cache.
17118 Return the new regcache.
17119 (free_register_cache): Change argument to a void *.
17120 (registers_to_string, registers_from_string): Call get_regcache
17121 with fetch flag set.
17122 (register_data): Make static. Pass fetch flag to get_regcache.
17123 (supply_register): Call get_regcache with fetch flag clear.
17124 (collect_register): Call get_regcache with fetch flag set.
17125 (collect_register_as_string): New function.
17126 * regcache.h: Update.
17127 * remote-utils.c (putpkt): Flush after debug output and use
17129 Handle input interrupts while waiting for an ACK.
17130 (input_interrupt): Use signal_pid method.
17131 (getpkt): Flush after debug output and use stderr.
17132 (outreg): Use collect_register_as_string.
17133 (new_thread_notify, dead_thread_notify): New functions.
17134 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17135 and general_thread.
17136 (look_up_one_symbol): Flush after debug output.
17137 * server.c (step_thread, server_waiting): New variables.
17138 (start_inferior): Don't use signal_pid. Update call to mywait.
17139 (attach_inferior): Update call to mywait.
17140 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17141 (main): Don't fetch/store registers explicitly. Use
17142 set_desired_inferior. Support proposed ``Hs'' packet. Update
17144 * server.h: Update.
17145 (struct inferior_list, struct_inferior_list_entry): New.
17146 * target.c (set_desired_inferior): New.
17147 (write_inferior_memory): Constify.
17148 (mywait): New function.
17149 * target.h: Update.
17150 (struct target_ops): New signal_pid method.
17151 (mywait): Removed macro, added prototype.
17153 * linux-low.h (regset_func): Removed.
17154 (regset_fill_func, regset_store_func): New.
17155 (enum regset_type): New.
17156 (struct regset_info): Add type field. Use new operation types.
17157 (struct linux_target_ops): stop_pc renamed to get_pc.
17158 Add decr_pc_after_break and breakpoint_at.
17159 (get_process, get_thread_proess, get_process_thread)
17160 (strut process_info, all_processes, linux_attach_lwp)
17161 (thread_db_init): New.
17163 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17164 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17165 (the_low_target): Add new members.
17166 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17167 (i386_store_fpxregset): Constify.
17168 (target_regsets): Add new kind identifier.
17169 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17170 (i386_set_pc): Add debugging.
17171 (i386_breakpoint_at): New function.
17172 (the_low_target): Add new members.
17173 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17174 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17175 (mips_breakpoint_at): New.
17176 (the_low_target): Add new members.
17177 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17178 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17179 (the_low_target): Add new members.
17180 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17181 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17182 (the_low_target): Add new members.
17183 * linux-x86-64-low.c (target_regsets): Add new kind
17186 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17188 From Martin Pool <mbp@samba.org>:
17189 * server.c (gdbserver_usage): New function.
17192 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17194 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17195 stop_at -> stop_pc.
17197 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17199 * Makefile.in: Remove obsolete code.
17201 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17203 * linux-low.c (regsets_fetch_inferior_registers),
17204 (regsets_store_inferior_registers): Removed cast to int from
17206 * regcache.h: Added declaration of struct inferior_info.
17208 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17210 * inferiors.c (struct inferior_info): Add regcache_data.
17211 (add_inferior): Call create_register_cache.
17212 (clear_inferiors): Call free_register_cache.
17213 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17214 * regcache.c (struct inferior_regcache_data): New.
17215 (registers): Remove.
17216 (get_regcache): New function.
17217 (create_register_cache, free_register_cache): New functions.
17218 (set_register_cache): Don't initialize the register cache here.
17219 (registers_to_string, registers_from_string, register_data): Call
17221 * regcache.h: Add prototypes.
17222 * server.h: Likewise.
17224 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17226 * mem-break.c: New file.
17227 * mem-break.h: New file.
17228 * Makefile.in: Add mem-break.o rule; update server.h
17230 * inferiors.c (struct inferior_info): Add target_data
17232 (clear_inferiors): Free target_data member if set.
17233 (inferior_target_data, set_inferior_target_data): New functions.
17234 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17235 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17236 * linux-low.c (linux_bp_reinsert): New variable.
17237 (struct inferior_linux_data): New.
17238 (linux_create_inferior): Use set_inferior_target_data.
17239 (linux_attach): Likewise. Call add_inferior.
17240 (linux_wait_for_one_inferior): New function.
17241 (linux_wait): Call it.
17242 (linux_write_memory): Add const.
17243 (initialize_low): Call set_breakpoint_data.
17244 * linux-low.h (struct linux_target_ops): Add breakpoint
17246 * server.c (attach_inferior): Remove extra add_inferior
17248 * server.h: Include mem-break.h. Update inferior.c
17250 * target.c (read_inferior_memory)
17251 (write_inferior_memory): New functions.
17252 * target.h (read_inferior_memory)
17253 (write_inferior_memory): Change macros to prototypes.
17254 (struct target_ops): Update comments. Add const to write_memory
17257 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17259 * linux-low.c (usr_store_inferior_registers): Support
17260 registers which are allowed to fail to store.
17261 * linux-low.h (linux_target_ops): Likewise.
17262 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17263 (ppc_cannot_store_register): FPSCR may not be storable.
17265 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17267 * server.h: Include <string.h> if HAVE_STRING_H.
17268 * ChangeLog: Correct paths in last ChangeLog entry.
17270 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17272 * linux-low.h: Remove obsolete prototypes.
17273 (struct linux_target_ops): New.
17274 (extern the_low_target): New.
17275 * linux-low.c (num_regs, regmap): Remove declarations.
17276 (register_addr): Use the_low_target explicitly.
17277 (fetch_register): Likewise.
17278 (usr_fetch_inferior_registers): Likewise.
17279 (usr_store_inferior_registers): Likewise.
17280 * linux-arm-low.c (num_regs): Remove.
17281 (arm_num_regs): Define.
17282 (arm_regmap): Renamed from regmap, made static.
17283 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17285 (arm_cannot_store_register): Renamed from cannot_store_register,
17287 (the_low_target): New.
17288 * linux-i386-low.c (num_regs): Remove.
17289 (i386_num_regs): Define.
17290 (i386_regmap): Renamed from regmap, made static.
17291 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17293 (i386_cannot_store_register): Renamed from cannot_store_register,
17295 (the_low_target): New.
17296 * linux-ia64-low.c (num_regs): Remove.
17297 (ia64_num_regs): Define.
17298 (ia64_regmap): Renamed from regmap, made static.
17299 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17301 (ia64_cannot_store_register): Renamed from cannot_store_register,
17303 (the_low_target): New.
17304 * linux-m68k-low.c (num_regs): Remove.
17305 (m68k_num_regs): Define.
17306 (m68k_regmap): Renamed from regmap, made static.
17307 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17309 (m68k_cannot_store_register): Renamed from cannot_store_register,
17311 (the_low_target): New.
17312 * linux-mips-low.c (num_regs): Remove.
17313 (mips_num_regs): Define.
17314 (mips_regmap): Renamed from regmap, made static.
17315 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17317 (mips_cannot_store_register): Renamed from cannot_store_register,
17319 (the_low_target): New.
17320 * linux-ppc-low.c (num_regs): Remove.
17321 (ppc_num_regs): Define.
17322 (ppc_regmap): Renamed from regmap, made static.
17323 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17325 (ppc_cannot_store_register): Renamed from cannot_store_register,
17327 (the_low_target): New.
17328 * linux-s390-low.c (num_regs): Remove.
17329 (s390_num_regs): Define.
17330 (s390_regmap): Renamed from regmap, made static.
17331 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17333 (s390_cannot_store_register): Renamed from cannot_store_register,
17335 (the_low_target): New.
17336 * linux-sh-low.c (num_regs): Remove.
17337 (sh_num_regs): Define.
17338 (sh_regmap): Renamed from regmap, made static.
17339 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17341 (sh_cannot_store_register): Renamed from cannot_store_register,
17343 (the_low_target): New.
17344 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17345 (the_low_target): New.
17347 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17349 * Makefile.in: Add stamp-h target.
17350 * configure.in: Create stamp-h.
17351 * configure: Regenerated.
17353 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17355 * inferiors.c: New file.
17356 * target.c: New file.
17357 * target.h: New file.
17358 * Makefile.in: Add target.o and inferiors.o. Update
17360 * linux-low.c (inferior_pid): New static variable,
17361 moved from server.c.
17362 (linux_create_inferior): Renamed from create_inferior.
17363 Call add_inferior. Return 0 on success instead of a PID.
17364 (linux_attach): Renamed from myattach.
17365 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17366 (linux_thread_alive): Renamed from mythread_alive.
17367 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17369 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17370 (regsets_store_inferior_registers): Correct error message.
17371 Add missing ``return 0''.
17372 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17373 (linux_store_registers): Renamed from store_inferior_registers.
17374 (linux_read_memory): Renamed from read_inferior_memory.
17375 (linux_write_memory): Renamed from write_inferior_memory.
17376 (linux_target_ops): New structure.
17377 (initialize_low): Call set_target_ops ().
17378 * remote-utils.c (unhexify): New function.
17379 (hexify): New function.
17380 (input_interrupt): Send signals to ``signal_pid''.
17381 * server.c (inferior_pid): Remove.
17382 (start_inferior): Update create_inferior call.
17383 (attach_inferior): Call add_inferior.
17384 (handle_query): New function.
17385 (main): Call handle_query for `q' packets.
17386 * server.h: Include "target.h". Remove obsolete prototypes.
17387 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17389 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17391 * Makefile.in: Add WARN_CFLAGS. Update configury
17393 * configure.in: Check for <string.h>
17394 * configure: Regenerate.
17395 * config.in: Regenerate.
17396 * gdbreplay.c: Include needed system headers.
17397 (remote_open): Remove strchr prototype.
17398 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17399 * regcache.c (supply_register): Change buf argument to const void *.
17400 (supply_register_by_name): Likewise.
17401 (collect_register): Change buf argument to void *.
17402 (collect_register_by_name): Likewise.
17403 * regcache.h: Add missing prototypes.
17404 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17405 * server.c (handle_query): New function.
17406 (attached): New static variable, moved out of main.
17407 (main): Quiet longjmp clobber warnings.
17408 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17409 * utils.c (error): Remove NORETURN.