1 2019-07-04 Alan Hayward <alan.hayward@arm.com>
3 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
7 2019-07-04 Alan Hayward <alan.hayward@arm.com>
9 * configure.srv: Remove legacy xml.
10 * linux-aarch64-low.c (initialize_low_arch): Remove
11 initialize_low_tdesc call.
12 * linux-aarch64-tdesc-selftest.c: Remove file.
13 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
14 * linux-x86-low.c (initialize_low_arch): Remove
15 initialize_low_tdesc call.
16 * linux-x86-tdesc-selftest.c: Remove file.
17 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
19 2019-06-20 Tom de Vries <tdevries@suse.de>
21 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
22 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
24 2019-06-19 Tom de Vries <tdevries@suse.de>
26 * debug.h (debug_write): Change return type to ssize_t.
27 * debug.c (debug_write): Same.
29 2019-06-14 Tom Tromey <tom@tromey.com>
31 * configure.ac: Use new path to gnulib.
33 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
36 2019-06-11 Tom Tromey <tom@tromey.com>
38 * Makefile.in (SFILES): Add alloc.c.
40 (IPA_OBJS): Add alloc-ipa.o.
41 (alloc-ipa.o): New target.
42 (%.o: ../%.c): New pattern rule.
44 2019-06-10 Tom Tromey <tromey@adacore.com>
46 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
47 end warning with a newline.
48 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
50 * thread-db.c (attach_thread): Don't end warning with a newline.
51 (thread_db_notice_clone): Likewise.
52 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
54 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
55 end warning with a newline.
57 2019-06-04 Pedro Alves <palves@redhat.com>
59 * server.c (captured_main): Use make_unique_xstrdup.
61 2019-06-02 Tom Tromey <tom@tromey.com>
63 * gdbreplay.c (fromhex): Remove.
64 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
66 2019-05-29 Tom Tromey <tromey@adacore.com>
70 2019-05-06 Kevin Buettner <kevinb@redhat.com>
72 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
73 sign extension code on 32-bit builds.
75 2019-05-03 Eli Zaretskii <eliz@gnu.org>
78 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
80 2019-04-19 Tom Tromey <tom@tromey.com>
82 * server.c (struct vstop_notif): Derive from notif_event.
84 (queue_stop_reply): Update.
85 (remove_all_on_match_ptid): Change type. Rewrite.
86 (discard_queued_stop_replies): Rewrite.
87 (in_queued_stop_replies_ptid): Change type.
88 (in_queued_stop_replies): Rewrite.
90 (queue_stop_reply_callback): Update.
91 (captured_main): Don't call initialize_notif.
92 (push_stop_notification): Update.
93 * notif.c (notif_write_event, handle_notif_ack)
94 (notif_event_enque, notif_push): Update.
95 (notif_event_xfree, initialize_notif): Remove.
96 * notif.h (struct notif_event): Include <list>, not
98 (struct notif_server) <queue>: Now a std::list.
99 (notif_event_p): Remove typedef.
100 (initialize_notif): Don't declare.
101 (struct notif_event): Add virtual destructor.
103 2019-04-17 Alan Hayward <alan.hayward@arm.com>
105 * ax.c (ax_vdebug): Call debug_printf.
106 * debug.c (debug_write): New function.
107 * debug.h (debug_write): New declaration.
108 * linux-low.c (sigchld_handler): Call debug_write.
110 2019-04-17 Alan Hayward <alan.hayward@arm.com>
112 * debug.c (debug_set_output): New function.
113 (debug_vprintf): Send output to debug_file.
114 (debug_flush): Likewise.
115 * debug.h (debug_set_output): New declaration.
116 * server.c (handle_monitor_command): Add debug-file option.
117 (captured_main): Likewise.
119 2019-04-17 Alan Hayward <alan.hayward@arm.com>
121 * debug.c (remote_debug): Add definition.
122 * debug.h (remote_debug): Add declaration.
123 * hostio.c (remote_debug): Remove declaration.
124 * remote-utils.c (struct ui_file): Likewise.
125 (remote_debug): Likewise.
126 * remote-utils.h (remote_debug): Likewise,
127 * server.c (remote_debug): Remove definition.
129 2019-04-10 Kevin Buettner <kevinb@redhat.com>
131 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
132 when using a 64-bit gdbserver.
134 2019-04-09 Tom Tromey <tromey@adacore.com>
136 * linux-low.c (select_event_lwp): Use find_thread_in_random.
138 2019-04-08 Tom Tromey <tom@tromey.com>
140 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
142 (linux_resume_one_lwp): Likewise.
144 2019-04-08 Tom Tromey <tom@tromey.com>
146 * gdbreplay.c: Update.
147 * linux-low.c: Update.
150 2019-04-08 Tom Tromey <tom@tromey.com>
152 * server.c: Use C++ exception handling.
153 * linux-low.c: Use C++ exception handling.
154 * gdbreplay.c: Use C++ exception handling.
156 2019-04-08 Tom Tromey <tom@tromey.com>
158 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
159 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
160 (captured_main, main): Update.
161 * gdbreplay.c (main): Update.
163 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
165 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
166 value in argument pointer, return 1 if the entry is found and 0
167 otherwise. Move comment.
168 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
169 * linux-low.h (linux_get_auxv): Declare.
170 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
172 2019-04-05 Tom Tromey <tromey@adacore.com>
174 * server.c (gdbserver_usage): Use upper-case for metasyntactic
177 2019-03-28 Alan Hayward <alan.hayward@arm.com>
179 * linux-low.c (AT_HWCAP2): Add define if not already included.
181 2019-03-26 Alan Hayward <alan.hayward@arm.com>
183 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
184 (aarch64_arch_setup): Call linux_get_hwcap.
185 * linux-arm-low.c (arm_get_hwcap): Remove function.
186 (arm_read_description): Call linux_get_hwcap.
187 * linux-low.c (linux_get_auxv): New function.
188 (linux_get_hwcap): Likewise.
189 (linux_get_hwcap2): Likewise.
190 * linux-low.h (linux_get_hwcap): New declaration.
191 (linux_get_hwcap2): Likewise.
192 * linux-ppc-low.c (ppc_get_auxv): Remove function.
193 (ppc_arch_setup): Call linux_get_hwcap.
194 * linux-s390-low.c (s390_get_hwcap): Remove function.
195 (s390_arch_setup): Call linux_get_hwcap.
197 2019-03-22 Alan Hayward <alan.hayward@arm.com>
198 Jiong Wang <jiong.wang@arm.com>
200 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
201 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
203 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
205 2019-03-22 Alan Hayward <alan.hayward@arm.com>
206 Jiong Wang <jiong.wang@arm.com>
208 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
209 (aarch64_get_hwcap): New function.
210 (aarch64_arch_setup): Read APIA hwcap.
212 2019-03-22 Alan Hayward <alan.hayward@arm.com>
213 Jiong Wang <jiong.wang@arm.com>
215 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
216 (initialize_low_tracepoint): Likewise.
217 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
218 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
219 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
220 (aarch64_linux_read_description): Likewise.
221 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
223 2019-03-12 John Baldwin <jhb@FreeBSD.org>
225 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
226 i386_create_target_description for 'segments' parameter.
227 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
228 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
229 * win32-i386-low.c (i386_arch_setup): Likewise.
231 2019-03-12 Tom Tromey <tromey@adacore.com>
233 * linux-low.c (iterate_over_lwps): Update.
235 2019-03-06 Tom Tromey <tom@tromey.com>
237 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
238 (captured_main): Use SCOPE_EXIT.
240 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
242 * configure.srv: Use '$enable_unittest' instead of '$development'
243 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
246 2019-02-27 Tom Tromey <tromey@adacore.com>
248 * gdbreplay.c (logchar): Handle \r\n.
250 2019-02-07 Alan Hayward <alan.hayward@arm.com>
252 * linux-low.c (linux_attach): Add process before lwp.
253 * server.c (attach_inferior): Check if already attached.
255 2019-02-07 Tom Tromey <tom@tromey.com>
257 * x86-tdesc.h: Rename include guard.
258 * x86-low.h: Add include guard.
259 * wincecompat.h: Rename include guard.
260 * win32-low.h: Add include guard.
261 * utils.h: Rename include guard.
262 * tracepoint.h: Rename include guard.
263 * tdesc.h: Rename include guard.
264 * target.h: Rename include guard.
265 * server.h: Rename include guard.
266 * remote-utils.h: Rename include guard.
267 * regcache.h: Rename include guard.
268 * nto-low.h: Rename include guard.
269 * notif.h: Add include guard.
270 * mem-break.h: Rename include guard.
271 * lynx-low.h: Add include guard.
272 * linux-x86-tdesc.h: Add include guard.
273 * linux-s390-tdesc.h: Add include guard.
274 * linux-ppc-tdesc-init.h: Add include guard.
275 * linux-low.h: Add include guard.
276 * linux-aarch64-tdesc.h: Add include guard.
277 * linux-aarch32-low.h: Add include guard.
278 * inferiors.h: Rename include guard.
279 * i387-fp.h: Rename include guard.
280 * hostio.h: Rename include guard.
281 * gdbthread.h: Rename include guard.
282 * gdb_proc_service.h: Rename include guard.
283 * event-loop.h: Rename include guard.
284 * dll.h: Rename include guard.
285 * debug.h: Rename include guard.
286 * ax.h: Rename include guard.
288 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
291 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
292 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
294 2019-01-25 Tom Tromey <tom@tromey.com>
296 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
298 2019-01-25 Tom Tromey <tom@tromey.com>
300 * win32-low.c: Fix common/ includes.
301 * win32-i386-low.c: Fix common/ includes.
302 * tracepoint.c: Fix common/ includes.
303 * thread-db.c: Fix common/ includes.
304 * target.h: Fix common/ includes.
305 * symbol.c: Fix common/ includes.
306 * spu-low.c: Fix common/ includes.
307 * server.h: Fix common/ includes.
308 * server.c: Fix common/ includes.
309 * remote-utils.c: Fix common/ includes.
310 * regcache.h: Fix common/ includes.
311 * regcache.c: Fix common/ includes.
312 * nto-x86-low.c: Fix common/ includes.
313 * notif.h: Fix common/ includes.
314 * mem-break.h: Fix common/ includes.
315 * lynx-low.c: Fix common/ includes.
316 * lynx-i386-low.c: Fix common/ includes.
317 * linux-x86-tdesc-selftest.c: Fix common/ includes.
318 * linux-x86-low.c: Fix common/ includes.
319 * linux-low.c: Fix common/ includes.
320 * inferiors.h: Fix common/ includes.
321 * i387-fp.c: Fix common/ includes.
322 * hostio.c: Fix common/ includes.
323 * hostio-errno.c: Fix common/ includes.
324 * gdbthread.h: Fix common/ includes.
325 * gdbreplay.c: Fix common/ includes.
326 * fork-child.c: Fix common/ includes.
327 * event-loop.c: Fix common/ includes.
329 (enum gdb_agent_op): Fix common/ includes.
331 2019-01-21 Tom Tromey <tom@tromey.com>
333 * tracepoint.c: Fix includes.
334 * remote-utils.c: Fix includes.
335 * linux-x86-low.c: Fix includes.
337 2019-01-01 Joel Brobecker <brobecker@adacore.com>
339 * gdbreplay.c (gdbreplay_version): Update copyright year in
341 * server.c (gdbserver_version): Likewise.
343 2018-12-05 Alan Hayward <alan.hayward@arm.com>
345 * linux-low.c (add_lwp): Switch ordering.
347 2018-11-29 Tom Tromey <tom@tromey.com>
349 * win32-low.c (win32_join): Take pid, not process.
350 * target.h (struct target_ops) <join>: Change argument type.
351 (join_inferior): Change argument name.
352 * spu-low.c (spu_join): Take pid, not process.
353 * server.c (handle_detach): Preserve pid before destroying
355 * lynx-low.c (lynx_join): Take pid, not process.
356 * linux-low.c (linux_join): Take pid, not process.
358 2018-11-23 Alan Hayward <alan.hayward@arm.com>
360 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
361 (aarch64_cannot_fetch_register): Likewise.
362 (struct linux_target_ops): Update references.
364 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
366 * linux-ppc-low.c: Include nat/linux-ptrace.h.
368 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
370 * configure.srv (ipa_ppc_linux_regobj): Add
371 powerpc-isa207-htm-vsx32l-ipa.o and
372 powerpc-isa207-htm-vsx64l-ipa.o.
373 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
374 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
375 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
376 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
377 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
378 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
379 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
380 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
381 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
382 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
383 (init_registers_powerpc_isa207_htm_vsx32l)
384 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
385 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
386 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
387 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
388 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
389 (ppc_store_tm_ctarregset): New functions.
390 (ppc_regsets): Add entries for HTM regsets.
391 (ppc_arch_setup): Set htm in features struct when needed. Set
392 sizes for the HTM regsets.
393 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
394 (initialize_low_arch): Call
395 init_registers_powerpc_isa207_htm_vsx32l and
396 init_registers_powerpc_isa207_htm_vsx64l.
397 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
398 PPC_TDESC_ISA207_HTM_VSX.
399 (initialize_low_tracepoint): Call
400 init_registers_powerpc_isa207_htm_vsx32l and
401 init_registers_powerpc_isa207_htm_vsx64l.
403 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
405 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
406 rs6000/power-linux-pmu.xml to srv_xmlfiles.
407 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
408 (ppc_store_pmuregset): New functions.
409 (ppc_regsets): Add entries for ebb and pmu regsets.
410 (ppc_arch_setup): Set isa207 in features struct if the ebb and
411 pmu regsets are available. Set sizes for these regsets.
413 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
415 * configure.srv (ipa_ppc_linux_regobj): Add
416 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
417 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
418 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
419 rs6000/powerpc-isa207-vsx32l.xml, and
420 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
421 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
422 <PPC_TDESC_ISA207_VSX>: New enum value.
423 (init_registers_powerpc_isa207_vsx32l): Declare.
424 (init_registers_powerpc_isa207_vsx64l): Declare.
425 * linux-ppc-low.c (ppc_fill_tarregset): New function.
426 (ppc_store_tarregset): New function.
427 (ppc_regsets): Add entry for the TAR regset.
428 (ppc_arch_setup): Set isa207 in features struct when needed. Set
429 size for the TAR regsets.
430 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
431 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
432 and init_registers_powerpc_isa207_vsx64l.
433 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
434 (initialize_low_tracepoint): Call
435 init_registers_powerpc_isa207_vsx32l and
436 init_registers_powerpc_isa207_vsx64l.
438 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
439 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
441 * configure.srv (ipa_ppc_linux_regobj): Add
442 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
443 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
444 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
445 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
446 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
447 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
448 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
449 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
450 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
451 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
452 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
453 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
454 (ppc_hwcap): Add comment.
455 (ppc_hwcap2): New global.
456 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
457 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
458 (ppc_regsets): Add entries for the DSCR and PPR regsets.
459 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
460 when needed. Set sizes for the the DSCR and PPR regsets.
461 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
462 (initialize_low_arch): Call
463 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
464 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
465 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
466 PPC_TDESC_ISA205_PPR_DSCR_VSX.
467 (initialize_low_tracepoint): Call
468 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
469 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
471 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
473 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
475 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
476 Simon Marchi <simark@simark.ca>
478 * acinclude.m4: Include "../selftest.m4".
479 * configure: Regenerate.
480 * configure.ac: Use "GDB_AC_SELFTEST".
481 * configure.srv: Use "$enable_unittests" instead of
482 "$development" when checking whether unit tests have been
484 * server.c (captured_main): Update message informing that
485 selftests have been disabled.
487 2018-10-04 Tom Tromey <tom@tromey.com>
489 * configure: Rebuild.
491 2018-10-04 Tom Tromey <tom@tromey.com>
493 * server.c (handle_status): Rename inner "thread".
494 (process_serial_event): Declare "res" in 'm' case.
495 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
496 (iterate_over_lwps): Rename inner "thread".
497 (linux_qxfer_libraries_svr4): Rename inner "len".
498 * gdbthread.h (find_thread_in_random): Rename inner "thread".
500 2018-10-01 Gary Benson <gbenson@redhat.com>
502 * gdb_proc_service.h: Moved common code to
503 common/gdb_proc_service.h.
505 2018-10-01 Gary Benson <gbenson@redhat.com>
507 * gdb_proc_service.h: Synchronize comments and whitespace with
508 GDB's version of this file.
510 2018-09-25 Tom Tromey <tom@tromey.com>
512 * configure: Rebuild.
513 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
515 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
517 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
518 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
519 ($(IPA_LIB)): Sort IPA_OBJS.
521 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
523 * Makefile.in: Remove references to $(ADD_DEPS).
525 2018-09-16 Tom Tromey <tom@tromey.com>
527 * remote-utils.c (remote_open): Use GNU style for metasyntactic
529 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
532 2018-09-05 Tom Tromey <tom@tromey.com>
534 * configure: Rebuild.
536 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
539 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
541 2018-08-27 Tom Tromey <tom@tromey.com>
544 * configure: Rebuild.
546 2018-08-27 Tom Tromey <tom@tromey.com>
548 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
549 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
550 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
551 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
552 (s390x_emit_stack_adjust): Add casts to unsigned char.
554 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
558 * server.h (struct client_state) <disable_randomization>:
561 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
563 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
565 (mips_supply_ptrace_register): Likewise.
567 2018-07-22 Tom Tromey <tom@tromey.com>
569 * configure: Rebuild.
571 2018-07-22 Tom Tromey <tom@tromey.com>
573 * win32-low.c (win32_create_inferior): Remove unused variables.
574 * gdbreplay.c (remote_open): Remove unused variable.
575 * remote-utils.c (remote_prepare): Remove unused variable.
576 * x86-tdesc.h (X86_TDESC_H): Define.
577 (amd64_expedite_regs): Define conditionally.
578 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
579 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
580 * remote-utils.c (readchar): Remove unused variable.
582 2018-07-13 Pedro Alves <palves@redhat.com>
584 * linux-low.c (linux_kill): Change parameter to process_info
585 pointer instead of pid. Adjust.
586 * lynx-low.c (lynx_kill): Likewise.
587 * nto-low.c (nto_kill): Likewise.
588 * spu-low.c (spu_kill): Likewise.
589 * win32-low.c (win32_kill): Likewise.
590 * server.c (handle_v_kill, kill_inferior_callback)
591 (detach_or_kill_for_exit): Adjust.
592 * target.c (kill_inferior): Change parameter to process_info
593 pointer instead of pid. Adjust.
594 * target.h (struct target_ops) <kill>: Change parameter to
595 process_info pointer instead of pid. Adjust all implementations
597 (kill_inferior): Likewise.
599 2018-07-13 Pedro Alves <palves@redhat.com>
601 * linux-low.c (linux_detach, linux_join): Change parameter to
602 process_info pointer instead of pid. Adjust.
603 * lynx-low.c (lynx_detach, lynx_join): Likewise.
604 * nto-low.c (nto_detach): Likewise.
605 * spu-low.c (spu_detach, spu_join): Likewise.
606 * win32-low.c (win32_detach, win32_join): Likewise.
607 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
608 * target.h (struct target_ops) <detach, join>: Change parameter to
609 process_info pointer instead of pid. Adjust all implementations
611 (detach_inferior, join_inferior): Rename 'pid' parameter to
614 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
615 Jan Kratochvil <jan.kratochvil@redhat.com>
616 Paul Fertser <fercerpav@gmail.com>
617 Tsutomu Seki <sekiriki@gmail.com>
619 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
620 (OBS): Add 'common/netstuff.o'.
621 (GDBREPLAY_OBS): Likewise.
622 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
623 (remote_open): Implement support for IPv6
625 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
627 (handle_accept_event): Accept connections from IPv6 sources.
628 (remote_prepare): Handle IPv6-style hostnames; implement
629 support for IPv6 connections.
630 (remote_open): Implement support for printing connections from
633 2018-07-11 Pedro Alves <palves@redhat.com>
636 * mem-break.c (any_persistent_commands): Add process_info
637 parameter and use it instead of relying on the current process.
638 Change return type to bool.
639 * mem-break.h (any_persistent_commands): Add process_info
640 parameter and change return type to bool.
641 * server.c (handle_detach): Remove require_running_or_return call.
642 Look up the process_info for the process we're about to detach.
643 If not found, return back error to GDB. Adjust
644 any_persistent_commands call to pass down a process pointer.
646 2018-07-11 Pedro Alves <palves@redhat.com>
648 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
649 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
650 instead of collect_register_by_name.
651 * regcache.c (regcache_raw_get_unsigned_by_name): New.
652 * regcache.h (regcache_raw_get_unsigned_by_name): New.
654 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
655 Pedro Alves <palves@redhat.com>
657 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
659 2018-07-03 Tom Tromey <tom@tromey.com>
661 * linux-low.c: Update.
662 * lynx-low.c: Update.
663 * mem-break.c: Update.
665 * remote-utils.c: Update.
669 * win32-low.c: Update.
671 2018-07-03 Tom Tromey <tom@tromey.com>
675 2018-07-03 Tom Tromey <tom@tromey.com>
677 * linux-low.c: Update.
679 2018-07-03 Tom Tromey <tom@tromey.com>
683 2018-07-03 Tom Tromey <tom@tromey.com>
685 * linux-low.c: Update.
686 * linux-mips-low.c: Update.
687 * lynx-low.c: Update.
689 * remote-utils.c: Update.
693 * thread-db.c: Update.
695 2018-07-03 Tom Tromey <tom@tromey.com>
697 * linux-low.c: Update.
698 * linux-mips-low.c: Update.
699 * lynx-low.c: Update.
700 * mem-break.c: Update.
702 * remote-utils.c: Update.
706 * tracepoint.c: Update.
708 2018-07-03 Tom Tromey <tom@tromey.com>
710 * linux-low.c: Update.
711 * linux-ppc-low.c: Update.
712 * linux-x86-low.c: Update.
713 * proc-service.c: Update.
716 * thread-db.c: Update.
717 * win32-low.c: Update.
719 2018-07-03 Tom Tromey <tom@tromey.com>
721 * linux-low.c: Update.
722 * lynx-low.c: Update.
724 * remote-utils.c: Update.
726 * thread-db.c: Update.
727 * win32-low.c: Update.
729 2018-06-29 Joel Brobecker <brobecker@adacore.com>
731 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
732 parameter in call to 'amd64_create_target_description'.
734 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
736 * x86-tdesc.h: Remove executable permission flag.
738 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
740 * configure.ac: Remove AC_PREREQ, add missing quoting.
741 * configure: Re-generate.
742 * config.in: Re-generate.
743 * aclocal.m4: Re-generate.
745 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
747 * tracepoint.h (current_traceframe): Remove declaration.
749 2018-06-18 Alan Hayward <alan.hayward@arm.com>
751 * linux-aarch64-low.c (is_sve_tdesc): New function.
752 (aarch64_sve_regs_copy_to_regcache): Likewise.
753 (aarch64_sve_regs_copy_from_regcache): Likewise.
754 (aarch64_regs_info): Add SVE checks.
755 (initialize_low_arch): Initialize SVE.
757 2018-06-18 Alan Hayward <alan.hayward@arm.com>
759 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
761 2018-06-11 Alan Hayward <alan.hayward@arm.com>
763 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
764 (initialize_low_tracepoint): Likewise
765 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
766 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
768 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
770 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
772 2018-06-11 Alan Hayward <alan.hayward@arm.com>
774 * server.h (PBUFSIZ): Increase size
776 2018-06-11 Alan Hayward <alan.hayward@arm.com>
778 * regcache.c (regcache::raw_compare): New function.
779 * regcache.h (regcache::raw_compare): New declaration.
781 2018-06-11 Alan Hayward <alan.hayward@arm.com>
783 * regcache.c (new_register_cache): Use new.
784 (free_register_cache): Use delete.
785 (register_data): Use const.
786 (supply_register): Move body inside regcache.
787 (regcache::raw_supply): New override function.
788 (collect_register): Move body inside regcache.
789 (regcache::raw_collect): New override function.
790 (regcache::get_register_status): New override function.
791 * regcache.h (struct regcache): Inherit from reg_buffer_common.
793 2018-06-09 Tom Tromey <tom@tromey.com>
795 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
797 (event_queue): Use std::queue.
798 (gdb_event_xfree): Remove.
799 (initialize_event_loop, process_event, wait_for_event): Update.
801 2018-06-08 Stan Cox <scox@redhat.com>
803 * win32-low.c (win32_create_inferior): last_ptid and last_status
804 moved to client_state.
806 2018-06-08 Pedro Alves <palves@redhat.com>
808 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
809 common/common-exceptions.o, common/common-utils.o,
810 common/errors.o, common/print-utils.o and utils.o.
811 * gdbreplay.c: Include "common-defs.h" instead of the two
812 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
813 string.h or alloca.h.
814 (perror_with_name): Delete.
815 (remote_open): Use xstrdup instead of strdup.
816 (main): Rename to ...
817 (captured_main): ... this.
820 2018-06-08 Tom Tromey <tom@tromey.com>
822 * linux-low.c (linux_low_read_btrace): Update.
824 2018-06-04 Stan Cox <scox@redhat.com>
826 * server.h (struct client_state): New.
827 * server.c (cont_thread, general_thread, multi_process)
828 (report_fork_events, report_vfork_events, report_exec_events)
829 (report_thread_events, swbreak_feature, hwbreak_feature)
830 (vCont_supported, disable_randomization, pass_signals)
831 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
832 Moved to client_state.
833 * remote-utils.c (remote_debug, noack_mode)
834 (transport_is_reliable): Moved to client_state.
835 * tracepoint.c (current_traceframe): Moved to client_state.
838 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
839 linux-low.c, remote-utils.h, target.c: Use client_state.
841 2018-05-31 Alan Hayward <alan.hayward@arm.com>
843 * configure.srv: Add new c/h file.
845 2018-05-31 Alan Hayward <alan.hayward@arm.com>
847 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
850 2018-05-25 Maciej W. Rozycki <macro@mips.com>
852 * gdb.arch/mips-fpregset-core.exp: New test.
853 * gdb.arch/mips-fpregset-core.c: New test source.
855 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
858 * hostio.c (require_int): Do not report overflow for integers
859 between 0xfffffff and 0x7fffffff.
861 2018-05-22 Maciej W. Rozycki <macro@mips.com>
863 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
864 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
865 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
867 (the_low_target): Wire them.
869 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
871 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
872 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
873 mode. Call collect_register_by_name with vscr using
874 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
875 (ppc_store_vrregset): Add and set vscr_offset variable as in
876 ppc_fill_vrregset. Call supply_register_by_name with vscr using
879 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
881 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
882 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
883 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
885 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
887 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
888 (ppc_store_vsxregset): Likewise.
889 (ppc_fill_vrregset): Likewise.
890 (ppc_store_vrregset): Likewise.
891 (ppc_fill_evrregset): Likewise.
892 (ppc_store_evrregset): Likewise.
893 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
894 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
897 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
899 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
900 wordsize of the inferior. Call ppc_linux_target_wordsize.
902 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
904 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
905 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
906 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
907 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
908 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
909 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
910 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
911 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
912 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
913 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
914 (tdesc_powerpc_e500l): Remove.
915 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
916 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
917 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
918 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
920 (ppc_arch_setup): Remove target description matching code. Fill a
921 ppc_linux_features struct and call ppc_linux_match_description
924 2018-05-22 Maciej W. Rozycki <macro@mips.com>
926 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
927 width of the requested register exceeds the width of the
929 (mips_cannot_store_register): Likewise.
931 2018-05-21 Maciej W. Rozycki <macro@mips.com>
933 * linux-mips-low.c (mips_fetch_register): New function. Update
935 (mips_store_gregset): Supply 0 rather than $restart for $zero.
936 (the_low_target): Wire `mips_fetch_register'.
938 2018-05-10 Joel Brobecker <brobecker@adacore.com>
940 * lynx-i386-low.c (LYNXOS_178): New macro.
941 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
942 the layout on LynxOS-178.
943 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
944 handle floating point registers that are not supported by
947 2018-05-10 Tom Tromey <tom@tromey.com>
949 * configure: Rebuild.
951 2018-05-10 Joel Brobecker <brobecker@adacore.com>
954 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
955 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
956 Use it to set the expedite_regs field in the given tdesc.
957 * x86-tdesc.h: New file.
958 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
959 Adjust following the addition of the new expedite_regs parameter
961 * linux-tic6x-low.c (tic6x_read_description): Likewise.
962 * linux-x86-tdesc.c: #include "x86-tdesc.h".
963 (i386_linux_read_description, amd64_linux_read_description):
964 Adjust following the addition of the new expedite_regs parameter
966 * lynx-i386-low.c: #include "x86-tdesc.h".
967 (lynx_i386_arch_setup): Adjust following the addition of the new
968 expedite_regs parameter to init_target_desc.
969 * nto-x86-low.c: #include "x86-tdesc.h".
970 (nto_x86_arch_setup): Adjust following the addition of the new
971 expedite_regs parameter to init_target_desc.
972 * win32-i386-low.c: #include "x86-tdesc.h".
973 (i386_arch_setup): Adjust following the addition of the new
974 expedite_regs parameter to init_target_desc.
976 2018-05-10 Joel Brobecker <brobecker@adacore.com>
979 * win32-low.c (win32_create_inferior): Add call to my_wait
980 setting last_status global.
982 2018-05-10 Joel Brobecker <brobecker@adacore.com>
985 * win32-low.c (create_process): Only call gdb_tilde_expand if
986 inferior_cwd is not NULL.
988 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
990 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
991 registers to the cache if their values have changed.
992 (i387_xsave_to_cache): Provide default values for x87 control
993 registers when these features are available, but disabled.
994 * regcache.c (supply_register_by_name_zeroed): New function.
995 * regcache.h (supply_register_by_name_zeroed): Declare new
998 2018-05-07 Tom Tromey <tom@tromey.com>
1000 * configure: Rebuild.
1002 2018-05-04 Tom Tromey <tom@tromey.com>
1004 * configure: Rebuild.
1006 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
1007 Pedro Alves <palves@redhat.com>
1009 * linux-aarch64-low.c (aarch64_stopped_data_address):
1012 2018-04-27 Tom Tromey <tom@tromey.com>
1014 * configure: Rebuild.
1016 2018-04-23 Tom Tromey <tom@tromey.com>
1018 * configure: Rebuild.
1020 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
1022 * Makefile.in (depcomp): Add "..".
1023 (all_deps_files): New and use it.
1025 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1027 * configure.srv (aarch64*-*-linux*): Don't include xml.
1028 (i[34567]86-*-cygwin*): Likewise.
1029 (i[34567]86-*-linux*): Likewise.
1030 (i[34567]86-*-lynxos*): Likewise.
1031 (i[34567]86-*-mingw32ce*): Likewise.
1032 (i[34567]86-*-mingw*): Likewise.
1033 (i[34567]86-*-nto*): Likewise.
1034 (tic6x-*-uclinux): Likewise.
1035 (x86_64-*-linux*): Likewise.
1036 (x86_64-*-mingw*): Likewise.
1037 (x86_64-*-cygwin*): Likewise.
1039 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1041 * tdesc.c: Remove xml parameter.
1043 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1045 * server.c (get_features_xml): Remove cast.
1046 * tdesc.c (void target_desc::accept): Fill in function.
1047 (tdesc_get_features_xml): Remove old xml creation.
1048 (print_xml_feature::visit_pre): Add xml vistor.
1049 * tdesc.h (struct target_desc): Make xmltarget mutable.
1050 (tdesc_get_features_xml): Remove declaration.
1052 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1054 * tdesc.c (tdesc_architecture_name): Add new function.
1055 (tdesc_osabi_name): Likewise.
1056 (tdesc_get_features_xml): Use new functions.
1058 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1060 * tdesc.c (tdesc_create_flags): Remove.
1061 (tdesc_add_flag): Likewise.
1062 (tdesc_named_type): Likewise.
1063 (tdesc_create_union): Likewise.
1064 (tdesc_create_struct): Likewise.
1065 (tdesc_create_vector): Likewise.
1066 (tdesc_add_bitfield): Likewise.
1067 (tdesc_add_field): Likewise.
1068 (tdesc_set_struct_size): Likewise.
1070 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1072 * tdesc.c (~target_desc): Remove implictly deleted items.
1073 (init_target_desc): Iterate all features.
1074 (tdesc_get_features_xml): Use vector.
1075 (tdesc_create_feature): Create feature.
1076 * tdesc.h (tdesc_feature) Remove
1077 (target_desc): Add features.
1079 2018-04-18 Alan Hayward <alan.hayward@arm.com>
1081 * Makefile.in: Add common/tdesc.c
1082 * tdesc.c (init_target_desc): init all reg_defs from register
1084 (tdesc_create_reg): Create tdesc_reg.
1085 * tdesc.h (tdesc_feature): Add register vector.
1087 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
1089 * tdesc.h (struct target_desc) <features>: Change type to
1090 std::vector<std::string>.
1091 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1093 (tdesc_get_features_xml): Likewise.
1094 (tdesc_create_feature): Likewise.
1096 2018-03-26 Alan Hayward <alan.hayward@arm.com>
1098 * regcache.c (find_register_by_number): Return a ref.
1099 (find_regno): Use references.
1100 (register_size): Likewise.
1101 (register_data): Likewise.
1102 * tdesc.c (target_desc::~target_desc): Remove free calls.
1103 (target_desc::operator==): Use std::vector compare.
1104 (init_target_desc): Use reference.
1105 (tdesc_create_reg): Use reg constructors.
1106 * tdesc.h (struct target_desc): Replace pointer with object.
1108 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1110 * regcache.c (find_register_by_number): Make static.
1111 (find_regno): Use find_register_by_number
1112 * regcache.h (struct reg): Remove declaration.
1114 2018-03-23 Alan Hayward <alan.hayward@arm.com>
1116 * tdesc.c (target_desc::~target_desc): Move to here.
1117 (target_desc::operator==): Likewise.
1118 * tdesc.h (target_desc::~target_desc): Move from here.
1119 (target_desc::operator==): Likewise.
1121 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
1123 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1125 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1127 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1129 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1130 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1131 and init_registers_s390_gs_linux64.
1133 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1135 * linux-s390-low.c (s390_fill_gs): Remove function.
1136 (s390_fill_gsbc): Remove function.
1137 (s390_regsets): Set fill functions for the guarded storage regsets
1140 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1142 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1143 the word size. Add comment.
1144 (s390_get_wordsize): New function.
1145 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1146 pswm with it. Instead, use s390_get_wordsize to determine the
1147 word size first and derive the correct tdesc from that directly.
1149 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1151 * Makefile.in: Include silent-rules.mk.
1152 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1153 (COMPILE): Add ECHO_CXX.
1154 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1155 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1156 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1157 (version-generated.c): Add ECHO_GEN.
1158 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1159 (IPAGENT_COMPILE): Add ECHO_CXX.
1160 (%-generated.c): Add ECHO_REGDAT.
1162 2018-03-14 Tom Tromey <tom@tromey.com>
1165 * ax.c (ax_printf): Special case for NULL.
1167 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1169 * linux-low.c (linux_qxfer_libraries_svr4): Use
1170 xml_escape_text_append.
1172 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1174 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1176 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1178 * server.c (handle_general_set): Remove unnecessary xstrdup.
1180 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1182 * server.c (parse_debug_format_options): Adjust to
1183 delim_string_to_char_ptr_vec changes.
1184 * thread-db.c (thread_db_load_search): Adjust to
1185 dirnames_to_char_ptr_vec changes.
1187 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1189 * target.h (target_enable_btrace, target_disable_btrace)
1190 (target_read_btrace, target_read_btrace_conf): Turn macro into
1191 inline function. Throw error if target method is not defined.
1192 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1193 check for btrace target method. Be prepared to handle exceptions
1194 from btrace target methods.
1196 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1198 * server.c (captured_main): Change order of error message printed
1199 when the current working directory cannot be found.
1201 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1203 * server.c: Include "filenames.h" and "pathstuff.h".
1204 (program_name): Delete variable.
1205 (program_path): New anonymous class.
1206 (get_exec_wrapper): Use "program_path" instead of
1208 (handle_v_run): Likewise.
1209 (captured_main): Likewise.
1210 (process_serial_event): Likewise.
1212 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1214 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1215 (OBJS): Add "pathstuff.o".
1216 * server.c (current_directory): New global variable.
1217 (captured_main): Initialize "current_directory".
1219 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1221 * tdesc.c: Use common/tdesc.h.
1222 * tdesc.h: Likewise.
1224 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1225 Simon Marchi <simon.marchi@ericsson.com>
1227 * Makefile.in: Switch order of make rules.
1229 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1231 * Makefile.in: Add common directory in build.
1232 * configure.ac: Add common reference.
1233 * configure: Regenerate.
1235 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1237 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1238 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1239 * spu-low.c (spu_target_ops): Likewise.
1240 * win32-low.c (win32_target_ops): Likewise.
1241 * server.c (supported_btrace_packets): Report packets unconditionally.
1242 * target.h (target_ops) <supports_btrace>: Remove.
1243 (target_supports_btrace): Remove.
1245 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1247 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1248 (handle_btrace_disable): Change return type to void. Use exceptions
1250 (handle_btrace_general_set): Catch exception and copy message to
1253 2018-02-08 Tom Tromey <tom@tromey.com>
1255 * linux-low.c (install_software_single_step_breakpoints): Use
1256 make_scoped_restore.
1257 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1258 (do_restore_current_thread_cleanup): Remove.
1259 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1262 2018-02-08 Tom Tromey <tom@tromey.com>
1264 * mem-break.c (set_raw_breakpoint_at): Use
1265 gdb::unique_xmalloc_ptr.
1267 2018-01-30 Pedro Alves <palves@redhat.com>
1270 * target.c (target_terminal::terminal_state): Rename to ...
1271 (target_terminal::m_terminal_state): ... this.
1273 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1275 * linux-low.c (handle_extended_wait): Surround call to
1276 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1278 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1280 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1281 linux_ptrace_attach_fail_reason_string now returning an
1283 (linux_attach): Likewise.
1284 * thread-db.c (attach_thread): Likewise.
1286 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1289 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1290 checking for fs_base/gs_base fields in struct user_regs_struct.
1291 * configure: Regenerate.
1293 2018-01-16 Yao Qi <yao.qi@linaro.org>
1296 * linux-low.c (fetch_register): Call supply_register instead of
1299 2018-01-08 Yao Qi <yao.qi@linaro.org>
1300 Simon Marchi <simon.marchi@ericsson.com>
1302 * Makefile.in (OBS): Remove selftest.o.
1303 * configure.ac: Set srv_selftest_objs if $development is true.
1304 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1305 * configure: Re-generated.
1306 * server.c (captured_main): Wrap variable selftest_filter with
1309 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1311 * server.c (parse_debug_format_options): Return std::string.
1312 (handle_monitor_command, captured_main): Adjust.
1314 2018-01-05 Pedro Alves <palves@redhat.com>
1317 * server.c (captured_main): Pass quiet=false to
1318 save_original_signals_state.
1320 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1322 * gdbreplay.c (gdbreplay_version): Update copyright year in
1324 * server.c (gdbserver_version): Likewise.
1326 2017-12-08 Tom Tromey <tom@tromey.com>
1328 * ax.c (ax_printf): Update.
1330 2017-12-07 Yao Qi <yao.qi@linaro.org>
1332 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1333 aarch64_linux_read_description.
1334 * linux-amd64-ipa.c (idx2mask): New array.
1335 (get_ipa_tdesc): Move idx2mask out.
1336 (initialize_low_tracepoint): Initialize target descriptions.
1337 * linux-i386-ipa.c (idx2mask): New array.
1338 (get_ipa_tdesc): Move idx2mask out.
1339 (initialize_low_tracepoint): Initialize target descriptions.
1341 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1343 * tdesc.c (struct tdesc_type): Change return type.
1344 (tdesc_add_flag): Change parameter type.
1345 (tdesc_add_bitfield): Likewise.
1346 (tdesc_add_field): Likewise.
1347 (tdesc_set_struct_size): Likewise.
1349 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1351 * regcache.c (registers_to_string): Remove unused variable.
1353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1355 * inferiors.c (for_each_inferior_with_data): Remove.
1356 * inferiors.h (for_each_inferior_with_data): Remove.
1357 * server.c (handle_qxfer_threads_worker): Change parameter type.
1358 (handle_qxfer_threads_proper): Use for_each_thread.
1360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1362 * inferiors.c (for_each_inferior): Remove.
1363 (clear_inferiors): Use for_each_thread.
1364 * inferiors.h (for_each_inferior): Remove.
1365 * linux-low.c (linux_wait_for_event_filtered): Use
1367 (linux_stabilize_threads): Likewise.
1368 * regcache.c (regcache_release): Likewise.
1369 * server.c (gdb_wants_all_threads_stopped): Likewise.
1370 (clear_pending_status_callback): Remove.
1371 (handle_status): Use for_each_thread.
1372 (captured_main): Likewise.
1373 * win32-low.c (child_init_thread_list): Likewise.
1374 (win32_clear_inferiors): Likewise.
1375 (fake_breakpoint_event): Likewise.
1377 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1379 * inferiors.h (find_inferior): Remove.
1380 * inferiors.c (find_inferior): Remove.
1382 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1384 * linux-low.c (resume_status_pending_p): Update comment.
1385 (need_step_over_p): Update comment.
1387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1389 * linux-low.c (proceed_one_lwp): Return void, change parameter
1391 (unsuspend_and_proceed_one_lwp): Likewise.
1392 (proceed_all_lwps): Use for_each_thread.
1393 (unstop_all_lwps): Likewise.
1395 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1397 * linux-low.c (linux_resume_one_thread): Return void, take
1399 (linux_resume): Use for_each_thread.
1401 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1403 * linux-low.c (send_sigstop_callback): Return void, change
1404 parameter type. Rename to...
1405 (send_sigstop): ... this.
1406 (suspend_and_send_sigstop_callback): Return void, change parameter
1408 (suspend_and_send_sigstop): ... this.
1409 (stop_all_lwps): Use for_each_thread.
1411 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1413 * linux-low.c (lwp_running): Return bool, remove unused
1415 (linux_stabilize_threads): Use find_thread.
1417 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1419 * linux-low.c (select_singlestep_lwp_callback): Remove.
1420 (count_events_callback): Remove.
1421 (select_event_lwp_callback): Remove.
1422 (select_event_lwp): Use find_thread/for_each_thread.
1424 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1426 * linux-low.c (not_stopped_callback): Return bool, take filter
1428 (linux_wait_for_event_filtered): Use find_thread.
1429 (linux_wait_1): Likewise.
1431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1433 * linux-low.c (same_lwp): Remove.
1434 (find_lwp_pid): Use find_thread.
1436 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1438 * linux-low.c (delete_lwp_callback): Remove.
1439 (linux_mourn): Use for_each_thread.
1441 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1443 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1444 args parameter, don't check for pid.
1445 (linux_detach): Use for_each_thread.
1447 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1449 * linux-low.c (struct counter): Remove.
1450 (second_thread_of_pid_p): Remove.
1451 (last_thread_of_process_p): Use find_thread.
1453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1455 * inferiors.c (find_inferior_in_random): Remove.
1456 * inferiors.h (find_inferior_in_random): Remove.
1457 * linux-low.c (status_pending_p_callback): Return bool, accept
1458 parameter ptid directly.
1459 (linux_wait_for_event_filtered): Use find_thread_in_random.
1460 (linux_wait_1): Likewise.
1462 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1464 * inferiors.c (find_inferior_id): Remove.
1465 (find_thread_ptid): Move implemention from find_inferior_id to
1467 * inferiors.h (find_inferior_id): Remove.
1468 * server.c (handle_status): Use find_thread_ptid.
1469 (process_serial_event): Likewise.
1470 * thread-db.c (find_one_thread): Likewise.
1471 (thread_db_thread_handle): Likewise.
1472 * win32-low.c (thread_rec): Likewise.
1473 (child_delete_thread): Likewise.
1474 (win32_thread_alive): Likewise.
1475 (get_child_debug_event): Likewise.
1477 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1479 * linux-mips-low.c (update_watch_registers_callback): Return
1480 void, remove pid_p parameter, don't check for pid.
1481 (mips_insert_point, mips_remove_point): Use for_each_thread.
1483 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1485 * lynx.low (lynx_delete_thread_callback): Remove.
1486 (lynx_mourn): Use for_each_thread.
1488 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1490 * regcache.c (regcache_invalidate_one): Remove.
1491 (regcache_invalidate_pid): use for_each_thread.
1493 2017-11-26 Tom Tromey <tom@tromey.com>
1495 * linux-low.c (linux_create_inferior): Update.
1497 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1499 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1501 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1503 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1504 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1505 * linux-aarch64-tdesc-selftest.c: New file.
1506 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1508 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1510 * configure.srv: Add new file.
1511 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1512 * linux-aarch64-tdesc-selftest.c: New file.
1513 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1515 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1517 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1518 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1519 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1521 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1523 * configure.srv: Add new files.
1524 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1525 aarch64_linux_read_description.
1526 * linux-aarch64-low.c (aarch64_linux_read_description):
1527 Merge with aarch64_arch_setup.
1528 (aarch64_arch_setup): Call aarch64_linux_read_description.
1529 * linux-aarch64-tdesc.c: New file.
1530 * linux-aarch64-tdesc.h: New file.
1532 2017-11-24 Yao Qi <yao.qi@linaro.org>
1534 * configure.srv: Set $srv_regobj for tic6x-linux.
1535 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1536 (tic6x_read_description): Move some code to tic6x_arch_setup.
1537 (tic6x_tdesc_test): New function.
1538 (initialize_low_arch): Call selftests::register_test.
1540 2017-11-22 Yao Qi <yao.qi@linaro.org>
1542 * remote-utils.c (prepare_resume_reply): Use memcpy.
1544 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1546 * linux-low.c (kill_one_lwp_callback): Return void, take
1547 argument directly, don't filter on pid.
1548 (linux_kill): Use for_each_thread.
1550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1552 * linux-low.c (need_step_over_p): Return bool, remove dummy
1554 (linux_resume, proceed_all_lwps): Use find_thread.
1556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1558 * linux-low.c (resume_status_pending_p): Return bool, remove
1560 (linux_resume): Use find_thread.
1562 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1564 * linux-low.c (struct thread_resume_array): Remove.
1565 (linux_set_resume_request): Return void, take arguments
1567 (linux_resume): Use for_each_thread.
1569 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1571 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1572 return bool, remove data argument.
1573 (linux_stabilize_threads): Use find_thread.
1575 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1577 * linux-low.c (unsuspend_one_lwp): Remove.
1578 (unsuspend_all_lwps): Use for_each_thread, inline code from
1581 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1583 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1584 * linux-low.c (struct iterate_over_lwps_args): Remove.
1585 (iterate_over_lwps_filter): Remove.
1586 (iterate_over_lwps): Use find_thread.
1588 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1590 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1591 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1592 code from reset_lwp_ptrace_options_callback.
1594 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1596 * linux-arm-low.c (struct update_registers_data): Remove.
1597 (update_registers_callback): Return void, take arguments
1598 directly, don't check thread's pid.
1599 (arm_insert_point, arm_remove_point): Use for_each_thread.
1601 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1603 * win32-low.c (continue_one_thread): Return void, take argument
1605 (child_continue): Use for_each_thread.
1607 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1609 * win32-i386-low.c (update_debug_registers_callback): Rename
1611 (update_debug_registers): ... this, return void, remove pid_p arg.
1612 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1614 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1616 * inferiors.h (struct process_info): Add constructor, initialize
1618 <syscalls_to_catch>: Change type to std::vector<int>.
1619 * inferiors.c (add_process): Allocate process_info with new.
1620 (remove_process): Free process_info with delete.
1621 * linux-low.c (handle_extended_wait): Adjust.
1622 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1623 * server.c (handle_general_set): Adjust.
1625 2017-11-16 Pedro Alves <palves@redhat.com>
1627 * remote-utils.c (remote_close): Block SIGIO signals instead of
1628 uninstalling the SIGIO handler.
1630 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1632 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1634 2017-11-16 Yao Qi <yao.qi@linaro.org>
1636 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1637 (tic6x_store_gregset): Likewise.
1638 (tic6x_usrregs_info): Move it up.
1640 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1642 * Makefile.in: Update arch rules.
1643 * configure.srv: Explicitly mark arch/ files.
1645 2017-11-13 Andreas Schwab <schwab@suse.de>
1647 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1651 2017-11-06 Pedro Alves <palves@redhat.com>
1653 * config.in, configure: Regenerate.
1655 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1657 * target.c (struct thread_search): Remove.
1658 (thread_search_callback): Remove.
1659 (prepare_to_access_memory): Use for_each_thread instead of
1660 find_inferior. Inline code from thread_search_callback.
1662 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1664 * server.c (struct visit_actioned_threads_data): Remove.
1665 (visit_actioned_threads): Change prototype to take arguments
1667 (resume): Use find_thread instead of find_inferior.
1669 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1671 * server.c (queue_stop_reply_callback): Change prototype, return
1673 (find_status_pending_thread_callback): Remove.
1674 (handle_status): Replace find_inferior with find_thread and
1677 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1679 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1681 (aarch64_store_gregset): Likewise.
1682 (aarch64_fill_fpregset): Likewise.
1683 (aarch64_store_fpregset): Likewise.
1685 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1687 * gdbthread.h (find_thread, for_each_thread): New functions.
1688 * inferiors.c (thread_of_pid): Remove.
1689 (find_any_thread_of_pid): Use find_thread.
1690 * linux-low.c (num_lwps): Use for_each_thread.
1692 2017-10-17 Yao Qi <yao.qi@linaro.org>
1694 * Makefile.in: Remove one rule.
1695 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1697 2017-10-17 Yao Qi <yao.qi@linaro.org>
1699 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1700 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1702 2017-10-17 Yao Qi <yao.qi@linaro.org>
1704 * configure.srv: Rename arm.o with arch/arm.o.
1706 2017-10-17 Yao Qi <yao.qi@linaro.org>
1708 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1709 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1710 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1711 (arch-i386.o, arch-amd64.o): Remove rules.
1712 (arch/%.o): New rule.
1713 Update POSTCOMPILE and COMPILE.pre.
1714 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1715 * configure: Re-generated.
1716 * configure.srv: Replace arch-i386.o with arch/i386.o.
1717 Replace arch-amd64.o with arch/amd64.o.
1719 2017-10-16 Yao Qi <yao.qi@linaro.org>
1721 * configure: Regenerated.
1723 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1725 * inferiors.h: (struct inferior_list): Remove.
1726 (struct inferior_list_entry); Remove.
1727 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1728 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1729 get_first_inferior): Remove.
1730 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1731 find_inferior_id, find_inferior_in_random): Change signature.
1732 * inferiors.c (all_threads): Change type to
1733 std::list<thread_info *>.
1734 (get_thread): Remove macro.
1735 (find_inferior, find_inferior_id): Change signature, implement
1737 (find_inferior_in_random): Change signature, implement using
1738 find_thread_in_random.
1739 (for_each_inferior, for_each_inferior_with_data): Change
1740 signature, implement using for_each_thread.
1741 (add_inferior_to_list, remove_inferior): Remove.
1742 (add_thread, get_first_thread, thread_of_pid,
1743 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1744 (get_first_inferior, one_inferior_p, clear_inferior_list):
1746 (clear_inferiors, get_thread_process): Update.
1747 * gdbthread.h: Include <list>.
1748 (struct thread_info) <entry>: Remove field.
1750 (all_threads): Change type to std::list<thread_info *>.
1751 (get_first_inferior): Add doc.
1752 (find_thread, for_each_thread, find_thread_in_random): New
1754 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1755 * linux-arm-low.c (update_registers_callback): Update.
1756 * linux-low.c (second_thread_of_pid_p): Update.
1757 (kill_one_lwp_callback, linux_detach_lwp_callback,
1758 delete_lwp_callback, status_pending_p_callback, same_lwp,
1759 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1760 iterate_over_lwps, not_stopped_callback,
1761 resume_stopped_resumed_lwps, count_events_callback,
1762 select_singlestep_lwp_callback, select_event_lwp_callback,
1763 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1764 suspend_and_send_sigstop_callback, wait_for_sigstop,
1765 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1766 lwp_running, linux_set_resume_request, resume_status_pending_p,
1767 need_step_over_p, start_step_over, linux_resume_one_thread,
1768 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1769 reset_lwp_ptrace_options_callback): Update.
1770 * linux-mips-low.c (update_watch_registers_callback): Update.
1771 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1773 (free_register_cache_thread_one): Remove.
1774 (regcache_release): Update.
1775 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1776 handle_qxfer_threads_worker): Update.
1777 (handle_query): Update, use list iterator.
1778 (visit_actioned_threads, handle_pending_status,
1779 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1780 clear_pending_status_callback, set_pending_status_callback,
1781 find_status_pending_thread_callback, handle_status,
1782 process_serial_event): Update.
1783 * target.c (thread_search_callback): Update.
1784 * thread-db.c (thread_db_get_tls_address): Update.
1785 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1787 * win32-i386-low.c (update_debug_registers_callback): Update.
1788 * win32-low.c (delete_thread_info, child_delete_thread,
1789 continue_one_thread, suspend_one_thread,
1790 get_child_debug_event): Adjust.
1792 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1794 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1795 * inferiors.h: Include <list>.
1796 (struct process_info) <entry>: Remove field.
1798 (pid_of): Change macro to function.
1799 (ptid_of, lwpid_of): Remove macro.
1800 (all_processes): Change type to std::list<process_info *>.
1801 (ALL_PROCESSES): Remove macro.
1802 (for_each_process, find_process): New function.
1803 * inferiors.c (all_processes): Change type to
1804 std::list<process_info *>.
1805 (find_thread_process): Adjust.
1806 (add_process): Likewise.
1807 (remove_process): Likewise.
1808 (find_process_pid): Likewise.
1809 (get_first_process): Likewise.
1810 (started_inferior_callback): Remove.
1811 (have_started_inferiors_p): Adjust.
1812 (attached_inferior_callback): Remove.
1813 (have_attached_inferiors_p): Adjust.
1814 * linux-low.c (check_zombie_leaders): Likewise.
1815 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1816 (x86_linux_update_xmltarget): Adjust.
1817 * server.c (handle_query): Likewise.
1818 (gdb_reattached_process): Remove.
1819 (handle_status): Adjust.
1820 (kill_inferior_callback): Likewise.
1821 (detach_or_kill_inferior): Remove.
1822 (print_started_pid): Likewise.
1823 (print_attached_pid): Likewise.
1824 (detach_or_kill_for_exit): Update.
1825 (process_serial_event): Likewise.
1826 * linux-arm-low.c (arm_new_fork): Likewise.
1828 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1830 * dll.h: Include <list>.
1831 (struct dll_info): Add constructor.
1832 <entry>: Remove field.
1833 (all_dlls): Change type to std::list<dll_info>.
1834 * dll.c: Include <algorithm>.
1835 (get_dll): Remove macro.
1836 (all_dlls): Change type to std::list<dll_info *>.
1837 (free_one_dll): Remove.
1838 (match_dll): Likewise.
1839 (loaded_dll): Adjust.
1840 (unloaded_dll): Adjust to all_dlls type change, use
1841 std::find_if. Inline code from match_dll.
1842 (clear_dlls): Adjust to all_dlls type change.
1843 * server.c (emit_dll_description): Remove.
1844 (handle_qxfer_libraries): Adjust to all_dlls type change,
1845 integrate emit_dll_description's functionality.
1847 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1849 * linux-low.h (struct linux_target_ops) <delete_process>: New
1851 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1852 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1853 (struct linux_target_ops): Add delete_process callback.
1854 * linux-arm-low.c (arm_delete_process): New.
1855 (struct linux_target_ops): Add delete_process callback.
1856 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1857 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1858 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1859 * linux-mips-low.c (mips_linux_delete_process): New.
1860 (struct linux_target_ops): Add delete_process callback.
1861 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1862 * linux-s390-low.c (struct linux_target_ops): Likewise.
1863 * linux-sh-low.c (struct linux_target_ops): Likewise.
1864 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1865 * linux-tile-low.c (struct linux_target_ops): Likewise.
1866 * linux-x86-low.c (x86_linux_delete_process): New.
1867 (struct linux_target_ops): Add delete_process callback.
1868 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1870 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1872 * linux-aarch64-low.c (the_low_target): Add thread delete
1874 * linux-arm-low.c (arm_delete_thread): New function.
1875 (the_low_target): Add thread delete callback.
1876 * linux-bfin-low.c (the_low_target): Likewise.
1877 * linux-crisv32-low.c (the_low_target): Likewise.
1878 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1880 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1882 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1883 * linux-mips-low.c (mips_linux_delete_thread): New function.
1884 (the_low_target): Add thread delete callback.
1885 * linux-ppc-low.c (the_low_target): Likewise.
1886 * linux-s390-low.c (the_low_target): Likewise.
1887 * linux-sh-low.c (the_low_target): Likewise.
1888 * linux-tic6x-low.c (the_low_target): Likewise.
1889 * linux-tile-low.c (the_low_target): Likewise.
1890 * linux-x86-low.c (the_low_target): Likewise.
1891 * linux-xtensa-low.c (the_low_target): Likewise.
1893 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1895 * win32-low.c: Include "common-inferior.h".
1897 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1899 * inferiors.c (set_inferior_cwd): New function.
1900 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1901 (handle_query): Inform that QSetWorkingDir is supported.
1902 * win32-low.c (create_process): Pass the inferior's cwd to
1905 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1907 * inferiors.c (current_inferior_cwd): New global variable.
1908 (get_inferior_cwd): New function.
1909 * inferiors.h (struct process_info) <cwd>: New field.
1911 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1913 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1914 (OBS): Add gdb_tilde_expand.o.
1916 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1918 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1919 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1921 2017-09-29 Pedro Alves <palves@redhat.com>
1923 * ax.c (gdb_parse_agent_expr): Constify.
1924 * ax.h (gdb_parse_agent_expr): Constify.
1925 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1927 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1928 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1929 * remote-utils.h (read_ptid): Constify.
1930 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1931 (process_point_options, process_serial_event): Constify.
1932 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1933 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1934 (cmd_qtbuffer): Constify.
1936 2017-09-29 Pedro Alves <palves@redhat.com>
1938 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1941 2017-09-29 Pedro Alves <palves@redhat.com>
1943 * linux-low.c (handle_extended_wait): Pass parent thread instead
1944 of process to thread_db_notice_clone.
1945 * linux-low.h (thread_db_notice_clone): Replace parent process
1946 parameter with parent thread parameter.
1947 * thread-db.c (find_one_thread): Add comment.
1948 (thread_db_notice_clone): Replace parent process parameter with
1949 parent thread parameter. Temporarily switch to the parent thread.
1951 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1953 * gdbthread.h: Include "common-gdbthread.h".
1954 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1955 "if" when validating the ptid.
1956 * remote-utils.c: Include "gdbthread.h".
1957 (prepare_resume_reply): Use "switch_to_thread".
1958 * target.c (done_accessing_memory): Likewise.
1960 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1962 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1963 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1964 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1965 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1966 s390x-gs-linux64-ipa.o to ipa_obj.
1967 * linux-s390-low.c (HWCAP_S390_GS): New define.
1968 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1970 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1971 (s390_arch_setup): Check for guarded-storage support and choose
1973 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1974 init_registers_s390x_gs_linux64.
1975 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1977 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1978 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1980 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1982 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1984 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1986 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1987 (thread_db_thread_handle): Declare.
1988 * linux-low.c (linux_target_ops): Initialize thread_handle.
1989 * server.c (handle_qxfer_threads_worker): Add support for
1991 * target.h (struct target_ops): Add new function pointer,
1993 (target_thread_handle): Define.
1994 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1996 (thread_db_thread_handle): New function.
1998 2017-09-21 Kevin Buettner <kevinb@redhat.com>
2000 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
2001 * linux-low.h (thread_db_notice_clone): Declare.
2002 * thread-db.c (thread_db_notice_clone): New function.
2004 2017-09-21 Pedro Alves <palves@redhat.com>
2006 * server.c (gdb_read_memory, handle_status, process_serial_event)
2007 (handle_serial_event, handle_target_event): Adjust to
2008 set_desired_thread prototype change.
2009 * target.c (set_desired_thread): Remove 'use_general' parameter
2011 * target.h (set_desired_thread): Remove 'use_general' parameter.
2013 2017-09-20 Tom Tromey <tom@tromey.com>
2015 * target.c (target_terminal::terminal_state): Define.
2016 (target_terminal::init): Rename from target_terminal_init.
2017 (target_terminal::inferior): Rename from
2018 target_terminal_inferior.
2019 (target_terminal::ours): Rename from target_terminal_ours.
2020 (target_terminal::ours_for_output, target_terminal::info): New.
2022 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2024 * server.c (accumulate_file_name_length): Remove.
2025 (emit_dll_description): Adjust to std::string change.
2026 (handle_qxfer_libraries): Use std::string to hold document.
2028 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2030 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
2031 return type of xml_escape_text.
2032 * server.c (emit_dll_description): Likewise.
2034 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
2036 * server.c (captured_main): Accept argument for --selftest.
2037 Update run_tests call.
2038 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
2039 when registering selftests.
2041 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
2043 * regcache.c (get_thread_regcache): Update code to use "std::vector"
2044 instead of "VEC" for "target_desc.reg_defs".
2045 (regcache_cpy): Likewise.
2046 (registers_to_string): Likewise.
2047 (registers_from_string): Likewise.
2048 (find_regno): Likewise.
2049 (supply_regblock): Likewise.
2050 (regcache_raw_read_unsigned): Likewise.
2051 * tdesc.c (init_target_desc): Likewise.
2052 (tdesc_create_reg): Likewise.
2053 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
2054 (struct target_desc) <reg_defs>: Convert to "std::vector".
2055 (target_desc): Do not initialize "reg_defs".
2056 (~target_desc): Update code to use "std::vector" instead of "VEC"
2057 for "target_desc.reg_defs".
2058 (operator==): Likewise.
2060 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2062 * inferiors.h (thread_to_gdb_id): Remove.
2063 * inferiors.c (thread_to_gdb_id): Remove.
2064 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
2065 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
2066 lynx_store_registers, lynx_read_memory, lynx_write_memory):
2068 * nto-low.c (nto_fetch_registers, nto_store_registers,
2069 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2071 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2073 * inferiors.h (gdb_id_to_thread_id): Remove.
2074 * inferiors.c (gdb_id_to_thread_id): Remove.
2075 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2076 removal. Move pid declaration closer to where it's used.
2078 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2080 * server.c (handle_detach): New function.
2081 (process_serial_event): Move code out, call handle_detach.
2083 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2085 * server.c (require_running): Rename to ...
2086 (require_running_or_return): ... this ...
2087 (require_running_or_break): ... and this.
2088 (handle_query, process_serial_event): Adjust.
2090 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2092 * linux-low.c (linux_set_resume_request): Remove unused
2095 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
2097 * server.c (first_thread_of): Remove.
2098 (process_serial_event): Replace usage of first_thread_of with
2099 find_any_thread_of_pid.
2100 * tracepoint.c (same_process_p): Remove.
2101 (gdb_agent_about_to_close): Replace usage of same_process_p with
2102 find_any_thread_of_pid.
2103 * linux-x86-low.c (same_process_callback): Remove.
2104 (x86_arch_setup_process_callback): Replace usage of
2105 same_process_callback with find_any_thread_of_pid.
2106 * thread-db.c (any_thread_of): Remove.
2107 (switch_to_process): Replace usage of any_thread_of with
2108 find_any_thread_of_pid.
2109 * inferiors.c (thread_pid_matches_callback): Remove.
2110 (find_thread_process): Adjust to use find_any_thread_of_pid.
2112 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2114 * regcache.c (get_thread_regcache): Guard calls to "memset"
2117 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
2119 * linux-low.c (handle_extended_wait): Use
2120 "allocate_target_description" instead of "XNEW".
2121 * linux-x86-low.c (initialize_low_arch): Likewise.
2123 2017-09-05 Yao Qi <yao.qi@linaro.org>
2125 * configure.srv (srv_i386_regobj): Remove.
2126 (srv_amd64_regobj): Remove.
2127 (srv_regobj): Set it to "" for x86 non-linux targets.
2128 * linux-x86-tdesc.c (i386_linux_read_description):
2129 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2130 (init_registers_i386): Remove the declaration.
2131 (tdesc_i386): Remove the declaration.
2132 (lynx_i386_arch_setup): Call i386_create_target_description.
2133 * nto-x86-low.c: Likewise.
2134 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2135 [!__x86_64__]: include arch/i386.h.
2136 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2138 2017-09-05 Yao Qi <yao.qi@linaro.org>
2140 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2141 i386/amd64-XXX-linux from it.
2143 2017-09-05 Yao Qi <yao.qi@linaro.org>
2145 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2147 (ipa_amd64_linux_regobj): Remove.
2148 (ipa_x32_linux_regobj): Remove.
2150 2017-09-05 Yao Qi <yao.qi@linaro.org>
2152 * Makefile.in (arch-amd64.o): New rule.
2153 * configure.srv: Append arch-amd64.o.
2154 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2155 (get_ipa_tdesc): Call amd64_linux_read_description.
2156 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2157 and init_registers_amd64_XXX.
2158 * linux-x86-low.c (x86_linux_read_description): Call
2159 amd64_linux_read_description.
2160 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2161 (initialize_low_arch): Don't call init_registers_x32_XXX and
2162 init_registers_amd64_XXX.
2163 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2164 and tdesc_amd64_XXX.
2165 [__x86_64__] (amd64_tdesc_test): New function.
2166 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2167 and init_registers_amd64_XXX.
2168 * linux-x86-tdesc.c: Include arch/amd64.h.
2169 (xcr0_to_tdesc_idx): New function.
2170 (i386_linux_read_description): New function.
2171 (amd64_get_ipa_tdesc_idx): New function.
2172 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2173 (amd64_get_ipa_tdesc): Declare.
2175 2017-09-05 Yao Qi <yao.qi@linaro.org>
2177 * configure.srv (srv_i386_linux_xmlfiles): Remove
2178 i386/i386-XXX-linux.xml from it.
2180 2017-09-05 Yao Qi <yao.qi@linaro.org>
2182 * configure.srv: Set srv_i386_linux_regobj empty if $development
2184 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2185 initialize_low_tdesc.
2186 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2187 with #if initialize_low_tdesc.
2188 * linux-x86-tdesc-selftest.c: New file.
2189 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2191 2017-09-05 Yao Qi <yao.qi@linaro.org>
2193 * Makefile.in (arch-i386.o): New rule.
2194 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2195 (x86_64-*-linux*): Likewise.
2196 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2197 include arch/i386.h.
2198 (i386_linux_read_description): Remove code and call
2199 i386_create_target_description.
2200 * tdesc.c (allocate_target_description): New function.
2201 * tdesc.h (set_tdesc_architecture): Remove declaration.
2202 (set_tdesc_osabi): Likewise.
2204 2017-09-05 Yao Qi <yao.qi@linaro.org>
2206 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2207 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2208 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2210 * server.c (get_features_xml): Call tdesc_get_features_xml.
2211 * tdesc.c (set_tdesc_architecture): New function.
2212 (set_tdesc_osabi): New function.
2213 (tdesc_get_features_xml): New function.
2214 (tdesc_create_feature): Add an argument.
2215 * tdesc.h (struct target_desc) <features>: New field.
2216 <arch, osabi>: New field.
2217 (~target_desc): xfree features, arch, and osabi.
2218 (target_desc::oerator==): Don't compare .xmltarget.
2219 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2220 (set_tdesc_osabi): Likewise.
2221 (tdesc_get_features_xml): Likewise.
2223 2017-09-05 Yao Qi <yao.qi@linaro.org>
2225 * linux-x86-tdesc.c: Include selftest.h.
2226 (i386_tdesc_test): New function.
2227 (initialize_low_tdesc): Call selftests::register_test.
2228 * tdesc.h: Include regdef.h.
2229 (target_desc): Override operator == and !=.
2231 2017-09-05 Yao Qi <yao.qi@linaro.org>
2233 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2234 (ipa_obj): Likewise.
2235 * linux-i386-ipa.c: Include common/x86-xstate.h
2236 (get_ipa_tdesc): Call i386_linux_read_description.
2237 (initialize_low_tracepoint): Don't call init_registers_XXX
2238 functions, call initialize_low_tdesc instead.
2239 * linux-x86-low.c (x86_linux_read_description): Call
2240 i386_linux_read_description.
2241 (initialize_low_arch): Don't call init_registers_i386_XXX
2242 functions, call initialize_low_tdesc.
2243 * linux-x86-tdesc.c: New file.
2244 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2245 (i386_get_ipa_tdesc_idx): Declare.
2246 (i386_get_ipa_tdesc): Declare.
2247 (initialize_low_tdesc): Declare.
2249 2017-09-05 Yao Qi <yao.qi@linaro.org>
2251 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2254 2017-09-05 Yao Qi <yao.qi@linaro.org>
2256 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2257 * regcache.c (get_thread_regcache): Use VEC_length.
2258 (init_register_cache): Likewise.
2259 (regcache_cpy): Likewise.
2260 (registers_to_string): Iterate reg_defs via VEC_iterate.
2261 (find_regno): Likewise.
2262 (find_register_by_number): Use VEC_index.
2263 (register_size): Call find_register_by_number.
2264 (register_data): Call find_register_by_number.
2265 (supply_regblock): Use VEC_length.
2266 (regcache_raw_read_unsigned): Likewise.
2267 * tdesc.c (init_target_desc): Iterate reg_defs via
2269 (default_description): Update initializer.
2270 (copy_target_description): Don't update field num_registers.
2271 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2272 <num_registers>: Remove.
2274 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2276 * Makefile.in (.SECONDARY): Define target.
2278 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2280 * linux-low.c (linux_wait_1): Adjust.
2281 * server.c (queue_stop_reply_callback): Adjust.
2283 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2285 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2286 QEnvironmentUnset and QEnvironmentReset packets.
2287 (handle_query): Inform remote that QEnvironmentHexEncoded,
2288 QEnvironmentUnset and QEnvironmentReset are supported.
2290 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2292 * inferiors.h (inferior_target_data): Rename to ...
2293 (thread_target_data): ... this.
2294 (inferior_regcache_data): Rename to ...
2295 (thread_regcache_data): ... this.
2296 (set_inferior_regcache_data): Rename to ...
2297 (set_thread_regcache_data): ... this.
2298 * inferiors.c (inferior_target_data): Rename to ...
2299 (thread_target_data): ... this.
2300 (inferior_regcache_data): Rename to ...
2301 (thread_regcache_data): ... this.
2302 (set_inferior_regcache_data): Rename to ...
2303 (set_thread_regcache_data): ... this.
2304 (free_one_thread): Update.
2305 * linux-low.h (get_thread_lwp): Update.
2306 * regcache.c (get_thread_regcache): Update.
2307 (regcache_invalidate_thread): Update.
2308 (free_register_cache_thread): Update.
2309 * win32-i386-low.c (update_debug_registers_callback): Update.
2310 (win32_get_current_dr): Update.
2311 * win32-low.c (thread_rec): Update.
2312 (delete_thread_info): Update.
2313 (continue_one_thread): Update.
2314 (suspend_one_thread): Update.
2316 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2318 * inferiors.c (set_inferior_target_data): Remove.
2319 * inferiors.h (set_inferior_target_data): Remove.
2321 2017-08-18 Yao Qi <yao.qi@linaro.org>
2323 * Makefile.in (OBS): Add selftest.o.
2324 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2325 * configure, config.in: Re-generated.
2326 * server.c: Include common/sefltest.h.
2327 (captured_main): Handle option --selftest.
2329 2017-08-09 Yao Qi <yao.qi@linaro.org>
2331 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2332 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2333 i386-avx-mpx.o and i386-mmx.o.
2334 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2335 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2336 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2337 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2338 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2339 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2340 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2341 i386/amd64-avx-mpx.xml.
2343 2017-08-09 Yao Qi <yao.qi@linaro.org>
2345 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2346 and x32-avx-avx512.o.
2347 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2348 i386/x32-avx-avx512.xml.
2350 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2352 * tracepoint.h (enum class fast_tpoint_collect_result): New
2354 (fast_tracepoint_collecting): Change return type to
2355 fast_tpoint_collect_result.
2356 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2357 * linux-low.h: Include tracepoint.h.
2358 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2359 fast_tpoint_collect_result.
2360 * linux-low.c (handle_tracepoints): Adjust.
2361 (linux_fast_tracepoint_collecting): Change return type to
2362 fast_tpoint_collect_result.
2363 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2364 linux_wait_1, stuck_in_jump_pad_callback,
2365 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2366 proceed_one_lwp): Adjust to type change.
2368 2017-07-10 Yao Qi <yao.qi@linaro.org>
2370 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2372 2017-06-29 Yao Qi <yao.qi@linaro.org>
2374 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2376 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2378 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2380 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2382 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2384 * linux-low.c (linux_create_inferior): Adjust code to access the
2385 environment information via 'gdb_environ' class.
2386 * lynx-low.c (lynx_create_inferior): Likewise.
2387 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2388 (get_environ): Return a pointer to 'our_environ'.
2389 (captured_main): Initialize 'our_environ'.
2390 * server.h (get_environ): Adjust prototype.
2391 * spu-low.c (spu_create_inferior): Adjust code to access the
2392 environment information via 'gdb_environ' class.
2394 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2396 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2397 usage of "register" keyword.
2399 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2401 * configure: Re-generate.
2403 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2405 * configure: Re-generate.
2407 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2409 * Makefile.in (COMPILE.pre): Add "-x c++".
2411 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2413 * fork-child.c: Conditionally include <signal.h>.
2415 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2417 * server.c (handle_general_set): Handle new packet
2418 "QStartupWithShell".
2419 (handle_query): Add "QStartupWithShell" to the list of supported
2421 (gdbserver_usage): Add help text explaining the
2422 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2424 (captured_main): Recognize and act upon the presence of the new
2427 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2428 Pedro Alves <palves@redhat.com>
2430 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2431 * configure: Regenerate.
2432 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2434 (i[34567]86-*-lynxos*): Likewise.
2435 (spu*-*-*): Likewise.
2436 * fork-child.c: New file.
2437 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2439 (linux_ptrace_fun): New function.
2440 (linux_create_inferior): Adjust function prototype to reflect
2441 change on "target.h". Adjust function code to use
2443 (linux_request_interrupt): Delete "signal_pid".
2444 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2445 (lynx_ptrace_fun): New function.
2446 (lynx_create_inferior): Adjust function prototype to reflect
2447 change on "target.h". Adjust function code to use
2449 * nto-low.c (nto_create_inferior): Adjust function prototype and
2450 code to reflect change on "target.h". Update comments.
2451 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2452 "common-terminal.h" and "environ.h".
2453 (terminal_fd): Moved to fork-child.c.
2454 (old_foreground_pgrp): Likewise.
2455 (restore_old_foreground_pgrp): Likewise.
2456 (last_status): Make it global.
2457 (last_ptid): Likewise.
2458 (our_environ): New variable.
2459 (startup_with_shell): Likewise.
2460 (program_name): Likewise.
2461 (program_argv): Rename to...
2462 (program_args): ...this.
2463 (wrapper_argv): New variable.
2464 (start_inferior): Delete function.
2465 (get_exec_wrapper): New function.
2466 (get_exec_file): Likewise.
2467 (get_environ): Likewise.
2468 (prefork_hook): Likewise.
2469 (post_fork_inferior): Likewise.
2470 (postfork_hook): Likewise.
2471 (postfork_child_hook): Likewise.
2472 (handle_v_run): Update code to deal with arguments coming from the
2473 remote host. Update calls from "start_inferior" to
2475 (captured_main): Likewise. Initialize environment variable. Call
2477 * server.h (post_fork_inferior): New prototype.
2478 (get_environ): Likewise.
2479 (last_status): Declare.
2480 (last_ptid): Likewise.
2481 (signal_pid): Likewise.
2482 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2483 (spu_ptrace_fun): New function.
2484 (spu_create_inferior): Adjust function prototype to reflect change
2485 on "target.h". Adjust function code to use "fork_inferior".
2486 * target.c (target_terminal_init): New function.
2487 (target_terminal_inferior): Likewise.
2488 (target_terminal_ours): Likewise.
2489 * target.h: Include <vector>.
2490 (struct target_ops) <create_inferior>: Update prototype.
2491 (create_inferior): Update macro.
2492 * utils.c (gdb_flush_out_err): New function.
2493 * win32-low.c (win32_create_inferior): Adjust function prototype
2494 and code to reflect change on "target.h".
2496 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2498 * inferiors.c (switch_to_thread): New function.
2500 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2502 * Makefile.in (SFILE): Add "common/job-control.c".
2503 (OBS): Add "job-control.o".
2505 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2507 * Makefile: Remove "@host_makefile_frag@".
2509 2017-05-05 Pedro Alves <palves@redhat.com>
2511 * configure: Regenerate.
2513 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2515 * configure: Regenerate.
2517 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2519 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2520 software_single_step change of return type to
2521 std::vector<CORE_ADDR>.
2522 * linux-low.c (install_software_single_step_breakpoints):
2524 * linux-low.h (install_software_single_step_breakpoints):
2527 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2529 * remote-utils.c: Include "gdb_termios.h" instead of
2531 * terminal.h: Delete file.
2533 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2535 * server.c: Include <vector>.
2536 <program_argv, wrapper_argv>: Convert to std::vector.
2537 (start_inferior): Rewrite function to use C++.
2538 (handle_v_run): Likewise. Update code that calculates the argv
2539 based on the vRun packet; use C++.
2540 (captured_main): Likewise.
2542 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2544 * server.c (handle_v_cont): Initialize thread_resume::thread
2547 2017-04-05 Pedro Alves <palves@redhat.com>
2549 * configure: Regenerate.
2551 2017-04-05 Pedro Alves <palves@redhat.com>
2553 * gdbreplay.c (sync_error): Constify.
2554 * linux-x86-low.c (push_opcode): Constify.
2556 2017-04-05 Pedro Alves <palves@redhat.com>
2558 * win32-low.c (get_child_debug_event)
2559 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2560 Report TARGET_WAITKIND_SPURIOUS instead.
2562 2017-04-05 Pedro Alves <palves@redhat.com>
2564 * remote-utils.c (remote_prepare, remote_open): Constify.
2565 * remote-utils.h (remote_prepare, remote_open): Constify.
2566 * server.c (captured_main): Constify 'port' handling.
2568 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2570 * Makefile.in (clean): Clear .deps.
2572 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2574 * .gitignore: Remove generated files, replace with wildcard.
2575 * (clean): Replace removal of generated files with wildcard.
2576 (version.c): Replace with...
2577 (version-generated.c): ...this.
2578 (xml-builtin.c): Replace with...
2579 (xml-builtin-generated.c): ...this.
2580 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2581 (%.c: *regformats*): Replace with...
2582 (%-generated.c: *regformats*): ...this.
2584 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2586 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2587 (xtensa_fill_gregset): Call collect_register_by_name for
2589 (xtensa_store_gregset): Call supply_register_by_name for
2592 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2594 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2595 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2596 (xtensa_store_gregset): Call supply_register for all registers in
2597 a0_regnum..a0_regnum + C0_NREGS range.
2599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2601 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2602 (ax-ipa.o: ax.c): Remove.
2603 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2604 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2605 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2606 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2607 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2609 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2611 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2612 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2613 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2614 (errors-ipa.o: ../common/errors.c): Remove.
2615 (format-ipa.o: ../common/format.c): Remove.
2616 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2618 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2620 * Makefile.in (%-ipa.o: %.c): New rule.
2621 (tracepoint-ipa.o: tracepoint.c): Remove.
2622 (utils-ipa.o: utils.c): Remove.
2623 (remote-utils-ipa.o: remote-utils.c): Remove.
2624 (regcache-ipa.o: regcache.c): Remove.
2625 (i386-linux-ipa.o: i386-linux.c): Remove.
2626 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2627 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2628 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2629 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2630 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2631 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2632 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2633 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2634 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2635 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2636 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2637 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2638 (aarch64-ipa.o: aarch64.c): Remove.
2639 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2640 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2641 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2642 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2643 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2644 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2645 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2646 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2647 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2648 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2649 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2650 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2651 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2652 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2653 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2654 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2655 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2656 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2657 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2658 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2659 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2660 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2661 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2662 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2663 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2664 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2665 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2666 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2667 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2668 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2669 (tdesc-ipa.o: tdesc.c): Remove.
2670 (x32-linux-ipa.o: x32-linux.c): Remove.
2671 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2672 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2674 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2676 * Makefile.in (%.o: ../arch/%.c): New rule.
2677 (arm.o: ../arch/arm.c): Remove.
2678 (arm-linux.o: ../arch/arm-linux.c): Remove.
2679 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2680 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2682 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2684 * Makefile.in (%.o: ../nat/%.c): New rule.
2685 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2686 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2687 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2688 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2689 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2690 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2691 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2692 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2693 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2694 (linux-personality.o: ../nat/linux-personality.c): Remove.
2695 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2696 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2697 (x86-linux.o: ../nat/x86-linux.c): Remove.
2698 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2699 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2701 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2703 * Makefile.in (%.o: ../common/%.c): New rule.
2704 (signals.o: ../common/signals.c): Remove.
2705 (print-utils.o: ../common/print-utils.c): Remove.
2706 (rsp-low.o: ../common/rsp-low.c): Remove.
2707 (common-utils.o: ../common/common-utils.c): Remove.
2708 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2709 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2710 (vec.o: ../common/vec.c): Remove.
2711 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2712 (xml-utils.o: ../common/xml-utils.c): Remove.
2713 (ptid.o: ../common/ptid.c): Remove.
2714 (buffer.o: ../common/buffer.c): Remove.
2715 (format.o: ../common/format.c): Remove.
2716 (filestuff.o: ../common/filestuff.c): Remove.
2717 (agent.o: ../common/agent.c): Remove.
2718 (errors.o: ../common/errors.c): Remove.
2719 (environ.o: ../common/environ.c): Remove.
2720 (common-debug.o: ../common/common-debug.c): Remove.
2721 (cleanups.o: ../common/cleanups.c): Remove.
2722 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2723 (fileio.o: ../common/fileio.c): Remove.
2724 (common-regcache.o: ../common/common-regcache.c): Remove.
2725 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2726 (new-op.o: ../common/new-op.c): Remove.
2727 (btrace-common.o: ../common/btrace-common.c): Remove.
2729 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2731 * Makefile.in (%.o: ../target/%.c): New rule.
2732 (waitstatus.o: ../target/waitstatus.c): Remove.
2734 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2737 (%.c: ../regformats/%.dat,
2738 (%.c: ../regformats/arm/%.dat,
2739 (%.c: ../regformats/i386/%.dat,
2740 (%.c: ../regformats/rs6000/%.dat): New rules.
2741 (aarch64.c): Remove.
2742 (reg-arm.c): Remove.
2743 (arm-with-iwmmxt.c): Remove.
2744 (arm-with-vfpv2.c): Remove.
2745 (arm-with-vfpv3.c): Remove.
2746 (arm-with-neon.c): Remove.
2747 (reg-bfin.c): Remove.
2748 (reg-cris.c): Remove.
2749 (reg-crisv32.c): Remove.
2751 (i386-linux.c): Remove.
2752 (i386-avx.c): Remove.
2753 (i386-avx-linux.c): Remove.
2754 (i386-avx-avx512.c): Remove.
2755 (i386-avx-avx512-linux.c): Remove.
2756 (i386-mpx.c): Remove.
2757 (i386-mpx-linux.c): Remove.
2758 (i386-avx-mpx-avx512-pku.c): Remove.
2759 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2760 (i386-avx-mpx.c): Remove.
2761 (i386-avx-mpx-linux.c): Remove.
2762 (i386-mmx.c): Remove.
2763 (i386-mmx-linux.c): Remove.
2764 (reg-ia64.c): Remove.
2765 (reg-m32r.c): Remove.
2766 (reg-m68k.c): Remove.
2768 (mips-linux.c): Remove.
2769 (mips-dsp-linux.c): Remove.
2770 (mips64-linux.c): Remove.
2771 (mips64-dsp-linux.c): Remove.
2772 (nios2-linux.c): Remove.
2773 (powerpc-32.c): Remove.
2774 (powerpc-32l.c): Remove.
2775 (powerpc-altivec32l.c): Remove.
2776 (powerpc-cell32l.c): Remove.
2777 (powerpc-vsx32l.c): Remove.
2778 (powerpc-isa205-32l.c): Remove.
2779 (powerpc-isa205-altivec32l.c): Remove.
2780 (powerpc-isa205-vsx32l.c): Remove.
2781 (powerpc-e500l.c): Remove.
2782 (powerpc-64l.c): Remove.
2783 (powerpc-altivec64l.c): Remove.
2784 (powerpc-cell64l.c): Remove.
2785 (powerpc-vsx64l.c): Remove.
2786 (powerpc-isa205-64l.c): Remove.
2787 (powerpc-isa205-altivec64l.c): Remove.
2788 (powerpc-isa205-vsx64l.c): Remove.
2789 (s390-linux32.c): Remove.
2790 (s390-linux32v1.c): Remove.
2791 (s390-linux32v2.c): Remove.
2792 (s390-linux64.c): Remove.
2793 (s390-linux64v1.c): Remove.
2794 (s390-linux64v2.c): Remove.
2795 (s390-te-linux64.c): Remove.
2796 (s390-vx-linux64.c): Remove.
2797 (s390-tevx-linux64.c): Remove.
2798 (s390x-linux64.c): Remove.
2799 (s390x-linux64v1.c): Remove.
2800 (s390x-linux64v2.c): Remove.
2801 (s390x-te-linux64.c): Remove.
2802 (s390x-vx-linux64.c): Remove.
2803 (s390x-tevx-linux64.c): Remove.
2804 (tic6x-c64xp-linux.c): Remove.
2805 (tic6x-c64x-linux.c): Remove.
2806 (tic6x-c62x-linux.c): Remove.
2808 (reg-sparc64.c): Remove.
2809 (reg-spu.c): Remove.
2811 (amd64-linux.c): Remove.
2812 (amd64-avx.c): Remove.
2813 (amd64-avx-linux.c): Remove.
2814 (amd64-avx-avx512.c): Remove.
2815 (amd64-avx-avx512-linux.c): Remove.
2816 (amd64-mpx.c): Remove.
2817 (amd64-mpx-linux.c): Remove.
2818 (amd64-avx-mpx-avx512-pku.c): Remove.
2819 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2820 (amd64-avx-mpx.c): Remove.
2821 (amd64-avx-mpx-linux.c): Remove.
2823 (x32-linux.c): Remove.
2824 (x32-avx.c): Remove.
2825 (x32-avx-linux.c): Remove.
2826 (x32-avx-avx512.c): Remove.
2827 (x32-avx-avx512-linux.c): Remove.
2828 (reg-xtensa.c): Remove.
2829 (reg-tilegx.c): Remove.
2830 (reg-tilegx32.c): Remove.
2832 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2834 * Makefile.in (SFILES): Add "common/environ.c".
2835 (OBJS): Add "common/environ.h".
2837 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2839 * configure.ac: Check if the fs_base and gs_base members of
2840 `struct user_regs_struct' exist.
2841 * config.in: Regenerated.
2842 * configure: Likewise.
2844 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2846 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2848 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2849 (get_next_pcs_syscall_next_pc): Likewise.
2851 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2853 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2854 * nto-x86-low.c: Likewise.
2856 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2858 * Makefile.in: Include disable-implicit-rules.mk.
2860 2016-11-23 Pedro Alves <palves@redhat.com>
2862 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2863 (debug_vprintf): Use std::chrono::steady_clock instead of
2864 gettimeofday. Use '.' instead of ':'.
2865 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2866 (get_timestamp): Use std::chrono::steady_clock instead of
2869 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2871 * Makefile.in: Fix whitespace formatting.
2873 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2875 * Makefile.in (SFILES, OBS): Flatten list and order
2878 2016-11-23 Pedro Alves <palves@redhat.com>
2880 * event-loop.c (handle_file_event): Use warning.
2881 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2882 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2885 2016-11-23 Pedro Alves <palves@redhat.com>
2887 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2889 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2890 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2891 debug_printf and debug_flush for debug output.
2892 * server.c (handle_general_set): Likewise.
2893 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2896 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2898 * Makefile.in (.c.o): Replace rule with ...
2899 (%.o: %.c): ... this one.
2901 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2903 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2904 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2906 * configure.ac: Remove checks for the make program.
2907 * configure: Re-generate.
2909 2016-10-28 Pedro Alves <palves@redhat.com>
2911 * Makefile.in (CXX_DIALECT): Get from configure.
2912 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2913 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2914 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2915 * config.in: Regenerate.
2916 * configure: Regenerate.
2918 2016-10-27 Yao Qi <yao.qi@linaro.org>
2920 * linux-low.c (linux_supports_range_stepping): Return true if
2921 can_software_single_step return true.
2923 2016-10-27 Yao Qi <yao.qi@linaro.org>
2925 * inferiors.c (find_inferior_in_random): New function.
2926 * inferiors.h (find_inferior_in_random): Declare.
2927 * linux-low.c (linux_wait_for_event_filtered): Call
2928 find_inferior_in_random instead of find_inferior.
2930 2016-10-27 Yao Qi <yao.qi@linaro.org>
2932 * linux-low.c (linux_wait_1): If single-step breakpoints are
2933 inserted, remove them.
2935 2016-10-26 Pedro Alves <palves@redhat.com>
2937 * linux-low.c (handle_extended_wait): Link parent/child fork
2939 (linux_wait_1): Unlink them.
2940 (linux_set_resume_request): Ignore resume requests for
2941 already-resumed and unhandled fork child threads.
2942 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2943 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2945 (handle_v_requests) <vCont>: Don't call require_running.
2946 * server.h (in_queued_stop_replies): New declaration.
2948 2016-10-24 Yao Qi <yao.qi@linaro.org>
2951 * linux-aarch64-low.c (append_insns): Cast the return value to
2954 2016-10-10 Yao Qi <yao.qi@linaro.org>
2956 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2958 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2960 * target.c (target_supports_multi_process): New function, moved
2962 * target.h (target_supports_multi_process): ... here. Remove
2965 2016-10-05 Tom Tromey <tom@tromey.com>
2968 * tracepoint.c (handle_tracepoint_bkpts): Check
2969 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2971 2016-10-05 Yao Qi <yao.qi@linaro.org>
2973 * configure.srv: Update the path of arm-*.xml files.
2975 2016-10-05 Terry Guo <terry.guo@arm.com>
2976 Yao Qi <yao.qi@linaro.org>
2978 * Makefile.in: Adjust the path of rules.
2979 * configure.srv: Update the path of xml files.
2980 * regformats/arm-with-iwmmxt.dat: Regenerated.
2981 * regformats/arm-with-neon.dat: Likewise.
2982 * regformats/arm-with-vfpv2.dat: Likewise.
2983 * regformats/arm-with-vfpv3.dat Likewise.
2985 2016-09-30 Yao Qi <yao.qi@linaro.org>
2988 * target.c (target_stop_and_wait): Don't call
2989 target_continue_no_signal, use resume_stop instead.
2991 2016-09-26 Yao Qi <yao.qi@linaro.org>
2993 * linux-low.c (linux_wait_1): Call debug_exit.
2995 2016-09-23 Pedro Alves <palves@redhat.com>
2997 * Makefile.in (SFILES): Add common/new-op.c.
2998 (OBS): Add common/new-op.o.
2999 (new-op.o): New rule.
3001 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
3003 * .gitinore: Ignore more files.
3005 2016-09-21 Yao Qi <yao.qi@linaro.org>
3007 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
3010 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
3012 * server.c (start_inferior): Call target_mourn_inferior instead of
3013 mourn_inferior; pass ptid_t argument to it.
3015 (handle_target_event): Likewise.
3016 * target.c (target_mourn_inferior): New function.
3017 * target.h (mourn_inferior): Delete macro.
3019 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
3021 * linux-low.c (lwp_is_stepping): New function.
3023 2016-09-06 Carl Love <cel@us.ibm.com>
3025 * server.c (start_inferior): Fixed comment, requested comment change
3026 didn't get updated correctly. Removed reference to ptrace () call as
3027 it is only true on Linux systems.
3029 2016-09-06 Carl Love <cel@us.ibm.com>
3031 * server.c (start_inferior): Do not call
3032 function target_post_create_inferior () if the
3033 inferior process has already exited.
3035 2016-09-05 Pedro Alves <palves@redhat.com>
3037 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
3038 (COMPILE.pre, CC_LD): Use CXX directly.
3039 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
3040 * acinclude.m4: Don't include build-with-cxx.m4.
3041 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
3042 * configure: Regenerate.
3044 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
3047 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
3048 call writing data to own_buf.
3050 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3052 * target.c (mywait): Call target_wait instead of
3054 (target_wait): New function.
3056 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
3058 * server.c (start_inferior): New variable 'ptid'. Replace calls
3059 to the_target->resume by target_continue{,_no_signal}, depending
3061 * target.c (target_stop_and_wait): Call target_continue_no_signal
3062 instead of the_target->resume.
3063 (target_continue): New function.
3065 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
3067 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3069 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
3072 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3074 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3075 * linux-arm-low.c (ps_get_thread_area): Likewise.
3076 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3077 * linux-m68k-low.c (ps_get_thread_area): Likewise.
3078 * linux-mips-low.c (ps_get_thread_area): Likewise.
3079 * linux-nios2-low.c (ps_get_thread_area): Likewise.
3080 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3081 * linux-x86-low.c (ps_get_thread_area): Likewise.
3082 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3084 2016-08-19 Pedro Alves <palves@redhat.com>
3086 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3088 2016-08-19 Pedro Alves <palves@redhat.com>
3090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3091 comment. Use memcpy instead of casting through unsigned long.
3093 2016-08-19 Pedro Alves <palves@redhat.com>
3095 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3096 allocating around 0x80000000.
3098 2016-08-19 Pedro Alves <palves@redhat.com>
3101 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3102 (x32-avx512-linux-ipa.o): New rules.
3103 * configure.ac (x86_64-*-linux*): New x32 check.
3104 * configure.srv (ipa_x32_linux_regobj): New.
3105 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3106 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3108 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3110 * configure: Regenerate.
3112 2016-08-09 Pedro Alves <palves@redhat.com>
3115 * Makefile.in (OBS): Add signals-state-save-restore.o.
3116 (signals-state-save-restore.o): New rule.
3117 * config.in: Regenerate.
3118 * configure: Regenerate.
3119 * linux-low.c: Include "signals-state-save-restore.h".
3120 (linux_create_inferior): Call
3121 restore_original_signals_state.
3122 * server.c: Include "dispositions-save-restore.h".
3123 (captured_main): Call save_original_signals_state.
3125 2016-08-05 Pedro Alves <palves@redhat.com>
3127 * configure: Regenerate.
3129 2016-08-04 Yao Qi <yao.qi@linaro.org>
3131 * linux-low.c (regsets_fetch_inferior_registers): Check
3132 errno is ESRCH or not.
3134 2016-08-02 Yao Qi <yao.qi@linaro.org>
3136 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3137 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3138 (thread_db_load_search): Update.
3139 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3140 td_ta_set_event and td_ta_event_getmsg.
3142 2016-07-26 Pedro Alves <palves@redhat.com>
3145 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3146 of unsigned long for 64-bit registers and use uint32_t instead of
3147 unsigned int for 32-bit registers.
3149 2016-07-26 Pedro Alves <palves@redhat.com>
3151 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3154 2016-07-21 Tom Tromey <tom@tromey.com>
3156 * configure: Rebuild.
3158 2016-07-21 Yao Qi <yao.qi@linaro.org>
3160 * mem-break.c (find_gdb_breakpoint): Cast bp to
3161 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3163 2016-07-21 Yao Qi <yao.qi@linaro.org>
3165 * server.c (handle_v_requests): Support s and S actions
3166 if target_supports_software_single_step return true.
3168 2016-07-21 Yao Qi <yao.qi@linaro.org>
3170 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3171 is resume_step, call maybe_hw_step.
3172 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3174 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3176 (proceed_one_lwp): If resume request is resume_step, install
3177 reinsert breakpoints and call maybe_hw_step.
3179 2016-07-21 Yao Qi <yao.qi@linaro.org>
3181 * linux-low.c (proceed_one_lwp): Declare.
3182 (linux_resume_one_thread): Remove local variable 'step'.
3183 Lift code enqueue signal. Call proceed_one_lwp instead of
3184 linux_resume_one_lwp.
3186 2016-07-21 Yao Qi <yao.qi@linaro.org>
3188 * linux-low.c (linux_resume_one_thread): Call
3189 enqueue_pending_signal.
3191 2016-07-21 Yao Qi <yao.qi@linaro.org>
3193 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3194 * inferiors.c (do_restore_current_thread_cleanup): New function.
3195 (make_cleanup_restore_current_thread): Likewise.
3196 * linux-low.c (install_software_single_step_breakpoints): Call
3197 make_cleanup_restore_current_thread. Switch current_thread to
3200 2016-07-21 Yao Qi <yao.qi@linaro.org>
3202 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3203 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3204 (clone_one_breakpoint): Likewise.
3205 (delete_reinsert_breakpoints): Change parameter to thread.
3207 (has_reinsert_breakpoints): Likewise.
3208 (uninsert_reinsert_breakpoints): Likewise.
3209 (reinsert_reinsert_breakpoints): Likewise.
3210 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3211 (delete_reinsert_breakpoints): Likewise.
3212 (reinsert_reinsert_breakpoints): Likewise.
3213 (uninsert_reinsert_breakpoints): Likewise.
3214 (has_reinsert_breakpoints): Likewise.
3216 2016-07-21 Yao Qi <yao.qi@linaro.org>
3218 * inferiors.c (get_thread_process): Make parameter const.
3219 * inferiors.h (get_thread_process): Update declaration.
3220 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3221 Add new parameters child_thread and parent_thread. Callers
3223 * mem-break.h (clone_all_breakpoints): Update declaration.
3225 2016-07-21 Yao Qi <yao.qi@linaro.org>
3227 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3228 <command_list, handler>: Remove.
3229 (struct gdb_breakpoint): New.
3230 (struct other_breakpoint): New.
3231 (struct reinsert_breakpoint): New.
3232 (is_gdb_breakpoint): New function.
3233 (any_persistent_commands): Update command_list if
3234 is_gdb_breakpoint returns true.
3235 (set_breakpoint): Create breakpoints according to their types.
3236 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3237 (set_gdb_breakpoint_1): Likewise.
3238 (set_gdb_breakpoint): Likewise.
3239 (clear_breakpoint_conditions): Change parameter type to
3240 'struct gdb_breakpoint *'.
3241 (clear_breakpoint_commands): Likewise.
3242 (clear_breakpoint_conditions_and_commands): Likewise.
3243 (add_condition_to_breakpoint): Likewise.
3244 (add_breakpoint_condition): Likewise.
3245 (add_commands_to_breakpoint): Likewise.
3246 (check_breakpoints): Check other_breakpoint.
3247 (clone_one_breakpoint): Clone breakpopint according to its type.
3248 * mem-break.h (struct gdb_breakpoint): Declare.
3249 (set_gdb_breakpoint): Update declaration.
3250 (clear_breakpoint_conditions_and_commands): Likewise.
3251 (add_breakpoint_condition): Likewise.
3252 (add_breakpoint_commands): Likewise.
3253 * server.c (process_point_options): Change parameter type to
3254 'struct gdb_breakpoint *'.
3256 2016-07-21 Yao Qi <yao.qi@linaro.org>
3258 * mem-break.c (set_breakpoint_at): Rename it to ...
3259 (set_breakpoint_type_at): ... it.
3260 (set_breakpoint_at): Call set_breakpoint_type_at.
3261 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3262 * mem-break.h (set_breakpoint_at): Update comments.
3264 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3266 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3268 (nios2_store_gregset): Likewise.
3270 2016-07-01 Pedro Alves <palves@redhat.com>
3271 Antoine Tremblay <antoine.tremblay@ericsson.com>
3273 * linux-low.c: Change interface to take the target lwp_info
3274 pointer directly and return void. Handle detaching from a zombie
3276 (linux_detach_lwp_callback): New function.
3277 (linux_detach): Detach from the leader thread after detaching from
3280 2016-06-28 Yao Qi <yao.qi@linaro.org>
3282 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3283 for variable new_offset.
3284 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3285 (aarch64_ftrace_insn_reloc_cb): Likewise.
3286 (aarch64_ftrace_insn_reloc_tb): Likewise.
3287 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3288 PRIx64 instead of PRIx32.
3290 2016-06-28 Yao Qi <yao.qi@linaro.org>
3292 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3293 (the_low_target): Install arm_get_syscall_trapinfo.
3295 2016-06-28 Yao Qi <yao.qi@linaro.org>
3297 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3299 (the_low_target): Install aarch64_get_syscall_trapinfo.
3301 2016-06-28 Yao Qi <yao.qi@linaro.org>
3303 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3305 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3306 Remove parameter sysno.
3307 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3310 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3312 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3313 (s390_emit_ne_goto): Likewise.
3314 (s390_emit_lt_goto): Likewise.
3315 (s390_emit_le_goto): Likewise.
3316 (s390_emit_gt_goto): Likewise.
3317 (s390_emit_ge_goto): Likewise.
3318 (s390x_emit_eq_goto): Likewise.
3319 (s390x_emit_ne_goto): Likewise.
3320 (s390x_emit_lt_goto): Likewise.
3321 (s390x_emit_le_goto): Likewise.
3322 (s390x_emit_gt_goto): Likewise.
3323 (s390x_emit_ge_goto): Likewise.
3324 (s390_emit_ops_impl): Mark variable static.
3325 (s390x_emit_ops): Likewise.
3327 2016-06-17 Yao Qi <yao.qi@linaro.org>
3329 * linux-low.c (handle_extended_wait): Call
3330 uninsert_reinsert_breakpoints for the parent process. Remove
3331 reinsert breakpoints from the child process. Reinsert them to
3332 the parent process when vfork is done.
3333 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3334 (reinsert_reinsert_breakpoints): New function.
3335 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3336 (reinsert_reinsert_breakpoints): Declare.
3338 2016-06-17 Yao Qi <yao.qi@linaro.org>
3340 * linux-low.c (handle_extended_wait): If the parent is doing
3341 step-over, remove the reinsert breakpoints from the forked child.
3343 2016-06-17 Yao Qi <yao.qi@linaro.org>
3345 * linux-low.c (unsuspend_all_lwps): Declare.
3346 (linux_low_filter_event): If thread exited, call finish_step_over.
3347 If step-over is finished, unsuspend other threads.
3349 2016-06-17 Yao Qi <yao.qi@linaro.org>
3351 * linux-low.c (linux_resume_one_lwp_throw): Assert
3352 has_reinsert_breakpoints returns false.
3353 * mem-break.c (delete_disabled_breakpoints): Assert
3354 bp type isn't reinsert_breakpoint.
3356 2016-06-17 Yao Qi <yao.qi@linaro.org>
3358 * linux-low.c (maybe_hw_step): New function.
3359 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3360 (finish_step_over): Switch current_thread to lwp temporarily,
3361 and assert has_reinsert_breakpoints returns true.
3362 (proceed_one_lwp): Call maybe_hw_step.
3363 * mem-break.c (has_reinsert_breakpoints): New function.
3364 * mem-break.h (has_reinsert_breakpoints): Declare.
3366 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3368 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3370 2016-05-17 Yao Qi <yao.qi@linaro.org>
3372 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3373 instead of find_inferior.
3375 2016-05-05 Yao Qi <yao.qi@linaro.org>
3377 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3378 Initialize res to zero.
3380 2016-05-05 Yao Qi <yao.qi@linaro.org>
3382 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3385 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3387 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3388 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3389 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3391 2016-04-28 Par Olsson <par.olsson@windriver.com>
3392 Simon Marchi <simon.marchi@ericsson.com>
3394 * tracepoint.c (write_inferior_int8): New function.
3395 (cmd_qtenable_disable): Write enable flag using
3396 write_inferior_int8.
3398 2016-04-25 Yao Qi <yao.qi@linaro.org>
3400 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3401 (need_step_over_p): Return zero if the LWP has pending signals
3402 can be delivered on software single step target.
3404 2016-04-25 Yao Qi <yao.qi@linaro.org>
3406 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3407 return instead of error.
3409 2016-04-22 Yao Qi <yao.qi@linaro.org>
3411 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3414 2016-04-22 Yao Qi <yao.qi@linaro.org>
3416 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3417 signal when stepping over breakpoint with software single
3420 2016-04-21 Pedro Alves <palves@redhat.com>
3422 * linux-s390-low.c (s390_collect_ptrace_register)
3423 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3425 (s390_check_regset): Use void * instead of gdb_byte *.
3427 2016-04-20 Pedro Alves <palves@redhat.com>
3429 * configure: Renegerate.
3431 2016-04-20 Yao Qi <yao.qi@linaro.org>
3433 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3434 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3436 (arm_store_gregset): Likewise.
3438 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3440 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3441 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3442 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3443 (amd64-avx-mpx-linux.c): New rules.
3444 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3445 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3446 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3447 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3448 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3449 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3450 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3451 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3452 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3453 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3454 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3455 * linux-x86-low.c (x86_linux_read_description): Add case for
3456 X86_XSTATE_AVX_MPX_MASK.
3457 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3458 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3459 init_registers_i386_avx_mpx_linux.
3460 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3461 (initialize_low_tracepoint): Call
3462 init_registers_i386_avx_mpx_linux.
3463 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3464 (initialize_low_tracepoint): Call
3465 init_registers_amd64_avx_mpx_linux.
3466 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3467 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3468 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3471 2016-04-18 Pedro Alves <palves@redhat.com>
3473 * configure: Regenerate.
3475 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3477 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3478 (aarch64_emit_sub): Likewise.
3480 2016-04-12 Pedro Alves <palves@redhat.com>
3482 * utils.c (prepare_to_throw_exception): Delete.
3484 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3486 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3488 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3490 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3492 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3494 * linux-aarch64-ipa.c: Add <elf.h> include.
3495 * linux-ppc-ipa.c: Add <elf.h> include.
3496 * linux-s390-ipa.c: Add <elf.h> include.
3498 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3500 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3501 (get_raw_reg_ptr): Likewise.
3502 (get_trace_state_variable_value_ptr): Likewise.
3503 (set_trace_state_variable_value_ptr): Likewise.
3504 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3507 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3508 Marcin Kościelnicki <koriakin@0x04.net>
3511 * linux-ppc-low.c (emit_insns): New function.
3512 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3513 (ppc_emit_prologue): New function.
3514 (ppc_emit_epilogue): New function.
3515 (ppc_emit_add): New function.
3516 (ppc_emit_sub): New function.
3517 (ppc_emit_mul): New function.
3518 (ppc_emit_lsh): New function.
3519 (ppc_emit_rsh_signed): New function.
3520 (ppc_emit_rsh_unsigned): New function.
3521 (ppc_emit_ext): New function.
3522 (ppc_emit_zero_ext): New function.
3523 (ppc_emit_log_not): New function.
3524 (ppc_emit_bit_and): New function.
3525 (ppc_emit_bit_or): New function.
3526 (ppc_emit_bit_xor): New function.
3527 (ppc_emit_bit_not): New function.
3528 (ppc_emit_equal): New function.
3529 (ppc_emit_less_signed): New function.
3530 (ppc_emit_less_unsigned): New function.
3531 (ppc_emit_ref): New function.
3532 (ppc_emit_const): New function.
3533 (ppc_emit_reg): New function.
3534 (ppc_emit_pop): New function.
3535 (ppc_emit_stack_flush): New function.
3536 (ppc_emit_swap): New function.
3537 (ppc_emit_stack_adjust): New function.
3538 (ppc_emit_call): New function.
3539 (ppc_emit_int_call_1): New function.
3540 (ppc_emit_void_call_2): New function.
3541 (ppc_emit_if_goto): New function.
3542 (ppc_emit_goto): New function.
3543 (ppc_emit_eq_goto): New function.
3544 (ppc_emit_ne_goto): New function.
3545 (ppc_emit_lt_goto): New function.
3546 (ppc_emit_le_goto): New function.
3547 (ppc_emit_gt_goto): New function.
3548 (ppc_emit_ge_goto): New function.
3549 (ppc_write_goto_address): New function.
3550 (ppc_emit_ops_impl): New static variable.
3551 (ppc64v1_emit_prologue): New function.
3552 (ppc64v2_emit_prologue): New function.
3553 (ppc64_emit_epilogue): New function.
3554 (ppc64_emit_add): New function.
3555 (ppc64_emit_sub): New function.
3556 (ppc64_emit_mul): New function.
3557 (ppc64_emit_lsh): New function.
3558 (ppc64_emit_rsh_signed): New function.
3559 (ppc64_emit_rsh_unsigned): New function.
3560 (ppc64_emit_ext): New function.
3561 (ppc64_emit_zero_ext): New function.
3562 (ppc64_emit_log_not): New function.
3563 (ppc64_emit_bit_and): New function.
3564 (ppc64_emit_bit_or): New function.
3565 (ppc64_emit_bit_xor): New function.
3566 (ppc64_emit_bit_not): New function.
3567 (ppc64_emit_equal): New function.
3568 (ppc64_emit_less_signed): New function.
3569 (ppc64_emit_less_unsigned): New function.
3570 (ppc64_emit_ref): New function.
3571 (ppc64_emit_const): New function.
3572 (ppc64v1_emit_reg): New function.
3573 (ppc64v2_emit_reg): New function.
3574 (ppc64_emit_pop): New function.
3575 (ppc64_emit_stack_flush): New function.
3576 (ppc64_emit_swap): New function.
3577 (ppc64v1_emit_call): New function.
3578 (ppc64v2_emit_call): New function.
3579 (ppc64v1_emit_int_call_1): New function.
3580 (ppc64v2_emit_int_call_1): New function.
3581 (ppc64v1_emit_void_call_2): New function.
3582 (ppc64v2_emit_void_call_2): New function.
3583 (ppc64_emit_if_goto): New function.
3584 (ppc64_emit_eq_goto): New function.
3585 (ppc64_emit_ne_goto): New function.
3586 (ppc64_emit_lt_goto): New function.
3587 (ppc64_emit_le_goto): New function.
3588 (ppc64_emit_gt_goto): New function.
3589 (ppc64_emit_ge_goto): New function.
3590 (ppc64v1_emit_ops_impl): New static variable.
3591 (ppc64v2_emit_ops_impl): New static variable.
3592 (ppc_emit_ops): New function.
3593 (linux_low_target): Wire in ppc_emit_ops.
3595 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3596 Marcin Kościelnicki <koriakin@0x04.net>
3599 * Makefile.in: Add powerpc-*-ipa.o
3600 * configure.srv: Add ipa_obj for powerpc*-linux.
3601 * linux-ppc-ipa.c: New file.
3602 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3604 (PPC_FIELD): New macro.
3605 (PPC_SEXT): New macro.
3606 (PPC_OP6): New macro.
3607 (PPC_BO): New macro.
3608 (PPC_LI): New macro.
3609 (PPC_BD): New macro.
3610 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3611 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3612 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3613 (ppc_get_thread_area): New function.
3614 (is_elfv2_inferior): New function.
3615 (gen_ds_form): New function.
3616 (GEN_STD): New macro.
3617 (GEN_STDU): New macro.
3618 (GEN_LD): New macro.
3619 (GEN_LDU): New macro.
3620 (gen_d_form): New function.
3621 (GEN_ADDI): New macro.
3622 (GEN_ADDIS): New macro.
3623 (GEN_LI): New macro.
3624 (GEN_LIS): New macro.
3625 (GEN_ORI): New macro.
3626 (GEN_ORIS): New macro.
3627 (GEN_LWZ): New macro.
3628 (GEN_STW): New macro.
3629 (GEN_STWU): New macro.
3630 (gen_xfx_form): New function.
3631 (GEN_MFSPR): New macro.
3632 (GEN_MTSPR): New macro.
3633 (GEN_MFCR): New macro.
3634 (GEN_MTCR): New macro.
3635 (GEN_SYNC): New macro.
3636 (GEN_LWSYNC): New macro.
3637 (gen_x_form): New function.
3638 (GEN_OR): New macro.
3639 (GEN_MR): New macro.
3640 (GEN_LWARX): New macro.
3641 (GEN_STWCX): New macro.
3642 (GEN_CMPW): New macro.
3643 (gen_md_form): New function.
3644 (GEN_RLDICL): New macro.
3645 (GEN_RLDICR): New macro.
3646 (gen_i_form): New function.
3648 (GEN_BL): New macro.
3649 (gen_b_form): New function.
3650 (GEN_BNE): New macro.
3651 (GEN_LOAD): New macro.
3652 (GEN_STORE): New macro.
3653 (gen_limm): New function.
3654 (gen_atomic_xchg): New function.
3655 (gen_call): New function.
3656 (ppc_relocate_instruction): New function.
3657 (ppc_install_fast_tracepoint_jump_pad): New function.
3658 (ppc_get_min_fast_tracepoint_insn_len): New function.
3659 (ppc_get_ipa_tdesc_idx): New function.
3660 (the_low_target): Wire in the new functions.
3661 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3663 * linux-ppc-tdesc.h: New file.
3665 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3667 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3668 (alloc_jump_pad_buffer): New function.
3669 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3670 (alloc_jump_pad_buffer): New function.
3671 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3672 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3673 (alloc_jump_pad_buffer): New function.
3674 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3675 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3676 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3677 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3679 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3681 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3682 * linux-amd64-ipa.c: Likewise.
3683 * linux-i386-ipa.c: Likewise.
3684 * linux-s390-ipa.c: Likewise.
3685 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3686 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3687 set_trace_state_variable_value_ptr.
3688 (struct ipa_sym_addresses): Likewise.
3689 (symbol_list): Likewise.
3690 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3691 accessing gdb_collect directly.
3692 (gdb_collect_ptr_type): New typedef.
3693 (get_raw_reg_ptr_type): New typedef.
3694 (get_trace_state_variable_value_ptr_type): New typedef.
3695 (set_trace_state_variable_value_ptr_type): New typedef.
3696 (gdb_collect_ptr): New global.
3697 (get_raw_reg_ptr): New global.
3698 (get_trace_state_variable_value_ptr): New global.
3699 (set_trace_state_variable_value_ptr): New global.
3700 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3701 accessing get_raw_reg directly.
3702 (get_get_tsv_func_addr): Likewise for
3703 get_trace_state_variable_value_ptr.
3704 (get_set_tsv_func_addr): Likewise for
3705 set_trace_state_variable_value_ptr.
3706 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3708 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3710 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3712 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3714 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3716 (relocate_instruction): Remove own_buf.
3717 * server.c (own_buf): Make global.
3718 (handle_v_requests): Make global.
3719 * server.h (own_buf): New declaration.
3720 (handle_v_requests): New prototype.
3722 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3725 * linux-s390-low.c (add_insns): New function.
3726 (s390_emit_prologue): New function.
3727 (s390_emit_epilogue): New function.
3728 (s390_emit_add): New function.
3729 (s390_emit_sub): New function.
3730 (s390_emit_mul): New function.
3731 (s390_emit_lsh): New function.
3732 (s390_emit_rsh_signed): New function.
3733 (s390_emit_rsh_unsigned): New function.
3734 (s390_emit_ext): New function.
3735 (s390_emit_log_not): New function.
3736 (s390_emit_bit_and): New function.
3737 (s390_emit_bit_or): New function.
3738 (s390_emit_bit_xor): New function.
3739 (s390_emit_bit_not): New function.
3740 (s390_emit_equal): New function.
3741 (s390_emit_less_signed): New function.
3742 (s390_emit_less_unsigned): New function.
3743 (s390_emit_ref): New function.
3744 (s390_emit_if_goto): New function.
3745 (s390_emit_goto): New function.
3746 (s390_write_goto_address): New function.
3747 (s390_emit_litpool): New function.
3748 (s390_emit_const): New function.
3749 (s390_emit_call): New function.
3750 (s390_emit_reg): New function.
3751 (s390_emit_pop): New function.
3752 (s390_emit_stack_flush): New function.
3753 (s390_emit_zero_ext): New function.
3754 (s390_emit_swap): New function.
3755 (s390_emit_stack_adjust): New function.
3756 (s390_emit_set_r2): New function.
3757 (s390_emit_int_call_1): New function.
3758 (s390_emit_void_call_2): New function.
3759 (s390_emit_eq_goto): New function.
3760 (s390_emit_ne_goto): New function.
3761 (s390_emit_lt_goto): New function.
3762 (s390_emit_le_goto): New function.
3763 (s390_emit_gt_goto): New function.
3764 (s390_emit_ge_goto): New function.
3765 (s390x_emit_prologue): New function.
3766 (s390x_emit_epilogue): New function.
3767 (s390x_emit_add): New function.
3768 (s390x_emit_sub): New function.
3769 (s390x_emit_mul): New function.
3770 (s390x_emit_lsh): New function.
3771 (s390x_emit_rsh_signed): New function.
3772 (s390x_emit_rsh_unsigned): New function.
3773 (s390x_emit_ext): New function.
3774 (s390x_emit_log_not): New function.
3775 (s390x_emit_bit_and): New function.
3776 (s390x_emit_bit_or): New function.
3777 (s390x_emit_bit_xor): New function.
3778 (s390x_emit_bit_not): New function.
3779 (s390x_emit_equal): New function.
3780 (s390x_emit_less_signed): New function.
3781 (s390x_emit_less_unsigned): New function.
3782 (s390x_emit_ref): New function.
3783 (s390x_emit_if_goto): New function.
3784 (s390x_emit_const): New function.
3785 (s390x_emit_call): New function.
3786 (s390x_emit_reg): New function.
3787 (s390x_emit_pop): New function.
3788 (s390x_emit_stack_flush): New function.
3789 (s390x_emit_zero_ext): New function.
3790 (s390x_emit_swap): New function.
3791 (s390x_emit_stack_adjust): New function.
3792 (s390x_emit_int_call_1): New function.
3793 (s390x_emit_void_call_2): New function.
3794 (s390x_emit_eq_goto): New function.
3795 (s390x_emit_ne_goto): New function.
3796 (s390x_emit_lt_goto): New function.
3797 (s390x_emit_le_goto): New function.
3798 (s390x_emit_gt_goto): New function.
3799 (s390x_emit_ge_goto): New function.
3800 (s390_emit_ops): New function.
3801 (struct linux_target_ops): Fill in emit_ops hook.
3803 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3806 * Makefile.in: Add s390 IPA files.
3807 * configure.srv: Build IPA for s390.
3808 * linux-s390-ipa.c: New file.
3809 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3810 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3811 (tdesc_s390_linux32): Likewise.
3812 (init_registers_s390_linux32v1): Likewise.
3813 (tdesc_s390_linux32v1): Likewise.
3814 (init_registers_s390_linux32v2): Likewise.
3815 (tdesc_s390_linux32v2): Likewise.
3816 (init_registers_s390_linux64): Likewise.
3817 (tdesc_s390_linux64): Likewise.
3818 (init_registers_s390_linux64v1): Likewise.
3819 (tdesc_s390_linux64v1): Likewise.
3820 (init_registers_s390_linux64v2): Likewise.
3821 (tdesc_s390_linux64v2): Likewise.
3822 (init_registers_s390_te_linux64): Likewise.
3823 (tdesc_s390_te_linux64): Likewise.
3824 (init_registers_s390_vx_linux64): Likewise.
3825 (tdesc_s390_vx_linux64): Likewise.
3826 (init_registers_s390_tevx_linux64): Likewise.
3827 (tdesc_s390_tevx_linux64): Likewise.
3828 (init_registers_s390x_linux64): Likewise.
3829 (tdesc_s390x_linux64): Likewise.
3830 (init_registers_s390x_linux64v1): Likewise.
3831 (tdesc_s390x_linux64v1): Likewise.
3832 (init_registers_s390x_linux64v2): Likewise.
3833 (tdesc_s390x_linux64v2): Likewise.
3834 (init_registers_s390x_te_linux64): Likewise.
3835 (tdesc_s390x_te_linux64): Likewise.
3836 (init_registers_s390x_vx_linux64): Likewise.
3837 (tdesc_s390x_vx_linux64): Likewise.
3838 (init_registers_s390x_tevx_linux64): Likewise.
3839 (tdesc_s390x_tevx_linux64): Likewise.
3840 (have_hwcap_s390_vx): New static variable.
3841 (s390_arch_setup): Fill have_hwcap_s390_vx.
3842 (s390_get_thread_area): New function.
3843 (s390_ft_entry_gpr_esa): New const.
3844 (s390_ft_entry_gpr_zarch): New const.
3845 (s390_ft_entry_misc): New const.
3846 (s390_ft_entry_fr): New const.
3847 (s390_ft_entry_vr): New const.
3848 (s390_ft_main_31): New const.
3849 (s390_ft_main_64): New const.
3850 (s390_ft_exit_fr): New const.
3851 (s390_ft_exit_vr): New const.
3852 (s390_ft_exit_misc): New const.
3853 (s390_ft_exit_gpr_esa): New const.
3854 (s390_ft_exit_gpr_zarch): New const.
3855 (append_insns): New function.
3856 (s390_relocate_instruction): New function.
3857 (s390_install_fast_tracepoint_jump_pad): New function.
3858 (s390_get_min_fast_tracepoint_insn_len): New function.
3859 (s390_get_ipa_tdesc_idx): New function.
3860 (struct linux_target_ops): Wire in the above functions.
3861 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3862 * linux-s390-tdesc.h: New file.
3864 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3866 * linux-s390-low.c (s390_supports_tracepoints): New function.
3867 (struct linux_target_ops): Fill supports_tracepoints hook.
3869 2016-03-18 Yao Qi <yao.qi@linaro.org>
3871 * linux-low.c (lwp_signal_can_be_delivered): New function.
3872 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3874 2016-03-18 Yao Qi <yao.qi@linaro.org>
3876 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3877 0 if signal is enqueued. Remove 'signal' from one debugging
3878 message. Move one debugging message to some lines below.
3879 Remove code setting 'signal' to 0.
3881 2016-03-18 Yao Qi <yao.qi@linaro.org>
3883 * linux-low.c (linux_low_filter_event): Remove redundant
3884 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3886 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3888 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3889 (struct linux_target_ops): Wire in the above.
3891 2016-03-03 Yao Qi <yao.qi@linaro.org>
3893 * linux-low.c: Update comments to start_step_over.
3895 2016-03-03 Yao Qi <yao.qi@linaro.org>
3898 * linux-low.c (handle_extended_wait): Set child suspended
3899 if event_lwp->bp_reinsert isn't zero.
3901 2016-03-02 Yao Qi <yao.qi@linaro.org>
3903 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3904 enqueue_pending_signal.
3906 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3908 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3911 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3913 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3914 (s390_regmap_3264) [!__s390x__]: New global.
3915 (s390_collect_ptrace_register): Skip map entries containing -1.
3916 (s390_supply_ptrace_register): Ditto.
3917 (s390_fill_gprs_high): New function.
3918 (s390_store_gprs_high): New function.
3919 (s390_regsets): Add NT_S390_HIGH_GPRS.
3920 (s390_get_hwcap): Enable on 31-bit.
3921 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3922 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3923 Detect NT_S390_HIGH_GPRS.
3924 (s390_usrregs_info_3264): Enable on 31-bit.
3925 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3926 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3928 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3931 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3932 * configure.srv: Ditto.
3933 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3934 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3935 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3936 (init_registers_amd64_linux): Remove prototype.
3937 (tdesc_amd64_linux): Remove declaration.
3938 (get_ipa_tdesc): New function.
3939 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3940 initialize remaining tdescs.
3941 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3942 (init_registers_i386_linux): Remove prototype.
3943 (tdesc_i386_linux): Remove declaration.
3944 (get_ipa_tdesc): New function.
3945 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3946 initialize remaining tdescs.
3947 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3948 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3949 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3950 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3951 (x86_get_ipa_tdesc_idx): New function.
3952 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3953 * linux-x86-tdesc.h: New file.
3954 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3955 (target_get_ipa_tdesc_idx): New macro.
3956 * tracepoint.c (ipa_tdesc_idx): New macro.
3957 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3958 (symbol_list): Add ipa_tdesc_idx.
3959 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3960 (ipa_tdesc): Remove.
3961 (ipa_tdesc_idx): New variable.
3962 (get_context_regcache): Use get_ipa_tdesc.
3963 (gdb_collect): Ditto.
3965 * tracepoint.h (get_ipa_tdesc): New prototype.
3966 (ipa_tdesc): Remove.
3968 2016-02-24 Pedro Alves <palves@redhat.com>
3970 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3971 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3972 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3973 Factor out common code between the USE_SIGTRAP_SIGINFO and
3974 !USE_SIGTRAP_SIGINFO blocks.
3975 (linux_low_filter_event): Call save_stop_reason instead of
3976 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3978 (linux_wait_1): Update comments.
3980 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3982 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3983 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3984 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3985 ppc_insert_point, ppc_remove_point.
3987 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3989 * linux-s390-low.c (s390_supports_z_point_type): New function.
3990 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3992 2016-02-16 Yao Qi <yao.qi@linaro.org>
3994 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3995 PC. Get pc from regcache_read_pc.
3997 2016-02-12 Yao Qi <yao.qi@linaro.org>
3999 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
4000 or linux_get_pc_32bit.
4001 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
4003 2016-02-12 Yao Qi <yao.qi@linaro.org>
4005 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
4006 arm_linux_get_next_pcs_fixup.
4008 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
4010 * tracepoint.c (x_tracepoint_action_download): Change
4011 write_inferior_data_ptr to write_inferior_data_pointer.
4012 (cmd_qtstart): Likewise.
4013 (write_inferior_data_ptr): Remove.
4014 (download_agent_expr): Change write_inferior_data_ptr to
4015 write_inferior_data_pointer.
4016 (download_tracepoint_1): Likewise.
4017 (download_tracepoint): Likewise.
4018 (download_trace_state_variables): Likewise.
4020 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
4021 Marcin Kościelnicki <koriakin@0x04.net>
4023 * tracepoint.c (struct tracepoint_action_ops): Remove.
4024 (struct tracepoint_action): Remove ops.
4025 (m_tracepoint_action_download, r_tracepoint_action_download)
4026 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
4027 size and offset accordingly.
4028 (m_tracepoint_action_ops, r_tracepoint_action_ops)
4029 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
4030 (tracepoint_action_send, tracepoint_action_download): New functions.
4031 Helpers for trace action handlers.
4032 (add_tracepoint_action): Remove setup actions ops.
4033 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
4035 2016-02-10 Yao Qi <yao.qi@linaro.org>
4037 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
4039 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4041 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
4043 * configure: Regenerate.
4045 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
4047 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
4048 void * to gdb_byte *.
4049 * linux-low.c (siginfo_fixup): Likewise.
4050 (linux_xfer_siginfo): Likewise.
4051 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
4053 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
4055 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
4057 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
4059 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
4061 * linux-x86-low.c [__x86_64__]: Include
4062 "nat/amd64-linux-siginfo.h".
4063 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
4064 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
4065 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
4066 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
4067 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
4068 (cpt_si_fd, si_timerid, si_overrun): Move from
4069 nat/amd64-linux-siginfo.c.
4070 * Makefile.in (amd64-linux-siginfo.o:): New rule.
4072 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
4074 * server.c (skip_to_semicolon): Remove.
4075 (process_point_options): Use strchrnul instead of
4078 2016-01-26 Yao Qi <yao.qi@linaro.org>
4080 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4081 * linux-low.c (install_software_single_step_breakpoints): Don't
4082 call regcache_read_pc.
4083 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4086 2016-01-26 Yao Qi <yao.qi@linaro.org>
4088 * linux-low.c (install_software_single_step_breakpoints): Call
4089 regcache_read_pc instead of get_pc.
4091 2016-01-26 Yao Qi <yao.qi@linaro.org>
4093 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4094 (unblock_async_io): Rename to ...
4095 (block_unblock_async_io): ... it. New function.
4096 (enable_async_io): Don't install SIGIO handler. Unblock it
4098 (disable_async_io): Don't ignore SIGIO. Block it instead.
4099 (initialize_async_io): Install SIGIO handler. Don't call
4102 2016-01-26 Yao Qi <yao.qi@linaro.org>
4104 * remote-utils.c (getpkt): If the buffer isn't empty, and the
4105 first character is '\003', call *the_target->request_interrupt.
4107 2016-01-25 Yao Qi <yao.qi@linaro.org>
4109 * remote-utils.c (new_thread_notify): Remove.
4110 (dead_thread_notify): Likewise.
4111 * remote-utils.h (new_thread_notify): Remove declaration.
4112 (dead_thread_notify): Likewise.
4114 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
4116 * gdb.trace/pending.exp: Fix expected message on continue.
4118 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
4120 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4121 it works properly on big-endian machines where sizeof (CORE_ADDR)
4124 2016-01-21 Pedro Alves <palves@redhat.com>
4126 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4127 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4128 * configure: Regenerate.
4130 2016-01-21 Yao Qi <yao.qi@linaro.org>
4132 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4133 is_thumb and set it according to CPSR saved on the stack.
4134 (get_next_pcs_syscall_next_pc): Pass is_thumb to
4135 arm_sigreturn_next_pc.
4137 2016-01-18 Yao Qi <yao.qi@linaro.org>
4139 * linux-low.c (linux_set_pc_64bit): New function.
4140 (linux_get_pc_64bit): New function.
4141 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4143 * linux-sparc-low.c (debug_threads): Remove declaration.
4144 (sparc_get_pc): Remove.
4145 (the_low_target): Use linux_get_pc_64bit instead of
4147 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4148 (the_low_target): Use linux_get_pc_64bit and
4151 2016-01-18 Yao Qi <yao.qi@linaro.org>
4153 * linux-arm-low.c (debug_threads): Remove declaration.
4154 (arm_get_pc, arm_set_pc): Remove.
4155 (the_low_target): Use linux_get_pc_32bit and
4157 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4158 (the_low_target): Use linux_get_pc_32bit and
4160 * linux-cris-low.c (debug_threads): Remove declaration.
4161 (cris_get_pc, cris_set_pc,): Remove.
4162 (the_low_target): Use linux_get_pc_32bit and
4164 * linux-crisv32-low.c (debug_threads): Remove declaration.
4165 (cris_get_pc, cris_set_pc): Remove.
4166 (the_low_target): Use linux_get_pc_32bit and
4168 * linux-low.c: Include inttypes.h.
4169 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4170 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4171 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4172 (the_low_target): Use linux_get_pc_32bit and
4174 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4175 (the_low_target): Use linux_get_pc_32bit and
4177 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4178 (the_low_target): Use linux_get_pc_32bit and
4180 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4181 (the_low_target): Use linux_get_pc_32bit and
4183 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4184 (the_low_target): Use linux_get_pc_32bit and
4187 2016-01-18 Gary Benson <gbenson@redhat.com>
4189 * configure.ac (AC_FUNC_FORK): New check.
4190 * config.in: Regenerate.
4191 * configure: Likewise.
4193 2016-01-14 Yao Qi <yao.qi@linaro.org>
4195 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4196 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4197 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4198 arm_get_next_pcs_ctor.
4200 2016-01-12 Josh Stone <jistone@redhat.com>
4201 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4203 * inferiors.h: Include "gdb_vecs.h".
4204 (struct process_info): Add syscalls_to_catch.
4205 * inferiors.c (remove_process): Free syscalls_to_catch.
4206 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4207 syscall_return stops.
4208 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4209 * server.c (handle_general_set): Handle QCatchSyscalls.
4210 (handle_query): Report support for QCatchSyscalls.
4211 * target.h (struct target_ops): Add supports_catch_syscall.
4212 (target_supports_catch_syscall): New macro.
4213 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4214 (struct lwp_info): Add syscall_state.
4215 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4216 Maintain syscall_state and syscalls_to_catch across exec.
4217 (get_syscall_trapinfo): New function, proxy to the_low_target.
4218 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4219 (linux_low_filter_event): Toggle syscall_state entry/return for
4220 syscall traps, and set it ignored for all others.
4221 (gdb_catching_syscalls_p): New function.
4222 (gdb_catch_this_syscall_p): New function.
4223 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4224 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4225 (linux_supports_catch_syscall): New function.
4226 (linux_target_ops): Install it.
4227 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4228 (the_low_target): Install it.
4230 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4232 * acinclude.m4: Include new ../warning.m4 file.
4233 * configure: Regenerated.
4234 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4236 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4238 * ax.c (is_goto_target): Mark static.
4239 * linux-low.c (register_addr): Likewise.
4240 (linux_fetch_registers, linux_store_registers): Likewise.
4241 * mem-break.c (any_persistent_commands): Fix old prototype.
4242 (add_commands_to_breakpoint): Mark static.
4243 * regcache.c (find_register_by_name): Delete unused func.
4244 * remote-utils.c (hex_or_minus_one): Mark static.
4245 * server.c (monitor_show_help): Mark static.
4246 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4247 handle_v_requests): Likewise.
4249 2016-01-12 Pedro Alves <palves@redhat.com>
4251 Remove use of the registered trademark symbol throughout.
4253 2016-01-08 Yao Qi <yao.qi@linaro.org>
4255 * remote-utils.c (getpkt): If c is '\003', call target hook
4258 2016-01-06 Yao Qi <yao.qi@linaro.org>
4260 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4261 linux-aarch32-low.c.
4262 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4263 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4264 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4265 (thumb2_breakpoint): Declare.
4266 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4267 linux-aarch32-low.h.
4268 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4269 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4270 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4272 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4274 * gdbreplay.c (gdbreplay_version): Change copyright year in
4276 * server.c (gdbserver_version): Likewise.
4278 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4280 * server.c (crc32_table): Delete.
4281 (crc32): Use libiberty's xcrc32 function.
4283 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4285 * lynx-low.c (lynx_delete_thread_callback): New function.
4286 (lynx_mourn): Properly delete our process and all of its
4287 threads. Remove call to clear_inferiors.
4289 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4291 * target.c (thread_search_callback): Add check that
4292 the thread_stopped target callback is not NULL before
4295 2015-12-21 Yao Qi <yao.qi@linaro.org>
4297 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4300 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4302 * server.c (handle_query): Call target_supports_software_single_step.
4304 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4306 * linux-low.c (single_step): New function.
4307 (linux_resume_one_lwp_throw): Call single_step.
4308 (start_step_over): Likewise.
4310 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4312 * Makefile.in (SFILES): Append arch/arm-linux.c,
4313 arch/arm-get-next-pcs.c.
4314 (arm-linux.o): New rule.
4315 (arm-get-next-pcs.o): New rule.
4316 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4318 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4319 to linux-aarch32-low.c.
4320 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4321 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4322 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4323 (thumb2_breakpoint_len): Likewise.
4324 (arm_is_thumb_mode): Make non-static.
4325 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4326 from linux-aarch32-low.c.
4327 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4328 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4329 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4330 (thumb2_breakpoint_len): Likewise.
4331 (arm_is_thumb_mode): New declaration.
4332 * linux-arm-low.c: Include arch/arm-linux.h
4333 aarch/arm-get-next-pcs.h, sys/syscall.h.
4334 (get_next_pcs_ops): New struct.
4335 (get_next_pcs_addr_bits_remove): New function.
4336 (get_next_pcs_is_thumb): New function.
4337 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4338 (arm_sigreturn_next_pc): Likewise.
4339 (get_next_pcs_syscall_next_pc): Likewise.
4340 (arm_gdbserver_get_next_pcs): Likewise.
4341 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4343 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4344 * server.h: Include gdb_vecs.h.
4346 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4348 * Makefile.in (SFILES): Append common/common-regcache.c.
4349 (OBS): Append common-regcache.o.
4350 (common-regcache.o): New rule.
4351 * regcache.c (init_register_cache): Initialize cache to
4353 (regcache_raw_read_unsigned): New function.
4354 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4355 register_status enum.
4357 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4359 * linux-aarch64-low.c (the_low_targets): Rename
4360 breakpoint_reinsert_addr to get_next_pcs.
4361 * linux-arm-low.c (the_low_targets): Likewise.
4362 * linux-bfin-low.c (the_low_targets): Likewise.
4363 * linux-cris-low.c (the_low_targets): Likewise.
4364 * linux-crisv32-low.c (the_low_targets): Likewise.
4365 * linux-low.c (can_software_single_step): Likewise.
4366 (install_software_single_step_breakpoints): New function.
4367 (start_step_over): Use install_software_single_step_breakpoints.
4368 * linux-low.h: New CORE_ADDR vector.
4369 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4371 * linux-mips-low.c (the_low_targets): Likewise.
4372 * linux-nios2-low.c (the_low_targets): Likewise.
4373 * linux-sparc-low.c (the_low_targets): Likewise.
4375 2015-12-17 Pedro Alves <palves@redhat.com>
4377 * linux-low.c (linux_kill_one_lwp): Remove references to
4379 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4381 (linux_init_signals): Delete.
4382 (initialize_low): Adjust.
4383 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4385 2015-12-16 Pedro Alves <palves@redhat.com>
4387 * configure.ac (compiler warning flags): When testing a
4388 -Wno-foo option, check whether -Wfoo works instead.
4389 * configure: Regenerate.
4391 2015-12-11 Don Breazeal <donb@codesourcery.com>
4393 * server.c (process_serial_event): Don't exit from gdbserver
4394 in remote mode if there are still active inferiors.
4396 2015-12-11 Yao Qi <yao.qi@linaro.org>
4398 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4399 arm_breakpoint_at if the process is 32-bit.
4401 2015-12-11 Yao Qi <yao.qi@linaro.org>
4403 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4406 2015-12-07 Yao Qi <yao.qi@linaro.org>
4408 * configure.srv: Append arm.o to srv_tgtobj for
4409 aarch64*-*-linux* target.
4410 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4411 from linux-arm-low.c.
4412 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4413 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4414 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4415 (thumb2_breakpoint_len): Likewise.
4416 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4417 (arm_breakpoint_kinds): Likewise.
4418 (arm_breakpoint_kind_from_pc): Likewise.
4419 (arm_sw_breakpoint_from_kind): Likewise.
4420 (arm_breakpoint_kind_from_current_state): Likewise.
4421 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4422 (arm_sw_breakpoint_from_kind): Declare.
4423 (arm_breakpoint_kind_from_current_state): Declare.
4424 (arm_breakpoint_at): Declare.
4425 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4426 arm_sw_breakpoint_from_kind if process is 32-bit.
4427 (aarch64_breakpoint_kind_from_pc): New function.
4428 (aarch64_breakpoint_kind_from_current_state): New function.
4429 (the_low_target): Initialize fields breakpoint_kind_from_pc
4430 and breakpoint_kind_from_current_state.
4431 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4432 linux-aarch32-low.c.
4433 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4434 (arm_breakpoint, arm_breakpoint_len): Likewise.
4435 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4436 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4437 (arm_is_thumb_mode): Likewise.
4438 (arm_breakpoint_at): Likewise.
4439 (arm_breakpoint_kind_from_pc): Likewise.
4440 (arm_sw_breakpoint_from_kind): Likewise.
4441 (arm_breakpoint_kind_from_current_state): Likewise.
4444 2015-08-04 Yao Qi <yao.qi@linaro.org>
4446 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4447 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4448 * server.c (extended_protocol): Remove "static".
4449 * server.h (extended_protocol): Declare it.
4451 2015-12-04 Josh Stone <jistone@redhat.com>
4453 * target.h (struct target_ops) <arch_setup>: Rename to ...
4454 (struct target_ops) <post_create_inferior>: ... this.
4455 (target_arch_setup): Rename to ...
4456 (target_post_create_inferior): ... this, calling post_create_inferior.
4457 * server.c (start_inferior): Update target_arch_setup calls to
4458 target_post_create_inferior.
4459 * linux-low.c (linux_low_ptrace_options): Forward declare.
4460 (linux_arch_setup): Update its comment for general use.
4461 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4462 (struct linux_target_ops): Use linux_post_create_inferior.
4463 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4464 to post_create_inferior.
4465 * nto-low.c (struct nto_target_ops): Likewise.
4466 * spu-low.c (struct spu_target_ops): Likewise.
4467 * win32-low.c (struct win32_target_ops): Likewise.
4469 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4471 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4473 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4475 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4476 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4477 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4478 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4479 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4480 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4481 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4482 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4483 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4484 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4485 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4486 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4488 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4490 * linux-low.c (linux_look_up_symbols): Don't call
4491 linux_supports_traceclone.
4492 * linux-low.h (thread_db_init): Remove use_events argument.
4493 * thread-db.c (thread_db_use_event): Remove global variable.
4494 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4495 (struct thread_db) <td_create_bp>: Remove field.
4496 (thread_db_create_event): Remove function.
4497 (thread_db_enable_reporting): Likewise.
4498 (find_one_thread): Don't check for thread_db_use_events.
4499 (attach_thread): Likewise.
4500 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4501 (try_thread_db_load_1): Don't check for thread_db_use_events.
4502 (thread_db_init): Remove use_events argument and thread events
4504 (remove_thread_event_breakpoints): Remove function.
4505 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4507 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4509 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4511 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4512 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4513 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4514 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4515 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4517 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4520 * linux-low.c (can_hardware_single_step): Use
4521 supports_hardware_single_step.
4522 (can_software_single_step): New function.
4523 (start_step_over): Call can_software_single_step.
4524 (linux_supports_hardware_single_step): New function.
4525 (struct target_ops) <supports_software_single_step>: Initialize.
4526 * linux-low.h (struct linux_target_ops)
4527 <supports_hardware_single_step>: Initialize.
4528 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4529 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4530 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4531 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4532 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4533 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4534 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4535 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4536 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4537 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4539 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4540 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4542 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4543 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4544 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4546 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4547 * target.h (struct target_ops): <supports_software_single_step>:
4549 (target_supports_software_single_step): New macro.
4551 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4553 * linux-low.c (linux_wait_1): Fix pc advance condition.
4554 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4555 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4557 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4559 * linux-arm-low.c (arm_is_thumb_mode): New function.
4560 (arm_breakpoint_at): Use arm_is_thumb_mode.
4561 (arm_breakpoint_kind_from_current_state): New function.
4562 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4564 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4565 (linux_breakpoint_kind_from_current_state): New function.
4566 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4567 * linux-low.h (struct linux_target_ops)
4568 <breakpoint_kind_from_current_state>: New field.
4569 * target.h (struct target_ops): Likewise.
4570 (target_breakpoint_kind_from_current_state): New macro.
4572 2015-11-30 Pedro Alves <palves@redhat.com>
4574 * linux-low.c (linux_resume): Wake up the event loop before
4577 2015-11-30 Pedro Alves <palves@redhat.com>
4579 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4581 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4583 * target.c (struct thread_search): New structure.
4584 (thread_search_callback): New function.
4585 (prev_general_thread): New global.
4586 (prepare_to_access_memory, done_accessing_memory): New functions.
4587 * target.h (prepare_to_access_memory, done_accessing_memory):
4588 Replace macros with function declarations.
4590 2015-11-30 Pedro Alves <palves@redhat.com>
4593 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4594 report TARGET_WAITKIND_NO_RESUMED.
4595 * remote-utils.c (prepare_resume_reply): Handle
4596 TARGET_WAITKIND_NO_RESUMED.
4597 * server.c (report_no_resumed): New global.
4598 (handle_query) <qSupported>: Handle "no-resumed+". Report
4599 "no-resumed+" support.
4600 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4601 return error if the client doesn't support no-resumed events.
4602 (push_stop_notification): New function.
4603 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4604 events if the client supports them.
4606 2015-11-30 Pedro Alves <palves@redhat.com>
4608 * linux-low.c (thread_still_has_status_pending_p): Don't check
4610 (lwp_resumed): New function.
4611 (status_pending_p_callback): Return early if the LWP is not
4612 supposed to be resumed.
4614 2015-11-30 Pedro Alves <palves@redhat.com>
4616 * linux-low.c (handle_extended_wait): Assert that the LWP's
4617 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4618 thread create events, leave the new child's status pending.
4619 (linux_low_filter_event): If GDB wants to hear about thread exit
4620 events, leave the LWP marked dead and don't delete it.
4621 (linux_wait_for_event_filtered): Don't check for thread exit.
4622 (filter_exit_event): New function.
4623 (linux_wait_1): Use it, when returning an exit event.
4624 (linux_resume_one_lwp_throw): Assert that the LWP's
4625 waitstatus is TARGET_WAITKIND_IGNORE.
4626 * remote-utils.c (prepare_resume_reply): Handle
4627 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4628 * server.c (report_thread_events): New global.
4629 (handle_general_set): Handle QThreadEvents.
4630 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4631 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4632 TARGET_WAITKIND_THREAD_EXITED.
4633 * server.h (report_thread_events): Declare.
4635 2015-11-30 Pedro Alves <palves@redhat.com>
4637 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4638 the thread's last_resume_kind was resume_stop.
4640 2015-11-30 Pedro Alves <palves@redhat.com>
4642 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4645 2015-11-30 Pedro Alves <palves@redhat.com>
4647 * server.c (handle_v_requests): Handle vCtrlC.
4649 2015-11-30 Pedro Alves <palves@redhat.com>
4651 * gdbthread.h (find_any_thread_of_pid): Declare.
4652 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4654 * server.c (handle_query): If current_thread is NULL, look for
4655 another thread of the selected process.
4657 2015-11-26 Daniel Colascione <dancol@dancol.org>
4658 Simon Marchi <simon.marchi@ericsson.com>
4660 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4661 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4663 * target.h (struct target_ops) <thread_name>: New field.
4664 (target_thread_name): New macro.
4666 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4668 * regcache.h (regcache_invalidate_pid): Add declaration.
4669 * regcache.c (regcache_invalidate_pid): New function, extracted
4670 from regcache_invalidate.
4671 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4672 Add trivial documentation comment.
4673 * lynx-low.c: Use regcache_invalidate_pid instead of
4674 regcache_invalidate.
4676 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4678 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4679 and Elf64_auxv_t if the target is Android.
4681 2015-11-22 Doug Evans <xdje42@gmail.com>
4683 * target.h: #include <sys/types.h>.
4685 2015-11-19 Pedro Alves <palves@redhat.com>
4687 * linux-low.c (linux_process_qsupported): Change prototype.
4689 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4691 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4692 and adjust to loop over all features.
4693 * server.c (handle_query) <qSupported>: Adjust to call
4694 target_process_qsupported once, passing it a vector of unprocessed
4696 * target.h (struct target_ops) <process_qsupported>: Change
4698 (target_process_qsupported): Adjust.
4700 2015-11-19 Pedro Alves <palves@redhat.com>
4702 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4704 * configure: Regenerate.
4706 2015-11-19 Pedro Alves <palves@redhat.com>
4708 * configure: Regenerate.
4710 2015-11-19 Yao Qi <yao.qi@linaro.org>
4712 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4715 2015-11-19 Yao Qi <yao.qi@linaro.org>
4717 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4718 (struct aarch64_operand): Move enum out.
4720 2015-11-19 Yao Qi <yao.qi@linaro.org>
4722 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4723 struct user_fpsimd_state *.
4724 (aarch64_store_fpregset): Likewise.
4726 2015-11-19 Yao Qi <yao.qi@linaro.org>
4728 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4729 struct user_pt_regs *.
4730 (aarch64_store_gregset): Likewise.
4732 2015-11-18 Pedro Alves <palves@redhat.com>
4734 * Makefile.in (all_object_files): Add $IPA_OBJS.
4736 2015-11-17 Pedro Alves <palves@redhat.com>
4738 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4739 GDB_SIGNAL_0 and gdb_signal_to_string.
4741 2015-11-17 Pedro Alves <palves@redhat.com>
4743 * win32-low.c (handle_output_debug_string): Remove parameter.
4744 (win32_kill): Remove our_status local and adjust call to
4745 handle_output_debug_string.
4746 (get_child_debug_event): Adjust call to
4747 handle_output_debug_string.
4749 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4751 * linux-mips-low.c (mips_fill_gregset): Add cast.
4752 (mips_store_gregset): Likewise.
4753 (mips_fill_fpregset): Likewise.
4754 (mips_store_fpregset): Likewise.
4756 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4758 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4761 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4763 * linux-mips-low.c (mips_linux_new_thread): Change type of
4764 watch_type to enum target_hw_bp_type.
4766 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4768 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4769 Change return type to arm_hwbp_type.
4771 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4773 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4774 (arm_store_gregset): Likewise.
4775 * linux-arm-low.c (arm_get_hwcap): Likewise.
4776 (arm_read_description): Likewise.
4778 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4780 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4782 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4784 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4785 (ppc_fill_vsxregset): Likewise.
4786 (ppc_store_vsxregset): Likewise.
4787 (ppc_fill_vrregset): Likewise.
4788 (ppc_store_vrregset): Likewise.
4789 (ppc_fill_evrregset): Likewise.
4790 (ppc_store_evrregset): Likewise.
4792 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4794 * linux-ppc-low.c (ppc_usrregs_info): Remove
4795 forward-declaration.
4796 (ppc_arch_setup): Move lower in file.
4798 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4800 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4801 (ps_pdwrite): Likewise.
4803 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4805 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4806 to after assert checks.
4808 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4810 * proc-service.c (ps_pdread): Add/adjust casts.
4811 (ps_pdwrite): Add/adjust casts.
4813 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4815 * server.c (handle_search_memory_1): Cast return value of
4818 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4820 * server.c (write_qxfer_response): Change type of data to
4823 2015-10-29 Pedro Alves <palves@redhat.com>
4825 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4827 2015-10-29 Pedro Alves <palves@redhat.com>
4829 * tracepoint.c (clear_installed_tracepoints): Add casts.
4831 2015-10-29 Pedro Alves <palves@redhat.com>
4833 * server.c (handle_v_cont, process_serial_event): Add enum
4834 gdb_signal casts to signal parsing code.
4836 2015-10-29 Pedro Alves <palves@redhat.com>
4838 * linux-low.h (NULL_REGSET): Define.
4839 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4840 * linux-arm-low.c (arm_regsets): Likewise.
4841 * linux-crisv32-low.c (cris_regsets): Likewise.
4842 * linux-m68k-low.c (m68k_regsets): Likewise.
4843 * linux-mips-low.c (mips_regsets): Likewise.
4844 * linux-nios2-low.c (nios2_regsets): Likewise.
4845 * linux-ppc-low.c (ppc_regsets): Likewise.
4846 * linux-s390-low.c (s390_regsets): Likewise.
4847 * linux-sh-low.c (sh_regsets): Likewise.
4848 * linux-sparc-low.c (sparc_regsets): Likewise.
4849 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4850 * linux-tile-low.c (tile_regsets): Likewise.
4851 * linux-x86-low.c (x86_regsets): Likewise.
4852 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4854 2015-10-29 Pedro Alves <palves@redhat.com>
4856 * linux-low.h (NULL_REGSET): Define.
4857 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4858 * linux-arm-low.c (arm_regsets): Likewise.
4859 * linux-crisv32-low.c (cris_regsets): Likewise.
4860 * linux-m68k-low.c (m68k_regsets): Likewise.
4861 * linux-mips-low.c (mips_regsets): Likewise.
4862 * linux-nios2-low.c (nios2_regsets): Likewise.
4863 * linux-ppc-low.c (ppc_regsets): Likewise.
4864 * linux-s390-low.c (s390_regsets): Likewise.
4865 * linux-sh-low.c (sh_regsets): Likewise.
4866 * linux-sparc-low.c (sparc_regsets): Likewise.
4867 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4868 * linux-tile-low.c (tile_regsets): Likewise.
4869 * linux-x86-low.c (x86_regsets): Likewise.
4870 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4872 2015-10-26 Doug Evans <dje@google.com>
4874 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4876 2015-10-26 Doug Evans <dje@google.com>
4878 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4880 2015-10-26 Doug Evans <dje@google.com>
4882 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4884 (attach_thread, find_new_threads_callback): Ditto.
4886 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4888 * mem-break.h (set_breakpoint_data): Remove.
4890 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4892 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4893 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4894 (initialize_low): Remove set_breakpoint_data call.
4895 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4896 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4897 (initialize_low): Remove set_breakpoint_data call.
4898 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4899 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4900 (initialize_low): Remove set_breakpoint_data call.
4902 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4904 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4905 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4906 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4907 * target.h (target_breakpoint_kind_from_pc): New macro.
4909 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4911 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4912 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4913 the default breakpoint kind.
4915 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4917 * linux-arm-low.c (arm_supports_z_point_type): Add software
4920 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4922 * linux-arm-low.c: Refactor breakpoint definitions.
4923 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4924 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4926 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4928 * Makefile.in: Add arm.c/o.
4929 * configure.srv: Likewise.
4930 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4931 (arm_breakpoint_kind_from_pc): New function.
4932 (arm_sw_breakpoint_from_kind): Return proper kind.
4933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4935 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4937 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4939 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4940 (struct raw_breakpoint) <size>: Remove.
4941 (struct raw_breakpoint) <kind>: Add.
4942 (bp_size): New function.
4943 (bp_opcode): Likewise.
4944 (find_raw_breakpoint_at): Adjust for kind.
4945 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4946 (remove_memory_breakpoint): Adjust for kind call bp_size.
4947 (set_raw_breakpoint_at): Adjust for kind.
4948 (set_breakpoint): Likewise.
4949 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4950 (delete_raw_breakpoint): Adjust for kind.
4951 (delete_breakpoint): Likewise.
4952 (find_gdb_breakpoint): Likewise.
4953 (set_gdb_breakpoint_1): Likewise.
4954 (set_gdb_breakpoint): Likewise.
4955 (delete_gdb_breakpoint_1): Likewise.
4956 (delete_gdb_breakpoint): Likewise.
4957 (uninsert_raw_breakpoint): Likewise.
4958 (reinsert_raw_breakpoint): Likewise.
4959 (set_breakpoint_data): Remove.
4960 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4961 (check_mem_read): Adjust for kind call bp_size.
4962 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4963 (clone_one_breakpoint): Adjust for kind.
4964 * mem-break.h (set_gdb_breakpoint): Likewise.
4965 (delete_gdb_breakpoint): Likewise.
4966 * server.c (process_serial_event): Likewise.
4968 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4970 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4971 (struct linux_target_ops) <breakpoint>: Remove.
4972 (struct linux_target_ops) <breakpoint_len>: Remove.
4973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4975 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4976 (arm_sw_breakpoint_from_kind): New function.
4977 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4978 (struct linux_target_ops) <breakpoint>: Remove.
4979 (struct linux_target_ops) <breakpoint_len>: Remove.
4980 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4981 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4982 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4983 (struct linux_target_ops) <breakpoint>: Remove.
4984 (struct linux_target_ops) <breakpoint_len>: Remove.
4985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4987 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4988 (struct linux_target_ops) <breakpoint>: Remove.
4989 (struct linux_target_ops) <breakpoint_len>: Remove.
4990 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4991 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4992 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4993 and sw_breakpoint_from_kind to increment the pc.
4994 (linux_breakpoint_kind_from_pc): New function.
4995 (linux_sw_breakpoint_from_kind): New function.
4996 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4997 (initialize_low): Call breakpoint_kind_from_pc and
4998 sw_breakpoint_from_kind to replace breakpoint_data/len.
4999 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
5001 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
5002 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
5003 (struct linux_target_ops) <breakpoint>: Remove.
5004 (struct linux_target_ops) <breakpoint_len>: Remove.
5005 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5006 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5007 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
5008 (struct linux_target_ops) <breakpoint>: Remove.
5009 (struct linux_target_ops) <breakpoint_len>: Remove.
5010 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5011 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5012 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
5013 (struct linux_target_ops) <breakpoint>: Remove.
5014 (struct linux_target_ops) <breakpoint_len>: Remove.
5015 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5016 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5017 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
5018 (struct linux_target_ops) <breakpoint>: Remove.
5019 (struct linux_target_ops) <breakpoint_len>: Remove.
5020 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5021 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5022 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
5023 (struct linux_target_ops) <breakpoint>: Remove.
5024 (struct linux_target_ops) <breakpoint_len>: Remove.
5025 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5026 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5027 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
5028 (struct linux_target_ops) <breakpoint>: Remove.
5029 (struct linux_target_ops) <breakpoint_len>: Remove.
5030 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5031 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5032 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
5033 (struct linux_target_ops) <breakpoint>: Remove.
5034 (struct linux_target_ops) <breakpoint_len>: Remove.
5035 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5036 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5037 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
5038 (struct linux_target_ops) <breakpoint>: Remove.
5039 (struct linux_target_ops) <breakpoint_len>: Remove.
5040 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5041 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5042 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
5043 (struct linux_target_ops) <breakpoint>: Remove.
5044 (struct linux_target_ops) <breakpoint_len>: Remove.
5045 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5046 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5047 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
5048 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
5049 (struct linux_target_ops) <breakpoint>: Remove.
5050 (struct linux_target_ops) <breakpoint_len>: Remove.
5051 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5052 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5053 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
5054 (struct linux_target_ops) <breakpoint>: Remove.
5055 (struct linux_target_ops) <breakpoint_len>: Remove.
5056 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
5057 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
5059 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
5061 * linux-cris-low.c (cris_get_pc): Remove void arg.
5063 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5065 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
5068 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
5070 * inferiors.c (thread_pid_matches_callback): New function.
5071 (find_thread_process): New function.
5072 (remove_thread): Reset current_thread.
5073 (remove_process): Assert threads have been removed first.
5075 2015-10-15 Yao Qi <yao.qi@linaro.org>
5077 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5079 (aarch64_remove_point): Likewise.
5080 * regcache.c (regcache_register_size): New function.
5082 2015-10-12 Yao Qi <yao.qi@linaro.org>
5084 * linux-aarch64-low.c: Update all callers as emit_load_store
5085 is renamed to aarch64_emit_load_store.
5087 2015-10-12 Yao Qi <yao.qi@linaro.org>
5089 * linux-aarch64-low.c: Update all callers of function renaming
5090 from emit_insn to aarch64_emit_insn.
5092 2015-10-12 Yao Qi <yao.qi@linaro.org>
5094 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5095 arch/aarch64-insn.h.
5096 (struct aarch64_memory_operand): Likewise.
5098 (emit_insn): Move to arch/aarch64-insn.c.
5099 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5100 (emit_load_store): Move to arch/aarch64-insn.c.
5101 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5102 (can_encode_int32): Remove.
5104 2015-10-12 Yao Qi <yao.qi@linaro.org>
5106 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5107 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5108 (aarch64_relocate_instruction): Likewise.
5109 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5110 (struct aarch64_insn_visitor): Likewise.
5112 2015-10-12 Yao Qi <yao.qi@linaro.org>
5114 * linux-aarch64-low.c (struct aarch64_insn_data): New.
5115 (struct aarch64_insn_visitor): New.
5116 (struct aarch64_insn_relocation_data): New.
5117 (aarch64_ftrace_insn_reloc_b): New function.
5118 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5119 (aarch64_ftrace_insn_reloc_cb): Likewise.
5120 (aarch64_ftrace_insn_reloc_tb): Likewise.
5121 (aarch64_ftrace_insn_reloc_adr): Likewise.
5122 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5123 (aarch64_ftrace_insn_reloc_others): Likewise.
5125 (aarch64_relocate_instruction): Use visitor.
5127 2015-10-12 Yao Qi <yao.qi@linaro.org>
5129 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5130 int. Add argument buf.
5131 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5132 aarch64_relocate_instruction.
5134 2015-10-12 Yao Qi <yao.qi@linaro.org>
5136 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5137 argument insn. Remove local variable insn. Don't call
5139 (aarch64_install_fast_tracepoint_jump_pad): Call
5142 2015-09-30 Yao Qi <yao.qi@linaro.org>
5144 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5145 (emit_load_store_pair): Likewise.
5147 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5149 * dll.c (match_dll): Add cast(s).
5150 (unloaded_dll): Likewise.
5151 * linux-low.c (second_thread_of_pid_p): Likewise.
5152 (delete_lwp_callback): Likewise.
5153 (count_events_callback): Likewise.
5154 (select_event_lwp_callback): Likewise.
5155 (linux_set_resume_request): Likewise.
5156 * server.c (accumulate_file_name_length): Likewise.
5157 (emit_dll_description): Likewise.
5158 (handle_qxfer_threads_worker): Likewise.
5159 (visit_actioned_threads): Likewise.
5160 * thread-db.c (any_thread_of): Likewise.
5161 * tracepoint.c (same_process_p): Likewise.
5162 (match_blocktype): Likewise.
5163 (build_traceframe_info_xml): Likewise.
5165 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5167 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5169 (gdb_unparse_agent_expr): Likewise.
5170 * hostio.c (require_data): Likewise.
5171 (handle_pread): Likewise.
5172 * linux-low.c (disable_regset): Likewise.
5173 (fetch_register): Likewise.
5174 (store_register): Likewise.
5175 (get_dynamic): Likewise.
5176 (linux_qxfer_libraries_svr4): Likewise.
5177 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5178 (set_fast_tracepoint_jump): Likewise.
5179 (uninsert_fast_tracepoint_jumps_at): Likewise.
5180 (reinsert_fast_tracepoint_jumps_at): Likewise.
5181 (validate_inserted_breakpoint): Likewise.
5182 (clone_agent_expr): Likewise.
5183 * regcache.c (init_register_cache): Likewise.
5184 * remote-utils.c (putpkt_binary_1): Likewise.
5185 (decode_M_packet): Likewise.
5186 (decode_X_packet): Likewise.
5187 (look_up_one_symbol): Likewise.
5188 (relocate_instruction): Likewise.
5189 (monitor_output): Likewise.
5190 * server.c (handle_search_memory): Likewise.
5191 (handle_qxfer_exec_file): Likewise.
5192 (handle_qxfer_libraries): Likewise.
5193 (handle_qxfer): Likewise.
5194 (handle_query): Likewise.
5195 (handle_v_cont): Likewise.
5196 (handle_v_run): Likewise.
5197 (captured_main): Likewise.
5198 * target.c (write_inferior_memory): Likewise.
5199 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5200 * tracepoint.c (init_trace_buffer): Likewise.
5201 (add_tracepoint_action): Likewise.
5202 (add_traceframe): Likewise.
5203 (add_traceframe_block): Likewise.
5204 (cmd_qtdpsrc): Likewise.
5205 (cmd_qtdv): Likewise.
5206 (cmd_qtstatus): Likewise.
5207 (response_source): Likewise.
5208 (response_tsv): Likewise.
5209 (cmd_qtnotes): Likewise.
5210 (gdb_collect): Likewise.
5211 (initialize_tracepoint): Likewise.
5213 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5215 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5216 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5217 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5219 (enum aarch64_condition_codes): New enum.
5220 (w0): New static global.
5223 (struct aarch64_memory_operand) <type>: New
5224 MEMORY_OPERAND_POSTINDEX type.
5225 (postindex_memory_operand): New helper function.
5226 (emit_ret): New function.
5227 (emit_load_store_pair): New function, factored out of emit_stp
5228 with support for MEMORY_OPERAND_POSTINDEX.
5229 (emit_stp): Rewrite using emit_load_store_pair.
5230 (emit_ldp): New function.
5231 (emit_load_store): Likewise.
5232 (emit_ldr): Mention post-index instruction in comment.
5233 (emit_ldrh): New function.
5234 (emit_ldrb): New function.
5235 (emit_ldrsw): Mention post-index instruction in comment.
5236 (emit_str): Likewise.
5237 (emit_subs): New function.
5238 (emit_cmp): Likewise.
5239 (emit_and): Likewise.
5240 (emit_orr): Likewise.
5241 (emit_orn): Likewise.
5242 (emit_eor): Likewise.
5243 (emit_mvn): Likewise.
5244 (emit_lslv): Likewise.
5245 (emit_lsrv): Likewise.
5246 (emit_asrv): Likewise.
5247 (emit_mul): Likewise.
5248 (emit_sbfm): Likewise.
5249 (emit_sbfx): Likewise.
5250 (emit_ubfm): Likewise.
5251 (emit_ubfx): Likewise.
5252 (emit_csinc): Likewise.
5253 (emit_cset): Likewise.
5254 (emit_nop): Likewise.
5255 (emit_ops_insns): New helper function.
5256 (emit_pop): Likewise.
5257 (emit_push): Likewise.
5258 (aarch64_emit_prologue): New function.
5259 (aarch64_emit_epilogue): Likewise.
5260 (aarch64_emit_add): Likewise.
5261 (aarch64_emit_sub): Likewise.
5262 (aarch64_emit_mul): Likewise.
5263 (aarch64_emit_lsh): Likewise.
5264 (aarch64_emit_rsh_signed): Likewise.
5265 (aarch64_emit_rsh_unsigned): Likewise.
5266 (aarch64_emit_ext): Likewise.
5267 (aarch64_emit_log_not): Likewise.
5268 (aarch64_emit_bit_and): Likewise.
5269 (aarch64_emit_bit_or): Likewise.
5270 (aarch64_emit_bit_xor): Likewise.
5271 (aarch64_emit_bit_not): Likewise.
5272 (aarch64_emit_equal): Likewise.
5273 (aarch64_emit_less_signed): Likewise.
5274 (aarch64_emit_less_unsigned): Likewise.
5275 (aarch64_emit_ref): Likewise.
5276 (aarch64_emit_if_goto): Likewise.
5277 (aarch64_emit_goto): Likewise.
5278 (aarch64_write_goto_address): Likewise.
5279 (aarch64_emit_const): Likewise.
5280 (aarch64_emit_call): Likewise.
5281 (aarch64_emit_reg): Likewise.
5282 (aarch64_emit_pop): Likewise.
5283 (aarch64_emit_stack_flush): Likewise.
5284 (aarch64_emit_zero_ext): Likewise.
5285 (aarch64_emit_swap): Likewise.
5286 (aarch64_emit_stack_adjust): Likewise.
5287 (aarch64_emit_int_call_1): Likewise.
5288 (aarch64_emit_void_call_2): Likewise.
5289 (aarch64_emit_eq_goto): Likewise.
5290 (aarch64_emit_ne_goto): Likewise.
5291 (aarch64_emit_lt_goto): Likewise.
5292 (aarch64_emit_le_goto): Likewise.
5293 (aarch64_emit_gt_goto): Likewise.
5294 (aarch64_emit_ge_got): Likewise.
5295 (aarch64_emit_ops_impl): New static global variable.
5296 (aarch64_emit_ops): New target function, return
5297 &aarch64_emit_ops_impl.
5298 (struct linux_target_ops): Install it.
5300 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5302 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5303 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5305 * linux-aarch64-ipa.c: New file.
5306 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5308 (aarch64_get_thread_area): New target method.
5309 (extract_signed_bitfield): New helper function.
5310 (aarch64_decode_ldr_literal): New function.
5311 (enum aarch64_opcodes): New enum.
5312 (struct aarch64_register): New struct.
5313 (struct aarch64_operand): New struct.
5314 (x0): New static global.
5323 (aarch64_register): New helper function.
5324 (register_operand): Likewise.
5325 (immediate_operand): Likewise.
5326 (struct aarch64_memory_operand): New struct.
5327 (offset_memory_operand): New helper function.
5328 (preindex_memory_operand): Likewise.
5329 (enum aarch64_system_control_registers): New enum.
5330 (ENCODE): New macro.
5331 (emit_insn): New helper function.
5332 (emit_b): New function.
5333 (emit_bcond): Likewise.
5334 (emit_cb): Likewise.
5335 (emit_tb): Likewise.
5336 (emit_blr): Likewise.
5337 (emit_stp): Likewise.
5338 (emit_ldp_q_offset): Likewise.
5339 (emit_stp_q_offset): Likewise.
5340 (emit_load_store): Likewise.
5341 (emit_ldr): Likewise.
5342 (emit_ldrsw): Likewise.
5343 (emit_str): Likewise.
5344 (emit_ldaxr): Likewise.
5345 (emit_stxr): Likewise.
5346 (emit_stlr): Likewise.
5347 (emit_data_processing_reg): Likewise.
5348 (emit_data_processing): Likewise.
5349 (emit_add): Likewise.
5350 (emit_sub): Likewise.
5351 (emit_mov): Likewise.
5352 (emit_movk): Likewise.
5353 (emit_mov_addr): Likewise.
5354 (emit_mrs): Likewise.
5355 (emit_msr): Likewise.
5356 (emit_sevl): Likewise.
5357 (emit_wfe): Likewise.
5358 (append_insns): Likewise.
5359 (can_encode_int32_in): New helper function.
5360 (aarch64_relocate_instruction): New function.
5361 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5362 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5363 (struct linux_target_ops): Install aarch64_get_thread_area,
5364 aarch64_install_fast_tracepoint_jump_pad and
5365 aarch64_get_min_fast_tracepoint_insn_len.
5367 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5369 * Makefile.in (aarch64-insn.o): New rule.
5370 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5372 2015-09-21 Yao Qi <yao.qi@linaro.org>
5374 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5376 2015-09-21 Yao Qi <yao.qi@linaro.org>
5378 * tracepoint.c (max_jump_pad_size): Remove.
5380 2015-09-18 Yao Qi <yao.qi@linaro.org>
5382 * linux-aarch64-low.c: Don't include sys/uio.h.
5383 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5385 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5387 * tracepoint.c (eval_result_type): Change prototype.
5388 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5390 2015-09-15 Pedro Alves <palves@redhat.com>
5392 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5393 Check whether to report exec events instead of checking whether
5394 multiprocess is enabled.
5396 2015-09-15 Pedro Alves <palves@redhat.com>
5399 * remote-utils.c (prepare_resume_reply): Merge
5400 TARGET_WAITKIND_VFORK_DONE switch case with the
5401 TARGET_WAITKIND_FORKED case.
5403 2015-09-15 Yao Qi <yao.qi@linaro.org>
5405 * server.c (handle_query): Check string comparison using
5406 "else if" instead of "if".
5408 2015-09-15 Yao Qi <yao.qi@linaro.org>
5410 * server.c (vCont_supported): New global variable.
5411 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5412 matches. Append ";vContSupported+" to own_buf.
5413 (handle_v_requests): Append ";s;S" to own_buf if target supports
5414 hardware single step or vCont_supported is false.
5415 (capture_main): Set vCont_supported to zero.
5417 2015-09-15 Yao Qi <yao.qi@linaro.org>
5419 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5421 (linux_supports_hardware_single_step): ... New function.
5422 (linux_target_ops): Update.
5423 * lynx-low.c (lynx_target_ops): Set field
5424 supports_hardware_single_step to target_can_do_hardware_single_step.
5425 * nto-low.c (nto_target_ops): Likewise.
5426 * spu-low.c (spu_target_ops): Likewise.
5427 * win32-low.c (win32_target_ops): Likewise.
5428 * target.c (target_can_do_hardware_single_step): New function.
5429 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5430 Remove. <supports_hardware_single_step>: New field.
5431 (target_supports_conditional_breakpoints): Remove.
5432 (target_supports_hardware_single_step): New macro.
5433 (target_can_do_hardware_single_step): Declare.
5434 * server.c (handle_query): Use target_supports_hardware_single_step
5435 instead of target_supports_conditional_breakpoints.
5437 2015-09-15 Yao Qi <yao.qi@linaro.org>
5439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5441 (struct linux_target_ops the_low_target): Install
5442 aarch64_linux_siginfo_fixup.
5444 2015-09-11 Don Breazeal <donb@codesourcery.com>
5445 Luis Machado <lgustavo@codesourcery.com>
5447 * linux-low.c (linux_mourn): Static declaration.
5448 (linux_arch_setup): Move in front of
5449 handle_extended_wait.
5450 (linux_arch_setup_thread): New function.
5451 (handle_extended_wait): Handle exec events. Call
5452 linux_arch_setup_thread. Make event_lwp argument a
5453 pointer-to-a-pointer.
5454 (check_zombie_leaders): Do not check stopped threads.
5455 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5456 (linux_low_filter_event): Add lwp and thread for exec'ing
5457 non-leader thread if leader thread has been deleted.
5458 Refactor code into linux_arch_setup_thread and call it.
5459 Pass child lwp pointer by reference to handle_extended_wait.
5460 (linux_wait_for_event_filtered): Update comment.
5461 (linux_wait_1): Prevent clobbering exec event status.
5462 (linux_supports_exec_events): New function.
5463 (linux_target_ops) <supports_exec_events>: Initialize new member.
5464 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5466 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5467 * server.c (report_exec_events): New global variable.
5468 (handle_query): Handle qSupported query for exec-events feature.
5469 (captured_main): Initialize report_exec_events.
5470 * server.h (report_exec_events): Declare new global variable.
5471 * target.h (struct target_ops) <supports_exec_events>: New
5473 (target_supports_exec_events): New macro.
5474 * win32-low.c (win32_target_ops) <supports_exec_events>:
5475 Initialize new member.
5477 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5479 * linux-low.c (linux_low_enable_btrace): Remove.
5480 (linux_target_ops): Replace linux_low_enable_btrace with
5481 linux_enable_btrace.
5483 2015-09-03 Yao Qi <yao.qi@linaro.org>
5485 * linux-aarch64-low.c (aarch64_insert_point): Call
5486 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5489 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5491 * linux-low.c (check_stopped_by_breakpoint): Use
5492 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5494 2015-08-27 Pedro Alves <palves@redhat.com>
5496 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5498 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5500 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5501 the XNEW-family equivalent.
5502 (compile_bytecodes): Likewise.
5503 * dll.c (loaded_dll): Likewise.
5504 * event-loop.c (append_callback_event): Likewise.
5505 (create_file_handler): Likewise.
5506 (create_file_event): Likewise.
5507 * hostio.c (handle_open): Likewise.
5508 * inferiors.c (add_thread): Likewise.
5509 (add_process): Likewise.
5510 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5511 * linux-arm-low.c (arm_new_process): Likewise.
5512 (arm_new_thread): Likewise.
5513 * linux-low.c (add_to_pid_list): Likewise.
5514 (linux_add_process): Likewise.
5515 (handle_extended_wait): Likewise.
5516 (add_lwp): Likewise.
5517 (enqueue_one_deferred_signal): Likewise.
5518 (enqueue_pending_signal): Likewise.
5519 (linux_resume_one_lwp_throw): Likewise.
5520 (linux_resume_one_thread): Likewise.
5521 (linux_read_memory): Likewise.
5522 (linux_write_memory): Likewise.
5523 * linux-mips-low.c (mips_linux_new_process): Likewise.
5524 (mips_linux_new_thread): Likewise.
5525 (mips_add_watchpoint): Likewise.
5526 * linux-x86-low.c (initialize_low_arch): Likewise.
5527 * lynx-low.c (lynx_add_process): Likewise.
5528 * mem-break.c (set_raw_breakpoint_at): Likewise.
5529 (set_breakpoint): Likewise.
5530 (add_condition_to_breakpoint): Likewise.
5531 (add_commands_to_breakpoint): Likewise.
5532 (clone_agent_expr): Likewise.
5533 (clone_one_breakpoint): Likewise.
5534 * regcache.c (new_register_cache): Likewise.
5535 * remote-utils.c (look_up_one_symbol): Likewise.
5536 * server.c (queue_stop_reply): Likewise.
5537 (start_inferior): Likewise.
5538 (queue_stop_reply_callback): Likewise.
5539 (handle_target_event): Likewise.
5540 * spu-low.c (fetch_ppc_memory): Likewise.
5541 (store_ppc_memory): Likewise.
5542 * target.c (set_target_ops): Likewise.
5543 * thread-db.c (thread_db_load_search): Likewise.
5544 (try_thread_db_load_1): Likewise.
5545 * tracepoint.c (add_tracepoint): Likewise.
5546 (add_tracepoint_action): Likewise.
5547 (create_trace_state_variable): Likewise.
5548 (cmd_qtdpsrc): Likewise.
5549 (cmd_qtro): Likewise.
5550 (add_while_stepping_state): Likewise.
5551 * win32-low.c (child_add_thread): Likewise.
5552 (get_image_name): Likewise.
5554 2015-08-25 Yao Qi <yao.qi@linaro.org>
5556 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5558 2015-08-25 Yao Qi <yao.qi@linaro.org>
5560 * Makefile.in (aarch64-linux.o): New rule.
5561 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5563 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5564 (aarch64_init_debug_reg_state): Make it extern.
5565 (aarch64_linux_prepare_to_resume): Remove.
5567 2015-08-25 Yao Qi <yao.qi@linaro.org>
5569 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5570 lwp_arch_private_info and ptid_of_lwp.
5572 2015-08-25 Yao Qi <yao.qi@linaro.org>
5574 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5575 Find proc_info by find_process_pid. All callers updated.
5577 2015-08-25 Yao Qi <yao.qi@linaro.org>
5579 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5581 (debug_reg_change_callback): Remove.
5582 (aarch64_notify_debug_reg_change): Remove.
5584 2015-08-25 Yao Qi <yao.qi@linaro.org>
5586 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5587 Call current_lwp_ptid.
5589 2015-08-25 Yao Qi <yao.qi@linaro.org>
5591 * linux-aarch64-low.c (debug_reg_change_callback): Use
5594 2015-08-25 Yao Qi <yao.qi@linaro.org>
5596 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5598 2015-08-25 Yao Qi <yao.qi@linaro.org>
5600 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5602 2015-08-25 Yao Qi <yao.qi@linaro.org>
5604 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5607 2015-08-25 Yao Qi <yao.qi@linaro.org>
5609 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5611 (debug_reg_change_callback): Remove argument entry and add argument
5612 lwp. Remove local variable thread. Don't print thread id in the
5613 debugging output. Don't check whether pid of thread equals to pid.
5614 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5615 iterate_over_lwps instead find_inferior.
5617 2015-08-24 Pedro Alves <palves@redhat.com>
5619 * inferiors.c (get_first_process): New function.
5620 * inferiors.h (get_first_process): New declaration.
5621 * remote-utils.c (read_ptid): Default to the first process in the
5622 list, instead of to the current thread's process.
5624 2015-08-24 Pedro Alves <palves@redhat.com>
5626 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5627 * event-loop.c: Likewise.
5628 * remote-utils.c: Likewise.
5629 * tracepoint.c: Likewise.
5631 2015-08-24 Pedro Alves <palves@redhat.com>
5633 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5636 2015-08-21 Pedro Alves <palves@redhat.com>
5638 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5639 instead of literal 1.
5641 2015-08-21 Pedro Alves <palves@redhat.com>
5643 * tdesc.c (default_description): Explicitly zero-initialize.
5645 2015-08-21 Pedro Alves <palves@redhat.com>
5648 * inferiors.c (remove_thread): Discard any pending stop reply for
5650 * server.c (remove_all_on_match_pid): Rename to ...
5651 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5653 (discard_queued_stop_replies): Change parameter to a ptid. Now
5655 (handle_v_kill, kill_inferior_callback, captured_main)
5656 (process_serial_event): Adjust.
5657 * server.h (discard_queued_stop_replies): Declare.
5659 2015-08-21 Pedro Alves <palves@redhat.com>
5661 * linux-low.c (wait_for_sigstop): Always switch to no thread
5662 selected if the previously current thread dies.
5663 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5664 process instead of the current thread's.
5665 * remote-utils.c (input_interrupt): Don't check if there's no
5667 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5668 current thread to the general thread fails, error out.
5669 (handle_qxfer_auxv, handle_qxfer_libraries)
5670 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5671 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5672 (handle_query): Check if there's a thread selected instead of
5673 checking whether there's any thread in the thread list.
5674 (handle_qxfer_threads, handle_qxfer_btrace)
5675 (handle_qxfer_btrace_conf): Don't error out early if there's no
5676 thread in the thread list.
5677 (handle_v_cont, myresume): Don't set the current thread to the
5679 (process_serial_event) <Hg handling>: Also set thread_id if the
5680 previous general thread is still alive.
5681 (process_serial_event) <g/G handling>: If setting the current
5682 thread to the general thread fails, error out.
5683 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5684 thread's lwp instead of the current thread's.
5685 * target.c (set_desired_thread): If the desired thread was not
5686 found, leave the current thread pointing to NULL. Return an int
5687 (boolean) indicating success.
5688 * target.h (set_desired_thread): Change return type to int.
5690 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5692 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5693 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5695 (ps_get_thread_area): New function.
5697 2015-08-19 Gary Benson <gbenson@redhat.com>
5699 * hostio.c (handle_pread): Do not attempt to read more data
5700 than hostio_reply_with_data can fit in a packet.
5702 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5704 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5706 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5708 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5710 2015-08-06 Pedro Alves <palves@redhat.com>
5712 * tracepoint.c (expr_eval_result): Now an int.
5714 2015-08-06 Pedro Alves <palves@redhat.com>
5716 * gdbthread.h (struct regcache): Forward declare.
5717 (struct thread_info) <regcache_data>: Now a struct regcache
5719 * inferiors.c (inferior_regcache_data)
5720 (set_inferior_regcache_data): Now work with struct regcache
5722 * inferiors.h (struct regcache): Forward declare.
5723 (inferior_regcache_data, set_inferior_regcache_data): Now work
5724 with struct regcache pointers.
5725 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5726 (free_register_cache_thread): Remove struct regcache pointer
5729 2015-08-06 Pedro Alves <palves@redhat.com>
5731 * server.c (captured_main): On error, print the exception message
5732 to stderr, and if run_once is set, throw a quit.
5734 2015-08-06 Pedro Alves <palves@redhat.com>
5736 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5739 2015-08-06 Pedro Alves <palves@redhat.com>
5741 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5742 reading beyond the passed in buffer length.
5744 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5746 * tracepoint.c (symbol_list) <required>: Remove.
5748 2015-08-06 Pedro Alves <palves@redhat.com>
5750 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5751 count if stopping and suspending threads.
5752 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5753 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5754 (linux_detach): Complete an ongoing step-over.
5755 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5757 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5758 (linux_wait_1): If passing a signal to the inferior after
5759 finishing a step-over, unsuspend and re-resume all lwps. If we
5760 see a single-step event but the thread should be continuing, don't
5761 pass the trap to gdb.
5762 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5763 internal_error instead of gdb_assert.
5764 (enqueue_pending_signal): New function.
5765 (check_ptrace_stopped_lwp_gone): Add debug output.
5766 (start_step_over): Use internal_error instead of gdb_assert.
5767 (complete_ongoing_step_over): New function.
5768 (linux_resume_one_thread): Don't resume a suspended thread.
5769 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5772 2015-08-06 Pedro Alves <palves@redhat.com>
5774 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5775 (linux_thread_alive): Use lwp_is_marked_dead.
5776 (extended_event_reported): Delete.
5777 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5778 instead of extended_event_reported.
5779 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5781 (lwp_is_marked_dead): New function.
5782 (lwp_running): Use lwp_is_marked_dead.
5783 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5786 2015-08-06 Pedro Alves <palves@redhat.com>
5788 * linux-low.c (linux_wait_1): Move fork event output out of the
5789 !report_to_gdb check. Pass event_child->waitstatus to
5790 target_waitstatus_to_string instead of ourstatus.
5792 2015-08-04 Yao Qi <yao.qi@linaro.org>
5794 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5795 if current_thread is 32 bit.
5797 2015-08-04 Yao Qi <yao.qi@linaro.org>
5799 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5800 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5801 * server.c (extended_protocol): Remove "static".
5802 * server.h (extended_protocol): Declare it.
5804 2015-08-04 Yao Qi <yao.qi@linaro.org>
5806 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5807 both aarch64 and aarch32.
5808 (aarch64_set_pc): Likewise.
5810 2015-08-04 Yao Qi <yao.qi@linaro.org>
5812 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5813 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5814 arm-with-neon.xml to srv_xmlfiles.
5815 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5816 (is_64bit_tdesc): New function.
5817 (aarch64_linux_read_description): New function.
5818 (aarch64_arch_setup): Call aarch64_linux_read_description.
5819 (regs_info): Rename to regs_info_aarch64.
5820 (aarch64_regs_info): Return right regs_info.
5821 (initialize_low_arch): Call initialize_low_arch_aarch32.
5823 2015-08-04 Yao Qi <yao.qi@linaro.org>
5825 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5826 * linux-aarch32-low.c: New file.
5827 * linux-aarch32-low.h: New file.
5828 * linux-arm-low.c (arm_fill_gregset): Move it to
5829 linux-aarch32-low.c.
5830 (arm_store_gregset): Likewise.
5831 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5832 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5833 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5834 (regs_info): Rename to regs_info_arm.
5835 (arm_regs_info): Return regs_info_aarch32 if
5836 have_ptrace_getregset is 1 and target description is
5837 arm_with_neon or arm_with_vfpv3.
5838 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5839 Call initialize_low_arch_aarch32 instead.
5841 2015-08-04 Yao Qi <yao.qi@linaro.org>
5843 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5844 * linux-low.c: ... here.
5845 * linux-low.h (have_ptrace_getregset): Declare it.
5847 2015-08-04 Pedro Alves <palves@redhat.com>
5849 * thread-db.c (struct thread_db): Use new typedefs.
5850 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5852 (disable_thread_event_reporting): Cast result of dlsym to
5853 destination function pointer type.
5854 (thread_db_mourn): Use td_ta_delete_ftype.
5856 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5858 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5860 (CDX_BREAKPOINT): Define for R2.
5861 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5862 (the_low_target): Add comments.
5864 2015-07-30 Yao Qi <yao.qi@linaro.org>
5866 * linux-arm-low.c (arm_hwcap): Remove it.
5867 (arm_read_description): New local variable arm_hwcap. Don't
5868 set arm_hwcap to zero.
5870 2015-07-30 Yao Qi <yao.qi@linaro.org>
5872 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5873 Use regcache->tdesc instead.
5874 (arm_store_wmmxregset): Likewise.
5875 (arm_fill_vfpregset): Likewise.
5876 (arm_store_vfpregset): Likewise.
5878 2015-07-30 Yao Qi <yao.qi@linaro.org>
5880 * linux-arm-low.c: Include arch/arm.h.
5881 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5882 (arm_store_gregset): Likewise.
5884 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5886 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5887 ptrace's 4th parameter.
5889 2015-07-27 Yao Qi <yao.qi@linaro.org>
5891 * configure.srv (case aarch64*-*-linux*): Don't set
5894 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5896 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5898 * linux-arm-low.c: Likewise.
5899 * linux-cris-low.c: Likewise.
5900 * linux-crisv32-low.c: Likewise.
5901 * linux-low.c: Likewise.
5902 * linux-m68k-low.c: Likewise.
5903 * linux-mips-low.c: Likewise.
5904 * linux-nios2-low.c: Likewise.
5905 * linux-s390-low.c: Likewise.
5906 * linux-sparc-low.c: Likewise.
5907 * linux-tic6x-low.c: Likewise.
5908 * linux-tile-low.c: Likewise.
5909 * linux-x86-low.c: Likewise.
5911 2015-07-24 Pedro Alves <palves@redhat.com>
5913 * config.in: Regenerate.
5914 * configure: Regenerate.
5916 2015-07-24 Pedro Alves <palves@redhat.com>
5918 * acinclude.m4: Include ../ptrace.m4.
5919 * configure.ac: Call GDB_AC_PTRACE.
5920 * config.in, configure: Regenerate.
5922 2015-07-24 Yao Qi <yao.qi@linaro.org>
5924 * linux-low.c (linux_create_inferior): Remove setting to
5925 proc->priv->new_inferior.
5926 (linux_attach): Likewise.
5927 (linux_low_filter_event): Likewise.
5928 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5930 2015-07-24 Yao Qi <yao.qi@linaro.org>
5932 * linux-low.c (linux_arch_setup): New function.
5933 (linux_low_filter_event): If proc->tdesc is NULL and
5934 proc->attached is true, call the_low_target.arch_setup.
5935 Otherwise, keep status pending, and return.
5936 (linux_resume_one_lwp_throw): Don't call get_pc if
5937 thread->while_stepping isn't NULL. Don't call
5938 get_thread_regcache if proc->tdesc is NULL.
5939 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5940 (linux_target_ops): Install arch_setup.
5941 * server.c (start_inferior): Call the_target->arch_setup.
5942 * target.h (struct target_ops) <arch_setup>: New field.
5943 (target_arch_setup): New marco.
5944 * lynx-low.c (lynx_target_ops): Update.
5945 * nto-low.c (nto_target_ops): Update.
5946 * spu-low.c (spu_target_ops): Update.
5947 * win32-low.c (win32_target_ops): Update.
5949 2015-07-24 Yao Qi <yao.qi@linaro.org>
5951 * linux-low.c (linux_add_process): Don't set
5952 proc->priv->new_inferior.
5953 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5954 (linux_attach): Likewise.
5956 2015-07-24 Yao Qi <yao.qi@linaro.org>
5958 * server.c (start_inferior): Code refactor.
5960 2015-07-24 Yao Qi <yao.qi@linaro.org>
5962 * server.c (process_serial_event): Set general_thread.
5964 2015-07-21 Yao Qi <yao.qi@linaro.org>
5966 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5967 aarch64_linux_get_debug_reg_capacity.
5969 2015-07-17 Yao Qi <yao.qi@linaro.org>
5971 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5972 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5973 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5974 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5975 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5976 (AARCH64_HWP_ALIGNMENT): Likewise.
5977 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5978 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5979 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5980 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5981 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5982 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5983 (struct aarch64_debug_reg_state): Likewise.
5984 (struct arch_lwp_info): Likewise.
5985 (aarch64_align_watchpoint): Likewise.
5986 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5987 (aarch64_watchpoint_length): Likewise.
5988 (aarch64_point_encode_ctrl_reg): Likewise
5989 (aarch64_point_is_aligned): Likewise.
5990 (aarch64_align_watchpoint): Likewise.
5991 (aarch64_linux_set_debug_regs):
5992 (aarch64_dr_state_insert_one_point): Likewise.
5993 (aarch64_dr_state_remove_one_point): Likewise.
5994 (aarch64_handle_breakpoint): Likewise.
5995 (aarch64_handle_aligned_watchpoint): Likewise.
5996 (aarch64_handle_unaligned_watchpoint): Likewise.
5997 (aarch64_handle_watchpoint): Likewise.
5999 2015-07-17 Yao Qi <yao.qi@linaro.org>
6001 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
6002 and don't aarch64_get_debug_reg_state. All callers update.
6003 (aarch64_handle_aligned_watchpoint): Likewise.
6004 (aarch64_handle_unaligned_watchpoint): Likewise.
6005 (aarch64_handle_watchpoint): Likewise.
6006 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
6007 (aarch64_remove_point): Likewise.
6009 2015-07-17 Yao Qi <yao.qi@linaro.org>
6011 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
6013 (aarch64_handle_unaligned_watchpoint): Likewise.
6015 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6017 Revert the previous 3 commits:
6018 Move gdb_regex* to common/
6019 Move linux_find_memory_regions_full & co.
6020 gdbserver build-id attribute generator
6022 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6023 Jan Kratochvil <jan.kratochvil@redhat.com>
6025 gdbserver build-id attribute generator.
6026 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
6027 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
6028 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
6030 (get_dynamic): Use find_pdhr to traverse program headers.
6031 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
6032 (compare_mapping_entry_range, struct find_memory_region_callback_data)
6033 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
6034 (get_hex_build_id): New.
6035 (linux_qxfer_libraries_svr4): Add optional build-id attribute
6036 to reply XML document.
6038 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6039 Jan Kratochvil <jan.kratochvil@redhat.com>
6041 * target.c: Include target/target-utils.h and fcntl.h.
6042 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
6043 (target_fileio_read_stralloc): New functions.
6045 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6047 * Makefile.in (OBS): Add gdb_regex.o.
6049 * config.in: Rebuilt.
6050 * configure: Rebuilt.
6052 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
6053 Jan Kratochvil <jan.kratochvil@redhat.com>
6055 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
6056 * Makefile.in (OBS): Add target-utils.o.
6057 (linux-maps.o, target-utils.o): New.
6058 * configure.srv (srv_linux_obj): Add linux-maps.o.
6060 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
6062 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
6064 (the_low_target): Install it.
6066 2015-07-14 Pedro Alves <palves@redhat.com>
6068 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6069 Instead, ignore ECHILD, and throw an error for other errnos.
6071 2015-07-10 Pedro Alves <palves@redhat.com>
6073 * event-loop.c (struct callback_event) <data>: Change type to
6074 gdb_client_data instance instead of gdb_client_data pointer.
6075 (append_callback_event): Adjust.
6077 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
6079 * linux-aarch64-low.c: Add comments for each linux_target_ops
6080 method. Remove comments already covered in target_ops and
6081 linux_target_ops definitions.
6082 (the_low_target): Add comments for each unimplemented method.
6084 2015-07-09 Yao Qi <yao.qi@linaro.org>
6086 * linux-aarch64-low.c (aarch64_regmap): Remove.
6087 (aarch64_usrregs_info): Remove.
6088 (regs_info): Set field usrregs to NULL.
6090 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
6092 * linux-low.c: Include "rsp-low.h"
6093 (linux_low_encode_pt_config, linux_low_encode_raw): New.
6094 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6095 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6096 (handle_btrace_enable_pt): New.
6097 (handle_btrace_general_set): Support "pt".
6098 (handle_btrace_conf_general_set): Support "pt:size".
6100 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6102 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6105 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
6107 * linux-aarch64-low.c: Remove comment about endianness.
6108 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
6109 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
6112 2015-06-24 Gary Benson <gbenson@redhat.com>
6114 * linux-i386-ipa.c (stdint.h): Do not include.
6115 * lynx-i386-low.c (stdint.h): Likewise.
6116 * lynx-ppc-low.c (stdint.h): Likewise.
6117 * mem-break.c (stdint.h): Likewise.
6118 * thread-db.c (stdint.h): Likewise.
6119 * tracepoint.c (stdint.h): Likewise.
6120 * win32-low.c (stdint.h): Likewise.
6122 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
6124 * server.c (write_qxfer_response): Update call to
6125 remote_escape_output.
6127 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
6128 Jan Kratochvil <jan.kratochvil@redhat.com>
6130 Merge multiple hex conversions.
6131 * gdbreplay.c (tohex): Rename to 'fromhex'.
6132 (logchar): Use fromhex.
6134 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
6136 * server.c (handle_qxfer_libraries): Set `version' attribute for
6139 2015-06-10 Gary Benson <gbenson@redhat.com>
6141 * target.h (struct target_ops) <multifs_open>: New field.
6142 <multifs_unlink>: Likewise.
6143 <multifs_readlink>: Likewise.
6144 * linux-low.c (nat/linux-namespaces.h): New include.
6145 (linux_target_ops): Initialize the_target->multifs_open,
6146 the_target->multifs_unlink and the_target->multifs_readlink.
6147 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6148 * hostio.c (hostio_fs_pid): New static variable.
6149 (hostio_handle_new_gdb_connection): New function.
6150 (handle_setfs): Likewise.
6151 (handle_open): Use the_target->multifs_open as appropriate.
6152 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6153 (handle_readlink): Use the_target->multifs_readlink as
6155 (handle_vFile): Handle vFile:setfs packets.
6156 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6157 after target_handle_new_gdb_connection.
6159 2015-06-10 Gary Benson <gbenson@redhat.com>
6161 * configure.ac (AC_CHECK_FUNCS): Add setns.
6162 * config.in: Regenerate.
6163 * configure: Likewise.
6164 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6165 (linux-namespaces.o): New rule.
6166 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6168 2015-06-09 Gary Benson <gbenson@redhat.com>
6170 * hostio.c (handle_open): Process mode argument with
6171 fileio_to_host_mode.
6173 2015-06-01 Yao Qi <yao.qi@linaro.org>
6175 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6176 * linux-x86-low.c: Likewise.
6178 2015-05-28 Don Breazeal <donb@codesourcery.com>
6180 * linux-low.c (handle_extended_wait): Initialize
6181 thread_info.last_resume_kind for new fork children.
6183 2015-05-15 Pedro Alves <palves@redhat.com>
6185 * target.h (target_handle_new_gdb_connection): Rewrite using if
6186 wrapped in do/while.
6188 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6190 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6191 * configure, config.in: Regenerate.
6192 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6195 2015-05-12 Don Breazeal <donb@codesourcery.com>
6197 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6198 PTRACE_EVENT_VFORK_DONE.
6199 (linux_low_ptrace_options, extended_event_reported): Add vfork
6201 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6202 and "vforkdone" for RSP 'T' Stop Reply Packet.
6203 * server.h (report_vfork_events): Declare
6206 2015-05-12 Don Breazeal <donb@codesourcery.com>
6208 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6209 (the_low_target) <new_fork>: Initialize new member.
6210 * linux-arm-low.c (arm_new_fork): New function.
6211 (the_low_target) <new_fork>: Initialize new member.
6212 * linux-low.c (handle_extended_wait): Call new target function
6214 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6215 * linux-mips-low.c (mips_add_watchpoint): New function
6216 extracted from mips_insert_point.
6217 (the_low_target) <new_fork>: Initialize new member.
6218 (mips_linux_new_fork): New function.
6219 (mips_insert_point): Call mips_add_watchpoint.
6220 * linux-x86-low.c (x86_linux_new_fork): New function.
6221 (the_low_target) <new_fork>: Initialize new member.
6223 2015-05-12 Don Breazeal <donb@codesourcery.com>
6225 * linux-low.c (handle_extended_wait): Implement return value,
6226 rename argument 'event_child' to 'event_lwp', handle
6227 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6228 (linux_low_ptrace_options): New function.
6229 (linux_low_filter_event): Call linux_low_ptrace_options,
6230 use different argument fo linux_enable_event_reporting,
6231 use return value from handle_extended_wait.
6232 (extended_event_reported): New function.
6233 (linux_wait_1): Call extended_event_reported and set
6234 status to report fork events.
6235 (linux_write_memory): Add pid to debug message.
6236 (reset_lwp_ptrace_options_callback): New function.
6237 (linux_handle_new_gdb_connection): New function.
6238 (linux_target_ops): Initialize new structure member.
6239 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6240 * lynx-low.c: Initialize new structure member.
6241 * remote-utils.c (prepare_resume_reply): Implement stop reason
6242 "fork" for "T" stop message.
6243 * server.c (handle_query): Call handle_new_gdb_connection.
6244 * server.h (report_fork_events): Declare global flag.
6245 * target.h (struct target_ops) <handle_new_gdb_connection>:
6247 (target_handle_new_gdb_connection): New macro.
6248 * win32-low.c: Initialize new structure member.
6250 2015-05-12 Don Breazeal <donb@codesourcery.com>
6252 * mem-break.c (APPEND_TO_LIST): Define macro.
6253 (clone_agent_expr): New function.
6254 (clone_one_breakpoint): New function.
6255 (clone_all_breakpoints): New function.
6256 * mem-break.h: Declare new functions.
6258 2015-05-12 Don Breazeal <donb@codesourcery.com>
6260 * linux-low.c (linux_supports_fork_events): New function.
6261 (linux_supports_vfork_events): New function.
6262 (linux_target_ops): Initialize new structure members.
6263 (initialize_low): Call linux_check_ptrace_features.
6264 * lynx-low.c (lynx_target_ops): Initialize new structure
6266 * server.c (report_fork_events, report_vfork_events):
6268 (handle_query): Add new features to qSupported packet and
6270 (captured_main): Initialize new global variables.
6271 * target.h (struct target_ops) <supports_fork_events>:
6273 <supports_vfork_events>: New member.
6274 (target_supports_fork_events): New macro.
6275 (target_supports_vfork_events): New macro.
6276 * win32-low.c (win32_target_ops): Initialize new structure
6279 2015-05-12 Gary Benson <gbenson@redhat.com>
6281 * server.c (handle_qxfer_exec_file): Use current process
6284 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6286 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6287 Remove HAVE_PTRACE_GETREGS conditionals.
6288 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6289 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6291 2015-05-08 Yao Qi <yao.qi@linaro.org>
6293 * linux-low.c (linux_supports_conditional_breakpoints): New
6295 (linux_target_ops): Install new target method.
6296 * lynx-low.c (lynx_target_ops): Install NULL hook for
6297 supports_conditional_breakpoints.
6298 * nto-low.c (nto_target_ops): Likewise.
6299 * spu-low.c (spu_target_ops): Likewise.
6300 * win32-low.c (win32_target_ops): Likewise.
6301 * server.c (handle_query): Check
6302 target_supports_conditional_breakpoints.
6303 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6305 (target_supports_conditional_breakpoints): New macro.
6307 2015-05-06 Pedro Alves <palves@redhat.com>
6310 * server.c (start_inferior): If the process exits, mourn it.
6312 2015-04-21 Gary Benson <gbenson@redhat.com>
6314 * hostio.c (fileio_open_flags_to_host): Factored out to
6315 fileio_to_host_openflags in common/fileio.c. Single use
6318 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6320 * linux-xtensa-low.c (xtensa_fill_gregset)
6321 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6324 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6326 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6327 (regs_info): Replace usrregs pointer with NULL.
6329 2015-04-17 Gary Benson <gbenson@redhat.com>
6331 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6332 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6333 * server.c (handle_qxfer_exec_file): New function.
6334 (qxfer_packets): Add exec-file entry.
6335 (handle_query): Report qXfer:exec-file:read as supported packet.
6337 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6339 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6341 2015-04-09 Gary Benson <gbenson@redhat.com>
6343 * hostio-errno.c (errno_to_fileio_error): Remove function.
6344 Update caller to use remote_fileio_to_fio_error.
6346 2015-04-09 Yao Qi <yao.qi@linaro.org>
6348 * linux-low.c (linux_insert_point): Call
6349 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6350 (linux_remove_point): Call remove_memory_breakpoint if type is
6352 * linux-x86-low.c (x86_insert_point): Don't call
6353 insert_memory_breakpoint.
6354 (x86_remove_point): Don't call remove_memory_breakpoint.
6356 2015-04-01 Pedro Alves <palves@redhat.com>
6357 Cleber Rosa <crosa@redhat.com>
6359 * server.c (gdbserver_usage): Reorganize and extend the usage
6362 2015-03-24 Pedro Alves <palves@redhat.com>
6364 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6365 output. Also dump TRAP_TRACE.
6366 (linux_low_filter_event): In debug output, distinguish a
6367 resume_stop SIGSTOP from a delayed SIGSTOP.
6369 2015-03-24 Gary Benson <gbenson@redhat.com>
6371 * linux-x86-low.c (x86_linux_new_thread): Moved to
6373 (x86_linux_prepare_to_resume): Likewise.
6375 2015-03-24 Gary Benson <gbenson@redhat.com>
6377 * Makefile.in (x86-linux-dregs.o): New rule.
6378 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6379 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6380 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6381 (x86_linux_dr_get): Likewise.
6382 (x86_linux_dr_set): Likewise.
6383 (update_debug_registers_callback): Likewise.
6384 (x86_linux_dr_set_addr): Likewise.
6385 (x86_linux_dr_get_addr): Likewise.
6386 (x86_linux_dr_set_control): Likewise.
6387 (x86_linux_dr_get_control): Likewise.
6388 (x86_linux_dr_get_status): Likewise.
6389 (x86_linux_update_debug_registers): Likewise.
6391 2015-03-24 Gary Benson <gbenson@redhat.com>
6393 * linux-x86-low.c (x86_linux_update_debug_registers):
6394 New function, factored out from...
6395 (x86_linux_prepare_to_resume): ...this.
6397 2015-03-24 Gary Benson <gbenson@redhat.com>
6399 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6400 (x86_linux_dr_set): Likewise.
6401 (update_debug_registers_callback): Likewise.
6402 (x86_linux_dr_set_addr): Likewise.
6403 (x86_linux_dr_get_addr): Likewise.
6404 (x86_linux_dr_set_control): Likewise.
6405 (x86_linux_dr_get_control): Likewise.
6406 (x86_linux_dr_get_status): Likewise.
6407 (x86_linux_prepare_to_resume): Likewise.
6409 2015-03-24 Gary Benson <gbenson@redhat.com>
6411 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6412 Use perror_with_name. Pass string through gettext.
6413 (x86_linux_dr_set): Likewise.
6415 2015-03-24 Gary Benson <gbenson@redhat.com>
6417 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6418 (x86_linux_dr_set_addr): ...this.
6419 (x86_dr_low_get_addr): Rename to...
6420 (x86_linux_dr_get_addr): ...this.
6421 (x86_dr_low_set_control): Rename to...
6422 (x86_linux_dr_set_control): ...this.
6423 (x86_dr_low_get_control): Rename to...
6424 (x86_linux_dr_get_control): ...this.
6425 (x86_dr_low_get_status): Rename to...
6426 (x86_linux_dr_get_status): ...this.
6427 (x86_dr_low): Update with new function names.
6429 2015-03-24 Gary Benson <gbenson@redhat.com>
6431 * Makefile.in (x86-linux.o): New rule.
6432 * configure.srv: Add x86-linux.o to relevant targets.
6433 * linux-low.c (lwp_set_arch_private_info): New function.
6434 (lwp_arch_private_info): Likewise.
6435 * linux-x86-low.c: Include nat/x86-linux.h.
6436 (arch_lwp_info): Removed structure.
6437 (update_debug_registers_callback):
6438 Use lwp_set_debug_registers_changed.
6439 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6440 and lwp_set_debug_registers_changed.
6441 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6443 2015-03-24 Gary Benson <gbenson@redhat.com>
6445 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6446 * linux-arm-low.c (arm_new_thread): Likewise.
6447 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6448 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6449 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6450 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6452 2015-03-24 Gary Benson <gbenson@redhat.com>
6454 * linux-low.c (ptid_of_lwp): New function.
6455 (lwp_is_stopped): Likewise.
6456 (lwp_stop_reason): Likewise.
6457 * linux-x86-low.c (update_debug_registers_callback):
6459 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6462 2015-03-24 Gary Benson <gbenson@redhat.com>
6464 * linux-low.h (linux_stop_lwp): Remove declaration.
6466 2015-03-24 Gary Benson <gbenson@redhat.com>
6468 * linux-low.h: Include nat/linux-nat.h.
6469 * linux-low.c (iterate_over_lwps_args): New structure.
6470 (iterate_over_lwps_filter): New function.
6471 (iterate_over_lwps): Likewise.
6472 * linux-x86-low.c (update_debug_registers_callback):
6473 Update signature to what iterate_over_lwps expects.
6474 Remove PID check that iterate_over_lwps now performs.
6475 (x86_dr_low_set_addr): Use iterate_over_lwps.
6476 (x86_dr_low_set_control): Likewise.
6478 2015-03-24 Gary Benson <gbenson@redhat.com>
6480 * linux-x86-low.c (x86_debug_reg_state): New function.
6481 (x86_linux_prepare_to_resume): Use the above.
6483 2015-03-24 Gary Benson <gbenson@redhat.com>
6485 * linux-low.c (current_lwp_ptid): New function.
6486 * linux-x86-low.c: Include nat/linux-nat.h.
6487 (x86_dr_low_get_addr): Use current_lwp_ptid.
6488 (x86_dr_low_get_control): Likewise.
6489 (x86_dr_low_get_status): Likewise.
6491 2015-03-20 Pedro Alves <palves@redhat.com>
6493 * tracepoint.c (cmd_qtstatus): Make "str" const.
6495 2015-03-20 Pedro Alves <palves@redhat.com>
6497 * server.c (handle_general_set): Make "req_str" const.
6499 2015-03-19 Pedro Alves <palves@redhat.com>
6501 * linux-low.c (linux_resume_one_lwp): Rename to ...
6502 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6503 instead call perror_with_name.
6504 (check_ptrace_stopped_lwp_gone): New function.
6505 (linux_resume_one_lwp): Reimplement as wrapper around
6506 linux_resume_one_lwp_throw that swallows errors if the LWP is
6509 2015-03-19 Pedro Alves <palves@redhat.com>
6511 * linux-low.c (count_events_callback, select_event_lwp_callback):
6512 No longer check whether the thread has resume_stop as last resume
6515 2015-03-19 Pedro Alves <palves@redhat.com>
6517 * linux-low.c (count_events_callback, select_event_lwp_callback):
6518 Use the lwp's status_pending_p field, not the thread's.
6520 2015-03-19 Pedro Alves <palves@redhat.com>
6522 * linux-low.c (select_event_lwp_callback): Update comments to
6523 no longer mention SIGTRAP.
6525 2015-03-18 Gary Benson <gbenson@redhat.com>
6527 * server.c (handle_query): Do not report vFile:fstat as supported.
6529 2015-03-11 Gary Benson <gbenson@redhat.com>
6531 * hostio.c (sys/types.h): New include.
6532 (sys/stat.h): Likewise.
6533 (common-remote-fileio.h): Likewise.
6534 (handle_fstat): New function.
6535 (handle_vFile): Handle vFile:fstat packets.
6537 2015-03-11 Gary Benson <gbenson@redhat.com>
6539 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6540 struct stat.st_blocks and struct stat.st_blksize.
6541 * configure: Regenerate.
6542 * config.in: Likewise.
6543 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6544 (OBS): Add common-remote-fileio.o.
6545 (common-remote-fileio.o): New rule.
6547 2015-03-09 Pedro Alves <palves@redhat.com>
6549 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6550 'struct sockaddr' pointer in 'accept' call.
6552 2015-03-09 Pedro Alves <palves@redhat.com>
6555 2015-03-07 Pedro Alves <palves@redhat.com>
6556 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6557 or <winsock2.h> here. Instead include "gdb_socket.h".
6558 (remote_open): Use union gdb_sockaddr_u.
6559 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6560 or <winsock2.h> here. Instead include "gdb_socket.h".
6561 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6562 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6564 (init_named_socket, gdb_agent_helper_thread): Use union
6567 2015-03-07 Pedro Alves <palves@redhat.com>
6569 * configure.ac (build_warnings): Move
6570 -Wdeclaration-after-statement to the C-specific set.
6571 * configure: Regenerate.
6573 2015-03-07 Pedro Alves <palves@redhat.com>
6575 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6576 or <winsock2.h> here. Instead include "gdb_socket.h".
6577 (remote_open): Use union gdb_sockaddr_u.
6578 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6579 or <winsock2.h> here. Instead include "gdb_socket.h".
6580 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6581 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6583 (init_named_socket, gdb_agent_helper_thread): Use union
6586 2015-03-07 Pedro Alves <palves@redhat.com>
6588 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6591 2015-03-06 Yao Qi <yao.qi@linaro.org>
6593 * linux-aarch64-low.c (aarch64_insert_point): Use
6594 show_debug_regs as a boolean.
6595 (aarch64_remove_point): Likewise.
6597 2015-03-05 Pedro Alves <palves@redhat.com>
6599 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6600 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6601 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6602 * nto-low.c (nto_target_ops): Likewise.
6603 * spu-low.c (spu_target_ops): Likewise.
6604 * win32-low.c (win32_target_ops): Likewise.
6606 2015-03-04 Pedro Alves <palves@redhat.com>
6608 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6609 Decide whether a breakpoint triggered based on the SIGTRAP's
6611 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6612 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6613 (linux_low_filter_event): Check for breakpoints before checking
6615 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6617 (linux_stopped_by_sw_breakpoint)
6618 (linux_supports_stopped_by_sw_breakpoint)
6619 (linux_stopped_by_hw_breakpoint)
6620 (linux_supports_stopped_by_hw_breakpoint): New functions.
6621 (linux_target_ops): Install new target methods.
6623 2015-03-04 Pedro Alves <palves@redhat.com>
6625 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6626 * server.c (swbreak_feature, hwbreak_feature): New globals.
6627 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6628 (captured_main): Clear swbreak_feature and hwbreak_feature.
6629 * server.h (swbreak_feature, hwbreak_feature): Declare.
6630 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6631 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6632 supports_stopped_by_hw_breakpoint>: New fields.
6633 (target_supports_stopped_by_sw_breakpoint)
6634 (target_stopped_by_sw_breakpoint)
6635 (target_supports_stopped_by_hw_breakpoint)
6636 (target_stopped_by_hw_breakpoint): Declare.
6638 2015-03-04 Pedro Alves <palves@redhat.com>
6640 enum lwp_stop_reason -> enum target_stop_reason
6641 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6642 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6643 (linux_wait_1, stuck_in_jump_pad_callback)
6644 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6645 (linux_stopped_by_watchpoint):
6646 * linux-low.h (enum lwp_stop_reason): Delete.
6647 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6648 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6650 2015-03-04 Yao Qi <yao.qi@linaro.org>
6652 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6654 2015-03-03 Gary Benson <gbenson@redhat.com>
6656 * hostio.c (handle_vFile): Fix prefix lengths.
6658 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6660 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6663 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6665 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6666 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6667 (clean): Add "rm -f" for above C files.
6668 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6669 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6670 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6671 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6672 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6673 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6674 (init_registers_s390x_vx_linux64)
6675 (init_registers_s390x_tevx_linux64)
6676 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6677 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6679 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6680 (s390_store_vxrs_high): New functions.
6681 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6683 (s390_arch_setup): Add logic for selecting one of the new target
6684 descriptions. Activate the new vector regsets if applicable.
6685 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6686 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6687 and init_registers_s390x_tevx_linux64.
6689 2015-03-01 Pedro Alves <palves@redhat.com>
6691 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6694 2015-02-27 Pedro Alves <palves@redhat.com>
6696 * linux-x86-low.c (u_debugreg_offset): New function.
6697 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6699 2015-02-27 Pedro Alves <palves@redhat.com>
6701 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6702 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6703 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6704 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6705 (ps_lsetfpregs, ps_getpid)
6706 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6707 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6708 (ps_lsetxregs, ps_plog): Declare.
6710 2015-02-27 Pedro Alves <palves@redhat.com>
6712 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6713 IP_AGENT_EXPORT_FUNC.
6714 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6715 IP_AGENT_EXPORT_FUNC.
6716 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6717 (IP_AGENT_EXPORT): Delete.
6718 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6719 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6720 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6721 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6722 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6723 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6724 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6725 (traceframe_read_count, traceframe_write_count)
6726 (traceframes_created, trace_state_variables, get_raw_reg)
6727 (get_trace_state_variable_value, set_trace_state_variable_value)
6728 (ust_loaded, helper_thread_id, cmd_buf): Use
6729 IPA_SYM_EXPORTED_NAME.
6730 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6731 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6732 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6733 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6734 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6735 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6736 EXTERN_C_PUSH/EXTERN_C_POP.
6737 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6738 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6739 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6740 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6741 (traceframe_write_count, traceframe_read_count)
6742 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6743 (about_to_request_buffer_space, get_trace_state_variable_value)
6744 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6745 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6746 EXTERN_C_PUSH/EXTERN_C_POP.
6747 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6748 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6749 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6750 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6751 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6752 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6753 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6754 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6756 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6757 (IP_AGENT_EXPORT_VAR_DECL): Define.
6759 (gdb_agent_get_raw_reg): Declare.
6761 2015-02-27 Tom Tromey <tromey@redhat.com>
6762 Pedro Alves <palves@redhat.com>
6764 Rename symbols whose names are reserved C++ keywords throughout.
6766 2015-02-27 Pedro Alves <palves@redhat.com>
6768 * Makefile.in (COMPILER): New, get it from autoconf.
6769 (CXX): Get from autoconf instead.
6770 (COMPILE.pre): Use COMPILER.
6771 (CC-LD): Rename to ...
6772 (CC_LD): ... this. Use COMPILER.
6773 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6774 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6775 * acinclude.m4: Include build-with-cxx.m4.
6776 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6777 Disable -Werror by default if building in C++ mode.
6778 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6779 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6780 the C++ compiler. Save/restore CXXFLAGS too.
6781 * configure: Regenerate.
6783 2015-02-27 Pedro Alves <palves@redhat.com>
6785 * acinclude.m4: Include libiberty.m4.
6786 * configure.ac: Call libiberty_INIT.
6787 * config.in, configure: Regenerate.
6789 2015-02-26 Pedro Alves <palves@redhat.com>
6791 * linux-low.c (linux_wait_1): When incrementing the PC past a
6792 program breakpoint always use the_low_target.breakpoint_len as
6793 increment, rather than the maximum between that and
6794 the_low_target.decr_pc_after_break.
6796 2015-02-23 Pedro Alves <palves@redhat.com>
6798 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6799 thread was doing a step-over; always adjust the PC if
6800 we stepped over a permanent breakpoint.
6801 (linux_wait_1): If we stepped over breakpoint that was on top of a
6802 permanent breakpoint, manually advance the PC past it.
6804 2015-02-23 Pedro Alves <palves@redhat.com>
6806 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6808 (x86_fill_gregset, x86_store_gregset): Use it when handling
6811 2015-02-20 Pedro Alves <palves@redhat.com>
6813 * thread-db.c: Include "nat/linux-procfs.h".
6814 (thread_db_init): Skip listing new threads if the kernel supports
6815 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6817 2015-02-20 Pedro Alves <palves@redhat.com>
6819 * linux-low.c (status_pending_p_callback): Use ptid_match.
6821 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6823 PR breakpoints/16812
6824 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6825 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6826 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6828 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6830 PR breakpoints/15956
6831 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6833 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6835 * linux-low.c (linux_low_btrace_conf): Print size.
6836 * server.c (handle_btrace_conf_general_set): New.
6837 (hanle_general_set): Call handle_btrace_conf_general_set.
6838 (handle_query): Report Qbtrace-conf:bts:size as supported.
6840 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6842 * linux-low.c (linux_low_enable_btrace): Update parameters.
6843 (linux_low_btrace_conf): New.
6844 (linux_target_ops)<to_btrace_conf>: Initialize.
6845 * server.c (current_btrace_conf): New.
6846 (handle_btrace_enable): Rename to ...
6847 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
6848 to target_enable_btrace. Update comment. Update users.
6849 (handle_qxfer_btrace_conf): New.
6850 (qxfer_packets): Add btrace-conf entry.
6851 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6852 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6853 (target_ops)<read_btrace_conf>: New.
6854 (target_enable_btrace): Update parameters.
6855 (target_read_btrace_conf): New.
6857 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6859 * server.c (handle_btrace_general_set): Remove call to
6860 target_supports_btrace.
6861 (supported_btrace_packets): New.
6862 (handle_query): Call supported_btrace_packets.
6863 * target.h: include btrace-common.h.
6864 (btrace_target_info): Removed.
6865 (supports_btrace, target_supports_btrace): Update parameters.
6867 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6869 * Makefile.in (SFILES): Add common/btrace-common.c.
6870 (OBS): Add common/btrace-common.o.
6871 (btrace-common.o): Add build rules.
6872 * linux-low: Include btrace-common.h.
6873 (linux_low_read_btrace): Use struct btrace_data. Call
6874 btrace_data_init and btrace_data_fini.
6876 2015-02-06 Pedro Alves <palves@redhat.com>
6878 * thread-db.c (find_new_threads_callback): Add debug output.
6880 2015-02-04 Pedro Alves <palves@redhat.com>
6882 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6883 (resume_stopped_resumed_lwps): New function.
6884 (linux_wait_for_event_filtered): Use it.
6886 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6888 * Makefile.in (SFILES): Add linux-personality.c.
6889 (linux-personality.o): New rule.
6890 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6891 list of objects to be built.
6892 * linux-low.c: Include nat/linux-personality.h.
6893 (linux_create_inferior): Remove code to disable address space
6894 randomization (moved to ../nat/linux-personality.c). Create
6895 cleanup to disable address space randomization.
6897 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6899 * Makefile.in (posix-strerror.o): New rule.
6900 (mingw-strerror.o): Likewise.
6901 * configure: Regenerated.
6902 * configure.ac: Source file ../common/common.host. Initialize new
6903 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6905 2015-01-14 Yao Qi <yao@codesourcery.com>
6907 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6908 (ppc-linux.o): New rule.
6909 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6910 * configure.ac: AC_CHECK_FUNCS(getauxval).
6911 * config.in: Re-generated.
6912 * configure: Re-generated.
6913 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6914 ppc64_64bit_inferior_p
6916 2015-01-14 Yao Qi <yao@codesourcery.com>
6918 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6919 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6920 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6921 (PT_ORIG_R3, PT_TRAP): Likewise.
6922 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6923 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6924 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6926 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6928 * i387-fp.c (i387_cache_to_xsave): In look over
6929 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6930 zmmh_low_space field by use of zmmh_high_space.
6932 2015-01-09 Pedro Alves <palves@redhat.com>
6934 * linux-low.c (step_over_bkpt): Move higher up in the file.
6935 (handle_extended_wait): Don't store the stop_pc here.
6936 (get_stop_pc): Adjust comments and rename to ...
6937 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6938 stopped for a software breakpoint or hardware breakpoint.
6939 (thread_still_has_status_pending_p): New function.
6940 (status_pending_p_callback): Use
6941 thread_still_has_status_pending_p. If the event is no longer
6942 interesting, resume the LWP.
6943 (handle_tracepoints): Add assert.
6944 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6945 (wstatus_maybe_breakpoint): New function.
6946 (cancel_breakpoint): Delete function.
6947 (check_stopped_by_watchpoint): New function, factored out from
6948 linux_low_filter_event.
6949 (lp_status_maybe_breakpoint): Delete function.
6950 (linux_low_filter_event): Remove filter_ptid argument.
6951 Leave thread group exits pending here. Store the LWP's stop PC.
6952 Always leave events pending.
6953 (linux_wait_for_event_filtered): Pull all events out of the
6954 kernel, and leave them all pending.
6955 (count_events_callback, select_event_lwp_callback): Consider all
6957 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6958 (select_event_lwp): Only give preference to the stepping LWP in
6959 all-stop mode. Adjust comments.
6960 (ignore_event): New function.
6961 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6962 references to cancel_breakpoints. Adjust to renames. Also give
6963 equal priority to all LWPs that have had events in non-stop mode.
6964 If reporting a software breakpoint event, unadjust the LWP's PC.
6965 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6966 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6968 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6969 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6970 (linux_stopped_by_watchpoint): Adjust.
6971 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6972 * linux-low.h (enum lwp_stop_reason): New.
6973 (struct lwp_info) <stop_pc>: Adjust comment.
6974 <stopped_by_watchpoint>: Delete field.
6975 <stop_reason>: New field.
6976 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6977 * mem-break.c (software_breakpoint_inserted_here)
6978 (hardware_breakpoint_inserted_here): New function.
6979 * mem-break.h (software_breakpoint_inserted_here)
6980 (hardware_breakpoint_inserted_here): Declare.
6981 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6982 (cancel_breakpoints): Delete.
6983 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6984 (upload_fast_traceframes): Remove references to
6987 2015-01-09 Pedro Alves <palves@redhat.com>
6989 * thread-db.c (find_new_threads_callback): Ignore thread if the
6990 kernel thread ID is -1.
6992 2015-01-09 Pedro Alves <palves@redhat.com>
6994 * linux-low.c (linux_attach_fail_reason_string): Move to
6995 nat/linux-ptrace.c, and rename.
6996 (linux_attach_lwp): Update comment.
6997 (attach_proc_task_lwp_callback): New function.
6998 (linux_attach): Adjust to rename and use
6999 linux_proc_attach_tgid_threads.
7000 (linux_attach_fail_reason_string): Delete declaration.
7002 2015-01-01 Joel Brobecker <brobecker@adacore.com>
7004 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
7005 * server.c (gdbserver_version): Likewise.
7007 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
7009 * remote-utils.c: Include ctype.h.
7010 (input_interrupt): Explicitly handle the case when the char
7011 received is the NUL byte. Improve the printing of non-ASCII
7014 2014-12-16 Joel Brobecker <brobecker@adacore.com>
7016 * linux-low.c (linux_low_filter_event): Update call to
7017 linux_enable_event_reporting following the addition of
7018 a new parameter to that function.
7020 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
7023 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
7024 (AARCH64_FPCR_REGNO): Likewise.
7025 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
7026 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
7027 (aarch64_store_fpregset): Likewise.
7029 2014-12-15 Joel Brobecker <brobecker@adacore.com>
7031 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
7032 Remove FIXME comment about assumption about N.
7034 2014-12-13 Joel Brobecker <brobecker@adacore.com>
7036 * configure.ac: If large-file support is disabled in GDBserver,
7037 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
7038 * configure: Regenerate.
7040 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7042 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
7043 warning upon ENODATA from ptrace.
7044 * linux-s390-low.c (s390_store_tdb): New.
7045 (s390_regsets): Add regset for NT_S390_TDB.
7047 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7049 * linux-low.c (regsets_store_inferior_registers): Skip regsets
7050 without a fill_function.
7051 * linux-s390-low.c (s390_fill_last_break): Remove.
7052 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
7053 (s390_arch_setup): Use regset's size instead of fill_function for
7056 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7058 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
7059 the regset's store function when ptrace returned an error.
7060 * regcache.c (get_thread_regcache): Invalidate register cache
7061 before fetching inferior's registers.
7063 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
7065 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
7066 while-loop as for-loop.
7067 (regsets_store_inferior_registers): Likewise.
7069 2014-11-28 Yao Qi <yao@codesourcery.com>
7071 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7072 * config.in, configure: Re-generate.
7073 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7076 2014-11-21 Yao Qi <yao@codesourcery.com>
7078 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7079 (AC_CHECK_HEADERS): Remove malloc.h.
7080 * configure: Re-generated.
7081 * config.in: Re-generated.
7082 * server.h: Don't include alloca.h and malloc.h.
7083 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7084 Don't include malloc.h.
7086 2014-11-17 Joel Brobecker <brobecker@adacore.com>
7088 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7089 corresponding ERRNO check in same block.
7091 2014-11-12 Pedro Alves <palves@redhat.com>
7093 * server.c (cont_thread): Update comment.
7094 (start_inferior, attach_inferior): No longer clear cont_thread.
7095 (handle_v_cont): No longer set cont_thread.
7096 (captured_main): Clear cont_thread each time a GDB connects.
7098 2014-11-12 Pedro Alves <palves@redhat.com>
7100 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7101 thread, and don't resume all threads if the Hc thread has exited.
7103 2014-11-12 Pedro Alves <palves@redhat.com>
7105 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7106 the process group instead of to a specific LWP.
7108 2014-10-15 Pedro Alves <palves@redhat.com>
7111 * win32-arm-low.c (arm_set_thread_context): Remove current_event
7113 (arm_set_thread_context): Delete.
7114 (the_low_target): Adjust.
7115 * win32-i386-low.c (debug_registers_changed)
7116 (debug_registers_used): Delete.
7117 (update_debug_registers_callback): New function.
7118 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7119 needing to update their debug registers.
7120 (win32_get_current_dr): New function.
7121 (x86_dr_low_get_addr, x86_dr_low_get_control)
7122 (x86_dr_low_get_status): Fetch the debug register from the thread
7124 (i386_initial_stuff): Adjust.
7125 (i386_get_thread_context): Remove current_event parameter. Don't
7126 clear debug_registers_changed nor copy DR values to
7128 (i386_set_thread_context): Delete.
7129 (i386_prepare_to_resume): New function.
7130 (i386_thread_added): Mark the thread as needing to update irs
7132 (the_low_target): Remove i386_set_thread_context and install
7133 i386_prepare_to_resume.
7134 * win32-low.c (win32_get_thread_context): Adjust.
7135 (win32_set_thread_context): Use SetThreadContext
7137 (win32_prepare_to_resume): New function.
7138 (win32_require_context): New function, factored out from ...
7139 (thread_rec): ... this.
7140 (continue_one_thread): Call win32_prepare_to_resume on each thread
7141 we're about to continue.
7142 (win32_resume): Call win32_prepare_to_resume on the event thread.
7143 * win32-low.h (struct win32_thread_info)
7144 <debug_registers_changed>: New field.
7145 (struct win32_target_ops): Change prototype of set_thread_context,
7146 delete set_thread_context and add prepare_to_resume.
7147 (win32_require_context): New declaration.
7149 2014-10-08 Gary Benson <gbenson@redhat.com>
7151 * server.h: Do not include common-exceptions.h.
7153 2014-10-08 Gary Benson <gbenson@redhat.com>
7155 * server.h: Do not include cleanups.h.
7157 2014-09-30 James Hogan <james.hogan@imgtec.com>
7159 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7162 2014-09-23 Yao Qi <yao@codesourcery.com>
7164 * linux-low.c (lp_status_maybe_breakpoint): New function.
7165 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7166 (count_events_callback): Likewise.
7167 (select_event_lwp_callback): Likewise.
7168 (cancel_breakpoints_callback): Likewise.
7170 2014-09-19 Don Breazeal <donb@codesourcery.com>
7172 * linux-low.c (handle_extended_wait): Call
7173 linux_ptrace_get_extended_event.
7174 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7175 linux_is_extended_waitstatus.
7177 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7179 * Makefile.in (CPPFLAGS): Define.
7180 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7181 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7183 2014-09-16 Gary Benson <gbenson@redhat.com>
7185 * inferiors.h (current_inferior): Renamed as...
7186 (current_thread): New variable. All uses updated.
7187 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7188 (maybe_move_out_of_jump_pad): Likewise.
7189 (cancel_breakpoint): Likewise.
7190 (linux_low_filter_event): Likewise.
7191 (wait_for_sigstop): Likewise.
7192 (linux_resume_one_lwp): Likewise.
7193 (need_step_over_p): Likewise.
7194 (start_step_over): Likewise.
7195 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7196 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7197 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7198 and save_inferior as saved_thread.
7199 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7201 (regcache_invalidate_thread): Likewise.
7202 * remote-utils.c (prepare_resume_reply): Likewise.
7203 * thread-db.c (thread_db_get_tls_address): Likewise.
7204 (disable_thread_event_reporting): Likewise.
7205 (remove_thread_event_breakpoints): Likewise.
7206 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7208 * target.h (set_desired_inferior): Renamed as...
7209 (set_desired_thread): New declaration. All uses updated.
7210 * server.c (myresume): Updated comment to reference thread instead
7212 (handle_serial_event): Likewise.
7213 (handle_target_event): Likewise.
7215 2014-09-12 Tom Tromey <tromey@redhat.com>
7216 Gary Benson <gbenson@redhat.com>
7218 * regcache.h: Include common-regcache.h.
7219 (regcache_read_pc): Don't declare.
7220 * regcache.c (get_thread_regcache_for_ptid): New function.
7222 2014-09-11 Tom Tromey <tromey@redhat.com>
7223 Gary Benson <gbenson@redhat.com>
7225 * symbol.c: New file.
7226 * Makefile.in (SFILES): Add symbol.c.
7227 (OBS): Add symbol.o.
7229 2014-09-11 Gary Benson <gbenson@redhat.com>
7231 * target.c (target_stop_ptid, target_continue_ptid): New
7234 2014-09-11 Tom Tromey <tromey@redhat.com>
7235 Gary Benson <gbenson@redhat.com>
7237 * target.h: Include target/target.h.
7238 * target.c (target_read_memory, target_read_uint32)
7239 (target_write_memory): New functions.
7241 2014-09-11 Gary Benson <gbenson@redhat.com>
7243 * server.h (debug_hw_points): Don't declare.
7244 * server.c (debug_hw_points): Don't define. Replace all uses
7245 with show_debug_regs.
7246 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7247 all uses with show_debug_regs.
7249 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7251 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7252 endianness into account.
7253 (ppc_supply_ptrace_register): Likewise.
7255 2014-09-03 James Hogan <james.hogan@imgtec.com>
7257 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7258 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7260 2014-09-03 Gary Benson <gbenson@redhat.com>
7262 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7263 ALL_DEBUG_ADDRESS_REGISTERS.
7265 2014-09-02 Gary Benson <gbenson@redhat.com>
7267 * i386-low.h: Renamed as...
7268 * x86-low.h: New file. All type, function and variable name
7269 prefixes changed from "i386_" to "x86_". All references updated.
7270 * i386-low.c: Renamed as...
7271 * x86-low.c: New file. All type, function and variable name
7272 prefixes changed from "i386_" to "x86_". All references updated.
7274 2014-09-02 Gary Benson <gbenson@redhat.com>
7276 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7277 (x86_linux_new_thread): Likewise.
7279 2014-08-29 Gary Benson <gbenson@redhat.com>
7281 * server.h (setjmp.h): Do not include.
7282 (toplevel): Do not declare.
7283 (common-exceptions.h): Include.
7284 (cleanups.h): Likewise.
7285 * server.c (toplevel): Do not define.
7286 (exit_code): New static global.
7287 (detach_or_kill_for_exit_cleanup): New function.
7288 (main): New function. Original main renamed to...
7289 (captured_main): New function.
7290 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7292 2014-08-29 Gary Benson <gbenson@redhat.com>
7294 * Makefile.in (SFILES): Add common/common-exceptions.c.
7295 (OBS): Add common-exceptions.o.
7296 (common-exceptions.o): New rule.
7297 * utils.c (prepare_to_throw_exception): New function.
7299 2014-08-29 Gary Benson <gbenson@redhat.com>
7301 * config.in: Regenerate.
7302 * configure: Likewise.
7304 2014-08-29 Gary Benson <gbenson@redhat.com>
7306 * Makefile.in (SFILES): Add common/cleanups.c.
7308 (cleanups.o): New rule.
7310 2014-08-29 Gary Benson <gbenson@redhat.com>
7312 * utils.c (internal_vwarning): New function.
7314 2014-08-28 Gary Benson <gbenson@redhat.com>
7316 * utils.h (fatal): Remove declaration.
7317 * utils.c (fatal): Remove function.
7319 2014-08-28 Gary Benson <gbenson@redhat.com>
7321 * tracepoint.c (gdb_agent_init): Replace fatal with
7323 (initialize_tracepoint): Likewise.
7325 2014-08-28 Gary Benson <gbenson@redhat.com>
7327 * remote-utils.c (remote_prepare): Replace fatal with error.
7329 2014-08-28 Gary Benson <gbenson@redhat.com>
7331 * linux-low.c (linux_async): Replace fatal with warning.
7333 (linux_start_non_stop): Return -1 if linux_async failed.
7335 2014-08-28 Gary Benson <gbenson@redhat.com>
7337 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7339 (i386_dr_low_get_addr): Remove vague comment.
7340 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7343 2014-08-28 Gary Benson <gbenson@redhat.com>
7345 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7346 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7348 (linux_resume_one_lwp): Likewise.
7349 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7351 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7352 with internal_error.
7353 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7354 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7355 (find_register_by_name): Replace fatal with internal_error.
7356 (find_regno): Likewise.
7357 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7358 * thread-db.c (thread_db_create_event): Likewise.
7359 (thread_db_load_search): Likewise.
7360 (try_thread_db_load_1): Likewise.
7361 * tracepoint.c (get_jump_space_head): Replace fatal with
7363 (claim_trampoline_space): Likewise.
7364 (have_fast_tracepoint_trampoline_buffer): Likewise.
7365 (cmd_qtstart): Likewise.
7366 (stop_tracing): Likewise.
7367 (fast_tracepoint_collecting): Likewise.
7368 (target_malloc): Likewise.
7369 (download_tracepoint): Likewise.
7370 (download_trace_state_variables): Replace check with gdb_assert.
7371 (upload_fast_traceframes): Replace fatal with internal_error.
7373 2014-08-19 Tom Tromey <tromey@redhat.com>
7374 Gary Benson <gbenson@redhat.com>
7376 * Makefile.in (SFILES): Add common/common-debug.c.
7377 (OBS): Add common-debug.o.
7378 (common-debug.o): New rule.
7379 * debug.h (debug_printf): Don't declare.
7380 * debug.c (debug_printf): Renamed and rewritten as...
7381 (debug_vprintf): New function.
7383 2014-08-19 Gary Benson <gbenson@redhat.com>
7385 * utils.h: Do not include print-utils.h.
7387 2014-08-19 Tom Tromey <tromey@redhat.com>
7388 Gary Benson <gbenson@redhat.com>
7390 * server.h: Add static assertion.
7391 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7393 2014-08-19 Tom Tromey <tromey@redhat.com>
7394 Gary Benson <gbenson@redhat.com>
7396 * Makefile.in (SFILES): Add common/errors.c.
7397 (OBS): Add errors.o.
7398 (IPA_OBS): Add errors-ipa.o.
7399 (errors.o): New rule.
7400 (errors-ipa.o): Likewise.
7401 * utils.h (perror_with_name, error, warning): Don't declare.
7402 * utils.c (warning): Renamed and rewritten as...
7403 (vwarning): New function.
7404 (error): Renamed and rewritten as...
7405 (verror): New function.
7406 (internal_error): Renamed and rewritten as...
7407 (internal_verror): New function.
7409 2014-08-07 Gary Benson <gbenson@redhat.com>
7411 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7412 * configure: Regenerate.
7413 * config.in: Likewise.
7414 * server.h: Do not include errno.h.
7415 * event-loop.c: Likewise.
7416 * hostio-errno.c: Likewise.
7417 * linux-low.c: Likewise.
7418 * remote-utils.c: Likewise.
7419 * spu-low.c: Likewise.
7420 * utils.c: Likewise.
7421 * gdbreplay.c: Unconditionally include errno.h.
7423 2014-08-07 Gary Benson <gbenson@redhat.com>
7425 * server.h: Do not include string.h.
7426 * event-loop.c: Likewise.
7427 * linux-low.c: Likewise.
7428 * regcache.c: Likewise.
7429 * remote-utils.c: Likewise.
7430 * spu-low.c: Likewise.
7431 * utils.c: Likewise.
7433 2014-08-07 Gary Benson <gbenson@redhat.com>
7435 * server.h: Do not include gdb_assert.h.
7437 2014-08-07 Gary Benson <gbenson@redhat.com>
7439 * server.h: Do not include common-utils.h.
7441 2014-08-07 Gary Benson <gbenson@redhat.com>
7443 * server.h: Do not include ptid.h.
7444 * notif.h: Likewise.
7446 2014-08-07 Gary Benson <gbenson@redhat.com>
7448 * server.h: Do not include gdb_locale.h.
7450 2014-08-07 Gary Benson <gbenson@redhat.com>
7452 * server.h: Do not include gdb/signals.h.
7453 * win32-low.c: Likewise.
7455 2014-08-07 Gary Benson <gbenson@redhat.com>
7457 * server.h: Do not include pathmax.h.
7459 2014-08-07 Gary Benson <gbenson@redhat.com>
7461 * server.h: Do not include libiberty.h.
7462 * linux-bfin-low.c: Likewise.
7464 2014-08-07 Gary Benson <gbenson@redhat.com>
7466 * server.h: Do not include ansidecl.h.
7468 2014-08-07 Gary Benson <gbenson@redhat.com>
7470 * linux-x86-low.c: Do not include stddef.h.
7471 * lynx-ppc-low.c: Likewise.
7472 * tracepoint.c: Likewise.
7474 2014-08-07 Gary Benson <gbenson@redhat.com>
7476 * server.h: Do not include stdarg.h.
7477 * nto-low.c: Likewise.
7479 2014-08-07 Gary Benson <gbenson@redhat.com>
7481 * server.h: Do not include stdlib.h.
7482 * inferiors.c: Likewise.
7483 * linux-low.c: Likewise.
7484 * regcache.c: Likewise.
7485 * spu-low.c: Likewise.
7486 * tracepoint.c: Likewise.
7487 * utils.c: Likewise.
7489 2014-08-07 Gary Benson <gbenson@redhat.com>
7491 * server.h: Do not include stdio.h.
7492 * linux-low.c: Likewise.
7493 * remote-utils.c: Likewise.
7494 * spu-low.c: Likewise.
7495 * utils.c: Likewise.
7496 * wincecompat.c: Likewise.
7498 2014-08-06 Gary Benson <gbenson@redhat.com>
7500 * regcache.c (init_register_cache): Move conditionals inside if.
7502 2014-08-06 Gary Benson <gbenson@redhat.com>
7504 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7506 2014-07-31 Gary Benson <gbenson@redhat.com>
7508 * ax.h: Do not include server.h.
7509 * gdbthread.h: Likewise.
7510 * lynx-low.h: Likewise.
7511 * notif.h: Likewise.
7513 2014-07-30 Gary Benson <gbenson@redhat.com>
7515 * server.h: Include common-defs.h.
7516 Do not include config.h or build-gnulib-gdbserver/config.h.
7518 2014-07-30 Gary Benson <gbenson@redhat.com>
7520 * hostio-errno.c: Move server.h to top of includes list.
7521 * inferiors.c: Likewise.
7522 * linux-x86-low.c: Likewise.
7523 * notif.c: Include server.h.
7525 2014-07-24 Tom Tromey <tromey@redhat.com>
7526 Gary Benson <gbenson@redhat.com>
7528 * server.h (CORE_ADDR): Now unsigned.
7530 2014-07-16 Pedro Alves <palves@redhat.com>
7532 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7534 2014-07-15 Pedro Alves <palves@redhat.com>
7536 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7539 2014-07-11 Pedro Alves <palves@redhat.com>
7541 * linux-low.c (kill_wait_lwp): New function, based on
7542 kill_one_lwp_callback, but use my_waitpid directly.
7543 (kill_one_lwp_callback, linux_kill): Use it.
7545 2014-06-23 Pedro Alves <palves@redhat.com>
7547 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7548 before setting DR0..DR3.
7550 2014-06-20 Gary Benson <gbenson@redhat.com>
7552 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7553 * configure: Regenerated.
7554 * config.in: Likewise.
7556 2014-06-20 Gary Benson <gbenson@redhat.com>
7558 * Makefile.in (SFILES): Update locations for files moved
7560 (object file files): Reordered.
7562 2014-06-20 Gary Benson <gbenson@redhat.com>
7564 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7565 (i386_dr_low_set_addr): Likewise.
7566 (i386_dr_low_get_addr): Likewise.
7567 (i386_dr_low_can_set_control): Likewise.
7568 (i386_dr_low_set_control): Likewise.
7569 (i386_dr_low_get_control): Likewise.
7570 (i386_dr_low_get_status): Likewise.
7571 (i386_get_debug_register_length): Likewise.
7572 * linux-x86-low.c (i386_dr_low_set_addr):
7573 Changed signature. Made static.
7574 (i386_dr_low_get_addr): Likewise.
7575 (i386_dr_low_set_control): Likewise.
7576 (i386_dr_low_get_control): Likewise.
7577 (i386_dr_low_get_status): Likewise.
7578 (i386_dr_low): New global variable.
7579 * win32-i386-low.c (i386_dr_low_set_addr):
7580 Changed signature. Made static.
7581 (i386_dr_low_get_addr): Likewise.
7582 (i386_dr_low_set_control): Likewise.
7583 (i386_dr_low_get_control): Likewise.
7584 (i386_dr_low_get_status): Likewise.
7585 (i386_dr_low): New global variable.
7587 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7589 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7590 * Makefile.in (AR, AR_FLAGS): Define.
7591 * configure: Regenerate.
7593 2014-06-19 Gary Benson <gbenson@redhat.com>
7595 * Makefile.in (i386-dregs.o): New rule.
7596 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7597 * i386-low.c (target.h): Remove include.
7598 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7599 (DR_CONTROL_SHIFT): Likewise.
7600 (DR_CONTROL_SIZE): Likewise.
7601 (DR_RW_EXECUTE): Likewise.
7602 (DR_RW_WRITE): Likewise.
7603 (DR_RW_READ): Likewise.
7604 (DR_RW_IORW): Likewise.
7605 (DR_LEN_1): Likewise.
7606 (DR_LEN_2): Likewise.
7607 (DR_LEN_4): Likewise.
7608 (DR_LEN_8): Likewise.
7609 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7610 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7611 (DR_ENABLE_SIZE): Likewise.
7612 (DR_LOCAL_SLOWDOWN): Likewise.
7613 (DR_GLOBAL_SLOWDOWN): Likewise.
7614 (DR_CONTROL_RESERVED): Likewise.
7615 (I386_DR_CONTROL_MASK): Likewise.
7616 (I386_DR_VACANT): Likewise.
7617 (I386_DR_LOCAL_ENABLE): Likewise.
7618 (I386_DR_GLOBAL_ENABLE): Likewise.
7619 (I386_DR_DISABLE): Likewise.
7620 (I386_DR_SET_RW_LEN): Likewise.
7621 (I386_DR_GET_RW_LEN): Likewise.
7622 (I386_DR_WATCH_HIT): Likewise.
7623 (i386_wp_op_t): Likewise.
7624 (i386_show_dr): Likewise.
7625 (i386_length_and_rw_bits): Likewise.
7626 (i386_insert_aligned_watchpoint): Likewise.
7627 (i386_remove_aligned_watchpoint): Likewise.
7628 (i386_handle_nonaligned_watchpoint): Likewise.
7629 i386_update_inferior_debug_regs(): Likewise.
7630 (i386_dr_insert_watchpoint): Likewise.
7631 (i386_dr_remove_watchpoint): Likewise.
7632 (i386_dr_region_ok_for_watchpoint): Likewise.
7633 (i386_dr_stopped_data_address): Likewise.
7634 (i386_dr_stopped_by_watchpoint): Likewise.
7636 2014-06-19 Gary Benson <gbenson@redhat.com>
7638 * i386-low.c (i386_dr_show): Renamed to
7639 i386_show_dr and made static. All uses updated.
7640 (i386_dr_length_and_rw_bits): Renamed to
7641 i386_length_and_rw_bits and made static.
7643 (i386_dr_insert_aligned_watchpoint): Renamed to
7644 i386_insert_aligned_watchpoint and made static.
7646 (i386_dr_remove_aligned_watchpoint): Renamed to
7647 i386_remove_aligned_watchpoint and made static.
7649 (i386_dr_update_inferior_debug_regs): Renamed to
7650 i386_update_inferior_debug_regs and made static.
7653 2014-06-18 Gary Benson <gbenson@redhat.com>
7655 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7656 (i386_dr_low_can_set_control): Likewise.
7657 (i386_get_debug_register_length): Likewise.
7658 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7659 (i386_dr_low_can_set_control): Likewise.
7660 (i386_get_debug_register_length): Likewise.
7662 2014-06-17 Gary Benson <gbenson@redhat.com>
7664 * i386-low.h (i386-dregs.h): New include.
7665 (DR_FIRSTADDR): Now in i386-dregs.h.
7666 (DR_LASTADDR): Likewise.
7667 (DR_NADDR): Likewise.
7668 (DR_STATUS): Likewise.
7669 (DR_CONTROL): Likewise.
7670 (i386_debug_reg_state): Likewise.
7671 (i386_dr_insert_watchpoint): Likewise.
7672 (i386_dr_remove_watchpoint): Likewise.
7673 (i386_dr_region_ok_for_watchpoint): Likewise.
7674 (i386_dr_stopped_data_address): Likewise.
7675 (i386_dr_stopped_by_watchpoint): Likewise.
7676 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7678 2014-06-18 Gary Benson <gbenson@redhat.com>
7680 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7681 i386_dr_insert_watchpoint.
7682 (i386_low_remove_watchpoint): Renamed to
7683 i386_dr_remove_watchpoint.
7684 (i386_low_region_ok_for_watchpoint): Renamed to
7685 i386_dr_region_ok_for_watchpoint.
7686 (i386_low_stopped_data_address): Renamed to
7687 i386_dr_stopped_data_address.
7688 (i386_low_stopped_by_watchpoint): Renamed to
7689 i386_dr_stopped_by_watchpoint.
7690 * i386-low.c (i386_show_dr): Renamed to
7691 i386_dr_show and made nonstatic. All uses updated.
7692 (i386_length_and_rw_bits): Renamed to
7693 i386_dr_length_and_rw_bits and made nonstatic.
7695 (i386_insert_aligned_watchpoint): Renamed to
7696 i386_dr_insert_aligned_watchpoint and made nonstatic.
7698 (i386_remove_aligned_watchpoint): Renamed to
7699 i386_dr_remove_aligned_watchpoint and made nonstatic.
7701 (i386_update_inferior_debug_regs): Renamed to
7702 i386_dr_update_inferior_debug_regs and made nonstatic.
7704 (i386_low_insert_watchpoint): Renamed to
7705 i386_dr_insert_watchpoint. All uses updated.
7706 (i386_low_remove_watchpoint): Renamed to
7707 i386_dr_remove_watchpoint. All uses updated.
7708 (i386_low_region_ok_for_watchpoint): Renamed to
7709 i386_dr_region_ok_for_watchpoint. All uses updated.
7710 (i386_low_stopped_data_address): Renamed to
7711 i386_dr_stopped_data_address. All uses updated.
7712 (i386_low_stopped_by_watchpoint): Renamed to
7713 i386_dr_stopped_by_watchpoint. All uses updated.
7715 2014-06-18 Gary Benson <gbenson@redhat.com>
7717 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7718 (i386_dr_low_can_set_control): Likewise.
7719 (i386_insert_aligned_watchpoint): New check.
7721 2014-06-18 Gary Benson <gbenson@redhat.com>
7723 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7726 2014-06-18 Gary Benson <gbenson@redhat.com>
7728 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7729 instead of fatal and error.
7730 (i386_handle_nonaligned_watchpoint): Likewise.
7732 2014-06-18 Gary Benson <gbenson@redhat.com>
7734 * i386-low.c (i386_get_debug_register_length): New macro.
7735 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7736 (i386_show_dr): Use debug_printf instead of fprintf. Use
7737 phex to format values.
7739 2014-06-18 Gary Benson <gbenson@redhat.com>
7741 * i386-low.h: Comment changes.
7742 * i386-low.c: Likewise.
7744 2014-06-18 Gary Benson <gbenson@redhat.com>
7746 * i386-low.c: Whitespace changes.
7748 2014-06-12 Tom Tromey <tromey@redhat.com>
7750 * utils.c (freeargv): Remove.
7752 2014-06-12 Tom Tromey <tromey@redhat.com>
7754 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7755 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7756 (parse_debug_format_options): Likewise.
7757 (gdbserver_usage): Likewise.
7758 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7759 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7760 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7762 ($(LIBGNU)): Depend on libiberty.
7763 (all-lib): Recurse into all subdirs.
7764 (install-only): Invoke "install" target in subdirs.
7765 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7767 * configure: Rebuild.
7768 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7769 for vasprintf, vsnprintf, or gettimeofday.
7770 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7773 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7775 * development.sh: Delete.
7776 * Makefile.in (config.status): Adjust dependency on development.sh.
7777 * configure.ac: Adjust development.sh source call.
7778 * configure: Regenerate.
7780 2014-06-02 Pedro Alves <palves@redhat.com>
7782 * ax.c (gdb_free_agent_expr): New function.
7783 * ax.h (gdb_free_agent_expr): New declaration.
7784 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7786 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7788 (clear_breakpoint_conditions_and_commands): New function.
7789 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7790 (clear_breakpoint_conditions_and_commands): New declaration.
7792 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7794 * linux-aarch64-low.c (asm/ptrace.h): Include.
7796 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7798 Fix TLS access for -static -pthread.
7799 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7800 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7801 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7803 2014-05-20 Pedro Alves <palves@redhat.com>
7805 * linux-aarch64-low.c (aarch64_insert_point)
7806 (aarch64_remove_point): No longer check whether the type is
7807 supported here. Adjust to new interface.
7808 (the_low_target): Install aarch64_supports_z_point_type as
7809 supports_z_point_type method.
7810 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7811 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7812 instead of a Z packet char. Adjust.
7813 (arm_supports_z_point_type): New function.
7814 (arm_insert_point, arm_remove_point): Adjust to new interface.
7815 (the_low_target): Install arm_supports_z_point_type.
7816 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7817 (cris_insert_point, cris_remove_point): Adjust to new interface.
7818 Don't check whether the type is supported here.
7819 (the_low_target): Install cris_supports_z_point_type.
7820 * linux-low.c (linux_supports_z_point_type): New function.
7821 (linux_insert_point, linux_remove_point): Adjust to new interface.
7822 * linux-low.h (struct linux_target_ops) <insert_point,
7823 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7824 raw_breakpoint pointer parameter.
7825 <supports_z_point_type>: New method.
7826 * linux-mips-low.c (mips_supports_z_point_type): New function.
7827 (mips_insert_point, mips_remove_point): Adjust to new interface.
7828 Use mips_supports_z_point_type.
7829 (the_low_target): Install mips_supports_z_point_type.
7830 * linux-ppc-low.c (the_low_target): Install NULL as
7831 supports_z_point_type method.
7832 * linux-s390-low.c (the_low_target): Install NULL as
7833 supports_z_point_type method.
7834 * linux-sparc-low.c (the_low_target): Install NULL as
7835 supports_z_point_type method.
7836 * linux-x86-low.c (x86_supports_z_point_type): New function.
7837 (x86_insert_point): Adjust to new insert_point interface. Use
7838 insert_memory_breakpoint. Adjust to new
7839 i386_low_insert_watchpoint interface.
7840 (x86_remove_point): Adjust to remove_point interface. Use
7841 remove_memory_breakpoint. Adjust to new
7842 i386_low_remove_watchpoint interface.
7843 (the_low_target): Install x86_supports_z_point_type.
7844 * lynx-low.c (lynx_target_ops): Install NULL as
7845 supports_z_point_type callback.
7846 * nto-low.c (nto_supports_z_point_type): New.
7847 (nto_insert_point, nto_remove_point): Adjust to new interface.
7848 (nto_target_ops): Install nto_supports_z_point_type.
7849 * mem-break.c: Adjust intro comment.
7850 (struct raw_breakpoint) <raw_type, size>: New fields.
7851 <inserted>: Update comment.
7852 <shlib_disabled>: Delete field.
7853 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7854 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7855 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7856 (raw_bkpt_type_to_target_hw_bp_type): New function.
7857 (find_enabled_raw_code_breakpoint_at): New function.
7858 (find_raw_breakpoint_at): New type and size parameters. Use them.
7859 (insert_memory_breakpoint): New function, based off
7860 set_raw_breakpoint_at.
7861 (remove_memory_breakpoint): New function.
7862 (set_raw_breakpoint_at): Reimplement.
7863 (set_breakpoint): New, based on set_breakpoint_at.
7864 (set_breakpoint_at): Reimplement.
7865 (delete_raw_breakpoint): Go through the_target->remove_point
7866 instead of assuming memory breakpoints.
7867 (find_gdb_breakpoint_at): Delete.
7868 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7869 (find_gdb_breakpoint): New function.
7870 (set_gdb_breakpoint_at): Delete.
7871 (z_type_supported): New function.
7872 (set_gdb_breakpoint_1): New function, loosely based off
7873 set_gdb_breakpoint_at.
7874 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7875 (delete_gdb_breakpoint_at): Delete.
7876 (delete_gdb_breakpoint_1): New function, loosely based off
7877 delete_gdb_breakpoint_at.
7878 (delete_gdb_breakpoint): New function.
7879 (clear_gdb_breakpoint_conditions): Rename to ...
7880 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7882 (add_condition_to_breakpoint): Make static.
7883 (add_breakpoint_condition): Take a struct breakpoint pointer
7884 instead of an address. Adjust.
7885 (gdb_condition_true_at_breakpoint): Rename to ...
7886 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7888 (gdb_condition_true_at_breakpoint): Reimplement.
7889 (add_breakpoint_commands): Take a struct breakpoint pointer
7890 instead of an address. Adjust.
7891 (gdb_no_commands_at_breakpoint): Rename to ...
7892 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7893 parameter. Return true if no breakpoint was found. Change debug
7895 (gdb_no_commands_at_breakpoint): Reimplement.
7896 (run_breakpoint_commands): Rename to ...
7897 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7898 and change return type to boolean.
7899 (run_breakpoint_commands): New function.
7900 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7901 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7902 breakpoint. Go through the_target->remove_point instead of
7903 assuming memory breakpoint.
7904 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7905 software and hardware breakpoints.
7906 (reinsert_raw_breakpoint): Go through the_target->insert_point
7907 instead of assuming memory breakpoint.
7908 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7909 software and hardware breakpoints.
7910 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7911 Check both software and hardware breakpoints.
7912 (validate_inserted_breakpoint): Assert the breakpoint is a
7913 software breakpoint. Set the inserted flag to -1 instead of
7914 setting shlib_disabled.
7915 (delete_disabled_breakpoints): Adjust.
7916 (validate_breakpoints): Only validate software breakpoints.
7917 Adjust to inserted flag change.
7918 (check_mem_read, check_mem_write): Skip breakpoint types other
7919 than software breakpoints. Adjust to inserted flag change.
7920 * mem-break.h (enum raw_bkpt_type): New enum.
7921 (raw_breakpoint, struct process_info): Forward declare.
7922 (Z_packet_to_target_hw_bp_type): Delete declaration.
7923 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7924 (set_gdb_breakpoint, delete_gdb_breakpoint)
7925 (clear_breakpoint_conditions): New declarations.
7926 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7927 (breakpoint_inserted_here): Update comment.
7928 (add_breakpoint_condition, add_breakpoint_commands): Replace
7929 address parameter with a breakpoint pointer parameter.
7930 (gdb_breakpoint_here): Update comment.
7931 (delete_gdb_breakpoint_at): Delete.
7932 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7933 * server.c (process_point_options): Take a struct breakpoint
7934 pointer instead of an address. Adjust.
7935 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7936 delete_gdb_breakpoint.
7937 * spu-low.c (spu_target_ops): Install NULL as
7938 supports_z_point_type method.
7939 * target.h: Include mem-break.h.
7940 (struct target_ops) <prepare_to_access_memory>: Update comment.
7941 <supports_z_point_type>: New field.
7942 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7943 instead of a char. Also take a raw breakpoint pointer.
7944 * win32-arm-low.c (the_low_target): Install NULL as
7945 supports_z_point_type.
7946 * win32-i386-low.c (i386_supports_z_point_type): New function.
7947 (i386_insert_point, i386_remove_point): Adjust to new interface.
7948 (the_low_target): Install i386_supports_z_point_type.
7949 * win32-low.c (win32_supports_z_point_type): New function.
7950 (win32_insert_point, win32_remove_point): Adjust to new interface.
7951 (win32_target_ops): Install win32_supports_z_point_type.
7952 * win32-low.h (struct win32_target_ops):
7953 <supports_z_point_type>: New method.
7954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7955 instead of a char. Also take a raw breakpoint pointer.
7957 2014-05-20 Pedro Alves <palves@redhat.com>
7959 * mem-break.h: Include break-common.h.
7960 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7961 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7962 (Z_packet_to_target_hw_bp_type): New declaration.
7963 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7964 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7965 (Z_PACKET_ACCESS_WP): Delete macros.
7966 (Z_packet_to_hw_type): Delete function.
7967 * i386-low.h: Don't include break-common.h here.
7968 (Z_packet_to_hw_type): Delete declaration.
7969 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7970 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7971 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7972 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7973 * linux-aarch64-low.c: Don't include break-common.h here.
7974 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7975 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7976 (Z_packet_to_target_hw_bp_type): Delete function.
7977 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7979 (mips_insert_point, mips_remove_point): Use
7980 Z_packet_to_target_hw_bp_type.
7982 2014-05-20 Pedro Alves <palves@redhat.com>
7984 * linux-aarch64-low.c: Include break-common.h.
7985 (enum target_point_type): Delete.
7986 (Z_packet_to_point_type): Rename to ...
7987 (Z_packet_to_target_hw_bp_type): ... this, and return a
7988 target_hw_bp_type instead.
7989 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7990 instead of an enum target_point_type.
7991 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7993 (aarch64_dr_state_insert_one_point)
7994 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7995 (aarch64_handle_aligned_watchpoint)
7996 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7997 Take an enum target_hw_bp_type instead of an enum
7999 (aarch64_supports_z_point_type): New function.
8000 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
8001 use Z_packet_to_target_hw_bp_type.
8003 2014-05-20 Joel Brobecker <brobecker@adacore.com>
8005 * configure.ac: Only use -Werror by default when DEVELOPMENT
8007 * configure: Regenerate.
8009 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
8011 Fix gdbserver qGetTLSAddr for x86_64 -m32.
8012 * linux-x86-low.c (X86_64_USER_REGS): New.
8013 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
8015 2014-04-28 Yao Qi <yao@codesourcery.com>
8017 * Makefile.in (i386-avx512.c): Fix the typo of generated file
8020 2014-04-25 Pedro Alves <palves@redhat.com>
8023 * linux-low.c (linux_attach_fail_reason_string): New function.
8024 (linux_attach_lwp): Delete.
8025 (linux_attach_lwp_1): Rename to ...
8026 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
8027 argument. Remove "initial" parameter. Return int instead of
8028 void. Don't error or warn here.
8029 (linux_attach): Adjust to call linux_attach_lwp. Call error on
8030 failure to attach to the tgid. Call warning when failing to
8032 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
8033 argument. Remove "initial" parameter. Return int instead of
8034 void. Don't error or warn here.
8035 (linux_attach_fail_reason_string): New declaration.
8036 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
8037 interface change. Use linux_attach_fail_reason_string.
8039 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
8040 Walfred Tedeschi <walfred.tedeschi@intel.com>
8042 * Makefile.in: Added rules to handle new files
8043 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
8044 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
8045 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
8046 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
8047 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
8048 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
8050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
8051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
8052 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
8053 i386/x32-avx512.xml.
8054 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
8055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
8056 i386/x32-avx512-linux.xml.
8057 * i387-fp.c (num_avx512_k_registers): New constant for number
8059 (num_avx512_zmmh_low_registers): New constant for number of
8060 lower ZMM registers (0-15).
8061 (num_avx512_zmmh_high_registers): New constant for number of
8062 higher ZMM registers (16-31).
8063 (num_avx512_ymmh_registers): New contant for number of higher
8064 YMM registers (ymm16-31 added by avx521 on x86_64).
8065 (num_avx512_xmm_registers): New constant for number of higher
8066 XMM registers (xmm16-31 added by AVX512 on x86_64).
8067 (struct i387_xsave): Add space for AVX512 registers.
8068 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8069 Add code to handle AVX512 registers.
8070 (i387_xsave_to_cache): Add code to handle AVX512 registers.
8071 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8072 prototypei from generated file.
8073 (tdesc_amd64_avx512_linux): Likewise.
8074 (init_registers_x32_avx512_linux): Likewise.
8075 (tdesc_x32_avx512_linux): Likewise.
8076 (init_registers_i386_avx512_linux): Likewise.
8077 (tdesc_i386_avx512_linux): Likewise.
8078 (x86_64_regmap): Add AVX512 registers.
8079 (x86_linux_read_description): Add code to handle AVX512 XSTATE
8081 (initialize_low_arch): Add code to initialize AVX512 registers.
8083 2014-04-23 Pedro Alves <palves@redhat.com>
8085 * mem-break.c (find_gdb_breakpoint_at): Make static.
8086 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8088 2014-04-23 Pedro Alves <palves@redhat.com>
8090 * i386-low.c: Don't include break-common.h here.
8091 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8092 prototype to take target_hw_bp_type as argument instead of a Z
8094 * i386-low.h: Include break-common.h here.
8095 (Z_packet_to_hw_type): Declare.
8096 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8098 * linux-x86-low.c (x86_insert_point): Convert the packet number to
8099 a target_hw_bp_type before calling i386_low_insert_watchpoint.
8100 (x86_remove_point): Convert the packet number to a
8101 target_hw_bp_type before calling i386_low_remove_watchpoint.
8102 * win32-i386-low.c (i386_insert_point): Convert the packet number
8103 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8104 (i386_remove_point): Convert the packet number to a
8105 target_hw_bp_type before calling i386_low_remove_watchpoint.
8107 2014-04-23 Pedro Alves <palves@redhat.com>
8109 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8111 2014-04-10 Pedro Alves <palves@redhat.com>
8113 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8114 Check if the condition or command is NULL before checking if the
8115 breakpoint is known. On success, return true.
8116 * mem-break.h (add_breakpoint_condition): Document return.
8117 (add_breakpoint_commands): Add describing comment.
8118 * server.c (skip_to_semicolon): New function.
8119 (process_point_options): Use it.
8121 2014-04-09 Pedro Alves <palves@redhat.com>
8123 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8126 2014-02-27 Pedro Alves <palves@redhat.com>
8129 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8131 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8133 (last_thread_of_process_p): Take a PID argument instead of a
8135 (linux_wait_for_lwp): Delete.
8136 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8138 (linux_low_filter_event): New function, party factored out from
8139 linux_wait_for_event.
8140 (linux_wait_for_event): Rename to ...
8141 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8142 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8143 sigsuspend. Check for zombie leaders.
8144 (linux_wait_for_event): Reimplement as wrapper around
8145 linux_wait_for_event_filtered.
8146 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8147 a normal or signal exit is seen, it's the whole process exiting.
8148 (wait_for_sigstop): No longer a for_each_inferior callback.
8149 Rewrite on top of linux_wait_for_event_filtered.
8150 (stop_all_lwps): Call wait_for_sigstop directly.
8151 * server.c (resume, handle_target_event): Handle
8152 TARGET_WAITKIND_NO_RESUMED.
8154 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8156 * win32-low.c (psapi_get_dll_name,
8157 * win32_CreateToolhelp32Snapshot): Delete.
8158 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8159 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8161 (handle_load_dll): Add function description.
8162 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8164 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8166 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8168 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8169 base address when calling win32_add_one_solib.
8170 (handle_load_dll): Delete local variable load_addr.
8171 Remove 0x1000 offset applied to DLL base address when calling
8172 win32_add_one_solib.
8173 (handle_unload_dll): Add comment.
8175 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8177 * win32-low.c (win32_add_all_dlls): Renames
8178 win32_ensure_ntdll_loaded. Rewrite function documentation.
8179 Adjust implementation to always load all DLLs.
8180 Add 0x1000 offset to DLL base address when calling
8181 win32_add_one_solib.
8182 (child_initialization_done): New static global.
8183 (do_initial_child_stuff): Set child_initialization_done to
8184 zero during child initialization, and 1 after. Replace call
8185 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8187 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8188 (handle_unload_dll): Add function documentation.
8189 (get_child_debug_event): Ignore load and unload DLL events
8190 during child initialization.
8192 2014-02-20 Doug Evans <dje@google.com>
8194 Remove global all_lwps.
8195 * inferiors.h (ptid_of): Move here from linux-low.h.
8196 (pid_of, lwpid_of): Ditto.
8197 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8198 parameter is a struct thread_info * now.
8199 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8200 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8201 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8203 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8204 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8205 * linux-arm-low.c (update_registers_callback): Update, "entry"
8206 parameter is a struct thread_info * now.
8207 Fetch lwpid from current_inferior directly.
8208 (arm_insert_point): Pass &all_threads to find_inferior instead of
8210 (arm_remove_point): Ditto.
8211 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8212 (arm_prepare_to_resume): Fetch pid from thread.
8213 (arm_read_description): Fetch lwpid from current_inferior directly.
8214 * linux-low.c (all_lwps): Delete.
8215 (delete_lwp): Delete call to remove_inferior.
8216 (handle_extended_wait): Fetch lwpid from thread.
8217 (add_lwp): Don't set lwp->entry.id. Remove call to
8218 add_inferior_to_list.
8219 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8220 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8221 (kill_one_lwp_callback): Ditto.
8222 (linux_kill): Don't dereference NULL pointer.
8223 Fetch ptid,lwpid from thread.
8224 (get_detach_signal): Fetch ptid from thread.
8225 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8226 Simplify call to regcache_invalidate_thread.
8227 (delete_lwp_callback): Update, "entry" parameter is a
8228 struct thread_info * now. Fetch pid from thread.
8229 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8230 (status_pending_p_callback): Update, "entry" parameter is a
8231 struct thread_info * now. Fetch ptid from thread.
8232 (find_lwp_pid): Update, "entry" parameter is a
8233 struct thread_info * now.
8234 (linux_wait_for_lwp): Fetch pid from thread.
8235 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8236 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8237 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8238 (dequeue_one_deferred_signal): Ditto.
8239 (cancel_breakpoint): Fetch ptid from current_inferior.
8240 (linux_wait_for_event): Pass &all_threads to find_inferior,
8241 not &all_lwps. Fetch ptid, lwpid from thread.
8242 (count_events_callback): Update, "entry" parameter is a
8243 struct thread_info * now.
8244 (select_singlestep_lwp_callback): Ditto.
8245 (select_event_lwp_callback): Ditto.
8246 (cancel_breakpoints_callback): Ditto.
8247 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8249 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8250 (unsuspend_one_lwp): Update, "entry" parameter is a
8251 struct thread_info * now.
8252 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8254 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8255 Fetch lwpid from thread, not lwp.
8256 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8257 Pass &all_threads to find_inferior, not &all_lwps.
8258 (send_sigstop): Fetch lwpid from thread, not lwp.
8259 (send_sigstop_callback): Update, "entry" parameter is a
8260 struct thread_info * now.
8261 (suspend_and_send_sigstop_callback): Ditto.
8262 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8263 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8264 struct thread_info * now.
8265 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8267 (lwp_running): Update, "entry" parameter is a
8268 struct thread_info * now.
8269 (stop_all_lwps): Fetch ptid from thread.
8270 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8271 (linux_resume_one_lwp): Fetch lwpid from thread.
8272 (linux_set_resume_request): Update, "entry" parameter is a
8273 struct thread_info * now. Fetch pid, lwpid from thread.
8274 (resume_status_pending_p): Update, "entry" parameter is a
8275 struct thread_info * now.
8276 (need_step_over_p): Ditto. Fetch lwpid from thread.
8277 (start_step_over): Fetch lwpid from thread.
8278 (linux_resume_one_thread): Update, "entry" parameter is a
8279 struct thread_info * now. Fetch lwpid from thread.
8280 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8281 (proceed_one_lwp): Update, "entry" parameter is a
8282 struct thread_info * now. Fetch lwpid from thread.
8283 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8284 struct thread_info * now.
8285 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8286 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8287 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8289 (regsets_store_inferior_registers): Ditto.
8290 (fetch_register, store_register): Ditto.
8291 (linux_read_memory, linux_write_memory): Ditto.
8292 (linux_request_interrupt): Ditto.
8293 (linux_read_auxv): Ditto.
8294 (linux_xfer_siginfo): Ditto.
8295 (linux_qxfer_spu): Ditto.
8296 (linux_qxfer_libraries_svr4): Ditto.
8297 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8298 moved to inferiors.h.
8300 (get_thread_lwp): Update.
8301 (struct lwp_info): Delete member "entry". Simplify comment for
8304 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8305 current_inferior directly.
8306 (update_watch_registers_callback): Update, "entry" parameter is a
8307 struct thread_info * now. Fetch pid from thread.
8308 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8309 (mips_insert_point): Fetch lwpid from current_inferior.
8310 Pass &all_threads to find_inferior, not &all_lwps.
8311 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8312 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8314 (mips_stopped_data_address): Ditto.
8315 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8317 * linux-tile-low.c (tile_arch_setup): Ditto.
8318 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8319 (update_debug_registers_callback): Update, "entry" parameter is a
8320 struct thread_info * now. Fetch pid from thread.
8321 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8322 Pass &all_threads to find_inferior, not &all_lwps.
8323 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8324 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8325 Pass &all_threads to find_inferior, not &all_lwps.
8326 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8327 (i386_dr_low_get_status): Ditto.
8328 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8329 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8330 (x86_linux_read_description): Ditto.
8331 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8333 2014-02-20 Doug Evans <dje@google.com>
8335 * inferiors.c (get_first_inferior): Fix buglet.
8337 2014-02-19 Doug Evans <dje@google.com>
8339 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8340 * inferiors.c (add_thread): Change result type to struct thread_info *.
8341 All callers updated.
8342 (add_lwp): Call add_thread here instead of in callers.
8343 All callers updated.
8344 * linux-low.h (get_lwp_thread): Rewrite.
8345 (struct lwp_info): New member "thread".
8347 2014-02-19 Doug Evans <dje@google.com>
8349 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8350 All callers updated.
8352 2014-02-19 Doug Evans <dje@google.com>
8354 * inferiors.c (add_thread): Fix whitespace.
8356 2014-02-19 Doug Evans <dje@google.com>
8358 * dll.c (clear_dlls): Replace accessing list implemention details
8360 * gdbthread.h (get_first_thread): Declare.
8361 * inferiors.c (for_each_inferior_with_data): New function.
8362 (get_first_thread): New function.
8363 (find_thread_ptid): Simplify.
8364 (get_first_inferior): New function.
8365 (clear_list): Delete.
8366 (one_inferior_p): New function.
8367 (clear_inferior_list): New function.
8368 (clear_inferiors): Update.
8369 * inferiors.h (for_each_inferior_with_data): Declare.
8370 (clear_inferior_list): Declare.
8371 (one_inferior_p): Declare.
8372 (get_first_inferior): Declare.
8373 * linux-low.c (linux_wait_for_event): Replace accessing list
8374 implemention details with API function.
8375 * server.c (target_running): Ditto.
8376 (accumulate_file_name_length): New function.
8377 (emit_dll_description): New function.
8378 (handle_qxfer_libraries): Replace accessing list implemention
8379 details with API function.
8380 (handle_qxfer_threads_worker): New function.
8381 (handle_qxfer_threads_proper): Replace accessing list implemention
8382 details with API function.
8383 (handle_query): Ditto.
8384 (visit_actioned_threads_callback_ftype): New typedef.
8385 (visit_actioned_threads_data): New struct.
8386 (visit_actioned_threads): Rewrite to be find_inferior callback.
8387 (resume): Call find_inferior.
8388 (handle_status): Replace accessing list implemention
8389 details with API function.
8390 (process_serial_event): Replace accessing list implemention details
8392 * target.c (set_desired_inferior): Replace accessing list implemention
8393 details with API function.
8394 * tracepoint.c (same_process_p): New function.
8395 (gdb_agent_about_to_close): Replace accessing list implemention
8396 details with API function.
8397 * win32-low.c (child_delete_thread): Replace accessing list
8398 implemention details with API function.
8399 (match_dll_by_basename): New function.
8400 (dll_is_loaded_by_basename): New function.
8401 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8402 details call to dll_is_loaded_by_basename.
8404 2014-02-19 Doug Evans <dje@google.com>
8406 * dll.h (struct dll_info): Add comment.
8407 * gdbthread.h (struct thread_info): Add comment.
8408 (current_ptid): Simplify.
8409 * inferiors.c (add_process): Update.
8410 (remove_process): Update.
8411 * inferiors.h (struct process_info): Rename member "head" to "entry".
8412 * linux-low.c (delete_lwp): Update.
8414 (last_thread_of_process_p): Update.
8415 (kill_one_lwp_callback, linux_kill): Update.
8416 (status_pending_p_callback): Update.
8417 (wait_for_sigstop): Update. Simplify read of ptid.
8418 (start_step_over): Update.
8419 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8420 (get_lwp_thread): Update.
8421 (struct lwp_info): Rename member "head" to "entry".
8422 * regcache.h (inferior_list_entry): Delete.
8423 * server.c (kill_inferior_callback): Update.
8424 (detach_or_kill_inferior_callback): Update.
8425 (print_started_pid): Update.
8426 (print_attached_pid): Update.
8427 (process_serial_event): Simplify read of ptid.
8428 * thread-db.c (thread_db_create_event): Update.
8429 (thread_db_get_tls_address): Update.
8430 * win32-low.c (current_inferior_ptid): Simplify.
8432 2014-02-19 Tom Tromey <tromey@redhat.com>
8434 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8436 (target_supports_btrace): Update.
8438 2014-02-14 Yao Qi <yao@codesourcery.com>
8440 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8441 (rsp-low-ipa.o): New target.
8443 2014-02-12 Tom Tromey <tromey@redhat.com>
8445 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8446 convert_ascii_to_int.
8447 * regcache.c (registers_to_string): Likewise.
8448 * remote-utils.c (decode_M_packet): Likewise.
8449 * server.c (process_serial_event): Likewise.
8451 2014-02-12 Tom Tromey <tromey@redhat.com>
8453 * server.c (handle_query, handle_v_run): Use hex2bin, not
8455 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8457 2014-02-12 Tom Tromey <tromey@redhat.com>
8459 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8460 convert_int_to_ascii.
8461 * regcache.c (registers_to_string, collect_register_as_string):
8463 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8465 * server.c (process_serial_event): Likewise.
8466 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8467 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8469 2014-02-12 Tom Tromey <tromey@redhat.com>
8471 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8472 bin2hex, not hexify.
8473 * tracepoint.c (cmd_qtstatus): Likewise.
8475 2014-02-12 Tom Tromey <tromey@redhat.com>
8477 * remote-utils.c (monitor_output): Pass explicit length to
8480 2014-02-12 Tom Tromey <tromey@redhat.com>
8482 * tracepoint.c: Include rsp-low.h.
8483 * server.c: Include rsp-low.h.
8484 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8485 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8487 * remote-utils.c: Include rsp-low.h.
8488 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8489 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8490 (convert_int_to_ascii, convert_ascii_to_int): Move to
8492 * regcache.c: Include rsp-low.h.
8493 * ax.c: Include rsp-low.h.
8494 * Makefile.in (SFILES): Add common/rsp-low.c.
8495 (OBS): Add rsp-low.o.
8496 (rsp-low.o): New target.
8498 2014-02-12 Tom Tromey <tromey@redhat.com>
8500 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8501 Include print-utils.h.
8502 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8503 (plongest, thirty_two, phex_nz): Remove.
8504 * Makefile.in (SFILES): Add common/print-utils.c.
8505 (OBS): Add print-utils.o.
8506 (print-utils-ipa.o): New target.
8507 (print-utils.o): New target.
8508 (IPA_OBJS): Add print-utils-ipa.o.
8510 2014-02-06 Tom Tromey <tromey@redhat.com>
8512 * Makefile.in (SFILES): Fix indentation.
8514 2014-02-05 Doug Evans <dje@google.com>
8516 * linux-low.c (linux_wait_for_event): Improve comment.
8517 (linux_wait_1): Keep current_inferior in sync with event_child.
8519 2014-01-22 Doug Evans <dje@google.com>
8521 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8523 2014-01-22 Doug Evans <dje@google.com>
8525 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8526 * configure: Regenerate.
8527 * config.in: Regenerate.
8528 * Makefile.in (SFILES): Add debug.c.
8530 * debug.c: New file.
8531 * debug.h: New file.
8532 * linux-aarch64-low.c (*): Update all debugging printfs to use
8533 debug_printf instead of fprintf.
8534 * linux-arm-low.c (*): Ditto.
8535 * linux-cris-low.c (*): Ditto.
8536 * linux-crisv32-low.c (*): Ditto.
8537 * linux-m32r-low.c (*): Ditto.
8538 * linux-sparc-low.c (*): Ditto.
8539 * linux-x86.c (*): Ditto.
8540 * linux-low.c (*): Ditto.
8541 (linux_wait_1): Add calls to debug_enter, debug_exit.
8542 (linux_wait): Remove redundant debugging printf.
8543 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8544 (linux_resume, unstop_all_lwps): Ditto.
8545 * mem-break.c (*): Update all debugging printfs to use
8546 debug_printf instead of fprintf.
8547 * remote-utils.c (*): Ditto.
8548 * thread-db.c (*): Ditto.
8549 * server.c #include <ctype.h>, "gdb_vecs.h".
8550 (debug_threads): Moved to debug.c.
8551 (*): Update all debugging printfs to use debug_printf instead of
8553 (start_inferior): Replace call to fflush with call to debug_flush.
8554 (monitor_show_help): Mention set debug-format.
8555 (parse_debug_format_options): New function.
8556 (handle_monitor_command): Handle "monitor set debug-format".
8557 (gdbserver_usage): Mention --debug-format.
8558 (main): Parse --debug-format.
8559 * server.h (debug_threads): Declaration moved to debug.h.
8561 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8562 trace_debug_1 that uses debug_printf.
8563 (tracepoint_look_up_symbols): Update all debugging printfs to use
8564 debug_printf instead of fprintf.
8566 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8568 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8571 2014-01-17 Pedro Alves <palves@redhat.com>
8574 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8575 defined after including gdb_proc_service.h.
8577 2014-01-16 Doug Evans <dje@google.com>
8579 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8580 (match_dll): Use it.
8582 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8584 * target.h (target_ops) <read_btrace>: Change parameters and
8585 return type to allow error reporting.
8586 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8587 trace reading errors on.
8588 * linux-low.c (linux_low_read_btrace): Pass trace reading
8590 (linux_low_disable_btrace): New.
8592 2014-01-15 Doug Evans <dje@google.com>
8594 * inferiors.c (thread_id_to_gdb_id): Delete.
8595 * inferiors.h (thread_id_to_gdb_id): Delete.
8597 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8599 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8600 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8603 2014-01-08 Pedro Alves <palves@redhat.com>
8605 * server.c (handle_status): Don't discard previous queued stop
8606 replies or thread's pending status here.
8607 (main) <disconnection>: Do it here instead.
8609 2014-01-08 Pedro Alves <palves@redhat.com>
8611 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8612 * server.c (visit_actioned_threads, handle_pending_status): New
8614 (handle_v_cont): Factor out parts to ...
8615 (resume): ... this new function. If in all-stop, and a thread
8616 being resumed has a pending status, report it without actually
8618 (myresume): Adjust to use the new 'resume' function.
8619 (clear_pending_status_callback, set_pending_status_callback)
8620 (find_status_pending_thread_callback): New functions.
8621 (handle_status): Handle the case of multiple threads having
8622 interesting statuses to report. Report threads' real last signal
8623 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8624 with an interesting thread to report the status for, instead of
8625 always reporting the status of the first thread.
8627 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8629 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8630 * gdbreplay.c (gdbreplay_version): Likewise.
8632 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8634 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8635 iov.iov_len with the real length in use.
8637 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8639 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8640 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8641 for all targets that use win32-low.c.
8642 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8643 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8645 2013-12-13 Pedro Alves <palves@redhat.com>
8647 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8648 if equal to TARGET_WAITKIND_LOADED.
8649 * win32-low.c (cached_status): New static global.
8650 (win32_wait): Add declaration.
8651 (do_initial_child_stuff): Flush all initial pending debug events
8652 up to the initial breakpoint.
8653 (win32_wait): If CACHED_STATUS was set, return that instead
8654 of doing a real wait. Remove the code resuming the execution
8655 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8656 during the initial phase. Also remove the code changing
8657 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8658 TARGET_WAITKIND_STOPPED.
8660 2013-12-11 Yao Qi <yao@codesourcery.com>
8662 * notif.c (handle_notif_ack): Return 0 if no notification
8665 2013-11-20 Doug Evans <dje@google.com>
8667 * linux-low.c (linux_set_resume_request): Fix comment.
8669 2013-11-20 Doug Evans <dje@google.com>
8671 * linux-low.c (resume_status_pending_p): Tweak comment.
8673 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8675 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8676 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8677 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8678 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8679 (srv_amd64_regobj): Add amd64-mpx.o.
8680 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8681 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8682 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8683 * i387-fp.c (num_pl_bnd_register) Added constant.
8684 (num_pl_bnd_cfg_registers) Added constant.
8685 (struct i387_xsave) Added reserved area and MPX fields.
8686 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8687 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8689 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8690 (init_registers_amd64_mpx_linux): Declare new function.
8691 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8692 (x86_64_regmap): Add MPX registers.
8693 (x86_linux_read_description): Add MPX case.
8694 (initialize_low_arch): Initialize MPX targets.
8696 2013-11-18 Tom Tromey <tromey@redhat.com>
8698 * configure: Rebuild.
8699 * configure.ac: Don't check for stdlib.h.
8700 * gdbreplay.c: Unconditionally include stdlib.h.
8702 2013-11-18 Tom Tromey <tromey@redhat.com>
8704 * config.in: Rebuild.
8705 * configure: Rebuild.
8706 * configure.ac: Don't use AC_HEADER_DIRENT.
8708 2013-11-18 Tom Tromey <tromey@redhat.com>
8710 * server.h: Don't check HAVE_STRING_H.
8711 * gdbreplay.c: Don't check HAVE_STRING_H.
8712 * configure: Rebuild.
8714 2013-11-18 Tom Tromey <tromey@redhat.com>
8716 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8719 2013-11-08 Tom Tromey <tromey@redhat.com>
8721 * configure, config.in: Rebuild.
8722 * configure.ac: Remove unused configury.
8724 2013-11-08 Tom Tromey <tromey@redhat.com>
8726 * acinclude.m4: Include common.m4, codeset.m4.
8727 * configure, config.in: Rebuild.
8728 * configure.ac: Use GDB_AC_COMMON.
8730 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8732 * linux-s390-low.c (HWCAP_S390_TE): New define.
8733 (s390_arch_setup): Consider the TE field in the HWCAP for
8734 determining 'have_regset_tdb'.
8736 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8739 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8742 2013-10-02 Pedro Alves <palves@redhat.com>
8744 * server.c (process_serial_event): Don't output "GDBserver
8745 exiting" if GDB is connected through stdio.
8746 * target.c (mywait): Likewise, be silent if GDB is connected
8749 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8751 * lynx-low.c (lynx_add_threads_after_attach): New function.
8752 (lynx_attach): Remove call to add_thread. Add call to
8753 lynx_add_threads_after_attach instead.
8755 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8757 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8758 * config.in, configure: Regenerated.
8760 2013-09-18 Yao Qi <yao@codesourcery.com>
8763 * server.c (start_inferior): Clear 'resume_info'.
8765 2013-09-16 Jiong Wang <jiwang@tilera.com>
8767 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8770 2013-09-16 Jiong Wang <jiwang@tilera.com>
8772 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8773 linux-tile-low.o to srv_tgtobj.
8775 2013-09-16 Will Newton <will.newton@linaro.org>
8777 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8780 2013-09-06 Pedro Alves <palves@redhat.com>
8782 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8783 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8784 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8785 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8786 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8787 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8789 2013-09-06 Pedro Alves <palves@redhat.com>
8791 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8792 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8794 2013-09-06 Pedro Alves <palves@redhat.com>
8796 * linux-amd64-ipa.c: Include tracepoint.h.
8797 * linux-i386-ipa.c: Include tracepoint.h.
8799 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8801 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8802 (ps_get_thread_area): New function.
8804 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8806 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8807 (initialize_low_arch): Call init_registers_crisv32 rather than
8808 init_register_crisv32.
8810 2013-09-05 Pedro Alves <palves@redhat.com>
8812 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8814 * hostio.h: ... this new file.
8815 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8816 win32-low.c: Include hostio.h.
8818 2013-09-05 Pedro Alves <palves@redhat.com>
8820 * server.h (gdb_client_data, handler_func, callback_handler_func)
8821 (delete_file_handler, add_file_handler, append_callback_event)
8822 (delete_callback_event, start_event_loop, initialize_event_loop):
8823 Move to event-loop.h and include it.
8824 * event-loop.h: New file.
8826 2013-09-05 Pedro Alves <palves@redhat.com>
8828 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8829 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8830 (loaded_dll, unloaded_dll): Move to ...
8831 * dll.h: ... this new file.
8832 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8834 2013-09-05 Pedro Alves <palves@redhat.com>
8836 * server.h (current_process, get_thread_process, all_processes)
8837 (add_inferior_to_list, for_each_inferior, current_inferior)
8838 (remove_inferior, add_process, remove_process, find_process_pid)
8839 (have_started_inferiors_p, have_attached_inferiors_p)
8840 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8841 (clear_inferiors, find_inferior, find_inferior_id)
8842 (inferior_target_data, set_inferior_target_data)
8843 (inferior_regcache_data, set_inferior_regcache_data): Move to
8844 inferiors.h, and include it.
8845 * inferiors.h: New file.
8847 2013-09-05 Pedro Alves <palves@redhat.com>
8849 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8853 2013-09-05 Pedro Alves <palves@redhat.com>
8855 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8857 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8858 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8859 (handle_tracepoint_general_set, handle_tracepoint_query)
8860 (tracepoint_finished_step, tracepoint_was_hit)
8861 (release_while_stepping_state_list, current_traceframe)
8862 (in_readonly_region, traceframe_read_mem)
8863 (fetch_traceframe_registers, traceframe_read_sdata)
8864 (traceframe_read_info, struct fast_tpoint_collect_status)
8865 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8866 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8867 (supply_fast_tracepoint_registers)
8868 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8869 (ipa_tdesc, claim_trampoline_space)
8870 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8871 (agent_mem_read, agent_get_trace_state_variable_value)
8872 (agent_set_trace_state_variable_value, agent_tsv_read)
8873 (agent_mem_read_string, get_raw_reg_func_addr)
8874 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8875 * tracepoint.h: ... this new file.
8877 2013-09-05 Pedro Alves <palves@redhat.com>
8879 * server.h (perror_with_name, error, fatal, warning, paddress)
8880 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8882 * utils.h: New file.
8884 2013-09-05 Pedro Alves <palves@redhat.com>
8886 * server.h (remote_debug, noack_mode, transport_is_reliable)
8887 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8888 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8889 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8890 (write_enn, initialize_async_io, enable_async_io)
8891 (disable_async_io, check_remote_input_interrupt_request)
8892 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8893 (dead_thread_notify, prepare_resume_reply)
8894 (decode_address_to_semicolon, decode_address, decode_m_packet)
8895 (decode_M_packet, decode_X_packet, decode_xfer_write)
8896 (decode_search_memory_packet, unhexify, hexify)
8897 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8898 (look_up_one_symbol, relocate_instruction)
8899 (monitor_output): Move to remote-utils.h, and include it.
8900 * remote-utils.h: New file.
8902 2013-09-05 Pedro Alves <palves@redhat.com>
8904 * server.h (_): Delete.
8906 2013-09-02 Pedro Alves <palves@redhat.com>
8908 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8909 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8911 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8913 2013-09-02 Pierre Muller <muller@sourceware.org>
8915 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8916 or WriteProcessMemory complete successfully and handle
8917 ERROR_PARTIAL_COPY error.
8919 2013-09-02 Pedro Alves <palves@redhat.com>
8921 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8922 error instead of EIO.
8924 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8927 * linux-low.c: Include filestuff.h.
8928 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8929 * lynx-low.c: Include filestuff.h.
8930 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8931 * server.c: Include filestuff.h.
8932 (main): Call notice_open_fds.
8933 * spu-low.c: Include filestuff.h.
8934 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8936 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8938 * Makefile.in: Explain why ../target and ../nat are not
8939 listed as include file search paths.
8940 (linux-waitpid.o): New object file rule.
8941 * configure.srv (srv_native_linux_obj): New variable.
8942 Replace all occurrences of linux native object files with
8943 $srv_native_linux_obj.
8944 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8945 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8946 (linux_enable_event_reporting): Remove declaration.
8947 (my_waitpid): Moved to common/linux-waitpid.c.
8948 (linux_wait_for_event): Pass ptid when calling
8949 linux_enable_event_reporting.
8950 (linux_supports_tracefork_flag): Remove.
8951 (linux_enable_event_reporting): Likewise.
8952 (linux_tracefork_grandchild): Remove.
8953 (STACK_SIZE): Moved to common/linux-ptrace.c.
8954 (linux_tracefork_child): Remove.
8955 (linux_test_for_tracefork): Remove.
8956 (linux_look_up_symbols): Call linux_supports_traceclone.
8957 (initialize_low): Remove call to linux_test_for_tracefork.
8958 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8959 common/linux-ptrace.h.
8960 (PTRACE_TYPE_ARG4): Likewise.
8961 Include linux-ptrace.h.
8963 2013-08-21 Pedro Alves <palves@redhat.com>
8965 * config.in: Renegerate.
8967 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8969 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8970 (SFILES): Remove $(srcdir)/common/target-common.c and
8971 add $(srcdir)/target/waitstatus.c.
8972 (OBS): Remove target-common.o and add waitstatus.o.
8973 (server_h): Remove $(srcdir)/../common/target-common.h and
8974 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8975 and $(srcdir)/../target/waitstatus.h.
8976 (target-common.o): Remove.
8977 (waitstatus.o): New target object file.
8978 * target.h: Do not include target-common.h and
8979 include target/resume.h, target/wait.h and
8980 target/waitstatus.h.
8982 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8984 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8985 to PTRACE_TYPE_ARG3.
8986 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8987 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8989 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8990 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8992 2013-07-27 Jie Zhang <jie@codesourcery.com>
8993 Daniel Jacobowitz <dan@codesourcery.com>
8994 Yao Qi <yao@codesourcery.com>
8996 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8997 (mips-linux-watch.o): New rule.
8998 (mips_linux_watch_h): New variable.
8999 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
9001 * linux-mips-low.c: Include mips-linux-watch.h.
9002 (struct arch_process_info, struct arch_lwp_info): New.
9003 (update_watch_registers_callback): New function.
9004 (mips_linux_new_process, mips_linux_new_thread) New functions.
9005 (mips_linux_prepare_to_resume, mips_insert_point): New
9007 (mips_remove_point, mips_stopped_by_watchpoint): New
9009 (rsp_bp_type_to_target_hw_bp_type): New function.
9010 (mips_stopped_data_address): New function.
9011 (the_low_target): Add watchpoint support functions.
9013 2013-07-27 Yao Qi <yao@codesourcery.com>
9015 * i386-low.c: Include break-common.h.
9016 (enum target_hw_bp_type): Remove.
9018 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
9020 * Makefile.in (SFILES): /common/target-common.c.
9021 (OBS): Add target-common.o.
9022 (server_h): Add $(srcdir)/../common/target-common.h.
9023 (target-common.o): New target.
9024 * server.c (queue_stop_reply_callback): Free
9025 status string after use.
9026 * target.c (target_waitstatus_to_string): Remove.
9027 * target.h: Include target-common.h.
9028 (resume_kind): Likewise.
9029 (target_waitkind): Likewise.
9030 (target_waitstatus): Likewise.
9031 (TARGET_WNOHANG): Likewise.
9033 2013-07-04 Yao Qi <yao@codesourcery.com>
9035 * Makefile.in (host_alias): Use @host_noncanonical@.
9036 (target_alias): Use @target_noncanonical@.
9037 * configure.ac: Use ACX_NONCANONICAL_TARGET and
9038 ACX_NONCANONICAL_HOST.
9039 * configure: Regenerated.
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-07-03 Pedro Alves <palves@redhat.com>
9051 * Makefile.in (config.status): Depend on development.sh.
9052 * acinclude.m4: Include libmcheck.m4.
9053 * configure: Regenerate.
9055 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9057 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
9058 attribute inside the parentheses.
9059 (winapi_DebugSetProcessKillOnExit): Ditto.
9060 (winapi_DebugBreakProcess): Ditto.
9061 (winapi_GenerateConsoleCtrlEvent): Ditto.
9063 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
9065 * notif.h (notif_event): Add a dummy member to avoid compiler
9068 2013-07-01 Pedro Alves <palves@redhat.com>
9070 * hostio.c (HOSTIO_PATH_MAX): Define.
9071 (require_filename, handle_open, handle_unlink, handle_readlink):
9074 2013-07-01 Pedro Alves <palves@redhat.com>
9076 * server.h: Include "pathmax.h".
9077 * linux-low.c: Don't include sys/param.h.
9078 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9080 * win32-low.c: Don't include sys/param.h.
9081 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9083 2013-07-01 Pedro Alves <palves@redhat.com>
9085 * event-loop.c: Don't check HAVE_UNISTD_H before including
9087 * gdbreplay.c: Likewise.
9088 * remote-utils.c: Likewise.
9089 * server.c: Likewise.
9090 * configure.ac: Don't check for unistd.h.
9091 * configure: Regenerate.
9093 2013-06-28 Tom Tromey <tromey@redhat.com>
9095 * Makefile.in (version.c): Use version.in, not
9098 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
9100 * configure.ac (version_host, version_target): Set and AC_SUBST them.
9101 * configure: Rebuild.
9102 * Makefile.in (version_host, version_target): Get from configure.
9103 (version.c): Use $(version_host) and $(version_target).
9105 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9107 Fix trace-status to output user name without trailing colon.
9108 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9110 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
9112 Fix trace-status to output proper start-time and stop-time.
9113 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9114 output start time and stop time in hex as gdb expects.
9116 2013-06-26 Pedro Alves <pedro@codesourcery.com>
9118 * tracepoint.c (build_traceframe_info_xml): Output trace state
9119 variables present in the trace buffer.
9121 2013-06-24 Tom Tromey <tromey@redhat.com>
9123 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9125 (version.o): Remove.
9126 * gdbreplay.c: Include version.h.
9127 (version, host_name): Don't declare.
9128 * server.h: Include version.h.
9129 (version, host_name): Don't declare.
9131 2013-06-12 Pedro Alves <palves@redhat.com>
9133 * linux-x86-low.c (linux_is_elf64): Delete global.
9134 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9135 with local linux_pid_exe_is_elf_64_file use.
9137 2013-06-11 Pedro Alves <palves@redhat.com>
9139 * linux-low.c (regset_disabled, disable_regset): New functions.
9140 (regsets_fetch_inferior_registers)
9141 (regsets_store_inferior_registers): Use them.
9142 (initialize_regsets_info); Don't allocate the disabled_regsets
9144 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9147 2013-06-11 Pedro Alves <palves@redhat.com>
9149 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9152 2013-06-11 Pedro Alves <palves@redhat.com>
9154 * linux-x86-low.c (initialize_low_arch): Call
9155 init_registers_x32_avx_linux.
9157 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9159 Fix compatibility with Android Bionic.
9160 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9163 2013-06-07 Pedro Alves <palves@redhat.com>
9166 * Makefile.in (OBS): Add tdesc.o.
9167 (IPA_OBJS): Add tdesc-ipa.o.
9168 (tdesc-ipa.o): New rule.
9169 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9171 * linux-low.c (new_inferior): Delete.
9172 (disabled_regsets, num_regsets): Delete.
9173 (linux_add_process): Adjust to set the new per-process
9175 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9176 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9177 was a stop. When calling arch_setup, switch the current inferior
9178 to the thread that got an event.
9179 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9180 (regsets_fetch_inferior_registers)
9181 (regsets_store_inferior_registers): New regsets_info parameter.
9183 (linux_register_in_regsets): New regs_info parameter. Adjust to
9185 (register_addr, fetch_register, store_register): New usrregs_info
9186 parameter. Adjust to use it.
9187 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9188 parameter regs_info. Adjust to use it.
9189 (linux_fetch_registers): Get the current inferior's regs_info, and
9191 (linux_store_registers): Ditto.
9192 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9193 (initialize_low): Don't initialize the target_regsets here. Call
9194 initialize_low_arch.
9195 * linux-low.h (target_regsets): Delete declaration.
9196 (struct regsets_info): New.
9197 (struct usrregs_info): New.
9198 (struct regs_info): New.
9199 (struct process_info_private) <new_inferior>: New field.
9200 (struct linux_target_ops): Delete the num_regs, regmap, and
9201 regset_bitmap fields. New field regs_info.
9202 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9203 * i387-fp.c (num_xmm_registers): Delete.
9204 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9205 calls to new interface.
9206 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9207 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9208 Infer the number of xmm registers from the regcache's target
9210 * i387-fp.h (num_xmm_registers): Delete.
9211 * inferiors.c (add_thread): Don't install the thread's regcache
9213 * proc-service.c (gregset_info): Fetch the current inferior's
9214 regs_info. Adjust to use it.
9215 * regcache.c: Include tdesc.h.
9216 (register_bytes, reg_defs, num_registers)
9217 (gdbserver_expedite_regs): Delete.
9218 (get_thread_regcache): If the thread doesn't have a regcache yet,
9219 create one, instead of aborting gdbserver.
9220 (regcache_invalidate_one): Rename to ...
9221 (regcache_invalidate_thread): ... this.
9222 (regcache_invalidate_one): New.
9223 (regcache_invalidate): Only invalidate registers of the current
9225 (init_register_cache): Add target_desc parameter, and use it.
9226 (new_register_cache): Ditto. Assert the target description has a
9227 non zero registers_size.
9228 (regcache_cpy): Add assertions. Adjust.
9229 (realloc_register_cache, set_register_cache): Delete.
9230 (registers_to_string, registers_from_string): Adjust.
9231 (find_register_by_name, find_regno, find_register_by_number)
9232 (register_cache_size): Add target_desc parameter, and use it.
9233 (free_register_cache_thread, free_register_cache_thread_one)
9234 (regcache_release, register_cache_size): New.
9235 (register_size): Add target_desc parameter, and use it.
9236 (register_data, supply_register, supply_register_zeroed)
9237 (supply_regblock, supply_register_by_name, collect_register)
9238 (collect_register_as_string, collect_register_by_name): Adjust.
9239 * regcache.h (struct target_desc): Forward declare.
9240 (struct regcache) <tdesc>: New field.
9241 (init_register_cache, new_register_cache): Add target_desc
9243 (regcache_invalidate_thread): Declare.
9244 (regcache_invalidate_one): Delete declaration.
9245 (regcache_release): Declare.
9246 (find_register_by_number, register_cache_size, register_size)
9247 (find_regno): Add target_desc parameter.
9248 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9250 * remote-utils.c: Include tdesc.h.
9251 (outreg, prepare_resume_reply): Adjust.
9252 * server.c: Include tdesc.h.
9253 (gdbserver_xmltarget): Delete declaration.
9254 (get_features_xml, process_serial_event): Adjust.
9255 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9257 (struct process_info) <tdesc>: New field.
9258 (ipa_tdesc): Declare.
9259 * tdesc.c: New file.
9260 * tdesc.h: New file.
9261 * tracepoint.c: Include tdesc.h.
9262 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9263 (get_context_regcache): Adjust to pass ipa_tdesc down.
9264 (do_action_at_tracepoint): Adjust to get the register cache size
9265 from the context regcache's description.
9266 (traceframe_walk_blocks): Adjust to get the register cache size
9267 from the current trace frame's description.
9268 (traceframe_get_pc): Adjust to get current trace frame's
9269 description and pass it down.
9270 (gdb_collect): Adjust to get the register cache size from the
9272 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9273 (gdbserver_xmltarget): Delete.
9274 (initialize_low_tracepoint): Set the ipa's target description.
9275 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9276 (initialize_low_tracepoint): Set the ipa's target description.
9277 * linux-x86-low.c: Include tdesc.h.
9278 [__x86_64__] (is_64bit_tdesc): New.
9279 (ps_get_thread_area, x86_get_thread_area): Use it.
9280 (i386_cannot_store_register): Rename to ...
9281 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9282 (i386_cannot_fetch_register): Rename to ...
9283 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9284 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9286 (target_regsets): Rename to ...
9287 (x86_regsets): ... this.
9288 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9290 (x86_siginfo_fixup): Use is_64bit_tdesc.
9291 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9292 (tdesc_x32_avx_linux, tdesc_x32_linux)
9293 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9295 (x86_linux_update_xmltarget): Delete.
9296 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9297 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9298 (AMD64_LINUX_USER64_CS): New.
9299 (x86_linux_read_description): New, based on
9300 x86_linux_update_xmltarget.
9301 (same_process_callback): New.
9302 (x86_arch_setup_process_callback): New.
9303 (x86_linux_update_xmltarget): New.
9304 (x86_regsets_info): New.
9305 (amd64_linux_regs_info): New.
9306 (i386_linux_usrregs_info): New.
9307 (i386_linux_regs_info): New.
9308 (x86_linux_regs_info): New.
9309 (x86_arch_setup): Reimplement.
9310 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9311 (x86_emit_ops): Ditto.
9312 (the_low_target): Adjust. Install x86_linux_regs_info,
9313 x86_cannot_fetch_register, and x86_cannot_store_register.
9314 (initialize_low_arch): New.
9315 * linux-ia64-low.c (tdesc_ia64): Declare.
9316 (ia64_fetch_register): Adjust.
9317 (ia64_usrregs_info, regs_info): New globals.
9318 (ia64_regs_info): New function.
9319 (the_low_target): Adjust.
9320 (initialize_low_arch): New function.
9321 * linux-sparc-low.c (tdesc_sparc64): Declare.
9322 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9324 (sparc_arch_setup): New function.
9325 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9326 (the_low_target): Adjust.
9327 (initialize_low_arch): New function.
9328 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9329 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9330 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9331 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9332 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9333 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9334 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9335 (tdesc_powerpc_isa205_vsx64l): Declare.
9336 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9337 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9338 (ppc_set_pc, ppc_get_hwcap): Adjust.
9339 (ppc_usrregs_info): Forward declare.
9340 (!__powerpc64__) ppc_regmap_adjusted: New global.
9341 (ppc_arch_setup): Adjust to the current process'es target
9343 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9344 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9345 (ppc_store_evrregset): Adjust.
9346 (target_regsets): Rename to ...
9347 (ppc_regsets): ... this, and make static.
9348 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9349 (ppc_regs_info): New function.
9350 (the_low_target): Adjust.
9351 (initialize_low_arch): New function.
9352 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9353 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9354 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9355 (tdesc_s390x_linux64v2): Declare.
9356 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9357 (s390_fill_gregset, s390_store_last_break): Adjust.
9358 (target_regsets): Rename to ...
9359 (s390_regsets): ... this, and make static.
9360 (s390_get_pc, s390_set_pc): Adjust.
9361 (s390_get_hwcap): New target_desc parameter, and use it.
9362 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9363 (s390_arch_setup): Adjust to set the current process'es target
9364 description. Don't adjust the regmap.
9365 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9366 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9367 (regs_info_3264): New globals.
9368 (s390_regs_info): New function.
9369 (the_low_target): Adjust.
9370 (initialize_low_arch): New function.
9371 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9372 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9373 [__mips64] (init_registers_mips_linux)
9374 (init_registers_mips_dsp_linux): Delete defines.
9375 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9376 (have_dsp): New global.
9377 (mips_read_description): New, based on mips_arch_setup.
9378 (mips_arch_setup): Reimplement.
9379 (get_usrregs_info): New function.
9380 (mips_cannot_fetch_register, mips_cannot_store_register)
9381 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9382 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9383 (target_regsets): Rename to ...
9384 (mips_regsets): ... this, and make static.
9385 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9386 (dsp_regs_info, regs_info): New globals.
9387 (mips_regs_info): New function.
9388 (the_low_target): Adjust.
9389 (initialize_low_arch): New function.
9390 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9391 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9393 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9394 (arm_read_description): New, with bits factored from
9396 (arm_arch_setup): Reimplement.
9397 (target_regsets): Rename to ...
9398 (arm_regsets): ... this, and make static.
9399 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9400 (arm_regs_info): New function.
9401 (the_low_target): Adjust.
9402 (initialize_low_arch): New function.
9403 * linux-m68k-low.c (tdesc_m68k): Declare.
9404 (target_regsets): Rename to ...
9405 (m68k_regsets): ... this, and make static.
9406 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9407 (m68k_regs_info): New function.
9408 (m68k_arch_setup): New function.
9409 (the_low_target): Adjust.
9410 (initialize_low_arch): New function.
9411 * linux-sh-low.c (tdesc_sharch): Declare.
9412 (target_regsets): Rename to ...
9413 (sh_regsets): ... this, and make static.
9414 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9415 (sh_regs_info, sh_arch_setup): New functions.
9416 (the_low_target): Adjust.
9417 (initialize_low_arch): New function.
9418 * linux-bfin-low.c (tdesc_bfin): Declare.
9419 (bfin_arch_setup): New function.
9420 (bfin_usrregs_info, regs_info): New globals.
9421 (bfin_regs_info): New function.
9422 (the_low_target): Adjust.
9423 (initialize_low_arch): New function.
9424 * linux-cris-low.c (tdesc_cris): Declare.
9425 (cris_arch_setup): New function.
9426 (cris_usrregs_info, regs_info): New globals.
9427 (cris_regs_info): New function.
9428 (the_low_target): Adjust.
9429 (initialize_low_arch): New function.
9430 * linux-cris-low.c (tdesc_crisv32): Declare.
9431 (cris_arch_setup): New function.
9432 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9433 (cris_regs_info): New function.
9434 (the_low_target): Adjust.
9435 (initialize_low_arch): New function.
9436 * linux-m32r-low.c (tdesc_m32r): Declare.
9437 (m32r_arch_setup): New function.
9438 (m32r_usrregs_info, regs_info): New globals.
9439 (m32r_regs_info): Adjust.
9440 (initialize_low_arch): New function.
9441 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9442 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9443 (tic6x_usrregs_info): Forward declare.
9444 (tic6x_read_description): New function, based on ...
9445 (tic6x_arch_setup): ... this. Reimplement.
9446 (target_regsets): Rename to ...
9447 (tic6x_regsets): ... this, and make static.
9448 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9449 (tic6x_regs_info): New function.
9450 (the_low_target): Adjust.
9451 (initialize_low_arch): New function.
9452 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9453 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9454 (target_regsets): Rename to ...
9455 (xtensa_regsets): ... this, and make static.
9456 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9458 (xtensa_arch_setup, xtensa_regs_info): New functions.
9459 (the_low_target): Adjust.
9460 (initialize_low_arch): New function.
9461 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9462 (nios2_arch_setup): Set the current process'es tdesc.
9463 (target_regsets): Rename to ...
9464 (nios2_regsets): ... this.
9465 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9466 (nios2_regs_info): New function.
9467 (the_low_target): Adjust.
9468 (initialize_low_arch): New function.
9469 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9470 (aarch64_arch_setup): Set the current process'es tdesc.
9471 (target_regsets): Rename to ...
9472 (aarch64_regsets): ... this.
9473 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9474 (aarch64_regs_info): New function.
9475 (the_low_target): Adjust.
9476 (initialize_low_arch): New function.
9477 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9479 (target_regsets): Rename to ...
9480 (tile_regsets): ... this.
9481 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9482 (tile_regs_info): New function.
9483 (tile_arch_setup): Set the current process'es tdesc.
9484 (the_low_target): Adjust.
9485 (initialize_low_arch): New function.
9486 * spu-low.c (tdesc_spu): Declare.
9487 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9488 * win32-arm-low.c (tdesc_arm): Declare.
9489 (arm_arch_setup): New function.
9490 (the_low_target): Install arm_arch_setup instead of
9492 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9493 (init_windows_x86): Rename to ...
9494 (i386_arch_setup): ... this. Set `win32_tdesc'.
9495 (the_low_target): Adjust.
9496 * win32-low.c (win32_tdesc): New global.
9497 (child_add_thread): Don't create the thread cache here.
9498 (do_initial_child_stuff): Set the new process'es tdesc.
9499 * win32-low.h (struct target_desc): Forward declare.
9500 (win32_tdesc): Declare.
9501 * lynx-i386-low.c (tdesc_i386): Declare global.
9502 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9503 * lynx-low.c (lynx_tdesc): New global.
9504 (lynx_add_process): Set the new process'es tdesc.
9505 * lynx-low.h (struct target_desc): Forward declare.
9506 (lynx_tdesc): Declare global.
9507 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9508 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9509 * nto-low.c (nto_tdesc): New global.
9510 (do_attach): Set the new process'es tdesc.
9511 * nto-low.h (struct target_desc): Forward declare.
9512 (nto_tdesc): Declare.
9513 * nto-x86-low.c (tdesc_i386): Declare.
9514 (nto_x86_arch_setup): Set `nto_tdesc'.
9516 2013-06-04 Gary Benson <gbenson@redhat.com>
9518 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9519 to qSupported response when appropriate.
9520 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9521 with nonzero-length annex.
9522 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9523 arguments supplied in annex.
9525 2013-05-31 Doug Evans <dje@google.com>
9528 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9529 64 bits in 64-cross-32 environment.
9531 2013-05-28 Pedro Alves <palves@redhat.com>
9533 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9534 (aarch64-without-fpu.c): Delete rule.
9535 * configure.srv (aarch64*-*-linux*): Remove references to
9536 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9537 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9540 2013-05-24 Pedro Alves <palves@redhat.com>
9542 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9543 instead of strchr/decode_address. Error if the range isn't split
9544 with a ','. Don't assume there's be a ':' in the action.
9546 2013-05-23 Yao Qi <yao@codesourcery.com>
9547 Pedro Alves <palves@redhat.com>
9549 * linux-low.c (lwp_in_step_range): New function.
9550 (linux_wait_1): If the thread was range stepping and stopped
9551 outside the stepping range, report the stop to GDB. Otherwise,
9552 continue stepping. Add range stepping debug output.
9553 (linux_set_resume_request): Copy the step range from the resume
9555 (linux_supports_range_stepping): New.
9556 (linux_target_ops) <supports_range_stepping>: Set to
9557 linux_supports_range_stepping.
9558 * linux-low.h (struct linux_target_ops)
9559 <supports_range_stepping>: New field.
9560 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9561 * linux-x86-low.c (x86_supports_range_stepping): New.
9562 (the_low_target) <supports_range_stepping>: Set to
9563 x86_supports_range_stepping.
9564 * server.c (handle_v_cont): Handle 'r' action.
9565 (handle_v_requests): Append ";r" if the target supports range
9567 * target.h (struct thread_resume) <step_range_start,
9568 step_range_end>: New fields.
9569 (struct target_ops) <supports_range_stepping>:
9571 (target_supports_range_stepping): New macro.
9573 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9575 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9576 confusion in comment.
9578 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9580 * lynx-low.c (struct process_info_private): New type.
9581 (lynx_add_process): New function.
9582 (lynx_create_inferior, lynx_attach): Replace calls to
9583 add_process by calls to lynx_add_process.
9584 (lynx_resume): If PTID is null, then try using
9585 current_process()->private->last_wait_event_ptid.
9587 (lynx_clear_inferiors): Delete. The contents of that function
9588 has been inlined in lynx_mourn;
9589 (lynx_wait_1): Save the ptid in the process's private data.
9590 (lynx_mourn): Free the process' private data. Replace call
9591 to lynx_clear_inferiors by call to clear_inferiors.
9593 2013-05-17 Yao Qi <yao@codesourcery.com>
9595 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9598 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9600 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9601 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9602 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9603 PT_TEXT_END_ADDR guards. Update comments.
9604 (linux_target_op) <read_offsets>: Conditionally define to
9605 linux_read_offsets if the target is UCLIBC and if it defines
9606 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9608 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9609 Andrew Jenner <andrew@codesourcery.com>
9611 * Makefile.in (SFILES): Add linux-nios2-low.c.
9612 (clean): Add action to delete nios2-linux.c.
9613 (nios2-linux.c): New rule.
9614 * configure.srv: Add nios2*-*-linux*.
9615 * linux-nios2-low.c: New.
9617 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9619 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9621 2013-04-25 Hui Zhu <hui@codesourcery.com>
9624 * ax.c (ax_printf): Add fflush.
9626 2013-04-22 Tom Tromey <tromey@redhat.com>
9628 * Makefile.in (SFILES): Add filestuff.c.
9629 (OBS): Add filestuff.o.
9630 (filestuff.o): New target.
9631 * config.in, configure: Rebuild.
9632 * configure.ac: Check for fdwalk, pipe2.
9634 2013-04-17 Pedro Alves <palves@redhat.com>
9636 * configure.ac (USE_THREAD_DB): Delete variable.
9637 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9638 Don't AC_SUBST USE_THREAD_DB.
9639 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9640 * config.in, configure: Regenerate.
9642 2013-04-16 Pedro Alves <palves@redhat.com>
9644 * linux-low.h (struct lwp_info) <thread_known>: Move under
9645 the USE_THREAD_DB #ifdef.
9647 2013-04-16 Pedro Alves <palves@redhat.com>
9649 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9650 (linux-low.o): Delete rule.
9651 * linux-low.h: Always include "gdb_thread_db.h" instead of
9652 conditionally including thread_db.h.
9653 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9656 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9658 * Makefile.in (install-only): Fix make install regression.
9660 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9662 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9663 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9665 * gdbserver.1: Remove.
9667 2013-03-22 Pedro Alves <palves@redhat.com>
9669 * linux-low.c (handle_extended_wait): Don't call
9670 linux_enable_event_reporting.
9672 2013-03-15 Tony Theodore <tonyt@logyst.com>
9675 * Makefile.in (SHELL): Use @SHELL@.
9677 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9679 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9682 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9684 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9685 Remove extraneous NULL element.
9687 2013-03-13 Yao Qi <yao@codesourcery.com>
9689 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9690 'V' block in trace frame.
9692 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9694 * target.h (struct target_ops): Add btrace ops.
9695 (target_supports_btrace): New macro.
9696 (target_enable_btrace): New macro.
9697 (target_disable_btrace): New macro.
9698 (target_read_btrace): New macro.
9699 * gdbthread.h (struct thread_info): Add btrace field.
9700 * server.c: Include btrace-common.h.
9701 (handle_btrace_general_set): New function.
9702 (handle_btrace_enable): New function.
9703 (handle_btrace_disable): New function.
9704 (handle_general_set): Call handle_btrace_general_set.
9705 (handle_qxfer_btrace): New function.
9706 (struct qxfer qxfer_packets[]): Add btrace entry.
9707 * inferiors.c (remove_thread): Disable btrace.
9708 * linux-low: Include linux-btrace.h.
9709 (linux_low_enable_btrace): New function.
9710 (linux_low_read_btrace): New function.
9711 (linux_target_ops): Add btrace ops.
9712 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9713 Add srv_linux_btrace=yes.
9714 (x86_64-*-linux*): Add linux-btrace.o.
9715 Add srv_linux_btrace=yes.
9716 * configure.ac: Define HAVE_LINUX_BTRACE.
9717 * config.in: Regenerated.
9718 * configure: Regenerated.
9720 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9722 * server.c (handle_qxfer): Preserve error message if -3 is
9724 (qxfer): Document the -3 return value.
9726 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9728 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9729 (linux_btrace_h): New variable.
9730 (linux-btrace.o): New rule.
9732 2013-03-08 Stan Shebs <stan@codesourcery.com>
9733 Hafiz Abid Qadeer <abidh@codesourcery.com>
9735 * tracepoint.c (trace_buffer_size): New global.
9736 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9737 (init_trace_buffer): Change to one-argument function. Allocate
9738 trace buffer memory.
9739 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9740 handle QTBuffer:size packet.
9741 (cmd_bigqtbuffer_size): New function.
9742 (initialize_tracepoint): Call init_trace_buffer with
9743 DEFAULT_TRACE_BUFFER_SIZE.
9744 * server.c (handle_query): Add QTBuffer:size in the
9747 2013-03-07 Yao Qi <yao@codesourcery.com>
9749 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9750 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9752 (cmd_qtsp): Adjust condition. Do post increment.
9753 Set cur_action and cur_step_action back to 0.
9755 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9758 * linux-low.c (linux_write_memory): Return early success if LEN is
9761 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9763 * configure.srv: Add x86_64-*-cygwin* as target.
9765 2013-02-28 Tom Tromey <tromey@redhat.com>
9767 * configure.ac: Invoke AC_SYS_LARGEFILE.
9768 * configure, config.in: Rebuild.
9770 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9772 * win32-low.c: Throughout, fix format strings and casts of
9773 printf-like functions to avoid type related warnings on all
9775 (get_child_debug_event): Print dwDebugEventCode as hex since
9776 that's how it's usually documented.
9778 2013-02-28 Yao Qi <yao@codesourcery.com>
9780 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9783 2013-02-27 Jiong Wang <jiwang@tilera.com>
9785 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9786 (reg-tilegx32.c): New rule.
9787 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9788 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9789 different register info initializer according to elf class.
9790 (init_registers_tilgx32): New function. The tilegx32 register info
9792 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9793 (tile_store_gregset): Likewise.
9795 2013-02-27 Yao Qi <yao@codesourcery.com>
9797 * server.c (process_point_options): Print debug message when
9798 debug_threads is true.
9800 2013-02-26 Yao Qi <yao@codesourcery.com>
9802 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9804 2013-02-19 Pedro Alves <palves@redhat.com>
9805 Kai Tietz <ktietz@redhat.com>
9809 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9810 instead of strtoul to extract address from packet.
9811 (process_serial_event) <'z'>: Likewise.
9813 2013-02-18 Yao Qi <yao@codesourcery.com>
9815 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9817 2013-02-14 Pedro Alves <palves@redhat.com>
9821 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9822 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9824 2013-02-14 Pedro Alves <palves@redhat.com>
9826 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9828 2013-02-14 Pedro Alves <palves@redhat.com>
9830 * tracepoint.c (save_string): Delete.
9831 (add_tracepoint_action): Use savestring instead of save_string.
9833 2013-02-12 Pedro Alves <palves@redhat.com>
9835 * linux-xtensa-low.c: Ditto.
9836 * xtensa-xtregs.c: Ditto.
9838 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9840 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9843 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9845 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9846 aarch64_num_wp_regs and aarch64_num_bp_regs to
9847 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9849 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9851 * linux-aarch64-low.c (ps_get_thread_area): Replace
9852 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9854 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9855 Marcus Shawcroft <marcus.shawcroft@arm.com>
9856 Nigel Stephens <nigel.stephens@arm.com>
9857 Yufeng Zhang <yufeng.zhang@arm.com>
9859 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9860 (aarch64.c, aarch64-without-fpu.c): New targets.
9861 * configure.srv (aarch64*-*-linux*): New.
9862 * linux-aarch64-low.c: New file.
9864 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9866 * linux-low.c (handle_extended_wait, linux_create_inferior)
9867 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9868 (dequeue_one_deferred_signal, linux_resume_one_thread)
9869 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9870 (linux_tracefork_grandchild, linux_test_for_tracefork)
9871 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9872 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9873 where the argument is 0.
9875 2013-01-25 Yao Qi <yao@codesourcery.com>
9877 * event-loop.c: Include "queue.h".
9878 (gdb_event_p): New typedef.
9879 (struct gdb_event) <next_event>: Remove.
9880 (event_queue): Change to QUEUE(gdb_event_p).
9881 (async_queue_event): Remove.
9882 (gdb_event_xfree): New.
9883 (initialize_event_loop): New.
9884 (process_event): Use API from QUEUE.
9885 (wait_for_event): Likewise.
9886 * server.c (main): Call initialize_event_loop.
9887 * server.h (initialize_event_loop): Declare.
9889 2013-01-18 Yao Qi <yao@codesourcery.com>
9891 * ax.h (struct eval_agent_expr_context): New.
9892 (gdb_eval_agent_expr): Update declaration.
9893 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9894 TFRAME. Add new argument CTX.
9895 * server.h (struct eval_agent_expr_context): Declare.
9896 (agent_mem_read, agent_tsv_read): Update declaration.
9897 (agent_mem_read_string): Likewise.
9898 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9899 (add_traceframe_block): Add new argument TPOINT.
9900 Increase TPOINT->traceframe_usage.
9901 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9902 eval_tracepoint_agent_expr.
9903 (condition_true_at_tracepoint): Likewise.
9904 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9905 (agent_mem_read_string, agent_tsv_read): Likewise.
9907 2013-01-16 Yao Qi <yao@codesourcery.com>
9909 * linux-low.c (linux_resume_one_lwp): Don't check
9910 'lwp->bp_reinsert != 0'.
9912 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9913 Pedro Alves <palves@redhat.com>
9915 * lynx-low.c (ptrace_request_to_str): Define a temporary
9916 macro and use it to simplify this function's implementation.
9918 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9920 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9923 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9925 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9927 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9929 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9931 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9933 * lynx-low.c (lynx_resume): Use the resume_info parameter
9934 to determine the ptid for the lynx_ptrace call, unless
9935 it is equal to minus_one_ptid, in which case we use the
9936 ptid of the current_inferior.
9937 (lynx_wait_1): After having received a thread create/exit
9938 event, resume the inferior's execution using the signaling
9939 thread's ptid, rather than the old ptid.
9941 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9943 * lynx-low.c (lynx_resume): Delete variable ret.
9945 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9947 * gdbreplay.c (gdbreplay_version): Update copyright year.
9948 * server.c (gdbserver_version): Likewise.
9950 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9952 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9955 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9957 * lynx-low.c (ptrace_request_to_str): Add handling for
9960 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9962 * lynx-low.c (lynx_attach): Delete variable new_process.
9964 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9966 * lynx-low.c (lynx_create_inferior): Delete variable
9969 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9971 * lynx-low.c (ptrace_request_to_str): Do not handle
9972 PTRACE_GETTHREADLIST if this macro does not exist.
9974 2012-12-15 Yao Qi <yao@codesourcery.com>
9976 * Makefile.in (OBS): Add notif.o.
9977 * notif.c, notif.h: New.
9978 * server.c: Include "notif.h".
9979 (struct vstop_notif) <next>: Remove.
9981 (queue_stop_reply): Update.
9982 (push_event, send_next_stop_reply): Remove.
9983 (discard_queued_stop_replies): Update.
9984 (notif_stop): New variable.
9985 (handle_v_stopped): Remove.
9986 (handle_v_requests): Don't call handle_v_stopped. Call
9987 handle_ack_notif instead.
9988 (queue_stop_reply_callback): Call notif_event_enque instead
9989 of queue_stop_reply.
9990 (handle_status): Don't call send_next_stop_reply, call
9991 notif_write_event instead.
9992 (kill_inferior_callback): Likewise.
9993 (detach_or_kill_inferior_callback): Likewise.
9994 (main): Call initialize_notif.
9995 (process_serial_event): Call QUEUE_is_empty.
9996 (handle_target_event): Call notif_push instead of push event.
9997 * server.h (push_event): Remove declaration.
9999 2012-12-10 Tom Tromey <tromey@redhat.com>
10001 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
10002 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
10005 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
10006 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
10007 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
10008 (amd64-linux-ipa.o, ax.o): Rewrite.
10009 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
10010 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
10011 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
10012 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
10013 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
10014 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
10015 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
10016 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
10017 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
10018 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
10019 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
10020 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
10021 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
10022 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
10023 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
10024 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
10025 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
10026 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
10027 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
10028 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
10029 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
10030 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
10031 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
10032 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
10033 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
10034 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
10035 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
10036 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
10037 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
10038 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
10039 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
10040 (reg-tilegx.o): Remove.
10041 (all_object_files): New macro.
10042 Include .deps files.
10043 * aclocal.m4, configure: Rebuild.
10044 * acinclude.m4: Include depstand.m4, lead-dot.m4.
10045 * configure.ac: Invoke ZW_CREATE_DEPDIR,
10046 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
10048 2012-12-05 Tom Tromey <tromey@redhat.com>
10051 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
10053 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
10055 * configure.ac: Check for linux/perf_event.h.
10056 * config.in: Regenerated.
10057 * configure: Regenerated.
10059 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
10061 * hostio.c (handle_readlink): Decrease buffer size
10062 parameter passed to readlink by one byte.
10064 2012-11-26 Yao Qi <yao@codesourcery.com>
10066 * configure.ac (build_warnings): Append '-Wempty-body'.
10067 * configure: Regenerated.
10068 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10071 2012-11-15 Pierre Muller <muller@sourceware.org>
10073 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10074 * config.in: Regenerate.
10075 * configure: Regenerate.
10076 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10077 Use "gdb_wait.h" header instead of <sys/wait.h> header.
10078 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10079 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10081 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
10082 instead of <sys/wait.h> header.
10083 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10085 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
10087 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10088 (various make rules): Remove -DGDBSERVER
10090 2012-11-09 Yao Qi <yao@codesourcery.com>
10092 * spu-low.c (current_ptid): Move it to ..
10093 * gdbthread.h: ... here. New.
10094 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10095 * server.c (myresume, process_serial_event): Likewise.
10096 * thread-db.c (thread_db_find_new_threads): Likewise.
10097 * tracepoint.c (run_inferior_command): Likewise.
10099 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
10101 * server.c (handle_search_memory_1): Include access length in
10104 2012-09-05 Michael Brandt <michael.brandt@axis.com>
10106 * linux-crisv32-low.c: Fix compile errors.
10108 2012-09-04 Yao Qi <yao@codesourcery.com>
10110 * tracepoint.c (cmd_qtsv): Adjust debug message.
10111 Don't check CUR_TPOINT.
10113 2012-08-28 Yao Qi <yao@codesourcery.com>
10115 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10116 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10117 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10118 Remove declarations of xmalloc, xreallloc, xstrdup and
10120 * Makefile.in (libiberty_h): New.
10121 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10122 (linux-bfin-low.o): Append dependency 'libiberty.h'.
10124 2012-08-23 Yao Qi <yao@codesourcery.com>
10126 * server.h: Remove declaration of 'xsnprintf'.
10128 2012-08-22 Keith Seitz <keiths@redhat.com>
10130 * server.h: Include build-gnulib-gbserver/config.h.
10131 * gdbreplay.c: Likewise.
10133 2012-08-08 Doug Evans <dje@google.com>
10135 * Makefile.in (SFILES): Add gdb_vecs.c.
10136 (OBS): Add gdb_vecs.o.
10137 (gdb_vecs_h, host_defs_h): New variables.
10138 (thread-db.o): Add $(gdb_vecs_h) dependency.
10139 (gdb_vecs.o): New rule.
10140 * thread-db.c: #include "gdb_vecs.h".
10141 (thread_db_load_search): Use a vector to iterate over path elements.
10142 Handle text appearing after "$pdir".
10144 * configure.ac: Add check for strstr.
10145 * config.in: Regenerate.
10146 * configure: Regenerate.
10148 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10150 * hostio.c (handle_pread): If pread fails, fall back to attempting
10152 (handle_pwrite): Likewise for pwrite.
10154 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10156 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10157 between unsupported TYPE and unimplementable ADDR/LEN combination.
10158 (arm_insert_point): Act on new return value.
10160 2012-07-31 Pedro Alves <palves@redhat.com>
10162 * server.c (process_point_options): Only skip tokens if we find
10163 one that is unrecognized. Don't treat 'X' specially while
10164 skipping unrecognized tokens.
10166 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10168 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10169 to 4-byte-align HW breakpoint addresses for Thumb.
10171 2012-07-27 Yao Qi <yao@codesourcery.com>
10175 * server.h: Declare gdb_agent_about_to_close.
10176 * target.c (kill_inferior): Include "agent.h".
10177 New. Send command 'kill'.
10178 * target.h (kill_inferior): Removed macro.
10179 * tracepoint.c (gdb_agent_about_to_close): New.
10180 (gdb_agent_helper_thread): Handle command 'close'.
10181 Wait endlessly until the inferior stops.
10182 Install gdb_agent_remove_socket to atexit hook.
10183 (agent_socket_name): New static variable.
10184 (gdb_agent_socket_init): Replace local variable 'name' with
10185 'agent_socket_name'.
10186 (gdb_agent_remove_socket): New.
10188 2012-07-27 Yao Qi <yao@codesourcery.com>
10190 * server.c (process_point_options): Stop at 'X' when parsing.
10192 2012-07-19 Michael Eager <eager@eagercon.com>
10194 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10196 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10197 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10198 hardware breakpoint.
10200 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10202 * gdbserver/linux-low.c (initialize_low): Call
10203 linux_ptrace_init_warnings.
10205 2012-07-02 Doug Evans <dje@google.com>
10207 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10210 2012-07-02 Stan Shebs <stan@codesourcery.com>
10212 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10213 (ax.o): Add it to build rule.
10215 (OBS): Add format.o.
10216 (IPA_OBS): Add format.o.
10217 * server.c (handle_query): Claim support for breakpoint commands.
10218 (process_point_options): Add command case.
10219 (process_serial_event): Leave running if there are printfs in
10221 * mem-break.h (any_persistent_commands): Declare.
10222 (add_breakpoint_commands): Declare.
10223 (gdb_no_commands_at_breakpoint): Declare.
10224 (run_breakpoint_commands): Declare.
10225 * mem-break.c (struct point_command_list): New struct.
10226 (struct breakpoint): New field command_list.
10227 (any_persistent_commands): New function.
10228 (add_commands_to_breakpoint): New function.
10229 (add_breakpoint_commands): New function.
10230 (gdb_no_commands_at_breakpoint): New function.
10231 (run_breakpoint_commands): New function.
10232 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10234 * ax.c: Include format.h.
10235 (ax_printf): New function.
10236 (gdb_eval_agent_expr): Add printf opcode.
10238 2012-06-13 Yao Qi <yao@codesourcery.com>
10240 * server.c (start_inferior): Remove duplicated writes to fields
10241 'last_resume_kind' and 'last_status' of 'current_inferior'.
10243 2012-06-12 Yao Qi <yao@codesourcery.com>
10244 Pedro Alves <palves@redhat.com>
10246 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10248 * server.c (handle_v_cont): Extend comment.
10250 2012-06-11 Yao Qi <yao@codesourcery.com>
10252 * linux-low.c (linux_attach): Add 'static'.
10254 2012-06-06 Yao Qi <yao@codesourcery.com>
10256 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10258 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10260 Fix gcc -flto compilation warning.
10261 * server.c (main): Make variable multi_mode and attach volatile.
10263 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10265 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10266 if the platform doesn't know about it.
10268 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10270 * Makefile.in (SFILES): Add linux-tile-low.c.
10271 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10272 * configure.srv: Handle tilegx-*-linux*.
10273 * linux-tile-low.c: New file.
10275 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10277 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10279 2012-05-24 Pedro Alves <palves@redhat.com>
10283 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10285 2012-05-24 Pedro Alves <palves@redhat.com>
10289 Replace target_signal with gdb_signal throughout.
10291 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10293 * linux-low.c (linux_store_registers): Avoid the copying sequence
10294 when no data has been retrieved by ptrace.
10296 2012-05-22 Will Deacon <will.deacon@arm.com>
10298 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10299 Include asm/ptrace.h.
10300 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10303 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10305 * linux-low.c (linux_store_registers): Don't re-retrieve data
10306 with ptrace that has already been obtained from /proc. Always
10307 copy any data retrieved with ptrace to the buffer supplied.
10309 2012-05-11 Yao Qi <yao@codesourcery.com>
10310 Pedro Alves <palves@redhat.com>
10312 * linux-low.c (enum stopping_threads_kind): New.
10313 (stopping_threads): Change type to `enum stopping_threads_kind'.
10314 (handle_extended_wait): If stopping and suspending threads, leave
10315 the new_lwp suspended too.
10316 (linux_wait_for_event): Adjust.
10317 (stop_all_lwps): Set `stopping_threads' to
10318 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10319 whether we're suspending threads or just stopping them. Assert no
10322 2012-04-29 Yao Qi <yao@codesourcery.com>
10324 * server.h: Move some code to ...
10325 * gdbthread.h: ... here. New.
10326 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10327 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10328 (nto-low.o, win32-low.o): Likewise.
10329 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10330 * regcache.c, remote-utils.c, server.c: Likewise.
10331 * target.c, tracepoint.c, win32-low.c: Likewise.
10333 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10335 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10336 (PTRACE_ARG4_TYPE): Likewise.
10337 (PTRACE_XFER_TYPE): Likewise.
10338 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10339 ptrace to PTRACE_ARG3_TYPE.
10340 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10341 (PTRACE_ARG4_TYPE): Likewise.
10342 (PTRACE_XFER_TYPE): Likewise.
10343 (linux_detach_one_lwp): Cast fourth argument of
10344 ptrace to long then PTRACE_ARG4_TYPE.
10345 (regsets_fetch_inferior_registers): Cast third argument of
10346 ptrace to long then PTRACE_ARG3_TYPE.
10347 (regsets_store_inferior_registers): Likewise.
10349 2012-04-20 Pedro Alves <palves@redhat.com>
10351 * configure: Regenerate.
10353 2012-04-19 Pedro Alves <palves@redhat.com>
10355 * Makefile.in (GNULIB_BUILDDIR): New.
10356 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10357 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10358 (all, install-only, uninstall, clean-info, all-lib, clean): No
10359 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10360 (maintainer-clean realclean distclean): Use subdir_do.
10362 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10363 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10364 * acinclude.m4: Include acx_configure_dir.m4.
10365 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10366 calls. Call AC_PROG_RANLIB. Configure gnulib using
10369 (GNULIB_STDINT_H): Adjust.
10370 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10371 * gdbreplay.c: Include build-gnulib/config.h.
10372 * server.h: Likewise.
10373 * aclocal.m4: Regenerate.
10374 * config.in: Regenerate.
10375 * configure: Regenerate.
10377 2012-04-19 Pedro Alves <palves@redhat.com>
10379 * Makefile.in (LIBGNU, INCGNU): Adjust.
10380 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10381 (all, install-only, uninstall, clean-info, all-lib, clean)
10382 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10383 * configure.ac: Adjust AC_OUTPUT output.
10384 * aclocal.m4: Regenerate.
10385 * configure: Regenerate.
10387 2012-04-19 Pedro Alves <palves@redhat.com>
10389 * Makefile.in (generated_files): New.
10390 (server_h): Remove the explicit dependency on config.h, and depend
10391 on $generated_files.
10393 2012-04-19 Pedro Alves <palves@redhat.com>
10395 * Makefile.in (INCGNU): Add -Ignulib.
10397 2012-04-19 Pedro Alves <palves@redhat.com>
10399 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10400 (INCGNU): ... this, and spell out -I here.
10401 (GNULIB_LIB): Rename to ...
10402 (LIBGNU): ... this.
10403 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10405 2012-04-19 Pedro Alves <palves@redhat.com>
10407 * config.in: Regenerate.
10409 2012-04-19 Pedro Alves <palves@redhat.com>
10411 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10412 * server.h (memmem): Remove declaration.
10413 * config.in: Regenerate.
10414 * configure: Regenerate.
10416 2012-04-19 Yao Qi <yao@codesourcery.com>
10418 * Makefile.in (SFILES): Add common/vec.c.
10422 2012-04-19 Yao Qi <yao@codesourcery.com>
10424 * remote-utils.c (prepare_resume_reply): Replace with macro
10425 target_core_of_thread.
10426 * server.c (handle_qxfer_threads_proper): Likewise.
10427 * target.h (traget_core_of_thread): New macro.
10429 2012-04-18 Pedro Alves <palves@redhat.com>
10431 * aclocal.m4: Regenerate.
10432 * configure: Regenerate.
10434 2012-04-16 Yao Qi <yao@codesourcery.com>
10436 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10437 duplicated on address.
10439 2012-04-16 Yao Qi <yao@codesourcery.com>
10441 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10442 (struct tracepoint_action_ops) <send>: New field.
10443 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10444 (agent_expr_send, x_tracepoint_action_send): New.
10445 (l_tracepoint_action_send): New.
10446 (cmd_qtdp): Download and install tracepoint
10447 according to `use_agent'.
10448 (run_inferior_command): Add one more parameter `len'.
10450 (tracepoint_send_agent): New.
10451 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10453 2012-04-16 Yao Qi <yao@codesourcery.com>
10455 * tracepoint.c (download_tracepoints): Moved to ...
10456 (cmd_qtstart): ... here.
10458 2012-04-14 Yao Qi <yao@codesourcery.com>
10460 * tracepoint.c: Include inttypes.h.
10461 (struct collect_memory_action): Use sized types.
10462 (struct tracepoint): Likewise.
10463 (cmd_qtdp, stop_tracing): Update print specifiers.
10464 (cmd_qtp, response_tracepoint): Likewise.
10465 (collect_data_at_tracepoint): Likewise.
10466 (collect_data_at_step): Likewise.
10468 2012-04-14 Yao Qi <yao@codesourcery.com>
10470 Import gnulib module inttypes.
10471 * aclocal.m4, config.in, configure: Regenerated.
10473 2012-04-14 Yao Qi <yao@codesourcery.com>
10475 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10476 Makefile and config.status at last.
10478 2012-04-13 Yao Qi <yao@codesourcery.com>
10480 * tracepoint.c: Include stdint.h unconditionally.
10482 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10484 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10485 on BFD_HAVE_SYS_PROCFS_TYPE.
10486 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10487 * configure: Regenerate.
10488 * config.in: Likewise.
10490 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10492 * Makefile.in (clean): Also remove x32.c x32-linux.c
10493 x32-avx.c x32-avx-linux.c.
10494 (x32.o): New target.
10496 (x32-linux.o): Likewise.
10497 (x32-linux.c): Likewise.
10498 (x32-avx.o): Likewise.
10499 (x32-avx.c): Likewise.
10500 (x32-avx-linux.o): Likewise.
10501 (x32-avx-linux.c): Likewise.
10503 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10504 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10505 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10506 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10507 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10508 i386/x32-avx-linux.xml.
10510 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10511 (init_registers_x32_avx_linux): Likwise.
10512 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10513 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10515 2012-04-13 Pedro Alves <palves@redhat.com>
10517 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10518 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10519 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10520 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10523 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10525 * linux-x86-low.c (compat_x32_clock_t): New.
10526 (compat_x32_siginfo_t): Likewise.
10527 (compat_x32_siginfo_from_siginfo): Likewise.
10528 (siginfo_from_compat_x32_siginfo): Likewise.
10529 (linux_is_elf64): Likewise.
10530 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10531 and siginfo_from_compat_x32_siginfo for x32.
10532 (x86_arch_setup): Set linux_is_elf64.
10534 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10537 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10539 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10540 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10541 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10542 compatible with process.
10544 2012-04-12 Yao Qi <yao@codesourcery.com>
10546 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10547 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10548 (install-only, install-info, clean): Handle sub dir gnulib.
10549 (all-lib, am--refresh): New targets.
10550 (memmem.o): Remove target.
10551 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10552 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10553 (AC_REPLACE_FUNCS): Remove memmem.
10554 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10555 (AC_OUTPUT): Generate Makefile in gnulib/.
10556 * aclocal.m4, config.in, configure: Regenerated.
10558 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10560 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10562 2012-04-05 Pedro Alves <palves@redhat.com>
10564 -Werror=strict-aliasing
10566 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10569 2012-04-04 Pedro Alves <palves@redhat.com>
10571 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10572 (sparc_store_gregset_from_stack, sparc_store_gregset)
10573 (sparc_breakpoint_at): Fix formatting.
10575 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10577 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10579 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10580 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10581 * config.in: Regenerate.
10582 * configure: Likewise.
10584 2012-03-29 Pedro Alves <palves@redhat.com>
10586 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10587 Correct ptrace arguments.
10589 2012-03-28 Pedro Alves <palves@redhat.com>
10591 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10592 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10593 (IA64_FR1_REGNUM): New defines.
10594 (ia64_fetch_register): New.
10595 (the_low_target): Install it.
10596 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10598 * linux-low.c (linux_fetch_registers): Try the
10599 the_low_target.fetch_register hook first.
10601 * linux-arm-low.c (the_low_target): Adjust.
10602 * linux-bfin-low.c (the_low_target): Adjust.
10603 * linux-cris-low.c (the_low_target): Adjust.
10604 * linux-crisv32-low.c (the_low_target): Adjust.
10605 * linux-m32r-low.c (the_low_target): Adjust.
10606 * linux-m68k-low.c (the_low_target): Adjust.
10607 * linux-mips-low.c (the_low_target): Adjust.
10608 * linux-ppc-low.c (the_low_target): Adjust.
10609 * linux-s390-low.c (the_low_target): Adjust.
10610 * linux-sh-low.c (the_low_target): Adjust.
10611 * linux-sparc-low.c (the_low_target): Adjust.
10612 * linux-tic6x-low.c (the_low_target): Adjust.
10613 * linux-x86-low.c (the_low_target): Adjust.
10614 * linux-xtensa-low.c (the_low_target): Adjust.
10616 2012-03-26 Pedro Alves <palves@redhat.com>
10618 * server.c (handle_qxfer_libraries): Don't bail early if
10619 the_target->qxfer_libraries_svr4 is not NULL.
10621 2012-03-26 Pedro Alves <palves@redhat.com>
10623 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10625 2012-03-23 Pedro Alves <palves@redhat.com>
10627 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10628 "library-list-svr4" element's start tag when the the DSO list is
10631 2012-03-23 Pedro Alves <palves@redhat.com>
10633 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10634 a variable whose type size is the same as the inferior's pointer
10637 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10639 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10641 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10642 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10643 * linux-low.h: Include <signal.h>.
10644 (struct siginfo): Remove forward declaration.
10645 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10648 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10650 * .gitignore: Ignore more files.
10652 2012-03-19 Pedro Alves <palves@redhat.com>
10653 Jan Kratochvil <jan.kratochvil@redhat.com>
10655 * server.c (cont_thread, general_thread): Add describing comments.
10656 (start_inferior): Clear `cont_thread'.
10657 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10660 2012-03-15 Yao Qi <yao@codesourcery.com>
10662 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10664 (cmd_qtdp): ... here.
10666 2012-03-15 Yao Qi <yao@codesourcery.com>
10668 * tracepoint.c (struct tracepoint_action_ops): New.
10669 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10670 (m_tracepoint_action_download): New.
10671 (r_tracepoint_action_download): New.
10672 (x_tracepoint_action_download): New.
10673 (l_tracepoint_action_download): New.
10674 (add_tracepoint_action): Install `action->ops' according type.
10675 (download_tracepoint_1): Move code `download' function pointer
10676 of various tracepoint_action_ops.
10678 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10680 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10681 linux_ptrace_attach_warnings.
10683 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10685 * Makefile.in (linux-ptrace.o): New.
10686 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10687 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10688 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10689 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10690 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10692 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10694 2012-03-08 Yao Qi <yao@codesourcery.com>
10695 Pedro Alves <palves@redhat.com>
10697 Fix PR server/13392.
10698 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10699 offset of JMP insn.
10700 * tracepoint.c (remove_tracepoint): New.
10701 (cmd_qtdp): Call remove_tracepoint when failed to install.
10703 2012-03-07 Pedro Alves <palves@redhat.com>
10705 * linux-low.c (get_detach_signal): New.
10706 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10707 Pass on pending signals to PTRACE_DETACH. Check the result of the
10709 * server.c (program_signals, program_signals_p): New.
10710 (handle_general_set): Handle QProgramSignals.
10711 * server.h (program_signals, program_signals_p): Declare.
10713 2012-03-05 Pedro Alves <palves@redhat.com>
10714 Jan Kratochvil <jan.kratochvil@redhat.com>
10716 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10719 2012-03-03 Yao Qi <yao@codesourcery.com>
10721 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10722 agent_look_up_symbols.
10724 2012-03-03 Yao Qi <yao@codesourcery.com>
10726 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10727 (linux-x86-low.o): Likewise.
10728 * server.h: Remove in_process_agent_loaded.
10729 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10733 2012-03-03 Yao Qi <yao@codesourcery.com>
10735 * tracepoint.c (gdb_agent_capability): New global.
10736 (in_process_agent_loaded_ust): Renamed to
10737 `in_process_agent_supports_ust'.
10739 (in_process_agent_supports_ust): Call agent_capability_check.
10740 (clear_installed_tracepoints): Assert that agent supports
10743 2012-03-03 Yao Qi <yao@codesourcery.com>
10745 * linux-low.c (linux_supports_agent): New.
10746 (linux_target_ops): Initialize field `supports_agent' with
10747 linux_supports_agent.
10748 * target.h (struct target_ops) <supports_agent>: New.
10749 (target_supports_agent): New macro.
10750 * server.c (handle_general_set): Handle packet 'QAgent'.
10751 (handle_query): Send `QAgent+'.
10752 * Makefile.in (server.o): Depends on agent.h.
10754 2012-03-03 Yao Qi <yao@codesourcery.com>
10756 * Makefile.in (OBS): Add agent.o.
10757 Add new rule for agent.o.
10758 Track dependence of tracepoint.c on agent.h.
10759 * tracepoint.c (run_inferior_command_1):
10760 (run_inferior_command): Call agent_run_command.
10761 (gdb_ust_connect_sync_socket): Deleted. Move it to
10763 (resume_thread, stop_thread): Likewise.
10764 (gdb_ust_socket_init): Renamed to ...
10765 (gdb_agent_socket_init): ... New.
10766 (gdb_ust_thread): Renamed to ...
10767 (gdb_agent_helper_thread): ... New.
10768 (gdb_ust_init): Move some code to ...
10769 (gdb_agent_init): ... here. New.
10770 [HAVE_UST]: Call gdb_ust_init.
10771 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10772 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10773 * config.in, configure: Regenerated.
10775 2012-03-02 Pedro Alves <palves@redhat.com>
10777 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10778 * linux-low.c (struct simple_pid_list): New.
10779 (stopped_pids): New a struct simple_pid_list pointer.
10780 (add_to_pid_list, pull_pid_from_list): New.
10781 (handle_extended_wait): Don't assume the first signal new children
10782 report is SIGSTOP. Adjust call to pull_pid_from_list.
10783 (linux_wait_for_lwp): Adjust.
10785 2012-03-02 Yao Qi <yao@codesourcery.com>
10787 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10790 2012-03-02 Yao Qi <yao@codesourcery.com>
10792 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10793 `stop_pc' and `tpoint'. Update caller.
10795 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10797 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10798 * linux-low.c (use_linux_regsets): New macro.
10799 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10800 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10801 (linux_register_in_regsets): New function.
10802 (usr_fetch_inferior_registers): Skip registers covered by
10804 (usr_store_inferior_registers): Likewise.
10805 (usr_fetch_inferior_registers): New macro.
10806 (usr_store_inferior_registers): Likewise.
10807 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10808 (linux_store_registers): Likewise.
10809 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10811 (init_registers_mips64_dsp_linux): Likewise.
10812 (init_registers_mips_linux): New macro.
10813 (init_registers_mips_dsp_linux): Likewise.
10814 (mips_dsp_num_regs): Likewise.
10815 (DSP_BASE, DSP_CONTROL): New fallback macros.
10816 (mips_base_regs): New macro.
10817 (mips_regmap): Use it. Fix the size.
10818 (mips_dsp_regmap): New variable.
10819 (mips_dsp_regset_bitmap): Likewise.
10820 (mips_arch_setup): New function.
10821 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10823 (mips_cannot_store_register): Likewise.
10824 (the_low_target): Update .arch_setup, .num_regs and .regmap
10825 initializers. Add .regset_bitmap initializer.
10826 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10828 * linux-bfin-low.c (the_low_target): Likewise.
10829 * linux-cris-low.c (the_low_target): Likewise.
10830 * linux-crisv32-low.c (the_low_target): Likewise.
10831 * linux-ia64-low.c (the_low_target): Likewise.
10832 * linux-m32r-low.c (the_low_target): Likewise.
10833 * linux-m68k-low.c (the_low_target): Likewise.
10834 * linux-ppc-low.c (the_low_target): Likewise.
10835 * linux-s390-low.c (the_low_target): Likewise.
10836 * linux-sh-low.c (the_low_target): Likewise.
10837 * linux-sparc-low.c (the_low_target): Likewise.
10838 * linux-tic6x-low.c (the_low_target): Likewise.
10839 * linux-x86-low.c (the_low_target): Likewise.
10840 * linux-xtensa-low.c (the_low_target): Likewise.
10841 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10842 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10843 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10845 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10846 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10848 2012-02-29 Yao Qi <yao@codesourcery.com>
10849 Pedro Alves <palves@redhat.com>
10851 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10852 `step_over_finished' is true.
10854 2012-02-27 Pedro Alves <palves@redhat.com>
10856 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10857 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10859 2012-02-27 Pedro Alves <palves@redhat.com>
10862 * linux-low.c (pid_is_stopped): New.
10863 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10865 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10867 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10870 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10872 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10874 2012-02-24 Luis Machado <lgustavo@codesourcery>
10876 * server.c (handle_query): Advertise support for target-side
10877 breakpoint condition evaluation.
10878 (process_point_options): New function.
10879 (process_serial_event): When inserting a breakpoint, check for
10880 a target-side condition that should be evaluated.
10882 * mem-break.c: Include regcache.h and ax.h.
10883 (point_cond_list_t): New data structure.
10884 (breakpoint) <cond_list>: New field.
10885 (find_gdb_breakpoint_at): Make non-static.
10886 (delete_gdb_breakpoint_at): Clear any target-side
10888 (clear_gdb_breakpoint_conditions): New function.
10889 (add_condition_to_breakpoint): Likewise.
10890 (add_breakpoint_condition): Likewise.
10891 (gdb_condition_true_at_breakpoint): Likewise.
10892 (gdb_breakpoint_here): Return result directly instead
10893 of going through a local variable.
10895 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10896 (clear_gdb_breakpoint_conditions): Likewise.
10897 (add_breakpoint_condition): Likewise.
10898 (gdb_condition_true_at_breakpoint): Likewise.
10900 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10901 (need_step_over_p): Take target-side breakpoint condition into
10904 2012-02-24 Luis Machado <lgustavo@codesourcery>
10906 * server.h: Include tracepoint.h.
10907 (agent_mem_read, agent_get_trace_state_variable_value,
10908 agent_set_trace_state_variable_value,
10909 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10910 get_set_tsv_func_addr): New prototypes.
10912 * ax.h: New include file.
10913 * ax.c: New source file.
10915 * tracepoint.c: Include ax.h.
10916 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10917 agent_expr, eval_result_type): Move to ax.h.
10918 (parse_agent_expr): Rename to ...
10919 (gdb_parse_agent_expr): ... this, make it non-static and move
10921 (unparse_agent_expr) Rename to ...
10922 (gdb_unparse_agent_expr): ... this, make it non-static and move
10924 (eval_agent_expr): Rename to ...
10925 (eval_tracepoint_agent_expr): ... this.
10926 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10927 forward declarations.
10928 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10929 (agent_get_trace_state_variable_value): New function.
10930 (agent_set_trace_state_variable_value): New function.
10931 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10932 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10933 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10934 (condition_true_at_tracepoint): Likewise.
10935 (parse_agent_expr): Rename to ...
10936 (gdb_parse_agent_expr): ... this and move to ax.c.
10937 (unparse_agent_expr): Rename to ...
10938 (gdb_unparse_agent_expr): ... this and move to ax.c.
10939 (gdb_agent_op_name): Move to ax.c.
10940 (eval_agent_expr): Rename to ...
10941 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10943 (eval_tracepoint_agent_expr): New function.
10944 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10946 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10948 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10949 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10950 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10951 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10952 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10953 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10954 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10955 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10956 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10957 (compile_bytecodes): Remove forward declaration.
10958 (is_goto_target): Move to ax.c.
10959 (compile_bytecodes): Move to ax.c and call
10960 agent_get_trace_state_variable_value (...) and
10961 agent_set_trace_state_variable_value (...).
10963 * Makefile.in: Update ax.c and IPA dependencies.
10965 2012-02-24 Pedro Alves <palves@redhat.com>
10967 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10968 (cmd_bigqtbuffer_circular): ... this. Only handle
10969 'QTBuffer:circular:'.
10970 (handle_tracepoint_general_set): Adjust.
10972 2012-02-16 Yao Qi <yao@codesourcery.com>
10974 * inferiors.c: Move code to ...
10975 * dll.c: .... here. New.
10976 * server.h: Declare clear_dlls.
10977 * Makefile.in (SFILES): Add dll.c.
10981 2012-02-11 Yao Qi <yao@codesourcery.com>
10983 * server.c: (handle_monitor_command): Add a new parameter
10985 (handle_query): Update caller.
10987 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10989 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10990 * configure, config.in: Regenerate.
10991 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10994 2012-02-02 Pedro Alves <palves@redhat.com>
10996 Try SIGKILL first, then PTRACE_KILL.
10997 * linux-low.c (linux_kill_one_lwp): New.
10998 (linux_kill_one_lwp): Rename to ...
10999 (kill_one_lwp_callback): ... this. Use the new
11000 linux_kill_one_lwp.
11002 2012-02-02 Pedro Alves <palves@redhat.com>
11004 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
11007 2012-01-27 Pedro Alves <palves@redhat.com>
11009 * linux-low.c (linux_child_pid_to_exec_file): Delete.
11010 (elf_64_file_p): Make static.
11011 (linux_pid_exe_is_elf_64_file): New.
11012 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
11013 Delete declarations.
11014 (linux_pid_exe_is_elf_64_file): Declare.
11015 * linux-x86-low.c (x86_arch_setup): Use
11016 linux_pid_exe_is_elf_64_file.
11018 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11020 * linux-low.c (linux_wait_for_event_1): Rename to ...
11021 (linux_wait_for_event): ... here and merge it with former
11022 linux_wait_for_event - new variable wait_ptid, use it.
11023 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
11025 2012-01-23 Pedro Alves <palves@redhat.com>
11027 * server.c (main): Avoid yet another case of infinite loop while
11028 detaching/killing after a longjmp.
11030 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
11033 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
11035 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
11037 * hostio.c (handle_readlink): New function.
11038 (handle_vFile): Call it to handle "vFile:readlink" packets.
11040 2012-01-20 Pedro Alves <palves@redhat.com>
11041 Ulrich Weigand <ulrich.weigand@linaro.org>
11043 * server.c (handle_v_requests): Only support vAttach and vRun to
11044 start multiple processes when in extended protocol mode.
11046 2012-01-17 Pedro Alves <palves@redhat.com>
11048 * tracepoint.c (initialize_tracepoint): Use mmap instead of
11049 memalign plus mprotect to allocate the scratch buffer.
11051 2012-01-13 Pedro Alves <palves@redhat.com>
11053 * server.c (attach_inferior): Clear `cont_thread'.
11055 2012-01-13 Pedro Alves <palves@redhat.com>
11057 * server.c (main): Avoid infinite loop while detaching/killing
11060 2012-01-09 Doug Evans <dje@google.com>
11062 * server.c (start_inferior): Set last_ptid in --wrapper case.
11064 2012-01-06 Yao Qi <yao@codesourcery.com>
11066 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
11068 [IN_PROCESS_AGENT] (debug_agent): New global variable.
11070 2012-01-04 Yao Qi <yao@codesourcery.com>
11072 * tracepoint.c (cmd_qtdp): Print debug message
11073 for static tracepoint.
11075 2012-01-04 Yao Qi <yao@codesourcery.com>
11077 * tracepoint.c (trace_vdebug): Differentiate debug message
11078 between gdbserver and IPA.
11080 2012-01-03 Yao Qi <yao@codesourcery.com>
11082 * tracepoint.c (tracepoint_was_hit): Don't collect for
11085 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11087 * terminal.h: Reformat copyright header.
11089 2012-01-02 Joel Brobecker <brobecker@adacore.com>
11091 * server.c (gdbserver_version): Update copyright year.
11092 * gdbreplay.c (gdbreplay_version): Likewise.
11094 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
11096 * linux-low.c (linux_create_inferior): Put empty if clause for write.
11099 2011-12-18 Hui Zhu <teawater@gmail.com>
11100 * linux-low.c (linux_create_inferior): Save return value to ret.
11102 2011-12-18 Hui Zhu <teawater@gmail.com>
11104 * linux-low.c (linux_create_inferior): Save return value to ret.
11106 2011-12-16 Doug Evans <dje@google.com>
11108 * linux-low.c (linux_create_inferior): If stdio connection,
11109 redirect stdin from /dev/null, stdout to stderr.
11110 * remote-utils.c (remote_is_stdio): New static global.
11111 (remote_connection_is_stdio): New function.
11112 (remote_prepare): Handle stdio connection.
11113 (remote_open): Ditto.
11114 (remote_close): Don't close stdin for stdio connections.
11115 (read_prim,write_prim): New functions. Replace all calls to
11116 read/write to these.
11117 * server.c (main): Watch for "-" argument. Move call to
11118 remote_prepare before start_inferior.
11119 * server.h (STDIO_CONNECTION_NAME): New macro.
11120 (remote_connection_is_stdio): Declare.
11122 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11123 in debugging output.
11125 2011-12-15 Yao Qi <yao@codesourcery.com>
11127 * tracepoint.c: Include sys/syscall.h.
11128 (gdb_ust_thread): Remove preprocessor conditional.
11130 2011-12-14 Pedro Alves <pedro@codesourcery.com>
11132 * linux-low.c (linux_detach_one_lwp): Call
11133 the_low_target.prepare_to_resume before detaching.
11135 2011-12-14 Yao Qi <yao@codesourcery.com>
11137 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11140 2011-12-14 Yao Qi <yao@codesourcery.com>
11142 * i386-low.c (i386_low_stopped_data_address): Initialize local
11143 variable `control'.
11145 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11149 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11150 DR_CONTROL unless necessary. Extend comments.
11151 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11152 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11154 2011-12-13 Yao Qi <yao@codesourcery.com>
11156 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11158 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11160 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11162 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11163 Print new debug message for such case.
11165 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11167 Fix overlapping memcpy.
11168 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11169 the read_inferior_memory transfer.
11170 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11171 write_inferior_memory transfer.
11172 (set_fast_tracepoint_jump): New variable buf. Use it for the
11173 read_inferior_memory and write_inferior_memory transfers.
11174 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11175 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11176 Use it for the write_inferior_memory transfer.
11177 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11180 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11182 * linux-low.c (fetch_register, store_register): Make code
11183 consistent, fix formatting.
11185 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11187 * linux-low.c (usr_store_inferior_registers): Factor out code
11188 to handle individual registers into...
11189 (store_register): ... this new function.
11191 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11193 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11194 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11195 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11196 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11197 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11198 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11199 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11200 (srv_xmlfiles): Add new XML files.
11202 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11204 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11205 (init_registers_s390_linux32v1): Add prototype.
11206 (init_registers_s390_linux32v2): Likewise.
11207 (init_registers_s390_linux64v1): Likewise.
11208 (init_registers_s390_linux64v2): Likewise.
11209 (init_registers_s390x_linux64v1): Likewise.
11210 (init_registers_s390x_linux64v2): Likewise.
11211 (s390_num_regs): Increment to 52.
11212 (s390_regmap): Add orig_r2 register.
11213 (s390_num_regs_3264): Increment to 68.
11214 (s390_regmap_3264): Add orig_r2 register.
11215 (s390_collect_ptrace_register): Handle orig_r2 register.
11216 (s390_supply_ptrace_register): Likewise.
11217 (s390_fill_last_break): New function.
11218 (s390_store_last_break): Likewise.
11219 (s390_fill_system_call): New function.
11220 (s390_store_system_call): Likewise.
11221 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11223 (s390_check_regset): New function.
11224 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11225 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11226 Update target_regsets for available register sets.
11228 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11229 Jan Kratochvil <jan.kratochvil@redhat.com>
11231 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11232 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11234 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11235 * linux-low.h (struct process_info_private): New member r_debug.
11236 * server.c (handle_qxfer_libraries): Call
11237 the_target->qxfer_libraries_svr4.
11238 (handle_qxfer_libraries_svr4): New function.
11239 (qxfer_packets): New entry "libraries-svr4".
11240 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11241 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11242 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11243 PACKET_qXfer_libraries_svr4.
11245 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11247 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11248 PSW address/mask between 8-byte and 16-byte formats.
11249 (s390_supply_ptrace_register): Likewise.
11250 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11251 basic addressing mode bit.
11253 2011-11-24 Stan Shebs <stan@codesourcery.com>
11255 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11257 2011-11-17 Stan Shebs <stan@codesourcery.com>
11259 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11260 (tracing_start_time): New global.
11261 (tracing_stop_time): New global.
11262 (tracing_user_name): New global.
11263 (tracing_notes): New global.
11264 (tracing_stop_note): New global.
11265 (cmd_qtstart): Set traceframe_usage, start_time.
11266 (stop_tracing): Set stop_time.
11267 (cmd_qtstatus): Report additional status.
11268 (cmd_qtp): New function.
11269 (handle_tracepoint_query): Call it.
11270 (cmd_qtnotes): New function.
11271 (handle_tracepoint_general_set): Call it.
11272 (get_timestamp): Rename from tsv_get_timestamp.
11274 2011-11-14 Stan Shebs <stan@codesourcery.com>
11275 Kwok Cheung Yeung <kcy@codesourcery.com>
11277 * linux-x86-low.c (small_jump_insn): New.
11278 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11279 trampoline and error message, build a trampoline and issue a small
11280 jump instruction to it.
11281 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11282 trampoline and error message.
11283 (x86_get_min_fast_tracepoint_insn_len): New.
11284 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11285 * linux-low.h (struct linux_target_ops): Add arguments to
11286 install_fast_tracepoint_jump_pad operation, add new operation.
11287 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11289 (linux_get_min_fast_tracepoint_insn_len): New function.
11290 (linux_target_op): Add new operation.
11291 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11292 (gdb_trampoline_buffer_end): Ditto.
11293 (gdb_trampoline_buffer_error): Ditto.
11294 (struct ipa_sym_addresses): Add fields for new IPA variables.
11295 (symbol_list): Add entries for new IPA variables.
11296 (struct tracepoint): Add fields to hold the address range of the
11297 trampoline used by the tracepoint.
11298 (trampoline_buffer_head): New static variable.
11299 (trampoline_buffer_tail): Ditto.
11300 (claim_trampoline_space): New function.
11301 (have_fast_tracepoint_trampoline_buffer): New function.
11302 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11304 (install_fast_tracepoint): Ditto, also add error buffer argument.
11305 (cmd_qtminftpilen): New function.
11306 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11307 (fast_tracepoint_from_trampoline_address): New function.
11308 (fast_tracepoint_collecting): Handle trampoline as part of jump
11310 (set_trampoline_buffer_space): New function.
11311 (initialize_tracepoint): Initialize new IPA variables.
11312 * target.h (struct target_ops): Add arguments to
11313 install_fast_tracepoint_jump_pad operation, add new
11314 get_min_fast_tracepoint_insn_len operation.
11315 (target_get_min_fast_tracepoint_insn_len): New.
11316 (install_fast_tracepoint_jump_pad): Add arguments.
11317 * server.h (IPA_BUFSIZ): Define.
11318 * linux-i386-ipa.c: Include extra header files.
11319 (initialize_fast_tracepoint_trampoline_buffer): New function.
11320 (initialize_low_tracepoint): Call it.
11321 * server.h (set_trampoline_buffer_space): Declare.
11322 (claim_trampoline_space): Ditto.
11323 (have_fast_tracepoint_trampoline_buffer): Ditto.
11325 2011-11-14 Yao Qi <yao@codesourcery.com>
11327 * server.c (handle_query): Handle InstallInTrace for qSupported.
11328 * tracepoint.c (add_tracepoint): Sort list.
11329 (install_tracepoint, download_tracepoint): New.
11330 (cmd_qtdp): Call them to install and download tracepoints.
11331 (sort_tracepoints): Removed.
11332 (cmd_qtstart): Update.
11334 2011-11-14 Yao Qi <yao@codesourcery.com>
11336 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11337 * mem-break.h: Declare.
11338 * tracepoint.c (cmd_qtstart): Move some code to ...
11339 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11341 (download_tracepoints): Move some code to ...
11342 (download_tracepoint_1): ... here. New.
11344 2011-11-08 Yao Qi <yao@codesourcery.com>
11346 * remote-utils.c (relocate_instruction): A comment fix.
11348 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11350 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11351 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11352 dr_status_mirror and dr_control_mirror from debug_reg_state.
11353 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11354 (i386_initial_stuff): Remove use of deleted globals.
11355 (i386_get_thread_context, i386_set_thread_context,
11356 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11357 from debug_reg_state.
11359 2011-11-05 Yao Qi <yao@codesourcery.com>
11361 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11362 address as TPOINT's.
11364 2011-11-02 Stan Shebs <stan@codesourcery.com>
11366 * tracepoint.c (agent_mem_read_string): New function.
11367 (eval_agent_expr): Call it for tracenz.
11368 * server.c (handle_query): Report support for tracenz.
11370 2011-11-02 Yao Qi <yao@codesourcery.com>
11372 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11374 2011-11-02 Yao Qi <yao@codesourcery.com>
11376 * target.h: Fix a typo in comment.
11378 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11380 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11381 clobber the breakpoints' shadows with fast tracepoint jumps.
11382 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11383 * target.c (write_inferior_memory): Also pass MYADDR down to
11386 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11388 * configure.ac: Check support for personality routine.
11389 * configure: Regenerate.
11390 * config.in: Likewise.
11391 * linux-low.c: Include <sys/personality.h>.
11392 Define ADDR_NO_RANDOMIZE if necessary.
11393 (linux_create_inferior): Disable address space randomization when
11394 forking inferior, if requested.
11395 (linux_supports_disable_randomization): New function.
11396 (linux_target_ops): Install it.
11397 * server.h (disable_randomization): Declare.
11398 * server.c (disable_randomization): New global variable.
11399 (handle_general_set): Handle QDisableRandomization.
11400 (handle_query): Likewise for qSupported.
11401 (main): Support --disable-randomization and --no-disable-randomization
11402 command line arguments.
11403 * target.h (struct target_ops): Add supports_disable_randomization.
11404 (target_supports_disable_randomization): New macro.
11406 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11408 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11410 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11411 [!PT_GETDSBT] (target_loadmap): New definition.
11412 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11413 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11414 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11415 and PT_GETDSBT to LINUX_LOADMAP.
11416 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11417 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11419 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11421 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11422 (arm_linux_hwbp_cap): New static variable.
11423 (arm_linux_get_hwbp_cap): Replace by ...
11424 (arm_linux_init_hwbp_cap): ... this new function.
11425 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11426 (arm_linux_get_hw_watchpoint_count): Likewise.
11427 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11428 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11429 (arm_prepare_to_resume): Use perror_with_name instead of error.
11431 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11433 * linux-arm-low.c: Include <signal.h>.
11434 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11435 (struct arm_linux_hwbp_cap): New data type.
11436 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11437 (struct arm_linux_hw_breakpoint): New data type.
11438 (MAX_BPTS, MAX_WPTS): Define.
11439 (struct arch_process_info, struct arch_lwp_info): New data types.
11440 (arm_linux_get_hwbp_cap): New function.
11441 (arm_linux_get_hw_breakpoint_count): Likewise.
11442 (arm_linux_get_hw_watchpoint_count): Likewise.
11443 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11444 (arm_hwbp_control_initialize): Likewise.
11445 (arm_hwbp_control_is_enabled): Likewise.
11446 (arm_hwbp_control_is_initialized): Likewise.
11447 (arm_hwbp_control_disable): Likewise.
11448 (arm_linux_hw_breakpoint_equal): Likewise.
11449 (arm_linux_hw_point_initialize): Likewise.
11450 (struct update_registers_data): New data structure.
11451 (update_registers_callback: New function.
11452 (arm_insert_point): Likewise.
11453 (arm_remove_point): Likewise.
11454 (arm_stopped_by_watchpoint): Likewise.
11455 (arm_stopped_data_address): Likewise.
11456 (arm_new_process): Likewise.
11457 (arm_new_thread): Likewise.
11458 (arm_prepare_to_resume): Likewise.
11459 (the_low_target): Register arm_insert_point, arm_remove_point,
11460 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11461 arm_new_thread, and arm_prepare_to_resume.
11463 2011-09-15 Stan Shebs <stan@codesourcery.com>
11465 * server.h (struct emit_ops): Add compare-goto fields.
11466 * tracepoint.c (gdb_agent_op_sizes): New table.
11467 (emit_eq_goto): New function.
11468 (emit_ne_goto): New function.
11469 (emit_lt_goto): New function.
11470 (emit_le_goto): New function.
11471 (emit_gt_goto): New function.
11472 (emit_ge_goto): New function.
11473 (is_goto_target): New function.
11474 (compile_bytecodes): Recognize special cases of compare-goto
11475 combinations and call specialized emitters for them.
11476 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11477 (amd64_emit_ne_goto): New function.
11478 (amd64_emit_lt_goto): New function.
11479 (amd64_emit_le_goto): New function.
11480 (amd64_emit_gt_goto): New function.
11481 (amd64_emit_ge_goto): New function.
11482 (amd64_emit_ops): Add the new functions.
11483 (i386_emit_eq_goto): New function.
11484 (i386_emit_ne_goto): New function.
11485 (i386_emit_lt_goto): New function.
11486 (i386_emit_le_goto): New function.
11487 (i386_emit_gt_goto): New function.
11488 (i386_emit_ge_goto): New function.
11489 (i386_emit_ops): Add the new functions.
11491 2011-09-08 Stan Shebs <stan@codesourcery.com>
11493 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11494 (i386_emit_epilogue): Restore %ebx.
11496 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11498 * server.c (step_thread): Remove definition.
11499 (process_serial_event): Don't handle Hs.
11500 * server.h (step_thread): Remove declaration.
11501 * target.c (set_desired_inferior): Remove use of step_thread.
11503 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11505 * linux-low.c: Include linux-procfs.h.
11506 (linux_attach_lwp_1): Update comments.
11507 (linux_attach): Scan for existing threads when attaching to a
11508 process that is the tgid.
11509 * Makefile.in: Update dependencies.
11511 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11513 * configure.srv: Add linux-procfs.o dependencies.
11515 2011-08-14 Yao Qi <yao@codesourcery.com>
11517 * target.h (struct target_ops): Fix indent.
11518 * win32-low.c (win32_target_ops): Fix comment.
11520 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11521 Yao Qi <yao@codesourcery.com>
11523 * Makefile.in (clean): Remove tic6x-*.c files.
11524 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11525 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11526 (tic6x-c64xp-linux.c): Likewise.
11527 * configure.srv: Add support for tic6x-*-uclinux.
11528 * linux-tic6x-low.c: New.
11529 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11531 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11532 Yao Qi <yao@codesourcery.com>
11534 * target.h (struct target_ops): Add read_loadmap.
11535 * linux-low.c (struct target_loadseg): New type.
11536 (struct target_loadmap): New type.
11537 (linux_read_loadmap): New function.
11538 (linux_target_ops): Add linux_read_loadmap.
11539 * server.c (handle_query): Support qXfer:fdpic:read packet.
11540 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11543 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11545 * win32-low.c: Include <stdint.h>.
11547 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11549 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11550 to the inferior here.
11551 (i386_remove_aligned_watchpoint): Ditto.
11552 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11553 fit part of the watchpoint in the debug registers.
11554 (i386_update_inferior_debug_regs): New.
11555 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11556 registers, and only update the inferior on success.
11557 (i386_low_remove_watchpoint): Ditto.
11559 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11561 * linux-low.c (compare_ints, unique, list_threads, show_process,
11562 linux_core_of_thread): Delete.
11563 (linux_target_ops): Change linux_core_of_thread to
11564 linux_common_core_of_thread.
11565 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11566 * utils.c (malloc_failure): Change type of argument.
11567 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11568 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11569 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11570 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11571 (IPA_OBJS): Add common-utils-ipa.o.
11572 (ptid_h, linux_osdata_h): New macros.
11573 (server_h): Add common/common-utils.h, common/xml-utils.h,
11574 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11576 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11577 ptid.o, buffer.o): New rules.
11578 (linux-low.o): Add common/linux-osdata.h as a dependency.
11579 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11580 * configure.ac: Add AC_HEADER_DIRENT check.
11581 * config.in: Regenerate.
11582 * configure: Regenerate.
11583 * remote-utils.c (xml_escape_text): Delete.
11584 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11585 buffer_xml_printf): Move to common/buffer.c.
11586 * server.c (main): Remove call to initialize_inferiors.
11587 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11588 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11589 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11590 internal_error, gdb_assert, gdb_assert_fail): Delete.
11591 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11592 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11594 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11595 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11596 initialize_inferiors): Delete.
11598 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11600 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11603 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11605 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11607 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11609 2011-05-26 Yao Qi <yao@codesourcery.com>
11611 * Makefile.in (thread-db.o): Track dependence to
11612 common/gdb_thread_db.h.
11613 * thread-db.c: include gdb_thread_db.h from right place.
11615 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11617 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11618 __FILE__ and __LINE__ to internal_error.
11620 2011-05-13 Doug Evans <dje@google.com>
11622 * thread-db.c (try_thread_db_load_from_sdir): New function.
11623 (try_thread_db_load_from_dir): New function.
11624 (thread_db_load_search): Handle $sdir, ignore $pdir.
11625 Remove trying of system directories if search of
11626 libthread-db-search-path fails, that is now done via $sdir.
11628 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11630 * server.c (handle_query): Add EnableDisableTracepoints to the list
11631 of supported features.
11632 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11634 (cmd_qtenable_disable): New.
11635 (cmd_qtstart): Install tracepoints even if disabled.
11636 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11637 receiving a QTEnable or QTDisable packet.
11638 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11639 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11641 (gdb_probe): Skip data collection if static tracepoint is disabled.
11643 2011-05-10 Doug Evans <dje@google.com>
11645 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11647 2011-05-04 Doug Evans <dje@google.com>
11649 * linux-low.c (linux_join): Skip process lookup.
11650 * spu-low.c (spu_join): Ditto.
11651 * server.c (join_inferiors_callback): Delete.
11652 (process_serial_event): For 'D' packet (detach) call join_inferior
11655 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11657 * README: Don't mention xscale*-*-linux*.
11658 * configure.srv (xscale*-*-linux*): Don't handle target.
11660 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11662 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11664 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11665 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11666 (i386_emit_void_call_2): Likewise.
11668 2011-04-26 Yao Qi <yao@codesourcery.com>
11670 * linux-low.c: Move common macros to linux-ptrace.h.
11671 Include linux-ptrace.h.
11672 * Makefile.in (linux_ptrace_h): New.
11673 (linux-low.o): Depends on linux-ptrace.h.
11675 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11677 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11678 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11679 (remote_prepare): New function with most of the TCP code from ...
11680 (remote_open): ... here. Detect PORT here unconditionally. Move also
11681 setting transport_is_reliable.
11682 * server.c (run_once): New variable.
11683 (gdbserver_usage): Document it.
11684 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11685 the first run if RUN_ONCE.
11686 * server.h (run_once, remote_prepare): New declarations.
11688 2011-04-19 Tom Tromey <tromey@redhat.com>
11690 * win32-low.c (handle_load_dll): Remove duplicate "the".
11692 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11694 Remove support for old Cygwin 1.5 versions.
11695 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11696 function to avoid warning.
11697 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11700 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11702 * gdbserver/server.h (Macro _): Define it if not available.
11704 2011-03-14 Michael Snyder <msnyder@vmware.com>
11706 * hostio.c (handle_close): Remove unnecessary null test.
11708 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11710 * Makefile.in (maintainer-clean realclean distclean): Remove
11711 "make ... subdir_do" command.
11713 2011-03-10 Michael Snyder <msnyder@vmware.com>
11715 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11717 * server.c (handle_v_run): Free alloced buffer on early return.
11719 2011-03-09 Yao Qi <yao@codesourcery.com>
11722 2011-03-04 Yao Qi <yao@codesourcery.com>
11724 * Makefile.in: Remove GNU make feature --directory.
11726 2011-03-05 Yao Qi <yao@codesourcery.com>
11728 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11729 (subdir_do): New make target. Copied from gdb/Makefile.
11730 (maintainer-clean, realclean, distclean, clean): Call corresponding
11731 make targets in common/Makefile.
11733 2011-02-11 Yao Qi <yao@codesourcery.com>
11735 * configure.ac: Call AC_PROG_RANLIB.
11736 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11737 * configure: Regenerate.
11739 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11741 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11743 2011-03-06 Yao Qi <yao@codesourcery.com>
11745 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11747 2011-03-05 Yao Qi <yao@codesourcery.com>
11749 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11750 (subdir_do): New make target. Copied from gdb/Makefile.
11751 (maintainer-clean, realclean, distclean, clean): Call corresponding
11752 make targets in common/Makefile.
11754 2011-03-04 Yao Qi <yao@codesourcery.com>
11756 * Makefile.in: Remove GNU make feature --directory.
11758 2011-03-04 Michael Snyder <msnyder@vmware.com>
11760 * server.c (queue_stop_reply): Call xmalloc not malloc.
11762 2011-03-02 Michael Snyder <msnyder@vmware.com>
11764 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11766 2011-02-28 Michael Snyder <msnyder@vmware.com>
11768 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11769 (cmd_qtframe): Ditto.
11770 (cmd_qtbuffer): Ditto.
11771 (cmd_bigqtbuffer): Ditto.
11773 * utils.c (decimal2str): Initialize 'width' to nine, then
11774 don't mess with it.
11776 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11778 * hostio.c (require_data): Free *data, not data.
11780 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11782 * hostio.c (require_data): Use free, not xfree.
11784 2011-02-27 Michael Snyder <msnyder@vmware.com>
11786 * server.c (handle_query): Discard unused value.
11788 * hostio.c (require_data): Free malloc memory before returning
11791 2011-02-26 Michael Snyder <msnyder@vmware.com>
11793 * linux-low.c (list_threads): Call closedir for dirent.
11795 2011-02-27 Michael Snyder <msnyder@vmware.com>
11797 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11798 a case statement falls through.
11800 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11802 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11805 2011-02-26 Michael Snyder <msnyder@vmware.com>
11807 * utils.c (decimal2str): Eliminate dead code and dead param.
11808 (pulongest): Drop dead param from call to decimal2str.
11811 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11813 Revert the following patch (not approved yet):
11814 2011-02-21 Hui Zhu <teawater@gmail.com>
11815 * tracepoint.c (tp_printf): New function.
11816 (eval_agent_expr): Handle gdb_agent_op_printf.
11818 2011-02-21 Hui Zhu <teawater@gmail.com>
11820 * tracepoint.c (tp_printf): New function.
11821 (eval_agent_expr): Handle gdb_agent_op_printf.
11823 2011-02-18 Tom Tromey <tromey@redhat.com>
11825 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11826 (tracepoint.o): Likewise.
11827 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11828 (gdb_agent_op_names): Likewise.
11830 2011-02-18 Tom Tromey <tromey@redhat.com>
11832 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11833 gdb_agent_op_rot>: New constants.
11834 (gdb_agent_op_names): Add pick and roll.
11835 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11838 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11840 * aclocal.m4: Regenerated with aclocal-1.11.1.
11842 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11844 * server.c (handle_qxfer_traceframe_info): New.
11845 (qxfer_packets): Register "traceframe-info".
11846 (handle_query): Report support for qXfer:traceframe-info:read+.
11847 * tracepoint.c (match_blocktype): New.
11848 (traceframe_find_block_type): Rename to ...
11849 (traceframe_walk_blocks): ... this. Add callback filter argument,
11851 (traceframe_find_block_type): New, reimplemented on top of
11852 traceframe_walk_blocks.
11853 (build_traceframe_info_xml): New.
11854 (traceframe_read_info): New.
11855 * server.h (traceframe_read_info): Declare.
11857 2011-02-11 Yao Qi <yao@codesourcery.com>
11859 * configure.ac: Call AC_PROG_RANLIB.
11860 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11861 * configure: Regenerate.
11863 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11865 * server.c (gdb_read_memory): Change return semantics to allow
11867 (handle_search_memory_1): Adjust.
11868 (process_serial_event) <'m' packet>: Handle partial transfers.
11869 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11871 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11873 * regcache.c (init_register_cache): Initialize
11874 regcache->register_status.
11875 (free_register_cache): Release regcache->register_status.
11876 (regcache_cpy): Copy register_status.
11877 (registers_to_string): Print 'x's for unavailable registers.
11878 (supply_register): Mark the register's status valid or
11879 unavailable, depending on whether a buffer was passed in or not.
11880 (supply_register_zeroed): New.
11881 (supply_regblock): Mark the registers' status valid or
11882 unavailable, depending on whether a buffer was passed in or not.
11883 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11884 (struct regcache): New `register_status' field.
11885 (supply_register_zeroed): Declare.
11886 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11887 supply_register_zeroed, rather than passing a NULL buffer to
11889 * tracepoint.c (fetch_traceframe_registers): Update comment.
11891 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11893 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11896 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11898 * server.h (decode_xfer_write): Change prototype.
11899 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11900 and don't extract the annex here.
11901 * server.c (decode_xfer_read): Remove `annex' parameter,
11902 and don't extract the annex here.
11903 (decode_xfer): New.
11904 (struct qxfer): New.
11905 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11906 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11907 (handle_qxfer_statictrace): New functions, abstracted out from
11908 handle_query, and made to use the struct qxfer interface.
11909 (handle_threads_qxfer_proper): Rename to ...
11910 (handle_qxfer_threads_proper): ... this.
11911 (handle_threads_qxfer): Rename to ...
11912 (handle_qxfer_threads): ... this. Adjust.
11913 (qxfer_packets): New array.
11914 (handle_qxfer): New function.
11915 (handle_query): Use handle_qxfer.
11917 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11919 * gdbreplay.c: Shorten lines of >= 80 columns.
11920 * linux-low.c: Ditto.
11921 * linux-ppc-low.c: Ditto.
11922 * linux-s390-low.c: Ditto.
11923 * linux-sparc-low.c: Ditto.
11924 * linux-x86-low.c: Ditto.
11925 * linux-xtensa-low.c: Ditto.
11926 * mem-break.c: Ditto.
11927 * nto-low.c: Ditto.
11928 * regcache.h: Ditto.
11929 * remote-utils.c: Ditto.
11932 * thread-db.c: Ditto.
11933 * tracepoint.c: Ditto.
11935 * win32-low.h: Ditto.
11937 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11939 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11942 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11944 * server.c (gdbserver_version): Update copyright year in version
11946 * gdbreplay.c (gdbreplay_version): Ditto.
11948 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11950 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11951 * linux-bfin-low.c: New file.
11952 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11953 PT_DATA_ADDR for BFIN targets.
11954 * Makefile.in (SFILES): Add linux-bfin-low.c.
11955 (clean): Remove reg-bfin.c.
11956 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11957 * README: Mention supported Blackfin targets.
11959 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11961 * .gitignore: New file.
11963 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11965 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11967 2010-10-22 Jie Zhang <jie@codesourcery.com>
11969 * Makefile.in: Add FLAGS_TO_PASS variable.
11970 (install): Remove dependency of install-only and recursively
11971 invoke make for install-only.
11973 2010-10-04 Doug Evans <dje@google.com>
11975 * Makefile.in (uninstall): Use $(DESTDIR).
11977 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11981 * linux-x86-low.c (compat_siginfo_from_siginfo)
11982 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11983 si_code is < 0. Check for si_code == SI_TIMER before checking for
11986 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11988 * lynx-i386-low.c: New file.
11989 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11991 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11993 * lynx-low.c (ptrace_request_to_str): Remove handling for
11994 request values that have been removed in LynxOS 5.x.
11996 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11998 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
12001 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12003 * configure.ac: Add --enable-inprocess-agent option.
12004 * configure: Rebuilt.
12006 2010-09-06 Yao Qi <yao@codesourcery.com>
12008 * linux-low.c (linux_kill): Remove unused variable.
12009 (linux_stabilize_threads): Likewise.
12010 * server.c (start_inferior): Likewise.
12011 (queue_stop_reply_callback): Likewise.
12012 * tracepoint.c (do_action_at_tracepoint): Likewise.
12014 2010-09-06 Yao Qi <yao@codesourcery.com>
12016 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
12019 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
12021 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
12023 2010-09-06 Pedro Alves <pedro@codesourcery.com>
12025 * Makefile.in (install-only): Replace $IPA_DEPFILES with
12028 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12030 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
12031 gdbserver/lynx-ppc-low.c: New files.
12032 * Makefile.in (lynx_low_h): New variable.
12033 (lynx-low.o, lynx-ppc-low.o): New rules.
12034 * configure.ac: On LynxOS, link with -lnetinet.
12035 * configure.srv: Add handling of powerpc-*-lynxos* targets.
12036 * configure: regenerate.
12038 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12040 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
12041 * configure.ac: Add check for vasprintf and vsnprintf.
12042 * configure, config.in: Regenerate.
12043 * server.h (vasprintf, vsnprintf): Add conditional declarations.
12045 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12047 * gdbreplay.c: Move include of alloca.h up, next to include of
12049 * server.h: Add include of malloc.h.
12050 * mem-break.c: Remove include of malloc.h.
12051 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
12053 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12055 * Makefile.in (memmem.o): Build with -Wno-error.
12057 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12059 * utils.c (xsnprintf): Make non-static.
12060 * server.h: Add xsnprintf declaration.
12061 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
12062 replace calls to snprintf by calls to xsnprintf throughout.
12064 2010-09-01 Joel Brobecker <brobecker@adacore.com>
12066 * configure.ac: Add configure check for alloca.
12067 * configure, config.in: Regenerate.
12068 * server.h: Include alloca.h if it exists.
12069 * gdbreplay.c: Include alloca.h if it exists.
12071 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12073 * linux-low.c (__SIGRTMIN): Define if not already defined.
12074 (linux_create_inferior): Check for __ANDROID__ rather than
12076 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12077 are already deferred.
12078 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12079 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12080 stopped and already has a pending signal to report.
12081 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12082 a pending signal to report or is moving out of a jump pad.
12083 (linux_init_signals): Check for __ANDROID__ rather than
12086 2010-08-28 Pedro Alves <pedro@codesourcery.com>
12088 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12089 debug_threads check. Avoid a linear search when not doing debug
12092 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12094 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12095 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12096 (struct file_handler) <fd>: Change type to gdb_fildes_t.
12097 (process_event): Change local fd's type to gdb_fildes_t.
12098 (create_file_handler): Adjust prototype.
12099 (delete_file_handler): Adjust prototype.
12100 (handle_file_event): Adjust prototype. Use pfildes.
12101 (create_file_event): Adjsut prototype.
12102 * remote-utils.c (remote_desc, listen_desc): Change type to
12104 * server.h: New gdb_fildes_t typedef.
12105 [USE_WIN32API]: Include winsock2.h.
12106 (delete_file_handler, add_file_handler): Adjust prototypes.
12107 (pfildes): Declare.
12108 * utils.c (pfildes): New.
12110 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12112 * configure.ac (build_warnings): Add -Wno-char-subscripts.
12113 * configure: Regenerate.
12115 2010-08-27 Pedro Alves <pedro@codesourcery.com>
12117 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12118 (linux_done_accessing_memory): ... this.
12119 (linux_target_ops): Adjust.
12120 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12121 * nto-low.c (nto_target_ops): Adjust comment.
12122 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12123 * spu-low.c (spu_target_ops): Adjust comment.
12124 * target.h (target_ops): Rename unprepare_to_access_memory field
12125 to done_accessing_memory.
12126 (unprepare_to_access_memory): Rename to ...
12127 (done_accessing_memory): ... this.
12129 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12131 * linux-low.c (linux_prepare_to_access_memory): New.
12132 (linux_unprepare_to_access_memory): New.
12133 (linux_target_ops): Install them.
12134 * server.c (read_memory): Rename to ...
12135 (gdb_read_memory): ... this. Use
12136 prepare_to_access_memory/prepare_to_access_memory.
12137 (write_memory): Rename to ...
12138 (gdb_write_memory): ... this. Use
12139 prepare_to_access_memory/prepare_to_access_memory.
12140 (handle_search_memory_1): Adjust.
12141 (process_serial_event): Adjust.
12142 * target.h (struct target_ops): New fields
12143 prepare_to_access_memory and unprepare_to_access_memory.
12144 (prepare_to_access_memory, unprepare_to_access_memory): New.
12145 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12146 prepare_to_access_memory/prepare_to_access_memory.
12147 * nto-low.c (nto_target_ops): Adjust.
12148 * spu-low.c (spu_target_ops): Adjust.
12149 * win32-low.c (win32_target_ops): Adjust.
12151 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12153 * Makefile.in (WARN_CFLAGS): Get it from configure.
12154 (WERROR_CFLAGS): New.
12155 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12156 * configure.ac: Introduce --enable-werror, which adds -Werror to
12157 the compiler command line. Enabled by default. Disable with
12158 --disable-werror. Add -Wdeclaration-after-statement
12159 Wpointer-arith and -Wformat-nonliteral to warning flags.
12160 * configure: Regenerate.
12162 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12164 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12166 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12168 * gdbreplay.c (remote_error): New.
12170 (expect): Use gdbchar. Check for error reading from GDB.
12171 Clarify sync error output.
12172 (play): Check for errors writing to GDB.
12173 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12174 * remote-utils.c (getpkt): Check for errors writing to the remote
12177 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12179 * linux-low.c (linux_wait_1): Move non-debugging code out of
12180 `debug_threads' control.
12182 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12184 * linux-low.c (linux_wait_1): Don't set last_status here.
12185 * server.c (push_event, queue_stop_reply_callback): Assert we're
12186 not pushing a TARGET_WAITKIND_IGNORE event.
12187 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12188 (myresume, handle_target_event): Set the thread's last_resume_kind
12189 and last_status from the target returned status.
12191 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12195 * linux-x86-low.c (update_debug_registers_callback): New.
12196 (i386_dr_low_set_addr): Use it.
12197 (i386_dr_low_get_addr): New.
12198 (i386_dr_low_set_control): Use update_debug_registers_callback.
12199 (i386_dr_low_get_control): New.
12200 (i386_dr_low_get_status): Adjust.
12201 * linux-low.c (linux_stop_lwp): New.
12202 * linux-low.h (linux_stop_lwp): Declare.
12204 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12205 argument instead of a i386_debug_reg_state.
12206 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12207 a i386_debug_reg_state.
12208 (i386_insert_aligned_watchpoint): Adjust.
12209 (i386_remove_aligned_watchpoint): Adjust.
12210 (i386_low_stopped_data_address): Read the debug registers from the
12211 inferior instead of from the mirrors.
12212 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12213 (i386_dr_low_get_addr): Declare.
12214 (i386_dr_low_get_control): Declare.
12215 (i386_dr_low_get_status): Change prototype.
12217 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12218 (i386_dr_low_get_addr): New.
12219 (i386_dr_low_get_control): New.
12220 (i386_dr_low_get_status): Adjust prototype. Return
12222 (i386_initial_stuff): Clear dr_status_mirror and
12224 (i386_get_thread_context): Adjust.
12225 (i386_set_thread_context): Adjust.
12226 (i386_thread_added): Adjust.
12228 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12230 * linux-low.h (linux_thread_area): Delete declaration.
12232 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12234 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12235 after its termination.
12237 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12239 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12240 (gdb_wants_all_stopped): Delete.
12241 (linux_wait_1): Don't call them.
12242 * server.c (handle_v_cont): Tag all threads as want-stopped.
12243 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12244 stopped as "client-wants-stopped".
12246 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12248 * Makefile.in (signals_h): New.
12249 (server_h): Depend on it.
12250 (server.o): Don't depend on $(signals_def).
12251 (signals.o): Depend on $(signals_def).
12253 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12255 * Makefile.in (signals_def): New.
12256 (server_h): Append include/gdb/signals.h and signals_def.
12257 (server.o): Append signals_def.
12259 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12261 * server.c (handle_target_event): Use target_signal_to_host for
12262 resume_info.sig initialization.
12263 * target.h (struct thread_resume) <sig>: New comment.
12265 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12267 * server.c (handle_query): strcpy() the returned string from paddress()
12268 instead of sprintf().
12269 * utils.c (paddress): Return phex_nz().
12271 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12273 * server.c (handle_v_cont): Call mourn_inferior if process
12275 (myresume): Likewise.
12277 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12279 Static tracepoints, and integration with UST.
12281 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12282 * mem-break.c (uninsert_all_breakpoints)
12283 (reinsert_all_breakpoints): New.
12284 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12285 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12286 (gdb_agent_ust_loaded, helper_thread_id)
12287 (gdb_agent_helper_thread_id): New macros.
12288 (struct ipa_sym_addresses): Add addr_ust_loaded,
12289 addr_helper_thread_id, addr_cmd_buf.
12290 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12291 (in_process_agent_loaded_ust): New.
12292 (write_e_ust_not_loaded): New.
12293 (maybe_write_ipa_ust_not_loaded): New.
12294 (struct collect_static_trace_data_action): New.
12295 (enum tracepoint_type) <static_tracepoint>: New.
12296 (struct tracepoint) <handle>: Mention static tracepoints.
12297 (struct static_tracepoint_ctx): New.
12298 (CMD_BUF_SIZE): New.
12299 (add_tracepoint_action): Handle static tracepoint actions.
12300 (unprobe_marker_at): New.
12301 (clear_installed_tracepoints): Handle static tracepoints.
12302 (cmd_qtdp): Handle static tracepoints.
12303 (probe_marker_at): New.
12304 (cmd_qtstart): Handle static tracepoints.
12305 (response_tracepoint): Handle static tracepoints.
12306 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12307 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12308 (get_context_regcache): Handle static tracepoints.
12309 (do_action_at_tracepoint): Handle static tracepoint actions.
12310 (traceframe_find_block_type): Handle static trace data blocks.
12311 (traceframe_read_sdata): New.
12312 (download_tracepoints): Download static tracepoint actions.
12313 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12314 (GDB_PROBE_NAME): New.
12316 (GET_UST_SYM): New.
12319 (ust_marker_to_static_tracepoint): New.
12321 (collect_ust_data_at_tracepoint): New.
12322 (gdb_ust_probe): New.
12323 (UNIX_PATH_MAX, SOCK_DIR): New.
12324 (gdb_ust_connect_sync_socket): New.
12325 (resume_thread, stop_thread): New.
12326 (run_inferior_command): New.
12327 (init_named_socket): New.
12328 (gdb_ust_socket_init): New.
12329 (cstr_to_hexstr): New.
12331 (first_marker, next_marker): New.
12332 (response_ust_marker): New.
12333 (cmd_qtfstm, cmd_qtsstm): New.
12334 (unprobe_marker_at, probe_marker_at): New.
12335 (cmd_qtstmat, gdb_ust_thread): New.
12336 (gdb_ust_init): New.
12337 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12338 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12339 (ST_REGENTRY): New.
12340 (x86_64_st_collect_regmap): New.
12341 (X86_64_NUM_ST_COLLECT_GREGS): New.
12342 (AMD64_RIP_REGNUM): New.
12343 (supply_static_tracepoint_registers): New.
12344 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12345 (ST_REGENTRY): New.
12346 (i386_st_collect_regmap): New.
12347 (i386_NUM_ST_COLLECT_GREGS): New.
12348 (supply_static_tracepoint_registers): New.
12349 * server.c (handle_query): Handle qXfer:statictrace:read.
12350 <qSupported>: Report support for StaticTracepoints, and
12351 qXfer:statictrace:read features.
12352 * server.h (traceframe_read_sdata)
12353 (supply_static_tracepoint_registers): Declare.
12354 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12355 (unpack_varlen_hex): Include in IPA build.
12356 * Makefile.in (ustlibs, ustinc): New.
12357 (IPA_OBJS): Add remote-utils-ipa.o.
12358 ($(IPA_LIB)): Link -ldl and -lpthread.
12360 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12361 * config.in, configure: Regenerate.
12363 2010-06-20 Ian Lance Taylor <iant@google.com>
12364 Pedro Alves <pedro@codesourcery.com>
12366 * linux-x86-low.c (always_true): Delete.
12367 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12368 trying to fool the compiler with always_true.
12370 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12372 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12373 conditions in gdbserver.
12375 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12377 * spu-low.c (spu_read_memory): Wrap around local store limit.
12378 (spu_write_memory): Likewise.
12380 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12382 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12383 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12385 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12387 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12388 uses with LONGEST uses.
12390 2010-06-14 Stan Shebs <stan@codesourcery.com>
12391 Pedro Alves <pedro@codesourcery.com>
12395 * linux-x86-low.c: Include limits.h.
12397 (always_true): New.
12400 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12401 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12402 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12403 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12404 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12405 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12406 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12407 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12408 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12409 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12410 (amd64_emit_void_call_2): New.
12411 (amd64_emit_ops): New.
12412 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12413 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12414 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12415 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12416 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12417 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12418 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12419 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12420 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12421 (i386_emit_stack_adjust, i386_emit_int_call_1)
12422 (i386_emit_void_call_2): New.
12423 (i386_emit_ops): New.
12424 (x86_emit_ops): New.
12425 (the_low_target): Install x86_emit_ops.
12426 * server.h (struct emit_ops): New.
12427 (get_raw_reg_func_addr): Declare.
12428 (current_insn_ptr, emit_error): Declare.
12429 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12430 (set_trace_state_variable_value): New defines.
12431 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12432 addr_get_trace_state_variable_value and
12433 addr_set_trace_state_variable_value.
12434 (symbol_list): New fields for get_raw_reg,
12435 get_trace_state_variable_value and set_trace_state_variable_value.
12436 (condfn): New typedef.
12437 (struct tracepoint): New field `compiled_cond'.
12438 (do_action_at_tracepoint): Clear compiled_cond.
12439 (get_trace_state_variable_value, set_trace_state_variable_value):
12441 (condition_true_at_tracepoint): If there's a compiled condition,
12443 (current_insn_ptr, emit_error): New globals.
12444 (struct bytecode_address): New.
12445 (get_raw_reg_func_addr): New.
12446 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12447 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12448 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12449 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12450 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12451 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12452 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12453 (compile_tracepoint_condition, compile_bytecodes): New.
12454 * target.h (emit_ops): Forward declare.
12455 (struct target_ops): New field emit_ops.
12456 (target_emit_ops): New.
12457 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12458 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12459 * linux-low.c (linux_emit_ops): New.
12460 (linux_target_ops): Install it.
12461 * linux-low.h (struct linux_target_ops): New field emit_ops.
12463 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12465 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12466 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12468 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12469 Stan Shebs <stan@codesourcery.com>
12471 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12472 (all): Depend on $(extra_libraries).
12473 (install-only): Install the IPA.
12474 (IPA_OBJS, IPA_LIB): New.
12475 (clean): Remove the IPA lib.
12476 (IPAGENT_CFLAGS): New.
12477 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12478 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12479 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12480 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12481 * configure.ac: Check for atomic builtins support in the compiler.
12482 (IPA_DEPFILES, extra_libraries): Define.
12483 * configure.srv (ipa_obj): Add description.
12484 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12485 (i[34567]86-*-linux*): Set ipa_obj.
12486 (x86_64-*-linux*): Set ipa_obj.
12487 * linux-low.c (stabilizing_threads): New.
12488 (supports_fast_tracepoints): New.
12489 (linux_detach): Stabilize threads before detaching.
12490 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12491 the lwp is either not stabilizing, or is moving out of a jump pad.
12492 (linux_fast_tracepoint_collecting): New.
12493 (maybe_move_out_of_jump_pad): New.
12494 (enqueue_one_deferred_signal): New.
12495 (dequeue_one_deferred_signal): New.
12496 (linux_wait_for_event_1): If moving out of a jump pad, defer
12497 pending signals to later.
12498 (linux_stabilize_threads): New.
12499 (linux_wait_1): Check if threads need moving out of jump pads, and
12501 (stuck_in_jump_pad_callback): New.
12502 (move_out_of_jump_pad_callback): New.
12503 (lwp_running): New.
12504 (linux_resume_one_lwp): Handle moving out of jump pads.
12505 (linux_set_resume_request): Dequeue deferred signals.
12506 (need_step_over_p): Also step over fast tracepoint jumps.
12507 (start_step_over): Also uninsert fast tracepoint jumps.
12508 (finish_step_over): Also reinsert fast tracepoint jumps.
12509 (linux_install_fast_tracepoint_jump): New.
12510 (linux_target_ops): Install linux_stabilize_threads and
12511 linux_install_fast_tracepoint_jump_pad.
12512 * linux-low.h (linux_target_ops) <get_thread_area,
12513 install_fast_tracepoint_jump_pad>: New fields.
12514 (struct lwp_info) <collecting_fast_tracepoint,
12515 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12516 (linux_get_thread_area): Declare.
12517 * linux-x86-low.c (jump_insn): New.
12518 (x86_get_thread_area): New.
12519 (append_insns): New.
12520 (push_opcode): New.
12521 (amd64_install_fast_tracepoint_jump_pad): New.
12522 (i386_install_fast_tracepoint_jump_pad): New.
12523 (x86_install_fast_tracepoint_jump_pad): New.
12524 (the_low_target): Install x86_get_thread_area and
12525 x86_install_fast_tracepoint_jump_pad.
12526 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12527 (struct fast_tracepoint_jump): New.
12528 (fast_tracepoint_jump_insn): New.
12529 (fast_tracepoint_jump_shadow): New.
12530 (find_fast_tracepoint_jump_at): New.
12531 (fast_tracepoint_jump_here): New.
12532 (delete_fast_tracepoint_jump): New.
12533 (set_fast_tracepoint_jump): New.
12534 (uninsert_fast_tracepoint_jumps_at): New.
12535 (reinsert_fast_tracepoint_jumps_at): New.
12536 (set_breakpoint_at): Use write_inferior_memory.
12537 (uninsert_raw_breakpoint): Use write_inferior_memory.
12538 (check_mem_read): Mask out fast tracepoint jumps.
12539 (check_mem_write): Mask out fast tracepoint jumps.
12540 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12541 (set_fast_tracepoint_jump): Declare.
12542 (delete_fast_tracepoint_jump)
12543 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12544 (reinsert_fast_tracepoint_jumps_at): Declare.
12545 * regcache.c: Don't compile many functions when building the
12546 in-process agent library.
12547 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12548 the register buffer in the heap.
12549 (free_register_cache): If the register buffer isn't owned by the
12550 regcache, don't free it.
12551 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12552 pre-existing register caches.
12553 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12555 (convert_ascii_to_int): : Constify `from' parameter type.
12556 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12557 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12558 the needed buffer in-place.
12559 (relocate_instruction): New.
12560 * server.c (handle_query) <qSymbols>: If the target supports
12561 tracepoints, give it a chance of looking up symbols. Report
12562 support for fast tracepoints.
12563 (handle_status): Stabilize threads.
12564 (process_serial_event): Adjust.
12565 * server.h (struct fast_tracepoint_jump): Forward declare.
12566 (struct process_info) <fast_tracepoint_jumps>: New field.
12567 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12568 (decode_X_packet, decode_M_packet): Adjust.
12569 (relocate_instruction): Declare.
12570 (in_process_agent_loaded): Declare.
12571 (tracepoint_look_up_symbols): Declare.
12572 (struct fast_tpoint_collect_status): Declare.
12573 (fast_tracepoint_collecting): Declare.
12574 (force_unlock_trace_buffer): Declare.
12575 (handle_tracepoint_bkpts): Declare.
12576 (initialize_low_tracepoint)
12577 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12578 * target.h (struct target_ops) <stabilize_threads,
12579 install_fast_tracepoint_jump_pad>: New fields.
12580 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12581 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12582 [HAVE_STDINT_H]: Include stdint.h.
12583 (trace_debug_1): Rename to ...
12584 (trace_vdebug): ... this.
12585 (trace_debug): Rename to ...
12586 (trace_debug_1): ... this. Add `level' parameter.
12587 (trace_debug): New.
12588 (ATTR_USED, ATTR_NOINLINE): New.
12589 (IP_AGENT_EXPORT): New.
12590 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12591 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12592 (about_to_request_buffer_space, trace_buffer_is_full)
12593 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12594 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12595 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12596 (traceframe_write_count, traceframes_created)
12597 (trace_state_variables)
12598 New renaming defines.
12599 (struct ipa_sym_addresses): New.
12600 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12601 (symbol_list): New.
12602 (ipa_sym_addrs): New.
12603 (all_tracepoint_symbols_looked_up): New.
12604 (in_process_agent_loaded): New.
12605 (write_e_ipa_not_loaded): New.
12606 (maybe_write_ipa_not_loaded): New.
12607 (tracepoint_look_up_symbols): New.
12608 (debug_threads) [IN_PROCESS_AGENT]: New.
12609 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12610 (UNKNOWN_SIDE_EFFECTS): New.
12611 (stop_tracing): New.
12612 (flush_trace_buffer): New.
12613 (stop_tracing_bkpt): New.
12614 (flush_trace_buffer_bkpt): New.
12615 (read_inferior_integer): New.
12616 (read_inferior_uinteger): New.
12617 (read_inferior_data_pointer): New.
12618 (write_inferior_data_pointer): New.
12619 (write_inferior_integer): New.
12620 (write_inferior_uinteger): New.
12621 (struct collect_static_trace_data_action): Delete.
12622 (enum tracepoint_type): New.
12623 (struct tracepoint) <type>: New field `type'.
12624 <actions_str, step_actions, step_actions_str>: Only include in
12626 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12627 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12628 (tracepoints): Use IP_AGENT_EXPORT.
12629 (last_tracepoint): Don't include in the IPA.
12630 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12631 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12632 (alloced_trace_state_variables): New.
12633 (trace_state_variables): Use IP_AGENT_EXPORT.
12634 (traceframe_t): Delete unused variable.
12635 (circular_trace_buffer): Don't include in the IPA.
12636 (trace_buffer_start): Delete.
12637 (struct trace_buffer_control): New.
12638 (trace_buffer_free): Delete.
12639 (struct ipa_trace_buffer_control): New.
12640 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12641 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12643 (trace_buffer_ctrl): New.
12644 (TRACE_BUFFER_CTRL_CURR): New.
12645 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12646 Reimplement as macros.
12647 (trace_buffer_wrap): Delete.
12648 (traceframe_write_count, traceframe_read_count)
12649 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12650 (struct tracepoint_hit_ctx) <type>: New field.
12651 (struct fast_tracepoint_ctx): New.
12652 (memory_barrier): New.
12654 (record_tracepoint_error): Update atomically in the IPA.
12655 (clear_inferior_trace_buffer): New.
12656 (about_to_request_buffer_space): New.
12657 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12658 updating the same buffer.
12659 (add_tracepoint): Default the tracepoint's type to trap
12660 tracepoint, and orig_size to -1.
12661 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12662 internal variables.
12663 (create_trace_state_variable): New parameter `gdb'. Handle it.
12664 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12665 (cmd_qtdp): Handle fast tracepoints.
12666 (cmd_qtdv): Adjust.
12667 (max_jump_pad_size): New.
12668 (gdb_jump_pad_head): New.
12669 (get_jump_space_head): New.
12670 (claim_jump_space): New.
12671 (sort_tracepoints): New.
12672 (MAX_JUMP_SIZE): New.
12673 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12675 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12676 support. Upload fast traceframes, and delete internal IPA
12678 (stop_tracing_handler): New.
12679 (flush_trace_buffer_handler): New.
12680 (cmd_qtstop): Upload fast tracepoints.
12681 (response_tracepoint): Handle fast tracepoints.
12682 (tracepoint_finished_step): Upload fast traceframes. Set the
12683 tracepoint hit context's tracepoint type.
12684 (handle_tracepoint_bkpts): New.
12685 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12686 type. Add comment about fast tracepoints.
12687 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12688 non-existing action_str field.
12689 (get_context_regcache): Handle fast tracepoints.
12690 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12692 (fast_tracepoint_from_jump_pad_address): New.
12693 (fast_tracepoint_from_ipa_tpoint_address): New.
12694 (collecting_t): New.
12695 (force_unlock_trace_buffer): New.
12696 (fast_tracepoint_collecting): New.
12698 (gdb_collect): New.
12699 (write_inferior_data_ptr): New.
12700 (target_tp_heap): New.
12701 (target_malloc): New.
12702 (download_agent_expr): New.
12704 (download_tracepoints): New.
12705 (download_trace_state_variables): New.
12706 (upload_fast_traceframes): New.
12707 (IPA_FIRST_TRACEFRAME): New.
12708 (IPA_NEXT_TRACEFRAME_1): New.
12709 (IPA_NEXT_TRACEFRAME): New.
12710 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12711 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12712 (gdb_jump_pad_buffer_end): New.
12713 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12714 (initialize_tracepoint): Adjust.
12715 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12716 buffer. Initialize the low module.
12717 * utils.c (PREFIX, TOOLNAME): New.
12718 (malloc_failure): Use PREFIX.
12719 (error): In the IPA, an error causes an exit.
12720 (fatal, warning): Use PREFIX.
12721 (internal_error): Use TOOLNAME.
12722 (NUMCELLS): Increase to 10.
12723 * configure, config.in: Regenerate.
12725 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12727 * server.c (handle_query) <qSupported>: Do two passes over the
12728 qSupported string to avoid nesting strtok.
12730 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12732 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12734 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12735 -Wl,--dynamic-list.
12736 * configure: Regenerate.
12737 * proc-service.list: New.
12739 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12741 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12744 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12746 * gdbreplay.c (remote_open): Check error return from socket() call by
12747 its equality to -1 not by it being negative.
12748 * remote-utils.c (remote_open): Likewise.
12750 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12752 * config.h: Regenerate.
12754 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12756 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12757 doesn't provide PTRACE_GET_THREAD_AREA.
12759 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12761 * linux-m68k-low.c: Include <asm/ptrace.h>
12762 (ps_get_thread_area): Implement.
12764 2010-05-03 Doug Evans <dje@google.com>
12766 * event-loop.c (struct callback_event): New struct.
12767 (callback_list): New global.
12768 (append_callback_event, delete_callback_event): New functions.
12769 (process_callback): New function.
12770 (start_event_loop): Call it.
12771 * remote-utils.c (NOT_SCHEDULED): Define.
12772 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12773 moved out of readchar.
12774 (readchar): Rewrite. Call reschedule before returning.
12775 (reset_readchar): New function.
12776 (remote_close): Call it.
12777 (process_remaining, reschedule): New functions.
12778 * server.h (callback_handler_func): New typedef.
12779 (append_callback_event, delete_callback_event): Declare.
12781 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12783 * proc-service.c (ps_pglobal_lookup): Use
12784 thread_db_look_up_one_symbol.
12785 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12786 parameter. Use it instead of all_symbols_looked_up.
12787 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12789 (all_symbols_looked_up): Don't declare.
12790 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12791 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12793 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12794 Set all_symbols_looked_up here.
12795 (thread_db_look_up_one_symbol): New.
12796 (thread_db_get_tls_address): Adjust.
12797 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12798 thread_db object on the heap, and tentatively set it in the
12800 (thread_db_init): Don't set all_symbols_looked_up here.
12801 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12803 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12805 * linux-low.c (linux_kill, linux_detach): Adjust.
12806 (status_pending_p_callback): Remove redundant statement. Check
12807 for !TARGET_WAITIKIND_IGNORE, instead of
12808 TARGET_WAITKIND_STOPPED.
12809 (handle_tracepoints): Make sure LWP is locked. Adjust.
12810 (linux_wait_for_event_1): Adjust.
12811 (linux_cancel_breakpoints): New.
12812 (unsuspend_one_lwp): New.
12813 (unsuspend_all_lwps): New.
12814 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12815 (send_sigstop_callback): Change return type to int, add new
12816 `except' parameter and handle it.
12817 (suspend_and_send_sigstop_callback): New.
12818 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12819 pass them down. If SUSPEND, also increment the lwp's suspend
12821 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12822 (need_step_over_p): Don't consider suspended LWPs.
12823 (start_step_over): Adjust.
12824 (proceed_one_lwp): Change return type to int, add new `except'
12825 parameter and handle it.
12826 (unsuspend_and_proceed_one_lwp): New.
12827 (proceed_all_lwps): Use find_inferior instead of
12829 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12830 also decrement the suspend count of LWPs. Pass `except' down,
12831 instead of hacking its suspend count.
12832 (linux_pause_all): Add `freeze' parameter. Adjust.
12833 (linux_unpause_all): New.
12834 (linux_target_ops): Install linux_unpause_all.
12835 * server.c (handle_status): Adjust.
12836 * target.h (struct target_ops): New fields `unpause_all' and
12837 `cancel_breakpoints'. Add new parameter to `pause_all'.
12838 (pause_all): Add new `freeze' parameter.
12839 (unpause_all): New.
12840 (cancel_breakpoints): New.
12841 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12842 cancel breakpoints.
12843 (cmd_qtstart): Pause threads.
12844 (stop_tracing): Pause threads, and cancel breakpoints.
12845 * win32-low.c (win32_target_ops): Adjust.
12847 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12849 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12850 the inferior right away from here...
12851 (linux_wait_1): ... to here, and adjust to check the thread's
12852 last_resume_kind instead of the lwp's step or stop_expected flags.
12854 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12856 * README: Use consistent `GDB' and `GDBserver' spellings.
12858 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12860 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12861 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12862 (linux_detach_one_lwp): Assume the lwp is stopped.
12863 (any_thread_of): Delete.
12864 (linux_detach): Stop all lwps here. Don't blindly delete all
12866 (delete_lwp_callback): New.
12867 (linux_mourn): Delete all lwps of the process that is gone.
12868 (linux_wait_1): Don't delete the last lwp of the process here.
12869 * mem-break.h (mark_breakpoints_out): Declare.
12870 * mem-break.c (mark_breakpoints_out): New.
12871 (free_all_breakpoints): Use it.
12872 * server.c (handle_target_event): If the process is gone, mark
12874 * thread-db.c (struct thread_db) <create_bp>: New field.
12875 (thread_db_enable_reporting): Fix prototype. Store a thread event
12876 breakpoint reference in the thread_db struct.
12877 (thread_db_load_search): Clear the thread_db object.
12878 (try_thread_db_load_1): Ditto.
12879 (switch_to_process): New.
12880 (disable_thread_event_reporting): Use it.
12881 (remove_thread_event_breakpoints): New.
12882 (thread_db_detach, thread_db_mourn): Use it.
12884 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12886 * linux-low.c (linux_enable_event_reporting): New.
12887 (linux_wait_for_event_1, handle_extended_wait): Use it.
12889 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12891 * linux-low.c (linux_kill_one_lwp, linux_kill)
12892 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12893 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12894 SIGSTOP even if the LWP is stopped.
12895 (send_sigstop_callback): New.
12896 (stop_all_lwps): Use send_sigstop_callback instead.
12897 (linux_resume_one_thread): Adjust.
12898 (proceed_one_lwp): Still proceed an LWP that the client has
12899 requested to stop, if we haven't reported it as stopped yet. Make
12900 sure that LWPs the client want stopped, have a pending SIGSTOP.
12902 2010-04-26 Doug Evans <dje@google.com>
12904 * server.c (handle_general_set): Make static.
12906 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12907 Print received char after testing for error/eof instead of before.
12908 (input_interrupt): Tweak comment.
12910 2010-04-23 Doug Evans <dje@google.com>
12912 * server.c (start_inferior): Print inferior argv if --debug.
12914 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12916 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12917 * nto-x86-low.c: Include server.h
12919 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12921 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12922 be consistent with other sources of this directory.
12923 (init_registers_amd64): Correct name of source file of this function
12926 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12928 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12929 64-bit executables.
12931 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12933 * win32-i386-low.c: Add 64-bit support.
12934 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12935 (init_registers_amd64): Declare.
12936 (mappings): Add 64-bit version of array.
12937 (init_windows_x86): New function.
12938 (the_low_target): Change init_arch field to init_windows_x86.
12940 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12942 * win32-low.c: Adapt to support also 64-bit architecture.
12943 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12944 (get_image_name): Use SIZE_T type for local variable `done'.
12945 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12946 (toolhelp_get_dll_name): Idem.
12947 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12948 Use uintptr_t typecast to avoid warning.
12949 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12950 (handle_exception): Use phex_nz to avoid warning.
12951 (win32_wait): Remove unused local variable `process'.
12953 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12955 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12958 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12960 * configure.ac: Use `ws2_32' library for srv_mingw.
12961 * configure: Regenerate.
12962 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12963 * remote-utils.c: Likewise.
12965 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12967 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12968 if __x86_64__ is defined.
12970 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12972 * configure: Regenerate.
12974 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12976 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12977 * target.h (target_ops): New get_tib_address field.
12978 * win32-low.h (win32_thread_info): Add thread_local_base field.
12979 * win32-low.c (child_add_thread): Add tlb argument.
12980 Set thread_local_base field to TLB.
12981 (get_child_debug_event): Adapt to child_add_thread change.
12982 (win32_get_tib_address): New function.
12983 (win32_target_ops): Set get_tib_address field to
12984 win32_get_tib_address.
12985 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12987 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12989 * linux-low.c (linux_mourn): Also remove the process.
12990 * server.c (handle_target_event): Don't remove the process here.
12991 * nto-low.c (nto_mourn): New.
12992 (nto_target_ops): Install it.
12993 * spu-low.c (spu_mourn): New.
12994 (spu_target_ops): Install it.
12995 * win32-low.c (win32_mourn): New.
12996 (win32_target_ops): Install it.
12998 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13000 * server.h (buffer_xml_printf): Remove redundant `;'.
13002 2010-04-12 Pedro Alves <pedro@codesourcery.com>
13004 * regcache.c (set_register_cache): Invalidate regcaches before
13005 changing the register cache layout.
13006 (regcache_invalidate_one): Allow a NULL regcache.
13007 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
13008 regcaches before changing the register cache layout or the target
13011 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
13013 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
13014 variable warning on Linux/x86-64.
13016 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13018 GDBserver disconnected tracing support.
13020 * linux-low.c (linux_remove_process): Delete.
13021 (add_lwp): Don't set last_resume_kind here.
13022 (linux_kill): Use `mourn'.
13023 (linux_detach): Use `thread_db_detach', and `mourn'.
13024 (linux_mourn): New.
13025 (linux_attach_lwp_1): Adjust comment.
13026 (linux_attach): last_resume_kind moved the thread_info; adjust.
13027 (status_pending_p_callback): Adjust.
13028 (linux_wait_for_event_1): Adjust.
13029 (count_events_callback, select_singlestep_lwp_callback)
13030 (select_event_lwp_callback, cancel_breakpoints_callback)
13031 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
13032 (proceed_one_lwp): Adjust.
13033 (linux_async): Add debug output.
13034 (linux_thread_stopped): New.
13035 (linux_pause_all): New.
13036 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
13038 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
13039 (thread_db_free): Delete declaration.
13040 (thread_db_detach, thread_db_mourn): Declare.
13041 * thread-db.c (thread_db_init): Use thread_db_mourn.
13042 (thread_db_free): Delete, split in two.
13043 (disable_thread_event_reporting): New.
13044 (thread_db_detach): New.
13045 (thread_db_mourn): New.
13047 * server.h (struct thread_info) <last_resume_kind>: New field.
13048 <attached>: Add comment.
13049 <gdb_detached>: New field.
13050 (handler_func): Change return type to int.
13051 (handle_serial_event, handle_target_event): Ditto.
13052 (gdb_connected): Declare.
13054 (disconnected_tracing): Declare.
13055 (stop_tracing): Declare.
13057 * server.c (handle_query) <qSupported>: Report support for
13058 disconnected tracing.
13059 (queue_stop_reply_callback): Account for running threads.
13060 (gdb_wants_thread_stopped): New.
13061 (gdb_wants_all_threads_stopped): New.
13062 (gdb_reattached_process): New.
13063 (handle_status): Clear the `gdb_detached' flag of all processes.
13064 In all-stop, stop all threads.
13065 (main): Be sure to leave tfind mode. Handle disconnected tracing.
13066 (process_serial_event): If the remote connection breaks, or if an
13067 exit was forced with "monitor exit", force an event loop exit.
13068 Handle disconnected tracing on detach.
13069 (handle_serial_event): Adjust.
13070 (handle_target_event): If GDB isn't connected, forward events back
13071 to the inferior, unless the last process exited, in which case,
13072 exit gdbserver. Adjust interface.
13074 * remote-utils.c (remote_open): Don't block in accept. Instead
13075 register an event loop source on the listen socket file
13076 descriptor. Refactor bits into ...
13077 (listen_desc): ... this new global.
13078 (gdb_connected): ... this new function.
13079 (enable_async_notification): ... this new function.
13080 (handle_accept_event): ... this new function.
13081 (remote_close): Clear remote_desc.
13083 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13085 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13087 (mourn_inferior): Define.
13088 (target_process_qsupported): Avoid the dangling else problem.
13089 (thread_stopped): Define.
13090 (pause_all): Define.
13091 (target_waitstatus_to_string): Declare.
13092 * target.c (target_waitstatus_to_string): New.
13094 * tracepoint.c (tracing): Make extern.
13095 (disconnected_tracing): New.
13096 (stop_tracing): Make extern. Handle tracing stops due to GDB
13098 (cmd_qtdisconnected): New.
13099 (cmd_qtstatus): Report disconnected tracing status in trace reply.
13100 (handle_tracepoint_general_set): Handle QTDisconnected.
13102 * event-loop.c (event_handler_func): Change return type to int.
13103 (process_event): Bail out if the event handler wants the event
13105 (handle_file_event): Ditto.
13106 (start_event_loop): Bail out if the event handler wants the event
13109 * nto-low.c (nto_target_ops): Adjust.
13110 * spu-low.c (spu_wait): Don't remove the process here.
13111 (spu_target_ops): Adjust.
13112 * win32-low.c (win32_wait): Don't remove the process here.
13113 (win32_target_ops): Adjust.
13115 2010-04-11 Pedro Alves <pedro@codesourcery.com>
13117 * regcache.c (realloc_register_cache): Invalidate inferior's
13118 regcache before recreating it.
13120 2010-04-09 Pedro Alves <pedro@codesourcery.com>
13122 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13124 2010-04-09 Stan Shebs <stan@codesourcery.com>
13125 Pedro Alves <pedro@codesourcery.com>
13127 * server.h (LONGEST): New.
13128 (struct thread_info) <while_stepping>: New field.
13129 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13131 (initialize_tracepoint, handle_tracepoint_general_set)
13132 (handle_tracepoint_query, tracepoint_finished_step)
13133 (tracepoint_was_hit, release_while_stepping_state_list):
13134 (current_traceframe): Declare.
13135 * server.c (handle_general_set): Handle tracepoint packets.
13136 (read_memory): New.
13137 (write_memory): New.
13138 (handle_search_memory_1): Use read_memory.
13139 (handle_query): Report support for conditional tracepoints, trace
13140 state variables, and tracepoint sources. Handle tracepoint
13142 (main): Initialize the tracepoints module.
13143 (process_serial_event): Handle traceframe reads/writes.
13145 * linux-low.c (handle_tracepoints): New.
13146 (linux_wait_1): Call it.
13147 (linux_resume_one_lwp): Handle while-stepping.
13148 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13149 (linux_target_ops): Install them.
13150 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13152 * linux-x86-low.c (x86_supports_tracepoints): New.
13153 (the_low_target). Install it.
13155 * mem-break.h (delete_breakpoint): Declare.
13156 * mem-break.c (delete_breakpoint): Make external.
13158 * target.h (struct target_ops): Add `supports_tracepoints',
13159 `read_pc', and `write_pc' fields.
13160 (target_supports_tracepoints): Define.
13161 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13164 * regcache.h (struct regcache) <registers_owned>: New field.
13165 (init_register_cache, regcache_cpy): Declare.
13166 (regcache_read_pc, regcache_write_pc): Declare.
13167 (register_cache_size): Declare.
13168 (supply_regblock): Declare.
13169 * regcache.c (init_register_cache): New.
13170 (new_register_cache): Use it.
13171 (regcache_cpy): New.
13172 (register_cache_size): New.
13173 (supply_regblock): New.
13174 (regcache_read_pc, regcache_write_pc): New.
13176 * tracepoint.c: New.
13178 * Makefile.in (OBS): Add tracepoint.o.
13179 (tracepoint.o): New rule.
13181 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13183 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13185 (i386-mmx.c): Likewise.
13186 (i386-mmx-linux.o): Likewise.
13187 (i386-mmx-linux.c): Likewise.
13189 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13190 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13191 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13192 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13194 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13195 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13196 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13198 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13200 * Makefile.in (clean): Updated.
13202 (i386-avx.c): Likewise.
13203 (i386-avx-linux.o): Likewise.
13204 (i386-avx-linux.c): Likewise.
13205 (amd64-avx.o): Likewise.
13206 (amd64-avx.c): Likewise.
13207 (amd64-avx-linux.o): Likewise.
13208 (amd64-avx-linux.c): Likewise.
13210 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13211 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13212 (srv_amd64_regobj): Add amd64-avx.o.
13213 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13214 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13215 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13216 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13217 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13218 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13219 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13221 * i387-fp.c: Include "i386-xstate.h".
13223 (i387_cache_to_xsave): Likewise.
13224 (i387_xsave_to_cache): Likewise.
13225 (x86_xcr0): Likewise.
13227 * i387-fp.h (i387_cache_to_xsave): Likewise.
13228 (i387_xsave_to_cache): Likewise.
13229 (x86_xcr0): Likewise.
13231 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13232 * linux-crisv32-low.c (target_regsets): Likewise.
13233 * linux-m68k-low.c (target_regsets): Likewise.
13234 * linux-mips-low.c (target_regsets): Likewise.
13235 * linux-ppc-low.c (target_regsets): Likewise.
13236 * linux-s390-low.c (target_regsets): Likewise.
13237 * linux-sh-low.c (target_regsets): Likewise.
13238 * linux-sparc-low.c (target_regsets): Likewise.
13239 * linux-xtensa-low.c (target_regsets): Likewise.
13241 * linux-low.c: Include <sys/uio.h>.
13242 (regsets_fetch_inferior_registers): Support nt_type.
13243 (regsets_store_inferior_registers): Likewise.
13244 (linux_process_qsupported): New.
13245 (linux_target_ops): Add linux_process_qsupported.
13247 * linux-low.h (regset_info): Add nt_type.
13248 (linux_target_ops): Add process_qsupported.
13250 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13252 (init_registers_i386_avx_linux): New.
13253 (init_registers_amd64_avx_linux): Likewise.
13254 (xmltarget_i386_linux_no_xml): Likewise.
13255 (xmltarget_amd64_linux_no_xml): Likewise.
13256 (PTRACE_GETREGSET): Likewise.
13257 (PTRACE_SETREGSET): Likewise.
13258 (x86_fill_xstateregset): Likewise.
13259 (x86_store_xstateregset): Likewise.
13260 (use_xml): Likewise.
13261 (x86_linux_update_xmltarget): Likewise.
13262 (x86_linux_process_qsupported): Likewise.
13263 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13264 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13265 init_registers_i386_linux here. Call
13266 x86_linux_update_xmltarget.
13267 (the_low_target): Add x86_linux_process_qsupported.
13269 * server.c (handle_query): Call target_process_qsupported.
13271 * target.h (target_ops): Add process_qsupported.
13272 (target_process_qsupported): New.
13274 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13276 * inferiors.c (add_thread): Set last_status kind to
13277 TARGET_WAITKIND_IGNORE.
13278 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13279 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13280 (linux_wait_1): Move `thread' local definition to block that uses
13281 it. Don't NULL initialize `event_child'.
13282 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13283 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13284 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13286 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13288 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13289 an extended waitstatus, or by a watchpoint.
13290 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13291 thread was stepping or has been stopped by a watchpoint.
13293 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13295 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13296 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13297 of another, then delete the previous, and validate all
13299 (validate_inserted_breakpoint): New.
13300 (delete_disabled_breakpoints): New.
13301 (validate_breakpoints): New.
13302 (check_mem_read): Validate breakpoints before trusting their
13303 shadow. Delete disabled breakpoints.
13304 (check_mem_write): Validate breakpoints before trusting they
13305 should be inserted. Delete disabled breakpoints.
13306 * mem-break.h (validate_breakpoints):
13307 * server.c (handle_query): Validate breakpoints when we see a
13310 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13312 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13313 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13314 if we could tell there's a GDB breakpoint at stop_pc.
13315 (need_step_over_p): Don't do a step over if we find a GDB
13316 breakpoint at the resume PC.
13318 * mem-break.c (struct raw_breakpoint): New.
13319 (enum bkpt_type): New type `gdb_breakpoint'.
13320 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13321 fields. New field `raw'.
13322 (find_raw_breakpoint_at): New.
13323 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13324 breakpoint instead.
13325 (set_breakpoint_at): Adjust.
13326 (delete_raw_breakpoint): New.
13327 (release_breakpoint): New.
13328 (delete_breakpoint): Rename to...
13329 (delete_breakpoint_1): ... this. Add proc parameter. Use
13330 release_breakpoint. Return ENOENT.
13331 (delete_breakpoint): Reimplement.
13332 (find_breakpoint_at): Delete.
13333 (find_gdb_breakpoint_at): New.
13334 (delete_breakpoint_at): Delete.
13335 (set_gdb_breakpoint_at): New.
13336 (delete_gdb_breakpoint_at): New.
13337 (gdb_breakpoint_here): New.
13338 (set_reinsert_breakpoint): Use release_breakpoint.
13339 (uninsert_breakpoint): Rename to ...
13340 (uninsert_raw_breakpoint): ... this.
13341 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13342 (reinsert_raw_breakpoint): Change parameter type to
13344 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13346 (check_breakpoints): Adjust. Use release_breakpoint.
13347 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13348 (breakpoint_inserted_here): Ditto.
13349 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13350 Don't trust the breakpoint's shadow if it is not inserted.
13351 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13352 (delete_all_breakpoints): Adjust.
13353 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13354 use delete_breakpoint_1.
13356 * mem-break.h (breakpoints_supported): Delete declaration.
13357 (set_gdb_breakpoint_at): Declare.
13358 (gdb_breakpoint_here): Declare.
13359 (delete_breakpoint_at): Delete.
13360 (delete_gdb_breakpoint_at): Declare.
13362 * server.h (struct raw_breakpoint): Forward declare.
13363 (struct process_info): New field `raw_breakpoints'.
13365 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13368 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13370 * linux-low.c (status_pending_p_callback): Fix comment.
13371 (linux_wait_for_event_1): Move most of the internal breakpoint
13372 handling from here...
13373 (linux_wait_1): ... to here.
13374 (count_events_callback): New.
13375 (select_singlestep_lwp_callback): New.
13376 (select_event_lwp_callback): New.
13377 (cancel_breakpoints_callback): New.
13378 (select_event_lwp): New.
13379 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13380 priority to all LWPs that have had events that should be reported
13381 to the client. Cancel breakpoints when about to reporting the
13382 event to the client, not while stopping lwps. No longer cancel
13383 finished single-steps here.
13384 (cancel_finished_single_step): Delete.
13385 (cancel_finished_single_steps): Delete.
13387 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13389 * mem-break.c (enum bkpt_type): New.
13390 (struct breakpoint): New field `type'.
13391 (set_breakpoint_at): Change return type to struct breakpoint
13392 pointer. Set type to `other_breakpoint' by default.
13393 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13394 in the breakpoint list.
13395 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13396 (reinsert_breakpoint): Rename to ...
13397 (reinsert_raw_breakpoint): ... this.
13398 (reinsert_breakpoints_at): Adjust.
13399 * mem-break.h (struct breakpoint): Declare.
13400 (set_breakpoint_at): Change return type to struct breakpoint
13403 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13405 * server.c (handle_query): Assign, not compare.
13407 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13409 Teach linux gdbserver to step-over-breakpoints.
13411 * linux-low.c (can_hardware_single_step): New.
13412 (supports_breakpoints): New.
13413 (handle_extended_wait): If stopping threads, read the stop pc of
13414 the new cloned LWP.
13416 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13417 low target doesn't support retrieving the PC.
13418 (add_lwp): Set last_resume_kind to resume_continue.
13419 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13420 (linux_attach): Don't clear stop_expected. Set the lwp's
13421 last_resume_kind to resume_stop.
13422 (linux_detach_one_lwp): Don't check for removed breakpoints.
13423 (check_removed_breakpoint): Delete.
13424 (status_pending_p): Rename to ...
13425 (status_pending_p_callback): ... this. Don't check for removed
13426 breakpoints. Don't consider threads that are stopped from GDB's
13428 (linux_wait_for_lwp): Always read the stop_pc here.
13429 (cancel_breakpoint): New.
13430 (step_over_bkpt): New global.
13431 (linux_wait_for_event_1): Implement stepping over breakpoints.
13432 (gdb_wants_lwp_stopped): New.
13433 (gdb_wants_all_stopped): New.
13434 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13435 single-step traps here. Store the thread's last reported target
13437 (send_sigstop): Don't clear stop_expected. Always set it,
13439 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13440 (cancel_finished_single_step): New.
13441 (cancel_finished_single_steps): New.
13442 (wait_for_sigstop): Don't cancel finished single-step traps here.
13443 (linux_resume_one_lwp): Don't check for removed breakpoints.
13444 Don't set `step' on non-hardware step archs.
13445 (linux_set_resume_request): Ignore resume_stop requests if already
13446 stopping or stopped. Set the lwp's last_resume_kind.
13447 (resume_status_pending_p): Don't check for removed breakpoints.
13448 (need_step_over_p): New.
13449 (start_step_over): New.
13450 (finish_step_over): New.
13451 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13452 requests. Clear the thread's last reported target waitstatus.
13453 Don't use the `suspended' flag. Don't consider pending breakpoints.
13454 (linux_resume): Start a step-over if necessary.
13455 (proceed_one_lwp): New.
13456 (proceed_all_lwps): New.
13457 (unstop_all_lwps): New.
13458 * linux-low.h (struct lwp_info): Rewrite comment for the
13459 `suspended' flag. Add the `stop_pc' field. Delete the
13460 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13461 Add `'last_resume_kind' and `need_step_over' fields.
13462 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13463 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13464 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13465 (set_raw_breakpoint_at): New.
13466 (set_breakpoint_at): Rewrite to use it.
13467 (reinsert_breakpoint_handler): Delete.
13468 (set_reinsert_breakpoint): New.
13469 (reinsert_breakpoint_by_bp): Delete.
13470 (delete_reinsert_breakpoints): New.
13471 (uninsert_breakpoint): Rewrite.
13472 (uninsert_breakpoints_at): New.
13473 (reinsert_breakpoint): Rewrite.
13474 (reinsert_breakpoints_at): New.
13475 (check_breakpoints): Rewrite.
13476 (breakpoint_here): New.
13477 (breakpoint_inserted_here): New.
13478 (check_mem_read): Adjust.
13479 * mem-break.h (breakpoints_supported, breakpoint_here)
13480 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13481 (reinsert_breakpoint_by_bp): Delete declaration.
13482 (delete_reinsert_breakpoints): Declare.
13483 (reinsert_breakpoint): Delete declaration.
13484 (reinsert_breakpoints_at): Declare.
13485 (uninsert_breakpoint): Delete declaration.
13486 (uninsert_breakpoints_at): Declare.
13487 (check_breakpoints): Adjust prototype.
13488 * server.h: Adjust include order.
13489 (struct thread_info): Declare here. Add a `last_status' field.
13491 2010-03-23 Michael Snyder <msnyder@vmware.com>
13493 * server.c (crc32): New function.
13494 (handle_query): Add handling for 'qCRC:' request.
13496 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13498 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13499 lwp had been stopped by a watchpoint.
13501 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13503 * server.h (internal_error): Declare.
13504 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13505 * utils.c (internal_error): New function.
13507 2010-03-15 Andreas Schwab <schwab@redhat.com>
13509 * configure.srv: Fix typo setting srv_regobj.
13511 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13513 * linux-low.c (fetch_register): Avoid passing a non string literal
13515 (usr_store_inferior_registers): Ditto.
13517 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13519 * linux-low.c (linux_write_memory): Bail out early if peeking
13522 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13524 * linux-low.h (struct lwp_info): New fields
13525 `stopped_by_watchpoint' and `stopped_data_address'.
13526 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13527 here, and cache them in the lwp object.
13528 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13530 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13532 (linux_stopped_by_watchpoint): Rewrite.
13533 (linux_stopped_data_address): Rewrite.
13535 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13537 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13538 switching the current inferior, not before.
13540 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13542 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13543 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13544 i386-linux.c and amd64-linux.c.
13545 (reg-i386.o): Removed.
13546 (reg-i386.c): Likewise.
13547 (reg-i386-linux.o): Likewise.
13548 (reg-i386-linux.c): Likewise.
13549 (reg-x86-64.o): Likewise.
13550 (reg-x86-64.c): Likewise.
13551 (reg-x86-64-linux.o): Likewise.
13552 (reg-x86-64-linux.c): Likewise.
13554 (i386.c): Likewise.
13555 (i386-linux.o): Likewise.
13556 (i386-linux.c): Likewise.
13557 (amd64.o): Likewise.
13558 (amd64.c): Likewise.
13559 (amd64-linux.o): Likewise.
13560 (amd64-linux.c): Likewise.
13562 * configure.srv (srv_i386_regobj): New.
13563 (srv_i386_linux_regobj): Likewise.
13564 (srv_amd64_regobj): Likewise.
13565 (srv_amd64_linux_regobj): Likewise.
13566 (srv_i386_32bit_xmlfiles): Likewise.
13567 (srv_i386_64bit_xmlfiles): Likewise.
13568 (srv_i386_xmlfiles): Likewise.
13569 (srv_amd64_xmlfiles): Likewise.
13570 (srv_i386_linux_xmlfiles): Likewise.
13571 (srv_amd64_linux_xmlfiles): Likewise.
13572 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13573 srv_xmlfiles to $srv_i386_xmlfiles.
13574 (i[34567]86-*-mingw32ce*): Likewise.
13575 (i[34567]86-*-mingw*): Likewise.
13576 (i[34567]86-*-nto*): Likewise.
13577 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13578 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13579 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13580 (x86_64-*-linux*): Likewise.
13582 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13583 (init_registers_amd64_linux): New.
13584 (x86_arch_setup): Replace init_registers_x86_64_linux with
13585 init_registers_amd64_linux.
13587 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13589 * configure.ac: Check for libdl. If it is not available link against
13590 static libthread_db.
13591 * configure: Regenerate.
13593 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13597 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13598 handing a read watchpoint.
13599 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13601 2010-02-12 Doug Evans <dje@google.com>
13603 * linux-low.c (linux_supports_tracefork_flag): Document.
13604 (linux_look_up_symbols): Add comment.
13606 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13608 * regcache.c (supply_register): Clear regcache if buf is NULL.
13610 2010-02-02 Nicolas Roche <roche@sourceware.org>
13611 Joel Brobecker <brobecker@adacore.com>
13613 * inferiors.c (find_inferior): Add function documentation.
13614 (unloaded_dll): Handle the case where the unloaded dll has not
13615 been previously registered in the dll list.
13617 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13619 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13620 (thumb2_breakpoint): New.
13621 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13623 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13625 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13626 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13629 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13631 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13633 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13635 * linux-s390-low.c (s390_collect_ptrace_register)
13636 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13638 2010-01-21 Doug Evans <dje@google.com>
13640 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13641 (PTRACE_ARG4_TYPE): New macro.
13642 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13643 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13644 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13645 (usr_store_inferior_registers): Ditto.
13646 (linux_read_memory, linux_write_memory): Ditto.
13647 (linux_test_for_tracefork): Ditto.
13649 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13650 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13652 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13654 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13657 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13659 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13660 prototype to take a regcache. Adjust.
13662 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13664 * regcache.h (struct thread_info): Forward declare.
13665 (struct regcache): New.
13666 (new_register_cache): Adjust prototype.
13667 (get_thread_regcache): Declare.
13668 (free_register_cache): Adjust prototype.
13669 (registers_to_string, registers_from_string): Ditto.
13670 (supply_register, supply_register_by_name, collect_register)
13671 (collect_register_as_string, collect_register_by_name): Ditto.
13672 * regcache.c (struct inferior_regcache_data): Delete.
13673 (get_regcache): Rename to ...
13674 (get_thread_regcache): ... this. Adjust. Switch inferior before
13675 fetching registers.
13676 (regcache_invalidate_one): Adjust.
13677 (regcache_invalidate): Fix prototype.
13678 (new_register_cache): Return the new register cache.
13679 (free_register_cache): Change prototype.
13680 (realloc_register_cache): Adjust.
13681 (registers_to_string): Change prototype to take a regcache. Adjust.
13682 (registers_from_string): Ditto.
13683 (register_data): Ditto.
13684 (supply_register): Ditto.
13685 (supply_register_by_name): Ditto.
13686 (collect_register): Ditto.
13687 (collect_register_as_string): Ditto.
13688 (collect_register_by_name): Ditto.
13689 * server.c (process_serial_event): Adjust.
13690 * linux-low.h (regset_fill_func, regset_store_func): Change
13692 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13694 * linux-low.c (get_stop_pc): Adjust.
13695 (check_removed_breakpoint): Adjust.
13696 (linux_wait_for_event): Adjust.
13697 (linux_resume_one_lwp): Adjust.
13698 (fetch_register): Add regcache parameter. Adjust.
13699 (usr_store_inferior_registers): Ditto.
13700 (regsets_fetch_inferior_registers): Ditto.
13701 (regsets_store_inferior_registers): Ditto.
13702 (linux_fetch_registers, linux_store_registers): Ditto.
13703 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13705 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13707 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13708 prototype to take a regcache.
13709 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13710 * remote-utils.c (convert_ascii_to_int, outreg)
13711 (prepare_resume_reply): Change prototype to take a regcache.
13713 * target.h (struct target_ops) <fetch_registers, store_registers>:
13714 Change prototype to take a regcache.
13715 (fetch_inferior_registers, store_inferior_registers): Change
13716 prototype to take a regcache. Adjust.
13717 * proc-service.c (ps_lgetregs): Adjust.
13718 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13719 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13720 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13721 take a regcache. Adjust.
13722 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13723 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13724 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13725 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13726 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13727 (cris_cannot_fetch_register):
13728 (cris_breakpoint_at): Change prototype to take a regcache.
13730 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13731 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13732 to take a regcache. Adjust.
13733 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13735 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13736 take a regcache. Adjust.
13737 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13738 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13739 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13740 * linux-mips-low.c (mips_get_pc):
13741 (mips_set_pc): Change prototype to take a regcache. Adjust.
13742 (mips_reinsert_addr): Adjust.
13743 (mips_collect_register): Change prototype to take a regcache.
13745 (mips_supply_register):
13746 (mips_collect_register_32bit, mips_supply_register_32bit)
13747 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13748 (mips_store_fpregset): Ditto.
13749 * linux-ppc-low.c (ppc_supply_ptrace_register)
13750 (ppc_supply_ptrace_register): Ditto.
13751 (parse_spufs_run): Adjust.
13752 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13753 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13754 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13755 take a regcache. Adjust.
13756 * linux-s390-low.c (s390_collect_ptrace_register)
13757 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13758 (s390_set_pc): Change prototype to take a regcache. Adjust.
13759 (s390_arch_setup): Adjust.
13760 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13761 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13762 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13763 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13764 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13766 (sparc_breakpoint_at): Adjust.
13767 * linux-xtensa-low.c (xtensa_fill_gregset):
13768 (xtensa_store_gregset):
13769 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13770 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13771 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13772 prototype to take a regcache. Adjust.
13773 * win32-arm-low.c (arm_fetch_inferior_register)
13774 (arm_store_inferior_register): Change prototype to take a
13776 * win32-i386-low.c (i386_fetch_inferior_register)
13777 (i386_store_inferior_register): Change prototype to take a
13779 * win32-low.c (child_fetch_inferior_registers)
13780 (child_store_inferior_registers): Change prototype to take a
13782 (win32_wait): Adjust.
13783 (win32_fetch_inferior_registers): Change prototype to take a
13785 (win32_store_inferior_registers): Adjust.
13786 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13787 store_inferior_register>: Change prototype to take a regcache.
13789 2010-01-20 Doug Evans <dje@google.com>
13791 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13793 (linux_wait_for_event1, linux_init_signals): Ditto.
13794 (W_STOPCODE): Provide definition if missing.
13796 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13798 * linux-low.c (linux_core_of_thread): New.
13799 (compare_ints, show_process, list_threads): New.
13800 (linux_qxfer_osdata): Report threads and cores.
13801 (linux_target_op): Register linux_core_of_thread.
13802 * remote-utils.c (prepare_resume_reply): Report the core.
13803 (buffer_xml_printf): Support %d specifier.
13804 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13806 (handle_query): Handle qXfer:threads. Announce availability
13808 * target.h (struct target_ops): New field core_of_thread.
13810 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13812 * Makefile.in (clean): Remove new generated files.
13813 (reg-s390.o, reg-s390.c): Remove rules.
13814 (reg-s390x.o, reg-s390x.c): Likewise.
13815 (s390-linux32.o, s390-linux32.c): Add rules.
13816 (s390-linux64.o, s390-linux64.c): Likewise.
13817 (s390x-linux64.o, s390x-linux64.c): Likewise.
13818 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13819 * linux-s390-low.c: Include <elf.h>.
13820 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13821 (init_registers_s390): Remove prototype.
13822 (init_registers_s390x): Likewise.
13823 (init_registers_s390_linux32): Add prototype.
13824 (init_registers_s390_linux64): Likewise.
13825 (init_registers_s390x_linux64): Likewise.
13826 (s390_num_regs_3264): New define.
13827 (s390_regmap_3264): New global variable.
13828 (s390_cannot_fetch_register): Remove obsolete check.
13829 (s390_cannot_store_register): Likewise.
13830 (s390_collect_ptrace_register): Handle upper/lower register halves.
13831 (s390_supply_ptrace_register): Likewise.
13832 (s390_fill_gregset): Update to register number changes.
13833 (s390_get_hwcap): New routine.
13834 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13835 Install appropriate regmap and register set.
13837 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13839 * server.c (gdbserver_version): Update copyright year to 2010.
13840 * gdbreplay.c (gdbreplay_version): Likewise.
13842 2009-12-28 Doug Evans <dje@google.com>
13844 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13845 elf/external.h. Include <elf.h> instead but only if necessary.
13847 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13849 * linux-low.c (linux_remove_process): Remove `detaching'
13850 parameter. Don't release/detach from thread_db here.
13851 (linux_kill): Release/detach from thread_db here, ...
13852 (linux_detach): ... and here, before actually detaching.
13853 (linux_wait_1): ... and here, when a process exits.
13854 * thread-db.c (any_thread_of): New.
13855 (thread_db_free): Switch the current inferior to a thread of the
13858 2009-12-21 Doug Evans <dje@google.com>
13860 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13862 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13863 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13864 warning ifndef __NR_tkill. Move setting of errno there too.
13865 Delete unnecessary resetting of errno after syscall.
13866 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13868 * configure.ac: Check for dladdr.
13869 * config.in: Regenerate.
13870 * configure: Regenerate.
13871 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13872 (try_thread_db_load): Update.
13874 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13876 2009-12-18 Doug Evans <dje@google.com>
13878 * event-loop.c: Include unistd.h if it exists.
13880 * linux-low.c (my_waitpid): Move definition away from being in
13881 between linux_tracefork_child/linux_test_for_tracefork.
13883 * gdb_proc_service.h (psaddr_t): Fix type.
13884 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13885 signature to match glibc.
13887 2009-12-16 Doug Evans <dje@google.com>
13889 * linux-low.c (linux_read_memory): Fix argument to read.
13891 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13893 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13894 events, don't leave current_inferior pointing at null.
13896 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13898 * win32-low.c (LOG): Delete.
13899 (OUTMSG): Output to stderr.
13900 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13901 on compile time LOG macro.
13902 (win32_wait): Fix debug output.
13904 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13906 * win32-low.c (win32_add_one_solib): If the dll name is
13907 "ntdll.dll", prepend the system directory to the dll path.
13909 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13911 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13913 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13914 Vladimir Prus <vladimir@codesourcery.com>
13916 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13917 * configure.ac: Check for __mcoldfire__ and set
13918 gdb_cv_m68k_is_coldfire.
13919 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13920 reg-cf.o and reg-m68k.o.
13921 * configure: Regenerated.
13923 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13925 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13926 Pass it to thread_db_free.
13927 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13928 proper `detaching' argument to linux_remove_process.
13929 * linux-low.h (thread_db_free): Add `detaching' parameter.
13930 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13932 (thread_db_free): Add `detaching' parameter. Only
13933 call td_ta_clear_event if detaching from process.
13935 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13937 * thread-db.c (thread_db_free): Fix typo.
13939 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13942 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13944 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13946 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13947 with an i686 compiler.
13948 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13950 * configure: Rebuilt.
13952 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13956 * server.c (handle_search_memory_1): Correct read_addr initialization
13957 in loop for searching subsequent chunks.
13959 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13961 * configure.ac: New --with-libthread-db option.
13962 * thread-db.c: Allow direct dependence on libthread_db.
13963 (thread_db_free): Adjust.
13964 * config.in: Regenerate.
13965 * configure: Likewise.
13967 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13970 * thread-db.c (attach_thread): New function.
13971 (maybe_attach_thread): Return success/failure.
13972 (find_new_threads_callback): Adjust.
13973 (thread_db_find_new_threads): Loop until no new threads.
13975 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13977 * proc-service.c (ps_lgetregs): Formatting.
13979 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13981 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13982 * configure.ac: Adjust.
13983 * linux-low.h (struct process_info_private): Move members to struct
13985 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13986 * linux-low.c (linux_remove_process): Adjust.
13987 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13988 * server.c (handle_query): Move code ...
13989 (handle_monitor_command): ... here. New function.
13990 * target.h (struct target_ops): New member.
13991 * thread-db.c (struct thread_db): New.
13992 (libthread_db_search_path): New variable.
13993 (thread_db_create_event, thread_db_enable_reporting)
13994 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13995 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13996 (try_thread_db_load_1, dladdr_to_soname): New functions.
13997 (try_thread_db_load, thread_db_load_search): New functions.
13998 (thread_db_init): Search for libthread_db.
13999 (thread_db_free): New function.
14000 (thread_db_handle_monitor_command): Likewise.
14001 * config.in: Regenerate.
14002 * configure: Regenerate.
14004 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
14006 * spu-low.c (spu_kill): Wait for inferior to terminate.
14007 Call clear_inferiors.
14008 (spu_detach): Call clear_inferiors.
14010 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14012 * aclocal.m4: Regenerate.
14013 * config.in: Likewise.
14014 * configure: Likewise.
14016 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14018 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
14019 (parse_spufs_run): New function.
14020 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
14021 (ppc_breakpoint_at): Handle SPU breakpoints.
14023 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14025 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
14026 (SPUFS_MAGIC): Define.
14027 (spu_enumerate_spu_ids): New function.
14028 (linux_qxfer_spu): New function.
14029 (linux_target_ops): Install linux_qxfer_spu.
14031 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
14033 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
14034 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
14035 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
14036 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
14037 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
14038 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
14039 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
14040 (init_registers_powerpc_cell32l): Add prototype.
14041 (init_registers_powerpc_cell64l): Likewise.
14042 (ppc_arch_setup): Detect Cell/B.E. architecture.
14044 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14046 * Makefile.in (datarootdir): New variable.
14048 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14050 * linux-low.c (linux_write_memory): Update debugging output.
14051 * Makefile.in (clean): Add new descriptions.
14052 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
14053 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
14054 * configure.srv: Add new files for arm*-*-linux*.
14055 * linux-arm-low.c: Add new declarations.
14056 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
14057 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
14058 (HWCAP_VFPv3D16): New.
14059 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
14060 instead of __IWMMXT__.
14061 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
14062 (arm_arch_setup): New.
14063 (target_regsets): Remove #ifdef. Add VFP regset.
14064 (the_low_target): Use arm_arch_setup.
14066 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
14068 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14069 the main thread again.
14071 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
14073 Adding Neutrino gdbserver.
14074 * configure: Regenerated.
14075 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14076 * configure.srv (i[34567]86-*-nto*): New target.
14077 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14078 * remote-utils.c [__QNX__]: Include sys/iomgr.h
14079 (nto_comctrl) [__QNX__]: New function.
14080 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14082 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
14084 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14087 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
14088 Pedro Alves <pedro@codesourcery.com>
14090 * win32-i386-low.c (i386_get_thread_context): Handle systems that
14091 don't support CONTEXT_EXTENDED_REGISTERS.
14092 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14093 (the_low_target): Install them.
14094 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14095 failing with ERROR_PIPE_NOT_CONNECTED.
14097 2009-06-30 Doug Evans <dje@google.com>
14098 Pierre Muller <muller@ics.u-strasbg.fr>
14100 Add h/w watchpoint support to x86-linux, win32-i386.
14101 * Makefile.in (SFILES): Add i386-low.c
14102 (i386_low_h): Define.
14103 (i386-low.o): Add dependencies.
14104 (linux-x86-low.o): Add i386-low.h dependency.
14105 (win32-i386-low.o): Ditto.
14106 * i386-low.c: New file.
14107 * i386-low.h: New file.
14108 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14109 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14110 * linux-low.c (linux_add_process): Initialize arch_private.
14111 (linux_remove_process): Free arch_private.
14112 (add_lwp): Initialize arch_private.
14113 (delete_lwp): Free arch_private.
14114 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14116 * linux-low.h (process_info_private): New member arch_private.
14117 (lwp_info): New member arch_private.
14118 (linux_target_ops): New members new_process, new_thread,
14120 (ptid_of): New macro.
14121 * linux-x86-low.c: Include stddef.h, i386-low.h.
14122 (arch_process_info): New struct.
14123 (arch_lwp_info): New struct.
14124 (x86_linux_dr_get, x86_linux_dr_set): New functions.
14125 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14126 (i386_dr_low_get_status): New function.
14127 (x86_insert_point, x86_remove_point): New functions.
14128 (x86_stopped_by_watchpoint): New function.
14129 (x86_stopped_data_address): New function.
14130 (x86_linux_new_process, x86_linux_new_thread): New functions.
14131 (x86_linux_prepare_to_resume): New function.
14132 (the_low_target): Add entries for insert_point, remove_point,
14133 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14135 * server.c (debug_hw_points): New global.
14136 (monitor_show_help): Document set debug-hw-points.
14137 (handle_query): Process "set debug-hw-points".
14138 * server.h (debug_hw_points): Declare.
14139 (paddress): Declare.
14140 * utils.c (NUMCELLS, CELLSIZE): New macros.
14141 (get_sell, xsnprintf, paddress): New functions.
14142 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14143 remove_point, stopped_by_watchpoint, stopped_data_address.
14144 * win32-i386-low.c: Include i386-low.h.
14145 (debug_reg_state): Replaces dr.
14146 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14147 (i386_dr_low_get_status): New function.
14148 (i386_insert_point, i386_remove_point): New functions.
14149 (i386_stopped_by_watchpoint): New function.
14150 (i386_stopped_data_address): New function.
14151 (i386_initial_stuff): Update.
14152 (get_thread_context,set_thread_context,i386_thread_added): Update.
14153 (the_low_target): Add entries for insert_point,
14154 remove_point, stopped_by_watchpoint, stopped_data_address.
14155 * win32-low.c (win32_insert_watchpoint): New function.
14156 (win32_remove_watchpoint): New function.
14157 (win32_stopped_by_watchpoint): New function.
14158 (win32_stopped_data_address): New function.
14159 (win32_target_ops): Add entries for insert_watchpoint,
14160 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14161 * win32-low.h (win32_target_ops): New members insert_point,
14162 remove_point, stopped_by_watchpoint, stopped_data_address.
14164 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14166 * server.c (process_serial_event): Re-return unsupported, not
14167 error, if the type isn't recognized. Re-allow supporting only
14168 insert or remove packets. Also call require_running for
14169 breakpoints. Add missing break statement to default case. Tidy.
14170 * target.h (struct target_ops): Rename insert_watchpoint to
14171 insert_point, and remove_watchpoint to remove_point.
14173 * linux-low.h (struct linux_target_ops): Likewise.
14174 * linux-low.c (linux_insert_watchpoint): Rename to ...
14175 (linux_insert_point): ... this. Adjust.
14176 (linux_remove_watchpoint): Rename to ...
14177 (linux_remove_point): ... this. Adjust.
14178 (linux_target_ops): Adjust.
14179 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14180 (cris_insert_point): ... this.
14181 (cris_remove_watchpoint): Rename to ...
14182 (cris_remove_point): ... this.
14183 (the_low_target): Adjust.
14185 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14187 * server.c (handle_v_kill): Pass signal_pid to
14188 kill_inferior if multi_process is zero.
14190 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14192 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14193 * target.h (target_ops): Comment for *_watchpoint to make it clear
14194 the functions can get types '0' and '1'.
14196 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14198 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14199 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14200 * regcache.c (get_regcache): Likewise.
14201 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14202 * win32-low.c (child_fetch_inferior_registers): Remove check for
14205 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14206 Pedro Alves <pedro@codesourcery.com>
14208 * target.h (struct target_ops) <supports_multi_process>: New
14210 (target_supports_multi_process): New.
14211 * server.c (handle_query): Even if GDB reports support, only
14212 enable multi-process if the target also supports it. Report
14213 multi-process support only if the target backend supports it.
14214 * linux-low.c (linux_supports_multi_process): New function.
14215 (linux_target_ops): Install it as target_supports_multi_process
14218 2009-05-24 Doug Evans <dje@google.com>
14220 Global renaming of find_thread_pid to find_thread_ptid.
14221 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14222 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14223 All callers updated.
14225 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14226 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14229 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14230 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14231 (linux_resume_one_lwp): Ditto.
14233 2009-05-23 Doug Evans <dje@google.com>
14235 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14236 from struct inferior_list_entry * to struct lwp_info *.
14237 All callers updated.
14239 2009-05-13 Doug Evans <dje@google.com>
14241 * linux-x86-low.c: Don't include assert.h.
14242 (x86_siginfo_fixup): Use fatal, not assert.
14243 (x86_arch_setup): Fix comment.
14245 2009-05-12 Doug Evans <dje@google.com>
14247 Biarch support for i386/amd64 gdbserver.
14248 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14249 Add linux-x86-low.c.
14250 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14251 (linux-x86-low.o): Add.
14252 * linux-x86-64-low.c: Delete.
14253 * linux-i386-low.c: Delete.
14254 * linux-x86-low.c: New file.
14255 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14257 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14259 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14260 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14261 (linux_child_pid_to_exec_file): New function.
14262 (elf_64_header_p, elf_64_file_p): New functions.
14263 (siginfo_fixup): New function.
14264 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14265 give target a chance to convert layout.
14266 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14267 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14269 2009-05-07 Doug Evans <dje@google.com>
14271 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14272 (regsets_store_inferior_registers): Ditto.
14274 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14278 * linux-low.c (must_set_ptrace_flags): Delete.
14279 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14281 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14282 `lwp->must_set_ptrace_flags' instead.
14283 (linux_wait_for_event_1): Set ptrace options here.
14284 (linux_wait_1): ... not here.
14286 2009-04-30 Doug Evans <dje@google.com>
14288 * inferiors.c (started_inferior_callback): New function.
14289 (attached_inferior_callback): New function.
14290 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14291 * server.c (print_started_pid, print_attached_pid): New functions.
14292 (detach_or_kill_for_exit): New function.
14293 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14294 * server.h (have_started_inferiors_p): Declare.
14295 (have_attached_inferiors_p): Declare.
14297 * inferiors.c (remove_process): Fix memory leak, free process.
14298 * linux-low.c (linux_remove_process): New function.
14299 (linux_kill): Call it instead of remove_process.
14300 (linux_detach, linux_wait_1): Ditto.
14302 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14304 * configure.srv: Add x86 Windows CE target.
14306 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14308 * inferiors.c (get_thread_process): Make global.
14309 * server.h (get_thread_process): Add prototype.
14310 * thread-db.c (find_one_thread): Use get_thread_process
14311 instead of current_process.
14312 (thread_db_get_tls_address): Do not crash if called when
14313 thread layer is not yet initialized.
14315 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14317 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14318 * spu-low.c (current_tid): Rename to ...
14319 (current_ptid): ... this.
14320 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14321 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14322 ptid_get_lwp (current_ptid) instead of current_tid.
14323 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14324 instead of current_tid. Use find_process_pid to verify pid
14325 argument is valid. Pass proper argument to remove_process.
14326 (spu_thread_alive): Compare current_ptid instead of current_tid.
14327 (spu_resume): Likewise.
14329 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14331 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14334 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14336 Implement the multiprocess extensions, and add linux multiprocess
14339 * server.h (ULONGEST): Declare.
14340 (struct ptid, ptid_t): New.
14341 (minus_one_ptid, null_ptid): Declare.
14342 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14343 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14344 (struct inferior_list_entry): Change `id' type from unsigned from
14346 (struct sym_cache, struct breakpoint, struct
14347 process_info_private): Forward declare.
14348 (struct process_info): Declare.
14349 (current_process): Declare.
14350 (all_processes): Declare.
14351 (initialize_inferiors): Declare.
14352 (add_thread): Adjust to use ptid_t.
14353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14354 (add_process, remove_process, find_thread_pid): Declare.
14355 (find_inferior_id): Adjust to use ptid_t.
14356 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14357 (multi_process): Declare.
14358 (push_event): Adjust to use ptid_t.
14359 (read_ptid, write_ptid): Declare.
14360 (prepare_resume_reply): Adjust to use ptid_t.
14361 (clear_symbol_cache): Declare.
14362 * inferiors.c (all_processes): New.
14363 (null_ptid, minus_one_ptid): New.
14364 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14365 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14366 (add_thread): Change unsigned long to ptid. Remove gdb_id
14368 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14369 (gdb_id_to_thread): Rename to ...
14370 (find_thread_pid): ... this. Change unsigned long to ptid.
14371 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14372 (loaded_dll, pull_pid_from_list): Adjust.
14373 (add_process, remove_process, find_process_pid)
14374 (get_thread_process, current_process, initialize_inferiors): New.
14375 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14376 (struct target_waitstatus) <related_pid>: Ditto.
14377 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14378 return type to int.
14379 (struct target_ops) <join>: Add `pid' argument.
14380 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14381 (struct target_ops) <wait>: Add `ptid' field. Change return type
14383 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14384 (mywait): Add `ptid' argument. Change return type to ptid_t.
14385 (target_pid_to_str): Declare.
14386 * target.c (set_desired_inferior): Adjust to use ptids.
14387 (mywait): Add new `ptid' argument. Adjust.
14388 (target_pid_to_str): New.
14389 * mem-break.h (free_all_breakpoints): Declare.
14390 * mem-break.c (breakpoints): Delelete.
14391 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14392 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14393 to use per-process breakpoint list.
14394 (free_all_breakpoints): New.
14395 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14396 (symbol_cache, all_symbols_looked_up): Delete.
14398 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14400 (prepare_resume_reply): Change ptid argument's type from unsigned
14401 long to ptid_t. Adjust. Implement W;process and X;process.
14402 (free_sym_cache, clear_symbol_cache): New.
14403 (look_up_one_symbol): Adjust to per-process symbol cache. *
14404 * server.c (cont_thread, general_thread, step_thread): Change type
14406 (attached): Delete.
14407 (multi_process): New.
14408 (last_ptid): Change type to ptid_t.
14409 (struct vstop_notif) <ptid>: Change type to ptid_t.
14410 (queue_stop_reply, push_event): Change `ptid' argument's type to
14412 (discard_queued_stop_replies): Add `pid' argument.
14413 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14414 changes. Don't reference the `attached' global.
14415 (attach_inferior): Adjust to mywait interface changes.
14416 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14417 features. Handle and report "multiprocess+". Handle
14419 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14421 (handle_v_kill): New.
14422 (handle_v_stopped): Adjust to use target_pid_to_str.
14423 (handle_v_requests): Allow multiple attaches and runs when
14424 multiprocess extensions are in effect. Handle "vKill".
14425 (myresume): Adjust to use ptids.
14426 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14427 (handle_status): Adjust to discard_queued_stop_replies interface
14429 (first_thread_of, kill_inferior_callback)
14430 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14431 (main): Call initialize_inferiors. Adjust to use ptids, killing
14432 and detaching from all inferiors. Handle multiprocess packet
14434 * linux-low.h: Include gdb_proc_service.h.
14435 (struct process_info_private): New.
14436 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14437 <lwpid_of>: Use ptid_get_lwp.
14438 (get_lwp_thread): Adjust.
14439 (struct lwp_info): Add `dead' member.
14440 (find_lwp_pid): Declare.
14441 * linux-low.c (thread_db_active): Delete.
14442 (new_inferior): Adjust comment.
14443 (inferior_pid): Delete.
14444 (linux_add_process): New.
14445 (handle_extended_wait): Adjust.
14446 (add_lwp): Change unsigned long to ptid.
14447 (linux_create_inferior): Add process to processes table. Adjust
14448 to use ptids. Don't set new_inferior here.
14449 (linux_attach_lwp): Rename to ...
14450 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14451 it. Adjust to use ptids.
14452 (linux_attach_lwp): New.
14453 (linux_attach): Add process to processes table. Don't set
14455 (struct counter): New.
14456 (second_thread_of_pid_p, last_thread_of_process_p): New.
14457 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14458 multiple processes.
14459 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14460 processes. Remove process from process table.
14461 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14462 to multiple processes.
14463 (any_thread_of): New.
14464 (linux_detach): Add `pid' argument, and handle it. Remove process
14465 from processes table.
14466 (linux_join): Add `pid' argument. Handle it.
14467 (linux_thread_alive): Change unsighed long argument to ptid_t.
14468 Consider dead lwps as not being alive.
14469 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14470 threads we're not interested in.
14471 (same_lwp, find_lwp_pid): New.
14472 (linux_wait_for_lwp): Change `pid' argument's type from int to
14474 (linux_wait_for_event): Rename to ...
14475 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14476 from int to ptid_t. Adjust.
14477 (linux_wait_for_event): New.
14478 (linux_wait_1): Add `ptid' argument. Change return type to
14479 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14480 that exit from the process table.
14481 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14483 (mark_lwp_dead): New.
14484 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14485 stopping all threads, mark its main lwp as dead.
14486 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14488 (fetch_register, usr_store_inferior_registers)
14489 (regsets_fetch_inferior_registers)
14490 (regsets_store_inferior_registers, linux_read_memory)
14491 (linux_write_memory): Inline `inferior_pid'.
14492 (linux_look_up_symbols): Adjust to use per-process
14493 `thread_db_active'.
14494 (linux_request_interrupt): Adjust to use ptids.
14495 (linux_read_auxv): Inline `inferior_pid'.
14496 (initialize_low): Don't reference thread_db_active.
14497 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14498 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14499 (ps_getpid): Return the pid of the current inferior.
14500 * thread-db.c (proc_handle, thread_agent): Delete.
14501 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14503 (find_one_thread): Change argument type to ptid_t. Adjust to
14505 (maybe_attach_thread): Adjust to per-process data and ptids.
14506 (thread_db_find_new_threads): Ditto.
14507 (thread_db_init): Ditto.
14508 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14509 processes table. Adjust to use ptids.
14510 (spu_kill, spu_detach): Adjust interface. Remove process from
14512 (spu_join, spu_thread_alive): Adjust interface.
14513 (spu_wait): Adjust interface. Remove process from processes
14514 table. Adjust to use ptids.
14515 * win32-low.c (current_inferior_tid): Delete.
14516 (current_inferior_ptid): New.
14517 (debug_event_ptid): New.
14518 (thread_rec): Take a ptid. Adjust.
14519 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14520 (child_delete_thread): Ditto.
14521 (do_initial_child_stuff): Add `attached' argument. Add process to
14523 (child_fetch_inferior_registers, child_store_inferior_registers):
14525 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14526 (win32_attach): Pass 1 to do_initial_child_stuff.
14527 (win32_kill): Adjust interface. Remove process from processes
14529 (win32_detach): Ditto.
14530 (win32_join): Adjust interface.
14531 (win32_thread_alive): Take a ptid.
14532 (win32_resume): Adjust to use ptids.
14533 (get_child_debug_event): Ditto.
14534 (win32_wait): Adjust interface. Remove exiting process from
14537 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14539 Non-stop mode support.
14541 * server.h (non_stop): Declare.
14542 (gdb_client_data, handler_func): Declare.
14543 (delete_file_handler, add_file_handler, start_event_loop):
14545 (handle_serial_event, handle_target_event, push_event)
14546 (putpkt_notif): Declare.
14547 * target.h (enum resume_kind): New.
14548 (struct thread_resume): Replace `step' field by `kind' field.
14549 (TARGET_WNOHANG): Define.
14550 (struct target_ops) <wait>: Add `options' argument.
14551 <supports_non_stop, async, start_non_stop>: New fields.
14552 (target_supports_non_stop, target_async): New.
14553 (start_non_stop): Declare.
14554 (mywait): Add `options' argument.
14555 * target.c (mywait): Add `options' argument. Print child exit
14556 notifications here.
14557 (start_non_stop): New.
14558 * server.c (non_stop, own_buf, mem_buf): New globals.
14559 (struct vstop_notif): New.
14560 (notif_queue): New global.
14561 (queue_stop_reply, push_event, discard_queued_stop_replies)
14562 (send_next_stop_reply): New.
14563 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14565 (attach_inferior): In non-stop mode, don't wait for the target
14567 (handle_general_set): Handle QNonStop.
14568 (handle_query): When handling qC, return the current general
14569 thread, instead of the first thread of the list.
14570 (handle_query): If the backend supports non-stop mode, include
14571 QNonStop+ in the qSupported query response.
14572 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14574 (handle_v_attach, handle_v_run): Handle non-stop mode.
14575 (handle_v_stopped): New.
14576 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14577 (myresume): Adjust to use resume_kind. Handle non-stop.
14578 (queue_stop_reply_callback): New.
14579 (handle_status): Handle non-stop mode.
14580 (main): Clear non_stop flag on reconnection. Use the event-loop.
14581 Refactor serial protocol handling from here ...
14582 (process_serial_event): ... to this new function. When GDB
14583 selects any thread, select one here. In non-stop mode, wait until
14584 GDB acks all pending events before exiting.
14585 (handle_serial_event, handle_target_event): New.
14586 * remote-utils.c (remote_open): Install remote_desc in the event
14588 (remote_close): Remove remote_desc from the event loop.
14589 (putpkt_binary): Rename to...
14590 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14591 (putpkt_binary): New as wrapper around putpkt_binary_1.
14592 (putpkt_notif): New.
14593 (prepare_resume_reply): In non-stop mode, don't change the
14595 * event-loop.c: New.
14596 * Makefile.in (OBJ): Add event-loop.o.
14597 (event-loop.o): New rule.
14599 * linux-low.h (pid_of): Moved here.
14601 (get_lwp_thread): Use lwpid_of.
14602 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14603 * linux-low.c (pid_of): Delete.
14604 (inferior_pid): Use lwpid_of.
14605 (linux_event_pipe): New.
14606 (target_is_async_p): New.
14608 (handle_extended_wait): Use lwpid_of.
14609 (add_lwp): Don't set lwpid field.
14610 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14611 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14612 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14613 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14614 first. Adjust to linux_wait_for_event interface changes. Use
14616 (linux_detach): Don't delete the main lwp here.
14617 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14618 (status_pending_p): Don't consider explicitly suspended lwps.
14619 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14620 pointer. Add OPTIONS argument. Change return type to int. Use
14621 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14622 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14623 pointer. Add status pointer argument. Return a pid instead of a
14624 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14625 changes. In non-stop mode, don't switch to a random thread.
14626 (linux_wait): Rename to...
14627 (linux_wait_1): ... this. Add target_options argument, and handle
14628 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14629 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14630 clean exit and signal exit code. Don't stop all threads in
14631 non-stop mode. In all-stop mode, only stop all threads when
14632 reporting a stop to GDB. Handle explicit thread stop requests.
14633 (async_file_flush, async_file_mark): New.
14635 (send_sigstop): Use lwpid_of.
14636 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14637 interface changes. In non-stop mode, don't switch to a random
14639 (linux_resume_one_lwp): Use lwpid_of.
14640 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14641 (linux_resume_one_thread): ... this. Handle resume_stop. In
14642 non-stop mode, don't look for pending flag in all threads.
14643 (resume_status_pending_p): Don't consider explicitly suspended
14645 (my_waitpid): Reimplement. Emulate __WALL.
14646 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14648 (sigchld_handler, linux_supports_non_stop, linux_async)
14649 (linux_start_non_stop): New.
14650 (linux_target_ops): Register linux_supports_non_stop, linux_async
14651 and linux_start_non_stop.
14652 (initialize_low): Install SIGCHLD handler.
14653 * thread-db.c (thread_db_create_event, find_one_thread)
14654 (thread_db_get_tls_address): Use lwpid_of.
14655 * win32-low.c (win32_detach): Adjust to use resume_kind.
14656 (win32_wait): Add `options' argument.
14657 * spu-low.c (spu_resume): Adjust to use resume_kind.
14658 (spu_wait): Add `options' argument.
14660 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14662 Decouple target code from remote protocol.
14664 * target.h (enum target_waitkind): New.
14665 (struct target_waitstatus): New.
14666 (struct target_ops) <wait>: Return an unsigned long. Take a
14667 target_waitstatus pointer instead of a char pointer.
14668 (mywait): Likewise.
14669 * target.c (mywait): Change prototype to return an unsigned long.
14670 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14671 * server.h (thread_from_wait, old_thread_from_wait): Delete
14673 (prepare_resume_reply): Change prototype to take a
14675 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14676 (last_status, last_ptid): New.
14677 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14678 pid instead of a signal.
14679 (attach_inferior): Remove "status" and "signal" parameters.
14681 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14683 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14684 (handle_v_requests, myresume): Remove "status" and "signal"
14685 parameters. Adjust.
14686 (handle_status): New.
14687 (main): Delete local `status'. Adjust.
14688 * remote-utils.c: Include target.h.
14689 (prepare_resume_reply): Change prototype to take a
14690 target_waitstatus. Adjust.
14692 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14694 * spu-low.c (spu_wait): Adjust.
14695 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14697 (win32_wait): Adjust.
14699 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14701 * target.h (struct thread_resume): Delete leave_stopped member.
14702 (struct target_ops): Add a `n' argument to the `resume' callback.
14703 * server.c (start_inferior): Adjust.
14704 (handle_v_cont, myresume): Adjust.
14705 * linux-low.c (check_removed_breakpoint): Adjust to resume
14706 interface change, and to removed leave_stopped field.
14707 (resume_ptr): Delete.
14708 (struct thread_resume_array): New.
14709 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14710 resume interface change.
14711 (linux_continue_one_thread, linux_queue_one_thread)
14712 (resume_status_pending_p): Check if the resume field is NULL
14713 instead of checking the leave_stopped member.
14714 (linux_resume): Adjust to the target resume interface change.
14715 * spu-low.c (spu_resume): Adjust to the target resume interface
14717 * win32-low.c (win32_detach, win32_resume): Ditto.
14719 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14721 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14723 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14725 (linux_continue_one_thread): Only preserve the stepping flag if
14726 there's a pending breakpoint.
14728 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14730 * server.c (main): After the inferior having exited, call
14731 remote_close before exiting gdbserver.
14733 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14735 Fix size of FPSCR in Power 7 processors.
14736 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14737 (PPC_FEATURE_HAS_DFP): New #define.
14738 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14741 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14743 * server.c (handle_query) Whitespace and formatting.
14745 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14747 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14748 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14749 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14750 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14751 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14752 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14753 Makefile.in, configure.ac: Fix whitespace throughout.
14754 * configure: Regenerate.
14756 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14758 * inferiors.c (find_inferior): Make it safe for the callback
14759 function to delete the currently iterated inferior.
14761 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14763 * Makefile.in (linuw_low_h): Move higher.
14764 (thread-db.o): Depend on $(linux_low_h).
14766 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14768 Rename "process" to "lwp" throughout.
14770 * linux-low.c (all_processes): Rename to...
14771 (all_lwps): ... this.
14772 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14773 (add_process): Rename to ...
14774 (add_lwp): ... this. Adjust.
14775 (linux_create_inferior): Adjust.
14776 (linux_attach_lwp): Adjust.
14777 (linux_attach): Adjust.
14778 (linux_kill_one_process): Rename to ...
14779 (linux_kill_one_lwp): ... this. Adjust.
14780 (linux_kill): Adjust.
14781 (linux_detach_one_process): Rename to ...
14782 (linux_detach_one_lwp): ... this. Adjust.
14783 (linux_detach): Adjust.
14784 (check_removed_breakpoint): Adjust.
14785 (status_pending_p): Adjust.
14786 (linux_wait_for_process): Rename to ...
14787 (linux_wait_for_lwp): ... this. Adjust.
14788 (linux_wait_for_event): Adjust.
14789 (send_sigstop): Adjust.
14790 (wait_for_sigstop): Adjust.
14791 (stop_all_processes): Rename to ...
14792 (stop_all_lwps): ... this.
14793 (linux_resume_one_process): Rename to ...
14794 (linux_resume_one_lwp): ... this. Adjust.
14795 (linux_set_resume_request, linux_continue_one_thread)
14796 (linux_queue_one_thread, resume_status_pending_p)
14797 (usr_store_inferior_registers, regsets_store_inferior_registers)
14798 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14800 * linux-low.h (get_process): Rename to ...
14801 (get_lwp): ... this. Adjust.
14802 (get_thread_process): Rename to ...
14803 (get_thread_lwp): ... this. Adjust.
14804 (get_process_thread): Rename to ...
14805 (get_lwp_thread): ... this. Adjust.
14806 (struct process_info): Rename to ...
14807 (struct lwp_info): ... this.
14808 (all_processes): Rename to ...
14809 (all_lwps): ... this.
14810 * proc-service.c (ps_lgetregs): Adjust.
14811 * thread-db.c (thread_db_create_event, find_one_thread)
14812 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14814 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14816 * server.c (handle_query): Handle "qAttached".
14818 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14820 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14821 GPLv3, update license URL.
14823 2009-03-01 Doug Evans <dje@google.com>
14825 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14826 (server_h): Add gdb_signals.h.
14827 (signals.o): Update.
14828 * server.h (target_signal_from_host,target_signal_to_host_p)
14829 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14831 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14833 * remote-utils.c (getpkt): Also generate remote-debug
14834 information if noack_mode is set.
14836 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14838 * server.c (handle_query): Report qXfer:siginfo:read and
14839 qXfer:siginfo:write as supported and handle them.
14840 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14841 * linux-low.c (linux_xfer_siginfo): New.
14842 (linux_target_ops): Set it.
14844 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14846 * server.c (gdbserver_usage): Mention --remote-debug.
14847 (main): Accept '--remote-debug' switch.
14849 2009-01-18 Doug Evans <dje@google.com>
14851 * regcache.c (new_register_cache): No need to check result of xcalloc.
14852 * server.c (handle_search_memory): Back out calls to xmalloc,
14853 result is checked and error is returned to user upon failure.
14854 (handle_query): Ditto. Add more checks for result of malloc.
14855 (handle_v_cont): Check result of malloc, report error back to
14857 (handle_v_run): Ditto. Call freeargv.
14858 * server.h (freeargv): Declare.
14859 * utils.c (freeargv): New fn.
14861 2009-01-15 Doug Evans <dje@google.com>
14863 * gdbreplay.c (perror_with_name): Make arg const char *.
14864 * server.h (target_signal_to_name): Make return type const char *.
14865 * thread-db.c (thread_db_err_str): Make return type const char *.
14866 * utils.c (perror_with_name): Make arg const char *.
14868 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14870 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14871 when handling a EXIT_PROCESS_DEBUG_EVENT.
14873 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14875 * gdbreplay.c (gdbreplay_version): Update copyright year.
14876 * server.c (gdbserver_version): Likewise.
14878 2009-01-05 Doug Evans <dje@google.com>
14880 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14881 (handle_extended_wait): Improve comment.
14883 2008-12-13 Doug Evans <dje@google.com>
14885 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14886 * server.h (ATTR_MALLOC): New macro.
14887 (xmalloc,xcalloc,xstrdup): Declare.
14888 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14889 * inferiors.c: Ditto.
14890 * linux-low.c: Ditto.
14891 * mem-break.c: Ditto.
14892 * regcache.c: Ditto.
14893 * remote-utils.c: Ditto.
14896 * win32-low.c: Ditto.
14898 2008-12-12 Doug Evans <dje@google.com>
14900 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14901 in debugging printf.
14903 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14905 2008-12-09 Doug Evans <dje@google.com>
14907 * linux-low.h (struct process_info): Delete member tid, unused.
14908 * thread-db.c (find_one_thread): Update.
14909 (maybe_attach_thread): Update.
14911 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14913 * target.h (struct target_ops): Add qxfer_osdata member.
14914 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14916 (linux_qxfer_osdata): New functions.
14917 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14919 * server.c (handle_query): Handle "qXfer:osdata:read:".
14920 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14921 (buffer_xml_printf): New functions.
14922 * server.h (struct buffer): New.
14923 (buffer_grow_str, buffer_grow_str0): New macros.
14924 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14925 (buffer_xml_printf): Declare.
14927 2008-11-24 Doug Evans <dje@google.com>
14929 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14931 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14933 * server.c (handle_v_run): Always use the supplied argument list.
14935 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14937 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14938 (xtensa_regmap_table): Add entry for scompare1.
14940 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14942 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14943 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14944 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14945 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14946 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14947 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14948 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14949 XML target descriptions.
14950 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14951 when inferior is running on an ISA 2.05 or later processor. Add
14952 special case to return offset for full 64-bit slot of FPSCR when
14955 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14957 * Makefile.in (SFILES, clean): Added sparc64 files.
14958 (reg-sparc64.o, reg-sparc64.c): New.
14959 * configure.srv (sparc*-*-linux*): New configuration.
14960 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14961 syscall arguments for SPARC.
14962 (regsets_store_inferior_registers): Likewise.
14963 * linux-sparc-low.c: New file.
14965 2008-10-21 Doug Evans <dje@google.com>
14967 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14968 (READLINE_DIR,READLINE_DEP): Delete.
14969 (INTERNAL_CFLAGS): Update.
14970 (LINTFLAGS): Update.
14972 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14974 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14975 whole argv from the last run, not just argv[0].
14977 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14979 * regcache.c (new_register_cache): Return NULL if the register
14980 cache size isn't known yet.
14981 (free_register_cache): Avoid dereferencing a NULL regcache.
14983 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14985 * configure.srv: Merge MIPS and MIPS64.
14987 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14989 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14991 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14993 * Makefile.in: Add required vsx dependencies.
14995 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14996 Declare init_registers_powerpc_vsx32l.
14997 Declare init_registers_powerpc_vsx64l.
14998 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14999 (ppc_arch_setup): Check for VSX in hwcap.
15000 (ppc_fill_vsxregset): New function.
15001 (ppc_store_vsxregset): New function.
15002 Add new VSX entry in regset_info target_regsets.
15004 * configure.srv: Add new VSX dependencies.
15006 2008-08-12 Pedro Alves <pedro@codesourcery.com>
15008 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
15009 (remote_open): Set or clear transport_is_reliable.
15010 (putpkt_binary): Don't expect acks in noack mode.
15011 (getpkt): Don't send ack/nac in noack mode.
15012 * server.c (handle_general_set): Handle QStartNoAckMode.
15013 (handle_query): If connected by tcp pass QStartNoAckMode+ in
15015 (main): Reset noack_mode on every connection.
15016 * server.h (noack_mode): Declare.
15018 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
15020 * Makefile.in (GDBREPLAY_OBS): New variable.
15021 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
15023 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
15024 Daniel Jacobowitz <dan@codesourcery.com>
15026 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
15027 (usr_store_inferior_registers): Likewise.
15028 (regsets_store_inferior_registers): Likewise.
15030 2008-07-31 Rolf Jansen <rj@surtec.com>
15031 Pedro Alves <pedro@codesourcery.com>
15033 * configure.ac: Check for memmem declaration.
15034 * server.c [HAVE_MALLOC_H]: Include malloc.h.
15035 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
15036 (disable_packet_qfThreadInfo): Unconditionally compile.
15037 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
15038 * configure, config.in: Regenerate.
15040 2008-07-28 Doug Kwan <dougkwan@google.com>
15042 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
15043 (linux_write_memory): Remove declaration of errno.
15045 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
15047 * linux-low.c (handle_extended_wait): Do not use "status"
15048 variable uninitialized.
15050 2008-07-07 Pedro Alves <pedro@codesourcery.com>
15052 * server.c (handle_v_attach): Inhibit reporting dll changes.
15054 2008-06-27 Pedro Alves <pedro@codesourcery.com>
15056 * remote-utils.c (prepare_resume_reply): If requested, don't
15057 output "thread:TID" in the T stop reply.
15059 * server.c (disable_packet_vCont, disable_packet_Tthread)
15060 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
15061 (handle_query): If requested, disable support for qC, qfThreadInfo
15063 (handle_v_requests): If requested, disable support for vCont.
15064 (gdbserver_show_disableable): New.
15065 (main): Handle --disable-packet and --disable-packet=LIST.
15067 * server.h (disable_packet_vCont, disable_packet_Tthread)
15068 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15070 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
15072 * server.c (gdbserver_usage): Mention --version.
15074 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
15076 * Makefile.in (gdbreplay.o): New rule.
15078 2008-06-06 Joseph Myers <joseph@codesourcery.com>
15080 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15081 message, not gdbserver.
15083 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
15084 Nathan Sidwell <nathan@codesourcery.com>
15085 Joseph Myers <joseph@codesourcery.com>
15087 * acinclude.m4: Include ../../config/acx.m4.
15088 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15089 * configure, config.in: Regenerate.
15090 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15091 * server.c (gdbserver_version): Print PKGVERSION.
15092 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
15093 (main): Adjust gdbserver_usage calls.
15094 * gdbreplay.c (version, host_name): Add declarations.
15095 (gdbreplay_version, gdbreplay_usage): New.
15096 (main): Accept --version and --help options.
15098 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
15100 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15101 (arm_breakpoint_at): Handle Thumb.
15102 (the_low_target): Add comment.
15104 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
15106 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15108 2008-05-09 Doug Evans <dje@google.com>
15110 * server.h (decode_search_memory_packet): Declare.
15111 * remote-utils.c (decode_search_memory_packet): New fn.
15112 * server.c (handle_search_memory_1): New fn.
15113 (handle_search_memory): New fn.
15114 (handle_query): Process qSearch:memory packets.
15116 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
15118 * regcache.c (registers_length): Remove.
15119 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15120 full register packet.
15121 * regcache.h (registers_length): Remove prototype.
15122 * server.h (PBUFSIZ): Define to 16384.
15124 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
15126 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15127 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15128 powerpc-64l.o, and powerpc-altivec64l.o.
15129 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15130 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15131 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15132 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15133 rs6000/power-linux.xml, and rs6000/power64-linux.xml
15136 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15137 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15138 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15139 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15140 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15141 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15142 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15143 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15144 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15145 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15148 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15149 (init_registers_powerpc_32l): ... this new prototype.
15150 (init_registers_powerpc_32): Remove, replace by ...
15151 (init_registers_powerpc_altivec32l): ... this new prototype.
15152 (init_registers_powerpc_e500): Remove, replace by ...
15153 (init_registers_powerpc_e500l): ... this new prototype.
15154 (init_registers_ppc64): Remove, replace by ...
15155 (init_registers_powerpc_64l): ... this new prototype.
15156 (init_registers_powerpc_64): Remove, replace by ...
15157 (init_registers_powerpc_altivec64l): ... this new prototype.
15158 (ppc_num_regs): Set to 73.
15159 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15160 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15161 (ppc_cannot_store_register): Handle orig_r3 and trap.
15162 (ppc_arch_setup): Update init_registers_... calls.
15163 (ppc_fill_gregset): Handle orig_r3 and trap.
15165 * inferiors.c (clear_inferiors): Reset current_inferior.
15167 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15169 * acinclude.m4: Add override.m4.
15170 * configure: Regenerate.
15172 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15174 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15175 initial call to init_register_ppc64.
15177 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15179 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15180 single powerpc*-*-linux* case.
15181 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15183 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15185 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15186 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15188 * linux-ppc-low.c: Include <elf.h>.
15189 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15190 (ppc_hwcap): New global variable.
15191 (ppc_regmap): Remove __SPE__ #ifdef sections.
15192 (ppc_regmap_e500): New global variable.
15193 (ppc_cannot_store_register): Update __SPE__ special case.
15194 (ppc_get_hwcap): New function.
15195 (ppc_arch_setup): Use it to determine whether inferior supports
15196 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15197 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15198 Do not access registers if target does not support AltiVec.
15199 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15200 Do not access registers if target does not support SPE.
15201 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15203 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15205 * linux-low.c (disabled_regsets, num_regsets): New.
15206 (use_regsets_p): Delete.
15207 (linux_wait_for_process): Clear disabled_regsets.
15208 (regsets_fetch_inferior_registers): Check and set it.
15209 (regsets_store_inferior_registers): Likewise.
15210 (linux_fetch_registers, linux_store_registers): Do not use
15212 (initialize_low): Allocate disabled_regsets.
15214 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15216 * Makefile.in (LIBOBJS): New.
15217 (OBS): Use LIBOBJS.
15218 (memmem.o): New rule.
15219 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15220 * configure: Regenerated.
15222 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15224 * server.c (handle_query): Never return "unsupported" for
15225 qXfer:features:read queries.
15227 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15229 * server.c (get_features_xml): Fix inverted condition.
15230 (handle_query): Always support qXfer:feature:read.
15232 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15234 * server.c (wrapper_argv): New.
15235 (start_inferior): Handle wrapper_argv. If set, expect an extra
15237 (gdbserver_usage): Document --wrapper.
15238 (main): Parse --wrapper.
15240 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15242 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15243 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15244 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15245 (ppc_set_pc): Likewise.
15246 (ppc_arch_setup): New function.
15247 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15248 of collect_register.
15249 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15251 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15253 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15254 instead of linux-ppc64-low.o.
15255 * linux-ppc64-low.c: Remove file.
15256 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15257 (linux-ppc64-low.o): Remove rule.
15259 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15260 (init_registers_powerpc_64): Likewise.
15261 (ppc_regmap): Conditionally define depending on __powerpc64__.
15262 (ppc_cannot_store_register): Do not special-case "fpscr" when
15263 compiled on __powerpc64__.
15264 (ppc_collect_ptrace_register): New function.
15265 (ppc_supply_ptrace_register): New function.
15266 (ppc_breakpoint): Change type to "unsigned int".
15267 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15268 (the_low_target): Conditionally provide initializers for the
15269 arch_setup member depending on __powerpc64__. Install
15270 collect_ptrace_register and supply_ptrace_register members.
15272 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15274 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15275 * server.c (gdbserver_xmltarget): Define.
15276 (get_features_xml): Use it to replace "target.xml" and arch_string.
15278 * configure.srv: Remove srv_xmltarget. Add XML files that were
15279 mentioned there to srv_xmlfiles instead. Remove conditional tests
15280 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15281 srv_xmlfiles and srv_regobj to include all possible choices.
15282 * configure.ac (srv_xmltarget): Remove.
15283 (srv_xmlfiles): Do not add "target.xml".
15284 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15285 checks for supplementary target information.
15286 * configure: Regenerate.
15287 * Makefile.in (XML_TARGET): Remove.
15288 (target.xml): Remove rule.
15289 (clean): Do not clean up target.xml.
15290 (.PRECIOUS): Do not mention target.xml.
15292 * target.h (struct target_ops): Remove arch_string member.
15293 * linux-low.c (linux_arch_string): Remove.
15294 (linux_target_ops): Remove arch_string initializer.
15295 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15296 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15297 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15298 * spu-low.c (spu_arch_string): Remove.
15299 (spu_target_ops): Remove arch_string initializer.
15300 * win32-low.c (win32_arch_string): Remove.
15301 (win32_target_ops): Remove arch_string initializer.
15302 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15303 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15304 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15306 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15308 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15309 by collect_ptrace_register and supply_ptrace_register hooks.
15310 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15311 instead of checking for the_low_target.left_pad_xfer.
15312 (usr_store_inferior_registers): Use collect_ptrace_register callback
15313 instead of checking for the_low_target.left_pad_xfer.
15315 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15316 (s390_supply_ptrace_register): Likewise.
15317 (s390_fill_gregset): Call s390_collect_ptrace_register.
15318 (the_low_target): Update.
15320 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15321 (ppc_supply_ptrace_register): Likewise.
15322 (the_low_target): Update.
15324 * linux-i386-low.c (the_low_target): Update.
15325 * linux-x86-64-low.c (the_low_target): Update.
15327 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15329 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15330 reg-s390.o and reg-s390x.o.
15332 * linux-low.c (new_inferior): New global variable.
15333 (linux_create_inferior, linux_attach): Set it.
15334 (linux_wait_for_process): Call the_low_target.arch_setup after the
15335 target has stopped for the first time.
15336 (initialize_low): Do not call the_low_target.arch_setup.
15338 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15339 (s390_set_pc): Likewise.
15340 (s390_arch_setup): New function.
15341 (the_low_target): Use s390_arch_setup as arch_setup routine.
15343 * regcache.c (realloc_register_cache): New function.
15344 (set_register_cache): Call it for each existing regcache.
15346 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15348 * server.h (init_registers): Remove prototype.
15350 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15351 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15352 instead of init_registers ().
15353 * linux-arm-low.c (init_registers_arm): Add prototype.
15354 (init_registers_arm_with_iwmmxt): Likewise.
15355 (the_low_target): Add initializer for arch_setup field.
15356 * linux-cris-low.c (init_registers_cris): Add prototype.
15357 (the_low_target): Add initializer for arch_setup field.
15358 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15359 (the_low_target): Add initializer for arch_setup field.
15360 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15361 (the_low_target): Add initializer for arch_setup field.
15362 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15363 (the_low_target): Add initializer for arch_setup field.
15364 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15365 (the_low_target): Add initializer for arch_setup field.
15366 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15367 (the_low_target): Add initializer for arch_setup field.
15368 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15369 (init_registers_mips64_linux): Likewise.
15370 (the_low_target): Add initializer for arch_setup field.
15371 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15372 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15373 (the_low_target): Add initializer for arch_setup field.
15374 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15375 (init_registers_powerpc_64): Likewise.
15376 (the_low_target): Add initializer for arch_setup field.
15377 * linux-s390-low.c (init_registers_s390): Add prototype.
15378 (init_registers_s390x): Likewise.
15379 (the_low_target): Add initializer for arch_setup field.
15380 * linux-sh-low.c (init_registers_sh): Add prototype.
15381 (the_low_target): Add initializer for arch_setup field.
15382 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15383 (the_low_target): Add initializer for arch_setup field.
15384 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15385 (the_low_target): Add initializer for arch_setup field.
15387 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15388 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15389 instead of init_registers ().
15390 * win32-arm-low.c (init_registers_arm): Add prototype.
15391 (the_low_target): Add initializer for arch_setup field.
15392 * win32-i386-low.c (init_registers_i386): Add prototype.
15393 (the_low_target): Add initializer for arch_setup field.
15395 * spu-low.c (init_registers_spu): Add prototype.
15396 (initialize_low): Call initialie_registers_spu () instead of
15397 initialize_registers ().
15399 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15401 * server.c (handle_v_requests): When handling the vRun and vAttach
15402 packets, if already debugging a process, don't kill it. Return an
15405 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15407 * server.c (handle_query): Correct length check.
15409 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15411 * win32-low.c (do_initial_child_stuff): Add process handle
15412 parameter. Set current_process_handle and current_process_id from the
15413 parameters. Clear globals.
15414 (win32_create_inferior): Don't set current_process_handle and
15415 current_process_id here. Instead pass them on the call to
15416 do_initial_child_stuff.
15417 (win32_attach): Likewise.
15418 (win32_clear_inferiors): New.
15419 (win32_kill): Don't close the current process handle or the
15420 current thread handle here. Instead call win32_clear_inferiors.
15421 (win32_detach): Don't open a new handle to the process. Call
15422 win32_clear_inferiors.
15423 (win32_join): Don't rely on current_process_handle; open a new
15424 handle using the process id.
15425 (win32_wait): Call win32_clear_inferiors when the inferior process
15428 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15430 * server.c (monitor_show_help): Add "exit".
15432 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15434 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15435 (clean): Add reg-xtensa.c.
15436 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15437 * configure.srv (xtensa*-*-linux*) New target.
15438 * linux-xtensa-low.c: New.
15439 * xtensa-xtregs.c: New.
15441 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15443 * hostio.c: Don't include errno.h.
15444 (errno_to_fileio_errno): Move to hostio-errno.
15445 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15446 error number outputting to the target->hostio_last_error callback.
15447 (hostio_packet_error): Use FILEIO_EINVAL directly.
15448 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15449 calls to hostio_error.
15450 * hostio-errno.c: New.
15451 * server.h (hostio_last_error_from_errno): Declare.
15452 * target.h (target_ops): Add hostio_last_error member.
15453 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15454 as hostio_last_error handler.
15455 * spu-low.c (spu_target_ops): Likewise.
15456 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15457 (wince_hostio_last_error): New functions.
15458 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15459 as hostio_last_error handler.
15460 (win32_target_ops) [!_WIN32_WCE]: Register
15461 hostio_last_error_from_errno as hostio_last_error handler.
15462 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15463 (hostio-errno.o): New rule.
15464 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15465 * configure.srv (srv_hostio_err_objs): New variable. Default to
15467 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15468 * configure: Regenerate.
15470 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15472 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15473 (linux_kill, linux_detach): Clean up the process list.
15474 * remote-utils.c (remote_open): Improve port number parsing.
15475 (putpkt_binary, input_interrupt): Only send interrupts if the target
15477 * server.c (extended_protocol): Make static.
15478 (attached): Define earlier.
15479 (exit_requested, response_needed, program_argv): New variables.
15480 (target_running): New.
15481 (start_inferior): Clear attached here.
15482 (attach_inferior): Set attached here.
15483 (require_running): Define.
15484 (handle_query): Use require_running and target_running. Implement
15486 (handle_v_attach, handle_v_run): New.
15487 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15488 (gdbserver_usage): Update.
15489 (main): Redo argument parsing. Handle --debug and --multi. Handle
15490 --attach along with other options or after the port. Save
15491 program_argv. Support no initial program. Resynchronize
15492 communication with GDB after an error. Handle "monitor exit".
15493 Use require_running and target_running. Always allow the extended
15494 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15495 restart in extended mode.
15496 * README: Refer to the GDB manual. Update --attach usage.
15498 2007-12-20 Andreas Schwab <schwab@suse.de>
15500 * linux-low.c (STACK_SIZE): Define.
15501 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15502 (linux_test_for_tracefork): Likewise.
15504 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15506 * linux-low.c (linux_wait_for_event): Update messages. Do not
15507 reinsert auto-delete breakpoints.
15508 * mem-break.c (struct breakpoint): Change return type of handler to
15510 (set_breakpoint_at): Update handler type.
15511 (reinsert_breakpoint_handler): Return 1 instead of calling
15513 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15515 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15516 * mem-break.h (set_breakpoint_at): Update handler type.
15517 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15518 * win32-low.c (auto_delete_breakpoint): New.
15519 (get_child_debug_event): Use it.
15521 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15523 * configure.ac: Check for pread and pwrite.
15524 * hostio.c (handle_pread): Fall back to lseek and read.
15525 (handle_pwrite): Fall back to lseek and write.
15526 * config.in, configure: Regenerated.
15528 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15530 * server.c (myresume): Add own_buf argument.
15531 (main): Update calls.
15533 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15535 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15536 * remote-utils.c (remote_open): Do not call disable_async_io.
15537 (block_async_io): Delete.
15538 (unblock_async_io): Make static.
15539 (initialize_async_io): New.
15540 * server.c (handle_v_cont): Handle async I/O here.
15541 (myresume): Likewise. Move other common resume tasks here...
15542 (main): ... from here. Call initialize_async_io. Disable async
15543 I/O before the main loop.
15544 * server.h (initialize_async_io): Declare.
15545 (block_async_io, unblock_async_io): Delete prototypes.
15546 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15548 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15550 * remote-utils.c (readchar): Allow binary data in received messages.
15552 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15554 * win32-low.c (attaching): New global.
15555 (win32_create_inferior): Clear the `attaching' global.
15556 (win32_attach): Set the `attaching' global.
15557 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15558 attaching. Only set a breakpoint at the entry point if not
15561 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15563 * server.c (main): Don't report dll events on the initial
15564 connection on attaches.
15566 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15568 * server.c (main): Relax numerical bases supported for the pid of
15569 the --attach command line argument.
15571 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15573 * win32-low.c (win32_attach): Call OpenProcess before
15574 DebugActiveProcess, not after. Add last error output to error
15577 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15579 * win32-low.c (win32_get_thread_context)
15580 (win32_set_thread_context): New functions.
15581 (thread_rec): Use win32_get_thread_context.
15582 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15583 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15586 2007-12-03 Leo Zayas
15587 Pedro Alves <pedro_alves@portugalmail.pt>
15589 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15591 (child_add_thread): Minor cleanup.
15592 (child_continue): Resume artificially suspended threads before
15593 calling ContinueDebugEvent.
15594 (suspend_one_thread): New.
15595 (fake_breakpoint_event): New.
15596 (get_child_debug_event): Change return type to int. Check here if
15597 gdb sent an interrupt request. If a soft interrupt was requested,
15598 fake a breakpoint event. Return 0 if there is no event to handle,
15600 (win32_wait): Don't check here if gdb sent an interrupt request.
15601 Ensure there is a valid event to handle.
15602 (win32_request_interrupt): Add soft interruption method as last
15605 2007-12-03 Leo Zayas
15606 Pedro Alves <pedro_alves@portugalmail.pt>
15608 * win32-low.h (win32_thread_info): Add descriptions to the
15609 structure members. Replace `suspend_count' counter by a
15611 * win32-low.c (thread_rec): Update condition of when to get the
15612 context from the inferior. Rely on ContextFlags being set if it
15613 has already been retrieved. Only suspend the inferior thread if
15614 we haven't already. Warn if that fails.
15615 (continue_one_thread): s/suspend_count/suspended/. Only call
15616 ResumeThread once. Warn if that fails.
15618 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15620 * win32-low.c (win32_wait): Don't read from the inferior when it
15621 has already exited.
15623 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15625 * Makefile.in (win32_low_h): New variable.
15626 (win32-low.o): Add dependency on $(win32_low_h).
15627 (win32-arm-low.o, win32-i386-low.o): New rules.
15629 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15631 * hostio.c: Correct copyright year.
15633 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15635 * Makefile.in (OBS): Add hostio.o.
15636 (hostio.o): New rule.
15637 * server.h (handle_vFile): Declare.
15638 * hostio.c: New file.
15639 * server.c (handle_v_requests): Take packet_len and new_packet_len
15640 for binary packets. Call handle_vFile.
15641 (main): Update call to handle_v_requests.
15643 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15645 * linux-low.c: Include <sched.h>.
15647 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15649 * linux-low.c (linux_tracefork_grandchild): New.
15650 (linux_tracefork_child): Use clone.
15651 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15653 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15655 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15657 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15659 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15661 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15663 * inferiors.c (change_inferior_id): Delete.
15664 (add_pid_to_list, pull_pid_from_list): New.
15665 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15666 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15667 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15668 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15669 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15670 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15671 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15672 (using_threads): Always set to 1.
15673 (handle_extended_wait): New.
15674 (add_process): Do not set TID.
15675 (linux_create_inferior): Set must_set_ptrace_flags.
15676 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15677 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15678 (linux_thread_alive): Rename TID argument to LWPID.
15679 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15680 (linux_wait_for_event): Do not use TID or check using_threads. Update
15681 call to dead_thread_notify. Call handle_extended_wait.
15682 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15683 (send_sigstop): Delete sigstop_sent.
15684 (wait_for_sigstop): Avoid TID.
15685 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15686 (linux_test_for_tracefork): New.
15687 (linux_lookup_signals): Use thread_db_active and
15688 linux_supports_tracefork_flag.
15689 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15690 * linux-low.h (get_process_thread): Avoid TID.
15691 (struct process_ifo): Move thread_known and tid to the end. Remove
15693 (linux_attach_lwp, thread_db_init): Update prototypes.
15694 * server.h (change_inferior_id): Delete prototype.
15695 (add_pid_to_list, pull_pid_from_list): New prototypes.
15696 * thread-db.c (thread_db_use_events): New.
15697 (find_first_thread): Rename to...
15698 (find_one_thread): ...this. Update callers and messages. Do not
15699 call fatal. Check thread_db_use_events. Do not call
15700 change_inferior_id or new_thread_notify.
15701 (maybe_attach_thread): Update. Do not call new_thread_notify.
15702 (thread_db_init): Set thread_db_use_events. Check use_events.
15703 * utils.c (fatal, warning): Correct message prefix.
15705 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15707 * Makefile.in (clean): Remove new files.
15708 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15709 (powerpc-64.o, powerpc-64.c): New rules.
15710 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15711 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15713 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15715 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15716 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15717 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15718 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15719 (target_regsets): Add AltiVec and SPE register sets.
15720 * configure.ac: Check for AltiVec and SPE.
15721 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15722 (ppc_fill_vrregset, ppc_store_vrregset): New.
15723 (target_regsets): Add AltiVec register set.
15724 * configure: Regenerated.
15726 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15728 * linux-low.c (O_LARGEFILE): Define.
15729 (linux_read_memory): Use /proc/PID/mem.
15730 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15731 * configure, config.in: Regenerated.
15733 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15735 * linux-low.c (linux_wait_for_event): Do not pass signals while
15738 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15740 * win32-low.c (create_process): New.
15741 (win32_create_inferior): Use create_process instead of
15742 CreateProcess. If create_process failed retry appending an ".exe"
15743 suffix. Store the GetLastError result immediatelly after
15744 create_process calls and use it on the call to error.
15746 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15748 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15750 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15752 * configure.ac: Switch license to GPLv3.
15754 2007-08-01 Michael Snyder <msnyder@access-company.com>
15756 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15758 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15760 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15762 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15763 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15764 CloseToolhelp32Snapshot.
15765 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15766 CloseToolhelp32Snapshot.
15768 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15770 * server.c (main): Check for inferior exit before main loop.
15772 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15774 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15775 instead of on tmp_desc.
15777 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15778 Daniel Jacobowitz <dan@codesourcery.com>
15780 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15781 (add_thread): Minor cleanups.
15782 (clear_inferiors): Move lower in the file. Clear the DLL
15784 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15785 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15786 (xml_escape_text): New.
15787 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15789 (handle_v_cont): Report errors.
15790 (gdbserver_version): Update.
15791 (main): Correct size of own_buf. Do not report initial DLL events.
15792 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15793 (unloaded_dll, xml_escape_text): New.
15794 * win32-low.c (enum target_waitkind): Update comments.
15795 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15796 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15797 (win32_EnumProcessModules, win32_GetModuleInformation)
15798 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15799 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15800 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15801 (win32_Module32First, win32_Module32Next, load_toolhelp)
15802 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15803 (get_child_debug_event): Handle DLL events.
15804 (win32_wait): Likewise.
15806 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15808 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15809 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15811 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15813 * win32-low.c (handle_output_debug_string): Ignore event if not
15816 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15818 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15820 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15822 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15824 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15826 * inferiors.c (change_inferior_id): Add comment.
15827 * linux-low.c (check_removed_breakpoint): Add an early
15828 prototype. Improve debug output.
15829 (linux_attach): Doc update.
15830 (linux_detach_one_process, linux_detach): Clean up before releasing
15832 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15833 * linux-low.h (struct process_info): Doc improvement.
15834 * mem-break.c (delete_all_breakpoints): New.
15835 * mem-break.h (delete_all_breakpoints): New prototype.
15836 * thread-db.c (find_first_thread): New.
15837 (thread_db_create_event): Call it instead of
15838 thread_db_find_new_threads. Clean up unused variables.
15839 (maybe_attach_thread): Remove first thread handling.
15840 (thread_db_find_new_threads): Use find_first_thread.
15841 (thread_db_get_tls_address): Likewise.
15843 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15845 * thread-db.c (thread_db_find_new_threads): Add prototype.
15846 (thread_db_create_event): Check for the main thread before adding
15848 (maybe_attach_thread): Only enable event reporting if TID == 0.
15849 (thread_db_get_tls_address): Check for new threads.
15851 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15853 * linux-low.c (linux_create_inferior): Try execv before execvp.
15854 * spu-low.c (spu_create_inferior): Likewise.
15856 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15858 * linux-low.c (linux_create_inferior): Change execv to execvp.
15859 * spu-low.c (spu_create_inferior): Likewies.
15861 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15863 * Makefile.in (clean): Clean new files instead of deleted ones.
15864 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15865 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15867 * configure.srv: Specify XML files and new regformats for MIPS and
15869 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15870 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15871 an entry for the restart register.
15872 (mips_cannot_fetch_register, mips_cannot_store_register)
15873 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15874 register names to match the XML descriptions.
15875 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15876 restart register instead of $0.
15878 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15879 Markus Deuling <deuling@de.ibm.com>
15881 * remote-utils.c (decode_xfer_write): New function.
15882 * server.h (decode_xfer_write): Add prototype.
15883 * server.c (handle_query): Add PACKET_LEN argument. Support
15884 qXfer:spu:read and qXfer:spu:write packets.
15885 (main): Pass packet_len to handle_query.
15886 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15887 * target.h (target_ops): Add qxfer_spu.
15889 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15891 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15892 accessing non-seekable spufs files.
15894 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15896 * server.c (handle_query): Add reply for qC packet.
15898 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15899 Leo Zayas <lerele@champenstudios@com>
15901 * server.h (check_remote_input_interrupt_request): New function.
15902 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15903 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15904 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15905 (check_remote_input_interrupt_request): New function.
15906 * server.h (check_remote_input_interrupt_request): Declare.
15907 * win32-low.c (winapi_DebugBreakProcess,
15908 winapi_GenerateConsoleCtrlEvent): New typedefs.
15909 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15911 (win32_wait): Check for remote interrupt request
15912 with check_remote_input_interrupt_request.
15913 (win32_request_interrupt): New function.
15914 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15916 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15918 * win32-low.c (debug_registers_changed,
15919 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15920 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15921 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15922 (thread_rec): Get context using the low target.
15923 (child_add_thread): Call thread_added on the low target,
15924 which does the same thing.
15926 (do_initial_child_stuff): Remove debug registers references.
15927 Set context using the low target. Resume threads after
15928 setting the contexts.
15929 (child_continue): Remove dead variable. Remove debug
15930 registers references.
15931 (child_fetch_inferior_registers): Go through the low target.
15932 (do_child_store_inferior_registers): Remove.
15933 (child_store_inferior_registers): Go through the low target.
15934 (win32_resume): Remove debug registers references.
15935 Set context using the low target.
15936 (handle_exception): Change return type to void. Don't record
15937 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15938 first chance exception.
15939 (get_child_debug_event): Change return type to void. Remove
15940 goto loop. Always return after waiting for debug event.
15941 (win32_wait): Convert to switch statement. Handle spurious
15944 * win32-i386-low.c (debug_registers_changed,
15945 debug_registers_used): New.
15946 (initial_stuff): Rename to ...
15947 (i386_initial_stuff): ... this. Clear debug registers
15949 (store_debug_registers): Delete.
15950 (i386_get_thread_context): New.
15951 (load_debug_registers): Delete.
15952 (i386_set_thread_context): New.
15953 (i386_thread_added): New.
15954 (single_step): Rename to ...
15955 (i386_single_step): ... this.
15956 (do_fetch_inferior_registers): Rename to ...
15957 (i386_fetch_inferior_register): ... this.
15958 (i386_store_inferior_register): New.
15959 (the_low_target): Adapt to new interface.
15961 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15962 (arm_get_thread_context): New.
15963 (arm_set_thread_context): New.
15965 (do_fetch_inferior_registers): Rename to ...
15966 (arm_fetch_inferior_register): ... this.
15967 (arm_store_inferior_register): New.
15968 (arm_wince_breakpoint): Reimplement as unsigned long.
15969 (arm_wince_breakpoint_len): Define.
15970 (the_low_target): Adapt to new interface.
15972 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15973 load_debug_registers. Add get_thread_context, set_thread_context,
15974 thread_added and store_inferior_register. Rename
15975 fetch_inferior_registers to fetch_inferior_register.
15976 (regptr): Remove declaration.
15978 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15980 * linux-low.c (linux_detach): Change return type to int. Return 0.
15981 * spu-low.c (spu_detach): Likewise.
15983 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15985 * target.h (target_ops): Change return type of detach to int.
15987 (join_inferior): New.
15988 * server.c (main): Don't skip detach support on mingw32.
15989 If the inferior doesn't support detaching return error.
15990 Call join_inferior instead of using waitpid.
15991 * linux-low.c (linux_join): New.
15992 (linux_target_op): Add linux_join.
15993 * spu-low.c (spu_join): New.
15994 (spu_target_ops): Add spu_join.
15995 * win32-low.c (win32_detach): Adapt to new interface.
15996 Reopen current_process_handle before detaching. Issue a child
15997 resume before detaching.
15999 (win32_target_op): Add win32_join.
16001 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16003 * win32-low.c (win32-attach): Fix return value.
16004 * target.h (target_ops): Describe ATTACH return values.
16006 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16008 * win32-low.c (GETPROCADDRESS): Define.
16009 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
16010 (winapi_DebugSetProcessKillOnExit): Likewise.
16011 (win32_create_inferior): Force usage of ansi CreateProcessA.
16012 (win32_attach): Use GETPROCADDRESS.
16013 (win32_detach): Likewise.
16015 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
16017 * win32-low.c (win32_wait): Don't use WSTOPSIG.
16019 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
16021 * win32-low.c: Commit leftover changes from 2007-03-29.
16023 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16025 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
16026 fields short instead of int. Add explicit padding.
16027 (i387_cache_to_fsave): Remove unnecessary casts.
16028 (i387_fsave_to_cache): Doc fix.
16029 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
16031 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
16033 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
16034 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
16036 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16038 * configure.srv (arm*-*-mingw32ce*): Move near the other
16041 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
16043 * configure.ac: Add errno checking.
16044 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
16045 sys/file.h and malloc.h.
16046 (AC_CHECK_DECLS): Add perror.
16047 (srv_mingwce): Handle.
16048 * configure.srv (i[34567]86-*-cygwin*): Add
16049 win32-i386-low.o to srv_tgtobj.
16050 (i[34567]86-*-mingw*): Likewise.
16051 (arm*-*-mingw32ce*): Add case.
16052 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16053 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
16054 [__MINGW32CE__] (strerror): New function.
16055 [__MINGW32CE__] (errno): Define to GetLastError.
16056 [__MINGW32CE__] (COUNTOF): New macro.
16057 (remote_open): Remove extra close call.
16058 * mem-break.c (delete_breakpoint_at): New function.
16059 * mem-break.h (delete_breakpoint_at): Declare.
16060 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
16061 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
16062 [USE_WIN32API] (read, write): Add char* casts.
16063 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
16064 * server.h: Include wincecompat.h on Windows CE.
16065 [HAVE_ERRNO_H]: Check.
16066 (perror): Declare if not declared.
16067 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
16068 (perror_with_name): Remove errno declaration.
16069 * wincecompat.h: New.
16070 * wincecompat.c: New.
16071 * win32-low.h: New.
16072 * win32-arm-low.c: New.
16073 * win32-i386-low.c: New.
16074 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16075 (OUTMSG2): Make it safe.
16077 (COUNTOF): New macro.
16078 (NUM_REGS): Get it from the low target.
16079 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16080 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16081 (thread_rec): Let low target handle debug registers.
16082 (child_add_thread): Likewise.
16083 (child_init_thread_list): Likewise.
16084 (continue_one_thread): Likewise.
16086 (do_child_fetch_inferior_registers): Move to ...
16087 * win32-i386-low.c: ... here, and rename to ...
16088 (do_fetch_inferior_registers): ... this.
16089 * win32-low.c (child_fetch_inferior_registers):
16090 Go through the low target.
16091 (do_child_store_inferior_registers): Use regptr.
16092 (strwinerror): New function.
16093 (win32_create_inferior): Handle Windows CE.
16094 Use strwinerror instead of strerror on Windows error
16095 codes. Add program to the error output.
16096 Don't close the main thread handle on Windows CE.
16097 (win32_attach): Use coredll.dll on Windows CE.
16098 (win32_kill): Close current process and current
16100 (win32_detach): Use coredll.dll on Windows CE.
16101 (win32_resume): Let low target handle debug registers, and
16103 (handle_exception): Add/Remove initial breakpoint. Avoid
16104 non-existant WSTOPSIG on Windows CE.
16105 (win32_read_inferior_memory): Cast to remove warning.
16106 (win32_arch_string): Go through the low target.
16107 (initialize_low): Call set_breakpoint_data with the low
16108 target's breakpoint.
16109 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16110 FOP_REGNUM, mappings): Move to ...
16111 * win32-i386-low.c: ... here.
16112 * win32-low.c (win32_thread_info): Move to ...
16113 * win32-low.h: ... here.
16114 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16115 win32-arm-low.c and wincecompat.c.
16116 (all:): Add $EXEEXT.
16117 (install-only:): Likewise.
16118 (gdbserver:): Likewise.
16119 (gdbreplay:): Likewise.
16120 * config.in: Regenerate.
16121 * configure: Regenerate.
16123 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16125 * win32-low.c: Rename typedef thread_info to
16126 win32_thread_info throughout.
16128 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
16130 * win32-i386-low.c: Rename to ...
16131 * win32-low.c: ... this.
16132 * configure.srv: Replace win32-i386-low.o with win32-low.o.
16133 * Makefile.in: Likewise.
16135 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
16137 * remote-utils.c (monitor_output): Constify msg parameter.
16138 * server.h (monitor_output): Likewise.
16139 * win32-i386-low.c (handle_output_debug_string): New.
16140 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16141 handle_output_debug_string.
16142 (get_child_debug_event): Likewise.
16144 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16146 * server.c (main): Correct strtoul check.
16148 2007-03-27 Jon Ringle <jon@ringle.org>
16150 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16152 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16154 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16156 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16158 * terminal.h: Check HAVE_SGTTY_H.
16160 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16162 * remote-utils.c (remote_open): Print out the assigned port number.
16164 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16166 * remote-utils.c (monitor_output): New function.
16167 * server.c (debug_threads): Define here.
16168 (monitor_show_help): New function.
16169 (handle_query): Handle qRcmd.
16170 (main): Do not handle 'd' packet.
16171 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16172 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16175 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16177 * Makefile.in (EXEEXT): New.
16178 (clean): Use $(EXEEXT).
16180 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16182 * target.h (target_ops): Rename send_signal to request_interrupt,
16183 and remove enum target_signal parameter.
16184 * linux-low.c (linux_request_interrupt): Rename from
16185 linux_send_signal, and always send SIGINT.
16186 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16187 and always send SIGINT.
16188 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16190 (input_interrupt): Likewise.
16192 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16194 * server.c (get_features_xml): Check if target implemented
16196 * win32-i386-low.c (win32_arch_string): New.
16197 (win32_target_ops): Add win32_arch_string as arch_string member.
16199 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16201 * spu-low.c (spu_arch_string): New.
16202 (spu_target_ops): Add spu_arch_string.
16204 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16206 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16207 * configure.ac: Do not check for terminal.h.
16208 * configure, config.in: Regenerated.
16210 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16212 * Makefile.in (OBS): Add $(XML_BUILTIN).
16213 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16215 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16216 (arm-with-iwmmxt.c): New.
16217 * config.in, configure: Regenerate.
16218 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16219 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16220 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16221 (arm*-*-linux*): Add iWMMXt and regset support.
16222 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16223 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16224 (arm_store_wmmxregset, target_regsets): New.
16225 * server.c (get_features_xml): Take annex argument. Check builtin
16227 (handle_query): Handle multiple annexes.
16229 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16231 * remote-utils.c [USE_WIN32API] (read, write): Define.
16232 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16235 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16237 * linux-i386-low.c (the_low_target): Set arch_string.
16238 * linux-x86-64-low.c (the_low_target): Likewise.
16239 * linux-low.c (linux_arch_string): New.
16240 (linux_target_ops): Add it.
16241 * linux-low.h (struct linux_target_ops): Add arch_string.
16242 * server.c (write_qxfer_response): Use const void * for DATA.
16243 (get_features_xml): New.
16244 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16245 * target.h (struct target_ops): Add arch_string method.
16247 2007-01-03 Denis Pilat <denis.pilat@st.com>
16248 Daniel Jacobowitz <dan@codesourcery.com>
16250 * linux-low.c (linux_kill): Handle being called with no threads.
16251 * win32-i386-low.c (win32_kill): Likewise.
16252 (get_child_debug_event): Clear current_process_handle.
16254 2006-12-30 Denis PILAT <denis.pilat@st.com>
16255 Daniel Jacobowitz <dan@codesourcery.com>
16257 * remote-utils.c (remote_open): Check the type of specified
16258 serial port devices before opening them.
16259 * server.c (main): Kill the inferior if an error occurs during
16260 the first remote_open.
16262 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16264 * README: Update supported targets.
16266 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16268 * Makefile.in (clean): Remove reg-mips64.c.
16269 (reg-mips64.c, reg-mips64.o): New rules.
16270 * configure.srv: Handle mips64. Include regset support for mips.
16271 * linux-mips-low.c (union mips_register): New.
16272 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16273 (mips_breakpoint, mips_breakpoint_at): Use int.
16274 (mips_collect_register, mips_supply_register)
16275 (mips_collect_register_32bit, mips_supply_register_32bit)
16276 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16277 (mips_store_fpregset, target_regsets): New.
16278 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16280 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16282 * configure.srv: Add target "spu*-*-*".
16283 * Makefile.in (clean): Remove reg-spu.c.
16284 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16285 * spu-low.c: New file.
16287 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16289 * configure.ac: Correct td_thr_tls_get_addr test.
16290 * configure: Regenerated.
16292 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16294 * linux-low.c (linux_wait_for_event): Reformat. Use the
16295 pass_signals array.
16296 * remote-utils.c (decode_address_to_semicolon): New.
16297 * server.c (pass_signals, handle_general_set): New.
16298 (handle_query): Mention QPassSignals for qSupported.
16299 (main): Call handle_general_set.
16300 * server.h (pass_signals, decode_address_to_semicolon): New.
16302 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16304 * server.c (handle_query): Correct error handling for read_auxv.
16306 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16308 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16309 and srv_linux_thread_db to yes.
16310 * linux-s390-low.c (s390_fill_gregset): New function.
16311 (target_regsets): Define data structure.
16313 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16315 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16316 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16317 * config.in, configure: Regenerated.
16318 * inferiors.c (gdb_id_to_thread): New function.
16319 (gdb_id_to_thread_id): Use it.
16320 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16321 * linux-low.h (struct process_info): Add th member.
16322 (thread_db_get_tls_address): New prototype.
16323 * remote-utils.c (decode_address): Make non-static.
16324 * server.c (handle_query): Handle qGetTLSAddr.
16325 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16326 * target.h (struct target_ops): Add get_tls_address.
16327 * thread-db.c (maybe_attach_thread): Save the thread handle.
16328 (thread_db_get_tls_address): New.
16330 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16332 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16333 (linux_resume_one_process): Take a siginfo_t *. Update all
16334 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16335 (struct pending_signals): Add a siginfo_t.
16336 (linux_wait_for_process): Always set last_status.
16337 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16338 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16339 * linux-low.h (struct process_info): Add last_status.
16341 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16343 * remote-utils.c (try_rle): New function.
16344 (putpkt_binary): Use it.
16346 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16348 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16349 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16350 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16351 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16352 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16355 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16357 * server.c (terminal_fd): New variable.
16358 (old_foreground_pgrp): Likewise.
16359 (restore_old_foreground_pgrp): New function.
16360 (start_inferior): Record the terminal file descriptor in terminal_fd
16361 and its original foreground group in old_foreground_pgrp. Register
16362 restore_old_foreground_pgrp with atexit().
16364 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16366 * server.c (handle_query): Correct qPart to qXfer.
16368 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16370 * configure.ac: Check for more headers which are missing on
16371 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16372 * configure.srv: Add Cygwin and mingw32.
16373 * remote-utils.c: Don't include headers unconditionally which
16374 are missing on mingw32. Include <winsock.h> for mingw32.
16375 (remote_open): Adjust for mingw32 support. Flush
16376 standard error after writing to it.
16377 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16378 (unblock_async_io, enable_async_io, disable_async_io)
16379 (readchar, getpkt): Update for Winsock support.
16380 (prepare_resume_reply): Expect a protocol signal number.
16381 * server.c: Disable <sys/wait.h> on mingw32.
16382 (start_inferior): Adjust for mingw32 support. Flush
16383 standard error after writing to it.
16384 (attach_inferior): Likewise. Use protocol signal
16386 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16388 * win32-i386-low.c: New file.
16389 * Makefile.in (XM_CLIBS): Set.
16390 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16391 (win32-i386-low.o): New dependency rule.
16392 * linux-low.c (linux_wait): Use target signal numbers.
16393 * target.h (struct target_ops): Doc fix.
16394 * server.h (target_signal_to_name): New prototype.
16395 * gdbreplay.c: Don't include headers unconditionally which
16396 are missing on mingw32. Include <winsock.h> for mingw32.
16397 (remote_close, remote_open): Adjust for Winsock support.
16398 * configure, config.in: Regenerated.
16400 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16402 * server.c (decode_xfer_read, write_qxfer_response): New.
16403 (handle_query): Take a packet length argument. Handle
16404 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16405 the qSupported response.
16406 (main): Update call to handle_query.
16408 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16410 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16411 (putpkt_binary): Renamed from putpkt and adjusted for binary
16413 (putpkt): New wrapper for putpkt_binary.
16414 (readchar): Don't mask off the high bit.
16415 (decode_X_packet): New function.
16416 * server.c (main): Call putpkt_binary if a handler sets the packet
16417 length. Save the length of the incoming packet. Handle 'X'.
16418 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16420 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16422 * server.c (handle_query): Handle qSupported.
16424 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16426 * remote-utils.c (all_symbols_looked_up): New variable.
16427 (look_up_one_symbol): Check it.
16428 * server.h (look_up_one_symbol): New declaration.
16429 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16431 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16433 * Makefile.in (linux-arm-low.o): Update dependencies.
16434 * linux-arm-low.c: Include "gdb_proc_service.h".
16435 (PTRACE_GET_THREAD_AREA): Define.
16436 (ps_get_thread_area): New function.
16438 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16440 * configure.srv (m68k*-*-uclinux*): New target.
16441 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16442 (linux_resume_one_process): Remove extraneous cast.
16443 (linux_read_offsets): New.
16444 (linux_target_op): Add linux_read_offsets on mmuless systems.
16445 * server.c (handle_query): Add qOffsets logic.
16446 * target.h (struct target_ops): Add read_offsets.
16448 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16450 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16451 (PTRACE_GET_THREAD_AREA): Define.
16452 (ps_get_thread_area): New function.
16453 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16454 (linux-x86-64-low.o): Update.
16456 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16458 * configure.ac: Remove checks for prfpregset_t.
16459 * gdb_proc_service.h: New file.
16460 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16461 new "gdb_proc_service.h".
16462 * proc-service.c: Likewise.
16463 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16464 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16465 * Makefile.in (gdb_proc_service_h): Updated.
16466 * configure, config.in: Regenerated.
16468 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16470 * remote-utils.c (prepare_resume_reply): Move declaration
16471 of gdb_id_from_wait to the top of the block.
16473 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16475 * linux-low.c (regsets_store_inferior_registers): Read the regset
16476 from the target before filling it.
16478 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16480 * server.c (attach_inferior): Return SIGTRAP for a successful
16483 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16485 * Makefile.in (OBS): Add version.o.
16486 (STAGESTUFF): Delete.
16487 (version.o): Add dependencies.
16488 (version.c): Replace rule.
16489 (clean): Remove version.c.
16490 * server.c (gdbserver_version): New.
16491 (gdbserver_usage): Use printf.
16492 (main): Handle --version and --help.
16493 * server.h (version, host_name): Add declarations.
16495 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16507 * linux-x86-64-low.c:
16509 * linux-s390-low.c:
16510 * linux-ppc64-low.c:
16512 * linux-mips-low.c:
16513 * linux-m68k-low.c:
16514 * linux-m32r-low.c:
16517 * linux-ia64-low.c:
16518 * linux-i386-low.c:
16519 * linux-crisv32-low.c:
16531 * gdbserver.1: Add (C) after Copyright. Update the FSF
16534 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16536 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16537 (arm_breakpoint_at): Recognize both breakpoints.
16538 (the_low_target): Use the correct breakpoint instruction.
16540 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16542 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16543 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16544 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16545 (the_low_target): Update.
16547 2005-10-25 Andreas Schwab <schwab@suse.de>
16549 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16551 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16552 (ia64_num_regs): Reduce to 462.
16554 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16556 * acinclude.m4: Correct quoting.
16557 * aclocal.m4: Regenerated.
16559 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16560 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16561 (thread_db_init): Call thread_db_err_str.
16562 * configure.ac: Check for TD_VERSION.
16563 * config.in, configure: Regenerated.
16565 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16567 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16569 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16571 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16572 is not available. Define HAVE_PTRACE_GETREGS if it is.
16573 * config.in, configure: Regenerated.
16574 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16575 * linux-i386-low.c, linux-m68k-low.c: Update to use
16576 HAVE_PTRACE_GETREGS.
16577 * linux-low.c (regsets_fetch_inferior_registers)
16578 (regsets_store_inferior_registers): Only return 0 if we processed
16580 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16581 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16583 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16585 * inferiors.c (struct thread_info): Add gdb_id.
16586 (add_thread): Add gdb_id argument.
16587 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16588 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16589 calls to add_thread.
16590 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16591 * server.c (handle_query): Use thread_to_gdb_id.
16592 (handle_v_cont, main): Use gdb_id_to_thread_id.
16593 * server.h (add_thread): Update prototype.
16594 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16597 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16599 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16600 left-padded registers.
16601 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16602 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16604 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16606 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16607 * configure: Regenerate.
16608 * config.in: Regenerate.
16609 * server.h (NEED_DECLARATION_STRERROR):
16610 Replace with !HAVE_DECL_STRERROR.
16612 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16614 * linux-low.c (linux_wait, linux_send_signal): Don't test
16615 an unsigned long variable for > 0 if it could be MAX_ULONG.
16616 * server.c (myresume): Likewise.
16617 * target.c (set_desired_inferior): Likewise.
16619 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16621 * configure.ac: Simplify and improve check for socklen_t.
16622 * configure, config.in: Regenerate.
16624 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16626 * acconfig.h: Remove.
16627 * configure.ac: Add a test for socklen_t. Use three-argument
16628 AC_DEFINE throughout.
16629 * config.in: Regenerated using autoheader 2.59.
16630 * configure: Regenerated.
16632 * gdbreplay.c (socklen_t): Provide a default.
16633 (remote_open): Use socklen_t.
16634 * remote-utils.c (socklen_t): Provide a default.
16635 (remote_open): Use socklen_t.
16636 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16639 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16641 * linux-low.c (linux_read_memory, linux_write_memory)
16642 (linux_read_auxv): Likewise.
16643 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16644 (check_mem_write): Likewise.
16645 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16647 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16648 (registers_from_string, register_data): Likewise.
16649 * server.c (handle_query, main): Likewise.
16650 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16651 (decode_M_packet): Likewise.
16652 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16653 * target.h (struct target_ops): Update read_memory, write_memory,
16655 (read_inferior_memory, write_inferior_memory): Update.
16656 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16657 to unsigned char *.
16658 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16659 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16660 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16661 linux-s390-low.c, linux-sh-low.c: Update for changes in
16662 read_inferior_memory and the_low_target->breakpoint.
16664 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16666 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16667 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16668 * configure.srv: Add powerpc64-*-linux*.
16669 * linux-ppc64-low.c: New file.
16671 2005-05-23 Orjan Friberg <orjanf@axis.com>
16673 * linux-cris-low.c: New file with support for CRIS.
16674 * linux-crisv32-low.c: Ditto for CRISv32.
16675 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16676 (clean): Add reg-cris.c and reg-crisv32.c.
16677 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16678 reg-crisv32.o, and reg-crisv32.c to make rules.
16679 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16680 recognized targets.
16682 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16684 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16685 of sizeof (PTRACE_XFER_TYPE).
16686 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16688 2005-05-12 Orjan Friberg <orjanf@axis.com>
16690 * target.h (struct target_ops): Add insert_watchpoint,
16691 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16692 pointers for hardware watchpoint support.
16693 * linux-low.h (struct linux_target_ops): Ditto.
16694 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16695 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16696 to linux_target_ops.
16697 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16699 * server.c (main): Recognize 'Z' and 'z' packets.
16701 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16703 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16704 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16705 (the_low_target): Add new members.
16707 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16709 * proc-service.c (ps_lgetregs): Search all_processes instead of
16712 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16714 * server.c (start_inferior): Change return type to int.
16715 (attach_inferior): Change sigptr to int *.
16716 (handle_v_cont, handle_v_requests): Change signal to int *.
16717 (main): Change signal to int.
16719 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16721 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16722 * configure.srv: Add m32r*-*-linux*.
16723 * linux-m32r-low.c: New file.
16725 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16727 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16729 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16731 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16732 Take unsigned long arguments for PIDs.
16733 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16734 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16735 (wait_for_sigstop, linux_resume_one_process)
16736 (regsets_fetch_inferior_registers, linux_send_signal)
16737 (linux_read_auxv): Likewise. Update the types of variables holding
16738 PIDs. Update format string specifiers.
16739 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16740 * remote-utils.c (prepare_resume_reply): Likewise.
16741 * server.c (cont_thread, general_thread, step_thread)
16742 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16744 (handle_query): Update format specifiers.
16745 (handle_v_cont, main): Use strtoul for thread IDs.
16746 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16747 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16748 (general_thread, step_thread, thread_from_wait)
16749 (old_thread_from_wait): Update.
16750 * target.h (struct thread_resume): Use unsigned long for THREAD.
16751 (struct target_ops): Use unsigned long for arguments to attach and
16754 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16756 * acinclude.m4: Include bfd/bfd.m4 directly.
16757 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16758 <agriffis@toolchain.org>.
16759 * aclocal.m4, configure: Regenerated.
16761 2005-01-07 Andrew Cagney <cagney@gnu.org>
16763 * configure.ac: Rename configure.in, require autoconf 2.59.
16764 * configure: Re-generate.
16766 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16768 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16769 LIBS when finished.
16770 * aclocal.m4: Regenerated.
16771 * configure: Regenerated.
16773 2004-11-21 Andreas Schwab <schwab@suse.de>
16775 * linux-m68k-low.c (m68k_num_gregs): Define.
16776 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16777 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16778 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16779 (m68k_breakpoint_at): New. Add to the_low_target.
16781 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16782 srv_linux_thread_db to yes.
16784 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16786 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16787 (ARCH_SET_FS): Likewise.
16788 (ARCH_GET_FS): Likewise.
16789 (ARCH_GET_GS): Likewise.
16791 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16793 * linux-i386-low.c (ps_get_thread_area): New.
16794 * linux-x86-64-low.c (ps_get_thread_area): New.
16795 * linux-low.c: Include <sys/syscall.h>.
16796 (linux_kill_one_process): Don't kill the first thread here.
16797 (linux_kill): Kill the first thread here.
16798 (kill_lwp): New function.
16799 (send_sigstop, linux_send_signal): Use it.
16800 * proc-service.c: Clean up #ifdefs.
16801 (fpregset_info): Delete.
16802 (ps_lgetregs): Update and enable implementation.
16803 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16805 * remote-utils.c (struct sym_cache, symbol_cache): New.
16806 (input_interrupt): Print a clearer message.
16807 (async_io_enabled): New variable.
16808 (enable_async_io, disable_async_io): Use it. Update comments.
16809 (look_up_one_symbol): Use the symbol cache.
16810 * thread-db.c (thread_db_look_up_symbols): New function.
16811 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16813 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16815 * configure.in: Test for -rdynamic.
16816 * configure: Regenerated.
16817 * Makefile (INTERNAL_LDFLAGS): New.
16818 (gdbserver, gdbreplay): Use it.
16820 2004-09-02 Andrew Cagney <cagney@gnu.org>
16822 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16824 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16826 * linux-low.c (linux_wait): Clear all_processes list also.
16828 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16830 * linux-low.c: Include <errno.h>. Remove extern declaration of
16833 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16835 * gdbreplay.c, server.h, utils.c: Update copyright years.
16837 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16839 * server.c (main): Print child status or termination signal from
16840 variable 'signal', not 'sig'.
16842 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16844 * linux-low.c (linux_read_memory): Change return type to
16845 int. Check for and return error from ptrace().
16846 * target.c (read_inferior_memory): Change return type to int. Pass
16847 back return status from the_target->read_memory().
16848 * target.h (struct target_ops): Adapt *read_memory() prototype.
16850 (read_inferior_memory): Adapt prototype.
16851 * server.c (main): Return an error packet if
16852 read_inferior_memory() returns an error.
16854 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16856 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16857 Unify with other clean targets.
16859 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16861 * server.c (handle_v_cont): Call set_desired_inferior.
16863 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16865 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16867 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16869 * linux-low.c (linux_wait): Unblock async I/O.
16870 (linux_resume): Block and enable async I/O.
16871 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16872 * server.h (block_async_io, unblock_async_io): Add prototypes.
16874 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16876 * remote-utils.c (remote_open): Print a status notice after
16877 opening a TCP port.
16878 * server.c (attach_inferior): Print a status notice after
16881 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16883 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16885 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16887 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16889 * server.c, target.h: Update copyright years.
16891 2004-02-25 Roland McGrath <roland@redhat.com>
16893 * target.h (struct target_ops): New member `read_auxv'.
16894 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16895 * linux-low.c (linux_read_auxv): New function.
16896 (linux_target_ops): Initialize `read_auxv' member to that.
16898 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16900 Committed by Jim Blandy <jimb@redhat.com>.
16902 * linux-s390-low.c (s390_num_regs): Update.
16903 (s390_regmap): Remove control registers. Use __s390x__ predefine
16904 instead of GPR_SIZE to distiguish s390 and s390x targets.
16906 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16908 * linux-low.c: Update copyright year.
16909 (check_removed_breakpoint): Clear pending_is_breakpoint.
16910 (linux_set_resume_request, linux_queue_one_thread)
16911 (resume_status_pending_p): New functions.
16912 (linux_continue_one_thread): Use process->resume.
16913 (linux_resume): Only resume threads if there are no pending events.
16914 * linux-low.h (struct process_info): Add resume request
16917 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16919 * regcache.c (new_register_cache): Clear the allocated register
16920 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16922 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16924 * linux-low.c (linux_resume): Take a struct thread_resume *
16926 (linux_wait): Update call.
16927 (resume_ptr): New static variable.
16928 (linux_continue_one_thread): Renamed from
16929 linux_continue_one_process. Use resume_ptr.
16930 (linux_resume): Use linux_continue_one_thread.
16931 * server.c (handle_v_cont, handle_v_requests): New functions.
16932 (myresume): New function.
16933 (main): Handle 'v' case.
16934 * target.h (struct thread_resume): New type.
16935 (struct target_ops): Change argument of "resume" to struct
16937 (myresume): Delete macro.
16939 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16941 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16942 (uninstall): Support DESTDIR.
16944 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16946 * configure.srv: Add xscale*linux copy of arm*linux entry.
16948 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16950 * linux-arm-low.c (arm_reinsert_addr): New function.
16951 (the_low_target): Add arm_reinsert_addr.
16953 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16955 * mem-break.c: Remove whitespace at end of file.
16957 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16959 * configure.in: Check whether we need to prototype strerror.
16960 * server.h: Optionally prototype strerror.
16961 * gdbreplay.c (perror_with_name): Use strerror.
16962 * linux-low.c (linux_attach_lwp): Use strerror.
16963 * utils.c (perror_with_name): Use strerror.
16964 * config.in, configure: Regenerated.
16966 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16968 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16969 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16971 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16973 * Makefile.in (SFILES): Update.
16974 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16975 low-sun3.c: Remove files.
16977 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16979 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16980 (linux_detach_one_process, linux_detach): New functions.
16981 (linux_target_ops): Add linux_detach.
16982 * server.c (main): Handle 'D' packet.
16983 * target.h (struct target_ops): Add "detach" member.
16984 (detach_inferior): Define.
16986 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16988 From Kelley Cook <kelleycook@wideopenwest.com>:
16989 * configure.srv: Accept i[34567]86 variants.
16991 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16993 * linux-low.c (linux_wait_for_event): Correct comment typos.
16994 (linux_resume_one_process): Call check_removed_breakpoint.
16995 (linux_send_signal): New function.
16996 (linux_target_ops): Add linux_send_signal.
16997 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16999 * target.h (struct target_ops): Add send_signal.
17001 2003-05-29 Jim Blandy <jimb@redhat.com>
17003 * linux-low.c (usr_store_inferior_registers): Transfer buf in
17004 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
17005 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
17006 away part of the register's value.
17008 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
17010 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
17011 (linux_wait_for_event, linux_init_signals): Likewise.
17013 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
17015 * configure.in: Check for stdlib.h.
17016 * configure: Regenerated.
17017 * config.in: Regenerated.
17019 2003-01-04 Andreas Schwab <schwab@suse.de>
17021 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
17023 2003-01-02 Andrew Cagney <ac131313@redhat.com>
17025 * Makefile.in: Remove obsolete code.
17027 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
17029 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
17030 defined(PT_FPR0_HI).
17032 2002-11-17 Stuart Hughes <seh@zee2.com>
17034 * linux-arm-low.c (arm_num_regs): Increase.
17035 (arm_regmap): Include status register.
17037 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
17039 * linux-low.c (register_addr): Remove incorrect -1 check.
17041 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
17043 * linux-low.c (linux_create_inferior): Call setpgid. Return
17045 (unstopped_p, linux_signal_pid): Remove.
17046 (linux_target_ops): Remove linux_signal_pid.
17047 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
17048 global instead of target method.
17049 * target.h (struct target_ops): Remove signal_pid. Update comment
17050 for create_inferior.
17051 * server.c (signal_pid): New variable.
17052 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
17053 gdbserver. Set the child to be the foreground process group.
17054 (attach_inferior): Set signal_pid.
17056 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
17058 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
17060 2002-08-20 Jim Blandy <jimb@redhat.com>
17062 * Makefile.in (LDFLAGS): Allow the configure script to establish a
17065 2002-08-01 Andrew Cagney <cagney@redhat.com>
17067 * Makefile.in: Make chill references obsolete.
17069 2002-07-24 Kevin Buettner <kevinb@redhat.com>
17071 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17072 * configure: Regenerate.
17073 * config.in: Regenerate.
17075 2002-07-09 David O'Brien <obrien@FreeBSD.org>
17077 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17078 (perror_with_name, remote_close, remote_open, expect, play): Static.
17080 2002-07-04 Michal Ludvig <mludvig@suse.cz>
17082 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17083 byte offsets instead of an array of indexes.
17084 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17086 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
17088 * regcache.c: Add comment.
17090 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
17092 * thread-db.c: New file.
17093 * proc-service.c: New file.
17094 * acinclude.m4: New file.
17095 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17096 proc-service.o, and thread-db.o.
17097 (linux-low.o): Add USE_THREAD_DB.
17098 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17099 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17100 * aclocal.m4: Regenerated.
17101 * config.in: Regenerated.
17102 * configure: Regenerated.
17103 * configure.in: Check for proc_service.h, sys/procfs.h,
17104 thread_db.h, and linux/elf.h headrs.
17105 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17106 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
17107 Check for -lthread_db and thread support.
17108 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17109 PowerPC, and SuperH.
17110 * i387-fp.c: Constify arguments.
17111 * i387-fp.h: Likewise.
17112 * inferiors.c: (struct thread_info): Renamed from
17113 `struct inferior_info'. Remove PID member. Use generic inferior
17114 list header. All uses updated.
17115 (inferiors, signal_pid): Removed.
17116 (all_threads): New variable.
17117 (get_thread): Define.
17118 (add_inferior_to_list): New function.
17119 (for_each_inferior): New function.
17120 (change_inferior_id): New function.
17121 (add_inferior): Removed.
17122 (remove_inferior): New function.
17123 (add_thread): New function.
17124 (free_one_thread): New function.
17125 (remove_thread): New function.
17126 (clear_inferiors): Use for_each_inferior and free_one_thread.
17127 (find_inferior): New function.
17128 (find_inferior_id): New function.
17129 (inferior_target_data): Update argument type.
17130 (set_inferior_target_data): Likewise.
17131 (inferior_regcache_data): Likewise.
17132 (set_inferior_regcache_data): Likewise.
17133 * linux-low.c (linux_bp_reinsert): Remove.
17134 (all_processes, stopping_threads, using_thrads)
17135 (struct pending_signals, debug_threads, pid_of): New.
17136 (inferior_pid): Replace with macro.
17137 (struct inferior_linux_data): Remove.
17138 (get_stop_pc, add_process): New functions.
17139 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17140 Use add_process and add_thread.
17141 (linux_attach_lwp): New function, based on old linux_attach. Use
17142 add_process and add_thread. Set stop_expected for new threads.
17143 (linux_attach): New function.
17144 (linux_kill_one_process): New function.
17145 (linux_kill): Kill all LWPs.
17146 (linux_thread_alive): Use find_inferior_id.
17147 (check_removed_breakpoints, status_pending_p): New functions.
17148 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17149 Update. Use WNOHANG. Wait for cloned processes also. Update process
17150 struct for the found process.
17151 (linux_wait_for_event): New function.
17152 (linux_wait): Use it. Support LWPs.
17153 (send_sigstop, wait_for_sigstop, stop_all_processes)
17154 (linux_resume_one_process, linux_continue_one_process): New functions.
17155 (linux_resume): Support LWPs.
17156 (REGISTER_RAW_SIZE): Remove.
17157 (fetch_register): Use register_size instead. Call supply_register.
17158 (usr_store_inferior_registers): Likewise. Call collect_register.
17159 Fix recursive case.
17160 (regsets_fetch_inferior_registers): Improve error message.
17161 (regsets_store_inferior_registers): Add debugging.
17162 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17163 (unstopped_p, linux_signal_pid): New functions.
17164 (linux_target_ops): Add linux_signal_pid.
17165 (linux_init_signals): New function.
17166 (initialize_low): Call it. Initialize using_threads.
17167 * regcache.c (inferior_regcache_data): Add valid
17169 (get_regcache): Fetch registers lazily. Add fetch argument
17170 and update all callers.
17171 (regcache_invalidate_one, regcache_invalidate): New
17173 (new_register_cache): Renamed from create_register_cache.
17174 Return the new regcache.
17175 (free_register_cache): Change argument to a void *.
17176 (registers_to_string, registers_from_string): Call get_regcache
17177 with fetch flag set.
17178 (register_data): Make static. Pass fetch flag to get_regcache.
17179 (supply_register): Call get_regcache with fetch flag clear.
17180 (collect_register): Call get_regcache with fetch flag set.
17181 (collect_register_as_string): New function.
17182 * regcache.h: Update.
17183 * remote-utils.c (putpkt): Flush after debug output and use
17185 Handle input interrupts while waiting for an ACK.
17186 (input_interrupt): Use signal_pid method.
17187 (getpkt): Flush after debug output and use stderr.
17188 (outreg): Use collect_register_as_string.
17189 (new_thread_notify, dead_thread_notify): New functions.
17190 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17191 and general_thread.
17192 (look_up_one_symbol): Flush after debug output.
17193 * server.c (step_thread, server_waiting): New variables.
17194 (start_inferior): Don't use signal_pid. Update call to mywait.
17195 (attach_inferior): Update call to mywait.
17196 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17197 (main): Don't fetch/store registers explicitly. Use
17198 set_desired_inferior. Support proposed ``Hs'' packet. Update
17200 * server.h: Update.
17201 (struct inferior_list, struct_inferior_list_entry): New.
17202 * target.c (set_desired_inferior): New.
17203 (write_inferior_memory): Constify.
17204 (mywait): New function.
17205 * target.h: Update.
17206 (struct target_ops): New signal_pid method.
17207 (mywait): Removed macro, added prototype.
17209 * linux-low.h (regset_func): Removed.
17210 (regset_fill_func, regset_store_func): New.
17211 (enum regset_type): New.
17212 (struct regset_info): Add type field. Use new operation types.
17213 (struct linux_target_ops): stop_pc renamed to get_pc.
17214 Add decr_pc_after_break and breakpoint_at.
17215 (get_process, get_thread_proess, get_process_thread)
17216 (strut process_info, all_processes, linux_attach_lwp)
17217 (thread_db_init): New.
17219 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17220 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17221 (the_low_target): Add new members.
17222 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17223 (i386_store_fpxregset): Constify.
17224 (target_regsets): Add new kind identifier.
17225 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17226 (i386_set_pc): Add debugging.
17227 (i386_breakpoint_at): New function.
17228 (the_low_target): Add new members.
17229 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17230 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17231 (mips_breakpoint_at): New.
17232 (the_low_target): Add new members.
17233 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17234 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17235 (the_low_target): Add new members.
17236 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17237 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17238 (the_low_target): Add new members.
17239 * linux-x86-64-low.c (target_regsets): Add new kind
17242 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17244 From Martin Pool <mbp@samba.org>:
17245 * server.c (gdbserver_usage): New function.
17248 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17250 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17251 stop_at -> stop_pc.
17253 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17255 * Makefile.in: Remove obsolete code.
17257 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17259 * linux-low.c (regsets_fetch_inferior_registers),
17260 (regsets_store_inferior_registers): Removed cast to int from
17262 * regcache.h: Added declaration of struct inferior_info.
17264 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17266 * inferiors.c (struct inferior_info): Add regcache_data.
17267 (add_inferior): Call create_register_cache.
17268 (clear_inferiors): Call free_register_cache.
17269 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17270 * regcache.c (struct inferior_regcache_data): New.
17271 (registers): Remove.
17272 (get_regcache): New function.
17273 (create_register_cache, free_register_cache): New functions.
17274 (set_register_cache): Don't initialize the register cache here.
17275 (registers_to_string, registers_from_string, register_data): Call
17277 * regcache.h: Add prototypes.
17278 * server.h: Likewise.
17280 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17282 * mem-break.c: New file.
17283 * mem-break.h: New file.
17284 * Makefile.in: Add mem-break.o rule; update server.h
17286 * inferiors.c (struct inferior_info): Add target_data
17288 (clear_inferiors): Free target_data member if set.
17289 (inferior_target_data, set_inferior_target_data): New functions.
17290 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17291 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17292 * linux-low.c (linux_bp_reinsert): New variable.
17293 (struct inferior_linux_data): New.
17294 (linux_create_inferior): Use set_inferior_target_data.
17295 (linux_attach): Likewise. Call add_inferior.
17296 (linux_wait_for_one_inferior): New function.
17297 (linux_wait): Call it.
17298 (linux_write_memory): Add const.
17299 (initialize_low): Call set_breakpoint_data.
17300 * linux-low.h (struct linux_target_ops): Add breakpoint
17302 * server.c (attach_inferior): Remove extra add_inferior
17304 * server.h: Include mem-break.h. Update inferior.c
17306 * target.c (read_inferior_memory)
17307 (write_inferior_memory): New functions.
17308 * target.h (read_inferior_memory)
17309 (write_inferior_memory): Change macros to prototypes.
17310 (struct target_ops): Update comments. Add const to write_memory
17313 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17315 * linux-low.c (usr_store_inferior_registers): Support
17316 registers which are allowed to fail to store.
17317 * linux-low.h (linux_target_ops): Likewise.
17318 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17319 (ppc_cannot_store_register): FPSCR may not be storable.
17321 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17323 * server.h: Include <string.h> if HAVE_STRING_H.
17324 * ChangeLog: Correct paths in last ChangeLog entry.
17326 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17328 * linux-low.h: Remove obsolete prototypes.
17329 (struct linux_target_ops): New.
17330 (extern the_low_target): New.
17331 * linux-low.c (num_regs, regmap): Remove declarations.
17332 (register_addr): Use the_low_target explicitly.
17333 (fetch_register): Likewise.
17334 (usr_fetch_inferior_registers): Likewise.
17335 (usr_store_inferior_registers): Likewise.
17336 * linux-arm-low.c (num_regs): Remove.
17337 (arm_num_regs): Define.
17338 (arm_regmap): Renamed from regmap, made static.
17339 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17341 (arm_cannot_store_register): Renamed from cannot_store_register,
17343 (the_low_target): New.
17344 * linux-i386-low.c (num_regs): Remove.
17345 (i386_num_regs): Define.
17346 (i386_regmap): Renamed from regmap, made static.
17347 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17349 (i386_cannot_store_register): Renamed from cannot_store_register,
17351 (the_low_target): New.
17352 * linux-ia64-low.c (num_regs): Remove.
17353 (ia64_num_regs): Define.
17354 (ia64_regmap): Renamed from regmap, made static.
17355 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17357 (ia64_cannot_store_register): Renamed from cannot_store_register,
17359 (the_low_target): New.
17360 * linux-m68k-low.c (num_regs): Remove.
17361 (m68k_num_regs): Define.
17362 (m68k_regmap): Renamed from regmap, made static.
17363 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17365 (m68k_cannot_store_register): Renamed from cannot_store_register,
17367 (the_low_target): New.
17368 * linux-mips-low.c (num_regs): Remove.
17369 (mips_num_regs): Define.
17370 (mips_regmap): Renamed from regmap, made static.
17371 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17373 (mips_cannot_store_register): Renamed from cannot_store_register,
17375 (the_low_target): New.
17376 * linux-ppc-low.c (num_regs): Remove.
17377 (ppc_num_regs): Define.
17378 (ppc_regmap): Renamed from regmap, made static.
17379 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17381 (ppc_cannot_store_register): Renamed from cannot_store_register,
17383 (the_low_target): New.
17384 * linux-s390-low.c (num_regs): Remove.
17385 (s390_num_regs): Define.
17386 (s390_regmap): Renamed from regmap, made static.
17387 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17389 (s390_cannot_store_register): Renamed from cannot_store_register,
17391 (the_low_target): New.
17392 * linux-sh-low.c (num_regs): Remove.
17393 (sh_num_regs): Define.
17394 (sh_regmap): Renamed from regmap, made static.
17395 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17397 (sh_cannot_store_register): Renamed from cannot_store_register,
17399 (the_low_target): New.
17400 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17401 (the_low_target): New.
17403 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17405 * Makefile.in: Add stamp-h target.
17406 * configure.in: Create stamp-h.
17407 * configure: Regenerated.
17409 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17411 * inferiors.c: New file.
17412 * target.c: New file.
17413 * target.h: New file.
17414 * Makefile.in: Add target.o and inferiors.o. Update
17416 * linux-low.c (inferior_pid): New static variable,
17417 moved from server.c.
17418 (linux_create_inferior): Renamed from create_inferior.
17419 Call add_inferior. Return 0 on success instead of a PID.
17420 (linux_attach): Renamed from myattach.
17421 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17422 (linux_thread_alive): Renamed from mythread_alive.
17423 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17425 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17426 (regsets_store_inferior_registers): Correct error message.
17427 Add missing ``return 0''.
17428 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17429 (linux_store_registers): Renamed from store_inferior_registers.
17430 (linux_read_memory): Renamed from read_inferior_memory.
17431 (linux_write_memory): Renamed from write_inferior_memory.
17432 (linux_target_ops): New structure.
17433 (initialize_low): Call set_target_ops ().
17434 * remote-utils.c (unhexify): New function.
17435 (hexify): New function.
17436 (input_interrupt): Send signals to ``signal_pid''.
17437 * server.c (inferior_pid): Remove.
17438 (start_inferior): Update create_inferior call.
17439 (attach_inferior): Call add_inferior.
17440 (handle_query): New function.
17441 (main): Call handle_query for `q' packets.
17442 * server.h: Include "target.h". Remove obsolete prototypes.
17443 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17445 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17447 * Makefile.in: Add WARN_CFLAGS. Update configury
17449 * configure.in: Check for <string.h>
17450 * configure: Regenerate.
17451 * config.in: Regenerate.
17452 * gdbreplay.c: Include needed system headers.
17453 (remote_open): Remove strchr prototype.
17454 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17455 * regcache.c (supply_register): Change buf argument to const void *.
17456 (supply_register_by_name): Likewise.
17457 (collect_register): Change buf argument to void *.
17458 (collect_register_by_name): Likewise.
17459 * regcache.h: Add missing prototypes.
17460 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17461 * server.c (handle_query): New function.
17462 (attached): New static variable, moved out of main.
17463 (main): Quiet longjmp clobber warnings.
17464 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17465 * utils.c (error): Remove NORETURN.